@aiquants/menu-bar 1.19.0 → 1.20.0
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/CHANGELOG.md +23 -0
- package/README.md +94 -26
- package/dist/index.es.js +312 -310
- package/dist/index.umd.js +2 -2
- package/dist/styles/menu-bar.css +1 -1
- package/dist/styles/menu-bar.standalone.css +1 -1
- package/package.json +5 -2
package/dist/index.es.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useLocation as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
1
|
+
import Ae, { forwardRef as ke, createElement as se, useCallback as _, useSyncExternalStore as Me, useMemo as le, useState as J, useRef as q, useEffect as V, useLayoutEffect as ye } from "react";
|
|
2
|
+
import { useLocation as Re, Link as Ne } from "react-router-dom";
|
|
3
|
+
var Z = { exports: {} }, Y = {};
|
|
4
|
+
var ue;
|
|
5
|
+
function Oe() {
|
|
6
|
+
if (ue) return Y;
|
|
7
|
+
ue = 1;
|
|
8
8
|
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
-
function a(s,
|
|
9
|
+
function a(s, c, o) {
|
|
10
10
|
var u = null;
|
|
11
|
-
if (o !== void 0 && (u = "" + o),
|
|
11
|
+
if (o !== void 0 && (u = "" + o), c.key !== void 0 && (u = "" + c.key), "key" in c) {
|
|
12
12
|
o = {};
|
|
13
|
-
for (var d in
|
|
14
|
-
d !== "key" && (o[d] =
|
|
15
|
-
} else o =
|
|
16
|
-
return
|
|
13
|
+
for (var d in c)
|
|
14
|
+
d !== "key" && (o[d] = c[d]);
|
|
15
|
+
} else o = c;
|
|
16
|
+
return c = o.ref, {
|
|
17
17
|
$$typeof: t,
|
|
18
18
|
type: s,
|
|
19
19
|
key: u,
|
|
20
|
-
ref:
|
|
20
|
+
ref: c !== void 0 ? c : null,
|
|
21
21
|
props: o
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return Y.Fragment = n, Y.jsx = a, Y.jsxs = a, Y;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
26
|
+
var W = {};
|
|
27
|
+
var de;
|
|
28
|
+
function Ie() {
|
|
29
|
+
return de || (de = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
30
|
function t(e) {
|
|
31
31
|
if (e == null) return null;
|
|
32
32
|
if (typeof e == "function")
|
|
33
33
|
return e.$$typeof === F ? null : e.displayName || e.name || null;
|
|
34
34
|
if (typeof e == "string") return e;
|
|
35
35
|
switch (e) {
|
|
36
|
-
case
|
|
36
|
+
case l:
|
|
37
37
|
return "Fragment";
|
|
38
38
|
case S:
|
|
39
39
|
return "Profiler";
|
|
@@ -50,13 +50,13 @@ function Te() {
|
|
|
50
50
|
switch (typeof e.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
52
|
), e.$$typeof) {
|
|
53
|
-
case
|
|
53
|
+
case R:
|
|
54
54
|
return "Portal";
|
|
55
|
-
case
|
|
55
|
+
case C:
|
|
56
56
|
return e.displayName || "Context";
|
|
57
57
|
case w:
|
|
58
58
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case
|
|
59
|
+
case O:
|
|
60
60
|
var i = e.render;
|
|
61
61
|
return e = e.displayName, e || (e = i.displayName || i.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
62
|
case X:
|
|
@@ -91,7 +91,7 @@ function Te() {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function s(e) {
|
|
94
|
-
if (e ===
|
|
94
|
+
if (e === l) return "<>";
|
|
95
95
|
if (typeof e == "object" && e !== null && e.$$typeof === D)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
@@ -101,15 +101,15 @@ function Te() {
|
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
var e =
|
|
104
|
+
function c() {
|
|
105
|
+
var e = I.A;
|
|
106
106
|
return e === null ? null : e.getOwner();
|
|
107
107
|
}
|
|
108
108
|
function o() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function u(e) {
|
|
112
|
-
if (
|
|
112
|
+
if (A.call(e, "key")) {
|
|
113
113
|
var i = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
114
|
if (i && i.isReactWarning) return !1;
|
|
115
115
|
}
|
|
@@ -127,23 +127,23 @@ function Te() {
|
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function m() {
|
|
131
131
|
var e = t(this.type);
|
|
132
132
|
return G[e] || (G[e] = !0, console.error(
|
|
133
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."
|
|
134
134
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
135
135
|
}
|
|
136
|
-
function v(e, i, f, b,
|
|
136
|
+
function v(e, i, f, b, B, ee) {
|
|
137
137
|
var x = f.ref;
|
|
138
138
|
return e = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: T,
|
|
140
140
|
type: e,
|
|
141
141
|
key: i,
|
|
142
142
|
props: f,
|
|
143
143
|
_owner: b
|
|
144
144
|
}, (x !== void 0 ? x : null) !== null ? Object.defineProperty(e, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
|
-
get:
|
|
146
|
+
get: m
|
|
147
147
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
@@ -158,7 +158,7 @@ function Te() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: B
|
|
162
162
|
}), Object.defineProperty(e, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
@@ -166,25 +166,25 @@ function Te() {
|
|
|
166
166
|
value: ee
|
|
167
167
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
168
168
|
}
|
|
169
|
-
function y(e, i, f, b,
|
|
169
|
+
function y(e, i, f, b, B, ee) {
|
|
170
170
|
var x = i.children;
|
|
171
171
|
if (x !== void 0)
|
|
172
172
|
if (b)
|
|
173
173
|
if (K(x)) {
|
|
174
174
|
for (b = 0; b < x.length; b++)
|
|
175
|
-
|
|
175
|
+
N(x[b]);
|
|
176
176
|
Object.freeze && Object.freeze(x);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
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."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
181
|
+
else N(x);
|
|
182
|
+
if (A.call(i, "key")) {
|
|
183
183
|
x = t(e);
|
|
184
|
-
var
|
|
185
|
-
return
|
|
184
|
+
var L = Object.keys(i).filter(function(Pe) {
|
|
185
|
+
return Pe !== "key";
|
|
186
186
|
});
|
|
187
|
-
b = 0 <
|
|
187
|
+
b = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", h[x + b] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
@@ -193,9 +193,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
194
|
b,
|
|
195
195
|
x,
|
|
196
|
-
|
|
196
|
+
L,
|
|
197
197
|
x
|
|
198
|
-
),
|
|
198
|
+
), h[x + b] = !0);
|
|
199
199
|
}
|
|
200
200
|
if (x = null, f !== void 0 && (a(f), x = "" + f), u(i) && (a(i.key), x = "" + i.key), "key" in i) {
|
|
201
201
|
f = {};
|
|
@@ -209,69 +209,69 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
e,
|
|
210
210
|
x,
|
|
211
211
|
f,
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
c(),
|
|
213
|
+
B,
|
|
214
214
|
ee
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function N(e) {
|
|
218
218
|
k(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === D && (e._payload.status === "fulfilled" ? k(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
219
219
|
}
|
|
220
220
|
function k(e) {
|
|
221
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === T;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var j = Ae, T = /* @__PURE__ */ Symbol.for("react.transitional.element"), R = /* @__PURE__ */ Symbol.for("react.portal"), l = /* @__PURE__ */ Symbol.for("react.fragment"), p = /* @__PURE__ */ Symbol.for("react.strict_mode"), S = /* @__PURE__ */ Symbol.for("react.profiler"), w = /* @__PURE__ */ Symbol.for("react.consumer"), C = /* @__PURE__ */ Symbol.for("react.context"), O = /* @__PURE__ */ Symbol.for("react.forward_ref"), $ = /* @__PURE__ */ Symbol.for("react.suspense"), Q = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), z = /* @__PURE__ */ Symbol.for("react.activity"), F = /* @__PURE__ */ Symbol.for("react.client.reference"), I = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, A = Object.prototype.hasOwnProperty, K = Array.isArray, P = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
j = {
|
|
227
227
|
react_stack_bottom_frame: function(e) {
|
|
228
228
|
return e();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var U, G = {}, M =
|
|
232
|
-
|
|
231
|
+
var U, G = {}, M = j.react_stack_bottom_frame.bind(
|
|
232
|
+
j,
|
|
233
233
|
o
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var b = 1e4 >
|
|
234
|
+
)(), H = P(s(o)), h = {};
|
|
235
|
+
W.Fragment = l, W.jsx = function(e, i, f) {
|
|
236
|
+
var b = 1e4 > I.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return y(
|
|
238
238
|
e,
|
|
239
239
|
i,
|
|
240
240
|
f,
|
|
241
241
|
!1,
|
|
242
242
|
b ? Error("react-stack-top-frame") : M,
|
|
243
|
-
b ?
|
|
243
|
+
b ? P(s(e)) : H
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var b = 1e4 >
|
|
245
|
+
}, W.jsxs = function(e, i, f) {
|
|
246
|
+
var b = 1e4 > I.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return y(
|
|
248
248
|
e,
|
|
249
249
|
i,
|
|
250
250
|
f,
|
|
251
251
|
!0,
|
|
252
252
|
b ? Error("react-stack-top-frame") : M,
|
|
253
|
-
b ?
|
|
253
|
+
b ? P(s(e)) : H
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), W;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var fe;
|
|
259
|
+
function Le() {
|
|
260
|
+
return fe || (fe = 1, process.env.NODE_ENV === "production" ? Z.exports = Oe() : Z.exports = Ie()), Z.exports;
|
|
261
261
|
}
|
|
262
|
-
var r =
|
|
263
|
-
const
|
|
262
|
+
var r = Le();
|
|
263
|
+
const qe = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $e = (t) => t.replace(
|
|
264
264
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
265
265
|
(n, a, s) => s ? s.toUpperCase() : a.toLowerCase()
|
|
266
|
-
),
|
|
267
|
-
const n =
|
|
266
|
+
), me = (t) => {
|
|
267
|
+
const n = $e(t);
|
|
268
268
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
269
|
-
},
|
|
269
|
+
}, _e = (...t) => t.filter((n, a, s) => !!n && n.trim() !== "" && s.indexOf(n) === a).join(" ").trim(), De = (t) => {
|
|
270
270
|
for (const n in t)
|
|
271
271
|
if (n.startsWith("aria-") || n === "role" || n === "title")
|
|
272
272
|
return !0;
|
|
273
273
|
};
|
|
274
|
-
var
|
|
274
|
+
var ze = {
|
|
275
275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
276
276
|
width: 24,
|
|
277
277
|
height: 24,
|
|
@@ -282,99 +282,92 @@ var Oe = {
|
|
|
282
282
|
strokeLinecap: "round",
|
|
283
283
|
strokeLinejoin: "round"
|
|
284
284
|
};
|
|
285
|
-
const
|
|
285
|
+
const He = ke(
|
|
286
286
|
({
|
|
287
287
|
color: t = "currentColor",
|
|
288
288
|
size: n = 24,
|
|
289
289
|
strokeWidth: a = 2,
|
|
290
290
|
absoluteStrokeWidth: s,
|
|
291
|
-
className:
|
|
291
|
+
className: c = "",
|
|
292
292
|
children: o,
|
|
293
293
|
iconNode: u,
|
|
294
294
|
...d
|
|
295
|
-
},
|
|
295
|
+
}, m) => se(
|
|
296
296
|
"svg",
|
|
297
297
|
{
|
|
298
|
-
ref:
|
|
299
|
-
...
|
|
298
|
+
ref: m,
|
|
299
|
+
...ze,
|
|
300
300
|
width: n,
|
|
301
301
|
height: n,
|
|
302
302
|
stroke: t,
|
|
303
303
|
strokeWidth: s ? Number(a) * 24 / Number(n) : a,
|
|
304
|
-
className:
|
|
305
|
-
...!o && !
|
|
304
|
+
className: _e("lucide", c),
|
|
305
|
+
...!o && !De(d) && { "aria-hidden": "true" },
|
|
306
306
|
...d
|
|
307
307
|
},
|
|
308
308
|
[
|
|
309
|
-
...u.map(([v, y]) =>
|
|
309
|
+
...u.map(([v, y]) => se(v, y)),
|
|
310
310
|
...Array.isArray(o) ? o : [o]
|
|
311
311
|
]
|
|
312
312
|
)
|
|
313
313
|
);
|
|
314
|
-
const
|
|
315
|
-
const a =
|
|
316
|
-
({ className: s, ...
|
|
314
|
+
const E = (t, n) => {
|
|
315
|
+
const a = ke(
|
|
316
|
+
({ className: s, ...c }, o) => se(He, {
|
|
317
317
|
ref: o,
|
|
318
318
|
iconNode: n,
|
|
319
|
-
className:
|
|
320
|
-
`lucide-${
|
|
319
|
+
className: _e(
|
|
320
|
+
`lucide-${qe(me(t))}`,
|
|
321
321
|
`lucide-${t}`,
|
|
322
322
|
s
|
|
323
323
|
),
|
|
324
|
-
...
|
|
324
|
+
...c
|
|
325
325
|
})
|
|
326
326
|
);
|
|
327
|
-
return a.displayName =
|
|
327
|
+
return a.displayName = me(t), a;
|
|
328
328
|
};
|
|
329
|
-
const
|
|
329
|
+
const Ye = [
|
|
330
330
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
331
331
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
332
332
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
333
|
-
],
|
|
334
|
-
const
|
|
333
|
+
], We = E("external-link", Ye);
|
|
334
|
+
const Ve = [
|
|
335
335
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
336
336
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
337
|
-
],
|
|
338
|
-
const { user: n, LinkComponent: a =
|
|
339
|
-
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children: n ? /* @__PURE__ */ r.jsxs(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
children: [
|
|
357
|
-
/* @__PURE__ */ r.jsx(
|
|
337
|
+
], Fe = E("user", Ve), Ue = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", Ge = ({ to: t, className: n, children: a }) => /* @__PURE__ */ r.jsx("a", { href: t, className: n, children: a }), he = "flex items-center justify-center gap-1 rounded-md border border-white/15 bg-white/10 px-1 py-1 font-medium text-[11px] text-white transition-all duration-150 hover:bg-white/25 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-600/80 pointer-coarse:min-h-11", Nt = (t) => {
|
|
338
|
+
const { user: n, LinkComponent: a = Ge } = t;
|
|
339
|
+
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children: n ? /* @__PURE__ */ r.jsxs(
|
|
340
|
+
"div",
|
|
341
|
+
{
|
|
342
|
+
"data-aqmb-session-card": !0,
|
|
343
|
+
className: "aiquants-session-card group relative flex flex-col gap-2 rounded-xl border border-white/20 bg-white/10 p-2.5 shadow-sm backdrop-blur-md transition-all duration-200 hover:border-white/30 hover:bg-white/15 dark:border-slate-700/60 dark:bg-slate-800/60 dark:hover:border-slate-600/80 dark:hover:bg-slate-800/90",
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
346
|
+
/* @__PURE__ */ r.jsxs("div", { className: "relative shrink-0", children: [
|
|
347
|
+
/* @__PURE__ */ r.jsx("div", { className: "h-8 w-8 overflow-hidden rounded-full border border-white/40 shadow-xs dark:border-slate-500", children: /* @__PURE__ */ r.jsx("img", { className: "h-full w-full rounded-full object-cover", src: n.photo || Ue, alt: n.displayName || "user profile" }) }),
|
|
348
|
+
/* @__PURE__ */ r.jsx("span", { className: "absolute -right-0.5 -bottom-0.5 h-2.5 w-2.5 rounded-full border-2 border-slate-900 bg-emerald-400", title: "Online" })
|
|
349
|
+
] }),
|
|
350
|
+
/* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1 leading-tight", children: [
|
|
351
|
+
/* @__PURE__ */ r.jsx("div", { className: "truncate font-semibold text-white text-xs tracking-tight dark:text-slate-100", title: n.displayName, children: n.displayName }),
|
|
352
|
+
/* @__PURE__ */ r.jsx("div", { className: "mt-0.5 font-medium text-[10px] text-white/75 tracking-tight dark:text-slate-400", children: "Google Account" })
|
|
353
|
+
] })
|
|
354
|
+
] }),
|
|
355
|
+
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-2 gap-1.5 border-white/15 border-t pt-1.5 dark:border-slate-700/50", children: [
|
|
356
|
+
/* @__PURE__ */ r.jsxs(a, { className: he, to: "/", children: [
|
|
357
|
+
/* @__PURE__ */ r.jsx(Fe, { size: 11, className: "shrink-0 opacity-80" }),
|
|
358
358
|
/* @__PURE__ */ r.jsx("span", { className: "truncate", children: "プロフィール" })
|
|
359
|
-
]
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
/* @__PURE__ */ r.jsxs(
|
|
363
|
-
a,
|
|
364
|
-
{
|
|
365
|
-
className: "flex items-center justify-center gap-1 rounded-md border border-white/15 bg-white/10 px-2 py-1 font-medium text-[11px] text-white transition-all duration-150 hover:bg-white/25 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-600/80",
|
|
366
|
-
to: "https://myaccount.google.com/",
|
|
367
|
-
children: [
|
|
368
|
-
/* @__PURE__ */ r.jsx($e, { size: 11, className: "shrink-0 opacity-80" }),
|
|
359
|
+
] }),
|
|
360
|
+
/* @__PURE__ */ r.jsxs(a, { className: he, to: "https://myaccount.google.com/", children: [
|
|
361
|
+
/* @__PURE__ */ r.jsx(We, { size: 11, className: "shrink-0 opacity-80" }),
|
|
369
362
|
/* @__PURE__ */ r.jsx("span", { className: "truncate", children: "Google" })
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
},
|
|
363
|
+
] })
|
|
364
|
+
] })
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
) : /* @__PURE__ */ r.jsx("div", { "data-aqmb-session-card": !0, className: "aiquants-session-card flex items-center justify-between rounded-xl border border-white/20 bg-white/10 p-2.5 shadow-xs dark:border-slate-700/60 dark:bg-slate-800/60", children: /* @__PURE__ */ r.jsx("span", { className: "font-medium text-white/90 text-xs dark:text-slate-200", children: "ログインしてください" }) }) });
|
|
368
|
+
}, oe = "aiquants-menu-pin-change";
|
|
376
369
|
let g = { pinned: !1, width: 0, active: !1 };
|
|
377
|
-
const
|
|
370
|
+
const je = (t = 240) => {
|
|
378
371
|
if (typeof window > "u" || typeof document > "u")
|
|
379
372
|
return { pinned: !1, width: 0, active: !1 };
|
|
380
373
|
try {
|
|
@@ -382,62 +375,62 @@ const we = (t = 240) => {
|
|
|
382
375
|
if (n) {
|
|
383
376
|
const u = Number.parseInt(n, 10);
|
|
384
377
|
if (!Number.isNaN(u)) {
|
|
385
|
-
const d = u > 0,
|
|
386
|
-
return g.pinned === d && g.width ===
|
|
378
|
+
const d = u > 0, m = d ? u || t : 0, v = g.active ?? d;
|
|
379
|
+
return g.pinned === d && g.width === m && g.active === v || (g = { pinned: d, width: m, active: v }), g;
|
|
387
380
|
}
|
|
388
381
|
}
|
|
389
|
-
const s = localStorage.getItem("aiquants-menu-pinned") === "true",
|
|
390
|
-
return g.pinned === s && g.width ===
|
|
382
|
+
const s = localStorage.getItem("aiquants-menu-pinned") === "true", c = s ? t : 0, o = g.active ?? s;
|
|
383
|
+
return g.pinned === s && g.width === c && g.active === o || (g = { pinned: s, width: c, active: o }), g;
|
|
391
384
|
} catch {
|
|
392
385
|
return { pinned: !1, width: 0, active: !1 };
|
|
393
386
|
}
|
|
394
|
-
},
|
|
387
|
+
}, pe = (t, n, a) => {
|
|
395
388
|
if (typeof window > "u") return;
|
|
396
|
-
const s = a ?? t,
|
|
397
|
-
(g.pinned !== t || g.width !== n || g.active !== s) && (g =
|
|
398
|
-
const o = new CustomEvent(
|
|
399
|
-
detail:
|
|
389
|
+
const s = a ?? t, c = { pinned: t, width: n, active: s };
|
|
390
|
+
(g.pinned !== t || g.width !== n || g.active !== s) && (g = c);
|
|
391
|
+
const o = new CustomEvent(oe, {
|
|
392
|
+
detail: c,
|
|
400
393
|
bubbles: !0,
|
|
401
394
|
cancelable: !1
|
|
402
395
|
});
|
|
403
396
|
window.dispatchEvent(o);
|
|
404
|
-
},
|
|
397
|
+
}, Be = (t, n) => {
|
|
405
398
|
if (typeof window > "u")
|
|
406
399
|
return () => {
|
|
407
400
|
};
|
|
408
401
|
const { immediate: a = !0, defaultPinnedWidth: s = 240 } = n ?? {};
|
|
409
402
|
if (a) {
|
|
410
|
-
const o =
|
|
403
|
+
const o = je(s);
|
|
411
404
|
t(o);
|
|
412
405
|
}
|
|
413
|
-
const
|
|
406
|
+
const c = (o) => {
|
|
414
407
|
const u = o;
|
|
415
408
|
u.detail && t(u.detail);
|
|
416
409
|
};
|
|
417
|
-
return window.addEventListener(
|
|
418
|
-
window.removeEventListener(
|
|
410
|
+
return window.addEventListener(oe, c, { passive: !0 }), () => {
|
|
411
|
+
window.removeEventListener(oe, c);
|
|
419
412
|
};
|
|
420
|
-
},
|
|
421
|
-
const n = t?.defaultPinnedWidth ?? 240, a = t?.initialPinned ?? !1, s =
|
|
422
|
-
(u) =>
|
|
413
|
+
}, _t = (t) => {
|
|
414
|
+
const n = t?.defaultPinnedWidth ?? 240, a = t?.initialPinned ?? !1, s = _(
|
|
415
|
+
(u) => Be(
|
|
423
416
|
() => {
|
|
424
417
|
u();
|
|
425
418
|
},
|
|
426
419
|
{ immediate: !1, defaultPinnedWidth: n }
|
|
427
420
|
),
|
|
428
421
|
[n]
|
|
429
|
-
),
|
|
422
|
+
), c = _(() => je(n), [n]), o = _(() => ({
|
|
430
423
|
pinned: a,
|
|
431
424
|
width: a ? n : 0
|
|
432
425
|
}), [a, n]);
|
|
433
|
-
return
|
|
426
|
+
return Me(s, c, o);
|
|
434
427
|
};
|
|
435
|
-
const
|
|
428
|
+
const Ze = [
|
|
436
429
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
437
430
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
438
431
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
439
|
-
],
|
|
440
|
-
const
|
|
432
|
+
], Je = E("log-out", Ze);
|
|
433
|
+
const Qe = [
|
|
441
434
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
442
435
|
[
|
|
443
436
|
"path",
|
|
@@ -446,8 +439,8 @@ const Ue = [
|
|
|
446
439
|
key: "1nkz8b"
|
|
447
440
|
}
|
|
448
441
|
]
|
|
449
|
-
],
|
|
450
|
-
const
|
|
442
|
+
], Ee = E("pin", Qe);
|
|
443
|
+
const Xe = [
|
|
451
444
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
452
445
|
["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
|
|
453
446
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
@@ -458,18 +451,18 @@ const Ge = [
|
|
|
458
451
|
key: "c9qhm2"
|
|
459
452
|
}
|
|
460
453
|
]
|
|
461
|
-
],
|
|
462
|
-
const
|
|
454
|
+
], Se = E("pin-off", Xe);
|
|
455
|
+
const Ke = [
|
|
463
456
|
["path", { d: "M5 21v-6", key: "1hz6c0" }],
|
|
464
457
|
["path", { d: "M12 21V9", key: "uvy0l4" }],
|
|
465
458
|
["path", { d: "M19 21V3", key: "11j9sm" }]
|
|
466
|
-
],
|
|
467
|
-
const
|
|
459
|
+
], et = E("chart-no-axes-column-increasing", Ke);
|
|
460
|
+
const tt = [
|
|
468
461
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
469
462
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
470
463
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
471
|
-
],
|
|
472
|
-
const
|
|
464
|
+
], nt = E("download", tt);
|
|
465
|
+
const rt = [
|
|
473
466
|
[
|
|
474
467
|
"path",
|
|
475
468
|
{
|
|
@@ -481,35 +474,35 @@ const Xe = [
|
|
|
481
474
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
482
475
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
483
476
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
484
|
-
],
|
|
485
|
-
const
|
|
477
|
+
], be = E("file-text", rt);
|
|
478
|
+
const at = [
|
|
486
479
|
["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" }],
|
|
487
480
|
["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" }]
|
|
488
|
-
],
|
|
489
|
-
const
|
|
481
|
+
], st = E("link", at);
|
|
482
|
+
const ot = [
|
|
490
483
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
491
484
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
492
|
-
],
|
|
493
|
-
const
|
|
485
|
+
], it = E("lock", ot);
|
|
486
|
+
const ct = [
|
|
494
487
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
495
488
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
496
489
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
497
490
|
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
498
|
-
],
|
|
499
|
-
report:
|
|
500
|
-
slip:
|
|
501
|
-
table:
|
|
502
|
-
chart:
|
|
503
|
-
download:
|
|
504
|
-
lock:
|
|
505
|
-
href:
|
|
506
|
-
},
|
|
507
|
-
const a = t ?
|
|
491
|
+
], lt = E("table", ct), ie = "pointer-coarse:flex pointer-coarse:min-h-11 pointer-coarse:flex-1 pointer-coarse:items-center", xe = "py-1 pointer-coarse:py-0", ut = "pointer-coarse:min-h-11 pointer-coarse:min-w-11", dt = typeof window < "u" ? ye : V, ve = "aiquants-menu-scroll", Ce = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), ft = {
|
|
492
|
+
report: be,
|
|
493
|
+
slip: be,
|
|
494
|
+
table: lt,
|
|
495
|
+
chart: et,
|
|
496
|
+
download: nt,
|
|
497
|
+
lock: it,
|
|
498
|
+
href: st
|
|
499
|
+
}, mt = ({ mark: t, children: n }) => {
|
|
500
|
+
const a = t ? ft[t] : void 0;
|
|
508
501
|
return a ? /* @__PURE__ */ r.jsxs("div", { className: "flex flex-nowrap items-center", children: [
|
|
509
502
|
/* @__PURE__ */ r.jsx(a, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
510
503
|
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: n })
|
|
511
504
|
] }) : /* @__PURE__ */ r.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: n });
|
|
512
|
-
},
|
|
505
|
+
}, ce = (t, n) => n ? {
|
|
513
506
|
menu: {
|
|
514
507
|
id: t.id,
|
|
515
508
|
title: t.title,
|
|
@@ -528,122 +521,131 @@ const rt = [
|
|
|
528
521
|
title: t.title,
|
|
529
522
|
href: t.href
|
|
530
523
|
}
|
|
531
|
-
},
|
|
524
|
+
}, ht = ({ item: t, parentMenu: n, isCurrent: a, onMenuSelected: s }) => {
|
|
532
525
|
if (t.href === "separator")
|
|
533
526
|
return /* @__PURE__ */ r.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
534
|
-
const
|
|
527
|
+
const c = /* @__PURE__ */ r.jsx(mt, { mark: t.mark, children: t.title }), o = {
|
|
528
|
+
className: ie,
|
|
535
529
|
"aria-current": a ? "page" : void 0,
|
|
536
530
|
onClick: () => {
|
|
537
|
-
s && s(
|
|
531
|
+
s && s(ce(n, t));
|
|
538
532
|
}
|
|
539
533
|
};
|
|
540
|
-
return t.new ? /* @__PURE__ */ r.jsx("a", { href: t.href, rel: "noopener noreferrer", target: "_blank", ...o, children:
|
|
541
|
-
},
|
|
542
|
-
const s =
|
|
534
|
+
return t.new ? /* @__PURE__ */ r.jsx("a", { href: t.href, rel: "noopener noreferrer", target: "_blank", ...o, children: c }) : Ce.test(t.href) ? /* @__PURE__ */ r.jsx("a", { href: t.href, ...o, children: c }) : /* @__PURE__ */ r.jsx(Ne, { to: t.href, ...o, children: c });
|
|
535
|
+
}, Te = (t) => t ? t.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", ge = (t, n, a) => {
|
|
536
|
+
const s = Te(t);
|
|
543
537
|
return s === "" ? -1 : s === a || n === "prefix" && s !== "/" && a.startsWith(`${s}/`) ? s.length : -1;
|
|
544
|
-
},
|
|
545
|
-
const a =
|
|
546
|
-
let s = null,
|
|
538
|
+
}, pt = (t, n) => {
|
|
539
|
+
const a = Te(n);
|
|
540
|
+
let s = null, c = -1;
|
|
547
541
|
for (const o of t) {
|
|
548
|
-
const u =
|
|
549
|
-
if (u >
|
|
542
|
+
const u = ge(o.href, o.match, a);
|
|
543
|
+
if (u > c && (s = { menuId: o.id, subid: null }, c = u), o.submenu)
|
|
550
544
|
for (const d of o.submenu) {
|
|
551
|
-
const
|
|
552
|
-
|
|
545
|
+
const m = ge(d.href, d.match, a);
|
|
546
|
+
m > c && (s = { menuId: o.id, subid: d.subid }, c = m);
|
|
553
547
|
}
|
|
554
548
|
}
|
|
555
549
|
return s;
|
|
556
|
-
}, ne = (t, n, a) => t !== null && t.menuId === n && t.subid === a,
|
|
557
|
-
const { menuList: n, onMenuSelected: a, pinnedSubmenuIds: s = [], onToggleSubmenuPin:
|
|
550
|
+
}, ne = (t, n, a) => t !== null && t.menuId === n && t.subid === a, bt = (t) => {
|
|
551
|
+
const { menuList: n, onMenuSelected: a, pinnedSubmenuIds: s = [], onToggleSubmenuPin: c } = t;
|
|
558
552
|
let o = "";
|
|
559
553
|
try {
|
|
560
|
-
o =
|
|
554
|
+
o = Re().pathname;
|
|
561
555
|
} catch {
|
|
562
556
|
typeof window < "u" && (o = window.location.pathname);
|
|
563
557
|
}
|
|
564
|
-
const u =
|
|
565
|
-
|
|
566
|
-
y.current !== o && (y.current = o,
|
|
558
|
+
const u = le(() => pt(n, o), [n, o]), d = u === null ? null : u.menuId, [m, v] = J(d), y = q(o), N = q(d !== null);
|
|
559
|
+
V(() => {
|
|
560
|
+
y.current !== o && (y.current = o, N.current = !1), !N.current && d !== null && (v(d), N.current = !0);
|
|
567
561
|
}, [o, d]);
|
|
568
|
-
const k =
|
|
569
|
-
(
|
|
570
|
-
s.includes(
|
|
562
|
+
const k = _(
|
|
563
|
+
(l) => {
|
|
564
|
+
s.includes(l) || v((S) => S === l ? null : l);
|
|
571
565
|
},
|
|
572
566
|
[s]
|
|
573
|
-
),
|
|
574
|
-
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
567
|
+
), j = q(null);
|
|
568
|
+
dt(() => {
|
|
569
|
+
const l = j.current;
|
|
570
|
+
if (l)
|
|
577
571
|
try {
|
|
578
|
-
const p = sessionStorage.getItem(
|
|
572
|
+
const p = sessionStorage.getItem(ve);
|
|
579
573
|
if (p !== null) {
|
|
580
574
|
const S = Number.parseFloat(p);
|
|
581
|
-
Number.isNaN(S) || (
|
|
575
|
+
Number.isNaN(S) || (l.scrollTop = S);
|
|
582
576
|
}
|
|
583
577
|
} catch {
|
|
584
578
|
}
|
|
585
579
|
}, []);
|
|
586
|
-
const
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
580
|
+
const T = _(() => {
|
|
581
|
+
const l = j.current;
|
|
582
|
+
if (l)
|
|
589
583
|
try {
|
|
590
|
-
sessionStorage.setItem(
|
|
584
|
+
sessionStorage.setItem(ve, String(l.scrollTop));
|
|
591
585
|
} catch {
|
|
592
586
|
}
|
|
593
|
-
}, []),
|
|
594
|
-
"
|
|
595
|
-
{
|
|
596
|
-
href: c.href,
|
|
597
|
-
"aria-current": ne(u, c.id, null) ? "page" : void 0,
|
|
598
|
-
onClick: () => {
|
|
599
|
-
a && a(oe(c));
|
|
600
|
-
},
|
|
601
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: c.title })
|
|
602
|
-
}
|
|
603
|
-
) : /* @__PURE__ */ r.jsx(
|
|
604
|
-
ve,
|
|
587
|
+
}, []), R = le(() => /* @__PURE__ */ r.jsx(r.Fragment, { children: n.map((l) => /* @__PURE__ */ r.jsx("div", { children: l.href ? /* @__PURE__ */ r.jsx(
|
|
588
|
+
"div",
|
|
605
589
|
{
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
590
|
+
className: `aiquants-menu-list-item relative mb-0.5 ml-1 flex items-center rounded-l-xl px-2.5 ${xe} text-xs before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] sm:text-sm`,
|
|
591
|
+
children: Ce.test(l.href) ? /* @__PURE__ */ r.jsx(
|
|
592
|
+
"a",
|
|
593
|
+
{
|
|
594
|
+
href: l.href,
|
|
595
|
+
className: ie,
|
|
596
|
+
"aria-current": ne(u, l.id, null) ? "page" : void 0,
|
|
597
|
+
onClick: () => {
|
|
598
|
+
a && a(ce(l));
|
|
599
|
+
},
|
|
600
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: l.title })
|
|
601
|
+
}
|
|
602
|
+
) : /* @__PURE__ */ r.jsx(
|
|
603
|
+
Ne,
|
|
604
|
+
{
|
|
605
|
+
to: l.href,
|
|
606
|
+
className: ie,
|
|
607
|
+
"aria-current": ne(u, l.id, null) ? "page" : void 0,
|
|
608
|
+
onClick: () => {
|
|
609
|
+
a && a(ce(l));
|
|
610
|
+
},
|
|
611
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: l.title })
|
|
612
|
+
}
|
|
613
|
+
)
|
|
612
614
|
}
|
|
613
|
-
)
|
|
615
|
+
) : /* @__PURE__ */ r.jsxs("details", { className: "aiquants-menu-accordion-details", open: l.id === m || s.includes(l.id), children: [
|
|
614
616
|
/* @__PURE__ */ r.jsxs(
|
|
615
617
|
"summary",
|
|
616
618
|
{
|
|
617
|
-
className:
|
|
619
|
+
className: `aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-0.5 ml-1 list-none rounded-l-xl px-2.5 ${xe} pointer-coarse:min-h-11 text-xs before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] focus-visible:outline-2 focus-visible:outline-current focus-visible:-outline-offset-2 sm:text-sm`,
|
|
618
620
|
onClick: (p) => {
|
|
619
|
-
p.preventDefault(), k(
|
|
621
|
+
p.preventDefault(), k(l.id);
|
|
620
622
|
},
|
|
621
623
|
onKeyDown: (p) => {
|
|
622
|
-
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), k(
|
|
624
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), k(l.id));
|
|
623
625
|
},
|
|
624
626
|
children: [
|
|
625
|
-
/* @__PURE__ */ r.jsx("span", { children:
|
|
627
|
+
/* @__PURE__ */ r.jsx("span", { children: l.title }),
|
|
626
628
|
/* @__PURE__ */ r.jsx(
|
|
627
629
|
"button",
|
|
628
630
|
{
|
|
629
631
|
type: "button",
|
|
630
632
|
"data-aqmb-submenu-pin-button": !0,
|
|
631
633
|
onClick: (p) => {
|
|
632
|
-
p.stopPropagation(), p.preventDefault(),
|
|
634
|
+
p.stopPropagation(), p.preventDefault(), c && c(l.id);
|
|
633
635
|
},
|
|
634
|
-
className: `aiquants-submenu-pin-button ${s.includes(
|
|
635
|
-
title: s.includes(
|
|
636
|
-
children: s.includes(
|
|
636
|
+
className: `aiquants-submenu-pin-button ${ut} ${s.includes(l.id) ? "pinned" : ""}`,
|
|
637
|
+
title: s.includes(l.id) ? "ピン留め解除" : "ピン留め",
|
|
638
|
+
children: s.includes(l.id) ? /* @__PURE__ */ r.jsx(Ee, { size: 13 }) : /* @__PURE__ */ r.jsx(Se, { size: 13 })
|
|
637
639
|
}
|
|
638
640
|
)
|
|
639
641
|
]
|
|
640
642
|
}
|
|
641
643
|
),
|
|
642
|
-
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-0.5 mr-1 ml-3.5 rounded-lg px-2 py-1 shadow-sm", children:
|
|
643
|
-
] }) },
|
|
644
|
-
return /* @__PURE__ */ r.jsx("div", { ref:
|
|
645
|
-
},
|
|
646
|
-
const { menuList: n, menuHeader: a, open: s, onMenuSelected:
|
|
644
|
+
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-0.5 mr-1 ml-3.5 rounded-lg px-2 py-1 shadow-sm", children: l.submenu.map((p) => /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap pointer-coarse:py-0 py-0.5 text-xs", children: /* @__PURE__ */ r.jsx(ht, { item: p, parentMenu: l, isCurrent: ne(u, l.id, p.subid), onMenuSelected: a }) }, p.subid)) })
|
|
645
|
+
] }) }, l.id)) }), [n, a, m, k, s, u]);
|
|
646
|
+
return /* @__PURE__ */ r.jsx("div", { ref: j, onScroll: T, "data-aqmb-menu-list": !0, className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: R });
|
|
647
|
+
}, re = "h-7 pointer-coarse:h-11", we = "pointer-coarse:min-w-11", xt = (t) => {
|
|
648
|
+
const { menuList: n, menuHeader: a, open: s, onMenuSelected: c, onClickSignout: o, theme: u, toggleTheme: d, isPinned: m, onTogglePin: v, pinnedSubmenuIds: y, onToggleSubmenuPin: N, ref: k } = t;
|
|
647
649
|
return /* @__PURE__ */ r.jsxs(
|
|
648
650
|
"div",
|
|
649
651
|
{
|
|
@@ -653,7 +655,7 @@ const rt = [
|
|
|
653
655
|
className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[240px] select-none flex-col motion-safe:transition-transform motion-safe:duration-500 ${s ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`,
|
|
654
656
|
children: [
|
|
655
657
|
/* @__PURE__ */ r.jsx("div", { className: "flex shrink-0 flex-col justify-center border-white/15 border-b px-2.5 py-2 dark:border-slate-700/60", children: a }),
|
|
656
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col overflow-y-auto", children: /* @__PURE__ */ r.jsx(
|
|
658
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col overflow-y-auto", children: /* @__PURE__ */ r.jsx(bt, { menuList: n, onMenuSelected: c, pinnedSubmenuIds: y, onToggleSubmenuPin: N }) }),
|
|
657
659
|
/* @__PURE__ */ r.jsx("div", { className: "border-white/15 border-t px-2.5 py-1.5 dark:border-slate-700/60", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between gap-1.5", children: [
|
|
658
660
|
/* @__PURE__ */ r.jsx(
|
|
659
661
|
"button",
|
|
@@ -661,10 +663,10 @@ const rt = [
|
|
|
661
663
|
type: "button",
|
|
662
664
|
onClick: v,
|
|
663
665
|
"data-aqmb-pin-button": !0,
|
|
664
|
-
className: `flex
|
|
665
|
-
title:
|
|
666
|
-
"aria-label":
|
|
667
|
-
children:
|
|
666
|
+
className: `flex ${re} ${we} items-center justify-center rounded-md px-2 text-[11px] text-white shadow-2xs transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${m ? "bg-amber-500 hover:bg-amber-600 dark:bg-amber-600 dark:hover:bg-amber-500" : "border border-white/20 bg-white/10 hover:bg-white/20 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600"}`,
|
|
667
|
+
title: m ? "ピン留め解除" : "ピン留め",
|
|
668
|
+
"aria-label": m ? "ピン留め解除" : "ピン留め",
|
|
669
|
+
children: m ? /* @__PURE__ */ r.jsx(Ee, { size: 12 }) : /* @__PURE__ */ r.jsx(Se, { size: 12 })
|
|
668
670
|
}
|
|
669
671
|
),
|
|
670
672
|
/* @__PURE__ */ r.jsx(
|
|
@@ -673,7 +675,7 @@ const rt = [
|
|
|
673
675
|
type: "button",
|
|
674
676
|
onClick: d,
|
|
675
677
|
"data-aqmb-theme-button": !0,
|
|
676
|
-
className:
|
|
678
|
+
className: `group relative flex ${re} ${we} items-center justify-center rounded-md border border-white/20 bg-white/10 px-2 text-[11px] text-white shadow-2xs backdrop-blur-xs transition-all duration-200 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600`,
|
|
677
679
|
title: u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
678
680
|
"aria-label": u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
679
681
|
children: /* @__PURE__ */ r.jsx("span", { className: "text-xs transition-transform duration-200 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" })
|
|
@@ -684,10 +686,10 @@ const rt = [
|
|
|
684
686
|
{
|
|
685
687
|
type: "button",
|
|
686
688
|
"data-aqmb-signout-button": !0,
|
|
687
|
-
className:
|
|
689
|
+
className: `aiquants-signout-button flex ${re} flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-red-500/90 px-2.5 font-medium text-[11px] text-white shadow-2xs transition-colors duration-200 hover:bg-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60 dark:bg-red-600/90 dark:hover:bg-red-500`,
|
|
688
690
|
onClick: o,
|
|
689
691
|
children: [
|
|
690
|
-
/* @__PURE__ */ r.jsx(
|
|
692
|
+
/* @__PURE__ */ r.jsx(Je, { size: 11, className: "shrink-0" }),
|
|
691
693
|
/* @__PURE__ */ r.jsx("span", { children: "サインアウト" })
|
|
692
694
|
]
|
|
693
695
|
}
|
|
@@ -696,9 +698,9 @@ const rt = [
|
|
|
696
698
|
]
|
|
697
699
|
}
|
|
698
700
|
);
|
|
699
|
-
},
|
|
701
|
+
}, vt = (t) => {
|
|
700
702
|
t.preventDefault();
|
|
701
|
-
},
|
|
703
|
+
}, gt = (t) => {
|
|
702
704
|
const { isOverlay: n, onOverlayClick: a } = t;
|
|
703
705
|
return /* @__PURE__ */ r.jsx(
|
|
704
706
|
"div",
|
|
@@ -707,11 +709,11 @@ const rt = [
|
|
|
707
709
|
"data-aqmb-menu-overlay": !0,
|
|
708
710
|
inert: !n,
|
|
709
711
|
className: `fixed inset-0 z-2147483640 bg-black/50 motion-safe:transition-opacity motion-safe:duration-500 ${n ? "opacity-100" : "pointer-events-none opacity-0"}`,
|
|
710
|
-
onMouseDown:
|
|
712
|
+
onMouseDown: vt,
|
|
711
713
|
onClick: a
|
|
712
714
|
}
|
|
713
715
|
);
|
|
714
|
-
},
|
|
716
|
+
}, wt = ({ isMenuOpen: t, onMenuOpen: n, onMenuClose: a, ref: s }) => /* @__PURE__ */ r.jsxs("button", { ref: s, type: "button", "data-aqmb-menu-switch": "true", "aria-label": t ? "Close menu" : "Open menu", "aria-expanded": t, className: "aiquants-menu-switch", onClick: t ? a : n, children: [
|
|
715
717
|
/* @__PURE__ */ r.jsxs("span", { className: "aiquants-menu-switch-bars", children: [
|
|
716
718
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
717
719
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
@@ -719,49 +721,49 @@ const rt = [
|
|
|
719
721
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" })
|
|
720
722
|
] }),
|
|
721
723
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-caption", "aria-hidden": "true", children: t ? "close" : "menu" })
|
|
722
|
-
] }),
|
|
724
|
+
] }), ae = typeof window < "u" ? ye : V, jt = (t) => {
|
|
723
725
|
const {
|
|
724
726
|
menuList: n,
|
|
725
727
|
menuHeader: a,
|
|
726
728
|
onClickSignout: s,
|
|
727
|
-
isMenuhide:
|
|
729
|
+
isMenuhide: c,
|
|
728
730
|
isMenuHide: o,
|
|
729
731
|
theme: u,
|
|
730
732
|
toggleTheme: d,
|
|
731
|
-
onMenuNavigate:
|
|
733
|
+
onMenuNavigate: m,
|
|
732
734
|
isPinned: v,
|
|
733
735
|
pinnedWidth: y = 240,
|
|
734
|
-
onPinChange:
|
|
736
|
+
onPinChange: N,
|
|
735
737
|
pinnedSubmenuIds: k,
|
|
736
|
-
initialPinnedSubmenuIds:
|
|
737
|
-
onSubmenuPinChange:
|
|
738
|
-
closeOnEscape:
|
|
739
|
-
} = t,
|
|
738
|
+
initialPinnedSubmenuIds: j,
|
|
739
|
+
onSubmenuPinChange: T,
|
|
740
|
+
closeOnEscape: R = "auto"
|
|
741
|
+
} = t, l = o ?? c ?? !1, [p, S] = J(() => {
|
|
740
742
|
try {
|
|
741
743
|
return localStorage.getItem("aiquants-menu-pinned") === "true";
|
|
742
744
|
} catch {
|
|
743
745
|
return !1;
|
|
744
746
|
}
|
|
745
|
-
}), w = v !== void 0 ? v : p, [
|
|
746
|
-
|
|
747
|
-
w &&
|
|
747
|
+
}), w = v !== void 0 ? v : p, [C, O] = J(w);
|
|
748
|
+
V(() => {
|
|
749
|
+
w && O(!0);
|
|
748
750
|
}, [w]);
|
|
749
|
-
const [$, Q] =
|
|
750
|
-
if (
|
|
751
|
-
return
|
|
751
|
+
const [$, Q] = J(() => {
|
|
752
|
+
if (j)
|
|
753
|
+
return j;
|
|
752
754
|
try {
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
const e = JSON.parse(
|
|
755
|
+
const h = localStorage.getItem("aiquants-submenu-pinned");
|
|
756
|
+
if (h) {
|
|
757
|
+
const e = JSON.parse(h);
|
|
756
758
|
if (Array.isArray(e))
|
|
757
759
|
return e.filter((i) => typeof i == "number");
|
|
758
760
|
}
|
|
759
761
|
} catch {
|
|
760
762
|
}
|
|
761
763
|
return [];
|
|
762
|
-
}), X = k !== void 0 ? k : $, D =
|
|
763
|
-
(
|
|
764
|
-
const e = k !== void 0 ? k : $, i = e.includes(
|
|
764
|
+
}), X = k !== void 0 ? k : $, D = _(
|
|
765
|
+
(h) => {
|
|
766
|
+
const e = k !== void 0 ? k : $, i = e.includes(h) ? e.filter((f) => f !== h) : [...e, h];
|
|
765
767
|
if (k === void 0) {
|
|
766
768
|
Q(i);
|
|
767
769
|
try {
|
|
@@ -769,24 +771,24 @@ const rt = [
|
|
|
769
771
|
} catch {
|
|
770
772
|
}
|
|
771
773
|
}
|
|
772
|
-
|
|
774
|
+
T && T(i);
|
|
773
775
|
},
|
|
774
|
-
[k, $,
|
|
775
|
-
), z =
|
|
776
|
-
|
|
777
|
-
z.current =
|
|
778
|
-
}, [
|
|
779
|
-
const
|
|
780
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", e),
|
|
781
|
-
}, [w, y,
|
|
782
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"),
|
|
776
|
+
[k, $, T]
|
|
777
|
+
), z = q(N);
|
|
778
|
+
ae(() => {
|
|
779
|
+
z.current = N;
|
|
780
|
+
}, [N]), ae(() => {
|
|
781
|
+
const h = w ? y : 0, e = `${h}px`;
|
|
782
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", e), pe(w, h, C || w);
|
|
783
|
+
}, [w, y, C]), ae(() => () => {
|
|
784
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"), pe(!1, 0);
|
|
783
785
|
}, []);
|
|
784
|
-
const F =
|
|
785
|
-
|
|
786
|
-
}, []), K =
|
|
787
|
-
|
|
788
|
-
}, []),
|
|
789
|
-
if (
|
|
786
|
+
const F = q(null), I = q(null), A = _(() => {
|
|
787
|
+
I.current?.contains(document.activeElement) && F.current?.focus();
|
|
788
|
+
}, []), K = _(() => {
|
|
789
|
+
O(!0);
|
|
790
|
+
}, []), P = _(() => {
|
|
791
|
+
if (A(), O(!1), v === void 0) {
|
|
790
792
|
S(!1);
|
|
791
793
|
try {
|
|
792
794
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
@@ -794,40 +796,40 @@ const rt = [
|
|
|
794
796
|
}
|
|
795
797
|
}
|
|
796
798
|
z.current?.(!1, 0);
|
|
797
|
-
}, [v,
|
|
798
|
-
const
|
|
799
|
+
}, [v, A]), U = _(() => {
|
|
800
|
+
const h = !w, e = h ? y : 0;
|
|
799
801
|
if (v === void 0) {
|
|
800
|
-
S(
|
|
802
|
+
S(h);
|
|
801
803
|
try {
|
|
802
|
-
|
|
804
|
+
h ? localStorage.setItem("aiquants-menu-pinned", "true") : localStorage.removeItem("aiquants-menu-pinned");
|
|
803
805
|
} catch {
|
|
804
806
|
}
|
|
805
807
|
}
|
|
806
|
-
z.current?.(
|
|
807
|
-
}, [w, v, y]), G =
|
|
808
|
-
(
|
|
809
|
-
|
|
808
|
+
z.current?.(h, e);
|
|
809
|
+
}, [w, v, y]), G = _(
|
|
810
|
+
(h) => {
|
|
811
|
+
m && m(h), w || (A(), O(!1));
|
|
810
812
|
},
|
|
811
|
-
[
|
|
812
|
-
), M =
|
|
813
|
-
(
|
|
814
|
-
|
|
813
|
+
[m, w, A]
|
|
814
|
+
), M = _(
|
|
815
|
+
(h) => {
|
|
816
|
+
h.key === "Escape" && P();
|
|
815
817
|
},
|
|
816
|
-
[
|
|
817
|
-
),
|
|
818
|
-
return
|
|
818
|
+
[P]
|
|
819
|
+
), H = R === !0 || R === "auto" && !w;
|
|
820
|
+
return V(() => (C && H ? window.addEventListener("keydown", M) : window.removeEventListener("keydown", M), () => {
|
|
819
821
|
window.removeEventListener("keydown", M);
|
|
820
|
-
}), [
|
|
821
|
-
/* @__PURE__ */ r.jsx(
|
|
822
|
+
}), [C, H, M]), l ? null : /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-bar ${u}`, children: [
|
|
823
|
+
/* @__PURE__ */ r.jsx(wt, { ref: F, isMenuOpen: C, onMenuOpen: K, onMenuClose: P }),
|
|
822
824
|
/* @__PURE__ */ r.jsx(
|
|
823
|
-
|
|
825
|
+
xt,
|
|
824
826
|
{
|
|
825
|
-
ref:
|
|
827
|
+
ref: I,
|
|
826
828
|
menuList: n,
|
|
827
829
|
menuHeader: a,
|
|
828
830
|
onClickSignout: s,
|
|
829
831
|
onMenuSelected: G,
|
|
830
|
-
open:
|
|
832
|
+
open: C,
|
|
831
833
|
theme: u,
|
|
832
834
|
toggleTheme: d,
|
|
833
835
|
isPinned: w,
|
|
@@ -836,16 +838,16 @@ const rt = [
|
|
|
836
838
|
onToggleSubmenuPin: D
|
|
837
839
|
}
|
|
838
840
|
),
|
|
839
|
-
/* @__PURE__ */ r.jsx(
|
|
841
|
+
/* @__PURE__ */ r.jsx(gt, { isOverlay: C && !w, onOverlayClick: P })
|
|
840
842
|
] });
|
|
841
843
|
};
|
|
842
844
|
export {
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
845
|
+
Ge as DefaultLink,
|
|
846
|
+
oe as MENU_PIN_CHANGE_EVENT,
|
|
847
|
+
jt as MenuBar,
|
|
848
|
+
Nt as SessionInfo,
|
|
849
|
+
pe as dispatchMenuPinChange,
|
|
850
|
+
je as getInitialPinState,
|
|
851
|
+
Be as subscribeMenuPinChange,
|
|
852
|
+
_t as useMenuPinState
|
|
851
853
|
};
|