@hiroosy/baileys-lite 0.3.4 → 0.3.5

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 (225) hide show
  1. package/WAProto/index.js +231 -113252
  2. package/WAProto/parts/ADVDeviceIdentity.part +201 -0
  3. package/WAProto/parts/ADVEncryptionType.part +6 -0
  4. package/WAProto/parts/ADVKeyIndexList.part +201 -0
  5. package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
  6. package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
  7. package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
  8. package/WAProto/parts/AIHomeState.part +405 -0
  9. package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
  10. package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
  11. package/WAProto/parts/AIMetadataOperation.part +83 -0
  12. package/WAProto/parts/AIQueryFanout.part +133 -0
  13. package/WAProto/parts/AIRegenerateMetadata.part +112 -0
  14. package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
  15. package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
  16. package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
  17. package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
  18. package/WAProto/parts/AIRichResponseImageURL.part +119 -0
  19. package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
  20. package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
  21. package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
  22. package/WAProto/parts/AIRichResponseMessage.part +167 -0
  23. package/WAProto/parts/AIRichResponseMessageType.part +5 -0
  24. package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
  25. package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
  26. package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
  27. package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
  28. package/WAProto/parts/AISubscriptionRequestType.part +7 -0
  29. package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
  30. package/WAProto/parts/AIThreadInfo.part +316 -0
  31. package/WAProto/parts/Account.part +138 -0
  32. package/WAProto/parts/ActionLink.part +100 -0
  33. package/WAProto/parts/AutoDownloadSettings.part +138 -0
  34. package/WAProto/parts/AvatarUserSettings.part +100 -0
  35. package/WAProto/parts/BizAccountLinkInfo.part +210 -0
  36. package/WAProto/parts/BizAccountPayload.part +105 -0
  37. package/WAProto/parts/BizIdentityInfo.part +298 -0
  38. package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
  39. package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
  40. package/WAProto/parts/BotAgentMetadata.part +83 -0
  41. package/WAProto/parts/BotCapabilityMetadata.part +437 -0
  42. package/WAProto/parts/BotCommandMetadata.part +119 -0
  43. package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
  44. package/WAProto/parts/BotFeedbackMessage.part +1366 -0
  45. package/WAProto/parts/BotGroupMetadata.part +92 -0
  46. package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
  47. package/WAProto/parts/BotImagineMetadata.part +134 -0
  48. package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
  49. package/WAProto/parts/BotLinkedAccount.part +95 -0
  50. package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
  51. package/WAProto/parts/BotMediaMetadata.part +229 -0
  52. package/WAProto/parts/BotMemoryFact.part +100 -0
  53. package/WAProto/parts/BotMemoryMetadata.part +141 -0
  54. package/WAProto/parts/BotMemuMetadata.part +92 -0
  55. package/WAProto/parts/BotMessageOrigin.part +95 -0
  56. package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
  57. package/WAProto/parts/BotMessageSharingInfo.part +297 -0
  58. package/WAProto/parts/BotMetadata.part +934 -0
  59. package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
  60. package/WAProto/parts/BotMetricsMetadata.part +341 -0
  61. package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
  62. package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
  63. package/WAProto/parts/BotModelMetadata.part +167 -0
  64. package/WAProto/parts/BotPluginMetadata.part +379 -0
  65. package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
  66. package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
  67. package/WAProto/parts/BotPromptSuggestion.part +100 -0
  68. package/WAProto/parts/BotPromptSuggestions.part +92 -0
  69. package/WAProto/parts/BotPttPromptMetadata.part +81 -0
  70. package/WAProto/parts/BotQuotaMetadata.part +241 -0
  71. package/WAProto/parts/BotReminderMetadata.part +232 -0
  72. package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
  73. package/WAProto/parts/BotRenderingMetadata.part +203 -0
  74. package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
  75. package/WAProto/parts/BotSessionMetadata.part +137 -0
  76. package/WAProto/parts/BotSessionSource.part +11 -0
  77. package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
  78. package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
  79. package/WAProto/parts/BotSourcesMetadata.part +322 -0
  80. package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
  81. package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
  82. package/WAProto/parts/CallLogRecord.part +646 -0
  83. package/WAProto/parts/CertChain.part +392 -0
  84. package/WAProto/parts/ChatLockSettings.part +102 -0
  85. package/WAProto/parts/ChatRowOpaqueData.part +712 -0
  86. package/WAProto/parts/Citation.part +119 -0
  87. package/WAProto/parts/ClientPairingProps.part +160 -0
  88. package/WAProto/parts/ClientPayload.part +2892 -0
  89. package/WAProto/parts/CollectionName.part +9 -0
  90. package/WAProto/parts/CommentMetadata.part +102 -0
  91. package/WAProto/parts/CompanionCommitment.part +84 -0
  92. package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
  93. package/WAProto/parts/Config.part +136 -0
  94. package/WAProto/parts/ContextInfo.part +4137 -0
  95. package/WAProto/parts/Conversation.part +1472 -0
  96. package/WAProto/parts/DeviceCapabilities.part +670 -0
  97. package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
  98. package/WAProto/parts/DeviceListMetadata.part +306 -0
  99. package/WAProto/parts/DeviceProps.part +982 -0
  100. package/WAProto/parts/DisappearingMode.part +206 -0
  101. package/WAProto/parts/EmbeddedContent.part +100 -0
  102. package/WAProto/parts/EmbeddedMessage.part +102 -0
  103. package/WAProto/parts/EmbeddedMusic.part +370 -0
  104. package/WAProto/parts/EncryptedPairingRequest.part +106 -0
  105. package/WAProto/parts/EphemeralSetting.part +110 -0
  106. package/WAProto/parts/EventAdditionalMetadata.part +81 -0
  107. package/WAProto/parts/EventResponse.part +152 -0
  108. package/WAProto/parts/ExitCode.part +110 -0
  109. package/WAProto/parts/ExternalBlobReference.part +195 -0
  110. package/WAProto/parts/Field.part +193 -0
  111. package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
  112. package/WAProto/parts/GlobalSettings.part +497 -0
  113. package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
  114. package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
  115. package/WAProto/parts/GroupMention.part +100 -0
  116. package/WAProto/parts/GroupParticipant.part +142 -0
  117. package/WAProto/parts/GroupRootKeyShare.part +92 -0
  118. package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
  119. package/WAProto/parts/HandshakeMessage.part +815 -0
  120. package/WAProto/parts/HatchMetadataSync.part +132 -0
  121. package/WAProto/parts/HistorySync.part +605 -0
  122. package/WAProto/parts/HistorySyncMsg.part +112 -0
  123. package/WAProto/parts/HydratedTemplateButton.part +501 -0
  124. package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
  125. package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
  126. package/WAProto/parts/InlineContact.part +157 -0
  127. package/WAProto/parts/InteractiveAnnotation.part +246 -0
  128. package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
  129. package/WAProto/parts/KeepInChat.part +225 -0
  130. package/WAProto/parts/KeepType.part +6 -0
  131. package/WAProto/parts/KeyExchangeMessage.part +169 -0
  132. package/WAProto/parts/KeyId.part +84 -0
  133. package/WAProto/parts/LIDMigrationMapping.part +149 -0
  134. package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
  135. package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
  136. package/WAProto/parts/LegacyMessage.part +104 -0
  137. package/WAProto/parts/LimitSharing.part +177 -0
  138. package/WAProto/parts/LocalizedName.part +119 -0
  139. package/WAProto/parts/Location.part +119 -0
  140. package/WAProto/parts/MediaData.part +81 -0
  141. package/WAProto/parts/MediaDomainInfo.part +120 -0
  142. package/WAProto/parts/MediaKeyDomain.part +6 -0
  143. package/WAProto/parts/MediaNotifyMessage.part +132 -0
  144. package/WAProto/parts/MediaRetryNotification.part +170 -0
  145. package/WAProto/parts/MediaVisibility.part +6 -0
  146. package/WAProto/parts/MemberLabel.part +110 -0
  147. package/WAProto/parts/Message.part +32376 -0
  148. package/WAProto/parts/MessageAddOn.part +305 -0
  149. package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
  150. package/WAProto/parts/MessageAssociation.part +235 -0
  151. package/WAProto/parts/MessageContextInfo.part +451 -0
  152. package/WAProto/parts/MessageKey.part +138 -0
  153. package/WAProto/parts/MessageSecretMessage.part +125 -0
  154. package/WAProto/parts/Money.part +129 -0
  155. package/WAProto/parts/MsgOpaqueData.part +1732 -0
  156. package/WAProto/parts/MsgRowOpaqueData.part +104 -0
  157. package/WAProto/parts/MutationProps.part +89 -0
  158. package/WAProto/parts/NoiseCertificate.part +277 -0
  159. package/WAProto/parts/NotificationMessageInfo.part +152 -0
  160. package/WAProto/parts/NotificationSettings.part +176 -0
  161. package/WAProto/parts/PairingRequest.part +128 -0
  162. package/WAProto/parts/PastParticipant.part +148 -0
  163. package/WAProto/parts/PastParticipants.part +112 -0
  164. package/WAProto/parts/PatchDebugData.part +358 -0
  165. package/WAProto/parts/PaymentBackground.part +460 -0
  166. package/WAProto/parts/PaymentInfo.part +602 -0
  167. package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
  168. package/WAProto/parts/PhotoChange.part +125 -0
  169. package/WAProto/parts/PinInChat.part +205 -0
  170. package/WAProto/parts/Point.part +138 -0
  171. package/WAProto/parts/PollAdditionalMetadata.part +216 -0
  172. package/WAProto/parts/PollEncValue.part +106 -0
  173. package/WAProto/parts/PollUpdate.part +202 -0
  174. package/WAProto/parts/PreKeyRecordStructure.part +125 -0
  175. package/WAProto/parts/PreKeySignalMessage.part +185 -0
  176. package/WAProto/parts/PremiumMessageInfo.part +81 -0
  177. package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
  178. package/WAProto/parts/PrivacySystemMessage.part +6 -0
  179. package/WAProto/parts/ProcessedVideo.part +266 -0
  180. package/WAProto/parts/ProloguePayload.part +105 -0
  181. package/WAProto/parts/Pushname.part +100 -0
  182. package/WAProto/parts/QuarantinedMessage.part +103 -0
  183. package/WAProto/parts/Reaction.part +169 -0
  184. package/WAProto/parts/RecentEmojiWeight.part +100 -0
  185. package/WAProto/parts/RecordStructure.part +114 -0
  186. package/WAProto/parts/Reportable.part +138 -0
  187. package/WAProto/parts/ReportingTokenInfo.part +84 -0
  188. package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
  189. package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
  190. package/WAProto/parts/SenderKeyMessage.part +122 -0
  191. package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
  192. package/WAProto/parts/SenderKeyStateStructure.part +469 -0
  193. package/WAProto/parts/ServerErrorReceipt.part +81 -0
  194. package/WAProto/parts/SessionStructure.part +1087 -0
  195. package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
  196. package/WAProto/parts/SessionTransparencyType.part +5 -0
  197. package/WAProto/parts/SignalMessage.part +144 -0
  198. package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
  199. package/WAProto/parts/StatusAttribution.part +1235 -0
  200. package/WAProto/parts/StatusMentionMessage.part +83 -0
  201. package/WAProto/parts/StatusPSA.part +121 -0
  202. package/WAProto/parts/StickerMetadata.part +357 -0
  203. package/WAProto/parts/SyncActionData.part +146 -0
  204. package/WAProto/parts/SyncActionValue.part +12959 -0
  205. package/WAProto/parts/SyncdIndex.part +84 -0
  206. package/WAProto/parts/SyncdMutation.part +121 -0
  207. package/WAProto/parts/SyncdMutations.part +92 -0
  208. package/WAProto/parts/SyncdPatch.part +262 -0
  209. package/WAProto/parts/SyncdRecord.part +125 -0
  210. package/WAProto/parts/SyncdSnapshot.part +157 -0
  211. package/WAProto/parts/SyncdValue.part +84 -0
  212. package/WAProto/parts/SyncdVersion.part +91 -0
  213. package/WAProto/parts/TapLinkAction.part +100 -0
  214. package/WAProto/parts/TemplateButton.part +449 -0
  215. package/WAProto/parts/ThreadID.part +126 -0
  216. package/WAProto/parts/UrlTrackingMap.part +231 -0
  217. package/WAProto/parts/UserPassword.part +399 -0
  218. package/WAProto/parts/UserReceipt.part +221 -0
  219. package/WAProto/parts/VerifiedNameCertificate.part +318 -0
  220. package/WAProto/parts/WallpaperSettings.part +119 -0
  221. package/WAProto/parts/WebFeatures.part +1870 -0
  222. package/WAProto/parts/WebLinkRenderConfig.part +5 -0
  223. package/WAProto/parts/WebMessageInfo.part +2851 -0
  224. package/WAProto/parts/WebNotificationsInfo.part +160 -0
  225. package/package.json +1 -1
