torbaileys 8.0.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.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/WAProto/WAProto.proto +5311 -0
  3. package/WAProto/index.js +94091 -0
  4. package/lib/Defaults/index.js +123 -0
  5. package/lib/KeyDB/BinarySearch.js +20 -0
  6. package/lib/KeyDB/KeyedDB.js +167 -0
  7. package/lib/KeyDB/index.js +4 -0
  8. package/lib/Signal/Group/ciphertext-message.js +13 -0
  9. package/lib/Signal/Group/group-session-builder.js +32 -0
  10. package/lib/Signal/Group/group_cipher.js +84 -0
  11. package/lib/Signal/Group/index.js +13 -0
  12. package/lib/Signal/Group/keyhelper.js +20 -0
  13. package/lib/Signal/Group/sender-chain-key.js +28 -0
  14. package/lib/Signal/Group/sender-key-distribution-message.js +65 -0
  15. package/lib/Signal/Group/sender-key-message.js +68 -0
  16. package/lib/Signal/Group/sender-key-name.js +52 -0
  17. package/lib/Signal/Group/sender-key-record.js +43 -0
  18. package/lib/Signal/Group/sender-key-state.js +86 -0
  19. package/lib/Signal/Group/sender-message-key.js +28 -0
  20. package/lib/Signal/libsignal.js +324 -0
  21. package/lib/Signal/lid-mapping.js +155 -0
  22. package/lib/Socket/Client/index.js +4 -0
  23. package/lib/Socket/Client/types.js +13 -0
  24. package/lib/Socket/Client/websocket.js +52 -0
  25. package/lib/Socket/Client/websocket.js.bak +53 -0
  26. package/lib/Socket/business.js +377 -0
  27. package/lib/Socket/chats.js +881 -0
  28. package/lib/Socket/communities.js +413 -0
  29. package/lib/Socket/groups.js +312 -0
  30. package/lib/Socket/index.js +16 -0
  31. package/lib/Socket/messages-recv.js +1163 -0
  32. package/lib/Socket/messages-send.js +1100 -0
  33. package/lib/Socket/mex.js +45 -0
  34. package/lib/Socket/newsletter.js +262 -0
  35. package/lib/Socket/socket.js +820 -0
  36. package/lib/Store/index.js +6 -0
  37. package/lib/Store/make-cache-manager-store.js +75 -0
  38. package/lib/Store/make-in-memory-store.js +290 -0
  39. package/lib/Store/make-ordered-dictionary.js +79 -0
  40. package/lib/Store/object-repository.js +25 -0
  41. package/lib/Types/Auth.js +3 -0
  42. package/lib/Types/Bussines.js +3 -0
  43. package/lib/Types/Call.js +3 -0
  44. package/lib/Types/Chat.js +9 -0
  45. package/lib/Types/Contact.js +3 -0
  46. package/lib/Types/Events.js +3 -0
  47. package/lib/Types/GroupMetadata.js +3 -0
  48. package/lib/Types/Label.js +25 -0
  49. package/lib/Types/LabelAssociation.js +7 -0
  50. package/lib/Types/Message.js +12 -0
  51. package/lib/Types/Newsletter.js +33 -0
  52. package/lib/Types/Newsletter.js.bak +33 -0
  53. package/lib/Types/Product.js +3 -0
  54. package/lib/Types/Signal.js +3 -0
  55. package/lib/Types/Socket.js +4 -0
  56. package/lib/Types/State.js +11 -0
  57. package/lib/Types/USync.js +3 -0
  58. package/lib/Types/index.js +28 -0
  59. package/lib/Utils/auth-utils.js +219 -0
  60. package/lib/Utils/baileys-event-stream.js +44 -0
  61. package/lib/Utils/browser-utils.js +25 -0
  62. package/lib/Utils/business.js +233 -0
  63. package/lib/Utils/chat-utils.js +752 -0
  64. package/lib/Utils/crypto.js +130 -0
  65. package/lib/Utils/decode-wa-message.js +267 -0
  66. package/lib/Utils/decode-wa-message.js.bak +267 -0
  67. package/lib/Utils/event-buffer.js +528 -0
  68. package/lib/Utils/generics.js +355 -0
  69. package/lib/Utils/history.js +87 -0
  70. package/lib/Utils/index.js +21 -0
  71. package/lib/Utils/link-preview.js +81 -0
  72. package/lib/Utils/logger.js +5 -0
  73. package/lib/Utils/lt-hash.js +45 -0
  74. package/lib/Utils/make-mutex.js +36 -0
  75. package/lib/Utils/message-retry-manager.js +113 -0
  76. package/lib/Utils/messages-media.js +601 -0
  77. package/lib/Utils/messages.js +907 -0
  78. package/lib/Utils/noise-handler.js +144 -0
  79. package/lib/Utils/pre-key-manager.js +85 -0
  80. package/lib/Utils/process-message.js +341 -0
  81. package/lib/Utils/signal.js +161 -0
  82. package/lib/Utils/use-multi-file-auth-state.js +111 -0
  83. package/lib/Utils/validate-connection.js +200 -0
  84. package/lib/WABinary/constants.js +1303 -0
  85. package/lib/WABinary/decode.js +240 -0
  86. package/lib/WABinary/encode.js +218 -0
  87. package/lib/WABinary/generic-utils.js +189 -0
  88. package/lib/WABinary/index.js +7 -0
  89. package/lib/WABinary/jid-utils.js +93 -0
  90. package/lib/WABinary/types.js +3 -0
  91. package/lib/WAM/BinaryInfo.js +11 -0
  92. package/lib/WAM/constants.js +22853 -0
  93. package/lib/WAM/encode.js +154 -0
  94. package/lib/WAM/index.js +5 -0
  95. package/lib/WAUSync/Protocols/USyncContactProtocol.js +30 -0
  96. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -0
  97. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +29 -0
  98. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +39 -0
  99. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -0
  100. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +30 -0
  101. package/lib/WAUSync/Protocols/index.js +6 -0
  102. package/lib/WAUSync/USyncQuery.js +90 -0
  103. package/lib/WAUSync/USyncUser.js +24 -0
  104. package/lib/WAUSync/index.js +5 -0
  105. package/lib/index.js +16 -0
  106. package/package.json +105 -0
