decord/source/stores/EditMessageStore.tsx

185 lines
4.8 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 5947
// Function ID: 52613
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-28 08:39:19 +00:00
// Dependencies: [6, 7, 15, 17, 18, 4384, 3838, 5948, 5951, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-28 08:39:19 +00:00
// Module 5947 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import explicitContentFromProto from "explicitContentFromProto";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
let closure_9 = {};
let closure_10 = {};
2026-07-23 10:11:24 +00:00
let tmp2 = ((Store) => {
2026-07-20 16:05:17 +00:00
class EditMessageStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_3(this, EditMessageStore);
obj = outer1_6(EditMessageStore);
tmp2 = outer1_5;
if (outer1_11()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_6;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-23 10:11:24 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_6(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(EditMessageStore, Store);
let obj = {
key: "initialize",
value() {
2026-07-23 10:11:24 +00:00
this.waitFor(outer1_8);
2026-07-20 16:05:17 +00:00
}
};
const items = [obj, , , , , , , ];
obj = {
key: "isEditing",
value(arg0, arg1) {
let messageId;
2026-07-23 10:11:24 +00:00
if (null != outer1_9[arg0]) {
2026-07-20 16:05:17 +00:00
messageId = tmp.messageId;
}
return messageId === arg1;
}
};
items[1] = obj;
obj = {
key: "isEditingAny",
value(arg0) {
2026-07-23 10:11:24 +00:00
return null != outer1_9[arg0];
2026-07-20 16:05:17 +00:00
}
};
items[2] = obj;
items[3] = {
key: "getEditingTextValue",
value(arg0) {
let textValue;
2026-07-23 10:11:24 +00:00
if (null != outer1_9[arg0]) {
2026-07-20 16:05:17 +00:00
textValue = tmp.textValue;
}
return textValue;
}
};
items[4] = {
key: "getEditingRichValue",
value(arg0) {
let richValue;
2026-07-23 10:11:24 +00:00
if (null != outer1_9[arg0]) {
2026-07-20 16:05:17 +00:00
richValue = tmp.richValue;
}
return richValue;
}
};
items[5] = {
key: "getEditingMessageId",
value(arg0) {
let messageId;
2026-07-23 10:11:24 +00:00
if (null != outer1_9[arg0]) {
2026-07-20 16:05:17 +00:00
messageId = tmp.messageId;
}
return messageId;
}
};
items[6] = {
key: "getEditingMessage",
value(arg0) {
let message = null;
2026-07-23 10:11:24 +00:00
if (null != outer1_9[arg0]) {
2026-07-20 16:05:17 +00:00
message = null;
if (null != tmp.messageId) {
2026-07-23 10:11:24 +00:00
message = outer1_8.getMessage(arg0, tmp.messageId);
2026-07-20 16:05:17 +00:00
}
}
return message;
}
};
items[7] = {
key: "getEditActionSource",
value(arg0) {
2026-07-23 10:11:24 +00:00
return outer1_10[arg0];
2026-07-20 16:05:17 +00:00
}
};
return callback(EditMessageStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-20 16:05:17 +00:00
tmp2.displayName = "EditMessageStore";
2026-07-23 10:11:24 +00:00
tmp2 = new tmp2(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
MESSAGE_START_EDIT: function handleMessageStartEdit(arg0) {
let channelId;
let content;
let messageId;
let source;
({ channelId, content } = arg0);
({ messageId, source } = arg0);
2026-07-28 08:39:19 +00:00
const UseLegacyChatInput = require(3838) /* explicitContentFromProto */.UseLegacyChatInput;
2026-07-20 16:05:17 +00:00
const setting = UseLegacyChatInput.getSetting();
2026-07-28 08:39:19 +00:00
let obj = importDefault(5948);
2026-07-20 16:05:17 +00:00
const unparseResult = obj.unparse(content, channelId);
obj = { channelId, messageId, textValue: unparseResult };
if (setting) {
content = unparseResult;
}
2026-07-28 08:39:19 +00:00
obj.richValue = require(5951) /* toRichValue */.toRichValue(content);
2026-07-20 16:05:17 +00:00
closure_9[channelId] = obj;
closure_10[channelId] = source;
},
MESSAGE_UPDATE_EDIT: function handleMessageUpdateEdit(channelId) {
channelId = channelId.channelId;
2026-07-23 10:11:24 +00:00
if (null == dependencyMap[channelId]) {
2026-07-20 16:05:17 +00:00
return false;
} else {
const obj = {};
const merged = Object.assign(tmp3);
obj["textValue"] = tmp;
obj["richValue"] = tmp2;
2026-07-23 10:11:24 +00:00
dependencyMap[channelId] = obj;
2026-07-20 16:05:17 +00:00
}
},
MESSAGE_END_EDIT: function handleMessageEndEdit(channelId) {
channelId = channelId.channelId;
if (null != channelId) {
2026-07-23 10:11:24 +00:00
if (null != dependencyMap[channelId]) {
delete tmp3[tmp2];
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
}
return false;
},
MESSAGE_DELETE: function handleMessageDelete(id) {
let messageId;
2026-07-23 10:11:24 +00:00
if (null != dependencyMap[id.channelId]) {
messageId = tmp4.messageId;
2026-07-20 16:05:17 +00:00
}
if (messageId === id.id) {
2026-07-23 10:11:24 +00:00
delete tmp3[tmp2];
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
},
LOGOUT: function handleLogout() {
let closure_9 = {};
let closure_10 = {};
}
});
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("stores/EditMessageStore.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;