decord/source/modules/vibegrations/native/VibegrationsArchivePicker.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

135 lines
4.4 KiB
TypeScript

// Module ID: 16739
// Function ID: 16740
// Name: VibegrationsArchivePicker
// Dependencies: [5, 16725, 11369, 7355, 1115, 3591, 2]
// Exports: describeVibegrationsArchiveRejection, pickVibegrationsArchive, sendVibegrationsArchiveImport
// Module 16739 (VibegrationsArchivePicker)
import _modDef3591 from "module_3591" /* 3591 */;
import FilePickerUtils from "FilePickerUtils" /* 11369 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
require = fn;
let closure_8 = async function _pickVibegrationsArchive() {
closure_130_0 = await FilePickerUtils.handleDocumentSelection({ pickMultiple: false, extensions });
if (closure_130_0 != null) {
const first = closure_130_0[0];
}
closure_130_1 = first;
if (null == closure_130_1) {
return null;
}
let str3 = "application/octet-stream";
if (null != closure_130_1.type) {
str3 = "application/octet-stream";
if ("" !== closure_130_1.type) {
str3 = closure_130_1.type;
}
}
closure_130_2 = str3;
value = {};
const _fetch = fetch;
await fetch(closure_130_1.uri);
value.bytes = await arg1.blob();
let name = closure_130_1.name;
if (name == null) {
name = "archive.zip";
}
value.name = name;
value.contentType = closure_130_2;
return value;
};
let closure_9 = async function _sendVibegrationsArchiveImport(arg0, value) {
if (c6 === 2) {
c6 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp5 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c6 = 2;
if (0 === c5) {
if (arg0 === 1) {
c6 = 3;
throw value;
} else if (arg0 === 2) {
c6 = 3;
const obj3 = { value, done: true };
return obj3;
} else {
closure_4 = tmp2;
closure_3 = tmp3;
closure_131_0 = closure_0;
closure_131_1 = closure_2;
closure_131_2 = undefined;
React4(closure_0);
c5 = 1;
c6 = 1;
const obj4 = { value: timestampProducer(closure_0, importDefault.bytes, importDefault.name, importDefault.contentType), done: false };
return obj4;
}
} else if (arg0 === 1) {
c6 = 3;
throw value;
} else if (arg0 === 2) {
c6 = 3;
const obj = { value, done: true };
return obj;
} else {
closure_131_2 = value;
const items = [closure_131_2];
closure_132_5(closure_131_0, closure_131_1, items);
c6 = 3;
return { value: "HermesInternal", done: null };
}
} catch (tmp21) {
c6 = tmp;
throw tmp21;
}
}
};
const VibegrationsConnectionStore = fn(16725);
({ ensureConnection: closure_4, sendUserMessage: hasOwnProperty, uploadAttachmentBytes: metroRequire } = VibegrationsConnectionStore);
let closure_7 = ["zip", "tar", "gz", "tgz", "rar"];
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/native/VibegrationsArchivePicker.tsx");
export const pickVibegrationsArchive = function pickVibegrationsArchive() {
const self = this;
const apply = closure_8.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};
export const describeVibegrationsArchiveRejection = function describeVibegrationsArchiveRejection(bytes) {
let formatToPlainStringResult = null;
if (!obj.isVibegrationsAttachmentWithinLimit(bytes.bytes.size, bytes.contentType)) {
const intl = tmp(1115).intl;
const obj2 = { size: null };
const tmpResult = tmp(7355);
obj2.size = tmpResult.formatVibegrationsAttachmentLimit(tmp(7355).vibegrationsAttachmentLimit(bytes.contentType));
formatToPlainStringResult = intl.formatToPlainString(_modDef3591.AzziHF, obj2);
const tmpResult2 = tmp(7355);
}
return formatToPlainStringResult;
};
export const sendVibegrationsArchiveImport = function sendVibegrationsArchiveImport() {
const self = this;
const apply = closure_9.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};