@@ -0,0 +1,1303 @@
1
+ //=======================================================//
2
+ export const TAGS = {
3
+ LIST_EMPTY: 0,
4
+ DICTIONARY_0: 236,
5
+ DICTIONARY_1: 237,
6
+ DICTIONARY_2: 238,
7
+ DICTIONARY_3: 239,
8
+ INTEROP_JID: 245,
9
+ FB_JID: 246,
10
+ AD_JID: 247,
11
+ LIST_8: 248,
12
+ LIST_16: 249,
13
+ JID_PAIR: 250,
14
+ HEX_8: 251,
15
+ BINARY_8: 252,
16
+ BINARY_20: 253,
17
+ BINARY_32: 254,
18
+ NIBBLE_8: 255,
19
+ PACKED_MAX: 127
20
+ };
21
+ export const DOUBLE_BYTE_TOKENS = [
22
+ [
23
+ "read-self",
24
+ "active",
25
+ "fbns",
26
+ "protocol",
27
+ "reaction",
28
+ "screen_width",
29
+ "heartbeat",
30
+ "deviceid",
31
+ "2:47DEQpj8",
32
+ "uploadfieldstat",
33
+ "voip_settings",
34
+ "retry",
35
+ "priority",
36
+ "longitude",
37
+ "conflict",
38
+ "false",
39
+ "ig_professional",
40
+ "replaced",
41
+ "preaccept",
42
+ "cover_photo",
43
+ "uncompressed",
44
+ "encopt",
45
+ "ppic",
46
+ "04",
47
+ "passive",
48
+ "status-revoke-drop",
49
+ "keygen",
50
+ "540",
51
+ "offer",
52
+ "rate",
53
+ "opus",
54
+ "latitude",
55
+ "w:gp2",
56
+ "ver",
57
+ "4",
58
+ "business_profile",
59
+ "medium",
60
+ "sender",
61
+ "prev_v_id",
62
+ "email",
63
+ "website",
64
+ "invited",
65
+ "sign_credential",
66
+ "05",
67
+ "transport",
68
+ "skey",
69
+ "reason",
70
+ "peer_abtest_bucket",
71
+ "America/Sao_Paulo",
72
+ "appid",
73
+ "refresh",
74
+ "100",
75
+ "06",
76
+ "404",
77
+ "101",
78
+ "104",
79
+ "107",
80
+ "102",
81
+ "109",
82
+ "103",
83
+ "member_add_mode",
84
+ "105",
85
+ "transaction-id",
86
+ "110",
87
+ "106",
88
+ "outgoing",
89
+ "108",
90
+ "111",
91
+ "tokens",
92
+ "followers",
93
+ "ig_handle",
94
+ "self_pid",
95
+ "tue",
96
+ "dec",
97
+ "thu",
98
+ "joinable",
99
+ "peer_pid",
100
+ "mon",
101
+ "features",
102
+ "wed",
103
+ "peer_device_presence",
104
+ "pn",
105
+ "delete",
106
+ "07",
107
+ "fri",
108
+ "audio_duration",
109
+ "admin",
110
+ "connected",
111
+ "delta",
112
+ "rcat",
113
+ "disable",
114
+ "collection",
115
+ "08",
116
+ "480",
117
+ "sat",
118
+ "phash",
119
+ "all",
120
+ "invite",
121
+ "accept",
122
+ "critical_unblock_low",
123
+ "group_update",
124
+ "signed_credential",
125
+ "blinded_credential",
126
+ "eph_setting",
127
+ "net",
128
+ "09",
129
+ "background_location",
130
+ "refresh_id",
131
+ "Asia/Kolkata",
132
+ "privacy_mode_ts",
133
+ "account_sync",
134
+ "voip_payload_type",
135
+ "service_areas",
136
+ "acs_public_key",
137
+ "v_id",
138
+ "0a",
139
+ "fallback_class",
140
+ "relay",
141
+ "actual_actors",
142
+ "metadata",
143
+ "w:biz",
144
+ "5",
145
+ "connected-limit",
146
+ "notice",
147
+ "0b",
148
+ "host_storage",
149
+ "fb_page",
150
+ "subject",
151
+ "privatestats",
152
+ "invis",
153
+ "groupadd",
154
+ "010",
155
+ "note.m4r",
156
+ "uuid",
157
+ "0c",
158
+ "8000",
159
+ "sun",
160
+ "372",
161
+ "1020",
162
+ "stage",
163
+ "1200",
164
+ "720",
165
+ "canonical",
166
+ "fb",
167
+ "011",
168
+ "video_duration",
169
+ "0d",
170
+ "1140",
171
+ "superadmin",
172
+ "012",
173
+ "Opening.m4r",
174
+ "keystore_attestation",
175
+ "dleq_proof",
176
+ "013",
177
+ "timestamp",
178
+ "ab_key",
179
+ "w:sync:app:state",
180
+ "0e",
181
+ "vertical",
182
+ "600",
183
+ "p_v_id",
184
+ "6",
185
+ "likes",
186
+ "014",
187
+ "500",
188
+ "1260",
189
+ "creator",
190
+ "0f",
191
+ "rte",
192
+ "destination",
193
+ "group",
194
+ "group_info",
195
+ "syncd_anti_tampering_fatal_exception_enabled",
196
+ "015",
197
+ "dl_bw",
198
+ "Asia/Jakarta",
199
+ "vp8/h.264",
200
+ "online",
201
+ "1320",
202
+ "fb:multiway",
203
+ "10",
204
+ "timeout",
205
+ "016",
206
+ "nse_retry",
207
+ "urn:xmpp:whatsapp:dirty",
208
+ "017",
209
+ "a_v_id",
210
+ "web_shops_chat_header_button_enabled",
211
+ "nse_call",
212
+ "inactive-upgrade",
213
+ "none",
214
+ "web",
215
+ "groups",
216
+ "2250",
217
+ "mms_hot_content_timespan_in_seconds",
218
+ "contact_blacklist",
219
+ "nse_read",
220
+ "suspended_group_deletion_notification",
221
+ "binary_version",
222
+ "018",
223
+ "https://www.whatsapp.com/otp/copy/",
224
+ "reg_push",
225
+ "shops_hide_catalog_attachment_entrypoint",
226
+ "server_sync",
227
+ ".",
228
+ "ephemeral_messages_allowed_values",
229
+ "019",
230
+ "mms_vcache_aggregation_enabled",
231
+ "iphone",
232
+ "America/Argentina/Buenos_Aires",
233
+ "01a",
234
+ "mms_vcard_autodownload_size_kb",
235
+ "nse_ver",
236
+ "shops_header_dropdown_menu_item",
237
+ "dhash",
238
+ "catalog_status",
239
+ "communities_mvp_new_iqs_serverprop",
240
+ "blocklist",
241
+ "default",
242
+ "11",
243
+ "ephemeral_messages_enabled",
244
+ "01b",
245
+ "original_dimensions",
246
+ "8",
247
+ "mms4_media_retry_notification_encryption_enabled",
248
+ "mms4_server_error_receipt_encryption_enabled",
249
+ "original_image_url",
250
+ "sync",
251
+ "multiway",
252
+ "420",
253
+ "companion_enc_static",
254
+ "shops_profile_drawer_entrypoint",
255
+ "01c",
256
+ "vcard_as_document_size_kb",
257
+ "status_video_max_duration",
258
+ "request_image_url",
259
+ "01d",
260
+ "regular_high",
261
+ "s_t",
262
+ "abt",
263
+ "share_ext_min_preliminary_image_quality",
264
+ "01e",
265
+ "32",
266
+ "syncd_key_rotation_enabled",
267
+ "data_namespace",
268
+ "md_downgrade_read_receipts2",
269
+ "patch",
270
+ "polltype",
271
+ "ephemeral_messages_setting",
272
+ "userrate",
273
+ "15",
274
+ "partial_pjpeg_bw_threshold",
275
+ "played-self",
276
+ "catalog_exists",
277
+ "01f",
278
+ "mute_v2"
279
+ ],
280
+ [
281
+ "reject",
282
+ "dirty",
283
+ "announcement",
284
+ "020",
285
+ "13",
286
+ "9",
287
+ "status_video_max_bitrate",
288
+ "fb:thrift_iq",
289
+ "offline_batch",
290
+ "022",
291
+ "full",
292
+ "ctwa_first_business_reply_logging",
293
+ "h.264",
294
+ "smax_id",
295
+ "group_description_length",
296
+ "https://www.whatsapp.com/otp/code",
297
+ "status_image_max_edge",
298
+ "smb_upsell_business_profile_enabled",
299
+ "021",
300
+ "web_upgrade_to_md_modal",
301
+ "14",
302
+ "023",
303
+ "s_o",
304
+ "smaller_video_thumbs_status_enabled",
305
+ "media_max_autodownload",
306
+ "960",
307
+ "blocking_status",
308
+ "peer_msg",
309
+ "joinable_group_call_client_version",
310
+ "group_call_video_maximization_enabled",
311
+ "return_snapshot",
312
+ "high",
313
+ "America/Mexico_City",
314
+ "entry_point_block_logging_enabled",
315
+ "pop",
316
+ "024",
317
+ "1050",
318
+ "16",
319
+ "1380",
320
+ "one_tap_calling_in_group_chat_size",
321
+ "regular_low",
322
+ "inline_joinable_education_enabled",
323
+ "hq_image_max_edge",
324
+ "locked",
325
+ "America/Bogota",
326
+ "smb_biztools_deeplink_enabled",
327
+ "status_image_quality",
328
+ "1088",
329
+ "025",
330
+ "payments_upi_intent_transaction_limit",
331
+ "voip",
332
+ "w:g2",
333
+ "027",
334
+ "md_pin_chat_enabled",
335
+ "026",
336
+ "multi_scan_pjpeg_download_enabled",
337
+ "shops_product_grid",
338
+ "transaction_id",
339
+ "ctwa_context_enabled",
340
+ "20",
341
+ "fna",
342
+ "hq_image_quality",
343
+ "alt_jpeg_doc_detection_quality",
344
+ "group_call_max_participants",
345
+ "pkey",
346
+ "America/Belem",
347
+ "image_max_kbytes",
348
+ "web_cart_v1_1_order_message_changes_enabled",
349
+ "ctwa_context_enterprise_enabled",
350
+ "urn:xmpp:whatsapp:account",
351
+ "840",
352
+ "Asia/Kuala_Lumpur",
353
+ "max_participants",
354
+ "video_remux_after_repair_enabled",
355
+ "stella_addressbook_restriction_type",
356
+ "660",
357
+ "900",
358
+ "780",
359
+ "context_menu_ios13_enabled",
360
+ "mute-state",
361
+ "ref",
362
+ "payments_request_messages",
363
+ "029",
364
+ "frskmsg",
365
+ "vcard_max_size_kb",
366
+ "sample_buffer_gif_player_enabled",
367
+ "match_last_seen",
368
+ "510",
369
+ "4983",
370
+ "video_max_bitrate",
371
+ "028",
372
+ "w:comms:chat",
373
+ "17",
374
+ "frequently_forwarded_max",
375
+ "groups_privacy_blacklist",
376
+ "Asia/Karachi",
377
+ "02a",
378
+ "web_download_document_thumb_mms_enabled",
379
+ "02b",
380
+ "hist_sync",
381
+ "biz_block_reasons_version",
382
+ "1024",
383
+ "18",
384
+ "web_is_direct_connection_for_plm_transparent",
385
+ "view_once_write",
386
+ "file_max_size",
387
+ "paid_convo_id",
388
+ "online_privacy_setting",
389
+ "video_max_edge",
390
+ "view_once_read",
391
+ "enhanced_storage_management",
392
+ "multi_scan_pjpeg_encoding_enabled",
393
+ "ctwa_context_forward_enabled",
394
+ "video_transcode_downgrade_enable",
395
+ "template_doc_mime_types",
396
+ "hq_image_bw_threshold",
397
+ "30",
398
+ "body",
399
+ "u_aud_limit_sil_restarts_ctrl",
400
+ "other",
401
+ "participating",
402
+ "w:biz:directory",
403
+ "1110",
404
+ "vp8",
405
+ "4018",
406
+ "meta",
407
+ "doc_detection_image_max_edge",
408
+ "image_quality",
409
+ "1170",
410
+ "02c",
411
+ "smb_upsell_chat_banner_enabled",
412
+ "key_expiry_time_second",
413
+ "pid",
414
+ "stella_interop_enabled",
415
+ "19",
416
+ "linked_device_max_count",
417
+ "md_device_sync_enabled",
418
+ "02d",
419
+ "02e",
420
+ "360",
421
+ "enhanced_block_enabled",
422
+ "ephemeral_icon_in_forwarding",
423
+ "paid_convo_status",
424
+ "gif_provider",
425
+ "project_name",
426
+ "server-error",
427
+ "canonical_url_validation_enabled",
428
+ "wallpapers_v2",
429
+ "syncd_clear_chat_delete_chat_enabled",
430
+ "medianotify",
431
+ "02f",
432
+ "shops_required_tos_version",
433
+ "vote",
434
+ "reset_skey_on_id_change",
435
+ "030",
436
+ "image_max_edge",
437
+ "multicast_limit_global",
438
+ "ul_bw",
439
+ "21",
440
+ "25",
441
+ "5000",
442
+ "poll",
443
+ "570",
444
+ "22",
445
+ "031",
446
+ "1280",
447
+ "WhatsApp",
448
+ "032",
449
+ "bloks_shops_enabled",
450
+ "50",
451
+ "upload_host_switching_enabled",
452
+ "web_ctwa_context_compose_enabled",
453
+ "ptt_forwarded_features_enabled",
454
+ "unblocked",
455
+ "partial_pjpeg_enabled",
456
+ "fbid:devices",
457
+ "height",
458
+ "ephemeral_group_query_ts",
459
+ "group_join_permissions",
460
+ "order",
461
+ "033",
462
+ "alt_jpeg_status_quality",
463
+ "migrate",
464
+ "popular-bank",
465
+ "win_uwp_deprecation_killswitch_enabled",
466
+ "web_download_status_thumb_mms_enabled",
467
+ "blocking",
468
+ "url_text",
469
+ "035",
470
+ "web_forwarding_limit_to_groups",
471
+ "1600",
472
+ "val",
473
+ "1000",
474
+ "syncd_msg_date_enabled",
475
+ "bank-ref-id",
476
+ "max_subject",
477
+ "payments_web_enabled",
478
+ "web_upload_document_thumb_mms_enabled",
479
+ "size",
480
+ "request",
481
+ "ephemeral",
482
+ "24",
483
+ "receipt_agg",
484
+ "ptt_remember_play_position",
485
+ "sampling_weight",
486
+ "enc_rekey",
487
+ "mute_always",
488
+ "037",
489
+ "034",
490
+ "23",
491
+ "036",
492
+ "action",
493
+ "click_to_chat_qr_enabled",
494
+ "width",
495
+ "disabled",
496
+ "038",
497
+ "md_blocklist_v2",
498
+ "played_self_enabled",
499
+ "web_buttons_message_enabled",
500
+ "flow_id",
501
+ "clear",
502
+ "450",
503
+ "fbid:thread",
504
+ "bloks_session_state",
505
+ "America/Lima",
506
+ "attachment_picker_refresh",
507
+ "download_host_switching_enabled",
508
+ "1792",
509
+ "u_aud_limit_sil_restarts_test2",
510
+ "custom_urls",
511
+ "device_fanout",
512
+ "optimistic_upload",
513
+ "2000",
514
+ "key_cipher_suite",
515
+ "web_smb_upsell_in_biz_profile_enabled",
516
+ "e",
517
+ "039",
518
+ "siri_post_status_shortcut",
519
+ "pair-device",
520
+ "lg",
521
+ "lc",
522
+ "stream_attribution_url",
523
+ "model",
524
+ "mspjpeg_phash_gen",
525
+ "catalog_send_all",
526
+ "new_multi_vcards_ui",
527
+ "share_biz_vcard_enabled",
528
+ "-",
529
+ "clean",
530
+ "200",
531
+ "md_blocklist_v2_server",
532
+ "03b",
533
+ "03a",
534
+ "web_md_migration_experience",
535
+ "ptt_conversation_waveform",
536
+ "u_aud_limit_sil_restarts_test1"
537
+ ],
538
+ [
539
+ "64",
540
+ "ptt_playback_speed_enabled",
541
+ "web_product_list_message_enabled",
542
+ "paid_convo_ts",
543
+ "27",
544
+ "manufacturer",
545
+ "psp-routing",
546
+ "grp_uii_cleanup",
547
+ "ptt_draft_enabled",
548
+ "03c",
549
+ "business_initiated",
550
+ "web_catalog_products_onoff",
551
+ "web_upload_link_thumb_mms_enabled",
552
+ "03e",
553
+ "mediaretry",
554
+ "35",
555
+ "hfm_string_changes",
556
+ "28",
557
+ "America/Fortaleza",
558
+ "max_keys",
559
+ "md_mhfs_days",
560
+ "streaming_upload_chunk_size",
561
+ "5541",
562
+ "040",
563
+ "03d",
564
+ "2675",
565
+ "03f",
566
+ "...",
567
+ "512",
568
+ "mute",
569
+ "48",
570
+ "041",
571
+ "alt_jpeg_quality",
572
+ "60",
573
+ "042",
574
+ "md_smb_quick_reply",
575
+ "5183",
576
+ "c",
577
+ "1343",
578
+ "40",
579
+ "1230",
580
+ "043",
581
+ "044",
582
+ "mms_cat_v1_forward_hot_override_enabled",
583
+ "user_notice",
584
+ "ptt_waveform_send",
585
+ "047",
586
+ "Asia/Calcutta",
587
+ "250",
588
+ "md_privacy_v2",
589
+ "31",
590
+ "29",
591
+ "128",
592
+ "md_messaging_enabled",
593
+ "046",
594
+ "crypto",
595
+ "690",
596
+ "045",
597
+ "enc_iv",
598
+ "75",
599
+ "failure",
600
+ "ptt_oot_playback",
601
+ "AIzaSyDR5yfaG7OG8sMTUj8kfQEb8T9pN8BM6Lk",
602
+ "w",
603
+ "048",
604
+ "2201",
605
+ "web_large_files_ui",
606
+ "Asia/Makassar",
607
+ "812",
608
+ "status_collapse_muted",
609
+ "1334",
610
+ "257",
611
+ "2HP4dm",
612
+ "049",
613
+ "patches",
614
+ "1290",
615
+ "43cY6T",
616
+ "America/Caracas",
617
+ "web_sticker_maker",
618
+ "campaign",
619
+ "ptt_pausable_enabled",
620
+ "33",
621
+ "42",
622
+ "attestation",
623
+ "biz",
624
+ "04b",
625
+ "query_linked",
626
+ "s",
627
+ "125",
628
+ "04a",
629
+ "810",
630
+ "availability",
631
+ "1411",
632
+ "responsiveness_v2_m1",
633
+ "catalog_not_created",
634
+ "34",
635
+ "America/Santiago",
636
+ "1465",
637
+ "enc_p",
638
+ "04d",
639
+ "status_info",
640
+ "04f",
641
+ "key_version",
642
+ "..",
643
+ "04c",
644
+ "04e",
645
+ "md_group_notification",
646
+ "1598",
647
+ "1215",
648
+ "web_cart_enabled",
649
+ "37",
650
+ "630",
651
+ "1920",
652
+ "2394",
653
+ "-1",
654
+ "vcard",
655
+ "38",
656
+ "elapsed",
657
+ "36",
658
+ "828",
659
+ "peer",
660
+ "pricing_category",
661
+ "1245",
662
+ "invalid",
663
+ "stella_ios_enabled",
664
+ "2687",
665
+ "45",
666
+ "1528",
667
+ "39",
668
+ "u_is_redial_audio_1104_ctrl",
669
+ "1025",
670
+ "1455",
671
+ "58",
672
+ "2524",
673
+ "2603",
674
+ "054",
675
+ "bsp_system_message_enabled",
676
+ "web_pip_redesign",
677
+ "051",
678
+ "verify_apps",
679
+ "1974",
680
+ "1272",
681
+ "1322",
682
+ "1755",
683
+ "052",
684
+ "70",
685
+ "050",
686
+ "1063",
687
+ "1135",
688
+ "1361",
689
+ "80",
690
+ "1096",
691
+ "1828",
692
+ "1851",
693
+ "1251",
694
+ "1921",
695
+ "key_config_id",
696
+ "1254",
697
+ "1566",
698
+ "1252",
699
+ "2525",
700
+ "critical_block",
701
+ "1669",
702
+ "max_available",
703
+ "w:auth:backup:token",
704
+ "product",
705
+ "2530",
706
+ "870",
707
+ "1022",
708
+ "participant_uuid",
709
+ "web_cart_on_off",
710
+ "1255",
711
+ "1432",
712
+ "1867",
713
+ "41",
714
+ "1415",
715
+ "1440",
716
+ "240",
717
+ "1204",
718
+ "1608",
719
+ "1690",
720
+ "1846",
721
+ "1483",
722
+ "1687",
723
+ "1749",
724
+ "69",
725
+ "url_number",
726
+ "053",
727
+ "1325",
728
+ "1040",
729
+ "365",
730
+ "59",
731
+ "Asia/Riyadh",
732
+ "1177",
733
+ "test_recommended",
734
+ "057",
735
+ "1612",
736
+ "43",
737
+ "1061",
738
+ "1518",
739
+ "1635",
740
+ "055",
741
+ "1034",
742
+ "1375",
743
+ "750",
744
+ "1430",
745
+ "event_code",
746
+ "1682",
747
+ "503",
748
+ "55",
749
+ "865",
750
+ "78",
751
+ "1309",
752
+ "1365",
753
+ "44",
754
+ "America/Guayaquil",
755
+ "535",
756
+ "LIMITED",
757
+ "1377",
758
+ "1613",
759
+ "1420",
760
+ "1599",
761
+ "1822",
762
+ "05a",
763
+ "1681",
764
+ "password",
765
+ "1111",
766
+ "1214",
767
+ "1376",
768
+ "1478",
769
+ "47",
770
+ "1082",
771
+ "4282",
772
+ "Europe/Istanbul",
773
+ "1307",
774
+ "46",
775
+ "058",
776
+ "1124",
777
+ "256",
778
+ "rate-overlimit",
779
+ "retail",
780
+ "u_a_socket_err_fix_succ_test",
781
+ "1292",
782
+ "1370",
783
+ "1388",
784
+ "520",
785
+ "861",
786
+ "psa",
787
+ "regular",
788
+ "1181",
789
+ "1766",
790
+ "05b",
791
+ "1183",
792
+ "1213",
793
+ "1304",
794
+ "1537"
795
+ ],
796
+ [
797
+ "1724",
798
+ "profile_picture",
799
+ "1071",
800
+ "1314",
801
+ "1605",
802
+ "407",
803
+ "990",
804
+ "1710",
805
+ "746",
806
+ "pricing_model",
807
+ "056",
808
+ "059",
809
+ "061",
810
+ "1119",
811
+ "6027",
812
+ "65",
813
+ "877",
814
+ "1607",
815
+ "05d",
816
+ "917",
817
+ "seen",
818
+ "1516",
819
+ "49",
820
+ "470",
821
+ "973",
822
+ "1037",
823
+ "1350",
824
+ "1394",
825
+ "1480",
826
+ "1796",
827
+ "keys",
828
+ "794",
829
+ "1536",
830
+ "1594",
831
+ "2378",
832
+ "1333",
833
+ "1524",
834
+ "1825",
835
+ "116",
836
+ "309",
837
+ "52",
838
+ "808",
839
+ "827",
840
+ "909",
841
+ "495",
842
+ "1660",
843
+ "361",
844
+ "957",
845
+ "google",
846
+ "1357",
847
+ "1565",
848
+ "1967",
849
+ "996",
850
+ "1775",
851
+ "586",
852
+ "736",
853
+ "1052",
854
+ "1670",
855
+ "bank",
856
+ "177",
857
+ "1416",
858
+ "2194",
859
+ "2222",
860
+ "1454",
861
+ "1839",
862
+ "1275",
863
+ "53",
864
+ "997",
865
+ "1629",
866
+ "6028",
867
+ "smba",
868
+ "1378",
869
+ "1410",
870
+ "05c",
871
+ "1849",
872
+ "727",
873
+ "create",
874
+ "1559",
875
+ "536",
876
+ "1106",
877
+ "1310",
878
+ "1944",
879
+ "670",
880
+ "1297",
881
+ "1316",
882
+ "1762",
883
+ "en",
884
+ "1148",
885
+ "1295",
886
+ "1551",
887
+ "1853",
888
+ "1890",
889
+ "1208",
890
+ "1784",
891
+ "7200",
892
+ "05f",
893
+ "178",
894
+ "1283",
895
+ "1332",
896
+ "381",
897
+ "643",
898
+ "1056",
899
+ "1238",
900
+ "2024",
901
+ "2387",
902
+ "179",
903
+ "981",
904
+ "1547",
905
+ "1705",
906
+ "05e",
907
+ "290",
908
+ "903",
909
+ "1069",
910
+ "1285",
911
+ "2436",
912
+ "062",
913
+ "251",
914
+ "560",
915
+ "582",
916
+ "719",
917
+ "56",
918
+ "1700",
919
+ "2321",
920
+ "325",
921
+ "448",
922
+ "613",
923
+ "777",
924
+ "791",
925
+ "51",
926
+ "488",
927
+ "902",
928
+ "Asia/Almaty",
929
+ "is_hidden",
930
+ "1398",
931
+ "1527",
932
+ "1893",
933
+ "1999",
934
+ "2367",
935
+ "2642",
936
+ "237",
937
+ "busy",
938
+ "065",
939
+ "067",
940
+ "233",
941
+ "590",
942
+ "993",
943
+ "1511",
944
+ "54",
945
+ "723",
946
+ "860",
947
+ "363",
948
+ "487",
949
+ "522",
950
+ "605",
951
+ "995",
952
+ "1321",
953
+ "1691",
954
+ "1865",
955
+ "2447",
956
+ "2462",
957
+ "NON_TRANSACTIONAL",
958
+ "433",
959
+ "871",
960
+ "432",
961
+ "1004",
962
+ "1207",
963
+ "2032",
964
+ "2050",
965
+ "2379",
966
+ "2446",
967
+ "279",
968
+ "636",
969
+ "703",
970
+ "904",
971
+ "248",
972
+ "370",
973
+ "691",
974
+ "700",
975
+ "1068",
976
+ "1655",
977
+ "2334",
978
+ "060",
979
+ "063",
980
+ "364",
981
+ "533",
982
+ "534",
983
+ "567",
984
+ "1191",
985
+ "1210",
986
+ "1473",
987
+ "1827",
988
+ "069",
989
+ "701",
990
+ "2531",
991
+ "514",
992
+ "prev_dhash",
993
+ "064",
994
+ "496",
995
+ "790",
996
+ "1046",
997
+ "1139",
998
+ "1505",
999
+ "1521",
1000
+ "1108",
1001
+ "207",
1002
+ "544",
1003
+ "637",
1004
+ "final",
1005
+ "1173",
1006
+ "1293",
1007
+ "1694",
1008
+ "1939",
1009
+ "1951",
1010
+ "1993",
1011
+ "2353",
1012
+ "2515",
1013
+ "504",
1014
+ "601",
1015
+ "857",
1016
+ "modify",
1017
+ "spam_request",
1018
+ "p_121_aa_1101_test4",
1019
+ "866",
1020
+ "1427",
1021
+ "1502",
1022
+ "1638",
1023
+ "1744",
1024
+ "2153",
1025
+ "068",
1026
+ "382",
1027
+ "725",
1028
+ "1704",
1029
+ "1864",
1030
+ "1990",
1031
+ "2003",
1032
+ "Asia/Dubai",
1033
+ "508",
1034
+ "531",
1035
+ "1387",
1036
+ "1474",
1037
+ "1632",
1038
+ "2307",
1039
+ "2386",
1040
+ "819",
1041
+ "2014",
1042
+ "066",
1043
+ "387",
1044
+ "1468",
1045
+ "1706",
1046
+ "2186",
1047
+ "2261",
1048
+ "471",
1049
+ "728",
1050
+ "1147",
1051
+ "1372",
1052
+ "1961"
1053
+ ]
1054
+ ];
1055
+ export const SINGLE_BYTE_TOKENS = [
1056
+ "",
1057
+ "xmlstreamstart",
1058
+ "xmlstreamend",
1059
+ "s.whatsapp.net",
1060
+ "type",
1061
+ "participant",
1062
+ "from",
1063
+ "receipt",
1064
+ "id",
1065
+ "notification",
1066
+ "disappearing_mode",
1067
+ "status",
1068
+ "jid",
1069
+ "broadcast",
1070
+ "user",
1071
+ "devices",
1072
+ "device_hash",
1073
+ "to",
1074
+ "offline",
1075
+ "message",
1076
+ "result",
1077
+ "class",
1078
+ "xmlns",
1079
+ "duration",
1080
+ "notify",
1081
+ "iq",
1082
+ "t",
1083
+ "ack",
1084
+ "g.us",
1085
+ "enc",
1086
+ "urn:xmpp:whatsapp:push",
1087
+ "presence",
1088
+ "config_value",
1089
+ "picture",
1090
+ "verified_name",
1091
+ "config_code",
1092
+ "key-index-list",
1093
+ "contact",
1094
+ "mediatype",
1095
+ "routing_info",
1096
+ "edge_routing",
1097
+ "get",
1098
+ "read",
1099
+ "urn:xmpp:ping",
1100
+ "fallback_hostname",
1101
+ "0",
1102
+ "chatstate",
1103
+ "business_hours_config",
1104
+ "unavailable",
1105
+ "download_buckets",
1106
+ "skmsg",
1107
+ "verified_level",
1108
+ "composing",
1109
+ "handshake",
1110
+ "device-list",
1111
+ "media",
1112
+ "text",
1113
+ "fallback_ip4",
1114
+ "media_conn",
1115
+ "device",
1116
+ "creation",
1117
+ "location",
1118
+ "config",
1119
+ "item",
1120
+ "fallback_ip6",
1121
+ "count",
1122
+ "w:profile:picture",
1123
+ "image",
1124
+ "business",
1125
+ "2",
1126
+ "hostname",
1127
+ "call-creator",
1128
+ "display_name",
1129
+ "relaylatency",
1130
+ "platform",
1131
+ "abprops",
1132
+ "success",
1133
+ "msg",
1134
+ "offline_preview",
1135
+ "prop",
1136
+ "key-index",
1137
+ "v",
1138
+ "day_of_week",
1139
+ "pkmsg",
1140
+ "version",
1141
+ "1",
1142
+ "ping",
1143
+ "w:p",
1144
+ "download",
1145
+ "video",
1146
+ "set",
1147
+ "specific_hours",
1148
+ "props",
1149
+ "primary",
1150
+ "unknown",
1151
+ "hash",
1152
+ "commerce_experience",
1153
+ "last",
1154
+ "subscribe",
1155
+ "max_buckets",
1156
+ "call",
1157
+ "profile",
1158
+ "member_since_text",
1159
+ "close_time",
1160
+ "call-id",
1161
+ "sticker",
1162
+ "mode",
1163
+ "participants",
1164
+ "value",
1165
+ "query",
1166
+ "profile_options",
1167
+ "open_time",
1168
+ "code",
1169
+ "list",
1170
+ "host",
1171
+ "ts",
1172
+ "contacts",
1173
+ "upload",
1174
+ "lid",
1175
+ "preview",
1176
+ "update",
1177
+ "usync",
1178
+ "w:stats",
1179
+ "delivery",
1180
+ "auth_ttl",
1181
+ "context",
1182
+ "fail",
1183
+ "cart_enabled",
1184
+ "appdata",
1185
+ "category",
1186
+ "atn",
1187
+ "direct_connection",
1188
+ "decrypt-fail",
1189
+ "relay_id",
1190
+ "mmg-fallback.whatsapp.net",
1191
+ "target",
1192
+ "available",
1193
+ "name",
1194
+ "last_id",
1195
+ "mmg.whatsapp.net",
1196
+ "categories",
1197
+ "401",
1198
+ "is_new",
1199
+ "index",
1200
+ "tctoken",
1201
+ "ip4",
1202
+ "token_id",
1203
+ "latency",
1204
+ "recipient",
1205
+ "edit",
1206
+ "ip6",
1207
+ "add",
1208
+ "thumbnail-document",
1209
+ "26",
1210
+ "paused",
1211
+ "true",
1212
+ "identity",
1213
+ "stream:error",
1214
+ "key",
1215
+ "sidelist",
1216
+ "background",
1217
+ "audio",
1218
+ "3",
1219
+ "thumbnail-image",
1220
+ "biz-cover-photo",
1221
+ "cat",
1222
+ "gcm",
1223
+ "thumbnail-video",
1224
+ "error",
1225
+ "auth",
1226
+ "deny",
1227
+ "serial",
1228
+ "in",
1229
+ "registration",
1230
+ "thumbnail-link",
1231
+ "remove",
1232
+ "00",
1233
+ "gif",
1234
+ "thumbnail-gif",
1235
+ "tag",
1236
+ "capability",
1237
+ "multicast",
1238
+ "item-not-found",
1239
+ "description",
1240
+ "business_hours",
1241
+ "config_expo_key",
1242
+ "md-app-state",
1243
+ "expiration",
1244
+ "fallback",
1245
+ "ttl",
1246
+ "300",
1247
+ "md-msg-hist",
1248
+ "device_orientation",
1249
+ "out",
1250
+ "w:m",
1251
+ "open_24h",
1252
+ "side_list",
1253
+ "token",
1254
+ "inactive",
1255
+ "01",
1256
+ "document",
1257
+ "te2",
1258
+ "played",
1259
+ "encrypt",
1260
+ "msgr",
1261
+ "hide",
1262
+ "direct_path",
1263
+ "12",
1264
+ "state",
1265
+ "not-authorized",
1266
+ "url",
1267
+ "terminate",
1268
+ "signature",
1269
+ "status-revoke-delay",
1270
+ "02",
1271
+ "te",
1272
+ "linked_accounts",
1273
+ "trusted_contact",
1274
+ "timezone",
1275
+ "ptt",
1276
+ "kyc-id",
1277
+ "privacy_token",
1278
+ "readreceipts",
1279
+ "appointment_only",
1280
+ "address",
1281
+ "expected_ts",
1282
+ "privacy",
1283
+ "7",
1284
+ "android",
1285
+ "interactive",
1286
+ "device-identity",
1287
+ "enabled",
1288
+ "attribute_padding",
1289
+ "1080",
1290
+ "03",
1291
+ "screen_height"
1292
+ ];
1293
+ //=======================================================//
1294
+ export const TOKEN_MAP = {};
1295
+ for (const [i, SINGLE_BYTE_TOKEN] of SINGLE_BYTE_TOKENS.entries()) {
1296
+ TOKEN_MAP[SINGLE_BYTE_TOKEN] = { index: i };
1297
+ }
1298
+ for (const [i, DOUBLE_BYTE_TOKEN] of DOUBLE_BYTE_TOKENS.entries()) {
1299
+ for (const [j, element] of DOUBLE_BYTE_TOKEN.entries()) {
1300
+ TOKEN_MAP[element] = { dict: i, index: j };
1301
+ }
1302
+ }
1303
+ //=======================================================//