@ultrade/shared 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseModel/base.model.d.ts +26 -0
- package/dist/baseModel/index.d.ts +2 -0
- package/dist/common/auth.helper.d.ts +4 -0
- package/dist/common/auth.helper.js +367 -0
- package/dist/common/awsKms.d.ts +2 -0
- package/dist/common/awsKms.js +265 -0
- package/dist/common/big-number.helper.d.ts +38 -0
- package/dist/common/big-number.helper.js +263 -0
- package/dist/common/index.d.ts +11 -0
- package/dist/common/index.js +2541 -0
- package/dist/common/indexer.helper.d.ts +2 -0
- package/dist/common/indexer.helper.js +387 -0
- package/dist/common/logger.d.ts +32 -0
- package/dist/common/logger.js +188 -0
- package/dist/common/mappers/codexAsset.mapper.d.ts +2 -0
- package/dist/common/mappers/codexAsset.mapper.js +40 -0
- package/dist/common/mappers/codexBalance.mapper.d.ts +2 -0
- package/dist/common/mappers/codexBalance.mapper.js +38 -0
- package/dist/common/mappers/index.d.ts +3 -0
- package/dist/common/mappers/index.js +1421 -0
- package/dist/common/mappers/trade.mapper.d.ts +6 -0
- package/dist/common/mappers/trade.mapper.js +1343 -0
- package/dist/common/migration.helpers.d.ts +4 -0
- package/dist/common/migration.helpers.js +44 -0
- package/dist/common/redis.helper.d.ts +27 -0
- package/dist/common/redis.helper.js +269 -0
- package/dist/common/secret.helper.d.ts +28 -0
- package/dist/common/secret.helper.js +144 -0
- package/dist/common/timestamp.helper.d.ts +1 -0
- package/dist/common/timestamp.helper.js +41 -0
- package/dist/common/utils/assert.d.ts +1 -0
- package/dist/common/utils/assert.js +32 -0
- package/dist/common/utils/decode.d.ts +5 -0
- package/dist/common/utils/decode.js +206 -0
- package/dist/common/utils/index.d.ts +9 -0
- package/dist/common/utils/index.js +122 -0
- package/dist/common/utils/social.d.ts +1 -0
- package/dist/common/utils/social.js +30 -0
- package/dist/common/utils/stat.d.ts +1 -0
- package/dist/common/utils/stat.js +274 -0
- package/dist/constants/allowedUrls.d.ts +1 -0
- package/dist/constants/auth.d.ts +2 -0
- package/dist/constants/cctp.d.ts +3 -0
- package/dist/constants/codex.d.ts +11 -0
- package/dist/constants/env.d.ts +6 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/index.js +455 -0
- package/dist/constants/queue.d.ts +39 -0
- package/dist/constants/response.d.ts +82 -0
- package/dist/constants/settings.d.ts +2 -0
- package/dist/constants/social.d.ts +3 -0
- package/dist/constants/withdrawalWalletsMessage.d.ts +1 -0
- package/dist/enums/chains.enum.d.ts +50 -0
- package/dist/enums/db/account/index.d.ts +19 -0
- package/dist/enums/db/affiliate.enum.d.ts +7 -0
- package/dist/enums/db/available-pair-settings.enum.d.ts +12 -0
- package/dist/enums/db/chains.d.ts +30 -0
- package/dist/enums/db/common.enum.d.ts +4 -0
- package/dist/enums/db/component/index.d.ts +22 -0
- package/dist/enums/db/index.d.ts +21 -0
- package/dist/enums/db/market-maker.enum.d.ts +15 -0
- package/dist/enums/db/notification-center/userNotification.enum.d.ts +36 -0
- package/dist/enums/db/order-side.enum.d.ts +5 -0
- package/dist/enums/db/order-status.enum.d.ts +8 -0
- package/dist/enums/db/order-type.enum.d.ts +7 -0
- package/dist/enums/db/pending-actions.enum.d.ts +6 -0
- package/dist/enums/db/relayer.enum.d.ts +23 -0
- package/dist/enums/db/setting-type.enum.d.ts +8 -0
- package/dist/enums/db/social-action.enum.d.ts +24 -0
- package/dist/enums/db/social-prompt.enum.d.ts +8 -0
- package/dist/enums/db/social.enum.d.ts +10 -0
- package/dist/enums/db/state-type.enum.d.ts +9 -0
- package/dist/enums/db/trade.enums.d.ts +10 -0
- package/dist/enums/db/tradingKeyType.enum.d.ts +4 -0
- package/dist/enums/db/upgrade.enum.d.ts +5 -0
- package/dist/enums/db/withdrawal-wallet.enum.d.ts +5 -0
- package/dist/enums/index.d.ts +5 -0
- package/dist/enums/index.js +893 -0
- package/dist/enums/maintenanceMode.enum.d.ts +10 -0
- package/dist/enums/notification.enum.d.ts +7 -0
- package/dist/enums/social.enum.d.ts +10 -0
- package/dist/helpers/Encoding.d.ts +33 -0
- package/dist/helpers/Encoding.js +318 -0
- package/dist/helpers/algo.helper.d.ts +14 -0
- package/dist/helpers/algo.helper.js +1211 -0
- package/dist/helpers/api.helper.d.ts +16 -0
- package/dist/helpers/api.helper.js +1652 -0
- package/dist/helpers/assert.helper.d.ts +10 -0
- package/dist/helpers/assert.helper.js +1677 -0
- package/dist/helpers/atomic.helper.d.ts +21 -0
- package/dist/helpers/atomic.helper.js +712 -0
- package/dist/helpers/balance.helper.d.ts +13 -0
- package/dist/helpers/balance.helper.js +4330 -0
- package/dist/helpers/codex/common.helper.d.ts +24 -0
- package/dist/helpers/codex/common.helper.js +4246 -0
- package/dist/helpers/codex/index.d.ts +6 -0
- package/dist/helpers/codex/index.js +4246 -0
- package/dist/helpers/codex/mbr.helper.d.ts +6 -0
- package/dist/helpers/codex/mbr.helper.js +4246 -0
- package/dist/helpers/codex/mna.helper.d.ts +2 -0
- package/dist/helpers/codex/mna.helper.js +4246 -0
- package/dist/helpers/codex/order.helper.d.ts +6 -0
- package/dist/helpers/codex/order.helper.js +4246 -0
- package/dist/helpers/codex/setGlobal.helper.d.ts +27 -0
- package/dist/helpers/codex/setGlobal.helper.js +4312 -0
- package/dist/helpers/codex/transfer.helper.d.ts +21 -0
- package/dist/helpers/codex/transfer.helper.js +4246 -0
- package/dist/helpers/codex/txn.helper.d.ts +13 -0
- package/dist/helpers/codex/txn.helper.js +4246 -0
- package/dist/helpers/codex.helper.d.ts +106 -0
- package/dist/helpers/codex.helper.js +4246 -0
- package/dist/helpers/email.helper.d.ts +5 -0
- package/dist/helpers/email.helper.js +112 -0
- package/dist/helpers/eth.helper.d.ts +12 -0
- package/dist/helpers/eth.helper.js +4246 -0
- package/dist/helpers/hummingbots.helper.d.ts +2 -0
- package/dist/helpers/hummingbots.helper.js +163 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +837 -0
- package/dist/helpers/interval.helpers.d.ts +9 -0
- package/dist/helpers/interval.helpers.js +110 -0
- package/dist/helpers/liquidity.helper.d.ts +6 -0
- package/dist/helpers/liquidity.helper.js +81 -0
- package/dist/helpers/order.helper.d.ts +7 -0
- package/dist/helpers/order.helper.js +946 -0
- package/dist/helpers/pair.helper.d.ts +9 -0
- package/dist/helpers/pair.helper.js +938 -0
- package/dist/helpers/pointSystem.helper.d.ts +14 -0
- package/dist/helpers/pointSystem.helper.js +392 -0
- package/dist/helpers/ticker.helpers.d.ts +8 -0
- package/dist/helpers/ticker.helpers.js +358 -0
- package/dist/helpers/vaa.helper.d.ts +2 -0
- package/dist/helpers/vaa.helper.js +4350 -0
- package/dist/helpers/withdraw.helper.d.ts +14 -0
- package/dist/helpers/withdraw.helper.js +4784 -0
- package/dist/interfaces/accountInfo.interface.d.ts +15 -0
- package/dist/interfaces/algostreamer/index.d.ts +49 -0
- package/dist/interfaces/api/affiliate.interface.d.ts +71 -0
- package/dist/interfaces/cache.interface.d.ts +25 -0
- package/dist/interfaces/confirmed-txn.interface.d.ts +46 -0
- package/dist/interfaces/controller.interface.d.ts +6 -0
- package/dist/interfaces/db/baseModel.interface.d.ts +5 -0
- package/dist/interfaces/db/hummingbot/index.d.ts +18 -0
- package/dist/interfaces/db/index.d.ts +10 -0
- package/dist/interfaces/db/market/index.d.ts +313 -0
- package/dist/interfaces/db/marketing/index.d.ts +48 -0
- package/dist/interfaces/db/notification_center/index.d.ts +33 -0
- package/dist/interfaces/db/relayer/index.d.ts +56 -0
- package/dist/interfaces/db/social/index.d.ts +188 -0
- package/dist/interfaces/db/softDeleteModel.interface.d.ts +4 -0
- package/dist/interfaces/db/white_label/index.d.ts +161 -0
- package/dist/interfaces/db/withdrawal_wallets/index.d.ts +12 -0
- package/dist/interfaces/dto/index.d.ts +62 -0
- package/dist/interfaces/emailService.interface.d.ts +4 -0
- package/dist/interfaces/index.d.ts +17 -0
- package/dist/interfaces/index.js +1319 -0
- package/dist/interfaces/kmsService.interface.d.ts +4 -0
- package/dist/interfaces/last-look-trade.interface.d.ts +10 -0
- package/dist/interfaces/market.interface.d.ts +17 -0
- package/dist/interfaces/order.interface.d.ts +162 -0
- package/dist/interfaces/pair.interface.d.ts +10 -0
- package/dist/interfaces/query.interface.d.ts +6 -0
- package/dist/interfaces/services/accountCache.interface.d.ts +15 -0
- package/dist/interfaces/services/algod.interface.d.ts +5 -0
- package/dist/interfaces/services/balances.interface.d.ts +11 -0
- package/dist/interfaces/services/coin-market-cap.interface.d.ts +124 -0
- package/dist/interfaces/services/index.d.ts +8 -0
- package/dist/interfaces/services/price-model.interface.d.ts +4 -0
- package/dist/interfaces/services/price-service.interface.d.ts +8 -0
- package/dist/interfaces/services/socialActivity.interface.d.ts +48 -0
- package/dist/interfaces/services/tmc.interface.d.ts +9 -0
- package/dist/interfaces/streaming.interface.d.ts +95 -0
- package/dist/interfaces/timestream.interface.d.ts +29 -0
- package/dist/interfaces/trading.interface.d.ts +235 -0
- package/dist/interfaces/tradingKey.interface.d.ts +26 -0
- package/dist/interfaces/transfer.interface.d.ts +12 -0
- package/dist/interfaces/wallet.interface.d.ts +89 -0
- package/dist/interfaces/withdrawalWallets.interface.d.ts +14 -0
- package/dist/types/algo-order.type.d.ts +10 -0
- package/dist/types/amm/amm.d.ts +163 -0
- package/dist/types/api/request.types.d.ts +99 -0
- package/dist/types/codex.types.d.ts +28 -0
- package/dist/types/hummingbots.types.d.ts +23 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +362 -0
- package/dist/types/notification.type.d.ts +10 -0
- package/dist/types/settings.type.d.ts +162 -0
- package/dist/types/state.type.d.ts +4 -0
- package/package.json +78 -0
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("bignumber.js"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define(["bignumber.js"], factory);
|
|
6
|
+
else {
|
|
7
|
+
var a = typeof exports === 'object' ? factory(require("bignumber.js")) : factory(root["bignumber.js"]);
|
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
|
+
}
|
|
10
|
+
})(global, (__WEBPACK_EXTERNAL_MODULE__6168__) => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
14
|
+
|
|
15
|
+
/***/ 573:
|
|
16
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/***/ }),
|
|
23
|
+
|
|
24
|
+
/***/ 839:
|
|
25
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29
|
+
exports.transformPointSystemSettings = void 0;
|
|
30
|
+
const _types_1 = __webpack_require__(3574);
|
|
31
|
+
const transformPointSystemSettings = (pointSystemSettings) => {
|
|
32
|
+
const settingsObj = {};
|
|
33
|
+
pointSystemSettings.forEach(({ settingId, value, setting }) => {
|
|
34
|
+
if (setting.type === 'boolean') {
|
|
35
|
+
settingsObj[settingId] = value === 'true';
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
settingsObj[settingId] = value;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return {
|
|
42
|
+
discordEnabled: settingsObj[_types_1.SettingIds.POINT_SYSTEM_DISCORD_ENABLED],
|
|
43
|
+
telegramBotName: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TELEGRAM_BOT_NAME],
|
|
44
|
+
telegramBotId: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TELEGRAM_BOT_ID],
|
|
45
|
+
telegramEnabled: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TELEGRAM_ENABLED],
|
|
46
|
+
telegramGroupId: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TELEGRAM_GROUP_ID],
|
|
47
|
+
telegramGroupName: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TELEGRAM_GROUP_NAME],
|
|
48
|
+
twitterAccountId: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TWITTER_ACCOUNT_ID],
|
|
49
|
+
twitterAccountName: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TWITTER_ACCOUNT_NAME],
|
|
50
|
+
twitterEnabled: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TWITTER_ENABLED],
|
|
51
|
+
twitterJobEnabled: settingsObj[_types_1.SettingIds.POINT_SYSTEM_TWITTER_JOB_ENABLED],
|
|
52
|
+
guideLink: settingsObj[_types_1.SettingIds.POINT_SYSTEM_GUIDE_LINK],
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.transformPointSystemSettings = transformPointSystemSettings;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/***/ }),
|
|
59
|
+
|
|
60
|
+
/***/ 865:
|
|
61
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
65
|
+
exports.groupTickersByInterval = groupTickersByInterval;
|
|
66
|
+
exports.groupTickersByMonthInterval = groupTickersByMonthInterval;
|
|
67
|
+
exports.groupTickersByYearInterval = groupTickersByYearInterval;
|
|
68
|
+
exports.mapCandleToTicker = mapCandleToTicker;
|
|
69
|
+
exports.roundUpSecondsInTimestamp = roundUpSecondsInTimestamp;
|
|
70
|
+
exports.roundUpMinutesInTimestamp = roundUpMinutesInTimestamp;
|
|
71
|
+
exports.roundUpHoursInTimestamp = roundUpHoursInTimestamp;
|
|
72
|
+
const big_number_helper_1 = __webpack_require__(1174);
|
|
73
|
+
function groupTickersByInterval(tickers, newIntervalInSec, endTimeInSec) {
|
|
74
|
+
const newGroupedTickers = [];
|
|
75
|
+
let timestamp = endTimeInSec - newIntervalInSec;
|
|
76
|
+
let slot = null;
|
|
77
|
+
// desc direction by timestamp
|
|
78
|
+
const sortedTickers = tickers.sort((a, b) => b.t - a.t);
|
|
79
|
+
for (let i = 0; i < sortedTickers.length; i++) {
|
|
80
|
+
const element = sortedTickers[i];
|
|
81
|
+
if (element.t < timestamp) {
|
|
82
|
+
if (slot) {
|
|
83
|
+
newGroupedTickers.push({ ...slot });
|
|
84
|
+
slot = null;
|
|
85
|
+
}
|
|
86
|
+
timestamp = timestamp - newIntervalInSec * Math.ceil((timestamp - element.t) / newIntervalInSec);
|
|
87
|
+
}
|
|
88
|
+
if (!slot) {
|
|
89
|
+
slot = { ...element, t: timestamp };
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
if ((0, big_number_helper_1.lessThan)(slot.h, element.h))
|
|
93
|
+
slot.h = element.h;
|
|
94
|
+
if ((0, big_number_helper_1.greaterThan)(slot.l, element.l))
|
|
95
|
+
slot.l = element.l;
|
|
96
|
+
slot.o = element.o;
|
|
97
|
+
slot.v = Number((0, big_number_helper_1.plus)(slot.v, element.v));
|
|
98
|
+
}
|
|
99
|
+
if (i + 1 === sortedTickers.length) {
|
|
100
|
+
newGroupedTickers.push({ ...slot });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return newGroupedTickers;
|
|
104
|
+
}
|
|
105
|
+
function groupTickersByMonthInterval(tickers, months, endTimeInSec) {
|
|
106
|
+
const sortedTickers = tickers.sort((a, b) => b.t - a.t);
|
|
107
|
+
const yearlyTickers = [];
|
|
108
|
+
const tickersByYear = new Map();
|
|
109
|
+
for (const ticker of sortedTickers) {
|
|
110
|
+
const date = new Date(ticker.t * 1000);
|
|
111
|
+
const year = date.getFullYear();
|
|
112
|
+
if (!tickersByYear.has(year)) {
|
|
113
|
+
tickersByYear.set(year, []);
|
|
114
|
+
}
|
|
115
|
+
tickersByYear.get(year).push(ticker);
|
|
116
|
+
}
|
|
117
|
+
for (const [year, yearTickers] of tickersByYear) {
|
|
118
|
+
if (yearTickers.length === 0)
|
|
119
|
+
continue;
|
|
120
|
+
const sortedYearTickers = yearTickers.sort((a, b) => a.t - b.t);
|
|
121
|
+
const yearlyTicker = {
|
|
122
|
+
t: new Date(year, 0, 1).getTime() / 1000,
|
|
123
|
+
o: sortedYearTickers[0].o,
|
|
124
|
+
h: Math.max(...sortedYearTickers.map(t => t.h)),
|
|
125
|
+
l: Math.min(...sortedYearTickers.map(t => t.l)),
|
|
126
|
+
c: sortedYearTickers[sortedYearTickers.length - 1].c,
|
|
127
|
+
v: sortedYearTickers.reduce((sum, t) => sum + t.v, 0),
|
|
128
|
+
q: sortedYearTickers.reduce((sum, t) => sum + t.q, 0),
|
|
129
|
+
};
|
|
130
|
+
yearlyTickers.push(yearlyTicker);
|
|
131
|
+
}
|
|
132
|
+
return yearlyTickers.sort((a, b) => b.t - a.t);
|
|
133
|
+
}
|
|
134
|
+
function groupTickersByYearInterval(tickers, years, endTimeInSec) {
|
|
135
|
+
throw new Error("groupTickersByYearInterval has not implemented yet");
|
|
136
|
+
}
|
|
137
|
+
function mapCandleToTicker(candle) {
|
|
138
|
+
return {
|
|
139
|
+
t: +(0, big_number_helper_1.divide)(candle.timestamp, 1000),
|
|
140
|
+
o: candle.open,
|
|
141
|
+
h: candle.high,
|
|
142
|
+
l: candle.low,
|
|
143
|
+
c: candle.close,
|
|
144
|
+
v: candle.volume,
|
|
145
|
+
q: candle.quote
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function roundUpSecondsInTimestamp(timeInSec) {
|
|
149
|
+
return (new Date(timeInSec * 1000).setSeconds(60, 0)) / 1000;
|
|
150
|
+
}
|
|
151
|
+
function roundUpMinutesInTimestamp(timeInSec) {
|
|
152
|
+
return (new Date(timeInSec * 1000).setMinutes(60, 0, 0)) / 1000;
|
|
153
|
+
}
|
|
154
|
+
function roundUpHoursInTimestamp(timeInSec) {
|
|
155
|
+
return (new Date(timeInSec * 1000).setHours(24, 0, 0, 0)) / 1000;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
/***/ }),
|
|
160
|
+
|
|
161
|
+
/***/ 1174:
|
|
162
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
166
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
167
|
+
};
|
|
168
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
169
|
+
exports.Operations = void 0;
|
|
170
|
+
exports.absolute = absolute;
|
|
171
|
+
exports.ceil = ceil;
|
|
172
|
+
exports.toFixed = toFixed;
|
|
173
|
+
exports.floor = floor;
|
|
174
|
+
exports.round = round;
|
|
175
|
+
exports.plus = plus;
|
|
176
|
+
exports.minus = minus;
|
|
177
|
+
exports.multiply = multiply;
|
|
178
|
+
exports.toUsd = toUsd;
|
|
179
|
+
exports.divide = divide;
|
|
180
|
+
exports.greaterThanOrEqual = greaterThanOrEqual;
|
|
181
|
+
exports.greaterThan = greaterThan;
|
|
182
|
+
exports.lessThanOrEqual = lessThanOrEqual;
|
|
183
|
+
exports.lessThan = lessThan;
|
|
184
|
+
exports.equal = equal;
|
|
185
|
+
exports.mod = mod;
|
|
186
|
+
exports.modZero = modZero;
|
|
187
|
+
exports.bn_operation = bn_operation;
|
|
188
|
+
exports.roundNumber = roundNumber;
|
|
189
|
+
exports.convertFromBaseUnits = convertFromBaseUnits;
|
|
190
|
+
exports.convertToBaseUnits = convertToBaseUnits;
|
|
191
|
+
const bignumber_js_1 = __importDefault(__webpack_require__(6168));
|
|
192
|
+
bignumber_js_1.default.config({ DECIMAL_PLACES: 40, EXPONENTIAL_AT: 45 });
|
|
193
|
+
var Operations;
|
|
194
|
+
(function (Operations) {
|
|
195
|
+
Operations["MINUS"] = "-";
|
|
196
|
+
Operations["PLUS"] = "+";
|
|
197
|
+
Operations["MULTIPLY"] = "*";
|
|
198
|
+
Operations["DIVIDE"] = "/";
|
|
199
|
+
Operations["GREATER_THAN_OR_EQUAL"] = ">=";
|
|
200
|
+
Operations["GREATER_THAN"] = ">";
|
|
201
|
+
Operations["LESS_THAN_OR_EQUAL"] = "<=";
|
|
202
|
+
Operations["LESS_THAN"] = "<";
|
|
203
|
+
Operations["EQUAL"] = "==";
|
|
204
|
+
Operations["MOD"] = "mod";
|
|
205
|
+
})(Operations || (exports.Operations = Operations = {}));
|
|
206
|
+
function absolute(value) {
|
|
207
|
+
let x = new bignumber_js_1.default(value);
|
|
208
|
+
const res = x.abs().toString();
|
|
209
|
+
// console.log('Absolute value', { value, res })
|
|
210
|
+
return res;
|
|
211
|
+
}
|
|
212
|
+
function ceil(value) {
|
|
213
|
+
let x = new bignumber_js_1.default(String(value));
|
|
214
|
+
const res = x.integerValue(bignumber_js_1.default.ROUND_CEIL).toString();
|
|
215
|
+
if (!equal(value, res)) {
|
|
216
|
+
console.log('Ceil value', { value, res });
|
|
217
|
+
}
|
|
218
|
+
return res;
|
|
219
|
+
}
|
|
220
|
+
function toFixed(value, decimalPlaces, roundUpToFirstSignificant = false) {
|
|
221
|
+
const x = new bignumber_js_1.default(String(value));
|
|
222
|
+
let res;
|
|
223
|
+
if (roundUpToFirstSignificant) {
|
|
224
|
+
const valueStr = x.toFixed();
|
|
225
|
+
const decimalIndex = valueStr.indexOf('.');
|
|
226
|
+
if (decimalIndex >= 0) {
|
|
227
|
+
const fractionalPart = valueStr.slice(decimalIndex + 1);
|
|
228
|
+
let leadingZeros = 0;
|
|
229
|
+
for (let char of fractionalPart) {
|
|
230
|
+
if (char === '0') {
|
|
231
|
+
leadingZeros++;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const totalDecimalPlaces = leadingZeros + 1;
|
|
238
|
+
res = x.toFixed(totalDecimalPlaces, bignumber_js_1.default.ROUND_UP);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
res = x.toFixed(0);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
res = x.toFixed(decimalPlaces);
|
|
246
|
+
}
|
|
247
|
+
console.log('Fixed value', { value, res });
|
|
248
|
+
return res;
|
|
249
|
+
}
|
|
250
|
+
function floor(value) {
|
|
251
|
+
let x = new bignumber_js_1.default(String(value));
|
|
252
|
+
const res = x.integerValue(bignumber_js_1.default.ROUND_FLOOR).toString();
|
|
253
|
+
console.log('Floor value', { value, res });
|
|
254
|
+
return res;
|
|
255
|
+
}
|
|
256
|
+
function round(value) {
|
|
257
|
+
let x = new bignumber_js_1.default(String(value));
|
|
258
|
+
const res = x.integerValue(bignumber_js_1.default.ROUND_HALF_UP).toString();
|
|
259
|
+
console.log('Round value', { value, res });
|
|
260
|
+
return res;
|
|
261
|
+
}
|
|
262
|
+
function plus(value1, value2) {
|
|
263
|
+
return bn_operation(value1, value2, Operations.PLUS);
|
|
264
|
+
}
|
|
265
|
+
function minus(value1, value2) {
|
|
266
|
+
return bn_operation(value1, value2, Operations.MINUS);
|
|
267
|
+
}
|
|
268
|
+
function multiply(value1, value2) {
|
|
269
|
+
return bn_operation(value1, value2, Operations.MULTIPLY);
|
|
270
|
+
}
|
|
271
|
+
function toUsd(amount, price) {
|
|
272
|
+
return multiply(amount, price || 0);
|
|
273
|
+
}
|
|
274
|
+
;
|
|
275
|
+
function divide(value1, value2) {
|
|
276
|
+
return bn_operation(value1, value2, Operations.DIVIDE);
|
|
277
|
+
}
|
|
278
|
+
function greaterThanOrEqual(value1, value2) {
|
|
279
|
+
return Boolean(bn_operation(value1, value2, Operations.GREATER_THAN_OR_EQUAL));
|
|
280
|
+
}
|
|
281
|
+
function greaterThan(value1, value2) {
|
|
282
|
+
return Boolean(bn_operation(value1, value2, Operations.GREATER_THAN));
|
|
283
|
+
}
|
|
284
|
+
function lessThanOrEqual(value1, value2) {
|
|
285
|
+
return Boolean(bn_operation(value1, value2, Operations.LESS_THAN_OR_EQUAL));
|
|
286
|
+
}
|
|
287
|
+
function lessThan(value1, value2) {
|
|
288
|
+
return Boolean(bn_operation(value1, value2, Operations.LESS_THAN));
|
|
289
|
+
}
|
|
290
|
+
function equal(value1, value2) {
|
|
291
|
+
return Boolean(bn_operation(value1, value2, Operations.EQUAL));
|
|
292
|
+
}
|
|
293
|
+
function mod(value1, value2) {
|
|
294
|
+
return bn_operation(value1, value2, Operations.MOD);
|
|
295
|
+
}
|
|
296
|
+
function modZero(value1, value2) {
|
|
297
|
+
return equal(mod(value1, value2), 0);
|
|
298
|
+
}
|
|
299
|
+
function bn_operation(a, b, operation) {
|
|
300
|
+
a = new bignumber_js_1.default(String(a));
|
|
301
|
+
b = new bignumber_js_1.default(String(b));
|
|
302
|
+
switch (operation.toLowerCase()) {
|
|
303
|
+
case '-':
|
|
304
|
+
return a.minus(b).toString();
|
|
305
|
+
case '+':
|
|
306
|
+
return a.plus(b).toString();
|
|
307
|
+
case '*':
|
|
308
|
+
case 'x':
|
|
309
|
+
return a.multipliedBy(b).toString();
|
|
310
|
+
case '÷':
|
|
311
|
+
case '/':
|
|
312
|
+
return a.dividedBy(b).toString();
|
|
313
|
+
case '>=':
|
|
314
|
+
return a.isGreaterThanOrEqualTo(b);
|
|
315
|
+
case '>':
|
|
316
|
+
return a.isGreaterThan(b);
|
|
317
|
+
case '<=':
|
|
318
|
+
return a.isLessThanOrEqualTo(b);
|
|
319
|
+
case '<':
|
|
320
|
+
return a.isLessThan(b);
|
|
321
|
+
case '==':
|
|
322
|
+
return a.isEqualTo(b);
|
|
323
|
+
case 'mod':
|
|
324
|
+
return a.modulo(b);
|
|
325
|
+
default:
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function getExponentialNumberComponents(x) {
|
|
330
|
+
if (x.toString().includes('e')) {
|
|
331
|
+
const parts = x.toString().split('e');
|
|
332
|
+
return [parseFloat(parts[0]), parseFloat(parts[1])];
|
|
333
|
+
}
|
|
334
|
+
return [x, 0];
|
|
335
|
+
}
|
|
336
|
+
function generateExponentialNumberFromComponents(decimalPart, exponent) {
|
|
337
|
+
return decimalPart + (exponent < 0 ? `e${exponent}` : `e+${exponent}`);
|
|
338
|
+
}
|
|
339
|
+
function roundNumber({ decimalPlaces = 0 }, x) {
|
|
340
|
+
if (decimalPlaces > 0) {
|
|
341
|
+
const [decimal, decimalExponentialPart] = getExponentialNumberComponents(x);
|
|
342
|
+
const [rounded, roundedExponentialPart] = getExponentialNumberComponents(Math.round(Number(generateExponentialNumberFromComponents(decimal, decimalExponentialPart + decimalPlaces))));
|
|
343
|
+
return Number(generateExponentialNumberFromComponents(rounded, roundedExponentialPart - decimalPlaces));
|
|
344
|
+
}
|
|
345
|
+
return Math.round(x);
|
|
346
|
+
}
|
|
347
|
+
function convertFromBaseUnits(assetDecimals, quantity) {
|
|
348
|
+
const decimals = Number(assetDecimals);
|
|
349
|
+
return roundNumber({ decimalPlaces: decimals },
|
|
350
|
+
// eslint-disable-next-line no-magic-numbers
|
|
351
|
+
Math.pow(10, -decimals) * Number(quantity));
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Computs quantity * 10^(assetDecimals) and rounds the result
|
|
355
|
+
*/
|
|
356
|
+
function convertToBaseUnits(assetDecimals, quantity) {
|
|
357
|
+
// eslint-disable-next-line no-magic-numbers
|
|
358
|
+
const baseAmount = Math.pow(10, Number(assetDecimals)) * Number(quantity);
|
|
359
|
+
// make sure the final value is an integer. This prevents this kind of computation errors: 0.0012 * 100000 = 119.99999999999999 and rounds this result into 120
|
|
360
|
+
return roundNumber({ decimalPlaces: 0 }, baseAmount);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
/***/ }),
|
|
365
|
+
|
|
366
|
+
/***/ 3574:
|
|
367
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
371
|
+
if (k2 === undefined) k2 = k;
|
|
372
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
373
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
374
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
375
|
+
}
|
|
376
|
+
Object.defineProperty(o, k2, desc);
|
|
377
|
+
}) : (function(o, m, k, k2) {
|
|
378
|
+
if (k2 === undefined) k2 = k;
|
|
379
|
+
o[k2] = m[k];
|
|
380
|
+
}));
|
|
381
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
382
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
383
|
+
};
|
|
384
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
385
|
+
__exportStar(__webpack_require__(7114), exports);
|
|
386
|
+
__exportStar(__webpack_require__(5386), exports);
|
|
387
|
+
__exportStar(__webpack_require__(7159), exports);
|
|
388
|
+
__exportStar(__webpack_require__(9181), exports);
|
|
389
|
+
__exportStar(__webpack_require__(7359), exports);
|
|
390
|
+
__exportStar(__webpack_require__(3620), exports);
|
|
391
|
+
__exportStar(__webpack_require__(573), exports);
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
/***/ }),
|
|
395
|
+
|
|
396
|
+
/***/ 3620:
|
|
397
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
401
|
+
exports.HummingbotInstanceStatus = void 0;
|
|
402
|
+
var HummingbotInstanceStatus;
|
|
403
|
+
(function (HummingbotInstanceStatus) {
|
|
404
|
+
HummingbotInstanceStatus["PREPARING"] = "provisioning";
|
|
405
|
+
HummingbotInstanceStatus["STOPPING"] = "stopping";
|
|
406
|
+
HummingbotInstanceStatus["RUNNING"] = "running";
|
|
407
|
+
HummingbotInstanceStatus["STOPPED"] = "stopped";
|
|
408
|
+
HummingbotInstanceStatus["FAILED"] = "failed";
|
|
409
|
+
})(HummingbotInstanceStatus || (exports.HummingbotInstanceStatus = HummingbotInstanceStatus = {}));
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
/***/ }),
|
|
413
|
+
|
|
414
|
+
/***/ 5386:
|
|
415
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
/***/ }),
|
|
422
|
+
|
|
423
|
+
/***/ 5910:
|
|
424
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
428
|
+
exports.getDatepartValue = getDatepartValue;
|
|
429
|
+
exports.identityDatepart = identityDatepart;
|
|
430
|
+
exports.inMinCandles = inMinCandles;
|
|
431
|
+
exports.inHourCandles = inHourCandles;
|
|
432
|
+
const intervalRegex = {
|
|
433
|
+
hour: /(\d+)[H]/i,
|
|
434
|
+
day: /(\d+)[D]/i,
|
|
435
|
+
week: /(\d+)[W]/i,
|
|
436
|
+
month: /(\d+)[M]/i,
|
|
437
|
+
year: /(\d+)[Y]/i,
|
|
438
|
+
};
|
|
439
|
+
function getDatepartValue(value) {
|
|
440
|
+
const datepart = identityDatepart(value);
|
|
441
|
+
if (datepart === null) {
|
|
442
|
+
throw new Error(`Cannot fetch datepart from interval: ${value}`);
|
|
443
|
+
}
|
|
444
|
+
const units = datepart === 'minute' ? Number(value) : Number(value.slice(0, -1));
|
|
445
|
+
if (!units) {
|
|
446
|
+
return mapWithTimeframe(datepart, 1);
|
|
447
|
+
}
|
|
448
|
+
if (datepart === 'minute' && units % (7 * 24 * 60) === 0) { // week
|
|
449
|
+
return mapWithTimeframe('week', units / (7 * 24 * 60));
|
|
450
|
+
}
|
|
451
|
+
if (datepart === 'minute' && units % (24 * 60) === 0) { // day
|
|
452
|
+
return mapWithTimeframe('day', units / (24 * 60));
|
|
453
|
+
}
|
|
454
|
+
if (datepart === 'minute' && units % 60 === 0) { // hour
|
|
455
|
+
return mapWithTimeframe('hour', units / 60);
|
|
456
|
+
}
|
|
457
|
+
if (datepart === 'hour' && units % (7 * 24) === 0) { // week
|
|
458
|
+
return mapWithTimeframe('week', units / (7 * 24));
|
|
459
|
+
}
|
|
460
|
+
if (datepart === 'hour' && units % 24 === 0) { // day
|
|
461
|
+
return mapWithTimeframe(units === 24 ? 'hour' : 'day', units === 24 ? 24 : units / 24);
|
|
462
|
+
}
|
|
463
|
+
if (datepart === 'day' && units % 7 === 0) { // week
|
|
464
|
+
return mapWithTimeframe('week', units / 7);
|
|
465
|
+
}
|
|
466
|
+
if (datepart === 'month' && units % 12 === 0) { // year
|
|
467
|
+
return mapWithTimeframe('year', units / 12);
|
|
468
|
+
}
|
|
469
|
+
return mapWithTimeframe(datepart, units);
|
|
470
|
+
}
|
|
471
|
+
function identityDatepart(interval) {
|
|
472
|
+
if (!isNaN(Number(interval))) {
|
|
473
|
+
return 'minute';
|
|
474
|
+
}
|
|
475
|
+
const lastLetter = interval.slice(-1);
|
|
476
|
+
const value = `1${lastLetter}`;
|
|
477
|
+
switch (true) {
|
|
478
|
+
case intervalRegex.hour.test(value): return 'hour';
|
|
479
|
+
case intervalRegex.day.test(value): return 'day';
|
|
480
|
+
case intervalRegex.week.test(value): return 'week';
|
|
481
|
+
case intervalRegex.month.test(value): return 'month';
|
|
482
|
+
case intervalRegex.year.test(value): return 'year';
|
|
483
|
+
default: return null;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function mapWithTimeframe(datepart, value) {
|
|
487
|
+
return { datepart, value, timeframe: mapDatepartToTimeframe(datepart, value) };
|
|
488
|
+
}
|
|
489
|
+
function inMinCandles(value) {
|
|
490
|
+
return [1, 3, 5, 15, 30].includes(value);
|
|
491
|
+
}
|
|
492
|
+
function inHourCandles(value) {
|
|
493
|
+
return [1, 2, 3, 4, 12].includes(value);
|
|
494
|
+
}
|
|
495
|
+
function mapDatepartToTimeframe(datepart, value) {
|
|
496
|
+
switch (datepart) {
|
|
497
|
+
case 'minute':
|
|
498
|
+
return inMinCandles(value) ? `${value}m` : '1m';
|
|
499
|
+
case 'hour':
|
|
500
|
+
return inHourCandles(value) ? `${value}h` : '1h';
|
|
501
|
+
case 'day':
|
|
502
|
+
return `1d`;
|
|
503
|
+
case 'week':
|
|
504
|
+
return `1w`;
|
|
505
|
+
case 'month':
|
|
506
|
+
return `1M`;
|
|
507
|
+
case 'year':
|
|
508
|
+
return `1Y`;
|
|
509
|
+
default:
|
|
510
|
+
throw new Error(`Unsupported datepart: ${datepart}`);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
/***/ }),
|
|
516
|
+
|
|
517
|
+
/***/ 6168:
|
|
518
|
+
/***/ ((module) => {
|
|
519
|
+
|
|
520
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6168__;
|
|
521
|
+
|
|
522
|
+
/***/ }),
|
|
523
|
+
|
|
524
|
+
/***/ 7114:
|
|
525
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
/***/ }),
|
|
532
|
+
|
|
533
|
+
/***/ 7159:
|
|
534
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
538
|
+
exports.defaultThemesValue = exports.defaultThemeSettingValue = exports.defaultLogoSettingValue = exports.requiredColors = exports.settingIdToSecretType = exports.CredentialNameEnum = exports.AffDashboardVisibilitySettingEnum = exports.SettingIds = void 0;
|
|
539
|
+
var SettingIds;
|
|
540
|
+
(function (SettingIds) {
|
|
541
|
+
SettingIds["ENABLED"] = "company.enabled";
|
|
542
|
+
SettingIds["APP_TITLE"] = "company.appTitle";
|
|
543
|
+
SettingIds["DOMAIN"] = "company.domain";
|
|
544
|
+
SettingIds["LOGO"] = "appearance.logo";
|
|
545
|
+
SettingIds["AMM"] = "product.amm";
|
|
546
|
+
SettingIds["OBDEX"] = "product.obdex";
|
|
547
|
+
SettingIds["THEMES"] = "appearance.themes";
|
|
548
|
+
SettingIds["DIRECT_SETTLE"] = "company.directSettlement";
|
|
549
|
+
SettingIds["AMM_FEE"] = "company.ammFee";
|
|
550
|
+
SettingIds["FEE_SHARE"] = "company.feeShare";
|
|
551
|
+
SettingIds["MIN_FEE"] = "company.minFee";
|
|
552
|
+
SettingIds["MAKER_FEE"] = "company.makerFee";
|
|
553
|
+
SettingIds["TAKER_FEE"] = "company.takerFee";
|
|
554
|
+
SettingIds["GEOBLOCK"] = "company.geoblock";
|
|
555
|
+
SettingIds["EMBEDDED_APP_URL"] = "company.embeddedAppUrl";
|
|
556
|
+
SettingIds["PRODUCT_OBDEX"] = "product.obdex";
|
|
557
|
+
SettingIds["PRODUCT_AMM"] = "product.amm";
|
|
558
|
+
SettingIds["NEW_TAB"] = "appearance.newTab";
|
|
559
|
+
SettingIds["APPEARANCE_TARGET"] = "appearance.target";
|
|
560
|
+
SettingIds["CUSTOM_MENU_ITEMS"] = "appearance.customMenuItems";
|
|
561
|
+
SettingIds["REPORT_BUTTONS"] = "appearance.reportButtons";
|
|
562
|
+
SettingIds["APPEARANCE_CHART_TYPE"] = "appearance.chartType";
|
|
563
|
+
SettingIds["APPEARANCE_CHART_INT"] = "appearance.chartInt";
|
|
564
|
+
SettingIds["PINNED_PAIRS"] = "markets.pinnedPairs";
|
|
565
|
+
SettingIds["KYC_TRADE_REQUIREMENT_ENABLED"] = "markets.kycTradeRequirementEnabled";
|
|
566
|
+
SettingIds["AFFILIATE_DASHBOARD_VISIBILITY"] = "product.affiliateDashboardVisibility";
|
|
567
|
+
SettingIds["AFFILIATE_DASHBOARD_THRESHOLD"] = "product.affiliateDashboardThreshold";
|
|
568
|
+
SettingIds["AFFILIATE_DEFAULT_FEE_SHARE"] = "product.affiliateDefaultFeeShare";
|
|
569
|
+
SettingIds["AFFILIATE_POINTS_REWARD"] = "product.affiliatePointsReward";
|
|
570
|
+
SettingIds["POINT_SYSTEM_MODE"] = "product.pointSystem";
|
|
571
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_API_TOKEN"] = "point-system.telegramApiToken";
|
|
572
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_ENABLED"] = "point-system.telegramEnabled";
|
|
573
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_GROUP_ID"] = "point-system.telegramGroupId";
|
|
574
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_BOT_NAME"] = "point-system.telegramBotName";
|
|
575
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_BOT_ID"] = "point-system.telegramBotId";
|
|
576
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_GROUP_NAME"] = "point-system.telegramGroupName";
|
|
577
|
+
SettingIds["POINT_SYSTEM_TELEGRAM_WEBHOOK_TOKEN"] = "point-system.telegramWebhookToken";
|
|
578
|
+
SettingIds["POINT_SYSTEM_DISCORD_CLIENT_ID"] = "point-system.discordClientId";
|
|
579
|
+
SettingIds["POINT_SYSTEM_DISCORD_CLIENT_SECRET"] = "point-system.discordClientSecret";
|
|
580
|
+
SettingIds["POINT_SYSTEM_DISCORD_SERVER_ID"] = "point-system.discordServerId";
|
|
581
|
+
SettingIds["POINT_SYSTEM_DISCORD_ENABLED"] = "point-system.discordEnabled";
|
|
582
|
+
SettingIds["POINT_SYSTEM_TWITTER_CLIENT_ID"] = "point-system.twitterClientId";
|
|
583
|
+
SettingIds["POINT_SYSTEM_TWITTER_CLIENT_SECRET"] = "point-system.twitterClientSecret";
|
|
584
|
+
SettingIds["POINT_SYSTEM_TWITTER_BEARER_TOKEN"] = "point-system.twitterBearerToken";
|
|
585
|
+
SettingIds["POINT_SYSTEM_TWITTER_REFRESH_TOKEN"] = "point-system.twitterRefreshToken";
|
|
586
|
+
SettingIds["POINT_SYSTEM_TWITTER_ENABLED"] = "point-system.twitterEnabled";
|
|
587
|
+
SettingIds["POINT_SYSTEM_TWITTER_JOB_ENABLED"] = "point-system.twitterJobEnabled";
|
|
588
|
+
SettingIds["POINT_SYSTEM_TWITTER_HASHTAGS"] = "point-system.twitterHashtags";
|
|
589
|
+
SettingIds["POINT_SYSTEM_TWITTER_TWEET_EXP_TIME"] = "point-system.twitterPostDefaultExpirationTime";
|
|
590
|
+
SettingIds["POINT_SYSTEM_TWITTER_ACCOUNT_NAME"] = "point-system.twitterAccountName";
|
|
591
|
+
SettingIds["POINT_SYSTEM_TWITTER_ACCOUNT_ID"] = "point-system.twitterAccountId";
|
|
592
|
+
SettingIds["POINT_SYSTEM_TWITTER_WEBHOOK_TOKEN"] = "point-system.twitterWebhookToken";
|
|
593
|
+
SettingIds["POINT_SYSTEM_GUIDE_LINK"] = "point-system.guideLink";
|
|
594
|
+
})(SettingIds || (exports.SettingIds = SettingIds = {}));
|
|
595
|
+
var AffDashboardVisibilitySettingEnum;
|
|
596
|
+
(function (AffDashboardVisibilitySettingEnum) {
|
|
597
|
+
AffDashboardVisibilitySettingEnum["DISABLED"] = "disabled";
|
|
598
|
+
AffDashboardVisibilitySettingEnum["ENABLED_FOR_ALL"] = "enabled for all";
|
|
599
|
+
AffDashboardVisibilitySettingEnum["ENABLED_FOR_AFFILIATES"] = "enabled for affiliates";
|
|
600
|
+
})(AffDashboardVisibilitySettingEnum || (exports.AffDashboardVisibilitySettingEnum = AffDashboardVisibilitySettingEnum = {}));
|
|
601
|
+
var CredentialNameEnum;
|
|
602
|
+
(function (CredentialNameEnum) {
|
|
603
|
+
CredentialNameEnum["API_TOKEN"] = "apiToken";
|
|
604
|
+
CredentialNameEnum["CLIENT_ID"] = "clientId";
|
|
605
|
+
CredentialNameEnum["CLIENT_SECRET"] = "clientSecret";
|
|
606
|
+
CredentialNameEnum["BEARER_TOKEN"] = "bearerToken";
|
|
607
|
+
CredentialNameEnum["REFRESH_TOKEN"] = "refreshToken";
|
|
608
|
+
CredentialNameEnum["ACCESS_TOKEN"] = "accessToken";
|
|
609
|
+
})(CredentialNameEnum || (exports.CredentialNameEnum = CredentialNameEnum = {}));
|
|
610
|
+
exports.settingIdToSecretType = {
|
|
611
|
+
'point-system.telegramApiToken': CredentialNameEnum.API_TOKEN,
|
|
612
|
+
'point-system.discordClientId': CredentialNameEnum.CLIENT_ID,
|
|
613
|
+
'point-system.discordClientSecret': CredentialNameEnum.CLIENT_SECRET,
|
|
614
|
+
'point-system.twitterClientSecret': CredentialNameEnum.CLIENT_SECRET,
|
|
615
|
+
'point-system.twitterClientId': CredentialNameEnum.CLIENT_ID,
|
|
616
|
+
'point-system.twitterBearerToken': CredentialNameEnum.BEARER_TOKEN,
|
|
617
|
+
'point-system.twitterRefreshToken': CredentialNameEnum.REFRESH_TOKEN,
|
|
618
|
+
};
|
|
619
|
+
exports.requiredColors = [
|
|
620
|
+
'primary-1',
|
|
621
|
+
'primary-2',
|
|
622
|
+
'main-background',
|
|
623
|
+
'primary-text',
|
|
624
|
+
'module-background',
|
|
625
|
+
'buy-text',
|
|
626
|
+
'buy-background',
|
|
627
|
+
'sell-text',
|
|
628
|
+
'sell-background',
|
|
629
|
+
'secondary-text',
|
|
630
|
+
'input-background-default',
|
|
631
|
+
'input-background-hover',
|
|
632
|
+
'input-background-disabled',
|
|
633
|
+
'input-border-default',
|
|
634
|
+
'module-border',
|
|
635
|
+
'button-disabled',
|
|
636
|
+
'button-border',
|
|
637
|
+
'input-border-active',
|
|
638
|
+
'active-element-default',
|
|
639
|
+
'hover-element-default',
|
|
640
|
+
'dropdown-shadow',
|
|
641
|
+
'button-text',
|
|
642
|
+
'pair-active-row',
|
|
643
|
+
];
|
|
644
|
+
exports.defaultLogoSettingValue = `{"theme1":{"value":"${process.env.FRONTEND_URL}/Theme%3DDark.svg","active":true},"theme2":{"value":"${process.env.FRONTEND_URL}/Theme%3DLight.svg","active":true},"theme3":{"value":"${process.env.FRONTEND_URL}/Theme%3DLight.svg","active":true}}`;
|
|
645
|
+
exports.defaultThemeSettingValue = '{"theme1":{"name":"dark","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(1, 1, 1, 1)","primary-text":"rgba(255, 255, 255, 1)","module-background":"rgba(19, 23, 34, 1)","buy-text":"rgba(82, 164, 154, 1)","buy-background":"rgba(2, 199, 122, 0.25)","sell-text":"rgba(221, 94, 86, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","input-background-default":"rgba(13, 15, 21, 1)","input-background-hover":"rgba(28, 33, 45, 1)","input-background-disabled":"rgba(25, 29, 41, 1)","input-border-default":"rgba(28, 33, 45, 1)","module-border":"rgba(28, 33, 45, 1)","button-disabled":"rgba(111, 113, 118, 1)","button-border":"rgba(255, 255, 255, 1)","input-border-active":"rgba(185, 163, 238, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgba(28, 33, 45, 1)"}},"theme2":{"name":"light","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(249, 248, 248, 1)","primary-text":"rgba(0, 0, 0, 1)","module-background":"rgba(255, 255, 255, 1)","buy-text":"rgba(0, 112, 98, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-text":"rgba(195, 12, 1, 1)","sell-background":"rgba(255, 59, 105, 0.25)","secondary-text":"rgba(127, 127, 127, 1)","button-disabled":"rgba(203, 199, 199, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(249, 248, 248, 1)","input-border-default":"rgba(228, 225, 225, 1)","module-border":"rgba(228, 225, 225, 1)","button-border":"rgba(170, 167, 167, 1)","input-border-active":"rgba(0, 0, 0, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}},"theme3":{"name":"purple","active":true,"value":{"primary-1":"rgba(118, 63, 229, 1)","primary-2":"rgba(249, 132, 146, 1)","main-background":"rgba(255, 255, 255, 1)","primary-text":"rgba(0, 0, 0, 1)","secondary-text":"rgba(127, 127, 127, 1)","buy-text":"rgba(0, 112, 98, 1)","sell-text":"rgba(195, 12, 1, 1)","buy-background":"rgba(0, 112, 98, 0.25)","sell-background":"rgba(255, 59, 105, 0.25)","module-background":"rgba(254, 250, 255, 1)","module-border":"rgba(228, 225, 225, 1)","input-background-default":"rgba(255, 255, 255, 1)","input-background-hover":"rgba(249, 248, 248, 1)","input-background-disabled":"rgba(254, 250, 255, 1)","input-border-default":"rgba(228, 225, 225, 1)","input-border-active":"rgba(0, 0, 0, 1)","button-border":"rgba(170, 167, 167, 1)","button-disabled":"rgba(203, 199, 199, 1)","active-element-default":"rgba(230, 136, 150, 1)","hover-element-default":"rgba(185, 163, 238, 1)","dropdown-shadow":"rgba(154, 92, 253, 0.45)","button-text":"rgba(255, 255, 255, 1)","pair-active-row":"rgb(249, 248, 248)"}}}';
|
|
646
|
+
var defaultThemesValue;
|
|
647
|
+
(function (defaultThemesValue) {
|
|
648
|
+
defaultThemesValue["theme1"] = "{\"name\":\"dark\",\"id\":\"theme1\",\"active\":true, \"chartColors\":{\"bullish_candle_color\": \"rgba(2, 199, 122, 0.25)\",\"bearish_candle_color\": \"rgba(221, 94, 86, 1)\",\"bullish_wick_color\": \"rgba(2, 199, 122, 0.25)\",\"bearish_wick_color\": \"rgba(221, 94, 86, 1)\",\"bullish_outline_color\": \"rgba(2, 199, 122, 0.25)\",\"bearish_outline_color\": \"rgba(221, 94, 86, 1)\",\"line_color\": \"rgba(41, 98, 255, 1)\",\"chart_background\": \"rgba(19, 23, 34, 1)\",\"chart_text\": \"rgba(127, 127, 127, 1)\"}, \"colors\":{\"primary-1\":\"rgba(118, 63, 229, 1)\",\"primary-2\":\"rgba(249, 132, 146, 1)\",\"main-background\":\"rgba(1, 1, 1, 1)\",\"primary-text\":\"rgba(255, 255, 255, 1)\",\"module-background\":\"rgba(19, 23, 34, 1)\",\"buy-text\":\"rgba(82, 164, 154, 1)\",\"buy-background\":\"rgba(2, 199, 122, 0.25)\",\"sell-text\":\"rgba(221, 94, 86, 1)\",\"sell-background\":\"rgba(255, 59, 105, 0.25)\",\"secondary-text\":\"rgba(127, 127, 127, 1)\",\"input-background-default\":\"rgba(13, 15, 21, 1)\",\"input-background-hover\":\"rgba(28, 33, 45, 1)\",\"input-background-disabled\":\"rgba(25, 29, 41, 1)\",\"input-border-default\":\"rgba(28, 33, 45, 1)\",\"module-border\":\"rgba(28, 33, 45, 1)\",\"button-disabled\":\"rgba(111, 113, 118, 1)\",\"button-border\":\"rgba(255, 255, 255, 1)\",\"input-border-active\":\"rgba(185, 163, 238, 1)\",\"active-element-default\":\"rgba(230, 136, 150, 1)\",\"hover-element-default\":\"rgba(185, 163, 238, 1)\",\"dropdown-shadow\":\"rgba(154, 92, 253, 0.45)\",\"button-text\":\"rgba(255, 255, 255, 1)\",\"pair-active-row\":\"rgba(28, 33, 45, 1)\"}}";
|
|
649
|
+
defaultThemesValue["theme2"] = "{\"name\":\"light\",\"id\":\"theme2\",\"active\":true, \"chartColors\":{\"bullish_candle_color\": \"rgba(0, 112, 98, 1)\",\"bearish_candle_color\": \"rgba(195, 12, 1, 1)\",\"bullish_wick_color\": \"rgba(0, 112, 98, 1)\",\"bearish_wick_color\": \"rgba(195, 12, 1, 1)\",\"bullish_outline_color\": \"rgba(0, 112, 98, 1)\",\"bearish_outline_color\": \"rgba(195, 12, 1, 1)\",\"line_color\": \"rgba(41, 98, 255, 1)\",\"chart_background\": \"rgba(255, 255, 255, 1)\",\"chart_text\": \"rgba(127, 127, 127, 1)\"}, \"colors\":{\"primary-1\":\"rgba(118, 63, 229, 1)\",\"primary-2\":\"rgba(249, 132, 146, 1)\",\"main-background\":\"rgba(249, 248, 248, 1)\",\"primary-text\":\"rgba(0, 0, 0, 1)\",\"module-background\":\"rgba(255, 255, 255, 1)\",\"buy-text\":\"rgba(0, 112, 98, 1)\",\"buy-background\":\"rgba(0, 112, 98, 0.25)\",\"sell-text\":\"rgba(195, 12, 1, 1)\",\"sell-background\":\"rgba(255, 59, 105, 0.25)\",\"secondary-text\":\"rgba(127, 127, 127, 1)\",\"button-disabled\":\"rgba(203, 199, 199, 1)\",\"input-background-default\":\"rgba(255, 255, 255, 1)\",\"input-background-hover\":\"rgba(249, 248, 248, 1)\",\"input-background-disabled\":\"rgba(249, 248, 248, 1)\",\"input-border-default\":\"rgba(228, 225, 225, 1)\",\"module-border\":\"rgba(228, 225, 225, 1)\",\"button-border\":\"rgba(170, 167, 167, 1)\",\"input-border-active\":\"rgba(0, 0, 0, 1)\",\"active-element-default\":\"rgba(230, 136, 150, 1)\",\"hover-element-default\":\"rgba(185, 163, 238, 1)\",\"dropdown-shadow\":\"rgba(154, 92, 253, 0.45)\",\"button-text\":\"rgba(255, 255, 255, 1)\",\"pair-active-row\":\"rgb(249, 248, 248)\"}}";
|
|
650
|
+
defaultThemesValue["theme3"] = "{\"name\":\"purple\",\"id\":\"theme3\",\"active\":true, \"chartColors\":{\"bullish_candle_color\": \"rgba(0, 112, 98, 1)\",\"bearish_candle_color\": \"rgba(195, 12, 1, 1)\",\"bullish_wick_color\": \"rgba(0, 112, 98, 1)\",\"bearish_wick_color\": \"rgba(195, 12, 1, 1)\",\"bullish_outline_color\": \"rgba(0, 112, 98, 1)\",\"bearish_outline_color\": \"rgba(195, 12, 1, 1)\",\"line_color\": \"rgba(41, 98, 255, 1)\",\"chart_background\": \"rgba(254, 250, 255, 1)\",\"chart_text\": \"rgba(127, 127, 127, 1)\"}, \"colors\":{\"primary-1\":\"rgba(118, 63, 229, 1)\",\"primary-2\":\"rgba(249, 132, 146, 1)\",\"main-background\":\"rgba(255, 255, 255, 1)\",\"primary-text\":\"rgba(0, 0, 0, 1)\",\"secondary-text\":\"rgba(127, 127, 127, 1)\",\"buy-text\":\"rgba(0, 112, 98, 1)\",\"sell-text\":\"rgba(195, 12, 1, 1)\",\"buy-background\":\"rgba(0, 112, 98, 0.25)\",\"sell-background\":\"rgba(255, 59, 105, 0.25)\",\"module-background\":\"rgba(254, 250, 255, 1)\",\"module-border\":\"rgba(228, 225, 225, 1)\",\"input-background-default\":\"rgba(255, 255, 255, 1)\",\"input-background-hover\":\"rgba(249, 248, 248, 1)\",\"input-background-disabled\":\"rgba(254, 250, 255, 1)\",\"input-border-default\":\"rgba(228, 225, 225, 1)\",\"input-border-active\":\"rgba(0, 0, 0, 1)\",\"button-border\":\"rgba(170, 167, 167, 1)\",\"button-disabled\":\"rgba(203, 199, 199, 1)\",\"active-element-default\":\"rgba(230, 136, 150, 1)\",\"hover-element-default\":\"rgba(185, 163, 238, 1)\",\"dropdown-shadow\":\"rgba(154, 92, 253, 0.45)\",\"button-text\":\"rgba(255, 255, 255, 1)\",\"pair-active-row\":\"rgb(249, 248, 248)\"}}";
|
|
651
|
+
})(defaultThemesValue || (exports.defaultThemesValue = defaultThemesValue = {}));
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
/***/ }),
|
|
655
|
+
|
|
656
|
+
/***/ 7359:
|
|
657
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
661
|
+
exports.ChartQueryDto = exports.StatisticTypeQuery = exports.UsersQueryDto = exports.PairsQueryDto = exports.SmallTimeframeEnum = void 0;
|
|
662
|
+
var SmallTimeframeEnum;
|
|
663
|
+
(function (SmallTimeframeEnum) {
|
|
664
|
+
SmallTimeframeEnum["last_7_days"] = "last_7_days";
|
|
665
|
+
SmallTimeframeEnum["last_30_days"] = "last_30_days";
|
|
666
|
+
SmallTimeframeEnum["last_90_days"] = "last_90_days";
|
|
667
|
+
SmallTimeframeEnum["last_year"] = "last_year";
|
|
668
|
+
})(SmallTimeframeEnum || (exports.SmallTimeframeEnum = SmallTimeframeEnum = {}));
|
|
669
|
+
class PairsQueryDto {
|
|
670
|
+
constructor() {
|
|
671
|
+
this.timeRange = SmallTimeframeEnum.last_30_days;
|
|
672
|
+
this.sortBy = 'volume_usd';
|
|
673
|
+
this.order = 'desc';
|
|
674
|
+
this.limit = 20;
|
|
675
|
+
this.page = 1;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
exports.PairsQueryDto = PairsQueryDto;
|
|
679
|
+
class UsersQueryDto {
|
|
680
|
+
constructor() {
|
|
681
|
+
this.timeRange = SmallTimeframeEnum.last_30_days;
|
|
682
|
+
this.sortBy = 'volume_usd';
|
|
683
|
+
this.order = 'desc';
|
|
684
|
+
this.limit = 20;
|
|
685
|
+
this.page = 1;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
exports.UsersQueryDto = UsersQueryDto;
|
|
689
|
+
var StatisticTypeQuery;
|
|
690
|
+
(function (StatisticTypeQuery) {
|
|
691
|
+
StatisticTypeQuery["volume"] = "volume";
|
|
692
|
+
StatisticTypeQuery["fees"] = "fees";
|
|
693
|
+
StatisticTypeQuery["orders"] = "orders";
|
|
694
|
+
StatisticTypeQuery["dau"] = "dau";
|
|
695
|
+
})(StatisticTypeQuery || (exports.StatisticTypeQuery = StatisticTypeQuery = {}));
|
|
696
|
+
class ChartQueryDto {
|
|
697
|
+
constructor() {
|
|
698
|
+
this.type = StatisticTypeQuery.volume;
|
|
699
|
+
this.timeRange = SmallTimeframeEnum.last_7_days;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
exports.ChartQueryDto = ChartQueryDto;
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
/***/ }),
|
|
706
|
+
|
|
707
|
+
/***/ 9181:
|
|
708
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
//--import { Asset } from "@ultrade/shared/db/entities/market/asset.entity";
|
|
712
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
713
|
+
exports.AmmBucketKeys = exports.VALIDATOR_APP_ID = exports.CONTRACT_VERSION = exports.AmmForeignResources = exports.AmmChars = exports.AmmIds = exports.PoolType = void 0;
|
|
714
|
+
var PoolType;
|
|
715
|
+
(function (PoolType) {
|
|
716
|
+
PoolType["STABLE"] = "stable";
|
|
717
|
+
PoolType["CPMM"] = "constant_product";
|
|
718
|
+
PoolType["LEND"] = "lending";
|
|
719
|
+
PoolType["NANO"] = "nano";
|
|
720
|
+
PoolType["MVNANO"] = "mvnano";
|
|
721
|
+
})(PoolType || (exports.PoolType = PoolType = {}));
|
|
722
|
+
var AmmIds;
|
|
723
|
+
(function (AmmIds) {
|
|
724
|
+
AmmIds[AmmIds["ultrade"] = 0] = "ultrade";
|
|
725
|
+
AmmIds[AmmIds["tinyman"] = 1] = "tinyman";
|
|
726
|
+
AmmIds[AmmIds["pactfi"] = 2] = "pactfi";
|
|
727
|
+
AmmIds[AmmIds["humble"] = 3] = "humble";
|
|
728
|
+
AmmIds[AmmIds["algofi"] = 4] = "algofi";
|
|
729
|
+
})(AmmIds || (exports.AmmIds = AmmIds = {}));
|
|
730
|
+
var AmmChars;
|
|
731
|
+
(function (AmmChars) {
|
|
732
|
+
AmmChars["ultrade"] = "U";
|
|
733
|
+
AmmChars["tinyman"] = "T";
|
|
734
|
+
AmmChars["pactfi"] = "P";
|
|
735
|
+
AmmChars["humble"] = "H";
|
|
736
|
+
AmmChars["algofi"] = "A";
|
|
737
|
+
})(AmmChars || (exports.AmmChars = AmmChars = {}));
|
|
738
|
+
var AmmForeignResources;
|
|
739
|
+
(function (AmmForeignResources) {
|
|
740
|
+
AmmForeignResources[AmmForeignResources["ultrade"] = 1] = "ultrade";
|
|
741
|
+
AmmForeignResources[AmmForeignResources["tinyman"] = 2] = "tinyman";
|
|
742
|
+
AmmForeignResources[AmmForeignResources["pactfi"] = 1] = "pactfi";
|
|
743
|
+
AmmForeignResources[AmmForeignResources["humble"] = 1] = "humble";
|
|
744
|
+
AmmForeignResources[AmmForeignResources["algofi"] = 2] = "algofi";
|
|
745
|
+
})(AmmForeignResources || (exports.AmmForeignResources = AmmForeignResources = {}));
|
|
746
|
+
exports.CONTRACT_VERSION = {
|
|
747
|
+
V1_1: 'v1_1',
|
|
748
|
+
V2: 'v2',
|
|
749
|
+
};
|
|
750
|
+
exports.VALIDATOR_APP_ID = {
|
|
751
|
+
[exports.CONTRACT_VERSION.V1_1]: {
|
|
752
|
+
testnet: 62368684,
|
|
753
|
+
mainnet: 552635992,
|
|
754
|
+
},
|
|
755
|
+
[exports.CONTRACT_VERSION.V2]: {
|
|
756
|
+
testnet: 148607000,
|
|
757
|
+
mainnet: 1002541853,
|
|
758
|
+
},
|
|
759
|
+
};
|
|
760
|
+
var AmmBucketKeys;
|
|
761
|
+
(function (AmmBucketKeys) {
|
|
762
|
+
AmmBucketKeys["ASSETS"] = "assets.json";
|
|
763
|
+
AmmBucketKeys["TOP_ASSETS"] = "topAssets.json";
|
|
764
|
+
})(AmmBucketKeys || (exports.AmmBucketKeys = AmmBucketKeys = {}));
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
/***/ }),
|
|
768
|
+
|
|
769
|
+
/***/ 9730:
|
|
770
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
774
|
+
if (k2 === undefined) k2 = k;
|
|
775
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
776
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
777
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
778
|
+
}
|
|
779
|
+
Object.defineProperty(o, k2, desc);
|
|
780
|
+
}) : (function(o, m, k, k2) {
|
|
781
|
+
if (k2 === undefined) k2 = k;
|
|
782
|
+
o[k2] = m[k];
|
|
783
|
+
}));
|
|
784
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
785
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
786
|
+
};
|
|
787
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
788
|
+
exports.sortKeysInObject = sortKeysInObject;
|
|
789
|
+
exports.round2 = round2;
|
|
790
|
+
__exportStar(__webpack_require__(5910), exports);
|
|
791
|
+
__exportStar(__webpack_require__(865), exports);
|
|
792
|
+
__exportStar(__webpack_require__(839), exports);
|
|
793
|
+
function sortKeysInObject(o) {
|
|
794
|
+
return Object.keys(o).sort().reduce((acc, key) => ({ ...acc, [key]: o[key] }), {});
|
|
795
|
+
}
|
|
796
|
+
function round2(val) { return Math.round(val * 100) / 100; }
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
/***/ })
|
|
800
|
+
|
|
801
|
+
/******/ });
|
|
802
|
+
/************************************************************************/
|
|
803
|
+
/******/ // The module cache
|
|
804
|
+
/******/ var __webpack_module_cache__ = {};
|
|
805
|
+
/******/
|
|
806
|
+
/******/ // The require function
|
|
807
|
+
/******/ function __webpack_require__(moduleId) {
|
|
808
|
+
/******/ // Check if module is in cache
|
|
809
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
810
|
+
/******/ if (cachedModule !== undefined) {
|
|
811
|
+
/******/ return cachedModule.exports;
|
|
812
|
+
/******/ }
|
|
813
|
+
/******/ // Create a new module (and put it into the cache)
|
|
814
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
815
|
+
/******/ // no module.id needed
|
|
816
|
+
/******/ // no module.loaded needed
|
|
817
|
+
/******/ exports: {}
|
|
818
|
+
/******/ };
|
|
819
|
+
/******/
|
|
820
|
+
/******/ // Execute the module function
|
|
821
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
822
|
+
/******/
|
|
823
|
+
/******/ // Return the exports of the module
|
|
824
|
+
/******/ return module.exports;
|
|
825
|
+
/******/ }
|
|
826
|
+
/******/
|
|
827
|
+
/************************************************************************/
|
|
828
|
+
/******/
|
|
829
|
+
/******/ // startup
|
|
830
|
+
/******/ // Load entry module and return exports
|
|
831
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
832
|
+
/******/ var __webpack_exports__ = __webpack_require__(9730);
|
|
833
|
+
/******/
|
|
834
|
+
/******/ return __webpack_exports__;
|
|
835
|
+
/******/ })()
|
|
836
|
+
;
|
|
837
|
+
});
|