167 lines
4.5 KiB
JavaScript
167 lines
4.5 KiB
JavaScript
// Metro module 6283 (f6284).
|
|
import { MessageType, MESSAGE_TYPE, reflectionMergePartial, UnknownFieldHandler, WireType } from "./Module1307";
|
|
import { ThemeAwareAsset } from "./Module6278";
|
|
import { LocalizedString } from "./Module6268";
|
|
import { $callWithNewTarget } from "../_hermes/prelude";
|
|
function $mk78213($env) {
|
|
return () => ThemeAwareAsset;
|
|
}
|
|
function $mk78214($env) {
|
|
return () => LocalizedString;
|
|
}
|
|
function $mk78215($env) {
|
|
return () => LocalizedString;
|
|
}
|
|
let c3999_3;
|
|
let env3999;
|
|
const r3 = env3999 = {};
|
|
class GiftReminderCoachmark$Type extends MessageType {
|
|
constructor() {
|
|
const r1 = env3999;
|
|
const r2 = [{
|
|
no: 1,
|
|
name: "header",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "body",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "asset_url",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 4,
|
|
name: "asset",
|
|
kind: "message",
|
|
T: $mk78213(r1)
|
|
}, {
|
|
no: 5,
|
|
name: "header_localized",
|
|
kind: "message",
|
|
T: $mk78214(r1)
|
|
}, {
|
|
no: 6,
|
|
name: "body_localized",
|
|
kind: "message",
|
|
T: $mk78215(r1)
|
|
}];
|
|
super("discord_protos.premium_marketing.v1.GiftReminderCoachmark", r2);
|
|
}
|
|
create(a0) {
|
|
const r1 = {
|
|
header: "",
|
|
body: "",
|
|
assetUrl: ""
|
|
};
|
|
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
|
|
enumerable: false,
|
|
value: this
|
|
});
|
|
if (a0 !== void 0) {
|
|
reflectionMergePartial(this, r1, a0);
|
|
}
|
|
return r1;
|
|
}
|
|
internalBinaryRead(a0, a1, a2, a3) {
|
|
const r9 = a3 == null ? this.create() : a3;
|
|
const r12 = a0.pos + a1;
|
|
while (a0.pos < r12) {
|
|
const [r23, r22] = a0.tag();
|
|
if (r23 === 1) {
|
|
r9.header = a0.string();
|
|
} else if (r23 === 2) {
|
|
r9.body = a0.string();
|
|
} else if (r23 === 3) {
|
|
r9.assetUrl = a0.string();
|
|
} else if (r23 === 4) {
|
|
r9.asset = ThemeAwareAsset.internalBinaryRead(a0, a0.uint32(), a2, r9.asset);
|
|
} else if (r23 === 5) {
|
|
r9.headerLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r9.headerLocalized);
|
|
} else if (r23 === 6) {
|
|
r9.bodyLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r9.bodyLocalized);
|
|
} else {
|
|
let readUnknownField = a2.readUnknownField;
|
|
if (readUnknownField === "throw") {
|
|
throw new globalThis.globalThis.Error(`Unknown field ${r23} (wire type ${r22}) for ${this.typeName}`);
|
|
}
|
|
const r38 = a0.skip(r22);
|
|
if (readUnknownField !== false) {
|
|
if (readUnknownField === true) {
|
|
readUnknownField = UnknownFieldHandler.onRead;
|
|
}
|
|
readUnknownField(this.typeName, r9, r23, r22, r38);
|
|
}
|
|
}
|
|
}
|
|
return r9;
|
|
}
|
|
internalBinaryWrite(a0, a1, a2) {
|
|
if (a0.header !== "") {
|
|
a1.tag(1, WireType.LengthDelimited).string(a0.header);
|
|
}
|
|
if (a0.body !== "") {
|
|
a1.tag(2, WireType.LengthDelimited).string(a0.body);
|
|
}
|
|
if (a0.assetUrl !== "") {
|
|
a1.tag(3, WireType.LengthDelimited).string(a0.assetUrl);
|
|
}
|
|
if (a0.asset) {
|
|
ThemeAwareAsset.internalBinaryWrite(a0.asset, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.headerLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.headerLocalized, a1.tag(5, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.bodyLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.bodyLocalized, a1.tag(6, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
let writeUnknownFields = a2.writeUnknownFields;
|
|
if (writeUnknownFields !== false) {
|
|
if (writeUnknownFields == 1) {
|
|
writeUnknownFields = UnknownFieldHandler.onWrite;
|
|
}
|
|
writeUnknownFields(this.typeName, a0, a1);
|
|
}
|
|
return a1;
|
|
}
|
|
}
|
|
c3999_3 = GiftReminderCoachmark$Type;
|
|
const prototypeOf = Object.getPrototypeOf(GiftReminderCoachmark$Type);
|
|
const r33 = [{
|
|
no: 1,
|
|
name: "header",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "body",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "asset_url",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 4,
|
|
name: "asset",
|
|
kind: "message",
|
|
T: $mk78213(r3)
|
|
}, {
|
|
no: 5,
|
|
name: "header_localized",
|
|
kind: "message",
|
|
T: $mk78214(r3)
|
|
}, {
|
|
no: 6,
|
|
name: "body_localized",
|
|
kind: "message",
|
|
T: $mk78215(r3)
|
|
}];
|
|
const r41 = Object.create(GiftReminderCoachmark$Type.prototype);
|
|
const r42 = $callWithNewTarget(prototypeOf, r41, GiftReminderCoachmark$Type, "discord_protos.premium_marketing.v1.GiftReminderCoachmark", r33);
|
|
export const GiftReminderCoachmark = r42 instanceof Object ? r42 : r41;
|