397 lines
15 KiB
TypeScript
397 lines
15 KiB
TypeScript
// Module ID: 11048
|
|
// Function ID: 11049
|
|
// Name: PaypalVanityTag
|
|
// Dependencies: [19, 17, 5125, 21, 4303, 712, 1236, 11049, 11050, 12, 1879, 4299, 1297, 5124, 2]
|
|
// Exports: generateBlueskyMetadataItems, generateEbayMetadataItems, generatePaypalMetadataItems, generateRedditMetadataItems, generateRoleConnectionMetadataItems, generateSteamMetadataItems, generateTikTokMetadataItems, generateTwitterMetadataItems
|
|
|
|
// Module 11048 (PaypalVanityTag)
|
|
import "noop";
|
|
import { View } from "get ActivityIndicator";
|
|
import OperatorTypes from "OperatorTypes";
|
|
import jsxProd from "jsxProd";
|
|
import createCacheKey from "createCacheKey";
|
|
|
|
let c4;
|
|
let c5;
|
|
let closure_6;
|
|
let error;
|
|
const require = arg1;
|
|
function PaypalVanityTag(style) {
|
|
const tmp = createCacheKey();
|
|
const obj = { style: items, label: null, textStyle: null };
|
|
items = [tmp.paypalVerifiedTag, style.style];
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj[1] = intl.string(require(1236) /* getSystemLocale */.t.IhXLyx);
|
|
obj[2] = tmp.paypalVerifiedTagText;
|
|
return callback(VanityTag, obj, constants.PAYPAL_VERIFIED);
|
|
}
|
|
function VanityMetric(label) {
|
|
let count;
|
|
let percent;
|
|
let style;
|
|
label = label.label;
|
|
({ count, style, percent } = label);
|
|
let obj = require(1879) /* shortenAndLocalizeNumber */;
|
|
let str = "";
|
|
const result = obj.shortenAndLocalizeNumber(count);
|
|
if (percent) {
|
|
str = "%";
|
|
}
|
|
const sum = result + str;
|
|
if (typeof label === "string") {
|
|
const intl = tmp2(1236).intl;
|
|
obj = { name: null, value: null };
|
|
obj[0] = label;
|
|
obj[1] = sum;
|
|
let children = intl.format(tmp2(1236).t.HLoinF, obj);
|
|
} else {
|
|
const intl2 = tmp2(1236).intl;
|
|
obj = { value: null };
|
|
obj[0] = sum;
|
|
children = intl2.format(label, obj);
|
|
}
|
|
style = [createCacheKey().connectedAccountVanityMetadata, ];
|
|
style[1] = style;
|
|
return callback(require(4299) /* Text */.Text, { variant: "text-xs/normal", color: "text-muted", style, children });
|
|
}
|
|
function VanityItem(style) {
|
|
let imageAlt;
|
|
let imageSrc;
|
|
let label;
|
|
style = style.style;
|
|
({ label, imageSrc, imageAlt } = style);
|
|
const tmp = createCacheKey();
|
|
let obj = { style: items, children: null };
|
|
items = [, , ];
|
|
({ connectedAccountVanityMetadata: arr[0], connectedAccountVanityMetadataItem: arr[1] } = tmp);
|
|
items[2] = style;
|
|
obj = { source: imageSrc, accessibilityLabel: imageAlt, style: tmp.connectedAccountVanityMetadataItemIcon, disableColor: true };
|
|
const items1 = [callback(require(1297) /* Button */.Icon, obj), callback(require(4299) /* Text */.Text, { variant: "text-xs/normal", color: "text-muted", style, children: label })];
|
|
obj[1] = items1;
|
|
return callback2(View, obj);
|
|
}
|
|
function VanityTag(arg0) {
|
|
let label;
|
|
let style;
|
|
let textStyle;
|
|
({ label, style, textStyle } = arg0);
|
|
const tmp = createCacheKey();
|
|
const items = [, , ];
|
|
({ connectedAccountVanityMetadata: arr[0], connectedAccountVanityMetadataTag: arr[1] } = tmp);
|
|
items[2] = style;
|
|
return callback(View, { style: items, children: callback(require(4299) /* Text */.Text, { variant: "text-xs/normal", color: "text-muted", style: textStyle, children: label }) });
|
|
}
|
|
function VanityDate(arg0) {
|
|
let date;
|
|
let label;
|
|
let locale;
|
|
let style;
|
|
({ date, label, locale, style } = arg0);
|
|
let obj = { variant: "text-xs/normal", color: "text-muted", style: items, children: null };
|
|
items = [createCacheKey().connectedAccountVanityMetadata, style];
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj = { value: null, name: null };
|
|
const tmp = createCacheKey();
|
|
obj[0] = require(5124) /* officialApplicationIds */.getCreatedAtDate(date, locale);
|
|
obj[1] = label;
|
|
obj[3] = intl.format(require(1236) /* getSystemLocale */.t.HLoinF, obj);
|
|
return callback(require(4299) /* Text */.Text, obj);
|
|
}
|
|
({ MetadataFields: c4, MetadataItemTypes: c5 } = OperatorTypes);
|
|
({ jsx: closure_6, jsxs: error } = jsxProd);
|
|
createCacheKey = { connectedAccountVanityMetadata: { marginTop: 4, paddingRight: 8 }, connectedAccountVanityMetadataItem: { flexDirection: "row", alignItems: "center" }, connectedAccountVanityMetadataItemIcon: { height: 18, width: 18, marginRight: 8 }, connectedAccountVanityMetadataTag: null, paypalVerifiedTag: null, paypalVerifiedTagText: null };
|
|
createCacheKey = { backgroundColor: require("Themes").colors.BORDER_SUBTLE, borderRadius: require("Themes").radii.md, paddingHorizontal: 8, paddingVertical: 1, marginRight: 8 };
|
|
createCacheKey[3] = createCacheKey;
|
|
createCacheKey[4] = { backgroundColor: require("Themes").colors.STATUS_POSITIVE_BACKGROUND };
|
|
let obj1 = { backgroundColor: require("Themes").colors.STATUS_POSITIVE_BACKGROUND };
|
|
createCacheKey[5] = { color: require("Themes").colors.WHITE };
|
|
createCacheKey = createCacheKey.createStyles(createCacheKey);
|
|
let obj2 = { color: require("Themes").colors.WHITE };
|
|
let result = require("OperatorTypes").fileFinishedImporting("modules/connections/native/ConnectionMetadataVanityItems.tsx");
|
|
|
|
export const generateRedditMetadataItems = function generateRedditMetadataItems(metadata, metadataItem) {
|
|
let num = metadata[constants.REDDIT_TOTAL_KARMA];
|
|
if (num == null) {
|
|
num = -1;
|
|
}
|
|
const items = [];
|
|
const NumberResult = Number(num);
|
|
if (NumberResult > -1) {
|
|
let obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.SbCNox;
|
|
items.push(callback(VanityMetric, obj, tmp2.REDDIT_TOTAL_KARMA));
|
|
}
|
|
if ("1" === metadata[constants.REDDIT_GOLD]) {
|
|
obj = { style: null, label: null };
|
|
obj[0] = tmp;
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj[1] = intl.string(require(1236) /* getSystemLocale */.t["06rDHU"]);
|
|
items.push(callback(VanityTag, obj, tmp2.REDDIT_GOLD));
|
|
}
|
|
if ("1" === metadata[constants.REDDIT_MOD]) {
|
|
obj = { style: null, label: null };
|
|
obj[0] = tmp;
|
|
const intl2 = require(1236) /* getSystemLocale */.intl;
|
|
obj[1] = intl2.string(require(1236) /* getSystemLocale */.t.oWM95M);
|
|
items.push(callback(VanityTag, obj, tmp2.REDDIT_MOD));
|
|
}
|
|
return items;
|
|
};
|
|
export const generateTwitterMetadataItems = function generateTwitterMetadataItems(metadata, metadataItem) {
|
|
let num = metadata[constants.TWITTER_STATUSES_COUNT];
|
|
if (num == null) {
|
|
num = -1;
|
|
}
|
|
const NumberResult = Number(num);
|
|
let num2 = metadata[tmp2.TWITTER_FOLLOWERS_COUNT];
|
|
if (num2 == null) {
|
|
num2 = -1;
|
|
}
|
|
const items = [];
|
|
const NumberResult1 = Number(num2);
|
|
if (NumberResult > -1) {
|
|
let obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.llwqqe;
|
|
items.push(callback(VanityMetric, obj, tmp2.TWITTER_STATUSES_COUNT));
|
|
}
|
|
if (NumberResult1 > -1) {
|
|
obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult1;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.LMNOUQ;
|
|
items.push(callback(VanityMetric, obj, tmp2.TWITTER_FOLLOWERS_COUNT));
|
|
}
|
|
return items;
|
|
};
|
|
export const generateBlueskyMetadataItems = function generateBlueskyMetadataItems(arg0) {
|
|
let num = arg0[constants.BLUESKY_STATUSES_COUNT];
|
|
if (num == null) {
|
|
num = -1;
|
|
}
|
|
const NumberResult = Number(num);
|
|
let num2 = arg0[tmp2.BLUESKY_FOLLOWERS_COUNT];
|
|
if (num2 == null) {
|
|
num2 = -1;
|
|
}
|
|
const items = [];
|
|
const NumberResult1 = Number(num2);
|
|
if (NumberResult > -1) {
|
|
let obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.thA2ir;
|
|
items.push(callback(VanityMetric, obj, tmp2.BLUESKY_STATUSES_COUNT));
|
|
}
|
|
if (NumberResult1 > -1) {
|
|
obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult1;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.RQath2;
|
|
items.push(callback(VanityMetric, obj, tmp2.BLUESKY_FOLLOWERS_COUNT));
|
|
}
|
|
return items;
|
|
};
|
|
export const generateSteamMetadataItems = function generateSteamMetadataItems(metadata, metadataItem) {
|
|
let num = metadata[constants.STEAM_GAME_COUNT];
|
|
if (num == null) {
|
|
num = -1;
|
|
}
|
|
const NumberResult = Number(num);
|
|
let num2 = metadata[tmp2.STEAM_ITEM_COUNT_DOTA2];
|
|
if (num2 == null) {
|
|
num2 = -1;
|
|
}
|
|
const NumberResult1 = Number(num2);
|
|
let num3 = metadata[tmp2.STEAM_ITEM_COUNT_TF2];
|
|
if (num3 == null) {
|
|
num3 = -1;
|
|
}
|
|
const items = [];
|
|
const NumberResult2 = Number(num3);
|
|
if (NumberResult > -1) {
|
|
let obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult;
|
|
obj[2] = require(1236) /* getSystemLocale */.t["ppXMu/"];
|
|
items.push(callback(VanityMetric, obj, tmp2.STEAM_GAME_COUNT));
|
|
}
|
|
if (NumberResult1 > -1) {
|
|
obj = { style: null, label: null, imageSrc: null, imageAlt: null };
|
|
obj[0] = tmp;
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj = { count: null };
|
|
obj[0] = NumberResult1;
|
|
obj[1] = intl.format(require(1236) /* getSystemLocale */.t.Y88M5x, obj);
|
|
obj[2] = importDefault(11049);
|
|
const intl2 = require(1236) /* getSystemLocale */.intl;
|
|
obj[3] = intl2.string(require(1236) /* getSystemLocale */.t.HKUEZo);
|
|
items.push(callback(VanityItem, obj, tmp2.STEAM_ITEM_COUNT_DOTA2));
|
|
}
|
|
if (NumberResult2 > -1) {
|
|
const obj1 = { style: null, label: null, imageSrc: null, imageAlt: null };
|
|
obj1[0] = tmp;
|
|
const intl3 = require(1236) /* getSystemLocale */.intl;
|
|
const obj2 = { count: null };
|
|
obj2[0] = NumberResult2;
|
|
obj1[1] = intl3.format(require(1236) /* getSystemLocale */.t.Y88M5x, obj2);
|
|
obj1[2] = importDefault(11050);
|
|
const intl4 = require(1236) /* getSystemLocale */.intl;
|
|
obj1[3] = intl4.string(require(1236) /* getSystemLocale */.t.C8p1Sh);
|
|
items.push(callback(VanityItem, obj1, tmp2.STEAM_ITEM_COUNT_TF2));
|
|
}
|
|
return items;
|
|
};
|
|
export const generatePaypalMetadataItems = function generatePaypalMetadataItems(metadata, metadataItem) {
|
|
const items = [];
|
|
if ("1" === metadata[constants.PAYPAL_VERIFIED]) {
|
|
const obj = { style: null };
|
|
obj[0] = metadataItem;
|
|
items.push(callback(PaypalVanityTag, obj));
|
|
}
|
|
return items;
|
|
};
|
|
export const generateEbayMetadataItems = function generateEbayMetadataItems(metadata, metadataItem) {
|
|
let num = metadata[constants.EBAY_POSITIVE_FEEDBACK_PERCENTAGE];
|
|
if (num == null) {
|
|
num = -1;
|
|
}
|
|
const items = [];
|
|
const NumberResult = Number(num);
|
|
if (NumberResult > 0) {
|
|
let obj = { style: null, count: null, label: null, percent: true };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.YmL22d;
|
|
items.push(callback(VanityMetric, obj, tmp2.EBAY_POSITIVE_FEEDBACK_PERCENTAGE));
|
|
}
|
|
if ("1" === metadata[constants.EBAY_TOP_RATED_SELLER]) {
|
|
obj = { style: null, label: null };
|
|
obj[0] = tmp;
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj[1] = intl.string(require(1236) /* getSystemLocale */.t.TEEYwa);
|
|
items.push(callback(VanityTag, obj, tmp2.EBAY_TOP_RATED_SELLER));
|
|
}
|
|
return items;
|
|
};
|
|
export const generateTikTokMetadataItems = function generateTikTokMetadataItems(metadata, metadataItem) {
|
|
let num = metadata[constants.TIKTOK_FOLLOWER_COUNT];
|
|
if (num == null) {
|
|
num = -1;
|
|
}
|
|
const NumberResult = Number(num);
|
|
let num2 = metadata[tmp2.TIKTOK_FOLLOWING_COUNT];
|
|
if (num2 == null) {
|
|
num2 = -1;
|
|
}
|
|
const NumberResult1 = Number(num2);
|
|
let num3 = metadata[tmp2.TIKTOK_LIKES_COUNT];
|
|
if (num3 == null) {
|
|
num3 = -1;
|
|
}
|
|
const items = [];
|
|
const NumberResult2 = Number(num3);
|
|
if (NumberResult > -1) {
|
|
let obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult;
|
|
obj[2] = require(1236) /* getSystemLocale */.t["Mpm/Bc"];
|
|
items.push(callback(VanityMetric, obj, tmp2.TIKTOK_FOLLOWER_COUNT));
|
|
}
|
|
if (NumberResult1 > -1) {
|
|
obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult1;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.ftf12v;
|
|
items.push(callback(VanityMetric, obj, tmp2.TIKTOK_FOLLOWING_COUNT));
|
|
}
|
|
if (NumberResult2 > -1) {
|
|
obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = NumberResult2;
|
|
obj[2] = require(1236) /* getSystemLocale */.t.Qwhe5j;
|
|
items.push(callback(VanityMetric, obj, tmp2.TIKTOK_LIKES_COUNT));
|
|
}
|
|
if ("1" === metadata[constants.TIKTOK_VERIFIED]) {
|
|
const obj1 = { style: null, label: null };
|
|
obj1[0] = tmp;
|
|
const intl = require(1236) /* getSystemLocale */.intl;
|
|
obj1[1] = intl.string(require(1236) /* getSystemLocale */.t.QHHwRR);
|
|
items.push(callback(VanityTag, obj1, tmp2.TIKTOK_VERIFIED));
|
|
}
|
|
return items;
|
|
};
|
|
export const generateRoleConnectionMetadataItems = function generateRoleConnectionMetadataItems(applicationRoleConnection) {
|
|
let closure_0 = applicationRoleConnection;
|
|
const items = [];
|
|
const keys = Object.keys(applicationRoleConnection.metadata);
|
|
if (null != applicationRoleConnection.application_metadata) {
|
|
const _Object = Object;
|
|
if (0 !== Object.keys(applicationRoleConnection.application_metadata).length) {
|
|
if (0 !== keys.length) {
|
|
const sortByResult = importDefault(12).sortBy(keys, (arg0) => {
|
|
const application_metadata = applicationRoleConnection.application_metadata;
|
|
let name;
|
|
if (application_metadata != null) {
|
|
if (application_metadata[arg0] != null) {
|
|
name = tmp3.name;
|
|
}
|
|
}
|
|
return name;
|
|
});
|
|
const iter = sortByResult[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
if (iter === undefined) {
|
|
return items;
|
|
} else if (null != applicationRoleConnection.application_metadata[nextResult]) {
|
|
try {
|
|
const type = tmp8.type;
|
|
if (constants2.BOOLEAN_EQUAL !== type) {
|
|
if (tmp10.BOOLEAN_NOT_EQUAL !== type) {
|
|
if (tmp10.DATETIME_GREATER_THAN_EQUAL !== type) {
|
|
if (tmp10.DATETIME_LESS_THAN_EQUAL !== type) {
|
|
let obj = { style: null, count: null, label: null };
|
|
obj[0] = tmp;
|
|
const _Number = Number;
|
|
obj[1] = Number(tmp36);
|
|
obj[2] = tmp8.name;
|
|
items.push(callback(VanityMetric, obj, tmp8.key));
|
|
}
|
|
}
|
|
obj = { style: null, date: null, locale: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp36;
|
|
obj[2] = arg2;
|
|
obj[3] = tmp8.name;
|
|
items.push(callback(VanityDate, obj, tmp8.key));
|
|
}
|
|
}
|
|
let tmp22 = tmp8.type === tmp10.BOOLEAN_EQUAL;
|
|
if (tmp22) {
|
|
tmp22 = "1" === tmp36;
|
|
}
|
|
if (!tmp22) {
|
|
let tmp25 = tmp8.type === tmp10.BOOLEAN_NOT_EQUAL;
|
|
if (tmp25) {
|
|
tmp25 = "1" !== tmp36;
|
|
}
|
|
tmp22 = tmp25;
|
|
}
|
|
if (tmp22) {
|
|
obj = { style: null, label: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp8.name;
|
|
items.push(callback(VanityTag, obj, tmp8.key));
|
|
}
|
|
} catch (err) {
|
|
}
|
|
}
|
|
const obj4 = importDefault(12);
|
|
}
|
|
}
|
|
}
|
|
return items;
|
|
};
|