biome unsafe fix

This commit is contained in:
sim1222 2025-04-17 12:57:00 +09:00
parent 9f15f21f9d
commit f4eb72c178
Signed by: sim1222
GPG Key ID: D1AE30E316E44E5D

View File

@ -2,29 +2,29 @@
/*! @ohtomi-preamble version: 8.1.0, name:src_components_faceRecognition_FaceRecognition_tsx-src_components_shared_organisms_Player_Ove-59cc90 */ /*! @ohtomi-preamble version: 8.1.0, name:src_components_faceRecognition_FaceRecognition_tsx-src_components_shared_organisms_Player_Ove-59cc90 */
try { try {
const e = const e =
"undefined" != typeof window "undefined" !== typeof window
? window ? window
: "undefined" != typeof global : "undefined" !== typeof global
? global ? global
: "undefined" != typeof globalThis : "undefined" !== typeof globalThis
? globalThis ? globalThis
: "undefined" != typeof self : "undefined" !== typeof self
? self ? self
: {}, : {};
t = new e.Error().stack; const t = new e.Error().stack;
t && t &&
((e._sentryDebugIds = e._sentryDebugIds || {}), ((e._sentryDebugIds = e._sentryDebugIds || {}),
(e._sentryDebugIds[t] = "78ff2760-29f1-40c0-a35f-3f4f11d9a7f9"), (e._sentryDebugIds[t] = "78ff2760-29f1-40c0-a35f-3f4f11d9a7f9"),
(e._sentryDebugIdIdentifier = (e._sentryDebugIdIdentifier =
"sentry-dbid-78ff2760-29f1-40c0-a35f-3f4f11d9a7f9")); "sentry-dbid-78ff2760-29f1-40c0-a35f-3f4f11d9a7f9"));
} catch (e) {} } catch (e) {}
("undefined" != typeof window ("undefined" !== typeof window
? window ? window
: "undefined" != typeof global : "undefined" !== typeof global
? global ? global
: "undefined" != typeof globalThis : "undefined" !== typeof globalThis
? globalThis ? globalThis
: "undefined" != typeof self : "undefined" !== typeof self
? self ? self
: {}).SENTRY_RELEASE = { id: "ohtomi@8.1.0" }; : {}).SENTRY_RELEASE = { id: "ohtomi@8.1.0" };
(self.webpackChunkOhtomi = self.webpackChunkOhtomi || []).push([ (self.webpackChunkOhtomi = self.webpackChunkOhtomi || []).push([
@ -34,12 +34,12 @@ try {
{ {
98024: (e, t, n) => { 98024: (e, t, n) => {
n.d(t, { B: () => o }); n.d(t, { B: () => o });
var a = n(96540); const a = n(96540);
function o({ disabled: e = !1, storedDevice: t } = {}) { function o({ disabled: e = !1, storedDevice: t } = {}) {
const [n, o] = (0, a.useState)(null), const [n, o] = (0, a.useState)(null);
[inputDevices, setInputDevices] = (0, a.useState)([]), const [inputDevices, setInputDevices] = (0, a.useState)([]);
[s, c] = (0, a.useState)(), const [s, c] = (0, a.useState)();
l = (0, a.useCallback)(async () => { const l = (0, a.useCallback)(async () => {
try { try {
await navigator.mediaDevices await navigator.mediaDevices
.getUserMedia({ video: !0 }) .getUserMedia({ video: !0 })
@ -53,17 +53,19 @@ try {
.then((MediaDevices) => { .then((MediaDevices) => {
o(null); o(null);
const videoInputDevices = MediaDevices.filter( const videoInputDevices = MediaDevices.filter(
(mediaDevice) => mediaDevice.kind === "videoinput" && mediaDevice.label !== "", (mediaDevice) =>
mediaDevice.kind === "videoinput" &&
mediaDevice.label !== "",
); );
if ( if (
(setInputDevices(videoInputDevices), (setInputDevices(videoInputDevices),
!s || !s ||
!videoInputDevices.some( !videoInputDevices.some(
(e) => (e) => e.deviceId === s.deviceId || e.label === s.label,
e.deviceId === s.deviceId || e.label === s.label,
)) ))
) { ) {
var a, r; let a;
let r;
const e = const e =
null !== null !==
(a = (a =
@ -80,23 +82,21 @@ try {
? a ? a
: videoInputDevices[0]; : videoInputDevices[0];
if (null == e) if (null == e)
throw new Error( throw new Error("利用可能なカメラデバイスが存在しません");
"利用可能なカメラデバイスが存在しません",
);
c(e); c(e);
} }
}); });
} catch (e) { } catch (e) {
o(e); o(e);
} }
}, [ }, [s, null == t ? void 0 : t.deviceId, null == t ? void 0 : t.label]);
s, const d = (0, a.useCallback)(
null == t ? void 0 : t.deviceId,
null == t ? void 0 : t.label,
]),
d = (0, a.useCallback)(
(e) => { (e) => {
c(null == inputDevices ? void 0 : inputDevices.find((t) => t.deviceId === e)); c(
null == inputDevices
? void 0
: inputDevices.find((t) => t.deviceId === e),
);
}, },
[inputDevices], [inputDevices],
); );
@ -114,36 +114,41 @@ try {
)), )),
[e, l], [e, l],
), ),
{ error: n, availableDevices: inputDevices, currentDevice: s, select: d } {
error: n,
availableDevices: inputDevices,
currentDevice: s,
select: d,
}
); );
} }
}, },
81801: (e, t, n) => { 81801: (e, t, n) => {
n.d(t, { y: () => i }); n.d(t, { y: () => i });
var a = n(96540), const a = n(96540);
o = n(78685); const o = n(78685);
const r = "camera-device"; const r = "camera-device";
function i() { function i() {
const [e, t] = (0, o.A)(r, void 0, { const [e, t] = (0, o.A)(r, void 0, {
raw: !1, raw: !1,
serializer: (e) => JSON.stringify(e), serializer: (e) => JSON.stringify(e),
deserializer: (e) => JSON.parse(e), deserializer: (e) => JSON.parse(e),
}), });
n = (0, a.useCallback)((e) => t(e), [t]); const n = (0, a.useCallback)((e) => t(e), [t]);
return { device: e, save: n }; return { device: e, save: n };
} }
}, },
77177: (e, t, n) => { 77177: (e, t, n) => {
n.d(t, { j: () => C }); n.d(t, { j: () => C });
var a = n(96540), const a = n(96540);
o = n(98024), const o = n(98024);
r = n(81801); const r = n(81801);
const i = Math.floor(25.5); const i = Math.floor(25.5);
const s = { width: 440, height: 440, type: "image/jpeg" }; const s = { width: 440, height: 440, type: "image/jpeg" };
function c({ status: e, onStatusChanged: t, onCapture: n, onError: c }) { function c({ status: e, onStatusChanged: t, onCapture: n, onError: c }) {
const { device: l } = (0, r.y)(), const { device: l } = (0, r.y)();
{ currentDevice: d } = (0, o.B)({ storedDevice: l }), const { currentDevice: d } = (0, o.B)({ storedDevice: l });
{ captureImage: u } = (({ deviceId: e }) => ({ const { captureImage: u } = (({ deviceId: e }) => ({
captureImage: (0, a.useCallback)( captureImage: (0, a.useCallback)(
async ({ width: t, height: n, type: a, quality: o }) => { async ({ width: t, height: n, type: a, quality: o }) => {
const r = await navigator.mediaDevices.getUserMedia({ const r = await navigator.mediaDevices.getUserMedia({
@ -152,8 +157,8 @@ try {
width: t, width: t,
height: n, height: n,
}, },
}), });
s = r.getVideoTracks()[0]; const s = r.getVideoTracks()[0];
if (null == s) if (null == s)
throw new Error("映像トラックを取得できませんでした"); throw new Error("映像トラックを取得できませんでした");
const { width: c, height: l } = s.getSettings(); const { width: c, height: l } = s.getSettings();
@ -170,9 +175,9 @@ try {
const d = s.getContext("2d", { willReadFrequently: !0 }); const d = s.getContext("2d", { willReadFrequently: !0 });
if (!d) if (!d)
throw new Error("Canvasの2Dコンテキスト取得に失敗しました"); throw new Error("Canvasの2Dコンテキスト取得に失敗しました");
const u = performance.now() + 1e3, const u = performance.now() + 1e3;
h = { x: Math.floor(t / 2), y: Math.floor(n / 2) }, const h = { x: Math.floor(t / 2), y: Math.floor(n / 2) };
p = (([e, t], [n, a]) => { const p = (([e, t], [n, a]) => {
const o = { src: e / t, dest: n / a }; const o = { src: e / t, dest: n / a };
return o.src < o.dest return o.src < o.dest
? { ? {
@ -213,8 +218,8 @@ try {
}, },
[e], [e],
), ),
}))({ deviceId: null == d ? void 0 : d.deviceId }), }))({ deviceId: null == d ? void 0 : d.deviceId });
[h, p] = (0, a.useState)(!1); const [h, p] = (0, a.useState)(!1);
return ( return (
(0, a.useEffect)(() => { (0, a.useEffect)(() => {
null == (null == d ? void 0 : d.deviceId) || null == (null == d ? void 0 : d.deviceId) ||
@ -234,9 +239,9 @@ try {
null null
); );
} }
var l = n(35830), const l = n(35830);
d = n(73305), const d = n(73305);
u = n(74848); const u = n(74848);
function h({ status: e, horizontalAlign: t }) { function h({ status: e, horizontalAlign: t }) {
return (0, u.jsxs)(p, { return (0, u.jsxs)(p, {
horizontalAlign: t, horizontalAlign: t,
@ -280,29 +285,29 @@ try {
({ theme: e }) => e.space[1], ({ theme: e }) => e.space[1],
({ theme: e }) => e.colors.white, ({ theme: e }) => e.colors.white,
({ theme: e }) => e.colors.transparent.blackClear20, ({ theme: e }) => e.colors.transparent.blackClear20,
), );
f = l.default.div.withConfig({ componentId: "sc-1rzrjyt-1" })( const f = l.default.div.withConfig({ componentId: "sc-1rzrjyt-1" })(
["color:", ";font-size:1.2rem;"], ["color:", ";font-size:1.2rem;"],
({ theme: e }) => e.colors.white, ({ theme: e }) => e.colors.white,
), );
v = (0, l.default)(d.A) const v = (0, l.default)(d.A)
.attrs({ type: "capture-face-progress", size: "8px" }) .attrs({ type: "capture-face-progress", size: "8px" })
.withConfig({ componentId: "sc-1rzrjyt-2" })( .withConfig({ componentId: "sc-1rzrjyt-2" })(
["color:", ";"], ["color:", ";"],
({ theme: e }) => e.colors.accent5, ({ theme: e }) => e.colors.accent5,
), );
g = (0, l.default)(d.A) const g = (0, l.default)(d.A)
.attrs({ type: "capture-face-error", size: "8px" }) .attrs({ type: "capture-face-error", size: "8px" })
.withConfig({ componentId: "sc-1rzrjyt-3" })( .withConfig({ componentId: "sc-1rzrjyt-3" })(
["color:", ";"], ["color:", ";"],
({ theme: e }) => e.colors.warning, ({ theme: e }) => e.colors.warning,
), );
m = Symbol("result"); const m = Symbol("result");
var w = n(71083), const w = n(71083);
y = n(53110), const y = n(53110);
x = n(78776); const x = n(78776);
const b = w.A.create({ baseURL: x.A.horusApiEndPoint }), const b = w.A.create({ baseURL: x.A.horusApiEndPoint });
k = { const k = {
uploadImageAsync: async ({ sessionId: e, image: t }) => { uploadImageAsync: async ({ sessionId: e, image: t }) => {
const n = w.A.toFormData({ image: t }); const n = w.A.toFormData({ image: t });
return await b return await b
@ -313,18 +318,18 @@ try {
return (0, y.F0)(e) return (0, y.F0)(e)
? ((t = e), { [m]: "failure", error: t }) ? ((t = e), { [m]: "failure", error: t })
: ((e) => ({ [m]: "success", data: e }))(e.data); : ((e) => ({ [m]: "success", data: e }))(e.data);
var t; let t;
}); });
}, },
}; };
var I = n(80724); const I = n(80724);
function C({ capture: e, horizontalAlign: t, contextDetail: n }) { function C({ capture: e, horizontalAlign: t, contextDetail: n }) {
const [i, s] = (0, a.useState)(void 0), const [i, s] = (0, a.useState)(void 0);
{ device: l } = (0, r.y)(), const { device: l } = (0, r.y)();
{ currentDevice: d, error: p } = (0, o.B)({ storedDevice: l }), const { currentDevice: d, error: p } = (0, o.B)({ storedDevice: l });
[f, v] = (0, a.useState)(), const [f, v] = (0, a.useState)();
[g, w] = (0, a.useState)(""), const [g, w] = (0, a.useState)("");
y = (0, a.useRef)(!1); const y = (0, a.useRef)(!1);
(0, a.useEffect)(() => { (0, a.useEffect)(() => {
null == i && (null == p ? null != d && s("progress") : s("failed")); null == i && (null == p ? null != d && s("progress") : s("failed"));
}, [d, p, i]), }, [d, p, i]),
@ -350,7 +355,7 @@ try {
); );
const x = (0, I.R)(); const x = (0, I.R)();
(0, a.useEffect)(() => { (0, a.useEffect)(() => {
var e; let e;
(null == (null == d ? void 0 : d.deviceId) && null == p) || (null == (null == d ? void 0 : d.deviceId) && null == p) ||
g || g ||
y.current || y.current ||
@ -403,9 +408,9 @@ try {
})); }));
}, },
[g], [g],
), );
C = (0, a.useCallback)(() => {}, []), const C = (0, a.useCallback)(() => {}, []);
_ = (0, a.useMemo)( const _ = (0, a.useMemo)(
() => () =>
e && "progress" === i && g e && "progress" === i && g
? (0, u.jsx)(c, { ? (0, u.jsx)(c, {
@ -424,26 +429,26 @@ try {
}, },
60616: (e, t, n) => { 60616: (e, t, n) => {
n.d(t, { v: () => r }); n.d(t, { v: () => r });
var a = n(35830), const a = n(35830);
o = n(62851); const o = n(62851);
const r = (0, a.default)(o.A).withConfig({ componentId: "sc-131fzem-0" })( const r = (0, a.default)(o.A).withConfig({ componentId: "sc-131fzem-0" })(
["font-size:40px;opacity:1;&:hover{cursor:pointer;}"], ["font-size:40px;opacity:1;&:hover{cursor:pointer;}"],
); );
}, },
21721: (e, t, n) => { 21721: (e, t, n) => {
n.d(t, { b: () => p }); n.d(t, { b: () => p });
var a = n(63998), const a = n(63998);
o = n(35830), const o = n(35830);
r = n(96540), const r = n(96540);
i = n(74848); const i = n(74848);
const s = ({ rate: e, currentRate: t, onClick: n }) => { const s = ({ rate: e, currentRate: t, onClick: n }) => {
const a = (0, r.useCallback)(() => { const a = (0, r.useCallback)(() => {
n(e); n(e);
}, [e, n]), }, [e, n]);
o = Math.abs(e - t) < 0.001; const o = Math.abs(e - t) < 0.001;
return (0, i.jsx)(c, { selected: o, onClick: a, children: `x${e}` }); return (0, i.jsx)(c, { selected: o, onClick: a, children: `x${e}` });
}, };
c = o.default.button.withConfig({ componentId: "sc-1iiy24x-0" })( const c = o.default.button.withConfig({ componentId: "sc-1iiy24x-0" })(
[ [
"display:flex;width:48px;height:27px;font-size:13px;font-weight:700;align-items:center;color:", "display:flex;width:48px;height:27px;font-size:13px;font-weight:700;align-items:center;color:",
";justify-content:center;border-radius:2px;padding:2px;margin:2px;background-color:", ";justify-content:center;border-radius:2px;padding:2px;margin:2px;background-color:",
@ -502,16 +507,16 @@ try {
], ],
}); });
} }
var d = (0, o.default)(a.so).withConfig({ componentId: "sc-v2jbux-0" })( const d = (0, o.default)(a.so).withConfig({ componentId: "sc-v2jbux-0" })(
(e) => ({ display: e.$_css }), (e) => ({ display: e.$_css }),
), );
u = n(60616); const u = n(60616);
const h = (0, o.default)(u.v).withConfig({ componentId: "sc-16km7w-0" })( const h = (0, o.default)(u.v).withConfig({ componentId: "sc-16km7w-0" })(
["color:", ";&:hover{color:", ";}"], ["color:", ";&:hover{color:", ";}"],
({ theme: e }) => e.colors.white, ({ theme: e }) => e.colors.white,
({ theme: e }) => e.colors.primary, ({ theme: e }) => e.colors.primary,
), );
p = ({ playbackRate: e, playbackRatesDropdownMenuProps: t }) => { const p = ({ playbackRate: e, playbackRatesDropdownMenuProps: t }) => {
const { const {
isHover: n, isHover: n,
isOpenRateList: o, isOpenRateList: o,
@ -565,10 +570,10 @@ try {
}, },
41233: (e, t, n) => { 41233: (e, t, n) => {
n.d(t, { y: () => o }); n.d(t, { y: () => o });
var a = n(96540); const a = n(96540);
function o({ changePlaybackRate: e }) { function o({ changePlaybackRate: e }) {
const [t, n] = (0, a.useState)(!1), const [t, n] = (0, a.useState)(!1);
[o, r] = (0, a.useState)(!1); const [o, r] = (0, a.useState)(!1);
return { return {
isHover: t, isHover: t,
isOpenRateList: o, isOpenRateList: o,
@ -592,15 +597,15 @@ try {
}, },
58169: (e, t, n) => { 58169: (e, t, n) => {
n.d(t, { A: () => c }); n.d(t, { A: () => c });
var a = n(57097), const a = n(57097);
o = n(53110), const o = n(53110);
r = n(80724), const r = n(80724);
i = n(70195), const i = n(70195);
s = n(21137); const s = n(21137);
const c = () => { const c = () => {
const e = (0, r.R)(), const e = (0, r.R)();
{ showSnackbar: t } = (0, i.d)(s), const { showSnackbar: t } = (0, i.d)(s);
{ mutate: n } = (0, a.n)({ const { mutate: n } = (0, a.n)({
mutationFn: e.postLearningAmounts, mutationFn: e.postLearningAmounts,
retry: (e, n) => { retry: (e, n) => {
if (e > 2) if (e > 2)
@ -611,17 +616,13 @@ try {
message: "学習数を記録できませんでした", message: "学習数を記録できませんでした",
actionLabel: "学習数とは", actionLabel: "学習数とは",
onClick: () => { onClick: () => {
window.open( window.open("/help#learning_amount", "_blank", "noopener");
"/help#learning_amount",
"_blank",
"noopener",
);
}, },
}), }),
!1 !1
); );
const a = !n.response, const a = !n.response;
r = n.code === o.pe.ECONNABORTED; const r = n.code === o.pe.ECONNABORTED;
return a || r; return a || r;
}, },
retryDelay: 1e3, retryDelay: 1e3,
@ -631,7 +632,7 @@ try {
}, },
49474: (e, t, n) => { 49474: (e, t, n) => {
n.d(t, { J: () => o }); n.d(t, { J: () => o });
var a = n(96540); const a = n(96540);
function o(e) { function o(e) {
const [t, n] = (0, a.useState)("prompt"); const [t, n] = (0, a.useState)("prompt");
return ( return (
@ -664,7 +665,7 @@ try {
courseType: r, courseType: r,
materialType: i, materialType: i,
}) { }) {
var s; let s;
if (void 0 === e && void 0 === t) if (void 0 === e && void 0 === t)
(window.dataLayer = (window.dataLayer =
null !== (s = window.dataLayer) && void 0 !== s ? s : []), null !== (s = window.dataLayer) && void 0 !== s ? s : []),
@ -678,7 +679,7 @@ try {
}, },
}); });
else if (void 0 === e) { else if (void 0 === e) {
var c; let c;
(window.dataLayer = (window.dataLayer =
null !== (c = window.dataLayer) && void 0 !== c ? c : []), null !== (c = window.dataLayer) && void 0 !== c ? c : []),
window.dataLayer.push({ window.dataLayer.push({
@ -692,7 +693,7 @@ try {
}, },
}); });
} else if (void 0 === t) { } else if (void 0 === t) {
var l; let l;
(window.dataLayer = (window.dataLayer =
null !== (l = window.dataLayer) && void 0 !== l ? l : []), null !== (l = window.dataLayer) && void 0 !== l ? l : []),
window.dataLayer.push({ window.dataLayer.push({
@ -706,7 +707,7 @@ try {
}, },
}); });
} else { } else {
var d; let d;
(window.dataLayer = (window.dataLayer =
null !== (d = window.dataLayer) && void 0 !== d ? d : []), null !== (d = window.dataLayer) && void 0 !== d ? d : []),
window.dataLayer.push({ window.dataLayer.push({