Files
discord-decomp/_bundle/Module4853.js
T
2026-11-01 12:12:55 +02:00

105 lines
3.6 KiB
JavaScript

// Metro module 4853 (f4854).
import Module4825 from "./Module4825";
let c2987_2 = {
INCHES: 2,
CENTIMETERS: 3,
MILLIMETERS: 4
};
let c2987_3 = 25.4;
let c2987_4 = 10;
let c2987_5 = 1;
export default {
get: function get(a0, a1) {
const r7 = a1 && (a0.exif && a0.exif.FocalLength) ? a0.exif.FocalLength.value : a1 ? void 0 : a0.FocalLength ? a0.FocalLength.value : void 0;
const r12 = a1 && (a0.exif && a0.exif.FocalPlaneXResolution) ? a0.exif.FocalPlaneXResolution.value : a1 ? void 0 : a0.FocalPlaneXResolution ? a0.FocalPlaneXResolution.value : void 0;
const r11 = a1 && (a0.exif && a0.exif.FocalPlaneYResolution) ? a0.exif.FocalPlaneYResolution.value : a1 ? void 0 : a0.FocalPlaneYResolution ? a0.FocalPlaneYResolution.value : void 0;
const r10 = a1 && (a0.exif && a0.exif.FocalPlaneResolutionUnit) ? a0.exif.FocalPlaneResolutionUnit.value : a1 ? void 0 : a0.FocalPlaneResolutionUnit ? a0.FocalPlaneResolutionUnit.value : void 0;
const r9 = a1 && (a0.file && a0.file["Image Width"]) ? a0.file["Image Width"].value : a1 ? void 0 : a0["Image Width"] ? a0["Image Width"].value : void 0;
const r57 = a1 && (a0.file && a0.file["Image Height"]) ? a0.file["Image Height"].value : a1 ? void 0 : a0["Image Height"] ? a0["Image Height"].value : void 0;
const value = (a1 && (a0.exif && a0.exif.FocalLengthIn35mmFilm) ? a0.exif.FocalLengthIn35mmFilm.value : a1 ? void 0 : a0.FocalLengthIn35mmFilm ? a0.FocalLengthIn35mmFilm.value : void 0) || (function getFocalLengthIn35mmFilmValue(a0, a1, a2, a3, a4, a5) {
let r15, r39;
L16: {
if (a0 && a1 && a2 && a3 && a4 && a5) {
L14: {
L9: {
try {
if (c2987_2.INCHES === a2) {
r15 = c2987_3;
} else if (c2987_2.CENTIMETERS === a2) {
r15 = c2987_4;
} else {
if (c2987_2.MILLIMETERS !== a2) {
break L9;
}
r15 = c2987_5;
}
r39 = a5[0] / a5[1] * (43.27 / Math.sqrt((a3 / (a0[0] / a0[1] * r15)) ** 2 + (a4 / (a1[0] / a1[1] * r15)) ** 2));
break L14;
} catch ($e) {
break L16;
}
}
return void 0;
}
return r39;
}
}
})(r12, r11, r10, r9, r57, r7);
const r71 = {};
let r2 = false;
if (value) {
r71.FocalLength35efl = {
value,
description: Module4825.FocalLengthIn35mmFilm(value)
};
r2 = true;
}
const ScaleFactorTo35mmEquivalent = (function getScaleFactorTo35mmEquivalent(a0, a1) {
let r9;
L5: {
if (a0 && a1) {
try {
const value = a1 / (a0[0] / a0[1]);
r9 = {
value,
description: value.toFixed(1)
};
} catch ($e) {
break L5;
}
return r9;
}
}
})(r7, value);
if (ScaleFactorTo35mmEquivalent) {
r71.ScaleFactorTo35mmEquivalent = ScaleFactorTo35mmEquivalent;
r2 = true;
}
const FieldOfView = (function getFieldOfView(a0) {
let r20;
L4: {
if (a0) {
try {
const value = 2 * Math.atan(36 / (2 * a0)) * (180 / Math.PI);
r20 = {
value,
description: value.toFixed(1) + " deg"
};
} catch ($e) {
break L4;
}
return r20;
}
}
})(value);
if (FieldOfView) {
r71.FieldOfView = FieldOfView;
r2 = true;
}
if (r2) {
return r71;
}
}
};
export { c2987_2 as FOCAL_PLANE_RESOLUTION_UNIT };