981 lines
27 KiB
JavaScript
981 lines
27 KiB
JavaScript
// Metro module 6267 (f6268).
|
|
import { MessageType, MESSAGE_TYPE, reflectionMergePartial, UnknownFieldHandler, WireType } from "./Module1307";
|
|
import { LocalizedString } from "./Module6268";
|
|
import { HelpArticle } from "./Module6269";
|
|
import { CTAButton } from "./Module6270";
|
|
import { $callWithNewTarget } from "../_hermes/prelude";
|
|
function $mk78152($env) {
|
|
return () => LocalizedString;
|
|
}
|
|
function $mk78153($env) {
|
|
return () => LocalizedString;
|
|
}
|
|
function $mk78154($env) {
|
|
return () => LocalizedString;
|
|
}
|
|
function $mk78155($env) {
|
|
return () => HelpArticle;
|
|
}
|
|
function $mk78156($env) {
|
|
return () => HelpArticle;
|
|
}
|
|
function $mk78157($env) {
|
|
return () => LocalizedString;
|
|
}
|
|
let c3983_7, c3983_3, c3983_8, c3983_4, c3983_9, c3983_5, c3983_10, c3983_6, c3983_11;
|
|
let env3983;
|
|
const r9 = env3983 = {};
|
|
class FeatureCard$Type extends MessageType {
|
|
constructor() {
|
|
const r1 = env3983;
|
|
const r2 = [{
|
|
no: 1,
|
|
name: "header",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "pill",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "body",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 4,
|
|
name: "image_link",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 5,
|
|
name: "image_link_light_theme",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 6,
|
|
name: "header_localized",
|
|
kind: "message",
|
|
T: $mk78152(r1)
|
|
}, {
|
|
no: 7,
|
|
name: "pill_localized",
|
|
kind: "message",
|
|
T: $mk78153(r1)
|
|
}, {
|
|
no: 8,
|
|
name: "body_localized",
|
|
kind: "message",
|
|
T: $mk78154(r1)
|
|
}, {
|
|
no: 9,
|
|
name: "help_article",
|
|
kind: "message",
|
|
T: $mk78155(r1)
|
|
}];
|
|
super("discord_protos.premium_marketing.v1.FeatureCard", r2);
|
|
}
|
|
create(a0) {
|
|
const r1 = {
|
|
header: "",
|
|
pill: "",
|
|
body: "",
|
|
imageLink: "",
|
|
imageLinkLightTheme: ""
|
|
};
|
|
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 r12 = a3 == null ? this.create() : a3;
|
|
const r15 = a0.pos + a1;
|
|
while (a0.pos < r15) {
|
|
const [r26, r25] = a0.tag();
|
|
if (r26 === 1) {
|
|
r12.header = a0.string();
|
|
} else if (r26 === 2) {
|
|
r12.pill = a0.string();
|
|
} else if (r26 === 3) {
|
|
r12.body = a0.string();
|
|
} else if (r26 === 4) {
|
|
r12.imageLink = a0.string();
|
|
} else if (r26 === 5) {
|
|
r12.imageLinkLightTheme = a0.string();
|
|
} else if (r26 === 6) {
|
|
r12.headerLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r12.headerLocalized);
|
|
} else if (r26 === 7) {
|
|
r12.pillLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r12.pillLocalized);
|
|
} else if (r26 === 8) {
|
|
r12.bodyLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r12.bodyLocalized);
|
|
} else if (r26 === 9) {
|
|
r12.helpArticle = HelpArticle.internalBinaryRead(a0, a0.uint32(), a2, r12.helpArticle);
|
|
} else {
|
|
let readUnknownField = a2.readUnknownField;
|
|
if (readUnknownField === "throw") {
|
|
throw new globalThis.globalThis.Error(`Unknown field ${r26} (wire type ${r25}) for ${this.typeName}`);
|
|
}
|
|
const r41 = a0.skip(r25);
|
|
if (readUnknownField !== false) {
|
|
if (readUnknownField === true) {
|
|
readUnknownField = UnknownFieldHandler.onRead;
|
|
}
|
|
readUnknownField(this.typeName, r12, r26, r25, r41);
|
|
}
|
|
}
|
|
}
|
|
return r12;
|
|
}
|
|
internalBinaryWrite(a0, a1, a2) {
|
|
if (a0.header !== "") {
|
|
a1.tag(1, WireType.LengthDelimited).string(a0.header);
|
|
}
|
|
if (a0.pill !== "") {
|
|
a1.tag(2, WireType.LengthDelimited).string(a0.pill);
|
|
}
|
|
if (a0.body !== "") {
|
|
a1.tag(3, WireType.LengthDelimited).string(a0.body);
|
|
}
|
|
if (a0.imageLink !== "") {
|
|
a1.tag(4, WireType.LengthDelimited).string(a0.imageLink);
|
|
}
|
|
if (a0.imageLinkLightTheme !== "") {
|
|
a1.tag(5, WireType.LengthDelimited).string(a0.imageLinkLightTheme);
|
|
}
|
|
if (a0.headerLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.headerLocalized, a1.tag(6, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.pillLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.pillLocalized, a1.tag(7, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.bodyLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.bodyLocalized, a1.tag(8, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.helpArticle) {
|
|
HelpArticle.internalBinaryWrite(a0.helpArticle, a1.tag(9, 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;
|
|
}
|
|
}
|
|
c3983_7 = FeatureCard$Type;
|
|
const prototypeOf2 = Object.getPrototypeOf(FeatureCard$Type);
|
|
const r36 = [{
|
|
no: 1,
|
|
name: "header",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "pill",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "body",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 4,
|
|
name: "image_link",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 5,
|
|
name: "image_link_light_theme",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 6,
|
|
name: "header_localized",
|
|
kind: "message",
|
|
T: $mk78152(r9)
|
|
}, {
|
|
no: 7,
|
|
name: "pill_localized",
|
|
kind: "message",
|
|
T: $mk78153(r9)
|
|
}, {
|
|
no: 8,
|
|
name: "body_localized",
|
|
kind: "message",
|
|
T: $mk78154(r9)
|
|
}, {
|
|
no: 9,
|
|
name: "help_article",
|
|
kind: "message",
|
|
T: $mk78155(r9)
|
|
}];
|
|
const r49 = Object.create(FeatureCard$Type.prototype);
|
|
const r50 = $callWithNewTarget(prototypeOf2, r49, FeatureCard$Type, "discord_protos.premium_marketing.v1.FeatureCard", r36);
|
|
c3983_3 = r50 instanceof Object ? r50 : r49;
|
|
class Variant1Storage$Type extends MessageType {
|
|
constructor() {
|
|
const r2 = [{
|
|
no: 1,
|
|
name: "hero_art_localized_video_links_dark_theme",
|
|
kind: "map",
|
|
K: 9,
|
|
V: {
|
|
kind: "scalar",
|
|
T: 9
|
|
}
|
|
}, {
|
|
no: 2,
|
|
name: "hero_art_localized_video_links_light_theme",
|
|
kind: "map",
|
|
K: 9,
|
|
V: {
|
|
kind: "scalar",
|
|
T: 9
|
|
}
|
|
}, {
|
|
no: 3,
|
|
name: "hero_art_video_subtitle_links",
|
|
kind: "map",
|
|
K: 9,
|
|
V: {
|
|
kind: "scalar",
|
|
T: 9
|
|
}
|
|
}];
|
|
super("discord_protos.premium_marketing.v1.Variant1Storage", r2);
|
|
}
|
|
create(a0) {
|
|
const r1 = {
|
|
heroArtLocalizedVideoLinksDarkTheme: {},
|
|
heroArtLocalizedVideoLinksLightTheme: {},
|
|
heroArtVideoSubtitleLinks: {}
|
|
};
|
|
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 r6 = a3 == null ? this.create() : a3;
|
|
const r9 = a0.pos + a1;
|
|
while (a0.pos < r9) {
|
|
const [r20, r19] = a0.tag();
|
|
if (r20 === 1) {
|
|
this.binaryReadMap1(r6.heroArtLocalizedVideoLinksDarkTheme, a0, a2);
|
|
} else if (r20 === 2) {
|
|
this.binaryReadMap2(r6.heroArtLocalizedVideoLinksLightTheme, a0, a2);
|
|
} else if (r20 === 3) {
|
|
this.binaryReadMap3(r6.heroArtVideoSubtitleLinks, a0, a2);
|
|
} else {
|
|
let readUnknownField = a2.readUnknownField;
|
|
if (readUnknownField === "throw") {
|
|
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r19}) for ${this.typeName}`);
|
|
}
|
|
const r35 = a0.skip(r19);
|
|
if (readUnknownField !== false) {
|
|
if (readUnknownField === true) {
|
|
readUnknownField = UnknownFieldHandler.onRead;
|
|
}
|
|
readUnknownField(this.typeName, r6, r20, r19, r35);
|
|
}
|
|
}
|
|
}
|
|
return r6;
|
|
}
|
|
binaryReadMap1(a0, a1) {
|
|
let r33, pos;
|
|
const r9 = a1.pos + a1.uint32();
|
|
const r3 = a1.pos < r9;
|
|
let r8 = void 0;
|
|
let r7 = void 0;
|
|
let r6 = void 0;
|
|
let r21 = void 0;
|
|
if (r3) {
|
|
do {
|
|
const [r25, ] = a1.tag();
|
|
const r14 = r8;
|
|
let r27 = r7;
|
|
if (r25 === 1) {
|
|
r27 = a1.string();
|
|
r33 = r14;
|
|
} else {
|
|
if (r25 !== 2) {
|
|
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.premium_marketing.v1.Variant1Storage.hero_art_localized_video_links_dark_theme");
|
|
}
|
|
r33 = a1.string();
|
|
}
|
|
pos = a1.pos;
|
|
r8 = r33;
|
|
r7 = r27;
|
|
r6 = r8;
|
|
r21 = r7;
|
|
} while (pos < r9);
|
|
}
|
|
if (r21 == null) {
|
|
r21 = "";
|
|
}
|
|
if (r6 == null) {
|
|
r6 = "";
|
|
}
|
|
a0[r21] = r6;
|
|
}
|
|
binaryReadMap2(a0, a1) {
|
|
let r33, pos;
|
|
const r9 = a1.pos + a1.uint32();
|
|
const r3 = a1.pos < r9;
|
|
let r8 = void 0;
|
|
let r7 = void 0;
|
|
let r6 = void 0;
|
|
let r21 = void 0;
|
|
if (r3) {
|
|
do {
|
|
const [r25, ] = a1.tag();
|
|
const r14 = r8;
|
|
let r27 = r7;
|
|
if (r25 === 1) {
|
|
r27 = a1.string();
|
|
r33 = r14;
|
|
} else {
|
|
if (r25 !== 2) {
|
|
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.premium_marketing.v1.Variant1Storage.hero_art_localized_video_links_light_theme");
|
|
}
|
|
r33 = a1.string();
|
|
}
|
|
pos = a1.pos;
|
|
r8 = r33;
|
|
r7 = r27;
|
|
r6 = r8;
|
|
r21 = r7;
|
|
} while (pos < r9);
|
|
}
|
|
if (r21 == null) {
|
|
r21 = "";
|
|
}
|
|
if (r6 == null) {
|
|
r6 = "";
|
|
}
|
|
a0[r21] = r6;
|
|
}
|
|
binaryReadMap3(a0, a1) {
|
|
let r33, pos;
|
|
const r9 = a1.pos + a1.uint32();
|
|
const r3 = a1.pos < r9;
|
|
let r8 = void 0;
|
|
let r7 = void 0;
|
|
let r6 = void 0;
|
|
let r21 = void 0;
|
|
if (r3) {
|
|
do {
|
|
const [r25, ] = a1.tag();
|
|
const r14 = r8;
|
|
let r27 = r7;
|
|
if (r25 === 1) {
|
|
r27 = a1.string();
|
|
r33 = r14;
|
|
} else {
|
|
if (r25 !== 2) {
|
|
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.premium_marketing.v1.Variant1Storage.hero_art_video_subtitle_links");
|
|
}
|
|
r33 = a1.string();
|
|
}
|
|
pos = a1.pos;
|
|
r8 = r33;
|
|
r7 = r27;
|
|
r6 = r8;
|
|
r21 = r7;
|
|
} while (pos < r9);
|
|
}
|
|
if (r21 == null) {
|
|
r21 = "";
|
|
}
|
|
if (r6 == null) {
|
|
r6 = "";
|
|
}
|
|
a0[r21] = r6;
|
|
}
|
|
internalBinaryWrite(a0, a1, a2) {
|
|
let r27;
|
|
let r7 = Object.keys(a0.heroArtLocalizedVideoLinksDarkTheme)[Symbol.iterator]();
|
|
const next = r7.next;
|
|
while (true) {
|
|
const r12 = r7 === void 0 ? void 0 : (r27 = next.call(r7)).done ? r7 = void 0 : r27.value;
|
|
if (r7 === void 0) {
|
|
for (const item of Object.keys(a0.heroArtLocalizedVideoLinksLightTheme)) {
|
|
a1.tag.call(a1, 2, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item).tag(2, WireType.LengthDelimited).string(a0.heroArtLocalizedVideoLinksLightTheme[item]).join();
|
|
}
|
|
for (const item2 of Object.keys(a0.heroArtVideoSubtitleLinks)) {
|
|
a1.tag.call(a1, 3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item2).tag(2, WireType.LengthDelimited).string(a0.heroArtVideoSubtitleLinks[item2]).join();
|
|
}
|
|
let writeUnknownFields = a2.writeUnknownFields;
|
|
if (writeUnknownFields !== false) {
|
|
if (writeUnknownFields == 1) {
|
|
writeUnknownFields = UnknownFieldHandler.onWrite;
|
|
}
|
|
writeUnknownFields(this.typeName, a0, a1);
|
|
}
|
|
return a1;
|
|
} else {
|
|
try {
|
|
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(r12).tag(2, WireType.LengthDelimited).string(a0.heroArtLocalizedVideoLinksDarkTheme[r12]).join();
|
|
} catch (r62) {
|
|
if (r7 !== void 0 && typeof r7.return === "function") {
|
|
try {
|
|
r7.return();
|
|
} catch {}
|
|
}
|
|
throw r62;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
c3983_8 = Variant1Storage$Type;
|
|
const prototypeOf = Object.getPrototypeOf(Variant1Storage$Type);
|
|
const r69 = [{
|
|
no: 1,
|
|
name: "hero_art_localized_video_links_dark_theme",
|
|
kind: "map",
|
|
K: 9,
|
|
V: {
|
|
kind: "scalar",
|
|
T: 9
|
|
}
|
|
}, {
|
|
no: 2,
|
|
name: "hero_art_localized_video_links_light_theme",
|
|
kind: "map",
|
|
K: 9,
|
|
V: {
|
|
kind: "scalar",
|
|
T: 9
|
|
}
|
|
}, {
|
|
no: 3,
|
|
name: "hero_art_video_subtitle_links",
|
|
kind: "map",
|
|
K: 9,
|
|
V: {
|
|
kind: "scalar",
|
|
T: 9
|
|
}
|
|
}];
|
|
const r74 = Object.create(Variant1Storage$Type.prototype);
|
|
const r78 = $callWithNewTarget(prototypeOf, r74, Variant1Storage$Type, "discord_protos.premium_marketing.v1.Variant1Storage", r69);
|
|
c3983_4 = r78 instanceof Object ? r78 : r74;
|
|
class Subtitle$Type extends MessageType {
|
|
constructor() {
|
|
const r2 = [{
|
|
no: 1,
|
|
name: "link",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "locale",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "is_default",
|
|
kind: "scalar",
|
|
T: 8
|
|
}];
|
|
super("discord_protos.premium_marketing.v1.Subtitle", r2);
|
|
}
|
|
create(a0) {
|
|
const r1 = {
|
|
link: "",
|
|
locale: "",
|
|
isDefault: false
|
|
};
|
|
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 r6 = a3 == null ? this.create() : a3;
|
|
const r9 = a0.pos + a1;
|
|
while (a0.pos < r9) {
|
|
const [r20, r19] = a0.tag();
|
|
if (r20 === 1) {
|
|
r6.link = a0.string();
|
|
} else if (r20 === 2) {
|
|
r6.locale = a0.string();
|
|
} else if (r20 === 3) {
|
|
r6.isDefault = a0.bool();
|
|
} else {
|
|
let readUnknownField = a2.readUnknownField;
|
|
if (readUnknownField === "throw") {
|
|
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r19}) for ${this.typeName}`);
|
|
}
|
|
const r35 = a0.skip(r19);
|
|
if (readUnknownField !== false) {
|
|
if (readUnknownField === true) {
|
|
readUnknownField = UnknownFieldHandler.onRead;
|
|
}
|
|
readUnknownField(this.typeName, r6, r20, r19, r35);
|
|
}
|
|
}
|
|
}
|
|
return r6;
|
|
}
|
|
internalBinaryWrite(a0, a1, a2) {
|
|
if (a0.link !== "") {
|
|
a1.tag(1, WireType.LengthDelimited).string(a0.link);
|
|
}
|
|
if (a0.locale !== "") {
|
|
a1.tag(2, WireType.LengthDelimited).string(a0.locale);
|
|
}
|
|
if (a0.isDefault !== false) {
|
|
a1.tag(3, WireType.Varint).bool(a0.isDefault);
|
|
}
|
|
let writeUnknownFields = a2.writeUnknownFields;
|
|
if (writeUnknownFields !== false) {
|
|
if (writeUnknownFields == 1) {
|
|
writeUnknownFields = UnknownFieldHandler.onWrite;
|
|
}
|
|
writeUnknownFields(this.typeName, a0, a1);
|
|
}
|
|
return a1;
|
|
}
|
|
}
|
|
c3983_9 = Subtitle$Type;
|
|
const prototypeOf3 = Object.getPrototypeOf(Subtitle$Type);
|
|
const r90 = [{
|
|
no: 1,
|
|
name: "link",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "locale",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "is_default",
|
|
kind: "scalar",
|
|
T: 8
|
|
}];
|
|
const r93 = Object.create(Subtitle$Type.prototype);
|
|
const r97 = $callWithNewTarget(prototypeOf3, r93, Subtitle$Type, "discord_protos.premium_marketing.v1.Subtitle", r90);
|
|
c3983_5 = r97 instanceof Object ? r97 : r93;
|
|
class Disclaimer$Type extends MessageType {
|
|
constructor() {
|
|
const r1 = env3983;
|
|
const r2 = [{
|
|
no: 1,
|
|
name: "disclaimer_text",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "disclaimer_help_article",
|
|
kind: "message",
|
|
T: $mk78156(r1)
|
|
}, {
|
|
no: 3,
|
|
name: "disclaimer_text_localized",
|
|
kind: "message",
|
|
T: $mk78157(r1)
|
|
}];
|
|
super("discord_protos.premium_marketing.v1.Disclaimer", r2);
|
|
}
|
|
create(a0) {
|
|
const r1 = {
|
|
disclaimerText: ""
|
|
};
|
|
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 r6 = a3 == null ? this.create() : a3;
|
|
const r9 = a0.pos + a1;
|
|
while (a0.pos < r9) {
|
|
const [r20, r19] = a0.tag();
|
|
if (r20 === 1) {
|
|
r6.disclaimerText = a0.string();
|
|
} else if (r20 === 2) {
|
|
r6.disclaimerHelpArticle = HelpArticle.internalBinaryRead(a0, a0.uint32(), a2, r6.disclaimerHelpArticle);
|
|
} else if (r20 === 3) {
|
|
r6.disclaimerTextLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r6.disclaimerTextLocalized);
|
|
} else {
|
|
let readUnknownField = a2.readUnknownField;
|
|
if (readUnknownField === "throw") {
|
|
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r19}) for ${this.typeName}`);
|
|
}
|
|
const r35 = a0.skip(r19);
|
|
if (readUnknownField !== false) {
|
|
if (readUnknownField === true) {
|
|
readUnknownField = UnknownFieldHandler.onRead;
|
|
}
|
|
readUnknownField(this.typeName, r6, r20, r19, r35);
|
|
}
|
|
}
|
|
}
|
|
return r6;
|
|
}
|
|
internalBinaryWrite(a0, a1, a2) {
|
|
if (a0.disclaimerText !== "") {
|
|
a1.tag(1, WireType.LengthDelimited).string(a0.disclaimerText);
|
|
}
|
|
if (a0.disclaimerHelpArticle) {
|
|
HelpArticle.internalBinaryWrite(a0.disclaimerHelpArticle, a1.tag(2, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.disclaimerTextLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.disclaimerTextLocalized, a1.tag(3, 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;
|
|
}
|
|
}
|
|
c3983_10 = Disclaimer$Type;
|
|
const prototypeOf4 = Object.getPrototypeOf(Disclaimer$Type);
|
|
const r109 = [{
|
|
no: 1,
|
|
name: "disclaimer_text",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "disclaimer_help_article",
|
|
kind: "message",
|
|
T: $mk78156(r9)
|
|
}, {
|
|
no: 3,
|
|
name: "disclaimer_text_localized",
|
|
kind: "message",
|
|
T: $mk78157(r9)
|
|
}];
|
|
const r114 = Object.create(Disclaimer$Type.prototype);
|
|
const r118 = $callWithNewTarget(prototypeOf4, r114, Disclaimer$Type, "discord_protos.premium_marketing.v1.Disclaimer", r109);
|
|
c3983_6 = r118 instanceof Object ? r118 : r114;
|
|
class AnnouncementModalVariant1Properties$Type extends MessageType {
|
|
constructor() {
|
|
const r2 = [{
|
|
no: 1,
|
|
name: "header",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 2,
|
|
name: "subheader",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 3,
|
|
name: "video_link",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 4,
|
|
name: "help_article_id",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 5,
|
|
name: "feature_cards",
|
|
kind: "message",
|
|
repeat: 1,
|
|
T: () => c3983_3
|
|
}, {
|
|
no: 6,
|
|
name: "button",
|
|
kind: "message",
|
|
T: () => CTAButton
|
|
}, {
|
|
no: 8,
|
|
name: "hero_art_video_link_light_theme",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 9,
|
|
name: "hero_art_image_link_dark_theme",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 10,
|
|
name: "hero_art_image_link_light_theme",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 11,
|
|
name: "modal_top_pill",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 13,
|
|
name: "hero_art_video_subtitles",
|
|
kind: "message",
|
|
repeat: 1,
|
|
T: () => c3983_5
|
|
}, {
|
|
no: 14,
|
|
name: "storage",
|
|
kind: "message",
|
|
T: () => c3983_4
|
|
}, {
|
|
no: 15,
|
|
name: "disclaimer",
|
|
kind: "message",
|
|
T: () => c3983_6
|
|
}, {
|
|
no: 18,
|
|
name: "help_article",
|
|
kind: "message",
|
|
T: () => HelpArticle
|
|
}, {
|
|
no: 19,
|
|
name: "header_localized",
|
|
kind: "message",
|
|
T: () => LocalizedString
|
|
}, {
|
|
no: 20,
|
|
name: "subheader_localized",
|
|
kind: "message",
|
|
T: () => LocalizedString
|
|
}, {
|
|
no: 21,
|
|
name: "modal_top_pill_localized",
|
|
kind: "message",
|
|
T: () => LocalizedString
|
|
}, {
|
|
no: 7,
|
|
name: "dismiss_key",
|
|
kind: "scalar",
|
|
T: 9
|
|
}, {
|
|
no: 12,
|
|
name: "body",
|
|
kind: "scalar",
|
|
T: 9
|
|
}];
|
|
super("discord_protos.premium_marketing.v1.AnnouncementModalVariant1Properties", r2);
|
|
}
|
|
create(a0) {
|
|
const r1 = {
|
|
header: "",
|
|
subheader: "",
|
|
videoLink: "",
|
|
helpArticleId: "",
|
|
featureCards: [],
|
|
heroArtVideoLinkLightTheme: "",
|
|
heroArtImageLinkDarkTheme: "",
|
|
heroArtImageLinkLightTheme: "",
|
|
modalTopPill: "",
|
|
heroArtVideoSubtitles: [],
|
|
dismissKey: "",
|
|
body: ""
|
|
};
|
|
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) {
|
|
let r11, r31;
|
|
const r4 = a3 == null ? this.create() : a3;
|
|
const r8 = a0.pos + a1;
|
|
while (a0.pos < r8) {
|
|
L28: {
|
|
L23: {
|
|
[r11, r31] = a0.tag();
|
|
switch (r11) {
|
|
case 1:
|
|
r4.header = a0.string();
|
|
break L28;
|
|
case 2:
|
|
r4.subheader = a0.string();
|
|
break L28;
|
|
case 3:
|
|
r4.videoLink = a0.string();
|
|
break L28;
|
|
case 4:
|
|
r4.helpArticleId = a0.string();
|
|
break L28;
|
|
case 5:
|
|
r4.featureCards.push(c3983_3.internalBinaryRead(a0, a0.uint32(), a2));
|
|
break L28;
|
|
case 6:
|
|
r4.button = CTAButton.internalBinaryRead(a0, a0.uint32(), a2, r4.button);
|
|
break L28;
|
|
case 7:
|
|
r4.dismissKey = a0.string();
|
|
break L28;
|
|
case 8:
|
|
r4.heroArtVideoLinkLightTheme = a0.string();
|
|
break L28;
|
|
case 9:
|
|
r4.heroArtImageLinkDarkTheme = a0.string();
|
|
break L28;
|
|
case 10:
|
|
r4.heroArtImageLinkLightTheme = a0.string();
|
|
break L28;
|
|
case 11:
|
|
r4.modalTopPill = a0.string();
|
|
break L28;
|
|
case 12:
|
|
r4.body = a0.string();
|
|
break L28;
|
|
case 13:
|
|
r4.heroArtVideoSubtitles.push(c3983_5.internalBinaryRead(a0, a0.uint32(), a2));
|
|
break L28;
|
|
case 14:
|
|
r4.storage = c3983_4.internalBinaryRead(a0, a0.uint32(), a2, r4.storage);
|
|
break L28;
|
|
case 15:
|
|
r4.disclaimer = c3983_6.internalBinaryRead(a0, a0.uint32(), a2, r4.disclaimer);
|
|
break L28;
|
|
case 16:
|
|
case 17:
|
|
default:
|
|
break L23;
|
|
case 18:
|
|
r4.helpArticle = HelpArticle.internalBinaryRead(a0, a0.uint32(), a2, r4.helpArticle);
|
|
break L28;
|
|
case 19:
|
|
r4.headerLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r4.headerLocalized);
|
|
break L28;
|
|
case 20:
|
|
r4.subheaderLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r4.subheaderLocalized);
|
|
break L28;
|
|
case 21:
|
|
r4.modalTopPillLocalized = LocalizedString.internalBinaryRead(a0, a0.uint32(), a2, r4.modalTopPillLocalized);
|
|
break L28;
|
|
}
|
|
}
|
|
let readUnknownField = a2.readUnknownField;
|
|
if (readUnknownField === "throw") {
|
|
throw new globalThis.globalThis.Error(`Unknown field ${r11} (wire type ${r31}) for ${this.typeName}`);
|
|
}
|
|
const r144 = a0.skip(r31);
|
|
if (readUnknownField !== false) {
|
|
if (readUnknownField === true) {
|
|
readUnknownField = UnknownFieldHandler.onRead;
|
|
}
|
|
readUnknownField(this.typeName, r4, r11, r31, r144);
|
|
}
|
|
}
|
|
}
|
|
return r4;
|
|
}
|
|
internalBinaryWrite(a0, a1, a2) {
|
|
if (a0.header !== "") {
|
|
a1.tag(1, WireType.LengthDelimited).string(a0.header);
|
|
}
|
|
if (a0.subheader !== "") {
|
|
a1.tag(2, WireType.LengthDelimited).string(a0.subheader);
|
|
}
|
|
if (a0.videoLink !== "") {
|
|
a1.tag(3, WireType.LengthDelimited).string(a0.videoLink);
|
|
}
|
|
if (a0.helpArticleId !== "") {
|
|
a1.tag(4, WireType.LengthDelimited).string(a0.helpArticleId);
|
|
}
|
|
const r6 = 0 < a0.featureCards.length;
|
|
let r0 = 0;
|
|
if (r6) {
|
|
do {
|
|
c3983_3.internalBinaryWrite(a0.featureCards[r0], a1.tag(5, WireType.LengthDelimited).fork(), a2).join();
|
|
r0 = r0 + 1;
|
|
} while (r0 < a0.featureCards.length);
|
|
}
|
|
if (a0.button) {
|
|
CTAButton.internalBinaryWrite(a0.button, a1.tag(6, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.heroArtVideoLinkLightTheme !== "") {
|
|
a1.tag(8, WireType.LengthDelimited).string(a0.heroArtVideoLinkLightTheme);
|
|
}
|
|
if (a0.heroArtImageLinkDarkTheme !== "") {
|
|
a1.tag(9, WireType.LengthDelimited).string(a0.heroArtImageLinkDarkTheme);
|
|
}
|
|
if (a0.heroArtImageLinkLightTheme !== "") {
|
|
a1.tag(10, WireType.LengthDelimited).string(a0.heroArtImageLinkLightTheme);
|
|
}
|
|
if (a0.modalTopPill !== "") {
|
|
a1.tag(11, WireType.LengthDelimited).string(a0.modalTopPill);
|
|
}
|
|
const r163 = 0 < a0.heroArtVideoSubtitles.length;
|
|
let r165 = 0;
|
|
if (r163) {
|
|
do {
|
|
c3983_5.internalBinaryWrite(a0.heroArtVideoSubtitles[r165], a1.tag(13, WireType.LengthDelimited).fork(), a2).join();
|
|
r165 = r165 + 1;
|
|
} while (r165 < a0.heroArtVideoSubtitles.length);
|
|
}
|
|
if (a0.storage) {
|
|
c3983_4.internalBinaryWrite(a0.storage, a1.tag(14, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.disclaimer) {
|
|
c3983_6.internalBinaryWrite(a0.disclaimer, a1.tag(15, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.helpArticle) {
|
|
HelpArticle.internalBinaryWrite(a0.helpArticle, a1.tag(18, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.headerLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.headerLocalized, a1.tag(19, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.subheaderLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.subheaderLocalized, a1.tag(20, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.modalTopPillLocalized) {
|
|
LocalizedString.internalBinaryWrite(a0.modalTopPillLocalized, a1.tag(21, WireType.LengthDelimited).fork(), a2).join();
|
|
}
|
|
if (a0.dismissKey !== "") {
|
|
a1.tag(7, WireType.LengthDelimited).string(a0.dismissKey);
|
|
}
|
|
if (a0.body !== "") {
|
|
a1.tag(12, WireType.LengthDelimited).string(a0.body);
|
|
}
|
|
let writeUnknownFields = a2.writeUnknownFields;
|
|
if (writeUnknownFields !== false) {
|
|
if (writeUnknownFields == 1) {
|
|
writeUnknownFields = UnknownFieldHandler.onWrite;
|
|
}
|
|
writeUnknownFields(this.typeName, a0, a1);
|
|
}
|
|
return a1;
|
|
}
|
|
}
|
|
c3983_11 = AnnouncementModalVariant1Properties$Type;
|
|
const r130 = new AnnouncementModalVariant1Properties$Type();
|
|
export { c3983_3 as FeatureCard };
|
|
export { c3983_4 as Variant1Storage };
|
|
export { c3983_5 as Subtitle };
|
|
export { c3983_6 as Disclaimer };
|
|
export { r130 as AnnouncementModalVariant1Properties };
|