Files
2026-07-28 01:06:53 +03:00

327 lines
16 KiB
TypeScript

/* Metro module 9898; source: components_native/common/CountDown.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun77570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:6, offset: 0x01e0191f, size: 240 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const Component = value.Component;
value = _fun77574(Component);
(FileImportTrackerModule).fileFinishedImporting('components_native/common/CountDown.tsx');
exports.default = value;
function _isNativeReflectConstruct_77571() { // fn#77571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:172, offset: 0x01e01a0f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_77571_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun77574(a0) { // fn#77574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:371, offset: 0x01e01a71, size: 147 bytes, params: 2, frame: 16
const CountDown2 = CountDown;
Inherits(CountDown2, a0);
return CreateClass(CountDown2, [{key: 'componentDidMount', value: function() {
var env0_0 = this;
this._interval = global.setInterval(_fun77577, 1000);
}}, {key: 'componentWillUnmount', value: function() {
this.clearRefreshInterval();
}}, {key: 'clearRefreshInterval', value: function() {
if (this._interval != null) {
global.clearInterval(this._interval);
}
}}, {key: 'render', value: value_77580}]);
function CountDown() { // fn#77575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:383, offset: 0x00c7c82b, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, CountDown);
const value3 = env1_6(CountDown);
return env1_5(this, _isNativeReflectConstruct_77571() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_77576() { // fn#77576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:653, offset: 0x01e01b04, size: 46 bytes, params: 1, frame: 14
this._interval = global.setInterval(_fun77577, 1000);
function _fun77577() { // fn#77577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:692, offset: 0x01e01b32, size: 19 bytes, params: 1, frame: 9
return env0_0.forceUpdate();
}
}
function value_77580() { // fn#77580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10084:917, offset: 0x01e01b7e, size: 985 bytes, params: 1, frame: 24
var environment;
var r7;
var r11;
var r13;
var r8;
var r1;
var r3;
var r4;
var Math;
var max;
var Date;
var value2;
var value3;
var value4;
var clearRefreshInterval;
var floor;
var Seconds;
var DAY;
var value5;
var items2;
var value6;
var HOUR;
var value7;
var MINUTE;
var shift;
var value8;
var map;
var value9;
var join;
var value10;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var QJyuxY;
var n7dksO;
var indexOf;
var length;
var replace;
var property;
var HermesInternal;
var concat;
var value11;
const {postDeadlineText, style, deadline, withUnits, freezeAtRemainingSeconds} = this.props;
let value = withUnits != null;
if (deadline === Infinity) {
value = environment.__proto__;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PqEzn8);
r4 = value;
} else {
Math = global.Math;
max = Math.max;
value = global.Number(deadline);
Date = global.Date;
value -= Date.now();
value2 = 0;
value = Reflect.apply(max, Math, [value2, value]);
value /= 1000;
value3 = freezeAtRemainingSeconds != null;
reducibleJoin4: while (true) {
if (value3) {
value4 = value <= freezeAtRemainingSeconds;
r7 = value4;
break reducibleJoin4;
}
r7 = value3;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (r7) {
clearRefreshInterval = this.clearRefreshInterval;
Reflect.apply(clearRefreshInterval, this, []);
r11 = freezeAtRemainingSeconds;
break reducibleJoin6;
}
r11 = value;
break reducibleJoin6;
}
reducibleJoin17: while (true) {
reducibleJoin10: while (true) {
if (r11 >= value2) {
if (postDeadlineText != null) {
r4 = postDeadlineText;
break reducibleJoin17;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
items2 = [Reflect.apply(floor, Math, [r11 / DAY])];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items2[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items2[value2]) {
r13 = value2;
break reducibleJoin10;
}
items2.shift();
r13 = 1;
break reducibleJoin10;
}
Math = global.Math;
floor = Math.floor;
value = environment.__proto__;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value5 = Reflect.apply(floor, Math, [r11 / DAY]);
items2 = [value5];
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
DAY = Seconds.DAY;
value6 = r11 % DAY;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
items2[1] = Reflect.apply(floor, Math, [value6 / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
value7 = value6 % HOUR;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[2] = Reflect.apply(floor, Math, [value7 / MINUTE]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
items2[3] = Reflect.apply(floor, Math, [value7 % MINUTE]);
if (value2 !== items2[value2]) {
r13 = value2;
break reducibleJoin10;
}
shift = items2.shift;
Reflect.apply(shift, items2, []);
value8 = 1;
r13 = value8;
break reducibleJoin10;
}
map = items2.map;
value9 = Reflect.apply(map, items2, [function(a0) {
var value = a0;
return value < 10 ? '0' + value : value;
}]);
join = value9.join;
value10 = Reflect.apply(join, value9, [':']);
if (value && withUnits) {
string = intl.string;
QJyuxY = t.QJyuxY;
value = Reflect.apply(string, intl, [QJyuxY]);
items2 = [value];
string = intl.string;
items2[1] = Reflect.apply(string, intl, [t['1LyF1h']]);
string = intl.string;
n7dksO = t.n7dksO;
items2[2] = Reflect.apply(string, intl, [n7dksO]);
string = intl.string;
items2[3] = Reflect.apply(string, intl, [t['6m/6nM']]);
indexOf = value10.indexOf;
value = Reflect.apply(indexOf, value10, [':']);
reducibleJoin15: while (true) {
if (value === -1) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
length = items2.length;
if (!(r13 < length)) {
r1 = r13;
r3 = value10;
break reducibleJoin15;
}
r7 = r13;
r8 = value10;
reducibleLoop13: while (true) {
replace = r8.replace;
property = items2[r7];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = Reflect.apply(replace, r8, [':', '' + property + ' ']);
value11 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
indexOf = value.indexOf;
if (Reflect.apply(indexOf, value, [':']) === -1) {
r1 = value11;
r3 = value;
break reducibleJoin15;
}
length = items2.length;
if (value11 < length) {
r7 = value11;
r8 = value;
continue reducibleLoop13;
}
r1 = value11;
r3 = value;
break reducibleJoin15;
}
}
property = items2[r1];
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '' + r3 + property;
r4 = value;
break reducibleJoin17;
}
r4 = value10;
break reducibleJoin17;
}
}
value = environment.__proto__;
const Text = (TextModule).Text;
return (
<Text
tabularNumbers
variant="text-md/semibold"
style={style}
>
{r4}
</Text>
);
}
}
}
global.__d(_fun77570, 9898, [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573,
2]) /* metro module 9898, dependencies: [6, 7, 15, 17, 18, 31, 33, 1244, 672, 4573, 2] */;