Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
284 lines
14 KiB
TypeScript
284 lines
14 KiB
TypeScript
// Module ID: 11763
|
|
// Function ID: 11764
|
|
// Name: FeedbackUtils
|
|
// Dependencies: [11760, 1074, 12, 1241, 1936, 1115, 2659, 2]
|
|
// Exports: getAudioFeedbackOptions, getConnectionFeedbackOptions, getPeopleFeedbackOptions, getStreamFeedbackOptions, getVideoBackgroundFeedbackOptions, getVideoFeedbackOptions, processOptOut, shuffleProblems
|
|
|
|
// Module 11763 (FeedbackUtils)
|
|
import _modDef12 from "module_12" /* 12 */;
|
|
import Constants2 from "Constants" /* 1074 */;
|
|
import util from "util" /* 1115 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
|
|
import _modDef2659 from "module_2659" /* 2659 */;
|
|
import Constants from "Constants" /* 11760 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
({ ConnectionFeedbackOption: c3, AudioFeedbackOption: closure_4, VideoFeedbackOption: hasOwnProperty, VideoBackgroundFeedbackOption: metroRequire, StreamFeedbackOption: closure_7, FeedbackOptionVariant: closure_8, FeedbackType: closure_9, MAX_REPRESENTABLE_DATE: c10, PeopleFeedbackOption: closure_11 } = Constants);
|
|
const AnalyticEvents = Constants2.AnalyticEvents;
|
|
const result = size.fileFinishedImporting("modules/feedback/FeedbackUtils.tsx");
|
|
|
|
export const shuffleProblems = function shuffleProblems(reasons, otherKey) {
|
|
closure_0 = otherKey;
|
|
const shuffleResult = _modDef12.shuffle(reasons);
|
|
const findIndexResult = shuffleResult.findIndex((value) => value.value === closure_0);
|
|
if (findIndexResult > -1) {
|
|
shuffleResult.splice(findIndexResult, 1);
|
|
shuffleResult.push(shuffleResult[findIndexResult]);
|
|
}
|
|
return shuffleResult;
|
|
};
|
|
export const processOptOut = function processOptOut(feedbackType) {
|
|
feedbackType = feedbackType.feedbackType;
|
|
AnalyticsUtilsDefault.track(AnalyticEvents.USER_SETTINGS_IN_APP_FEEDBACK_OPTED_OUT, { feedback_type: closure_9[feedbackType], opted_out_until });
|
|
const InAppFeedbackStates = feedbackType(1936).InAppFeedbackStates;
|
|
InAppFeedbackStates.updateSetting((arg0) => {
|
|
const obj = {};
|
|
const merged = Object.assign(arg0);
|
|
const obj2 = {};
|
|
const merged1 = Object.assign(arg0[feedbackType]);
|
|
obj2.optOutExpiryTime = optOutExpiryTime;
|
|
obj[feedbackType] = obj2;
|
|
return obj;
|
|
});
|
|
};
|
|
export const getConnectionFeedbackOptions = function getConnectionFeedbackOptions() {
|
|
const obj = { variant: constants6.SELF, value: constants.COULD_NOT_CONNECT, label: null };
|
|
const intl = util.intl;
|
|
obj.label = intl.string(_modDef2659.gMHKDJ);
|
|
const items = [obj, , , , , ];
|
|
const obj2 = { value: constants.HIGH_TTC, variant: constants6.SELF, label: null };
|
|
const intl2 = util.intl;
|
|
obj2.label = intl2.string(_modDef2659.y06Ayn);
|
|
items[1] = obj2;
|
|
const obj3 = { value: constants.HIGH_LATENCY, variant: constants6.SELF, label: null };
|
|
const intl3 = util.intl;
|
|
obj3.label = intl3.string(_modDef2659.y5k8Jq);
|
|
items[2] = obj3;
|
|
const obj4 = { value: constants.ROBOT_VOICE, variant: constants6.SOMEONE, label: null };
|
|
const intl4 = util.intl;
|
|
obj4.label = intl4.string(_modDef2659.f2914v);
|
|
items[3] = obj4;
|
|
const obj5 = { value: constants.DESYNC, variant: constants6.UNSPECIFIED, label: null };
|
|
const intl5 = util.intl;
|
|
obj5.label = intl5.string(_modDef2659["zk+QL1"]);
|
|
items[4] = obj5;
|
|
const obj6 = { value: constants.CUTTING, variant: constants6.SOMEONE, label: null };
|
|
const intl6 = util.intl;
|
|
obj6.label = intl6.string(_modDef2659.K5vYQA);
|
|
items[5] = obj6;
|
|
const found = items.filter((disabled) => !disabled.disabled);
|
|
return found.map((item) => Object.assign(item, Object.assign({ disabled: 0 })));
|
|
};
|
|
export const getAudioFeedbackOptions = function getAudioFeedbackOptions(isMobile) {
|
|
const obj = { value: constants2.NO_AUDIO, variant: constants6.SELF, label: null };
|
|
const intl = util.intl;
|
|
obj.label = intl.string(_modDef2659["GWypH+"]);
|
|
const items = [obj, , , , , , , , , , , , ];
|
|
const obj2 = { value: constants2.NO_AUDIO, variant: constants6.OTHERS, label: null };
|
|
const intl2 = util.intl;
|
|
obj2.label = intl2.string(_modDef2659.ftSvQ0);
|
|
items[1] = obj2;
|
|
const obj3 = { value: constants2.LOW_QUALITY_AUDIO, variant: constants6.OTHERS, label: null };
|
|
const intl3 = util.intl;
|
|
obj3.label = intl3.string(_modDef2659["1DnNRO"]);
|
|
items[2] = obj3;
|
|
const obj4 = { value: constants2.ROBOT_VOICE, variant: constants6.SOMEONE, label: null };
|
|
const intl4 = util.intl;
|
|
obj4.label = intl4.string(_modDef2659.yGe0BL);
|
|
items[3] = obj4;
|
|
const obj5 = { value: constants2.ECHO, variant: constants6.OTHERS, label: null };
|
|
const intl5 = util.intl;
|
|
obj5.label = intl5.string(_modDef2659.Q5Dsaz);
|
|
items[4] = obj5;
|
|
const obj6 = { value: constants2.TOO_QUIET_OR_LOUD, variant: constants6.SOMEONE, label: null };
|
|
const intl6 = util.intl;
|
|
obj6.label = intl6.string(_modDef2659["1o77I3"]);
|
|
items[5] = obj6;
|
|
const obj7 = { value: constants2.CUTTING, variant: constants6.SOMEONE, label: null };
|
|
const intl7 = util.intl;
|
|
obj7.label = intl7.string(_modDef2659.RK9DUi);
|
|
items[6] = obj7;
|
|
const obj8 = { value: constants2.DELAYED, variant: constants6.UNSPECIFIED, label: null };
|
|
const intl8 = util.intl;
|
|
obj8.label = intl8.string(_modDef2659.RGRgmM);
|
|
items[7] = obj8;
|
|
const obj9 = { value: constants2.BACKGROUND_NOISE, variant: constants6.SOMEONE, label: null };
|
|
const intl9 = util.intl;
|
|
obj9.label = intl9.string(_modDef2659["anHk1/"]);
|
|
items[8] = obj9;
|
|
const obj10 = { value: constants2.UNABLE_TO_FIND_DEVICE, variant: constants6.SELF, label: null };
|
|
const intl10 = util.intl;
|
|
obj10.label = intl10.string(_modDef2659["05VSjm"]);
|
|
items[9] = obj10;
|
|
const obj11 = { value: constants2.COMPLAINTS, variant: constants6.OTHERS, label: null };
|
|
const intl11 = util.intl;
|
|
obj11.label = intl11.string(_modDef2659.kbbtwi);
|
|
items[10] = obj11;
|
|
const obj12 = { value: constants2.TROUBLE_WITH_SPEAKERPHONE, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl12 = util.intl;
|
|
obj12.label = intl12.string(_modDef2659["4qlGrO"]);
|
|
obj12.disabled = !isMobile.isMobile;
|
|
items[11] = obj12;
|
|
const obj13 = { value: constants2.NO_GAME_AUDIO, variant: constants6.SELF, label: null };
|
|
const intl13 = util.intl;
|
|
obj13.label = intl13.string(_modDef2659["2IG95D"]);
|
|
items[12] = obj13;
|
|
const found = items.filter((disabled) => !disabled.disabled);
|
|
return found.map((item) => Object.assign(item, Object.assign({ disabled: 0 })));
|
|
};
|
|
export const getVideoFeedbackOptions = function getVideoFeedbackOptions() {
|
|
const obj = { value: constants3.NO_VIDEO, variant: constants6.SELF, label: null };
|
|
const intl = util.intl;
|
|
obj.label = intl.string(_modDef2659["Bh+02d"]);
|
|
const items = [obj, , , , , ];
|
|
const obj2 = { value: constants3.NO_VIDEO, variant: constants6.SOMEONE, label: null };
|
|
const intl2 = util.intl;
|
|
obj2.label = intl2.string(_modDef2659["R+wqwU"]);
|
|
items[1] = obj2;
|
|
const obj3 = { value: constants3.FREEZING_OR_HITCHING, variant: constants6.SOMEONE, label: null };
|
|
const intl3 = util.intl;
|
|
obj3.label = intl3.string(_modDef2659["8I/GUL"]);
|
|
items[2] = obj3;
|
|
const obj4 = { value: constants3.BLURRY_OR_PIXELATED, variant: constants6.SOMEONE, label: null };
|
|
const intl4 = util.intl;
|
|
obj4.label = intl4.string(_modDef2659.k7Idoz);
|
|
items[3] = obj4;
|
|
const obj5 = { value: constants3.UNABLE_TO_ENABLE_DEVICE, variant: constants6.SELF, label: null };
|
|
const intl5 = util.intl;
|
|
obj5.label = intl5.string(_modDef2659.QbC6La);
|
|
items[4] = obj5;
|
|
const obj6 = { value: constants3.DESYNC, variant: constants6.UNSPECIFIED, label: null };
|
|
const intl6 = util.intl;
|
|
obj6.label = intl6.string(_modDef2659.vRDE5O);
|
|
items[5] = obj6;
|
|
const found = items.filter((disabled) => !disabled.disabled);
|
|
return found.map((item) => Object.assign(item, Object.assign({ disabled: 0 })));
|
|
};
|
|
export const getVideoBackgroundFeedbackOptions = function getVideoBackgroundFeedbackOptions() {
|
|
const obj = { value: constants4.OUTLINE_FUZZY_OR_HALO, variant: constants6.SELF, label: null };
|
|
const intl = util.intl;
|
|
obj.label = intl.string(_modDef2659.calUNv);
|
|
const items = [obj, , , ];
|
|
const obj2 = { value: constants4.INACCURATE_BACKGROUND_DETECTION, variant: constants6.SELF, label: null };
|
|
const intl2 = util.intl;
|
|
obj2.label = intl2.string(_modDef2659.zYumoj);
|
|
items[1] = obj2;
|
|
const obj3 = { value: constants4.FLICKERING_ARTIFACTS, variant: constants6.SELF, label: null };
|
|
const intl3 = util.intl;
|
|
obj3.label = intl3.string(_modDef2659.ie5nCG);
|
|
items[2] = obj3;
|
|
const obj4 = { value: constants4.LAG_ON_MOVEMENT, variant: constants6.SELF, label: null };
|
|
const intl4 = util.intl;
|
|
obj4.label = intl4.string(_modDef2659["Gg/Y1X"]);
|
|
items[3] = obj4;
|
|
const found = items.filter((disabled) => !disabled.disabled);
|
|
return found.map((item) => Object.assign(item, Object.assign({ disabled: 0 })));
|
|
};
|
|
export const getStreamFeedbackOptions = function getStreamFeedbackOptions(isStreamer) {
|
|
isStreamer = isStreamer.isStreamer;
|
|
const obj = { value: constants5.COULD_NOT_LOAD, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl = util.intl;
|
|
obj.label = intl.string(_modDef2659["w+kiDF"]);
|
|
obj.disabled = !isStreamer;
|
|
const items = [obj, , , , , , , , , , , , , , , , , , ];
|
|
const obj2 = { value: constants5.BLACK_SCREEN, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl2 = util.intl;
|
|
obj2.label = intl2.string(_modDef2659.RRZZZb);
|
|
obj2.disabled = !isStreamer;
|
|
items[1] = obj2;
|
|
const obj3 = { value: constants5.FREEZING_OR_HITCHING, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl3 = util.intl;
|
|
obj3.label = intl3.string(_modDef2659["3PKSkd"]);
|
|
obj3.disabled = !isStreamer;
|
|
items[2] = obj3;
|
|
const obj4 = { value: constants5.LAG, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl4 = util.intl;
|
|
obj4.label = intl4.string(_modDef2659.iMxexK);
|
|
obj4.disabled = !isStreamer;
|
|
items[3] = obj4;
|
|
const obj5 = { value: constants5.BLURRY_OR_PIXELATED, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl5 = util.intl;
|
|
obj5.label = intl5.string(_modDef2659["8ceyQy"]);
|
|
obj5.disabled = !isStreamer;
|
|
items[4] = obj5;
|
|
const obj6 = { value: constants5.NO_AUDIO, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl6 = util.intl;
|
|
obj6.label = intl6.string(_modDef2659.HaZSC3);
|
|
obj6.disabled = !isStreamer;
|
|
items[5] = obj6;
|
|
const obj7 = { value: constants5.BAD_AUDIO, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl7 = util.intl;
|
|
obj7.label = intl7.string(_modDef2659["zIC+8Y"]);
|
|
obj7.disabled = !isStreamer;
|
|
items[6] = obj7;
|
|
const obj8 = { value: constants5.STOPPED_UNEXPECTEDLY, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl8 = util.intl;
|
|
obj8.label = intl8.string(_modDef2659["/nlKuG"]);
|
|
obj8.disabled = !isStreamer;
|
|
items[7] = obj8;
|
|
const obj9 = { value: constants5.DESYNC, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl9 = util.intl;
|
|
obj9.label = intl9.string(_modDef2659.JS6akP);
|
|
obj9.disabled = !isStreamer;
|
|
items[8] = obj9;
|
|
const obj10 = { value: constants5.NO_GAME_AUDIO, variant: constants6.SELF, label: null, disabled: null };
|
|
const intl10 = util.intl;
|
|
obj10.label = intl10.string(_modDef2659.TaIrh5);
|
|
obj10.disabled = !isStreamer;
|
|
items[9] = obj10;
|
|
const obj11 = { value: constants5.COULD_NOT_LOAD, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl11 = util.intl;
|
|
obj11.label = intl11.string(_modDef2659.jU9Zs8);
|
|
obj11.disabled = isStreamer;
|
|
items[10] = obj11;
|
|
const obj12 = { value: constants5.BLACK_SCREEN, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl12 = util.intl;
|
|
obj12.label = intl12.string(_modDef2659.aml28x);
|
|
obj12.disabled = isStreamer;
|
|
items[11] = obj12;
|
|
const obj13 = { value: constants5.FREEZING_OR_HITCHING, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl13 = util.intl;
|
|
obj13.label = intl13.string(_modDef2659.V3EeCH);
|
|
obj13.disabled = isStreamer;
|
|
items[12] = obj13;
|
|
const obj14 = { value: constants5.LAG, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl14 = util.intl;
|
|
obj14.label = intl14.string(_modDef2659.hi1Y39);
|
|
obj14.disabled = isStreamer;
|
|
items[13] = obj14;
|
|
const obj15 = { value: constants5.BLURRY_OR_PIXELATED, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl15 = util.intl;
|
|
obj15.label = intl15.string(_modDef2659.qdBn3L);
|
|
obj15.disabled = isStreamer;
|
|
items[14] = obj15;
|
|
const obj16 = { value: constants5.NO_AUDIO, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl16 = util.intl;
|
|
obj16.label = intl16.string(_modDef2659.DOOlop);
|
|
obj16.disabled = isStreamer;
|
|
items[15] = obj16;
|
|
const obj17 = { value: constants5.BAD_AUDIO, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl17 = util.intl;
|
|
obj17.label = intl17.string(_modDef2659.k7bdGE);
|
|
obj17.disabled = isStreamer;
|
|
items[16] = obj17;
|
|
const obj18 = { value: constants5.STOPPED_UNEXPECTEDLY, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl18 = util.intl;
|
|
obj18.label = intl18.string(_modDef2659.jPD998);
|
|
obj18.disabled = isStreamer;
|
|
items[17] = obj18;
|
|
const obj19 = { value: constants5.DESYNC, variant: constants6.SOMEONE, label: null, disabled: null };
|
|
const intl19 = util.intl;
|
|
obj19.label = intl19.string(_modDef2659.JfAvQp);
|
|
obj19.disabled = isStreamer;
|
|
items[18] = obj19;
|
|
const found = items.filter((disabled) => !disabled.disabled);
|
|
return found.map((item) => Object.assign(item, Object.assign({ disabled: 0 })));
|
|
};
|
|
export const getPeopleFeedbackOptions = function getPeopleFeedbackOptions() {
|
|
const obj = { value: constants7.TOXIC_OR_INAPPROPRIATE, variant: constants6.OTHERS, label: null };
|
|
const intl = util.intl;
|
|
obj.label = intl.string(_modDef2659.PLBRzF);
|
|
const items = [obj];
|
|
const found = items.filter((disabled) => !disabled.disabled);
|
|
return found.map((item) => Object.assign(item, Object.assign({ disabled: 0 })));
|
|
};
|