@aiquants/menu-bar 1.17.7 → 1.17.9
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/index.es.js +397 -273
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
- package/src/contents/MenuContent.tsx +2 -1
- package/src/contents/MenuList.tsx +8 -1
- package/src/lucide-icons.d.ts +6 -0
package/dist/index.es.js
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
var re;
|
|
1
|
+
import ke, { forwardRef as me, createElement as B, useMemo as re, useState as z, useRef as C, useEffect as L, useCallback as w, useLayoutEffect as pe } from "react";
|
|
2
|
+
import { useLocation as we, Link as he } from "react-router-dom";
|
|
3
|
+
var D = { exports: {} }, O = {};
|
|
4
|
+
var oe;
|
|
6
5
|
function je() {
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
function a
|
|
6
|
+
if (oe) return O;
|
|
7
|
+
oe = 1;
|
|
8
|
+
var n = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
+
function o(a, c, i) {
|
|
11
10
|
var u = null;
|
|
12
11
|
if (i !== void 0 && (u = "" + i), c.key !== void 0 && (u = "" + c.key), "key" in c) {
|
|
13
12
|
i = {};
|
|
14
|
-
for (var
|
|
15
|
-
|
|
13
|
+
for (var p in c)
|
|
14
|
+
p !== "key" && (i[p] = c[p]);
|
|
16
15
|
} else i = c;
|
|
17
16
|
return c = i.ref, {
|
|
18
|
-
$$typeof:
|
|
19
|
-
type:
|
|
17
|
+
$$typeof: n,
|
|
18
|
+
type: a,
|
|
20
19
|
key: u,
|
|
21
20
|
ref: c !== void 0 ? c : null,
|
|
22
21
|
props: i
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return O.Fragment = r, O.jsx = o, O.jsxs = o, O;
|
|
26
25
|
}
|
|
27
|
-
var
|
|
26
|
+
var I = {};
|
|
28
27
|
var se;
|
|
29
|
-
function
|
|
28
|
+
function Ne() {
|
|
30
29
|
return se || (se = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
-
function
|
|
30
|
+
function n(e) {
|
|
32
31
|
if (e == null) return null;
|
|
33
32
|
if (typeof e == "function")
|
|
34
33
|
return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
@@ -36,15 +35,15 @@ function Ee() {
|
|
|
36
35
|
switch (e) {
|
|
37
36
|
case m:
|
|
38
37
|
return "Fragment";
|
|
39
|
-
case E:
|
|
40
|
-
return "Profiler";
|
|
41
38
|
case N:
|
|
39
|
+
return "Profiler";
|
|
40
|
+
case _:
|
|
42
41
|
return "StrictMode";
|
|
43
42
|
case P:
|
|
44
43
|
return "Suspense";
|
|
45
|
-
case
|
|
44
|
+
case H:
|
|
46
45
|
return "SuspenseList";
|
|
47
|
-
case
|
|
46
|
+
case q:
|
|
48
47
|
return "Activity";
|
|
49
48
|
}
|
|
50
49
|
if (typeof e == "object")
|
|
@@ -53,19 +52,19 @@ function Ee() {
|
|
|
53
52
|
), e.$$typeof) {
|
|
54
53
|
case s:
|
|
55
54
|
return "Portal";
|
|
56
|
-
case
|
|
55
|
+
case F:
|
|
57
56
|
return e.displayName || "Context";
|
|
58
|
-
case
|
|
57
|
+
case Y:
|
|
59
58
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return e = e.displayName, e || (e =
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
|
|
59
|
+
case V:
|
|
60
|
+
var l = e.render;
|
|
61
|
+
return e = e.displayName, e || (e = l.displayName || l.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
|
+
case W:
|
|
63
|
+
return l = e.displayName || null, l !== null ? l : n(e.type) || "Memo";
|
|
64
|
+
case T:
|
|
65
|
+
l = e._payload, e = e._init;
|
|
67
66
|
try {
|
|
68
|
-
return
|
|
67
|
+
return n(e(l));
|
|
69
68
|
} catch {
|
|
70
69
|
}
|
|
71
70
|
}
|
|
@@ -74,74 +73,74 @@ function Ee() {
|
|
|
74
73
|
function r(e) {
|
|
75
74
|
return "" + e;
|
|
76
75
|
}
|
|
77
|
-
function
|
|
76
|
+
function o(e) {
|
|
78
77
|
try {
|
|
79
78
|
r(e);
|
|
80
|
-
var
|
|
79
|
+
var l = !1;
|
|
81
80
|
} catch {
|
|
82
|
-
|
|
81
|
+
l = !0;
|
|
83
82
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
83
|
+
if (l) {
|
|
84
|
+
l = console;
|
|
85
|
+
var h = l.error, y = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
86
|
+
return h.call(
|
|
87
|
+
l,
|
|
89
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
89
|
+
y
|
|
91
90
|
), r(e);
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
function
|
|
93
|
+
function a(e) {
|
|
95
94
|
if (e === m) return "<>";
|
|
96
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
95
|
+
if (typeof e == "object" && e !== null && e.$$typeof === T)
|
|
97
96
|
return "<...>";
|
|
98
97
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
98
|
+
var l = n(e);
|
|
99
|
+
return l ? "<" + l + ">" : "<...>";
|
|
101
100
|
} catch {
|
|
102
101
|
return "<...>";
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
function c() {
|
|
106
|
-
var e =
|
|
105
|
+
var e = E.A;
|
|
107
106
|
return e === null ? null : e.getOwner();
|
|
108
107
|
}
|
|
109
108
|
function i() {
|
|
110
109
|
return Error("react-stack-top-frame");
|
|
111
110
|
}
|
|
112
111
|
function u(e) {
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
112
|
+
if (R.call(e, "key")) {
|
|
113
|
+
var l = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
|
+
if (l && l.isReactWarning) return !1;
|
|
116
115
|
}
|
|
117
116
|
return e.key !== void 0;
|
|
118
117
|
}
|
|
119
|
-
function
|
|
120
|
-
function
|
|
121
|
-
|
|
118
|
+
function p(e, l) {
|
|
119
|
+
function h() {
|
|
120
|
+
X || (X = !0, console.error(
|
|
122
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
|
-
|
|
122
|
+
l
|
|
124
123
|
));
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
125
|
+
h.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
126
|
+
get: h,
|
|
128
127
|
configurable: !0
|
|
129
128
|
});
|
|
130
129
|
}
|
|
131
130
|
function b() {
|
|
132
|
-
var e =
|
|
133
|
-
return
|
|
131
|
+
var e = n(this.type);
|
|
132
|
+
return K[e] || (K[e] = !0, console.error(
|
|
134
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
134
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
135
|
}
|
|
137
|
-
function d(e,
|
|
138
|
-
var v =
|
|
136
|
+
function d(e, l, h, y, $, J) {
|
|
137
|
+
var v = h.ref;
|
|
139
138
|
return e = {
|
|
140
|
-
$$typeof:
|
|
139
|
+
$$typeof: S,
|
|
141
140
|
type: e,
|
|
142
|
-
key:
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
141
|
+
key: l,
|
|
142
|
+
props: h,
|
|
143
|
+
_owner: y
|
|
145
144
|
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
145
|
enumerable: !1,
|
|
147
146
|
get: b
|
|
@@ -159,69 +158,69 @@ function Ee() {
|
|
|
159
158
|
configurable: !1,
|
|
160
159
|
enumerable: !1,
|
|
161
160
|
writable: !0,
|
|
162
|
-
value:
|
|
161
|
+
value: $
|
|
163
162
|
}), Object.defineProperty(e, "_debugTask", {
|
|
164
163
|
configurable: !1,
|
|
165
164
|
enumerable: !1,
|
|
166
165
|
writable: !0,
|
|
167
|
-
value:
|
|
166
|
+
value: J
|
|
168
167
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
168
|
}
|
|
170
|
-
function f(e,
|
|
171
|
-
var v =
|
|
169
|
+
function f(e, l, h, y, $, J) {
|
|
170
|
+
var v = l.children;
|
|
172
171
|
if (v !== void 0)
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
|
|
172
|
+
if (y)
|
|
173
|
+
if (U(v)) {
|
|
174
|
+
for (y = 0; y < v.length; y++)
|
|
175
|
+
g(v[y]);
|
|
177
176
|
Object.freeze && Object.freeze(v);
|
|
178
177
|
} else
|
|
179
178
|
console.error(
|
|
180
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
180
|
);
|
|
182
|
-
else
|
|
183
|
-
if (
|
|
184
|
-
v =
|
|
185
|
-
var
|
|
186
|
-
return
|
|
181
|
+
else g(v);
|
|
182
|
+
if (R.call(l, "key")) {
|
|
183
|
+
v = n(e);
|
|
184
|
+
var A = Object.keys(l).filter(function(ge) {
|
|
185
|
+
return ge !== "key";
|
|
187
186
|
});
|
|
188
|
-
|
|
187
|
+
y = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", ne[v + y] || (A = 0 < A.length ? "{" + A.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
189
|
let props = %s;
|
|
191
190
|
<%s {...props} />
|
|
192
191
|
React keys must be passed directly to JSX without using spread:
|
|
193
192
|
let props = %s;
|
|
194
193
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
|
|
194
|
+
y,
|
|
196
195
|
v,
|
|
197
|
-
|
|
196
|
+
A,
|
|
198
197
|
v
|
|
199
|
-
),
|
|
198
|
+
), ne[v + y] = !0);
|
|
200
199
|
}
|
|
201
|
-
if (v = null,
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return v &&
|
|
207
|
-
|
|
200
|
+
if (v = null, h !== void 0 && (o(h), v = "" + h), u(l) && (o(l.key), v = "" + l.key), "key" in l) {
|
|
201
|
+
h = {};
|
|
202
|
+
for (var G in l)
|
|
203
|
+
G !== "key" && (h[G] = l[G]);
|
|
204
|
+
} else h = l;
|
|
205
|
+
return v && p(
|
|
206
|
+
h,
|
|
208
207
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
208
|
), d(
|
|
210
209
|
e,
|
|
211
210
|
v,
|
|
212
|
-
|
|
211
|
+
h,
|
|
213
212
|
c(),
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
$,
|
|
214
|
+
J
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
|
-
function
|
|
219
|
-
j(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof ===
|
|
217
|
+
function g(e) {
|
|
218
|
+
j(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? j(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
220
219
|
}
|
|
221
220
|
function j(e) {
|
|
222
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === S;
|
|
223
222
|
}
|
|
224
|
-
var x =
|
|
223
|
+
var x = ke, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), s = /* @__PURE__ */ Symbol.for("react.portal"), m = /* @__PURE__ */ Symbol.for("react.fragment"), _ = /* @__PURE__ */ Symbol.for("react.strict_mode"), N = /* @__PURE__ */ Symbol.for("react.profiler"), Y = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), q = /* @__PURE__ */ Symbol.for("react.activity"), k = /* @__PURE__ */ Symbol.for("react.client.reference"), E = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, R = Object.prototype.hasOwnProperty, U = Array.isArray, Z = console.createTask ? console.createTask : function() {
|
|
225
224
|
return null;
|
|
226
225
|
};
|
|
227
226
|
x = {
|
|
@@ -229,70 +228,195 @@ React keys must be passed directly to JSX without using spread:
|
|
|
229
228
|
return e();
|
|
230
229
|
}
|
|
231
230
|
};
|
|
232
|
-
var
|
|
231
|
+
var X, K = {}, ee = x.react_stack_bottom_frame.bind(
|
|
233
232
|
x,
|
|
234
233
|
i
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
234
|
+
)(), te = Z(a(i)), ne = {};
|
|
235
|
+
I.Fragment = m, I.jsx = function(e, l, h) {
|
|
236
|
+
var y = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
238
237
|
return f(
|
|
239
238
|
e,
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
l,
|
|
240
|
+
h,
|
|
242
241
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
y ? Error("react-stack-top-frame") : ee,
|
|
243
|
+
y ? Z(a(e)) : te
|
|
245
244
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
245
|
+
}, I.jsxs = function(e, l, h) {
|
|
246
|
+
var y = 1e4 > E.recentlyCreatedOwnerStacks++;
|
|
248
247
|
return f(
|
|
249
248
|
e,
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
l,
|
|
250
|
+
h,
|
|
252
251
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
y ? Error("react-stack-top-frame") : ee,
|
|
253
|
+
y ? Z(a(e)) : te
|
|
255
254
|
);
|
|
256
255
|
};
|
|
257
|
-
})()),
|
|
256
|
+
})()), I;
|
|
258
257
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
258
|
+
var ae;
|
|
259
|
+
function Ee() {
|
|
260
|
+
return ae || (ae = 1, process.env.NODE_ENV === "production" ? D.exports = je() : D.exports = Ne()), D.exports;
|
|
262
261
|
}
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
const { user: r, LinkComponent:
|
|
266
|
-
return /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
262
|
+
var t = Ee();
|
|
263
|
+
const _e = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", Se = ({ to: n, className: r, children: o }) => /* @__PURE__ */ t.jsx("a", { href: n, className: r, children: o }), nt = (n) => {
|
|
264
|
+
const { user: r, LinkComponent: o = Se } = n;
|
|
265
|
+
return /* @__PURE__ */ t.jsx("div", { className: "max-h-20 max-w-52", children: /* @__PURE__ */ t.jsx("div", { className: "flex grow flex-col", children: r ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
266
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-row", children: [
|
|
267
|
+
/* @__PURE__ */ t.jsx("div", { className: "aiquants-session-photo m-1 h-14 w-14 p-0.5", children: /* @__PURE__ */ t.jsx("img", { className: "object-contain", src: r.photo || _e, "aria-label": "profile photo" }) }),
|
|
268
|
+
/* @__PURE__ */ t.jsxs("div", { className: "mx-1 flex flex-col", children: [
|
|
269
|
+
/* @__PURE__ */ t.jsx(o, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィールを編集" }),
|
|
270
|
+
/* @__PURE__ */ t.jsx(o, { className: "aiquants-session-link rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィール" }),
|
|
271
|
+
/* @__PURE__ */ t.jsx(o, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "https://myaccount.google.com/", children: "Google Account" })
|
|
273
272
|
] })
|
|
274
273
|
] }),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
] }) : /* @__PURE__ */
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
274
|
+
/* @__PURE__ */ t.jsx("div", { className: "aiquants-session-info mb-1 min-h-[1em] w-full rounded-r-lg px-2 py-0.5 text-xs", children: r.displayName })
|
|
275
|
+
] }) : /* @__PURE__ */ t.jsx("div", { className: "aiquants-session-info mb-1 min-h-[1em] w-9/12 rounded-r-lg py-0.5 pl-1 text-xs", children: "ログインはこちら" }) }) });
|
|
276
|
+
};
|
|
277
|
+
const Ce = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Te = (n) => n.replace(
|
|
278
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
279
|
+
(r, o, a) => a ? a.toUpperCase() : o.toLowerCase()
|
|
280
|
+
), le = (n) => {
|
|
281
|
+
const r = Te(n);
|
|
282
|
+
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
283
|
+
}, be = (...n) => n.filter((r, o, a) => !!r && r.trim() !== "" && a.indexOf(r) === o).join(" ").trim(), Re = (n) => {
|
|
284
|
+
for (const r in n)
|
|
285
|
+
if (r.startsWith("aria-") || r === "role" || r === "title")
|
|
286
|
+
return !0;
|
|
287
|
+
};
|
|
288
|
+
var Me = {
|
|
289
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
290
|
+
width: 24,
|
|
291
|
+
height: 24,
|
|
292
|
+
viewBox: "0 0 24 24",
|
|
293
|
+
fill: "none",
|
|
294
|
+
stroke: "currentColor",
|
|
295
|
+
strokeWidth: 2,
|
|
296
|
+
strokeLinecap: "round",
|
|
297
|
+
strokeLinejoin: "round"
|
|
298
|
+
};
|
|
299
|
+
const Pe = me(
|
|
300
|
+
({
|
|
301
|
+
color: n = "currentColor",
|
|
302
|
+
size: r = 24,
|
|
303
|
+
strokeWidth: o = 2,
|
|
304
|
+
absoluteStrokeWidth: a,
|
|
305
|
+
className: c = "",
|
|
306
|
+
children: i,
|
|
307
|
+
iconNode: u,
|
|
308
|
+
...p
|
|
309
|
+
}, b) => B(
|
|
310
|
+
"svg",
|
|
311
|
+
{
|
|
312
|
+
ref: b,
|
|
313
|
+
...Me,
|
|
314
|
+
width: r,
|
|
315
|
+
height: r,
|
|
316
|
+
stroke: n,
|
|
317
|
+
strokeWidth: a ? Number(o) * 24 / Number(r) : o,
|
|
318
|
+
className: be("lucide", c),
|
|
319
|
+
...!i && !Re(p) && { "aria-hidden": "true" },
|
|
320
|
+
...p
|
|
321
|
+
},
|
|
322
|
+
[
|
|
323
|
+
...u.map(([d, f]) => B(d, f)),
|
|
324
|
+
...Array.isArray(i) ? i : [i]
|
|
325
|
+
]
|
|
326
|
+
)
|
|
327
|
+
);
|
|
328
|
+
const M = (n, r) => {
|
|
329
|
+
const o = me(
|
|
330
|
+
({ className: a, ...c }, i) => B(Pe, {
|
|
331
|
+
ref: i,
|
|
332
|
+
iconNode: r,
|
|
333
|
+
className: be(
|
|
334
|
+
`lucide-${Ce(le(n))}`,
|
|
335
|
+
`lucide-${n}`,
|
|
336
|
+
a
|
|
337
|
+
),
|
|
338
|
+
...c
|
|
339
|
+
})
|
|
340
|
+
);
|
|
341
|
+
return o.displayName = le(n), o;
|
|
342
|
+
};
|
|
343
|
+
const Ae = [
|
|
344
|
+
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
345
|
+
[
|
|
346
|
+
"path",
|
|
347
|
+
{
|
|
348
|
+
d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
|
|
349
|
+
key: "1nkz8b"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
], xe = M("pin", Ae);
|
|
353
|
+
const Oe = [
|
|
354
|
+
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
355
|
+
["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
|
|
356
|
+
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
357
|
+
[
|
|
358
|
+
"path",
|
|
359
|
+
{
|
|
360
|
+
d: "M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",
|
|
361
|
+
key: "c9qhm2"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
], ye = M("pin-off", Oe);
|
|
365
|
+
const Ie = [
|
|
366
|
+
["path", { d: "M5 21v-6", key: "1hz6c0" }],
|
|
367
|
+
["path", { d: "M12 21V9", key: "uvy0l4" }],
|
|
368
|
+
["path", { d: "M19 21V3", key: "11j9sm" }]
|
|
369
|
+
], Le = M("chart-no-axes-column-increasing", Ie);
|
|
370
|
+
const qe = [
|
|
371
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
372
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
373
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
374
|
+
], $e = M("download", qe);
|
|
375
|
+
const De = [
|
|
376
|
+
[
|
|
377
|
+
"path",
|
|
378
|
+
{
|
|
379
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
380
|
+
key: "1oefj6"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
384
|
+
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
385
|
+
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
386
|
+
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
387
|
+
], ie = M("file-text", De);
|
|
388
|
+
const ze = [
|
|
389
|
+
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
390
|
+
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
391
|
+
], Ye = M("link", ze);
|
|
392
|
+
const Fe = [
|
|
393
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
394
|
+
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
395
|
+
], Ve = M("lock", Fe);
|
|
396
|
+
const He = [
|
|
397
|
+
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
398
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
399
|
+
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
400
|
+
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
401
|
+
], We = M("table", He), Ue = typeof window < "u" ? pe : L, ce = "aiquants-menu-scroll", ve = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), Ze = {
|
|
402
|
+
report: ie,
|
|
403
|
+
slip: ie,
|
|
404
|
+
table: We,
|
|
405
|
+
chart: Le,
|
|
406
|
+
download: $e,
|
|
407
|
+
lock: Ve,
|
|
408
|
+
href: Ye
|
|
409
|
+
}, Je = ({ mark: n, children: r }) => {
|
|
410
|
+
const o = n ? Ze[n] : void 0;
|
|
411
|
+
return o ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-nowrap items-center", children: [
|
|
412
|
+
/* @__PURE__ */ t.jsx(o, { className: "h-4 w-4" }),
|
|
413
|
+
/* @__PURE__ */ t.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: r })
|
|
414
|
+
] }) : /* @__PURE__ */ t.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: r });
|
|
415
|
+
}, Q = (n, r) => r ? {
|
|
292
416
|
menu: {
|
|
293
|
-
id:
|
|
294
|
-
title:
|
|
295
|
-
href:
|
|
417
|
+
id: n.id,
|
|
418
|
+
title: n.title,
|
|
419
|
+
href: n.href
|
|
296
420
|
},
|
|
297
421
|
submenu: {
|
|
298
422
|
subid: r.subid,
|
|
@@ -303,60 +427,60 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
303
427
|
}
|
|
304
428
|
} : {
|
|
305
429
|
menu: {
|
|
306
|
-
id:
|
|
307
|
-
title:
|
|
308
|
-
href:
|
|
430
|
+
id: n.id,
|
|
431
|
+
title: n.title,
|
|
432
|
+
href: n.href
|
|
309
433
|
}
|
|
310
|
-
},
|
|
311
|
-
if (
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
const
|
|
434
|
+
}, Ge = ({ item: n, parentMenu: r, onMenuSelected: o }) => {
|
|
435
|
+
if (n.href === "separator")
|
|
436
|
+
return /* @__PURE__ */ t.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
437
|
+
const a = /* @__PURE__ */ t.jsx(Je, { mark: n.mark, children: n.title }), c = {
|
|
314
438
|
onClick: () => {
|
|
315
|
-
|
|
439
|
+
o && o(Q(r, n));
|
|
316
440
|
}
|
|
317
441
|
};
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
const
|
|
321
|
-
for (const
|
|
322
|
-
if (
|
|
323
|
-
return
|
|
324
|
-
if (
|
|
325
|
-
for (const c of
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
442
|
+
return n.new ? /* @__PURE__ */ t.jsx("a", { href: n.href, rel: "noopener noreferrer", target: "_blank", ...c, children: a }) : ve.test(n.href) ? /* @__PURE__ */ t.jsx("a", { href: n.href, ...c, children: a }) : /* @__PURE__ */ t.jsx(he, { to: n.href, ...c, children: a });
|
|
443
|
+
}, ue = (n) => n ? n.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", de = (n, r) => {
|
|
444
|
+
const o = r !== "/" && r.endsWith("/") ? r.slice(0, -1) : r;
|
|
445
|
+
for (const a of n) {
|
|
446
|
+
if (ue(a.href) === o)
|
|
447
|
+
return a.id;
|
|
448
|
+
if (a.submenu) {
|
|
449
|
+
for (const c of a.submenu)
|
|
450
|
+
if (ue(c.href) === o)
|
|
451
|
+
return a.id;
|
|
328
452
|
}
|
|
329
453
|
}
|
|
330
454
|
return null;
|
|
331
|
-
},
|
|
332
|
-
const { menuList: r, onMenuSelected:
|
|
455
|
+
}, Be = (n) => {
|
|
456
|
+
const { menuList: r, onMenuSelected: o, pinnedSubmenuIds: a = [], onToggleSubmenuPin: c } = n;
|
|
333
457
|
let i = "";
|
|
334
458
|
try {
|
|
335
459
|
i = we().pathname;
|
|
336
460
|
} catch {
|
|
337
461
|
typeof window < "u" && (i = window.location.pathname);
|
|
338
462
|
}
|
|
339
|
-
const u =
|
|
340
|
-
|
|
463
|
+
const u = re(() => de(r, i), [r, i]), [p, b] = z(u), d = C(i), f = C(u !== null);
|
|
464
|
+
L(() => {
|
|
341
465
|
if (d.current !== i && (d.current = i, f.current = !1), !f.current) {
|
|
342
|
-
const s =
|
|
466
|
+
const s = de(r, i);
|
|
343
467
|
s !== null && (b(s), f.current = !0);
|
|
344
468
|
}
|
|
345
469
|
}, [i, r]);
|
|
346
|
-
const
|
|
470
|
+
const g = w(
|
|
347
471
|
(s) => {
|
|
348
|
-
|
|
472
|
+
a.includes(s) || b((_) => _ === s ? null : s);
|
|
349
473
|
},
|
|
350
|
-
[
|
|
351
|
-
), j =
|
|
352
|
-
|
|
474
|
+
[a]
|
|
475
|
+
), j = C(null);
|
|
476
|
+
Ue(() => {
|
|
353
477
|
const s = j.current;
|
|
354
478
|
if (s)
|
|
355
479
|
try {
|
|
356
|
-
const m = sessionStorage.getItem(
|
|
480
|
+
const m = sessionStorage.getItem(ce);
|
|
357
481
|
if (m !== null) {
|
|
358
|
-
const
|
|
359
|
-
Number.isNaN(
|
|
482
|
+
const _ = Number.parseFloat(m);
|
|
483
|
+
Number.isNaN(_) || (s.scrollTop = _);
|
|
360
484
|
}
|
|
361
485
|
} catch {
|
|
362
486
|
}
|
|
@@ -365,65 +489,65 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
365
489
|
const s = j.current;
|
|
366
490
|
if (s)
|
|
367
491
|
try {
|
|
368
|
-
sessionStorage.setItem(
|
|
492
|
+
sessionStorage.setItem(ce, String(s.scrollTop));
|
|
369
493
|
} catch {
|
|
370
494
|
}
|
|
371
|
-
}, []),
|
|
495
|
+
}, []), S = re(() => /* @__PURE__ */ t.jsx(t.Fragment, { children: r.map((s) => /* @__PURE__ */ t.jsx("div", { children: s.href ? /* @__PURE__ */ t.jsx("div", { className: "aiquants-menu-list-item relative mb-1 ml-1 h-full rounded-l-2xl p-2 align-middle text-sm before:-mt-1 before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:align-middle before:content-['']", children: ve.test(s.href) ? /* @__PURE__ */ t.jsx(
|
|
372
496
|
"a",
|
|
373
497
|
{
|
|
374
498
|
href: s.href,
|
|
375
499
|
onClick: () => {
|
|
376
|
-
|
|
500
|
+
o && o(Q(s));
|
|
377
501
|
},
|
|
378
|
-
children: /* @__PURE__ */
|
|
502
|
+
children: /* @__PURE__ */ t.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
|
|
379
503
|
}
|
|
380
|
-
) : /* @__PURE__ */
|
|
381
|
-
|
|
504
|
+
) : /* @__PURE__ */ t.jsx(
|
|
505
|
+
he,
|
|
382
506
|
{
|
|
383
507
|
to: s.href,
|
|
384
508
|
onClick: () => {
|
|
385
|
-
|
|
509
|
+
o && o(Q(s));
|
|
386
510
|
},
|
|
387
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ t.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
|
|
388
512
|
}
|
|
389
|
-
) }) : /* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
513
|
+
) }) : /* @__PURE__ */ t.jsxs("details", { className: "aiquants-menu-accordion-details", open: s.id === p || a.includes(s.id), children: [
|
|
514
|
+
/* @__PURE__ */ t.jsxs(
|
|
391
515
|
"summary",
|
|
392
516
|
{
|
|
393
517
|
className: "aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-1 ml-1 h-full list-none rounded-l-2xl p-2 text-sm outline-none before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:content-['']",
|
|
394
518
|
onClick: (m) => {
|
|
395
|
-
m.preventDefault(),
|
|
519
|
+
m.preventDefault(), g(s.id);
|
|
396
520
|
},
|
|
397
521
|
onKeyDown: (m) => {
|
|
398
|
-
(m.key === "Enter" || m.key === " ") && (m.preventDefault(),
|
|
522
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), g(s.id));
|
|
399
523
|
},
|
|
400
524
|
children: [
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ t.jsx("span", { children: s.title }),
|
|
526
|
+
/* @__PURE__ */ t.jsx(
|
|
403
527
|
"button",
|
|
404
528
|
{
|
|
405
529
|
type: "button",
|
|
406
530
|
onClick: (m) => {
|
|
407
531
|
m.stopPropagation(), m.preventDefault(), c && c(s.id);
|
|
408
532
|
},
|
|
409
|
-
className: `aiquants-submenu-pin-button ${
|
|
410
|
-
title:
|
|
411
|
-
children:
|
|
533
|
+
className: `aiquants-submenu-pin-button ${a.includes(s.id) ? "pinned" : ""}`,
|
|
534
|
+
title: a.includes(s.id) ? "ピン留め解除" : "ピン留め",
|
|
535
|
+
children: a.includes(s.id) ? /* @__PURE__ */ t.jsx(xe, { size: 14 }) : /* @__PURE__ */ t.jsx(ye, { size: 14 })
|
|
412
536
|
}
|
|
413
537
|
)
|
|
414
538
|
]
|
|
415
539
|
}
|
|
416
540
|
),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
] }) }, s.id)) }), [r,
|
|
419
|
-
return /* @__PURE__ */
|
|
420
|
-
},
|
|
421
|
-
const { menuList: r, menuHeader:
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ t.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-1 mr-1 ml-4 rounded p-2 shadow-md", children: s.submenu.map((m) => /* @__PURE__ */ t.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap text-sm", children: /* @__PURE__ */ t.jsx(Ge, { item: m, parentMenu: s, onMenuSelected: o }) }, m.subid)) })
|
|
542
|
+
] }) }, s.id)) }), [r, o, p, g, a]);
|
|
543
|
+
return /* @__PURE__ */ t.jsx("div", { ref: j, onScroll: x, className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: S });
|
|
544
|
+
}, Qe = (n) => {
|
|
545
|
+
const { menuList: r, menuHeader: o, open: a, onMenuSelected: c, onClickSignout: i, theme: u, toggleTheme: p, isPinned: b, onTogglePin: d, pinnedSubmenuIds: f, onToggleSubmenuPin: g } = n;
|
|
546
|
+
return /* @__PURE__ */ t.jsxs("div", { className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[250px] select-none flex-col transition-transform duration-500 ${a ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`, children: [
|
|
547
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex h-[100px] flex-col", children: o }),
|
|
548
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex grow flex-col", children: /* @__PURE__ */ t.jsx(Be, { menuList: r, onMenuSelected: c, pinnedSubmenuIds: f, onToggleSubmenuPin: g }) }),
|
|
549
|
+
/* @__PURE__ */ t.jsx("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
550
|
+
/* @__PURE__ */ t.jsx(
|
|
427
551
|
"button",
|
|
428
552
|
{
|
|
429
553
|
type: "button",
|
|
@@ -432,116 +556,116 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
432
556
|
className: `flex items-center justify-center rounded-md px-3 py-2 text-white text-xs shadow-sm transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${b ? "bg-amber-500/90 hover:bg-amber-600" : "border border-white/15 bg-white/10 hover:bg-white/20"}`,
|
|
433
557
|
title: b ? "ピン留め解除" : "ピン留め",
|
|
434
558
|
"aria-label": b ? "ピン留め解除" : "ピン留め",
|
|
435
|
-
children: b ? /* @__PURE__ */
|
|
559
|
+
children: b ? /* @__PURE__ */ t.jsx(xe, { size: 14 }) : /* @__PURE__ */ t.jsx(ye, { size: 14 })
|
|
436
560
|
}
|
|
437
561
|
),
|
|
438
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ t.jsx(
|
|
439
563
|
"button",
|
|
440
564
|
{
|
|
441
565
|
type: "button",
|
|
442
|
-
onClick:
|
|
566
|
+
onClick: p,
|
|
443
567
|
"data-aqmb-theme-button": !0,
|
|
444
568
|
className: "group relative flex items-center justify-center rounded-md border border-white/15 bg-white/10 px-3 py-2 text-white text-xs shadow-sm backdrop-blur-sm transition-all duration-300 hover:border-white/25 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 focus-visible:ring-offset-0 dark:border-gray-600/40 dark:bg-gray-800/80 dark:hover:border-gray-500/60 dark:hover:bg-gray-700",
|
|
445
569
|
title: u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
446
570
|
"aria-label": u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
447
|
-
children: /* @__PURE__ */
|
|
571
|
+
children: /* @__PURE__ */ t.jsx("span", { className: "text-sm transition-transform duration-300 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" })
|
|
448
572
|
}
|
|
449
573
|
),
|
|
450
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ t.jsx(
|
|
451
575
|
"button",
|
|
452
576
|
{
|
|
453
577
|
type: "button",
|
|
454
578
|
"data-aqmb-signout-button": !0,
|
|
455
579
|
className: "aiquants-signout-button flex flex-1 items-center justify-center whitespace-nowrap rounded-md bg-red-500/90 px-3 py-2 font-medium text-white text-xs shadow-sm transition-colors duration-300 hover:bg-red-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60",
|
|
456
580
|
onClick: i,
|
|
457
|
-
children: /* @__PURE__ */
|
|
581
|
+
children: /* @__PURE__ */ t.jsx("span", { children: "サインアウト" })
|
|
458
582
|
}
|
|
459
583
|
)
|
|
460
584
|
] }) })
|
|
461
585
|
] });
|
|
462
|
-
},
|
|
463
|
-
const { isOverlay: r, onOverlayClick:
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
},
|
|
466
|
-
const { open: r, onMenuOpen:
|
|
467
|
-
if (u.current &&
|
|
468
|
-
const
|
|
469
|
-
u.current.style.backgroundColor =
|
|
586
|
+
}, Xe = (n) => {
|
|
587
|
+
const { isOverlay: r, onOverlayClick: o } = n;
|
|
588
|
+
return /* @__PURE__ */ t.jsx("button", { type: "button", className: `fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${r ? "opacity-100" : "pointer-events-none opacity-0"}`, onClick: o });
|
|
589
|
+
}, Ke = (n) => {
|
|
590
|
+
const { open: r, onMenuOpen: o, onMenuClose: a, theme: c } = n, i = C(r), u = C(null), p = C(null), b = C(null), d = C(null), f = C(null), g = w(() => {
|
|
591
|
+
if (u.current && p.current && b.current && d.current && f.current) {
|
|
592
|
+
const N = c === "dark" ? "#fff" : "#000";
|
|
593
|
+
u.current.style.backgroundColor = N, u.current.style.width = "100%", u.current.style.height = "3px", u.current.style.transform = "", p.current.style.opacity = "1", p.current.style.backgroundColor = N, b.current.style.opacity = "1", b.current.style.backgroundColor = N, d.current.style.backgroundColor = N, d.current.style.width = "100%", d.current.style.height = "3px", d.current.style.transform = "", f.current.style.color = N, f.current.classList.remove("after:content-['close']"), f.current.classList.remove("after:ml-0.5"), f.current.classList.add("after:content-['menu']"), f.current.classList.add("after:-ml-0.5"), i.current = !0;
|
|
470
594
|
}
|
|
471
595
|
}, [c]), j = w(() => {
|
|
472
|
-
u.current &&
|
|
596
|
+
u.current && p.current && b.current && d.current && f.current && (u.current.style.backgroundColor = "#fff", u.current.style.width = "32px", u.current.style.height = "4px", u.current.style.transform = "translateY(9px) rotate(-45deg)", p.current.style.opacity = "0", b.current.style.opacity = "0", d.current.style.backgroundColor = "#fff", d.current.style.width = "32px", d.current.style.height = "4px", d.current.style.transform = "translateY(-9px) rotate(45deg)", f.current.style.color = "#fff", f.current.classList.remove("after:content-['menu']"), f.current.classList.remove("after:-ml-0.5"), f.current.classList.add("after:content-['close']"), f.current.classList.add("after:ml-0.5"), i.current = !1);
|
|
473
597
|
}, []), x = w(() => {
|
|
474
|
-
|
|
475
|
-
}, [
|
|
476
|
-
j(),
|
|
477
|
-
}, [j,
|
|
478
|
-
i.current ?
|
|
479
|
-
}, [x,
|
|
480
|
-
|
|
481
|
-
}, []),
|
|
482
|
-
|
|
598
|
+
g(), a && a();
|
|
599
|
+
}, [g, a]), S = w(() => {
|
|
600
|
+
j(), o && o();
|
|
601
|
+
}, [j, o]), s = w(() => {
|
|
602
|
+
i.current ? S() : x();
|
|
603
|
+
}, [x, S]), m = w((N) => {
|
|
604
|
+
N.currentTarget.blur();
|
|
605
|
+
}, []), _ = w((N) => {
|
|
606
|
+
N.preventDefault();
|
|
483
607
|
}, []);
|
|
484
|
-
return
|
|
485
|
-
r ?
|
|
486
|
-
}, [r,
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
608
|
+
return L(() => {
|
|
609
|
+
r ? g() : j();
|
|
610
|
+
}, [r, g, j]), /* @__PURE__ */ t.jsxs("button", { type: "button", "data-aqmb-menu-switch": !0, className: "aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden", onClick: s, onFocus: m, onMouseDown: _, tabIndex: -1, children: [
|
|
611
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none", ref: u }),
|
|
612
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none", ref: p }),
|
|
613
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref: b }),
|
|
614
|
+
/* @__PURE__ */ t.jsx("span", { className: "absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none", ref: d }),
|
|
615
|
+
/* @__PURE__ */ t.jsx("div", { className: "absolute w-full text-xs after:mt-2 after:block", ref: f })
|
|
492
616
|
] });
|
|
493
|
-
},
|
|
494
|
-
const { menuList: r, menuHeader:
|
|
617
|
+
}, fe = typeof window < "u" ? pe : L, rt = (n) => {
|
|
618
|
+
const { menuList: r, menuHeader: o, onClickSignout: a, isMenuhide: c, theme: i, toggleTheme: u, onMenuNavigate: p, onPinChange: b, pinnedSubmenuIds: d, initialPinnedSubmenuIds: f, onSubmenuPinChange: g, closeOnEscape: j = "auto" } = n, [x, S] = z(() => {
|
|
495
619
|
try {
|
|
496
620
|
return localStorage.getItem("aiquants-menu-pinned") === "true";
|
|
497
621
|
} catch {
|
|
498
622
|
return !1;
|
|
499
623
|
}
|
|
500
|
-
}), [s, m] =
|
|
624
|
+
}), [s, m] = z(x), [_, N] = z(() => {
|
|
501
625
|
if (f)
|
|
502
626
|
return f;
|
|
503
627
|
try {
|
|
504
628
|
const k = localStorage.getItem("aiquants-submenu-pinned");
|
|
505
629
|
if (k) {
|
|
506
|
-
const
|
|
507
|
-
if (Array.isArray(
|
|
508
|
-
return
|
|
630
|
+
const E = JSON.parse(k);
|
|
631
|
+
if (Array.isArray(E))
|
|
632
|
+
return E.filter((R) => typeof R == "number");
|
|
509
633
|
}
|
|
510
634
|
} catch {
|
|
511
635
|
}
|
|
512
636
|
return [];
|
|
513
|
-
}),
|
|
637
|
+
}), Y = d !== void 0 ? d : _, F = w(
|
|
514
638
|
(k) => {
|
|
515
|
-
const
|
|
639
|
+
const E = d !== void 0 ? d : _, R = E.includes(k) ? E.filter((U) => U !== k) : [...E, k];
|
|
516
640
|
if (d === void 0) {
|
|
517
|
-
|
|
641
|
+
N(R);
|
|
518
642
|
try {
|
|
519
|
-
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(
|
|
643
|
+
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(R));
|
|
520
644
|
} catch {
|
|
521
645
|
}
|
|
522
646
|
}
|
|
523
|
-
|
|
647
|
+
g && g(R);
|
|
524
648
|
},
|
|
525
|
-
[d,
|
|
649
|
+
[d, _, g]
|
|
526
650
|
);
|
|
527
|
-
|
|
651
|
+
fe(() => {
|
|
528
652
|
const k = x ? "250px" : "0px";
|
|
529
653
|
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", k), b?.(x);
|
|
530
|
-
}, [x, b]),
|
|
654
|
+
}, [x, b]), fe(() => () => {
|
|
531
655
|
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px");
|
|
532
656
|
}, []);
|
|
533
|
-
const
|
|
657
|
+
const V = w(() => {
|
|
534
658
|
m(!0);
|
|
535
659
|
}, []), P = w(() => {
|
|
536
|
-
m(!1),
|
|
660
|
+
m(!1), S(!1);
|
|
537
661
|
try {
|
|
538
662
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
539
663
|
} catch {
|
|
540
664
|
}
|
|
541
|
-
}, []),
|
|
542
|
-
|
|
543
|
-
const
|
|
544
|
-
if (
|
|
665
|
+
}, []), H = w(() => {
|
|
666
|
+
S((k) => {
|
|
667
|
+
const E = !k;
|
|
668
|
+
if (E)
|
|
545
669
|
try {
|
|
546
670
|
localStorage.setItem("aiquants-menu-pinned", "true");
|
|
547
671
|
} catch {
|
|
@@ -551,44 +675,44 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
551
675
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
552
676
|
} catch {
|
|
553
677
|
}
|
|
554
|
-
return
|
|
678
|
+
return E;
|
|
555
679
|
});
|
|
556
|
-
}, []),
|
|
680
|
+
}, []), W = w(
|
|
557
681
|
(k) => {
|
|
558
|
-
|
|
682
|
+
p && p(k), x || m(!1);
|
|
559
683
|
},
|
|
560
|
-
[
|
|
561
|
-
),
|
|
684
|
+
[p, x]
|
|
685
|
+
), T = w(
|
|
562
686
|
(k) => {
|
|
563
687
|
k.key === "Escape" && P();
|
|
564
688
|
},
|
|
565
689
|
[P]
|
|
566
|
-
),
|
|
567
|
-
return
|
|
568
|
-
window.removeEventListener("keydown",
|
|
569
|
-
}), [s,
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
|
|
690
|
+
), q = j === !0 || j === "auto" && !x;
|
|
691
|
+
return L(() => (s && q ? window.addEventListener("keydown", T, { passive: !0 }) : window.removeEventListener("keydown", T), () => {
|
|
692
|
+
window.removeEventListener("keydown", T);
|
|
693
|
+
}), [s, q, T]), c ? null : /* @__PURE__ */ t.jsxs("div", { className: `aiquants-menu-bar ${i}`, children: [
|
|
694
|
+
/* @__PURE__ */ t.jsx(Ke, { onMenuClose: P, onMenuOpen: V, open: !s, theme: i }),
|
|
695
|
+
/* @__PURE__ */ t.jsx(
|
|
696
|
+
Qe,
|
|
573
697
|
{
|
|
574
698
|
menuList: r,
|
|
575
|
-
menuHeader:
|
|
576
|
-
onClickSignout:
|
|
577
|
-
onMenuSelected:
|
|
699
|
+
menuHeader: o,
|
|
700
|
+
onClickSignout: a,
|
|
701
|
+
onMenuSelected: W,
|
|
578
702
|
open: s,
|
|
579
703
|
theme: i,
|
|
580
704
|
toggleTheme: u,
|
|
581
705
|
isPinned: x,
|
|
582
|
-
onTogglePin:
|
|
583
|
-
pinnedSubmenuIds:
|
|
584
|
-
onToggleSubmenuPin:
|
|
706
|
+
onTogglePin: H,
|
|
707
|
+
pinnedSubmenuIds: Y,
|
|
708
|
+
onToggleSubmenuPin: F
|
|
585
709
|
}
|
|
586
710
|
),
|
|
587
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ t.jsx(Xe, { isOverlay: s && !x, onOverlayClick: P })
|
|
588
712
|
] });
|
|
589
713
|
};
|
|
590
714
|
export {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
715
|
+
Se as DefaultLink,
|
|
716
|
+
rt as MenuBar,
|
|
717
|
+
nt as SessionInfo
|
|
594
718
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(C,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom"],s):(C=typeof globalThis<"u"?globalThis:C||self,s(C["@aiquants/menu-bar"]={},C.React,C.ReactRouterDOM))})(this,(function(C,s,Y){"use strict";var L={exports:{}},A={};var Q;function pe(){if(Q)return A;Q=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(l,u,i){var d=null;if(i!==void 0&&(d=""+i),u.key!==void 0&&(d=""+u.key),"key"in u){i={};for(var p in u)p!=="key"&&(i[p]=u[p])}else i=u;return u=i.ref,{$$typeof:n,type:l,key:d,ref:u!==void 0?u:null,props:i}}return A.Fragment=r,A.jsx=o,A.jsxs=o,A}var I={};var X;function be(){return X||(X=1,process.env.NODE_ENV!=="production"&&(function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===w?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case _:return"Profiler";case E:return"StrictMode";case P:return"Suspense";case U:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case a:return"Portal";case H:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case W:var c=e.render;return e=e.displayName,e||(e=c.displayName||c.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return c=e.displayName||null,c!==null?c:n(e.type)||"Memo";case T:c=e._payload,e=e._init;try{return n(e(c))}catch{}}return null}function r(e){return""+e}function o(e){try{r(e);var c=!1}catch{c=!0}if(c){c=console;var b=c.error,v=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return b.call(c,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",v),r(e)}}function l(e){if(e===h)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===T)return"<...>";try{var c=n(e);return c?"<"+c+">":"<...>"}catch{return"<...>"}}function u(){var e=N.A;return e===null?null:e.getOwner()}function i(){return Error("react-stack-top-frame")}function d(e){if(M.call(e,"key")){var c=Object.getOwnPropertyDescriptor(e,"key").get;if(c&&c.isReactWarning)return!1}return e.key!==void 0}function p(e,c){function b(){ue||(ue=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",c))}b.isReactWarning=!0,Object.defineProperty(e,"key",{get:b,configurable:!0})}function x(){var e=n(this.type);return de[e]||(de[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function f(e,c,b,v,z,q){var g=b.ref;return e={$$typeof:S,type:e,key:c,props:b,_owner:v},(g!==void 0?g:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:x}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function m(e,c,b,v,z,q){var g=c.children;if(g!==void 0)if(v)if(J(g)){for(v=0;v<g.length;v++)k(g[v]);Object.freeze&&Object.freeze(g)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else k(g);if(M.call(c,"key")){g=n(e);var O=Object.keys(c).filter(function(Ye){return Ye!=="key"});v=0<O.length?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}",he[g+v]||(O=0<O.length?"{"+O.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,g,v,I,v),ce[v+g]=!0)}if(v=null,b!==void 0&&(l(b),v=""+b),d(a)&&(l(a.key),v=""+a.key),"key"in a){b={};for(var B in a)B!=="key"&&(b[B]=a[B])}else b=a;return v&&h(b,typeof e=="function"?e.displayName||e.name||"Unknown":e),f(e,v,b,u(),Y,Z)}function k(e){j(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===R&&(e._payload.status==="fulfilled"?j(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function j(e){return typeof e=="object"&&e!==null&&e.$$typeof===_}var y=o,_=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),U=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),w=Symbol.for("react.client.reference"),S=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,G=Array.isArray,V=console.createTask?console.createTask:function(){return null};y={react_stack_bottom_frame:function(e){return e()}};var oe,ae={},le=y.react_stack_bottom_frame.bind(y,c)(),ie=V(i(c)),ce={};M.Fragment=p,M.jsx=function(e,a,b){var g=1e4>S.recentlyCreatedOwnerStacks++;return m(e,a,b,!1,g?Error("react-stack-top-frame"):le,g?V(i(e)):ie)},M.jsxs=function(e,a,b){var g=1e4>S.recentlyCreatedOwnerStacks++;return m(e,a,b,!0,g?Error("react-stack-top-frame"):le,g?V(i(e)):ie)}})()),M}var K;function fe(){return K||(K=1,process.env.NODE_ENV==="production"?L.exports=ue():L.exports=de()),L.exports}var n=fe();const me="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==",$=({to:t,className:r,children:l})=>n.jsx("a",{href:t,className:r,children:l}),pe=t=>{const{user:r,LinkComponent:l=$}=t;return n.jsx("div",{className:"max-h-20 max-w-52",children:n.jsx("div",{className:"flex grow flex-col",children:r?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-row",children:[n.jsx("div",{className:"aiquants-session-photo m-1 h-14 w-14 p-0.5",children:n.jsx("img",{className:"object-contain",src:r.photo||me,"aria-label":"profile photo"})}),n.jsxs("div",{className:"mx-1 flex flex-col",children:[n.jsx(l,{className:"aiquants-session-link my-1 rounded-lg px-2 text-center text-xs",to:"/",children:"プロフィールを編集"}),n.jsx(l,{className:"aiquants-session-link rounded-lg px-2 text-center text-xs",to:"/",children:"プロフィール"}),n.jsx(l,{className:"aiquants-session-link my-1 rounded-lg px-2 text-center text-xs",to:"https://myaccount.google.com/",children:"Google Account"})]})]}),n.jsx("div",{className:"aiquants-session-info mb-1 min-h-[1em] w-full rounded-r-lg px-2 py-0.5 text-xs",children:r.displayName})]}):n.jsx("div",{className:"aiquants-session-info mb-1 min-h-[1em] w-9/12 rounded-r-lg py-0.5 pl-1 text-xs",children:"ログインはこちら"})})})},be=typeof window<"u"?o.useLayoutEffect:o.useEffect,ee="aiquants-menu-scroll",ne=new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/),he={report:C.FileText,slip:C.FileText,table:C.Table,chart:C.BarChart,download:C.Download,lock:C.Lock,href:C.Link},xe=({mark:t,children:r})=>{const l=t?he[t]:void 0;return l?n.jsxs("div",{className:"flex flex-nowrap items-center",children:[n.jsx(l,{className:"h-4 w-4"}),n.jsx("div",{className:"aiquants-menu-link mx-1 hover:underline",children:r})]}):n.jsx("span",{className:"mx-1 text-sky-600 hover:underline dark:text-sky-400",children:r})},F=(t,r)=>r?{menu:{id:t.id,title:t.title,href:t.href},submenu:{subid:r.subid,title:r.title,href:r.href,mark:r.mark,new:r.new}}:{menu:{id:t.id,title:t.title,href:t.href}},ye=({item:t,parentMenu:r,onMenuSelected:l})=>{if(t.href==="separator")return n.jsx("hr",{className:"aiquants-menu-separator mx-2 my-1 h-px"});const i=n.jsx(xe,{mark:t.mark,children:t.title}),u={onClick:()=>{l&&l(F(r,t))}};return t.new?n.jsx("a",{href:t.href,rel:"noopener noreferrer",target:"_blank",...u,children:i}):ne.test(t.href)?n.jsx("a",{href:t.href,...u,children:i}):n.jsx(z.Link,{to:t.href,...u,children:i})},te=t=>t?t.split(/[?#]/)[0].replace(/(?!^\/)\/$/,""):"",re=(t,r)=>{const l=r!=="/"&&r.endsWith("/")?r.slice(0,-1):r;for(const i of t){if(te(i.href)===l)return i.id;if(i.submenu){for(const u of i.submenu)if(te(u.href)===l)return i.id}}return null},ge=t=>{const{menuList:r,onMenuSelected:l,pinnedSubmenuIds:i=[],onToggleSubmenuPin:u}=t;let c="";try{c=z.useLocation().pathname}catch{typeof window<"u"&&(c=window.location.pathname)}const d=o.useMemo(()=>re(r,c),[r,c]),[h,x]=o.useState(d),f=o.useRef(c),m=o.useRef(d!==null);o.useEffect(()=>{if(f.current!==c&&(f.current=c,m.current=!1),!m.current){const s=re(r,c);s!==null&&(x(s),m.current=!0)}},[c,r]);const k=o.useCallback(s=>{i.includes(s)||x(N=>N===s?null:s)},[i]),j=o.useRef(null);be(()=>{const s=j.current;if(s)try{const p=sessionStorage.getItem(ee);if(p!==null){const N=Number.parseFloat(p);Number.isNaN(N)||(s.scrollTop=N)}}catch{}},[]);const y=o.useCallback(()=>{const s=j.current;if(s)try{sessionStorage.setItem(ee,String(s.scrollTop))}catch{}},[]),_=o.useMemo(()=>n.jsx(n.Fragment,{children:r.map(s=>n.jsx("div",{children:s.href?n.jsx("div",{className:"aiquants-menu-list-item relative mb-1 ml-1 h-full rounded-l-2xl p-2 align-middle text-sm before:-mt-1 before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:align-middle before:content-['']",children:ne.test(s.href)?n.jsx("a",{href:s.href,onClick:()=>{l&&l(F(s))},children:n.jsx("span",{className:"aiquants-menu-link hover:underline",children:s.title})}):n.jsx(z.Link,{to:s.href,onClick:()=>{l&&l(F(s))},children:n.jsx("span",{className:"aiquants-menu-link hover:underline",children:s.title})})}):n.jsxs("details",{className:"aiquants-menu-accordion-details",open:s.id===h||i.includes(s.id),children:[n.jsxs("summary",{className:"aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-1 ml-1 h-full list-none rounded-l-2xl p-2 text-sm outline-none before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:content-['']",onClick:p=>{p.preventDefault(),k(s.id)},onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),k(s.id))},children:[n.jsx("span",{children:s.title}),n.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),p.preventDefault(),u&&u(s.id)},className:`aiquants-submenu-pin-button ${i.includes(s.id)?"pinned":""}`,title:i.includes(s.id)?"ピン留め解除":"ピン留め",children:i.includes(s.id)?n.jsx(C.Pin,{size:14}):n.jsx(C.PinOff,{size:14})})]}),n.jsx("div",{className:"aiquants-menu-submenu pointer-events-auto my-1 mr-1 ml-4 rounded p-2 shadow-md",children:s.submenu.map(p=>n.jsx("div",{className:"aiquants-menu-accordion-container block w-full whitespace-nowrap text-sm",children:n.jsx(ye,{item:p,parentMenu:s,onMenuSelected:l})},p.subid))})]})},s.id))}),[r,l,h,k,i]);return n.jsx("div",{ref:j,onScroll:y,className:"hidden-scrollbar h-0 grow overflow-y-scroll",children:_})},ve=t=>{const{menuList:r,menuHeader:l,open:i,onMenuSelected:u,onClickSignout:c,theme:d,toggleTheme:h,isPinned:x,onTogglePin:f,pinnedSubmenuIds:m,onToggleSubmenuPin:k}=t;return n.jsxs("div",{className:`aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[250px] select-none flex-col transition-transform duration-500 ${i?"aiquants-menu-translate-x-0":"aiquants-menu-translate-x-250"}`,children:[n.jsx("div",{className:"flex h-[100px] flex-col",children:l}),n.jsx("div",{className:"flex grow flex-col",children:n.jsx(ge,{menuList:r,onMenuSelected:u,pinnedSubmenuIds:m,onToggleSubmenuPin:k})}),n.jsx("div",{className:"px-4 pt-2 pb-4",children:n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("button",{type:"button",onClick:f,"data-aqmb-pin-button":!0,className:`flex items-center justify-center rounded-md px-3 py-2 text-white text-xs shadow-sm transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${x?"bg-amber-500/90 hover:bg-amber-600":"border border-white/15 bg-white/10 hover:bg-white/20"}`,title:x?"ピン留め解除":"ピン留め","aria-label":x?"ピン留め解除":"ピン留め",children:x?n.jsx(C.Pin,{size:14}):n.jsx(C.PinOff,{size:14})}),n.jsx("button",{type:"button",onClick:h,"data-aqmb-theme-button":!0,className:"group relative flex items-center justify-center rounded-md border border-white/15 bg-white/10 px-3 py-2 text-white text-xs shadow-sm backdrop-blur-sm transition-all duration-300 hover:border-white/25 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 focus-visible:ring-offset-0 dark:border-gray-600/40 dark:bg-gray-800/80 dark:hover:border-gray-500/60 dark:hover:bg-gray-700",title:d==="dark"?"ライトモードに切り替え":"ダークモードに切り替え","aria-label":d==="dark"?"ライトモードに切り替え":"ダークモードに切り替え",children:n.jsx("span",{className:"text-sm transition-transform duration-300 group-hover:scale-110",children:d==="dark"?"🌞":"🌙"})}),n.jsx("button",{type:"button","data-aqmb-signout-button":!0,className:"aiquants-signout-button flex flex-1 items-center justify-center whitespace-nowrap rounded-md bg-red-500/90 px-3 py-2 font-medium text-white text-xs shadow-sm transition-colors duration-300 hover:bg-red-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60",onClick:c,children:n.jsx("span",{children:"サインアウト"})})]})})]})},ke=t=>{const{isOverlay:r,onOverlayClick:l}=t;return n.jsx("button",{type:"button",className:`fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${r?"opacity-100":"pointer-events-none opacity-0"}`,onClick:l})},we=t=>{const{open:r,onMenuOpen:l,onMenuClose:i,theme:u}=t,c=o.useRef(r),d=o.useRef(null),h=o.useRef(null),x=o.useRef(null),f=o.useRef(null),m=o.useRef(null),k=o.useCallback(()=>{if(d.current&&h.current&&x.current&&f.current&&m.current){const E=u==="dark"?"#fff":"#000";d.current.style.backgroundColor=E,d.current.style.width="100%",d.current.style.height="3px",d.current.style.transform="",h.current.style.opacity="1",h.current.style.backgroundColor=E,x.current.style.opacity="1",x.current.style.backgroundColor=E,f.current.style.backgroundColor=E,f.current.style.width="100%",f.current.style.height="3px",f.current.style.transform="",m.current.style.color=E,m.current.classList.remove("after:content-['close']"),m.current.classList.remove("after:ml-0.5"),m.current.classList.add("after:content-['menu']"),m.current.classList.add("after:-ml-0.5"),c.current=!0}},[u]),j=o.useCallback(()=>{d.current&&h.current&&x.current&&f.current&&m.current&&(d.current.style.backgroundColor="#fff",d.current.style.width="32px",d.current.style.height="4px",d.current.style.transform="translateY(9px) rotate(-45deg)",h.current.style.opacity="0",x.current.style.opacity="0",f.current.style.backgroundColor="#fff",f.current.style.width="32px",f.current.style.height="4px",f.current.style.transform="translateY(-9px) rotate(45deg)",m.current.style.color="#fff",m.current.classList.remove("after:content-['menu']"),m.current.classList.remove("after:-ml-0.5"),m.current.classList.add("after:content-['close']"),m.current.classList.add("after:ml-0.5"),c.current=!1)},[]),y=o.useCallback(()=>{k(),i&&i()},[k,i]),_=o.useCallback(()=>{j(),l&&l()},[j,l]),s=o.useCallback(()=>{c.current?_():y()},[y,_]),p=o.useCallback(E=>{E.currentTarget.blur()},[]),N=o.useCallback(E=>{E.preventDefault()},[]);return o.useEffect(()=>{r?k():j()},[r,k,j]),n.jsxs("button",{type:"button","data-aqmb-menu-switch":!0,className:"aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden",onClick:s,onFocus:p,onMouseDown:N,tabIndex:-1,children:[n.jsx("span",{className:"absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none",ref:d}),n.jsx("span",{className:"absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none",ref:h}),n.jsx("span",{className:"absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none",ref:x}),n.jsx("span",{className:"absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none",ref:f}),n.jsx("div",{className:"absolute w-full text-xs after:mt-2 after:block",ref:m})]})},se=typeof window<"u"?o.useLayoutEffect:o.useEffect,je=t=>{const{menuList:r,menuHeader:l,onClickSignout:i,isMenuhide:u,theme:c,toggleTheme:d,onMenuNavigate:h,onPinChange:x,pinnedSubmenuIds:f,initialPinnedSubmenuIds:m,onSubmenuPinChange:k,closeOnEscape:j="auto"}=t,[y,_]=o.useState(()=>{try{return localStorage.getItem("aiquants-menu-pinned")==="true"}catch{return!1}}),[s,p]=o.useState(y),[N,E]=o.useState(()=>{if(m)return m;try{const w=localStorage.getItem("aiquants-submenu-pinned");if(w){const S=JSON.parse(w);if(Array.isArray(S))return S.filter(P=>typeof P=="number")}}catch{}return[]}),W=f!==void 0?f:N,U=o.useCallback(w=>{const S=f!==void 0?f:N,P=S.includes(w)?S.filter(G=>G!==w):[...S,w];if(f===void 0){E(P);try{localStorage.setItem("aiquants-submenu-pinned",JSON.stringify(P))}catch{}}k&&k(P)},[f,N,k]);se(()=>{const w=y?"250px":"0px";document.documentElement.style.setProperty("--aiquants-menu-pinned-width",w),x?.(y)},[y,x]),se(()=>()=>{document.documentElement.style.setProperty("--aiquants-menu-pinned-width","0px")},[]);const H=o.useCallback(()=>{p(!0)},[]),O=o.useCallback(()=>{p(!1),_(!1);try{localStorage.removeItem("aiquants-menu-pinned")}catch{}},[]),q=o.useCallback(()=>{_(w=>{const S=!w;if(S)try{localStorage.setItem("aiquants-menu-pinned","true")}catch{}else try{localStorage.removeItem("aiquants-menu-pinned")}catch{}return S})},[]),J=o.useCallback(w=>{h&&h(w),y||p(!1)},[h,y]),R=o.useCallback(w=>{w.key==="Escape"&&O()},[O]),D=j===!0||j==="auto"&&!y;return o.useEffect(()=>(s&&D?window.addEventListener("keydown",R,{passive:!0}):window.removeEventListener("keydown",R),()=>{window.removeEventListener("keydown",R)}),[s,D,R]),u?null:n.jsxs("div",{className:`aiquants-menu-bar ${c}`,children:[n.jsx(we,{onMenuClose:O,onMenuOpen:H,open:!s,theme:c}),n.jsx(ve,{menuList:r,menuHeader:l,onClickSignout:i,onMenuSelected:J,open:s,theme:c,toggleTheme:d,isPinned:y,onTogglePin:q,pinnedSubmenuIds:W,onToggleSubmenuPin:U}),n.jsx(ke,{isOverlay:s&&!y,onOverlayClick:O})]})};T.DefaultLink=$,T.MenuBar=je,T.SessionInfo=pe,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
6
|
+
<%s key={someKey} {...props} />`,v,g,O,g),he[g+v]=!0)}if(g=null,b!==void 0&&(o(b),g=""+b),d(c)&&(o(c.key),g=""+c.key),"key"in c){b={};for(var B in c)B!=="key"&&(b[B]=c[B])}else b=c;return g&&p(b,typeof e=="function"?e.displayName||e.name||"Unknown":e),f(e,g,b,u(),z,q)}function k(e){j(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===T&&(e._payload.status==="fulfilled"?j(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function j(e){return typeof e=="object"&&e!==null&&e.$$typeof===S}var y=s,S=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),H=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),w=Symbol.for("react.client.reference"),N=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,J=Array.isArray,G=console.createTask?console.createTask:function(){return null};y={react_stack_bottom_frame:function(e){return e()}};var ue,de={},fe=y.react_stack_bottom_frame.bind(y,i)(),me=G(l(i)),he={};I.Fragment=h,I.jsx=function(e,c,b){var v=1e4>N.recentlyCreatedOwnerStacks++;return m(e,c,b,!1,v?Error("react-stack-top-frame"):fe,v?G(l(e)):me)},I.jsxs=function(e,c,b){var v=1e4>N.recentlyCreatedOwnerStacks++;return m(e,c,b,!0,v?Error("react-stack-top-frame"):fe,v?G(l(e)):me)}})()),I}var K;function xe(){return K||(K=1,process.env.NODE_ENV==="production"?L.exports=pe():L.exports=be()),L.exports}var t=xe();const ye="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==",$=({to:n,className:r,children:o})=>t.jsx("a",{href:n,className:r,children:o}),ve=n=>{const{user:r,LinkComponent:o=$}=n;return t.jsx("div",{className:"max-h-20 max-w-52",children:t.jsx("div",{className:"flex grow flex-col",children:r?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-row",children:[t.jsx("div",{className:"aiquants-session-photo m-1 h-14 w-14 p-0.5",children:t.jsx("img",{className:"object-contain",src:r.photo||ye,"aria-label":"profile photo"})}),t.jsxs("div",{className:"mx-1 flex flex-col",children:[t.jsx(o,{className:"aiquants-session-link my-1 rounded-lg px-2 text-center text-xs",to:"/",children:"プロフィールを編集"}),t.jsx(o,{className:"aiquants-session-link rounded-lg px-2 text-center text-xs",to:"/",children:"プロフィール"}),t.jsx(o,{className:"aiquants-session-link my-1 rounded-lg px-2 text-center text-xs",to:"https://myaccount.google.com/",children:"Google Account"})]})]}),t.jsx("div",{className:"aiquants-session-info mb-1 min-h-[1em] w-full rounded-r-lg px-2 py-0.5 text-xs",children:r.displayName})]}):t.jsx("div",{className:"aiquants-session-info mb-1 min-h-[1em] w-9/12 rounded-r-lg py-0.5 pl-1 text-xs",children:"ログインはこちら"})})})};const ge=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ke=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,l)=>l?l.toUpperCase():o.toLowerCase()),ee=n=>{const r=ke(n);return r.charAt(0).toUpperCase()+r.slice(1)},te=(...n)=>n.filter((r,o,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===o).join(" ").trim(),we=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _e=s.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:u="",children:i,iconNode:d,...p},x)=>s.createElement("svg",{ref:x,...je,width:r,height:r,stroke:n,strokeWidth:l?Number(o)*24/Number(r):o,className:te("lucide",u),...!i&&!we(p)&&{"aria-hidden":"true"},...p},[...d.map(([f,m])=>s.createElement(f,m)),...Array.isArray(i)?i:[i]]));const R=(n,r)=>{const o=s.forwardRef(({className:l,...u},i)=>s.createElement(_e,{ref:i,iconNode:r,className:te(`lucide-${ge(ee(n))}`,`lucide-${n}`,l),...u}));return o.displayName=ee(n),o};const ne=R("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);const re=R("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);const Ne=R("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]);const Ee=R("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);const se=R("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Ce=R("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);const Se=R("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const Re=R("table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),Te=typeof window<"u"?s.useLayoutEffect:s.useEffect,oe="aiquants-menu-scroll",ae=new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/),Me={report:se,slip:se,table:Re,chart:Ne,download:Ee,lock:Se,href:Ce},Pe=({mark:n,children:r})=>{const o=n?Me[n]:void 0;return o?t.jsxs("div",{className:"flex flex-nowrap items-center",children:[t.jsx(o,{className:"h-4 w-4"}),t.jsx("div",{className:"aiquants-menu-link mx-1 hover:underline",children:r})]}):t.jsx("span",{className:"mx-1 text-sky-600 hover:underline dark:text-sky-400",children:r})},F=(n,r)=>r?{menu:{id:n.id,title:n.title,href:n.href},submenu:{subid:r.subid,title:r.title,href:r.href,mark:r.mark,new:r.new}}:{menu:{id:n.id,title:n.title,href:n.href}},Oe=({item:n,parentMenu:r,onMenuSelected:o})=>{if(n.href==="separator")return t.jsx("hr",{className:"aiquants-menu-separator mx-2 my-1 h-px"});const l=t.jsx(Pe,{mark:n.mark,children:n.title}),u={onClick:()=>{o&&o(F(r,n))}};return n.new?t.jsx("a",{href:n.href,rel:"noopener noreferrer",target:"_blank",...u,children:l}):ae.test(n.href)?t.jsx("a",{href:n.href,...u,children:l}):t.jsx(Y.Link,{to:n.href,...u,children:l})},le=n=>n?n.split(/[?#]/)[0].replace(/(?!^\/)\/$/,""):"",ce=(n,r)=>{const o=r!=="/"&&r.endsWith("/")?r.slice(0,-1):r;for(const l of n){if(le(l.href)===o)return l.id;if(l.submenu){for(const u of l.submenu)if(le(u.href)===o)return l.id}}return null},Ae=n=>{const{menuList:r,onMenuSelected:o,pinnedSubmenuIds:l=[],onToggleSubmenuPin:u}=n;let i="";try{i=Y.useLocation().pathname}catch{typeof window<"u"&&(i=window.location.pathname)}const d=s.useMemo(()=>ce(r,i),[r,i]),[p,x]=s.useState(d),f=s.useRef(i),m=s.useRef(d!==null);s.useEffect(()=>{if(f.current!==i&&(f.current=i,m.current=!1),!m.current){const a=ce(r,i);a!==null&&(x(a),m.current=!0)}},[i,r]);const k=s.useCallback(a=>{l.includes(a)||x(E=>E===a?null:a)},[l]),j=s.useRef(null);Te(()=>{const a=j.current;if(a)try{const h=sessionStorage.getItem(oe);if(h!==null){const E=Number.parseFloat(h);Number.isNaN(E)||(a.scrollTop=E)}}catch{}},[]);const y=s.useCallback(()=>{const a=j.current;if(a)try{sessionStorage.setItem(oe,String(a.scrollTop))}catch{}},[]),S=s.useMemo(()=>t.jsx(t.Fragment,{children:r.map(a=>t.jsx("div",{children:a.href?t.jsx("div",{className:"aiquants-menu-list-item relative mb-1 ml-1 h-full rounded-l-2xl p-2 align-middle text-sm before:-mt-1 before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:align-middle before:content-['']",children:ae.test(a.href)?t.jsx("a",{href:a.href,onClick:()=>{o&&o(F(a))},children:t.jsx("span",{className:"aiquants-menu-link hover:underline",children:a.title})}):t.jsx(Y.Link,{to:a.href,onClick:()=>{o&&o(F(a))},children:t.jsx("span",{className:"aiquants-menu-link hover:underline",children:a.title})})}):t.jsxs("details",{className:"aiquants-menu-accordion-details",open:a.id===p||l.includes(a.id),children:[t.jsxs("summary",{className:"aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-1 ml-1 h-full list-none rounded-l-2xl p-2 text-sm outline-none before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:content-['']",onClick:h=>{h.preventDefault(),k(a.id)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),k(a.id))},children:[t.jsx("span",{children:a.title}),t.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),h.preventDefault(),u&&u(a.id)},className:`aiquants-submenu-pin-button ${l.includes(a.id)?"pinned":""}`,title:l.includes(a.id)?"ピン留め解除":"ピン留め",children:l.includes(a.id)?t.jsx(ne,{size:14}):t.jsx(re,{size:14})})]}),t.jsx("div",{className:"aiquants-menu-submenu pointer-events-auto my-1 mr-1 ml-4 rounded p-2 shadow-md",children:a.submenu.map(h=>t.jsx("div",{className:"aiquants-menu-accordion-container block w-full whitespace-nowrap text-sm",children:t.jsx(Oe,{item:h,parentMenu:a,onMenuSelected:o})},h.subid))})]})},a.id))}),[r,o,p,k,l]);return t.jsx("div",{ref:j,onScroll:y,className:"hidden-scrollbar h-0 grow overflow-y-scroll",children:S})},Ie=n=>{const{menuList:r,menuHeader:o,open:l,onMenuSelected:u,onClickSignout:i,theme:d,toggleTheme:p,isPinned:x,onTogglePin:f,pinnedSubmenuIds:m,onToggleSubmenuPin:k}=n;return t.jsxs("div",{className:`aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[250px] select-none flex-col transition-transform duration-500 ${l?"aiquants-menu-translate-x-0":"aiquants-menu-translate-x-250"}`,children:[t.jsx("div",{className:"flex h-[100px] flex-col",children:o}),t.jsx("div",{className:"flex grow flex-col",children:t.jsx(Ae,{menuList:r,onMenuSelected:u,pinnedSubmenuIds:m,onToggleSubmenuPin:k})}),t.jsx("div",{className:"px-4 pt-2 pb-4",children:t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("button",{type:"button",onClick:f,"data-aqmb-pin-button":!0,className:`flex items-center justify-center rounded-md px-3 py-2 text-white text-xs shadow-sm transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${x?"bg-amber-500/90 hover:bg-amber-600":"border border-white/15 bg-white/10 hover:bg-white/20"}`,title:x?"ピン留め解除":"ピン留め","aria-label":x?"ピン留め解除":"ピン留め",children:x?t.jsx(ne,{size:14}):t.jsx(re,{size:14})}),t.jsx("button",{type:"button",onClick:p,"data-aqmb-theme-button":!0,className:"group relative flex items-center justify-center rounded-md border border-white/15 bg-white/10 px-3 py-2 text-white text-xs shadow-sm backdrop-blur-sm transition-all duration-300 hover:border-white/25 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 focus-visible:ring-offset-0 dark:border-gray-600/40 dark:bg-gray-800/80 dark:hover:border-gray-500/60 dark:hover:bg-gray-700",title:d==="dark"?"ライトモードに切り替え":"ダークモードに切り替え","aria-label":d==="dark"?"ライトモードに切り替え":"ダークモードに切り替え",children:t.jsx("span",{className:"text-sm transition-transform duration-300 group-hover:scale-110",children:d==="dark"?"🌞":"🌙"})}),t.jsx("button",{type:"button","data-aqmb-signout-button":!0,className:"aiquants-signout-button flex flex-1 items-center justify-center whitespace-nowrap rounded-md bg-red-500/90 px-3 py-2 font-medium text-white text-xs shadow-sm transition-colors duration-300 hover:bg-red-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60",onClick:i,children:t.jsx("span",{children:"サインアウト"})})]})})]})},Le=n=>{const{isOverlay:r,onOverlayClick:o}=n;return t.jsx("button",{type:"button",className:`fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${r?"opacity-100":"pointer-events-none opacity-0"}`,onClick:o})},De=n=>{const{open:r,onMenuOpen:o,onMenuClose:l,theme:u}=n,i=s.useRef(r),d=s.useRef(null),p=s.useRef(null),x=s.useRef(null),f=s.useRef(null),m=s.useRef(null),k=s.useCallback(()=>{if(d.current&&p.current&&x.current&&f.current&&m.current){const _=u==="dark"?"#fff":"#000";d.current.style.backgroundColor=_,d.current.style.width="100%",d.current.style.height="3px",d.current.style.transform="",p.current.style.opacity="1",p.current.style.backgroundColor=_,x.current.style.opacity="1",x.current.style.backgroundColor=_,f.current.style.backgroundColor=_,f.current.style.width="100%",f.current.style.height="3px",f.current.style.transform="",m.current.style.color=_,m.current.classList.remove("after:content-['close']"),m.current.classList.remove("after:ml-0.5"),m.current.classList.add("after:content-['menu']"),m.current.classList.add("after:-ml-0.5"),i.current=!0}},[u]),j=s.useCallback(()=>{d.current&&p.current&&x.current&&f.current&&m.current&&(d.current.style.backgroundColor="#fff",d.current.style.width="32px",d.current.style.height="4px",d.current.style.transform="translateY(9px) rotate(-45deg)",p.current.style.opacity="0",x.current.style.opacity="0",f.current.style.backgroundColor="#fff",f.current.style.width="32px",f.current.style.height="4px",f.current.style.transform="translateY(-9px) rotate(45deg)",m.current.style.color="#fff",m.current.classList.remove("after:content-['menu']"),m.current.classList.remove("after:-ml-0.5"),m.current.classList.add("after:content-['close']"),m.current.classList.add("after:ml-0.5"),i.current=!1)},[]),y=s.useCallback(()=>{k(),l&&l()},[k,l]),S=s.useCallback(()=>{j(),o&&o()},[j,o]),a=s.useCallback(()=>{i.current?S():y()},[y,S]),h=s.useCallback(_=>{_.currentTarget.blur()},[]),E=s.useCallback(_=>{_.preventDefault()},[]);return s.useEffect(()=>{r?k():j()},[r,k,j]),t.jsxs("button",{type:"button","data-aqmb-menu-switch":!0,className:"aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden",onClick:a,onFocus:h,onMouseDown:E,tabIndex:-1,children:[t.jsx("span",{className:"absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none",ref:d}),t.jsx("span",{className:"absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none",ref:p}),t.jsx("span",{className:"absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none",ref:x}),t.jsx("span",{className:"absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none",ref:f}),t.jsx("div",{className:"absolute w-full text-xs after:mt-2 after:block",ref:m})]})},ie=typeof window<"u"?s.useLayoutEffect:s.useEffect,ze=n=>{const{menuList:r,menuHeader:o,onClickSignout:l,isMenuhide:u,theme:i,toggleTheme:d,onMenuNavigate:p,onPinChange:x,pinnedSubmenuIds:f,initialPinnedSubmenuIds:m,onSubmenuPinChange:k,closeOnEscape:j="auto"}=n,[y,S]=s.useState(()=>{try{return localStorage.getItem("aiquants-menu-pinned")==="true"}catch{return!1}}),[a,h]=s.useState(y),[E,_]=s.useState(()=>{if(m)return m;try{const w=localStorage.getItem("aiquants-submenu-pinned");if(w){const N=JSON.parse(w);if(Array.isArray(N))return N.filter(M=>typeof M=="number")}}catch{}return[]}),V=f!==void 0?f:E,H=s.useCallback(w=>{const N=f!==void 0?f:E,M=N.includes(w)?N.filter(J=>J!==w):[...N,w];if(f===void 0){_(M);try{localStorage.setItem("aiquants-submenu-pinned",JSON.stringify(M))}catch{}}k&&k(M)},[f,E,k]);ie(()=>{const w=y?"250px":"0px";document.documentElement.style.setProperty("--aiquants-menu-pinned-width",w),x?.(y)},[y,x]),ie(()=>()=>{document.documentElement.style.setProperty("--aiquants-menu-pinned-width","0px")},[]);const W=s.useCallback(()=>{h(!0)},[]),P=s.useCallback(()=>{h(!1),S(!1);try{localStorage.removeItem("aiquants-menu-pinned")}catch{}},[]),U=s.useCallback(()=>{S(w=>{const N=!w;if(N)try{localStorage.setItem("aiquants-menu-pinned","true")}catch{}else try{localStorage.removeItem("aiquants-menu-pinned")}catch{}return N})},[]),Z=s.useCallback(w=>{p&&p(w),y||h(!1)},[p,y]),T=s.useCallback(w=>{w.key==="Escape"&&P()},[P]),D=j===!0||j==="auto"&&!y;return s.useEffect(()=>(a&&D?window.addEventListener("keydown",T,{passive:!0}):window.removeEventListener("keydown",T),()=>{window.removeEventListener("keydown",T)}),[a,D,T]),u?null:t.jsxs("div",{className:`aiquants-menu-bar ${i}`,children:[t.jsx(De,{onMenuClose:P,onMenuOpen:W,open:!a,theme:i}),t.jsx(Ie,{menuList:r,menuHeader:o,onClickSignout:l,onMenuSelected:Z,open:a,theme:i,toggleTheme:d,isPinned:y,onTogglePin:U,pinnedSubmenuIds:V,onToggleSubmenuPin:H}),t.jsx(Le,{isOverlay:a&&!y,onOverlayClick:P})]})};C.DefaultLink=$,C.MenuBar=ze,C.SessionInfo=ve,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* @description このモジュールは、メニューバーのコンテンツを提供します。
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import Pin from "lucide-react/dist/esm/icons/pin.js"
|
|
8
|
+
import PinOff from "lucide-react/dist/esm/icons/pin-off.js"
|
|
8
9
|
import type { Theme } from "../types"
|
|
9
10
|
import { type IMenu, MenuList, type MenuNavigationPayload } from "./MenuList"
|
|
10
11
|
|
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
* @description このモジュールは、メニュー項目のリストを提供します。
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import BarChart from "lucide-react/dist/esm/icons/bar-chart.js"
|
|
8
|
+
import Download from "lucide-react/dist/esm/icons/download.js"
|
|
9
|
+
import FileText from "lucide-react/dist/esm/icons/file-text.js"
|
|
10
|
+
import LinkIcon from "lucide-react/dist/esm/icons/link.js"
|
|
11
|
+
import Lock from "lucide-react/dist/esm/icons/lock.js"
|
|
12
|
+
import Pin from "lucide-react/dist/esm/icons/pin.js"
|
|
13
|
+
import PinOff from "lucide-react/dist/esm/icons/pin-off.js"
|
|
14
|
+
import Table from "lucide-react/dist/esm/icons/table.js"
|
|
8
15
|
import { type ReactNode, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react"
|
|
9
16
|
import { Link, useLocation } from "react-router-dom"
|
|
10
17
|
|