@@ -0,0 +1,1732 @@
1
+ "use strict";
2
+ function MsgOpaqueData(p) {
3
+ this.pollOptions = [];
4
+ if (p)
5
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
6
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
7
+ this[ks[i]] = p[ks[i]];
8
+ }
9
+ MsgOpaqueData.prototype.body = null;
10
+ MsgOpaqueData.prototype.caption = null;
11
+ MsgOpaqueData.prototype.lng = null;
12
+ MsgOpaqueData.prototype.isLive = null;
13
+ MsgOpaqueData.prototype.lat = null;
14
+ MsgOpaqueData.prototype.paymentAmount1000 = null;
15
+ MsgOpaqueData.prototype.paymentNoteMsgBody = null;
16
+ MsgOpaqueData.prototype.matchedText = null;
17
+ MsgOpaqueData.prototype.title = null;
18
+ MsgOpaqueData.prototype.description = null;
19
+ MsgOpaqueData.prototype.futureproofBuffer = null;
20
+ MsgOpaqueData.prototype.clientUrl = null;
21
+ MsgOpaqueData.prototype.loc = null;
22
+ MsgOpaqueData.prototype.pollName = null;
23
+ MsgOpaqueData.prototype.pollOptions = $util.emptyArray;
24
+ MsgOpaqueData.prototype.pollSelectableOptionsCount = null;
25
+ MsgOpaqueData.prototype.messageSecret = null;
26
+ MsgOpaqueData.prototype.originalSelfAuthor = null;
27
+ MsgOpaqueData.prototype.senderTimestampMs = null;
28
+ MsgOpaqueData.prototype.pollUpdateParentKey = null;
29
+ MsgOpaqueData.prototype.encPollVote = null;
30
+ MsgOpaqueData.prototype.isSentCagPollCreation = null;
31
+ MsgOpaqueData.prototype.pollContentType = null;
32
+ MsgOpaqueData.prototype.pollType = null;
33
+ MsgOpaqueData.prototype.correctOptionIndex = null;
34
+ MsgOpaqueData.prototype.pollVotesSnapshot = null;
35
+ MsgOpaqueData.prototype.encReactionTargetMessageKey = null;
36
+ MsgOpaqueData.prototype.encReactionEncPayload = null;
37
+ MsgOpaqueData.prototype.encReactionEncIv = null;
38
+ MsgOpaqueData.prototype.botMessageSecret = null;
39
+ MsgOpaqueData.prototype.targetMessageKey = null;
40
+ MsgOpaqueData.prototype.encPayload = null;
41
+ MsgOpaqueData.prototype.encIv = null;
42
+ MsgOpaqueData.prototype.eventName = null;
43
+ MsgOpaqueData.prototype.isEventCanceled = null;
44
+ MsgOpaqueData.prototype.eventDescription = null;
45
+ MsgOpaqueData.prototype.eventJoinLink = null;
46
+ MsgOpaqueData.prototype.eventStartTime = null;
47
+ MsgOpaqueData.prototype.eventLocation = null;
48
+ MsgOpaqueData.prototype.eventEndTime = null;
49
+ MsgOpaqueData.prototype.eventIsScheduledCall = null;
50
+ MsgOpaqueData.prototype.eventExtraGuestsAllowed = null;
51
+ MsgOpaqueData.prototype.plainProtobufBytes = null;
52
+ MsgOpaqueData.prototype.quarantineExtractedText = null;
53
+ MsgOpaqueData.prototype.pollEndTime = null;
54
+ MsgOpaqueData.prototype.pollHideVoterNames = null;
55
+ MsgOpaqueData.prototype.pollAllowAddOption = null;
56
+ MsgOpaqueData.prototype.sharableEventInviteId = null;
57
+ MsgOpaqueData.prototype.sharableEventInviteTitle = null;
58
+ MsgOpaqueData.prototype.sharableEventInviteStartTime = null;
59
+ MsgOpaqueData.prototype.sharableEventInviteEndTime = null;
60
+ MsgOpaqueData.prototype.sharableEventInviteCaption = null;
61
+ MsgOpaqueData.prototype.sharableEventInviteIsCanceled = null;
62
+ MsgOpaqueData.prototype.sharableEventInviteJpegThumbnail = null;
63
+ MsgOpaqueData.prototype.sharableEventInviteCallLink = null;
64
+ let $oneOfFields;
65
+ Object.defineProperty(MsgOpaqueData.prototype, "_body", {
66
+ get: $util.oneOfGetter($oneOfFields = ["body"]),
67
+ set: $util.oneOfSetter($oneOfFields)
68
+ });
69
+ Object.defineProperty(MsgOpaqueData.prototype, "_caption", {
70
+ get: $util.oneOfGetter($oneOfFields = ["caption"]),
71
+ set: $util.oneOfSetter($oneOfFields)
72
+ });
73
+ Object.defineProperty(MsgOpaqueData.prototype, "_lng", {
74
+ get: $util.oneOfGetter($oneOfFields = ["lng"]),
75
+ set: $util.oneOfSetter($oneOfFields)
76
+ });
77
+ Object.defineProperty(MsgOpaqueData.prototype, "_isLive", {
78
+ get: $util.oneOfGetter($oneOfFields = ["isLive"]),
79
+ set: $util.oneOfSetter($oneOfFields)
80
+ });
81
+ Object.defineProperty(MsgOpaqueData.prototype, "_lat", {
82
+ get: $util.oneOfGetter($oneOfFields = ["lat"]),
83
+ set: $util.oneOfSetter($oneOfFields)
84
+ });
85
+ Object.defineProperty(MsgOpaqueData.prototype, "_paymentAmount1000", {
86
+ get: $util.oneOfGetter($oneOfFields = ["paymentAmount1000"]),
87
+ set: $util.oneOfSetter($oneOfFields)
88
+ });
89
+ Object.defineProperty(MsgOpaqueData.prototype, "_paymentNoteMsgBody", {
90
+ get: $util.oneOfGetter($oneOfFields = ["paymentNoteMsgBody"]),
91
+ set: $util.oneOfSetter($oneOfFields)
92
+ });
93
+ Object.defineProperty(MsgOpaqueData.prototype, "_matchedText", {
94
+ get: $util.oneOfGetter($oneOfFields = ["matchedText"]),
95
+ set: $util.oneOfSetter($oneOfFields)
96
+ });
97
+ Object.defineProperty(MsgOpaqueData.prototype, "_title", {
98
+ get: $util.oneOfGetter($oneOfFields = ["title"]),
99
+ set: $util.oneOfSetter($oneOfFields)
100
+ });
101
+ Object.defineProperty(MsgOpaqueData.prototype, "_description", {
102
+ get: $util.oneOfGetter($oneOfFields = ["description"]),
103
+ set: $util.oneOfSetter($oneOfFields)
104
+ });
105
+ Object.defineProperty(MsgOpaqueData.prototype, "_futureproofBuffer", {
106
+ get: $util.oneOfGetter($oneOfFields = ["futureproofBuffer"]),
107
+ set: $util.oneOfSetter($oneOfFields)
108
+ });
109
+ Object.defineProperty(MsgOpaqueData.prototype, "_clientUrl", {
110
+ get: $util.oneOfGetter($oneOfFields = ["clientUrl"]),
111
+ set: $util.oneOfSetter($oneOfFields)
112
+ });
113
+ Object.defineProperty(MsgOpaqueData.prototype, "_loc", {
114
+ get: $util.oneOfGetter($oneOfFields = ["loc"]),
115
+ set: $util.oneOfSetter($oneOfFields)
116
+ });
117
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollName", {
118
+ get: $util.oneOfGetter($oneOfFields = ["pollName"]),
119
+ set: $util.oneOfSetter($oneOfFields)
120
+ });
121
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollSelectableOptionsCount", {
122
+ get: $util.oneOfGetter($oneOfFields = ["pollSelectableOptionsCount"]),
123
+ set: $util.oneOfSetter($oneOfFields)
124
+ });
125
+ Object.defineProperty(MsgOpaqueData.prototype, "_messageSecret", {
126
+ get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
127
+ set: $util.oneOfSetter($oneOfFields)
128
+ });
129
+ Object.defineProperty(MsgOpaqueData.prototype, "_originalSelfAuthor", {
130
+ get: $util.oneOfGetter($oneOfFields = ["originalSelfAuthor"]),
131
+ set: $util.oneOfSetter($oneOfFields)
132
+ });
133
+ Object.defineProperty(MsgOpaqueData.prototype, "_senderTimestampMs", {
134
+ get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
135
+ set: $util.oneOfSetter($oneOfFields)
136
+ });
137
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollUpdateParentKey", {
138
+ get: $util.oneOfGetter($oneOfFields = ["pollUpdateParentKey"]),
139
+ set: $util.oneOfSetter($oneOfFields)
140
+ });
141
+ Object.defineProperty(MsgOpaqueData.prototype, "_encPollVote", {
142
+ get: $util.oneOfGetter($oneOfFields = ["encPollVote"]),
143
+ set: $util.oneOfSetter($oneOfFields)
144
+ });
145
+ Object.defineProperty(MsgOpaqueData.prototype, "_isSentCagPollCreation", {
146
+ get: $util.oneOfGetter($oneOfFields = ["isSentCagPollCreation"]),
147
+ set: $util.oneOfSetter($oneOfFields)
148
+ });
149
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollContentType", {
150
+ get: $util.oneOfGetter($oneOfFields = ["pollContentType"]),
151
+ set: $util.oneOfSetter($oneOfFields)
152
+ });
153
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollType", {
154
+ get: $util.oneOfGetter($oneOfFields = ["pollType"]),
155
+ set: $util.oneOfSetter($oneOfFields)
156
+ });
157
+ Object.defineProperty(MsgOpaqueData.prototype, "_correctOptionIndex", {
158
+ get: $util.oneOfGetter($oneOfFields = ["correctOptionIndex"]),
159
+ set: $util.oneOfSetter($oneOfFields)
160
+ });
161
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollVotesSnapshot", {
162
+ get: $util.oneOfGetter($oneOfFields = ["pollVotesSnapshot"]),
163
+ set: $util.oneOfSetter($oneOfFields)
164
+ });
165
+ Object.defineProperty(MsgOpaqueData.prototype, "_encReactionTargetMessageKey", {
166
+ get: $util.oneOfGetter($oneOfFields = ["encReactionTargetMessageKey"]),
167
+ set: $util.oneOfSetter($oneOfFields)
168
+ });
169
+ Object.defineProperty(MsgOpaqueData.prototype, "_encReactionEncPayload", {
170
+ get: $util.oneOfGetter($oneOfFields = ["encReactionEncPayload"]),
171
+ set: $util.oneOfSetter($oneOfFields)
172
+ });
173
+ Object.defineProperty(MsgOpaqueData.prototype, "_encReactionEncIv", {
174
+ get: $util.oneOfGetter($oneOfFields = ["encReactionEncIv"]),
175
+ set: $util.oneOfSetter($oneOfFields)
176
+ });
177
+ Object.defineProperty(MsgOpaqueData.prototype, "_botMessageSecret", {
178
+ get: $util.oneOfGetter($oneOfFields = ["botMessageSecret"]),
179
+ set: $util.oneOfSetter($oneOfFields)
180
+ });
181
+ Object.defineProperty(MsgOpaqueData.prototype, "_targetMessageKey", {
182
+ get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]),
183
+ set: $util.oneOfSetter($oneOfFields)
184
+ });
185
+ Object.defineProperty(MsgOpaqueData.prototype, "_encPayload", {
186
+ get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
187
+ set: $util.oneOfSetter($oneOfFields)
188
+ });
189
+ Object.defineProperty(MsgOpaqueData.prototype, "_encIv", {
190
+ get: $util.oneOfGetter($oneOfFields = ["encIv"]),
191
+ set: $util.oneOfSetter($oneOfFields)
192
+ });
193
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventName", {
194
+ get: $util.oneOfGetter($oneOfFields = ["eventName"]),
195
+ set: $util.oneOfSetter($oneOfFields)
196
+ });
197
+ Object.defineProperty(MsgOpaqueData.prototype, "_isEventCanceled", {
198
+ get: $util.oneOfGetter($oneOfFields = ["isEventCanceled"]),
199
+ set: $util.oneOfSetter($oneOfFields)
200
+ });
201
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventDescription", {
202
+ get: $util.oneOfGetter($oneOfFields = ["eventDescription"]),
203
+ set: $util.oneOfSetter($oneOfFields)
204
+ });
205
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventJoinLink", {
206
+ get: $util.oneOfGetter($oneOfFields = ["eventJoinLink"]),
207
+ set: $util.oneOfSetter($oneOfFields)
208
+ });
209
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventStartTime", {
210
+ get: $util.oneOfGetter($oneOfFields = ["eventStartTime"]),
211
+ set: $util.oneOfSetter($oneOfFields)
212
+ });
213
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventLocation", {
214
+ get: $util.oneOfGetter($oneOfFields = ["eventLocation"]),
215
+ set: $util.oneOfSetter($oneOfFields)
216
+ });
217
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventEndTime", {
218
+ get: $util.oneOfGetter($oneOfFields = ["eventEndTime"]),
219
+ set: $util.oneOfSetter($oneOfFields)
220
+ });
221
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventIsScheduledCall", {
222
+ get: $util.oneOfGetter($oneOfFields = ["eventIsScheduledCall"]),
223
+ set: $util.oneOfSetter($oneOfFields)
224
+ });
225
+ Object.defineProperty(MsgOpaqueData.prototype, "_eventExtraGuestsAllowed", {
226
+ get: $util.oneOfGetter($oneOfFields = ["eventExtraGuestsAllowed"]),
227
+ set: $util.oneOfSetter($oneOfFields)
228
+ });
229
+ Object.defineProperty(MsgOpaqueData.prototype, "_plainProtobufBytes", {
230
+ get: $util.oneOfGetter($oneOfFields = ["plainProtobufBytes"]),
231
+ set: $util.oneOfSetter($oneOfFields)
232
+ });
233
+ Object.defineProperty(MsgOpaqueData.prototype, "_quarantineExtractedText", {
234
+ get: $util.oneOfGetter($oneOfFields = ["quarantineExtractedText"]),
235
+ set: $util.oneOfSetter($oneOfFields)
236
+ });
237
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollEndTime", {
238
+ get: $util.oneOfGetter($oneOfFields = ["pollEndTime"]),
239
+ set: $util.oneOfSetter($oneOfFields)
240
+ });
241
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollHideVoterNames", {
242
+ get: $util.oneOfGetter($oneOfFields = ["pollHideVoterNames"]),
243
+ set: $util.oneOfSetter($oneOfFields)
244
+ });
245
+ Object.defineProperty(MsgOpaqueData.prototype, "_pollAllowAddOption", {
246
+ get: $util.oneOfGetter($oneOfFields = ["pollAllowAddOption"]),
247
+ set: $util.oneOfSetter($oneOfFields)
248
+ });
249
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteId", {
250
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteId"]),
251
+ set: $util.oneOfSetter($oneOfFields)
252
+ });
253
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteTitle", {
254
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteTitle"]),
255
+ set: $util.oneOfSetter($oneOfFields)
256
+ });
257
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteStartTime", {
258
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteStartTime"]),
259
+ set: $util.oneOfSetter($oneOfFields)
260
+ });
261
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteEndTime", {
262
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteEndTime"]),
263
+ set: $util.oneOfSetter($oneOfFields)
264
+ });
265
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteCaption", {
266
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteCaption"]),
267
+ set: $util.oneOfSetter($oneOfFields)
268
+ });
269
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteIsCanceled", {
270
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteIsCanceled"]),
271
+ set: $util.oneOfSetter($oneOfFields)
272
+ });
273
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteJpegThumbnail", {
274
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteJpegThumbnail"]),
275
+ set: $util.oneOfSetter($oneOfFields)
276
+ });
277
+ Object.defineProperty(MsgOpaqueData.prototype, "_sharableEventInviteCallLink", {
278
+ get: $util.oneOfGetter($oneOfFields = ["sharableEventInviteCallLink"]),
279
+ set: $util.oneOfSetter($oneOfFields)
280
+ });
281
+ MsgOpaqueData.create = function create(properties) {
282
+ return new MsgOpaqueData(properties);
283
+ };
284
+ MsgOpaqueData.encode = function encode(m, w) {
285
+ if (!w)
286
+ w = $Writer.create();
287
+ if (m.body != null && Object.hasOwnProperty.call(m, "body"))
288
+ w.uint32(10).string(m.body);
289
+ if (m.caption != null && Object.hasOwnProperty.call(m, "caption"))
290
+ w.uint32(26).string(m.caption);
291
+ if (m.lng != null && Object.hasOwnProperty.call(m, "lng"))
292
+ w.uint32(41).double(m.lng);
293
+ if (m.isLive != null && Object.hasOwnProperty.call(m, "isLive"))
294
+ w.uint32(48).bool(m.isLive);
295
+ if (m.lat != null && Object.hasOwnProperty.call(m, "lat"))
296
+ w.uint32(57).double(m.lat);
297
+ if (m.paymentAmount1000 != null && Object.hasOwnProperty.call(m, "paymentAmount1000"))
298
+ w.uint32(64).int32(m.paymentAmount1000);
299
+ if (m.paymentNoteMsgBody != null && Object.hasOwnProperty.call(m, "paymentNoteMsgBody"))
300
+ w.uint32(74).string(m.paymentNoteMsgBody);
301
+ if (m.matchedText != null && Object.hasOwnProperty.call(m, "matchedText"))
302
+ w.uint32(90).string(m.matchedText);
303
+ if (m.title != null && Object.hasOwnProperty.call(m, "title"))
304
+ w.uint32(98).string(m.title);
305
+ if (m.description != null && Object.hasOwnProperty.call(m, "description"))
306
+ w.uint32(106).string(m.description);
307
+ if (m.futureproofBuffer != null && Object.hasOwnProperty.call(m, "futureproofBuffer"))
308
+ w.uint32(114).bytes(m.futureproofBuffer);
309
+ if (m.clientUrl != null && Object.hasOwnProperty.call(m, "clientUrl"))
310
+ w.uint32(122).string(m.clientUrl);
311
+ if (m.loc != null && Object.hasOwnProperty.call(m, "loc"))
312
+ w.uint32(130).string(m.loc);
313
+ if (m.pollName != null && Object.hasOwnProperty.call(m, "pollName"))
314
+ w.uint32(138).string(m.pollName);
315
+ if (m.pollOptions != null && m.pollOptions.length) {
316
+ for (var i = 0; i < m.pollOptions.length; ++i)
317
+ $root.proto.MsgOpaqueData.PollOption.encode(m.pollOptions[i], w.uint32(146).fork()).ldelim();
318
+ }
319
+ if (m.pollSelectableOptionsCount != null && Object.hasOwnProperty.call(m, "pollSelectableOptionsCount"))
320
+ w.uint32(160).uint32(m.pollSelectableOptionsCount);
321
+ if (m.messageSecret != null && Object.hasOwnProperty.call(m, "messageSecret"))
322
+ w.uint32(170).bytes(m.messageSecret);
323
+ if (m.senderTimestampMs != null && Object.hasOwnProperty.call(m, "senderTimestampMs"))
324
+ w.uint32(176).int64(m.senderTimestampMs);
325
+ if (m.pollUpdateParentKey != null && Object.hasOwnProperty.call(m, "pollUpdateParentKey"))
326
+ w.uint32(186).string(m.pollUpdateParentKey);
327
+ if (m.encPollVote != null && Object.hasOwnProperty.call(m, "encPollVote"))
328
+ $root.proto.PollEncValue.encode(m.encPollVote, w.uint32(194).fork()).ldelim();
329
+ if (m.encReactionTargetMessageKey != null && Object.hasOwnProperty.call(m, "encReactionTargetMessageKey"))
330
+ w.uint32(202).string(m.encReactionTargetMessageKey);
331
+ if (m.encReactionEncPayload != null && Object.hasOwnProperty.call(m, "encReactionEncPayload"))
332
+ w.uint32(210).bytes(m.encReactionEncPayload);
333
+ if (m.encReactionEncIv != null && Object.hasOwnProperty.call(m, "encReactionEncIv"))
334
+ w.uint32(218).bytes(m.encReactionEncIv);
335
+ if (m.isSentCagPollCreation != null && Object.hasOwnProperty.call(m, "isSentCagPollCreation"))
336
+ w.uint32(224).bool(m.isSentCagPollCreation);
337
+ if (m.botMessageSecret != null && Object.hasOwnProperty.call(m, "botMessageSecret"))
338
+ w.uint32(234).bytes(m.botMessageSecret);
339
+ if (m.targetMessageKey != null && Object.hasOwnProperty.call(m, "targetMessageKey"))
340
+ w.uint32(242).string(m.targetMessageKey);
341
+ if (m.encPayload != null && Object.hasOwnProperty.call(m, "encPayload"))
342
+ w.uint32(250).bytes(m.encPayload);
343
+ if (m.encIv != null && Object.hasOwnProperty.call(m, "encIv"))
344
+ w.uint32(258).bytes(m.encIv);
345
+ if (m.eventName != null && Object.hasOwnProperty.call(m, "eventName"))
346
+ w.uint32(266).string(m.eventName);
347
+ if (m.isEventCanceled != null && Object.hasOwnProperty.call(m, "isEventCanceled"))
348
+ w.uint32(272).bool(m.isEventCanceled);
349
+ if (m.eventDescription != null && Object.hasOwnProperty.call(m, "eventDescription"))
350
+ w.uint32(282).string(m.eventDescription);
351
+ if (m.eventJoinLink != null && Object.hasOwnProperty.call(m, "eventJoinLink"))
352
+ w.uint32(290).string(m.eventJoinLink);
353
+ if (m.eventStartTime != null && Object.hasOwnProperty.call(m, "eventStartTime"))
354
+ w.uint32(296).int64(m.eventStartTime);
355
+ if (m.eventLocation != null && Object.hasOwnProperty.call(m, "eventLocation"))
356
+ $root.proto.MsgOpaqueData.EventLocation.encode(m.eventLocation, w.uint32(306).fork()).ldelim();
357
+ if (m.eventEndTime != null && Object.hasOwnProperty.call(m, "eventEndTime"))
358
+ w.uint32(320).int64(m.eventEndTime);
359
+ if (m.pollVotesSnapshot != null && Object.hasOwnProperty.call(m, "pollVotesSnapshot"))
360
+ $root.proto.MsgOpaqueData.PollVotesSnapshot.encode(m.pollVotesSnapshot, w.uint32(330).fork()).ldelim();
361
+ if (m.pollContentType != null && Object.hasOwnProperty.call(m, "pollContentType"))
362
+ w.uint32(336).int32(m.pollContentType);
363
+ if (m.plainProtobufBytes != null && Object.hasOwnProperty.call(m, "plainProtobufBytes"))
364
+ w.uint32(346).bytes(m.plainProtobufBytes);
365
+ if (m.eventIsScheduledCall != null && Object.hasOwnProperty.call(m, "eventIsScheduledCall"))
366
+ w.uint32(352).bool(m.eventIsScheduledCall);
367
+ if (m.eventExtraGuestsAllowed != null && Object.hasOwnProperty.call(m, "eventExtraGuestsAllowed"))
368
+ w.uint32(360).bool(m.eventExtraGuestsAllowed);
369
+ if (m.pollType != null && Object.hasOwnProperty.call(m, "pollType"))
370
+ w.uint32(368).int32(m.pollType);
371
+ if (m.correctOptionIndex != null && Object.hasOwnProperty.call(m, "correctOptionIndex"))
372
+ w.uint32(376).int32(m.correctOptionIndex);
373
+ if (m.quarantineExtractedText != null && Object.hasOwnProperty.call(m, "quarantineExtractedText"))
374
+ w.uint32(386).string(m.quarantineExtractedText);
375
+ if (m.pollEndTime != null && Object.hasOwnProperty.call(m, "pollEndTime"))
376
+ w.uint32(392).int64(m.pollEndTime);
377
+ if (m.pollHideVoterNames != null && Object.hasOwnProperty.call(m, "pollHideVoterNames"))
378
+ w.uint32(400).bool(m.pollHideVoterNames);
379
+ if (m.originalSelfAuthor != null && Object.hasOwnProperty.call(m, "originalSelfAuthor"))
380
+ w.uint32(410).string(m.originalSelfAuthor);
381
+ if (m.pollAllowAddOption != null && Object.hasOwnProperty.call(m, "pollAllowAddOption"))
382
+ w.uint32(416).bool(m.pollAllowAddOption);
383
+ if (m.sharableEventInviteId != null && Object.hasOwnProperty.call(m, "sharableEventInviteId"))
384
+ w.uint32(426).string(m.sharableEventInviteId);
385
+ if (m.sharableEventInviteTitle != null && Object.hasOwnProperty.call(m, "sharableEventInviteTitle"))
386
+ w.uint32(434).string(m.sharableEventInviteTitle);
387
+ if (m.sharableEventInviteStartTime != null && Object.hasOwnProperty.call(m, "sharableEventInviteStartTime"))
388
+ w.uint32(440).int64(m.sharableEventInviteStartTime);
389
+ if (m.sharableEventInviteEndTime != null && Object.hasOwnProperty.call(m, "sharableEventInviteEndTime"))
390
+ w.uint32(448).int64(m.sharableEventInviteEndTime);
391
+ if (m.sharableEventInviteCaption != null && Object.hasOwnProperty.call(m, "sharableEventInviteCaption"))
392
+ w.uint32(458).string(m.sharableEventInviteCaption);
393
+ if (m.sharableEventInviteIsCanceled != null && Object.hasOwnProperty.call(m, "sharableEventInviteIsCanceled"))
394
+ w.uint32(464).bool(m.sharableEventInviteIsCanceled);
395
+ if (m.sharableEventInviteJpegThumbnail != null && Object.hasOwnProperty.call(m, "sharableEventInviteJpegThumbnail"))
396
+ w.uint32(474).bytes(m.sharableEventInviteJpegThumbnail);
397
+ if (m.sharableEventInviteCallLink != null && Object.hasOwnProperty.call(m, "sharableEventInviteCallLink"))
398
+ w.uint32(482).string(m.sharableEventInviteCallLink);
399
+ return w;
400
+ };
401
+ MsgOpaqueData.decode = function decode(r, l, e, n) {
402
+ if (!(r instanceof $Reader))
403
+ r = $Reader.create(r);
404
+ if (n === undefined)
405
+ n = 0;
406
+ if (n > $Reader.recursionLimit)
407
+ throw Error("maximum nesting depth exceeded");
408
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MsgOpaqueData();
409
+ while (r.pos < c) {
410
+ var t = r.uint32();
411
+ if (t === e)
412
+ break;
413
+ switch (t >>> 3) {
414
+ case 1: {
415
+ m.body = r.string();
416
+ break;
417
+ }
418
+ case 3: {
419
+ m.caption = r.string();
420
+ break;
421
+ }
422
+ case 5: {
423
+ m.lng = r.double();
424
+ break;
425
+ }
426
+ case 6: {
427
+ m.isLive = r.bool();
428
+ break;
429
+ }
430
+ case 7: {
431
+ m.lat = r.double();
432
+ break;
433
+ }
434
+ case 8: {
435
+ m.paymentAmount1000 = r.int32();
436
+ break;
437
+ }
438
+ case 9: {
439
+ m.paymentNoteMsgBody = r.string();
440
+ break;
441
+ }
442
+ case 11: {
443
+ m.matchedText = r.string();
444
+ break;
445
+ }
446
+ case 12: {
447
+ m.title = r.string();
448
+ break;
449
+ }
450
+ case 13: {
451
+ m.description = r.string();
452
+ break;
453
+ }
454
+ case 14: {
455
+ m.futureproofBuffer = r.bytes();
456
+ break;
457
+ }
458
+ case 15: {
459
+ m.clientUrl = r.string();
460
+ break;
461
+ }
462
+ case 16: {
463
+ m.loc = r.string();
464
+ break;
465
+ }
466
+ case 17: {
467
+ m.pollName = r.string();
468
+ break;
469
+ }
470
+ case 18: {
471
+ if (!(m.pollOptions && m.pollOptions.length))
472
+ m.pollOptions = [];
473
+ m.pollOptions.push($root.proto.MsgOpaqueData.PollOption.decode(r, r.uint32(), undefined, n + 1));
474
+ break;
475
+ }
476
+ case 20: {
477
+ m.pollSelectableOptionsCount = r.uint32();
478
+ break;
479
+ }
480
+ case 21: {
481
+ m.messageSecret = r.bytes();
482
+ break;
483
+ }
484
+ case 51: {
485
+ m.originalSelfAuthor = r.string();
486
+ break;
487
+ }
488
+ case 22: {
489
+ m.senderTimestampMs = r.int64();
490
+ break;
491
+ }
492
+ case 23: {
493
+ m.pollUpdateParentKey = r.string();
494
+ break;
495
+ }
496
+ case 24: {
497
+ m.encPollVote = $root.proto.PollEncValue.decode(r, r.uint32(), undefined, n + 1);
498
+ break;
499
+ }
500
+ case 28: {
501
+ m.isSentCagPollCreation = r.bool();
502
+ break;
503
+ }
504
+ case 42: {
505
+ m.pollContentType = r.int32();
506
+ break;
507
+ }
508
+ case 46: {
509
+ m.pollType = r.int32();
510
+ break;
511
+ }
512
+ case 47: {
513
+ m.correctOptionIndex = r.int32();
514
+ break;
515
+ }
516
+ case 41: {
517
+ m.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.decode(r, r.uint32(), undefined, n + 1);
518
+ break;
519
+ }
520
+ case 25: {
521
+ m.encReactionTargetMessageKey = r.string();
522
+ break;
523
+ }
524
+ case 26: {
525
+ m.encReactionEncPayload = r.bytes();
526
+ break;
527
+ }
528
+ case 27: {
529
+ m.encReactionEncIv = r.bytes();
530
+ break;
531
+ }
532
+ case 29: {
533
+ m.botMessageSecret = r.bytes();
534
+ break;
535
+ }
536
+ case 30: {
537
+ m.targetMessageKey = r.string();
538
+ break;
539
+ }
540
+ case 31: {
541
+ m.encPayload = r.bytes();
542
+ break;
543
+ }
544
+ case 32: {
545
+ m.encIv = r.bytes();
546
+ break;
547
+ }
548
+ case 33: {
549
+ m.eventName = r.string();
550
+ break;
551
+ }
552
+ case 34: {
553
+ m.isEventCanceled = r.bool();
554
+ break;
555
+ }
556
+ case 35: {
557
+ m.eventDescription = r.string();
558
+ break;
559
+ }
560
+ case 36: {
561
+ m.eventJoinLink = r.string();
562
+ break;
563
+ }
564
+ case 37: {
565
+ m.eventStartTime = r.int64();
566
+ break;
567
+ }
568
+ case 38: {
569
+ m.eventLocation = $root.proto.MsgOpaqueData.EventLocation.decode(r, r.uint32(), undefined, n + 1);
570
+ break;
571
+ }
572
+ case 40: {
573
+ m.eventEndTime = r.int64();
574
+ break;
575
+ }
576
+ case 44: {
577
+ m.eventIsScheduledCall = r.bool();
578
+ break;
579
+ }
580
+ case 45: {
581
+ m.eventExtraGuestsAllowed = r.bool();
582
+ break;
583
+ }
584
+ case 43: {
585
+ m.plainProtobufBytes = r.bytes();
586
+ break;
587
+ }
588
+ case 48: {
589
+ m.quarantineExtractedText = r.string();
590
+ break;
591
+ }
592
+ case 49: {
593
+ m.pollEndTime = r.int64();
594
+ break;
595
+ }
596
+ case 50: {
597
+ m.pollHideVoterNames = r.bool();
598
+ break;
599
+ }
600
+ case 52: {
601
+ m.pollAllowAddOption = r.bool();
602
+ break;
603
+ }
604
+ case 53: {
605
+ m.sharableEventInviteId = r.string();
606
+ break;
607
+ }
608
+ case 54: {
609
+ m.sharableEventInviteTitle = r.string();
610
+ break;
611
+ }
612
+ case 55: {
613
+ m.sharableEventInviteStartTime = r.int64();
614
+ break;
615
+ }
616
+ case 56: {
617
+ m.sharableEventInviteEndTime = r.int64();
618
+ break;
619
+ }
620
+ case 57: {
621
+ m.sharableEventInviteCaption = r.string();
622
+ break;
623
+ }
624
+ case 58: {
625
+ m.sharableEventInviteIsCanceled = r.bool();
626
+ break;
627
+ }
628
+ case 59: {
629
+ m.sharableEventInviteJpegThumbnail = r.bytes();
630
+ break;
631
+ }
632
+ case 60: {
633
+ m.sharableEventInviteCallLink = r.string();
634
+ break;
635
+ }
636
+ default:
637
+ r.skipType(t & 7, n);
638
+ break;
639
+ }
640
+ }
641
+ return m;
642
+ };
643
+ MsgOpaqueData.fromObject = function fromObject(d, n) {
644
+ if (d instanceof $root.proto.MsgOpaqueData)
645
+ return d;
646
+ if (n === undefined)
647
+ n = 0;
648
+ if (n > $util.recursionLimit)
649
+ throw Error("maximum nesting depth exceeded");
650
+ var m = new $root.proto.MsgOpaqueData();
651
+ if (d.body != null) {
652
+ m.body = String(d.body);
653
+ }
654
+ if (d.caption != null) {
655
+ m.caption = String(d.caption);
656
+ }
657
+ if (d.lng != null) {
658
+ m.lng = Number(d.lng);
659
+ }
660
+ if (d.isLive != null) {
661
+ m.isLive = Boolean(d.isLive);
662
+ }
663
+ if (d.lat != null) {
664
+ m.lat = Number(d.lat);
665
+ }
666
+ if (d.paymentAmount1000 != null) {
667
+ m.paymentAmount1000 = d.paymentAmount1000 | 0;
668
+ }
669
+ if (d.paymentNoteMsgBody != null) {
670
+ m.paymentNoteMsgBody = String(d.paymentNoteMsgBody);
671
+ }
672
+ if (d.matchedText != null) {
673
+ m.matchedText = String(d.matchedText);
674
+ }
675
+ if (d.title != null) {
676
+ m.title = String(d.title);
677
+ }
678
+ if (d.description != null) {
679
+ m.description = String(d.description);
680
+ }
681
+ if (d.futureproofBuffer != null) {
682
+ if (typeof d.futureproofBuffer === "string")
683
+ $util.base64.decode(d.futureproofBuffer, m.futureproofBuffer = $util.newBuffer($util.base64.length(d.futureproofBuffer)), 0);
684
+ else if (d.futureproofBuffer.length >= 0)
685
+ m.futureproofBuffer = d.futureproofBuffer;
686
+ }
687
+ if (d.clientUrl != null) {
688
+ m.clientUrl = String(d.clientUrl);
689
+ }
690
+ if (d.loc != null) {
691
+ m.loc = String(d.loc);
692
+ }
693
+ if (d.pollName != null) {
694
+ m.pollName = String(d.pollName);
695
+ }
696
+ if (d.pollOptions) {
697
+ if (!Array.isArray(d.pollOptions))
698
+ throw TypeError(".proto.MsgOpaqueData.pollOptions: array expected");
699
+ m.pollOptions = [];
700
+ for (var i = 0; i < d.pollOptions.length; ++i) {
701
+ if (typeof d.pollOptions[i] !== "object")
702
+ throw TypeError(".proto.MsgOpaqueData.pollOptions: object expected");
703
+ m.pollOptions[i] = $root.proto.MsgOpaqueData.PollOption.fromObject(d.pollOptions[i], n + 1);
704
+ }
705
+ }
706
+ if (d.pollSelectableOptionsCount != null) {
707
+ m.pollSelectableOptionsCount = d.pollSelectableOptionsCount >>> 0;
708
+ }
709
+ if (d.messageSecret != null) {
710
+ if (typeof d.messageSecret === "string")
711
+ $util.base64.decode(d.messageSecret, m.messageSecret = $util.newBuffer($util.base64.length(d.messageSecret)), 0);
712
+ else if (d.messageSecret.length >= 0)
713
+ m.messageSecret = d.messageSecret;
714
+ }
715
+ if (d.originalSelfAuthor != null) {
716
+ m.originalSelfAuthor = String(d.originalSelfAuthor);
717
+ }
718
+ if (d.senderTimestampMs != null) {
719
+ if ($util.Long)
720
+ (m.senderTimestampMs = $util.Long.fromValue(d.senderTimestampMs)).unsigned = false;
721
+ else if (typeof d.senderTimestampMs === "string")
722
+ m.senderTimestampMs = parseInt(d.senderTimestampMs, 10);
723
+ else if (typeof d.senderTimestampMs === "number")
724
+ m.senderTimestampMs = d.senderTimestampMs;
725
+ else if (typeof d.senderTimestampMs === "object")
726
+ m.senderTimestampMs = new $util.LongBits(d.senderTimestampMs.low >>> 0, d.senderTimestampMs.high >>> 0).toNumber();
727
+ }
728
+ if (d.pollUpdateParentKey != null) {
729
+ m.pollUpdateParentKey = String(d.pollUpdateParentKey);
730
+ }
731
+ if (d.encPollVote != null) {
732
+ if (typeof d.encPollVote !== "object")
733
+ throw TypeError(".proto.MsgOpaqueData.encPollVote: object expected");
734
+ m.encPollVote = $root.proto.PollEncValue.fromObject(d.encPollVote, n + 1);
735
+ }
736
+ if (d.isSentCagPollCreation != null) {
737
+ m.isSentCagPollCreation = Boolean(d.isSentCagPollCreation);
738
+ }
739
+ switch (d.pollContentType) {
740
+ default:
741
+ if (typeof d.pollContentType === "number") {
742
+ m.pollContentType = d.pollContentType;
743
+ break;
744
+ }
745
+ break;
746
+ case "UNKNOWN":
747
+ case 0:
748
+ m.pollContentType = 0;
749
+ break;
750
+ case "TEXT":
751
+ case 1:
752
+ m.pollContentType = 1;
753
+ break;
754
+ case "IMAGE":
755
+ case 2:
756
+ m.pollContentType = 2;
757
+ break;
758
+ }
759
+ switch (d.pollType) {
760
+ default:
761
+ if (typeof d.pollType === "number") {
762
+ m.pollType = d.pollType;
763
+ break;
764
+ }
765
+ break;
766
+ case "POLL":
767
+ case 0:
768
+ m.pollType = 0;
769
+ break;
770
+ case "QUIZ":
771
+ case 1:
772
+ m.pollType = 1;
773
+ break;
774
+ }
775
+ if (d.correctOptionIndex != null) {
776
+ m.correctOptionIndex = d.correctOptionIndex | 0;
777
+ }
778
+ if (d.pollVotesSnapshot != null) {
779
+ if (typeof d.pollVotesSnapshot !== "object")
780
+ throw TypeError(".proto.MsgOpaqueData.pollVotesSnapshot: object expected");
781
+ m.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.fromObject(d.pollVotesSnapshot, n + 1);
782
+ }
783
+ if (d.encReactionTargetMessageKey != null) {
784
+ m.encReactionTargetMessageKey = String(d.encReactionTargetMessageKey);
785
+ }
786
+ if (d.encReactionEncPayload != null) {
787
+ if (typeof d.encReactionEncPayload === "string")
788
+ $util.base64.decode(d.encReactionEncPayload, m.encReactionEncPayload = $util.newBuffer($util.base64.length(d.encReactionEncPayload)), 0);
789
+ else if (d.encReactionEncPayload.length >= 0)
790
+ m.encReactionEncPayload = d.encReactionEncPayload;
791
+ }
792
+ if (d.encReactionEncIv != null) {
793
+ if (typeof d.encReactionEncIv === "string")
794
+ $util.base64.decode(d.encReactionEncIv, m.encReactionEncIv = $util.newBuffer($util.base64.length(d.encReactionEncIv)), 0);
795
+ else if (d.encReactionEncIv.length >= 0)
796
+ m.encReactionEncIv = d.encReactionEncIv;
797
+ }
798
+ if (d.botMessageSecret != null) {
799
+ if (typeof d.botMessageSecret === "string")
800
+ $util.base64.decode(d.botMessageSecret, m.botMessageSecret = $util.newBuffer($util.base64.length(d.botMessageSecret)), 0);
801
+ else if (d.botMessageSecret.length >= 0)
802
+ m.botMessageSecret = d.botMessageSecret;
803
+ }
804
+ if (d.targetMessageKey != null) {
805
+ m.targetMessageKey = String(d.targetMessageKey);
806
+ }
807
+ if (d.encPayload != null) {
808
+ if (typeof d.encPayload === "string")
809
+ $util.base64.decode(d.encPayload, m.encPayload = $util.newBuffer($util.base64.length(d.encPayload)), 0);
810
+ else if (d.encPayload.length >= 0)
811
+ m.encPayload = d.encPayload;
812
+ }
813
+ if (d.encIv != null) {
814
+ if (typeof d.encIv === "string")
815
+ $util.base64.decode(d.encIv, m.encIv = $util.newBuffer($util.base64.length(d.encIv)), 0);
816
+ else if (d.encIv.length >= 0)
817
+ m.encIv = d.encIv;
818
+ }
819
+ if (d.eventName != null) {
820
+ m.eventName = String(d.eventName);
821
+ }
822
+ if (d.isEventCanceled != null) {
823
+ m.isEventCanceled = Boolean(d.isEventCanceled);
824
+ }
825
+ if (d.eventDescription != null) {
826
+ m.eventDescription = String(d.eventDescription);
827
+ }
828
+ if (d.eventJoinLink != null) {
829
+ m.eventJoinLink = String(d.eventJoinLink);
830
+ }
831
+ if (d.eventStartTime != null) {
832
+ if ($util.Long)
833
+ (m.eventStartTime = $util.Long.fromValue(d.eventStartTime)).unsigned = false;
834
+ else if (typeof d.eventStartTime === "string")
835
+ m.eventStartTime = parseInt(d.eventStartTime, 10);
836
+ else if (typeof d.eventStartTime === "number")
837
+ m.eventStartTime = d.eventStartTime;
838
+ else if (typeof d.eventStartTime === "object")
839
+ m.eventStartTime = new $util.LongBits(d.eventStartTime.low >>> 0, d.eventStartTime.high >>> 0).toNumber();
840
+ }
841
+ if (d.eventLocation != null) {
842
+ if (typeof d.eventLocation !== "object")
843
+ throw TypeError(".proto.MsgOpaqueData.eventLocation: object expected");
844
+ m.eventLocation = $root.proto.MsgOpaqueData.EventLocation.fromObject(d.eventLocation, n + 1);
845
+ }
846
+ if (d.eventEndTime != null) {
847
+ if ($util.Long)
848
+ (m.eventEndTime = $util.Long.fromValue(d.eventEndTime)).unsigned = false;
849
+ else if (typeof d.eventEndTime === "string")
850
+ m.eventEndTime = parseInt(d.eventEndTime, 10);
851
+ else if (typeof d.eventEndTime === "number")
852
+ m.eventEndTime = d.eventEndTime;
853
+ else if (typeof d.eventEndTime === "object")
854
+ m.eventEndTime = new $util.LongBits(d.eventEndTime.low >>> 0, d.eventEndTime.high >>> 0).toNumber();
855
+ }
856
+ if (d.eventIsScheduledCall != null) {
857
+ m.eventIsScheduledCall = Boolean(d.eventIsScheduledCall);
858
+ }
859
+ if (d.eventExtraGuestsAllowed != null) {
860
+ m.eventExtraGuestsAllowed = Boolean(d.eventExtraGuestsAllowed);
861
+ }
862
+ if (d.plainProtobufBytes != null) {
863
+ if (typeof d.plainProtobufBytes === "string")
864
+ $util.base64.decode(d.plainProtobufBytes, m.plainProtobufBytes = $util.newBuffer($util.base64.length(d.plainProtobufBytes)), 0);
865
+ else if (d.plainProtobufBytes.length >= 0)
866
+ m.plainProtobufBytes = d.plainProtobufBytes;
867
+ }
868
+ if (d.quarantineExtractedText != null) {
869
+ m.quarantineExtractedText = String(d.quarantineExtractedText);
870
+ }
871
+ if (d.pollEndTime != null) {
872
+ if ($util.Long)
873
+ (m.pollEndTime = $util.Long.fromValue(d.pollEndTime)).unsigned = false;
874
+ else if (typeof d.pollEndTime === "string")
875
+ m.pollEndTime = parseInt(d.pollEndTime, 10);
876
+ else if (typeof d.pollEndTime === "number")
877
+ m.pollEndTime = d.pollEndTime;
878
+ else if (typeof d.pollEndTime === "object")
879
+ m.pollEndTime = new $util.LongBits(d.pollEndTime.low >>> 0, d.pollEndTime.high >>> 0).toNumber();
880
+ }
881
+ if (d.pollHideVoterNames != null) {
882
+ m.pollHideVoterNames = Boolean(d.pollHideVoterNames);
883
+ }
884
+ if (d.pollAllowAddOption != null) {
885
+ m.pollAllowAddOption = Boolean(d.pollAllowAddOption);
886
+ }
887
+ if (d.sharableEventInviteId != null) {
888
+ m.sharableEventInviteId = String(d.sharableEventInviteId);
889
+ }
890
+ if (d.sharableEventInviteTitle != null) {
891
+ m.sharableEventInviteTitle = String(d.sharableEventInviteTitle);
892
+ }
893
+ if (d.sharableEventInviteStartTime != null) {
894
+ if ($util.Long)
895
+ (m.sharableEventInviteStartTime = $util.Long.fromValue(d.sharableEventInviteStartTime)).unsigned = false;
896
+ else if (typeof d.sharableEventInviteStartTime === "string")
897
+ m.sharableEventInviteStartTime = parseInt(d.sharableEventInviteStartTime, 10);
898
+ else if (typeof d.sharableEventInviteStartTime === "number")
899
+ m.sharableEventInviteStartTime = d.sharableEventInviteStartTime;
900
+ else if (typeof d.sharableEventInviteStartTime === "object")
901
+ m.sharableEventInviteStartTime = new $util.LongBits(d.sharableEventInviteStartTime.low >>> 0, d.sharableEventInviteStartTime.high >>> 0).toNumber();
902
+ }
903
+ if (d.sharableEventInviteEndTime != null) {
904
+ if ($util.Long)
905
+ (m.sharableEventInviteEndTime = $util.Long.fromValue(d.sharableEventInviteEndTime)).unsigned = false;
906
+ else if (typeof d.sharableEventInviteEndTime === "string")
907
+ m.sharableEventInviteEndTime = parseInt(d.sharableEventInviteEndTime, 10);
908
+ else if (typeof d.sharableEventInviteEndTime === "number")
909
+ m.sharableEventInviteEndTime = d.sharableEventInviteEndTime;
910
+ else if (typeof d.sharableEventInviteEndTime === "object")
911
+ m.sharableEventInviteEndTime = new $util.LongBits(d.sharableEventInviteEndTime.low >>> 0, d.sharableEventInviteEndTime.high >>> 0).toNumber();
912
+ }
913
+ if (d.sharableEventInviteCaption != null) {
914
+ m.sharableEventInviteCaption = String(d.sharableEventInviteCaption);
915
+ }
916
+ if (d.sharableEventInviteIsCanceled != null) {
917
+ m.sharableEventInviteIsCanceled = Boolean(d.sharableEventInviteIsCanceled);
918
+ }
919
+ if (d.sharableEventInviteJpegThumbnail != null) {
920
+ if (typeof d.sharableEventInviteJpegThumbnail === "string")
921
+ $util.base64.decode(d.sharableEventInviteJpegThumbnail, m.sharableEventInviteJpegThumbnail = $util.newBuffer($util.base64.length(d.sharableEventInviteJpegThumbnail)), 0);
922
+ else if (d.sharableEventInviteJpegThumbnail.length >= 0)
923
+ m.sharableEventInviteJpegThumbnail = d.sharableEventInviteJpegThumbnail;
924
+ }
925
+ if (d.sharableEventInviteCallLink != null) {
926
+ m.sharableEventInviteCallLink = String(d.sharableEventInviteCallLink);
927
+ }
928
+ return m;
929
+ };
930
+ MsgOpaqueData.toObject = function toObject(m, o) {
931
+ if (!o)
932
+ o = {};
933
+ var d = {};
934
+ if (o.arrays || o.defaults) {
935
+ d.pollOptions = [];
936
+ }
937
+ if (m.body != null && m.hasOwnProperty("body")) {
938
+ d.body = m.body;
939
+ if (o.oneofs)
940
+ d._body = "body";
941
+ }
942
+ if (m.caption != null && m.hasOwnProperty("caption")) {
943
+ d.caption = m.caption;
944
+ if (o.oneofs)
945
+ d._caption = "caption";
946
+ }
947
+ if (m.lng != null && m.hasOwnProperty("lng")) {
948
+ d.lng = o.json && !isFinite(m.lng) ? String(m.lng) : m.lng;
949
+ if (o.oneofs)
950
+ d._lng = "lng";
951
+ }
952
+ if (m.isLive != null && m.hasOwnProperty("isLive")) {
953
+ d.isLive = m.isLive;
954
+ if (o.oneofs)
955
+ d._isLive = "isLive";
956
+ }
957
+ if (m.lat != null && m.hasOwnProperty("lat")) {
958
+ d.lat = o.json && !isFinite(m.lat) ? String(m.lat) : m.lat;
959
+ if (o.oneofs)
960
+ d._lat = "lat";
961
+ }
962
+ if (m.paymentAmount1000 != null && m.hasOwnProperty("paymentAmount1000")) {
963
+ d.paymentAmount1000 = m.paymentAmount1000;
964
+ if (o.oneofs)
965
+ d._paymentAmount1000 = "paymentAmount1000";
966
+ }
967
+ if (m.paymentNoteMsgBody != null && m.hasOwnProperty("paymentNoteMsgBody")) {
968
+ d.paymentNoteMsgBody = m.paymentNoteMsgBody;
969
+ if (o.oneofs)
970
+ d._paymentNoteMsgBody = "paymentNoteMsgBody";
971
+ }
972
+ if (m.matchedText != null && m.hasOwnProperty("matchedText")) {
973
+ d.matchedText = m.matchedText;
974
+ if (o.oneofs)
975
+ d._matchedText = "matchedText";
976
+ }
977
+ if (m.title != null && m.hasOwnProperty("title")) {
978
+ d.title = m.title;
979
+ if (o.oneofs)
980
+ d._title = "title";
981
+ }
982
+ if (m.description != null && m.hasOwnProperty("description")) {
983
+ d.description = m.description;
984
+ if (o.oneofs)
985
+ d._description = "description";
986
+ }
987
+ if (m.futureproofBuffer != null && m.hasOwnProperty("futureproofBuffer")) {
988
+ d.futureproofBuffer = o.bytes === String ? $util.base64.encode(m.futureproofBuffer, 0, m.futureproofBuffer.length) : o.bytes === Array ? Array.prototype.slice.call(m.futureproofBuffer) : m.futureproofBuffer;
989
+ if (o.oneofs)
990
+ d._futureproofBuffer = "futureproofBuffer";
991
+ }
992
+ if (m.clientUrl != null && m.hasOwnProperty("clientUrl")) {
993
+ d.clientUrl = m.clientUrl;
994
+ if (o.oneofs)
995
+ d._clientUrl = "clientUrl";
996
+ }
997
+ if (m.loc != null && m.hasOwnProperty("loc")) {
998
+ d.loc = m.loc;
999
+ if (o.oneofs)
1000
+ d._loc = "loc";
1001
+ }
1002
+ if (m.pollName != null && m.hasOwnProperty("pollName")) {
1003
+ d.pollName = m.pollName;
1004
+ if (o.oneofs)
1005
+ d._pollName = "pollName";
1006
+ }
1007
+ if (m.pollOptions && m.pollOptions.length) {
1008
+ d.pollOptions = [];
1009
+ for (var j = 0; j < m.pollOptions.length; ++j) {
1010
+ d.pollOptions[j] = $root.proto.MsgOpaqueData.PollOption.toObject(m.pollOptions[j], o);
1011
+ }
1012
+ }
1013
+ if (m.pollSelectableOptionsCount != null && m.hasOwnProperty("pollSelectableOptionsCount")) {
1014
+ d.pollSelectableOptionsCount = m.pollSelectableOptionsCount;
1015
+ if (o.oneofs)
1016
+ d._pollSelectableOptionsCount = "pollSelectableOptionsCount";
1017
+ }
1018
+ if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) {
1019
+ d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret;
1020
+ if (o.oneofs)
1021
+ d._messageSecret = "messageSecret";
1022
+ }
1023
+ if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) {
1024
+ if (typeof m.senderTimestampMs === "number")
1025
+ d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs;
1026
+ else
1027
+ d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs;
1028
+ if (o.oneofs)
1029
+ d._senderTimestampMs = "senderTimestampMs";
1030
+ }
1031
+ if (m.pollUpdateParentKey != null && m.hasOwnProperty("pollUpdateParentKey")) {
1032
+ d.pollUpdateParentKey = m.pollUpdateParentKey;
1033
+ if (o.oneofs)
1034
+ d._pollUpdateParentKey = "pollUpdateParentKey";
1035
+ }
1036
+ if (m.encPollVote != null && m.hasOwnProperty("encPollVote")) {
1037
+ d.encPollVote = $root.proto.PollEncValue.toObject(m.encPollVote, o);
1038
+ if (o.oneofs)
1039
+ d._encPollVote = "encPollVote";
1040
+ }
1041
+ if (m.encReactionTargetMessageKey != null && m.hasOwnProperty("encReactionTargetMessageKey")) {
1042
+ d.encReactionTargetMessageKey = m.encReactionTargetMessageKey;
1043
+ if (o.oneofs)
1044
+ d._encReactionTargetMessageKey = "encReactionTargetMessageKey";
1045
+ }
1046
+ if (m.encReactionEncPayload != null && m.hasOwnProperty("encReactionEncPayload")) {
1047
+ d.encReactionEncPayload = o.bytes === String ? $util.base64.encode(m.encReactionEncPayload, 0, m.encReactionEncPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encReactionEncPayload) : m.encReactionEncPayload;
1048
+ if (o.oneofs)
1049
+ d._encReactionEncPayload = "encReactionEncPayload";
1050
+ }
1051
+ if (m.encReactionEncIv != null && m.hasOwnProperty("encReactionEncIv")) {
1052
+ d.encReactionEncIv = o.bytes === String ? $util.base64.encode(m.encReactionEncIv, 0, m.encReactionEncIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encReactionEncIv) : m.encReactionEncIv;
1053
+ if (o.oneofs)
1054
+ d._encReactionEncIv = "encReactionEncIv";
1055
+ }
1056
+ if (m.isSentCagPollCreation != null && m.hasOwnProperty("isSentCagPollCreation")) {
1057
+ d.isSentCagPollCreation = m.isSentCagPollCreation;
1058
+ if (o.oneofs)
1059
+ d._isSentCagPollCreation = "isSentCagPollCreation";
1060
+ }
1061
+ if (m.botMessageSecret != null && m.hasOwnProperty("botMessageSecret")) {
1062
+ d.botMessageSecret = o.bytes === String ? $util.base64.encode(m.botMessageSecret, 0, m.botMessageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.botMessageSecret) : m.botMessageSecret;
1063
+ if (o.oneofs)
1064
+ d._botMessageSecret = "botMessageSecret";
1065
+ }
1066
+ if (m.targetMessageKey != null && m.hasOwnProperty("targetMessageKey")) {
1067
+ d.targetMessageKey = m.targetMessageKey;
1068
+ if (o.oneofs)
1069
+ d._targetMessageKey = "targetMessageKey";
1070
+ }
1071
+ if (m.encPayload != null && m.hasOwnProperty("encPayload")) {
1072
+ d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload;
1073
+ if (o.oneofs)
1074
+ d._encPayload = "encPayload";
1075
+ }
1076
+ if (m.encIv != null && m.hasOwnProperty("encIv")) {
1077
+ d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv;
1078
+ if (o.oneofs)
1079
+ d._encIv = "encIv";
1080
+ }
1081
+ if (m.eventName != null && m.hasOwnProperty("eventName")) {
1082
+ d.eventName = m.eventName;
1083
+ if (o.oneofs)
1084
+ d._eventName = "eventName";
1085
+ }
1086
+ if (m.isEventCanceled != null && m.hasOwnProperty("isEventCanceled")) {
1087
+ d.isEventCanceled = m.isEventCanceled;
1088
+ if (o.oneofs)
1089
+ d._isEventCanceled = "isEventCanceled";
1090
+ }
1091
+ if (m.eventDescription != null && m.hasOwnProperty("eventDescription")) {
1092
+ d.eventDescription = m.eventDescription;
1093
+ if (o.oneofs)
1094
+ d._eventDescription = "eventDescription";
1095
+ }
1096
+ if (m.eventJoinLink != null && m.hasOwnProperty("eventJoinLink")) {
1097
+ d.eventJoinLink = m.eventJoinLink;
1098
+ if (o.oneofs)
1099
+ d._eventJoinLink = "eventJoinLink";
1100
+ }
1101
+ if (m.eventStartTime != null && m.hasOwnProperty("eventStartTime")) {
1102
+ if (typeof m.eventStartTime === "number")
1103
+ d.eventStartTime = o.longs === String ? String(m.eventStartTime) : m.eventStartTime;
1104
+ else
1105
+ d.eventStartTime = o.longs === String ? longToString(m.eventStartTime) : o.longs === Number ? longToNumber(m.eventStartTime) : m.eventStartTime;
1106
+ if (o.oneofs)
1107
+ d._eventStartTime = "eventStartTime";
1108
+ }
1109
+ if (m.eventLocation != null && m.hasOwnProperty("eventLocation")) {
1110
+ d.eventLocation = $root.proto.MsgOpaqueData.EventLocation.toObject(m.eventLocation, o);
1111
+ if (o.oneofs)
1112
+ d._eventLocation = "eventLocation";
1113
+ }
1114
+ if (m.eventEndTime != null && m.hasOwnProperty("eventEndTime")) {
1115
+ if (typeof m.eventEndTime === "number")
1116
+ d.eventEndTime = o.longs === String ? String(m.eventEndTime) : m.eventEndTime;
1117
+ else
1118
+ d.eventEndTime = o.longs === String ? longToString(m.eventEndTime) : o.longs === Number ? longToNumber(m.eventEndTime) : m.eventEndTime;
1119
+ if (o.oneofs)
1120
+ d._eventEndTime = "eventEndTime";
1121
+ }
1122
+ if (m.pollVotesSnapshot != null && m.hasOwnProperty("pollVotesSnapshot")) {
1123
+ d.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.toObject(m.pollVotesSnapshot, o);
1124
+ if (o.oneofs)
1125
+ d._pollVotesSnapshot = "pollVotesSnapshot";
1126
+ }
1127
+ if (m.pollContentType != null && m.hasOwnProperty("pollContentType")) {
1128
+ d.pollContentType = o.enums === String ? $root.proto.MsgOpaqueData.PollContentType[m.pollContentType] === undefined ? m.pollContentType : $root.proto.MsgOpaqueData.PollContentType[m.pollContentType] : m.pollContentType;
1129
+ if (o.oneofs)
1130
+ d._pollContentType = "pollContentType";
1131
+ }
1132
+ if (m.plainProtobufBytes != null && m.hasOwnProperty("plainProtobufBytes")) {
1133
+ d.plainProtobufBytes = o.bytes === String ? $util.base64.encode(m.plainProtobufBytes, 0, m.plainProtobufBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.plainProtobufBytes) : m.plainProtobufBytes;
1134
+ if (o.oneofs)
1135
+ d._plainProtobufBytes = "plainProtobufBytes";
1136
+ }
1137
+ if (m.eventIsScheduledCall != null && m.hasOwnProperty("eventIsScheduledCall")) {
1138
+ d.eventIsScheduledCall = m.eventIsScheduledCall;
1139
+ if (o.oneofs)
1140
+ d._eventIsScheduledCall = "eventIsScheduledCall";
1141
+ }
1142
+ if (m.eventExtraGuestsAllowed != null && m.hasOwnProperty("eventExtraGuestsAllowed")) {
1143
+ d.eventExtraGuestsAllowed = m.eventExtraGuestsAllowed;
1144
+ if (o.oneofs)
1145
+ d._eventExtraGuestsAllowed = "eventExtraGuestsAllowed";
1146
+ }
1147
+ if (m.pollType != null && m.hasOwnProperty("pollType")) {
1148
+ d.pollType = o.enums === String ? $root.proto.MsgOpaqueData.PollType[m.pollType] === undefined ? m.pollType : $root.proto.MsgOpaqueData.PollType[m.pollType] : m.pollType;
1149
+ if (o.oneofs)
1150
+ d._pollType = "pollType";
1151
+ }
1152
+ if (m.correctOptionIndex != null && m.hasOwnProperty("correctOptionIndex")) {
1153
+ d.correctOptionIndex = m.correctOptionIndex;
1154
+ if (o.oneofs)
1155
+ d._correctOptionIndex = "correctOptionIndex";
1156
+ }
1157
+ if (m.quarantineExtractedText != null && m.hasOwnProperty("quarantineExtractedText")) {
1158
+ d.quarantineExtractedText = m.quarantineExtractedText;
1159
+ if (o.oneofs)
1160
+ d._quarantineExtractedText = "quarantineExtractedText";
1161
+ }
1162
+ if (m.pollEndTime != null && m.hasOwnProperty("pollEndTime")) {
1163
+ if (typeof m.pollEndTime === "number")
1164
+ d.pollEndTime = o.longs === String ? String(m.pollEndTime) : m.pollEndTime;
1165
+ else
1166
+ d.pollEndTime = o.longs === String ? longToString(m.pollEndTime) : o.longs === Number ? longToNumber(m.pollEndTime) : m.pollEndTime;
1167
+ if (o.oneofs)
1168
+ d._pollEndTime = "pollEndTime";
1169
+ }
1170
+ if (m.pollHideVoterNames != null && m.hasOwnProperty("pollHideVoterNames")) {
1171
+ d.pollHideVoterNames = m.pollHideVoterNames;
1172
+ if (o.oneofs)
1173
+ d._pollHideVoterNames = "pollHideVoterNames";
1174
+ }
1175
+ if (m.originalSelfAuthor != null && m.hasOwnProperty("originalSelfAuthor")) {
1176
+ d.originalSelfAuthor = m.originalSelfAuthor;
1177
+ if (o.oneofs)
1178
+ d._originalSelfAuthor = "originalSelfAuthor";
1179
+ }
1180
+ if (m.pollAllowAddOption != null && m.hasOwnProperty("pollAllowAddOption")) {
1181
+ d.pollAllowAddOption = m.pollAllowAddOption;
1182
+ if (o.oneofs)
1183
+ d._pollAllowAddOption = "pollAllowAddOption";
1184
+ }
1185
+ if (m.sharableEventInviteId != null && m.hasOwnProperty("sharableEventInviteId")) {
1186
+ d.sharableEventInviteId = m.sharableEventInviteId;
1187
+ if (o.oneofs)
1188
+ d._sharableEventInviteId = "sharableEventInviteId";
1189
+ }
1190
+ if (m.sharableEventInviteTitle != null && m.hasOwnProperty("sharableEventInviteTitle")) {
1191
+ d.sharableEventInviteTitle = m.sharableEventInviteTitle;
1192
+ if (o.oneofs)
1193
+ d._sharableEventInviteTitle = "sharableEventInviteTitle";
1194
+ }
1195
+ if (m.sharableEventInviteStartTime != null && m.hasOwnProperty("sharableEventInviteStartTime")) {
1196
+ if (typeof m.sharableEventInviteStartTime === "number")
1197
+ d.sharableEventInviteStartTime = o.longs === String ? String(m.sharableEventInviteStartTime) : m.sharableEventInviteStartTime;
1198
+ else
1199
+ d.sharableEventInviteStartTime = o.longs === String ? longToString(m.sharableEventInviteStartTime) : o.longs === Number ? longToNumber(m.sharableEventInviteStartTime) : m.sharableEventInviteStartTime;
1200
+ if (o.oneofs)
1201
+ d._sharableEventInviteStartTime = "sharableEventInviteStartTime";
1202
+ }
1203
+ if (m.sharableEventInviteEndTime != null && m.hasOwnProperty("sharableEventInviteEndTime")) {
1204
+ if (typeof m.sharableEventInviteEndTime === "number")
1205
+ d.sharableEventInviteEndTime = o.longs === String ? String(m.sharableEventInviteEndTime) : m.sharableEventInviteEndTime;
1206
+ else
1207
+ d.sharableEventInviteEndTime = o.longs === String ? longToString(m.sharableEventInviteEndTime) : o.longs === Number ? longToNumber(m.sharableEventInviteEndTime) : m.sharableEventInviteEndTime;
1208
+ if (o.oneofs)
1209
+ d._sharableEventInviteEndTime = "sharableEventInviteEndTime";
1210
+ }
1211
+ if (m.sharableEventInviteCaption != null && m.hasOwnProperty("sharableEventInviteCaption")) {
1212
+ d.sharableEventInviteCaption = m.sharableEventInviteCaption;
1213
+ if (o.oneofs)
1214
+ d._sharableEventInviteCaption = "sharableEventInviteCaption";
1215
+ }
1216
+ if (m.sharableEventInviteIsCanceled != null && m.hasOwnProperty("sharableEventInviteIsCanceled")) {
1217
+ d.sharableEventInviteIsCanceled = m.sharableEventInviteIsCanceled;
1218
+ if (o.oneofs)
1219
+ d._sharableEventInviteIsCanceled = "sharableEventInviteIsCanceled";
1220
+ }
1221
+ if (m.sharableEventInviteJpegThumbnail != null && m.hasOwnProperty("sharableEventInviteJpegThumbnail")) {
1222
+ d.sharableEventInviteJpegThumbnail = o.bytes === String ? $util.base64.encode(m.sharableEventInviteJpegThumbnail, 0, m.sharableEventInviteJpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.sharableEventInviteJpegThumbnail) : m.sharableEventInviteJpegThumbnail;
1223
+ if (o.oneofs)
1224
+ d._sharableEventInviteJpegThumbnail = "sharableEventInviteJpegThumbnail";
1225
+ }
1226
+ if (m.sharableEventInviteCallLink != null && m.hasOwnProperty("sharableEventInviteCallLink")) {
1227
+ d.sharableEventInviteCallLink = m.sharableEventInviteCallLink;
1228
+ if (o.oneofs)
1229
+ d._sharableEventInviteCallLink = "sharableEventInviteCallLink";
1230
+ }
1231
+ return d;
1232
+ };
1233
+ MsgOpaqueData.prototype.toJSON = function toJSON() {
1234
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1235
+ };
1236
+ MsgOpaqueData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1237
+ if (typeUrlPrefix === undefined) {
1238
+ typeUrlPrefix = "type.googleapis.com";
1239
+ }
1240
+ return typeUrlPrefix + "/proto.MsgOpaqueData";
1241
+ };
1242
+ $lazy(MsgOpaqueData, "EventLocation", function() {
1243
+ function EventLocation(p) {
1244
+ if (p)
1245
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1246
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1247
+ this[ks[i]] = p[ks[i]];
1248
+ }
1249
+ EventLocation.prototype.degreesLatitude = null;
1250
+ EventLocation.prototype.degreesLongitude = null;
1251
+ EventLocation.prototype.name = null;
1252
+ EventLocation.prototype.address = null;
1253
+ EventLocation.prototype.url = null;
1254
+ EventLocation.prototype.jpegThumbnail = null;
1255
+ let $oneOfFields;
1256
+ Object.defineProperty(EventLocation.prototype, "_degreesLatitude", {
1257
+ get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]),
1258
+ set: $util.oneOfSetter($oneOfFields)
1259
+ });
1260
+ Object.defineProperty(EventLocation.prototype, "_degreesLongitude", {
1261
+ get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]),
1262
+ set: $util.oneOfSetter($oneOfFields)
1263
+ });
1264
+ Object.defineProperty(EventLocation.prototype, "_name", {
1265
+ get: $util.oneOfGetter($oneOfFields = ["name"]),
1266
+ set: $util.oneOfSetter($oneOfFields)
1267
+ });
1268
+ Object.defineProperty(EventLocation.prototype, "_address", {
1269
+ get: $util.oneOfGetter($oneOfFields = ["address"]),
1270
+ set: $util.oneOfSetter($oneOfFields)
1271
+ });
1272
+ Object.defineProperty(EventLocation.prototype, "_url", {
1273
+ get: $util.oneOfGetter($oneOfFields = ["url"]),
1274
+ set: $util.oneOfSetter($oneOfFields)
1275
+ });
1276
+ Object.defineProperty(EventLocation.prototype, "_jpegThumbnail", {
1277
+ get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]),
1278
+ set: $util.oneOfSetter($oneOfFields)
1279
+ });
1280
+ EventLocation.create = function create(properties) {
1281
+ return new EventLocation(properties);
1282
+ };
1283
+ EventLocation.encode = function encode(m, w) {
1284
+ if (!w)
1285
+ w = $Writer.create();
1286
+ if (m.degreesLatitude != null && Object.hasOwnProperty.call(m, "degreesLatitude"))
1287
+ w.uint32(9).double(m.degreesLatitude);
1288
+ if (m.degreesLongitude != null && Object.hasOwnProperty.call(m, "degreesLongitude"))
1289
+ w.uint32(17).double(m.degreesLongitude);
1290
+ if (m.name != null && Object.hasOwnProperty.call(m, "name"))
1291
+ w.uint32(26).string(m.name);
1292
+ if (m.address != null && Object.hasOwnProperty.call(m, "address"))
1293
+ w.uint32(34).string(m.address);
1294
+ if (m.url != null && Object.hasOwnProperty.call(m, "url"))
1295
+ w.uint32(42).string(m.url);
1296
+ if (m.jpegThumbnail != null && Object.hasOwnProperty.call(m, "jpegThumbnail"))
1297
+ w.uint32(50).bytes(m.jpegThumbnail);
1298
+ return w;
1299
+ };
1300
+ EventLocation.decode = function decode(r, l, e, n) {
1301
+ if (!(r instanceof $Reader))
1302
+ r = $Reader.create(r);
1303
+ if (n === undefined)
1304
+ n = 0;
1305
+ if (n > $Reader.recursionLimit)
1306
+ throw Error("maximum nesting depth exceeded");
1307
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MsgOpaqueData.EventLocation();
1308
+ while (r.pos < c) {
1309
+ var t = r.uint32();
1310
+ if (t === e)
1311
+ break;
1312
+ switch (t >>> 3) {
1313
+ case 1: {
1314
+ m.degreesLatitude = r.double();
1315
+ break;
1316
+ }
1317
+ case 2: {
1318
+ m.degreesLongitude = r.double();
1319
+ break;
1320
+ }
1321
+ case 3: {
1322
+ m.name = r.string();
1323
+ break;
1324
+ }
1325
+ case 4: {
1326
+ m.address = r.string();
1327
+ break;
1328
+ }
1329
+ case 5: {
1330
+ m.url = r.string();
1331
+ break;
1332
+ }
1333
+ case 6: {
1334
+ m.jpegThumbnail = r.bytes();
1335
+ break;
1336
+ }
1337
+ default:
1338
+ r.skipType(t & 7, n);
1339
+ break;
1340
+ }
1341
+ }
1342
+ return m;
1343
+ };
1344
+ EventLocation.fromObject = function fromObject(d, n) {
1345
+ if (d instanceof $root.proto.MsgOpaqueData.EventLocation)
1346
+ return d;
1347
+ if (n === undefined)
1348
+ n = 0;
1349
+ if (n > $util.recursionLimit)
1350
+ throw Error("maximum nesting depth exceeded");
1351
+ var m = new $root.proto.MsgOpaqueData.EventLocation();
1352
+ if (d.degreesLatitude != null) {
1353
+ m.degreesLatitude = Number(d.degreesLatitude);
1354
+ }
1355
+ if (d.degreesLongitude != null) {
1356
+ m.degreesLongitude = Number(d.degreesLongitude);
1357
+ }
1358
+ if (d.name != null) {
1359
+ m.name = String(d.name);
1360
+ }
1361
+ if (d.address != null) {
1362
+ m.address = String(d.address);
1363
+ }
1364
+ if (d.url != null) {
1365
+ m.url = String(d.url);
1366
+ }
1367
+ if (d.jpegThumbnail != null) {
1368
+ if (typeof d.jpegThumbnail === "string")
1369
+ $util.base64.decode(d.jpegThumbnail, m.jpegThumbnail = $util.newBuffer($util.base64.length(d.jpegThumbnail)), 0);
1370
+ else if (d.jpegThumbnail.length >= 0)
1371
+ m.jpegThumbnail = d.jpegThumbnail;
1372
+ }
1373
+ return m;
1374
+ };
1375
+ EventLocation.toObject = function toObject(m, o) {
1376
+ if (!o)
1377
+ o = {};
1378
+ var d = {};
1379
+ if (m.degreesLatitude != null && m.hasOwnProperty("degreesLatitude")) {
1380
+ d.degreesLatitude = o.json && !isFinite(m.degreesLatitude) ? String(m.degreesLatitude) : m.degreesLatitude;
1381
+ if (o.oneofs)
1382
+ d._degreesLatitude = "degreesLatitude";
1383
+ }
1384
+ if (m.degreesLongitude != null && m.hasOwnProperty("degreesLongitude")) {
1385
+ d.degreesLongitude = o.json && !isFinite(m.degreesLongitude) ? String(m.degreesLongitude) : m.degreesLongitude;
1386
+ if (o.oneofs)
1387
+ d._degreesLongitude = "degreesLongitude";
1388
+ }
1389
+ if (m.name != null && m.hasOwnProperty("name")) {
1390
+ d.name = m.name;
1391
+ if (o.oneofs)
1392
+ d._name = "name";
1393
+ }
1394
+ if (m.address != null && m.hasOwnProperty("address")) {
1395
+ d.address = m.address;
1396
+ if (o.oneofs)
1397
+ d._address = "address";
1398
+ }
1399
+ if (m.url != null && m.hasOwnProperty("url")) {
1400
+ d.url = m.url;
1401
+ if (o.oneofs)
1402
+ d._url = "url";
1403
+ }
1404
+ if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) {
1405
+ d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail;
1406
+ if (o.oneofs)
1407
+ d._jpegThumbnail = "jpegThumbnail";
1408
+ }
1409
+ return d;
1410
+ };
1411
+ EventLocation.prototype.toJSON = function toJSON() {
1412
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1413
+ };
1414
+ EventLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1415
+ if (typeUrlPrefix === undefined) {
1416
+ typeUrlPrefix = "type.googleapis.com";
1417
+ }
1418
+ return typeUrlPrefix + "/proto.MsgOpaqueData.EventLocation";
1419
+ };
1420
+ return EventLocation;
1421
+ });
1422
+ $lazy(MsgOpaqueData, "PollContentType", function() {
1423
+ const valuesById = {}, values = Object.create(valuesById);
1424
+ values[valuesById[0] = "UNKNOWN"] = 0;
1425
+ values[valuesById[1] = "TEXT"] = 1;
1426
+ values[valuesById[2] = "IMAGE"] = 2;
1427
+ return values;
1428
+ });
1429
+ $lazy(MsgOpaqueData, "PollOption", function() {
1430
+ function PollOption(p) {
1431
+ if (p)
1432
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1433
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1434
+ this[ks[i]] = p[ks[i]];
1435
+ }
1436
+ PollOption.prototype.name = null;
1437
+ PollOption.prototype.hash = null;
1438
+ let $oneOfFields;
1439
+ Object.defineProperty(PollOption.prototype, "_name", {
1440
+ get: $util.oneOfGetter($oneOfFields = ["name"]),
1441
+ set: $util.oneOfSetter($oneOfFields)
1442
+ });
1443
+ Object.defineProperty(PollOption.prototype, "_hash", {
1444
+ get: $util.oneOfGetter($oneOfFields = ["hash"]),
1445
+ set: $util.oneOfSetter($oneOfFields)
1446
+ });
1447
+ PollOption.create = function create(properties) {
1448
+ return new PollOption(properties);
1449
+ };
1450
+ PollOption.encode = function encode(m, w) {
1451
+ if (!w)
1452
+ w = $Writer.create();
1453
+ if (m.name != null && Object.hasOwnProperty.call(m, "name"))
1454
+ w.uint32(10).string(m.name);
1455
+ if (m.hash != null && Object.hasOwnProperty.call(m, "hash"))
1456
+ w.uint32(18).string(m.hash);
1457
+ return w;
1458
+ };
1459
+ PollOption.decode = function decode(r, l, e, n) {
1460
+ if (!(r instanceof $Reader))
1461
+ r = $Reader.create(r);
1462
+ if (n === undefined)
1463
+ n = 0;
1464
+ if (n > $Reader.recursionLimit)
1465
+ throw Error("maximum nesting depth exceeded");
1466
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MsgOpaqueData.PollOption();
1467
+ while (r.pos < c) {
1468
+ var t = r.uint32();
1469
+ if (t === e)
1470
+ break;
1471
+ switch (t >>> 3) {
1472
+ case 1: {
1473
+ m.name = r.string();
1474
+ break;
1475
+ }
1476
+ case 2: {
1477
+ m.hash = r.string();
1478
+ break;
1479
+ }
1480
+ default:
1481
+ r.skipType(t & 7, n);
1482
+ break;
1483
+ }
1484
+ }
1485
+ return m;
1486
+ };
1487
+ PollOption.fromObject = function fromObject(d, n) {
1488
+ if (d instanceof $root.proto.MsgOpaqueData.PollOption)
1489
+ return d;
1490
+ if (n === undefined)
1491
+ n = 0;
1492
+ if (n > $util.recursionLimit)
1493
+ throw Error("maximum nesting depth exceeded");
1494
+ var m = new $root.proto.MsgOpaqueData.PollOption();
1495
+ if (d.name != null) {
1496
+ m.name = String(d.name);
1497
+ }
1498
+ if (d.hash != null) {
1499
+ m.hash = String(d.hash);
1500
+ }
1501
+ return m;
1502
+ };
1503
+ PollOption.toObject = function toObject(m, o) {
1504
+ if (!o)
1505
+ o = {};
1506
+ var d = {};
1507
+ if (m.name != null && m.hasOwnProperty("name")) {
1508
+ d.name = m.name;
1509
+ if (o.oneofs)
1510
+ d._name = "name";
1511
+ }
1512
+ if (m.hash != null && m.hasOwnProperty("hash")) {
1513
+ d.hash = m.hash;
1514
+ if (o.oneofs)
1515
+ d._hash = "hash";
1516
+ }
1517
+ return d;
1518
+ };
1519
+ PollOption.prototype.toJSON = function toJSON() {
1520
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1521
+ };
1522
+ PollOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1523
+ if (typeUrlPrefix === undefined) {
1524
+ typeUrlPrefix = "type.googleapis.com";
1525
+ }
1526
+ return typeUrlPrefix + "/proto.MsgOpaqueData.PollOption";
1527
+ };
1528
+ return PollOption;
1529
+ });
1530
+ $lazy(MsgOpaqueData, "PollType", function() {
1531
+ const valuesById = {}, values = Object.create(valuesById);
1532
+ values[valuesById[0] = "POLL"] = 0;
1533
+ values[valuesById[1] = "QUIZ"] = 1;
1534
+ return values;
1535
+ });
1536
+ $lazy(MsgOpaqueData, "PollVoteSnapshot", function() {
1537
+ function PollVoteSnapshot(p) {
1538
+ if (p)
1539
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1540
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1541
+ this[ks[i]] = p[ks[i]];
1542
+ }
1543
+ PollVoteSnapshot.prototype.option = null;
1544
+ PollVoteSnapshot.prototype.optionVoteCount = null;
1545
+ let $oneOfFields;
1546
+ Object.defineProperty(PollVoteSnapshot.prototype, "_option", {
1547
+ get: $util.oneOfGetter($oneOfFields = ["option"]),
1548
+ set: $util.oneOfSetter($oneOfFields)
1549
+ });
1550
+ Object.defineProperty(PollVoteSnapshot.prototype, "_optionVoteCount", {
1551
+ get: $util.oneOfGetter($oneOfFields = ["optionVoteCount"]),
1552
+ set: $util.oneOfSetter($oneOfFields)
1553
+ });
1554
+ PollVoteSnapshot.create = function create(properties) {
1555
+ return new PollVoteSnapshot(properties);
1556
+ };
1557
+ PollVoteSnapshot.encode = function encode(m, w) {
1558
+ if (!w)
1559
+ w = $Writer.create();
1560
+ if (m.option != null && Object.hasOwnProperty.call(m, "option"))
1561
+ $root.proto.MsgOpaqueData.PollOption.encode(m.option, w.uint32(10).fork()).ldelim();
1562
+ if (m.optionVoteCount != null && Object.hasOwnProperty.call(m, "optionVoteCount"))
1563
+ w.uint32(16).int32(m.optionVoteCount);
1564
+ return w;
1565
+ };
1566
+ PollVoteSnapshot.decode = function decode(r, l, e, n) {
1567
+ if (!(r instanceof $Reader))
1568
+ r = $Reader.create(r);
1569
+ if (n === undefined)
1570
+ n = 0;
1571
+ if (n > $Reader.recursionLimit)
1572
+ throw Error("maximum nesting depth exceeded");
1573
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MsgOpaqueData.PollVoteSnapshot();
1574
+ while (r.pos < c) {
1575
+ var t = r.uint32();
1576
+ if (t === e)
1577
+ break;
1578
+ switch (t >>> 3) {
1579
+ case 1: {
1580
+ m.option = $root.proto.MsgOpaqueData.PollOption.decode(r, r.uint32(), undefined, n + 1);
1581
+ break;
1582
+ }
1583
+ case 2: {
1584
+ m.optionVoteCount = r.int32();
1585
+ break;
1586
+ }
1587
+ default:
1588
+ r.skipType(t & 7, n);
1589
+ break;
1590
+ }
1591
+ }
1592
+ return m;
1593
+ };
1594
+ PollVoteSnapshot.fromObject = function fromObject(d, n) {
1595
+ if (d instanceof $root.proto.MsgOpaqueData.PollVoteSnapshot)
1596
+ return d;
1597
+ if (n === undefined)
1598
+ n = 0;
1599
+ if (n > $util.recursionLimit)
1600
+ throw Error("maximum nesting depth exceeded");
1601
+ var m = new $root.proto.MsgOpaqueData.PollVoteSnapshot();
1602
+ if (d.option != null) {
1603
+ if (typeof d.option !== "object")
1604
+ throw TypeError(".proto.MsgOpaqueData.PollVoteSnapshot.option: object expected");
1605
+ m.option = $root.proto.MsgOpaqueData.PollOption.fromObject(d.option, n + 1);
1606
+ }
1607
+ if (d.optionVoteCount != null) {
1608
+ m.optionVoteCount = d.optionVoteCount | 0;
1609
+ }
1610
+ return m;
1611
+ };
1612
+ PollVoteSnapshot.toObject = function toObject(m, o) {
1613
+ if (!o)
1614
+ o = {};
1615
+ var d = {};
1616
+ if (m.option != null && m.hasOwnProperty("option")) {
1617
+ d.option = $root.proto.MsgOpaqueData.PollOption.toObject(m.option, o);
1618
+ if (o.oneofs)
1619
+ d._option = "option";
1620
+ }
1621
+ if (m.optionVoteCount != null && m.hasOwnProperty("optionVoteCount")) {
1622
+ d.optionVoteCount = m.optionVoteCount;
1623
+ if (o.oneofs)
1624
+ d._optionVoteCount = "optionVoteCount";
1625
+ }
1626
+ return d;
1627
+ };
1628
+ PollVoteSnapshot.prototype.toJSON = function toJSON() {
1629
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1630
+ };
1631
+ PollVoteSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1632
+ if (typeUrlPrefix === undefined) {
1633
+ typeUrlPrefix = "type.googleapis.com";
1634
+ }
1635
+ return typeUrlPrefix + "/proto.MsgOpaqueData.PollVoteSnapshot";
1636
+ };
1637
+ return PollVoteSnapshot;
1638
+ });
1639
+ $lazy(MsgOpaqueData, "PollVotesSnapshot", function() {
1640
+ function PollVotesSnapshot(p) {
1641
+ this.pollVotes = [];
1642
+ if (p)
1643
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1644
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1645
+ this[ks[i]] = p[ks[i]];
1646
+ }
1647
+ PollVotesSnapshot.prototype.pollVotes = $util.emptyArray;
1648
+ PollVotesSnapshot.create = function create(properties) {
1649
+ return new PollVotesSnapshot(properties);
1650
+ };
1651
+ PollVotesSnapshot.encode = function encode(m, w) {
1652
+ if (!w)
1653
+ w = $Writer.create();
1654
+ if (m.pollVotes != null && m.pollVotes.length) {
1655
+ for (var i = 0; i < m.pollVotes.length; ++i)
1656
+ $root.proto.MsgOpaqueData.PollVoteSnapshot.encode(m.pollVotes[i], w.uint32(10).fork()).ldelim();
1657
+ }
1658
+ return w;
1659
+ };
1660
+ PollVotesSnapshot.decode = function decode(r, l, e, n) {
1661
+ if (!(r instanceof $Reader))
1662
+ r = $Reader.create(r);
1663
+ if (n === undefined)
1664
+ n = 0;
1665
+ if (n > $Reader.recursionLimit)
1666
+ throw Error("maximum nesting depth exceeded");
1667
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MsgOpaqueData.PollVotesSnapshot();
1668
+ while (r.pos < c) {
1669
+ var t = r.uint32();
1670
+ if (t === e)
1671
+ break;
1672
+ switch (t >>> 3) {
1673
+ case 1: {
1674
+ if (!(m.pollVotes && m.pollVotes.length))
1675
+ m.pollVotes = [];
1676
+ m.pollVotes.push($root.proto.MsgOpaqueData.PollVoteSnapshot.decode(r, r.uint32(), undefined, n + 1));
1677
+ break;
1678
+ }
1679
+ default:
1680
+ r.skipType(t & 7, n);
1681
+ break;
1682
+ }
1683
+ }
1684
+ return m;
1685
+ };
1686
+ PollVotesSnapshot.fromObject = function fromObject(d, n) {
1687
+ if (d instanceof $root.proto.MsgOpaqueData.PollVotesSnapshot)
1688
+ return d;
1689
+ if (n === undefined)
1690
+ n = 0;
1691
+ if (n > $util.recursionLimit)
1692
+ throw Error("maximum nesting depth exceeded");
1693
+ var m = new $root.proto.MsgOpaqueData.PollVotesSnapshot();
1694
+ if (d.pollVotes) {
1695
+ if (!Array.isArray(d.pollVotes))
1696
+ throw TypeError(".proto.MsgOpaqueData.PollVotesSnapshot.pollVotes: array expected");
1697
+ m.pollVotes = [];
1698
+ for (var i = 0; i < d.pollVotes.length; ++i) {
1699
+ if (typeof d.pollVotes[i] !== "object")
1700
+ throw TypeError(".proto.MsgOpaqueData.PollVotesSnapshot.pollVotes: object expected");
1701
+ m.pollVotes[i] = $root.proto.MsgOpaqueData.PollVoteSnapshot.fromObject(d.pollVotes[i], n + 1);
1702
+ }
1703
+ }
1704
+ return m;
1705
+ };
1706
+ PollVotesSnapshot.toObject = function toObject(m, o) {
1707
+ if (!o)
1708
+ o = {};
1709
+ var d = {};
1710
+ if (o.arrays || o.defaults) {
1711
+ d.pollVotes = [];
1712
+ }
1713
+ if (m.pollVotes && m.pollVotes.length) {
1714
+ d.pollVotes = [];
1715
+ for (var j = 0; j < m.pollVotes.length; ++j) {
1716
+ d.pollVotes[j] = $root.proto.MsgOpaqueData.PollVoteSnapshot.toObject(m.pollVotes[j], o);
1717
+ }
1718
+ }
1719
+ return d;
1720
+ };
1721
+ PollVotesSnapshot.prototype.toJSON = function toJSON() {
1722
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1723
+ };
1724
+ PollVotesSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1725
+ if (typeUrlPrefix === undefined) {
1726
+ typeUrlPrefix = "type.googleapis.com";
1727
+ }
1728
+ return typeUrlPrefix + "/proto.MsgOpaqueData.PollVotesSnapshot";
1729
+ };
1730
+ return PollVotesSnapshot;
1731
+ });
1732
+ return MsgOpaqueData;