@aiquants/menu-bar 1.15.0 → 1.16.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/README.md +22 -13
- package/dist/MenuBar.d.ts +5 -0
- package/dist/index.es.js +256 -237
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,13 +28,13 @@ export { MenuBar } from '@aiquants/menu-bar';
|
|
|
28
28
|
export { SessionInfo, DefaultLink } from '@aiquants/menu-bar';
|
|
29
29
|
|
|
30
30
|
// Types
|
|
31
|
-
export type { IMenu, ISubmenu } from '@aiquants/menu-bar';
|
|
31
|
+
export type { IMenu, ISubmenu, MenuNavigationPayload } from '@aiquants/menu-bar';
|
|
32
32
|
export type { Theme } from '@aiquants/menu-bar';
|
|
33
33
|
export type { SessionInfoProps, LinkProps } from '@aiquants/menu-bar';
|
|
34
|
-
export type { UserProfile
|
|
34
|
+
export type { UserProfile } from '@aiquants/menu-bar';
|
|
35
35
|
|
|
36
36
|
// CSS (import separately)
|
|
37
|
-
import '@aiquants/menu-bar/css';
|
|
37
|
+
import '@aiquants/menu-bar/styles/menu-bar.css';
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Basic Usage
|
|
@@ -42,7 +42,7 @@ import '@aiquants/menu-bar/css';
|
|
|
42
42
|
```tsx
|
|
43
43
|
import React, { useState } from 'react';
|
|
44
44
|
import { MenuBar } from '@aiquants/menu-bar';
|
|
45
|
-
import '@aiquants/menu-bar/css';
|
|
45
|
+
import '@aiquants/menu-bar/styles/menu-bar.css';
|
|
46
46
|
|
|
47
47
|
function App() {
|
|
48
48
|
const [theme, setTheme] = useState('light');
|
|
@@ -99,6 +99,12 @@ function App() {
|
|
|
99
99
|
| `onClickSignout` | `() => void` | Yes | Callback function for sign out action |
|
|
100
100
|
| `menuHeader` | `React.ReactNode` | No | Optional header content for the menu |
|
|
101
101
|
| `isMenuhide` | `boolean` | No | Whether to hide the menu bar entirely |
|
|
102
|
+
| `onMenuNavigate` | `(payload: MenuNavigationPayload) => void` | No | Callback function triggered when a menu or submenu item is selected |
|
|
103
|
+
| `onPinChange` | `(pinned: boolean) => void` | No | Callback function triggered when the menu bar's pin state changes |
|
|
104
|
+
| `pinnedSubmenuIds` | `number[]` | No | Pinned submenu IDs (controlled) |
|
|
105
|
+
| `initialPinnedSubmenuIds` | `number[]` | No | Initial pinned submenu IDs |
|
|
106
|
+
| `onSubmenuPinChange` | `(pinnedIds: number[]) => void` | No | Callback function triggered when submenu pin states change |
|
|
107
|
+
| `closeOnEscape` | `boolean \| "auto"` | No | Controls whether the Escape key closes the menu. `"auto"` (default) closes only when not pinned; `true` always closes; `false` never closes |
|
|
102
108
|
|
|
103
109
|
### IMenu Type
|
|
104
110
|
|
|
@@ -123,18 +129,23 @@ interface ISubmenu {
|
|
|
123
129
|
}
|
|
124
130
|
```
|
|
125
131
|
|
|
132
|
+
### MenuNavigationPayload Type
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
type MenuNavigationPayload = {
|
|
136
|
+
menu: Pick<IMenu, 'id' | 'title' | 'href'>;
|
|
137
|
+
submenu?: Pick<ISubmenu, 'subid' | 'title' | 'href' | 'mark' | 'new'>;
|
|
138
|
+
};
|
|
139
|
+
```
|
|
140
|
+
|
|
126
141
|
### UserProfile Type
|
|
127
142
|
|
|
128
143
|
```tsx
|
|
129
144
|
interface UserProfile {
|
|
130
145
|
displayName: string;
|
|
131
|
-
|
|
146
|
+
photo: string;
|
|
132
147
|
id?: string;
|
|
133
148
|
}
|
|
134
|
-
|
|
135
|
-
interface UserPhoto {
|
|
136
|
-
value: string;
|
|
137
|
-
}
|
|
138
149
|
```
|
|
139
150
|
|
|
140
151
|
### SessionInfoProps Type
|
|
@@ -142,8 +153,7 @@ interface UserPhoto {
|
|
|
142
153
|
```tsx
|
|
143
154
|
interface SessionInfoProps {
|
|
144
155
|
user: UserProfile | null;
|
|
145
|
-
|
|
146
|
-
LinkComponent: React.ComponentType<LinkProps>;
|
|
156
|
+
LinkComponent?: React.ComponentType<LinkProps>;
|
|
147
157
|
}
|
|
148
158
|
|
|
149
159
|
interface LinkProps {
|
|
@@ -275,9 +285,8 @@ import { SessionInfo } from '@aiquants/menu-bar';
|
|
|
275
285
|
<SessionInfo
|
|
276
286
|
user={{
|
|
277
287
|
displayName: "John Doe",
|
|
278
|
-
|
|
288
|
+
photo: "https://example.com/avatar.jpg"
|
|
279
289
|
}}
|
|
280
|
-
onLogout={() => console.log('Logout')}
|
|
281
290
|
LinkComponent={({ to, children, ...props }) => (
|
|
282
291
|
<a href={to} {...props}>{children}</a>
|
|
283
292
|
)}
|
package/dist/MenuBar.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ import { Theme } from './types';
|
|
|
12
12
|
* @property {Theme} theme - The current theme.
|
|
13
13
|
* @property {() => void} toggleTheme - Function to toggle the theme.
|
|
14
14
|
* @property {(payload: MenuNavigationPayload) => void} [onMenuNavigate] - Function to receive menu navigation events. メニュー遷移イベントを受け取る関数。
|
|
15
|
+
* @property {boolean | "auto"} [closeOnEscape] - Controls whether the Escape key closes the menu.
|
|
16
|
+
* - "auto" (default): closes when NOT pinned, stays open when pinned. ピン留めなしでは閉じ、ピン留め中は閉じない。
|
|
17
|
+
* - true: always closes on Escape (resets pin if pinned). 常に閉じる。
|
|
18
|
+
* - false: never closes on Escape. 常に閉じない。
|
|
15
19
|
*/
|
|
16
20
|
interface IMenuBarProps {
|
|
17
21
|
menuList: IMenu[];
|
|
@@ -25,6 +29,7 @@ interface IMenuBarProps {
|
|
|
25
29
|
pinnedSubmenuIds?: number[];
|
|
26
30
|
initialPinnedSubmenuIds?: number[];
|
|
27
31
|
onSubmenuPinChange?(pinnedIds: number[]): void;
|
|
32
|
+
closeOnEscape?: boolean | "auto";
|
|
28
33
|
}
|
|
29
34
|
/**
|
|
30
35
|
* @function MenuBar
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Pin as
|
|
3
|
-
import { useLocation as
|
|
4
|
-
var
|
|
1
|
+
import xe, { useMemo as ne, useState as Y, useRef as _, useEffect as M, useCallback as w, useLayoutEffect as ue } from "react";
|
|
2
|
+
import { Pin as de, PinOff as fe, Link as be, Lock as ge, Download as ve, BarChart as ye, Table as ke, FileText as te } from "lucide-react";
|
|
3
|
+
import { useLocation as we, Link as me } from "react-router-dom";
|
|
4
|
+
var D = { exports: {} }, I = {};
|
|
5
5
|
var re;
|
|
6
|
-
function
|
|
6
|
+
function je() {
|
|
7
7
|
if (re) return I;
|
|
8
8
|
re = 1;
|
|
9
|
-
var
|
|
9
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
10
|
function a(l, c, i) {
|
|
11
11
|
var u = null;
|
|
12
12
|
if (i !== void 0 && (u = "" + i), c.key !== void 0 && (u = "" + c.key), "key" in c) {
|
|
@@ -15,102 +15,102 @@ function we() {
|
|
|
15
15
|
h !== "key" && (i[h] = c[h]);
|
|
16
16
|
} else i = c;
|
|
17
17
|
return c = i.ref, {
|
|
18
|
-
$$typeof:
|
|
18
|
+
$$typeof: t,
|
|
19
19
|
type: l,
|
|
20
20
|
key: u,
|
|
21
21
|
ref: c !== void 0 ? c : null,
|
|
22
22
|
props: i
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return I.Fragment =
|
|
25
|
+
return I.Fragment = r, I.jsx = a, I.jsxs = a, I;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
function
|
|
27
|
+
var A = {};
|
|
28
|
+
var se;
|
|
29
|
+
function Ee() {
|
|
30
|
+
return se || (se = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
+
function t(e) {
|
|
32
32
|
if (e == null) return null;
|
|
33
33
|
if (typeof e == "function")
|
|
34
|
-
return e.$$typeof ===
|
|
34
|
+
return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
35
35
|
if (typeof e == "string") return e;
|
|
36
36
|
switch (e) {
|
|
37
|
-
case
|
|
37
|
+
case m:
|
|
38
38
|
return "Fragment";
|
|
39
|
-
case
|
|
39
|
+
case E:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case S:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case P:
|
|
44
44
|
return "Suspense";
|
|
45
45
|
case W:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case L:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
50
|
if (typeof e == "object")
|
|
51
51
|
switch (typeof e.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
53
|
), e.$$typeof) {
|
|
54
|
-
case
|
|
54
|
+
case s:
|
|
55
55
|
return "Portal";
|
|
56
56
|
case z:
|
|
57
57
|
return e.displayName || "Context";
|
|
58
58
|
case $:
|
|
59
59
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
60
|
+
case F:
|
|
61
61
|
var o = e.render;
|
|
62
62
|
return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
63
|
-
case
|
|
64
|
-
return o = e.displayName || null, o !== null ? o :
|
|
65
|
-
case
|
|
63
|
+
case U:
|
|
64
|
+
return o = e.displayName || null, o !== null ? o : t(e.type) || "Memo";
|
|
65
|
+
case R:
|
|
66
66
|
o = e._payload, e = e._init;
|
|
67
67
|
try {
|
|
68
|
-
return
|
|
68
|
+
return t(e(o));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function r(e) {
|
|
75
75
|
return "" + e;
|
|
76
76
|
}
|
|
77
77
|
function a(e) {
|
|
78
78
|
try {
|
|
79
|
-
|
|
79
|
+
r(e);
|
|
80
80
|
var o = !1;
|
|
81
81
|
} catch {
|
|
82
82
|
o = !0;
|
|
83
83
|
}
|
|
84
84
|
if (o) {
|
|
85
85
|
o = console;
|
|
86
|
-
var p = o.error,
|
|
86
|
+
var p = o.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
87
87
|
return p.call(
|
|
88
88
|
o,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
91
|
-
),
|
|
90
|
+
b
|
|
91
|
+
), r(e);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function l(e) {
|
|
95
|
-
if (e ===
|
|
96
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
95
|
+
if (e === m) return "<>";
|
|
96
|
+
if (typeof e == "object" && e !== null && e.$$typeof === R)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var o =
|
|
99
|
+
var o = t(e);
|
|
100
100
|
return o ? "<" + o + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function c() {
|
|
106
|
-
var e =
|
|
106
|
+
var e = N.A;
|
|
107
107
|
return e === null ? null : e.getOwner();
|
|
108
108
|
}
|
|
109
109
|
function i() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
112
|
function u(e) {
|
|
113
|
-
if (
|
|
113
|
+
if (C.call(e, "key")) {
|
|
114
114
|
var o = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
115
115
|
if (o && o.isReactWarning) return !1;
|
|
116
116
|
}
|
|
@@ -118,7 +118,7 @@ function je() {
|
|
|
118
118
|
}
|
|
119
119
|
function h(e, o) {
|
|
120
120
|
function p() {
|
|
121
|
-
|
|
121
|
+
B || (B = !0, console.error(
|
|
122
122
|
"%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
123
|
o
|
|
124
124
|
));
|
|
@@ -128,23 +128,23 @@ function je() {
|
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
var e =
|
|
133
|
-
return
|
|
131
|
+
function v() {
|
|
132
|
+
var e = t(this.type);
|
|
133
|
+
return Q[e] || (Q[e] = !0, console.error(
|
|
134
134
|
"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
135
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
136
|
}
|
|
137
|
-
function d(e, o, p,
|
|
138
|
-
var
|
|
137
|
+
function d(e, o, p, b, q, G) {
|
|
138
|
+
var g = p.ref;
|
|
139
139
|
return e = {
|
|
140
|
-
$$typeof:
|
|
140
|
+
$$typeof: T,
|
|
141
141
|
type: e,
|
|
142
142
|
key: o,
|
|
143
143
|
props: p,
|
|
144
|
-
_owner:
|
|
145
|
-
}, (
|
|
144
|
+
_owner: b
|
|
145
|
+
}, (g !== void 0 ? g : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
|
-
get:
|
|
147
|
+
get: v
|
|
148
148
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
@@ -159,210 +159,230 @@ function je() {
|
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
162
|
+
value: q
|
|
163
163
|
}), Object.defineProperty(e, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: G
|
|
168
168
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
169
|
}
|
|
170
|
-
function f(e, o, p,
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
170
|
+
function f(e, o, p, b, q, G) {
|
|
171
|
+
var g = o.children;
|
|
172
|
+
if (g !== void 0)
|
|
173
|
+
if (b)
|
|
174
|
+
if (H(g)) {
|
|
175
|
+
for (b = 0; b < g.length; b++)
|
|
176
|
+
y(g[b]);
|
|
177
|
+
Object.freeze && Object.freeze(g);
|
|
178
178
|
} else
|
|
179
179
|
console.error(
|
|
180
180
|
"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
181
|
);
|
|
182
|
-
else
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
182
|
+
else y(g);
|
|
183
|
+
if (C.call(o, "key")) {
|
|
184
|
+
g = t(e);
|
|
185
|
+
var O = Object.keys(o).filter(function(he) {
|
|
186
|
+
return he !== "key";
|
|
187
187
|
});
|
|
188
|
-
|
|
188
|
+
b = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", ee[g + b] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
192
192
|
React keys must be passed directly to JSX without using spread:
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
x,
|
|
196
195
|
b,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
g,
|
|
197
|
+
O,
|
|
198
|
+
g
|
|
199
|
+
), ee[g + b] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
201
|
+
if (g = null, p !== void 0 && (a(p), g = "" + p), u(o) && (a(o.key), g = "" + o.key), "key" in o) {
|
|
202
202
|
p = {};
|
|
203
|
-
for (var
|
|
204
|
-
|
|
203
|
+
for (var V in o)
|
|
204
|
+
V !== "key" && (p[V] = o[V]);
|
|
205
205
|
} else p = o;
|
|
206
|
-
return
|
|
206
|
+
return g && h(
|
|
207
207
|
p,
|
|
208
208
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
209
|
), d(
|
|
210
210
|
e,
|
|
211
|
-
|
|
211
|
+
g,
|
|
212
212
|
p,
|
|
213
213
|
c(),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
q,
|
|
215
|
+
G
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
218
|
+
function y(e) {
|
|
219
|
+
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));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
221
|
+
function j(e) {
|
|
222
|
+
return typeof e == "object" && e !== null && e.$$typeof === T;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var x = xe, T = /* @__PURE__ */ Symbol.for("react.transitional.element"), s = /* @__PURE__ */ Symbol.for("react.portal"), m = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), $ = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), F = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), W = /* @__PURE__ */ Symbol.for("react.suspense_list"), U = /* @__PURE__ */ Symbol.for("react.memo"), R = /* @__PURE__ */ Symbol.for("react.lazy"), L = /* @__PURE__ */ Symbol.for("react.activity"), k = /* @__PURE__ */ Symbol.for("react.client.reference"), N = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, H = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
x = {
|
|
228
228
|
react_stack_bottom_frame: function(e) {
|
|
229
229
|
return e();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
232
|
+
var B, Q = {}, X = x.react_stack_bottom_frame.bind(
|
|
233
|
+
x,
|
|
234
234
|
i
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
235
|
+
)(), K = J(l(i)), ee = {};
|
|
236
|
+
A.Fragment = m, A.jsx = function(e, o, p) {
|
|
237
|
+
var b = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
238
238
|
return f(
|
|
239
239
|
e,
|
|
240
240
|
o,
|
|
241
241
|
p,
|
|
242
242
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
b ? Error("react-stack-top-frame") : X,
|
|
244
|
+
b ? J(l(e)) : K
|
|
245
245
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
246
|
+
}, A.jsxs = function(e, o, p) {
|
|
247
|
+
var b = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
248
248
|
return f(
|
|
249
249
|
e,
|
|
250
250
|
o,
|
|
251
251
|
p,
|
|
252
252
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
b ? Error("react-stack-top-frame") : X,
|
|
254
|
+
b ? J(l(e)) : K
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), A;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
259
|
+
var oe;
|
|
260
|
+
function Ne() {
|
|
261
|
+
return oe || (oe = 1, process.env.NODE_ENV === "production" ? D.exports = je() : D.exports = Ee()), D.exports;
|
|
262
262
|
}
|
|
263
|
-
var n =
|
|
264
|
-
const
|
|
265
|
-
const { user:
|
|
266
|
-
return /* @__PURE__ */ n.jsx("div", { className: "max-h-20 max-w-52", children: /* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children:
|
|
263
|
+
var n = Ne();
|
|
264
|
+
const Se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", Te = ({ to: t, className: r, children: a }) => /* @__PURE__ */ n.jsx("a", { href: t, className: r, children: a }), Ye = (t) => {
|
|
265
|
+
const { user: r, LinkComponent: a = Te } = t;
|
|
266
|
+
return /* @__PURE__ */ n.jsx("div", { className: "max-h-20 max-w-52", children: /* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: r ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
267
267
|
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-row", children: [
|
|
268
|
-
/* @__PURE__ */ n.jsx("div", { className: "aiquants-session-photo m-1 h-14 w-14 p-0.5", children: /* @__PURE__ */ n.jsx("img", { className: "object-contain", src:
|
|
268
|
+
/* @__PURE__ */ n.jsx("div", { className: "aiquants-session-photo m-1 h-14 w-14 p-0.5", children: /* @__PURE__ */ n.jsx("img", { className: "object-contain", src: r.photo || Se, "aria-label": "profile photo" }) }),
|
|
269
269
|
/* @__PURE__ */ n.jsxs("div", { className: "mx-1 flex flex-col", children: [
|
|
270
270
|
/* @__PURE__ */ n.jsx(a, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィールを編集" }),
|
|
271
271
|
/* @__PURE__ */ n.jsx(a, { className: "aiquants-session-link rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィール" }),
|
|
272
272
|
/* @__PURE__ */ n.jsx(a, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "https://myaccount.google.com/", children: "Google Account" })
|
|
273
273
|
] })
|
|
274
274
|
] }),
|
|
275
|
-
/* @__PURE__ */ 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:
|
|
275
|
+
/* @__PURE__ */ 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 })
|
|
276
276
|
] }) : /* @__PURE__ */ 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: "ログインはこちら" }) }) });
|
|
277
|
-
},
|
|
278
|
-
report:
|
|
279
|
-
slip:
|
|
280
|
-
table:
|
|
281
|
-
chart:
|
|
282
|
-
download:
|
|
283
|
-
lock:
|
|
284
|
-
href:
|
|
285
|
-
},
|
|
286
|
-
const a =
|
|
277
|
+
}, _e = typeof window < "u" ? ue : M, ae = "aiquants-menu-scroll", pe = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), Re = {
|
|
278
|
+
report: te,
|
|
279
|
+
slip: te,
|
|
280
|
+
table: ke,
|
|
281
|
+
chart: ye,
|
|
282
|
+
download: ve,
|
|
283
|
+
lock: ge,
|
|
284
|
+
href: be
|
|
285
|
+
}, Ce = ({ mark: t, children: r }) => {
|
|
286
|
+
const a = t ? Re[t] : void 0;
|
|
287
287
|
return a ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-nowrap items-center", children: [
|
|
288
288
|
/* @__PURE__ */ n.jsx(a, { className: "h-4 w-4" }),
|
|
289
|
-
/* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children:
|
|
290
|
-
] }) : /* @__PURE__ */ n.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children:
|
|
291
|
-
},
|
|
289
|
+
/* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: r })
|
|
290
|
+
] }) : /* @__PURE__ */ n.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: r });
|
|
291
|
+
}, Z = (t, r) => r ? {
|
|
292
292
|
menu: {
|
|
293
|
-
id:
|
|
294
|
-
title:
|
|
295
|
-
href:
|
|
293
|
+
id: t.id,
|
|
294
|
+
title: t.title,
|
|
295
|
+
href: t.href
|
|
296
296
|
},
|
|
297
297
|
submenu: {
|
|
298
|
-
subid:
|
|
299
|
-
title:
|
|
300
|
-
href:
|
|
301
|
-
mark:
|
|
302
|
-
new:
|
|
298
|
+
subid: r.subid,
|
|
299
|
+
title: r.title,
|
|
300
|
+
href: r.href,
|
|
301
|
+
mark: r.mark,
|
|
302
|
+
new: r.new
|
|
303
303
|
}
|
|
304
304
|
} : {
|
|
305
305
|
menu: {
|
|
306
|
-
id:
|
|
307
|
-
title:
|
|
308
|
-
href:
|
|
306
|
+
id: t.id,
|
|
307
|
+
title: t.title,
|
|
308
|
+
href: t.href
|
|
309
309
|
}
|
|
310
|
-
},
|
|
311
|
-
if (
|
|
310
|
+
}, Pe = ({ item: t, parentMenu: r, onMenuSelected: a }) => {
|
|
311
|
+
if (t.href === "separator")
|
|
312
312
|
return /* @__PURE__ */ n.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
313
|
-
const l = /* @__PURE__ */ n.jsx(
|
|
313
|
+
const l = /* @__PURE__ */ n.jsx(Ce, { mark: t.mark, children: t.title }), c = {
|
|
314
314
|
onClick: () => {
|
|
315
|
-
a && a(
|
|
315
|
+
a && a(Z(r, t));
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
return
|
|
319
|
-
},
|
|
320
|
-
const a =
|
|
321
|
-
for (const l of
|
|
322
|
-
if (
|
|
318
|
+
return t.new ? /* @__PURE__ */ n.jsx("a", { href: t.href, rel: "noopener noreferrer", target: "_blank", ...c, children: l }) : pe.test(t.href) ? /* @__PURE__ */ n.jsx("a", { href: t.href, ...c, children: l }) : /* @__PURE__ */ n.jsx(me, { to: t.href, ...c, children: l });
|
|
319
|
+
}, le = (t) => t ? t.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", ie = (t, r) => {
|
|
320
|
+
const a = r !== "/" && r.endsWith("/") ? r.slice(0, -1) : r;
|
|
321
|
+
for (const l of t) {
|
|
322
|
+
if (le(l.href) === a)
|
|
323
323
|
return l.id;
|
|
324
324
|
if (l.submenu) {
|
|
325
325
|
for (const c of l.submenu)
|
|
326
|
-
if (
|
|
326
|
+
if (le(c.href) === a)
|
|
327
327
|
return l.id;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
return null;
|
|
331
|
-
},
|
|
332
|
-
const { menuList:
|
|
331
|
+
}, Oe = (t) => {
|
|
332
|
+
const { menuList: r, onMenuSelected: a, pinnedSubmenuIds: l = [], onToggleSubmenuPin: c } = t;
|
|
333
333
|
let i = "";
|
|
334
334
|
try {
|
|
335
|
-
i =
|
|
335
|
+
i = we().pathname;
|
|
336
336
|
} catch {
|
|
337
337
|
typeof window < "u" && (i = window.location.pathname);
|
|
338
338
|
}
|
|
339
|
-
const u =
|
|
340
|
-
|
|
339
|
+
const u = ne(() => ie(r, i), [r, i]), [h, v] = Y(u), d = _(i), f = _(u !== null);
|
|
340
|
+
M(() => {
|
|
341
341
|
if (d.current !== i && (d.current = i, f.current = !1), !f.current) {
|
|
342
|
-
const s =
|
|
343
|
-
s !== null && (
|
|
342
|
+
const s = ie(r, i);
|
|
343
|
+
s !== null && (v(s), f.current = !0);
|
|
344
344
|
}
|
|
345
|
-
}, [i,
|
|
346
|
-
const
|
|
345
|
+
}, [i, r]);
|
|
346
|
+
const y = w(
|
|
347
347
|
(s) => {
|
|
348
|
-
l.includes(s) ||
|
|
348
|
+
l.includes(s) || v((S) => S === s ? null : s);
|
|
349
349
|
},
|
|
350
350
|
[l]
|
|
351
|
-
),
|
|
351
|
+
), j = _(null);
|
|
352
|
+
_e(() => {
|
|
353
|
+
const s = j.current;
|
|
354
|
+
if (s)
|
|
355
|
+
try {
|
|
356
|
+
const m = sessionStorage.getItem(ae);
|
|
357
|
+
if (m !== null) {
|
|
358
|
+
const S = Number.parseFloat(m);
|
|
359
|
+
Number.isNaN(S) || (s.scrollTop = S);
|
|
360
|
+
}
|
|
361
|
+
} catch {
|
|
362
|
+
}
|
|
363
|
+
}, []);
|
|
364
|
+
const x = w(() => {
|
|
365
|
+
const s = j.current;
|
|
366
|
+
if (s)
|
|
367
|
+
try {
|
|
368
|
+
sessionStorage.setItem(ae, String(s.scrollTop));
|
|
369
|
+
} catch {
|
|
370
|
+
}
|
|
371
|
+
}, []), T = ne(() => /* @__PURE__ */ n.jsx(n.Fragment, { children: r.map((s) => /* @__PURE__ */ n.jsx("div", { children: s.href ? /* @__PURE__ */ 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: pe.test(s.href) ? /* @__PURE__ */ n.jsx(
|
|
352
372
|
"a",
|
|
353
373
|
{
|
|
354
374
|
href: s.href,
|
|
355
375
|
onClick: () => {
|
|
356
|
-
a && a(
|
|
376
|
+
a && a(Z(s));
|
|
357
377
|
},
|
|
358
378
|
children: /* @__PURE__ */ n.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
|
|
359
379
|
}
|
|
360
380
|
) : /* @__PURE__ */ n.jsx(
|
|
361
|
-
|
|
381
|
+
me,
|
|
362
382
|
{
|
|
363
383
|
to: s.href,
|
|
364
384
|
onClick: () => {
|
|
365
|
-
a && a(
|
|
385
|
+
a && a(Z(s));
|
|
366
386
|
},
|
|
367
387
|
children: /* @__PURE__ */ n.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
|
|
368
388
|
}
|
|
@@ -372,10 +392,10 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
372
392
|
{
|
|
373
393
|
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-['']",
|
|
374
394
|
onClick: (m) => {
|
|
375
|
-
m.preventDefault(),
|
|
395
|
+
m.preventDefault(), y(s.id);
|
|
376
396
|
},
|
|
377
397
|
onKeyDown: (m) => {
|
|
378
|
-
(m.key === "Enter" || m.key === " ") && (m.preventDefault(),
|
|
398
|
+
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), y(s.id));
|
|
379
399
|
},
|
|
380
400
|
children: [
|
|
381
401
|
/* @__PURE__ */ n.jsx("span", { children: s.title }),
|
|
@@ -388,29 +408,29 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
388
408
|
},
|
|
389
409
|
className: `aiquants-submenu-pin-button ${l.includes(s.id) ? "pinned" : ""}`,
|
|
390
410
|
title: l.includes(s.id) ? "ピン留め解除" : "ピン留め",
|
|
391
|
-
children: l.includes(s.id) ? /* @__PURE__ */ n.jsx(
|
|
411
|
+
children: l.includes(s.id) ? /* @__PURE__ */ n.jsx(de, { size: 14 }) : /* @__PURE__ */ n.jsx(fe, { size: 14 })
|
|
392
412
|
}
|
|
393
413
|
)
|
|
394
414
|
]
|
|
395
415
|
}
|
|
396
416
|
),
|
|
397
|
-
/* @__PURE__ */ 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((m) => /* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap text-sm", children: /* @__PURE__ */ n.jsx(
|
|
398
|
-
] }) }, s.id)) }), [
|
|
399
|
-
return /* @__PURE__ */ n.jsx("div", { className: "hidden-scrollbar h-0 grow overflow-y-scroll", children:
|
|
400
|
-
},
|
|
401
|
-
const { menuList:
|
|
417
|
+
/* @__PURE__ */ 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((m) => /* @__PURE__ */ n.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap text-sm", children: /* @__PURE__ */ n.jsx(Pe, { item: m, parentMenu: s, onMenuSelected: a }) }, m.subid)) })
|
|
418
|
+
] }) }, s.id)) }), [r, a, h, y, l]);
|
|
419
|
+
return /* @__PURE__ */ n.jsx("div", { ref: j, onScroll: x, className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: T });
|
|
420
|
+
}, Ie = (t) => {
|
|
421
|
+
const { menuList: r, menuHeader: a, open: l, onMenuSelected: c, onClickSignout: i, theme: u, toggleTheme: h, isPinned: v, onTogglePin: d, pinnedSubmenuIds: f, onToggleSubmenuPin: y } = t;
|
|
402
422
|
return /* @__PURE__ */ 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 ${l ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`, children: [
|
|
403
423
|
/* @__PURE__ */ n.jsx("div", { className: "flex h-[100px] flex-col", children: a }),
|
|
404
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: /* @__PURE__ */ n.jsx(
|
|
424
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: /* @__PURE__ */ n.jsx(Oe, { menuList: r, onMenuSelected: c, pinnedSubmenuIds: f, onToggleSubmenuPin: y }) }),
|
|
405
425
|
/* @__PURE__ */ n.jsx("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
406
426
|
/* @__PURE__ */ n.jsx(
|
|
407
427
|
"button",
|
|
408
428
|
{
|
|
409
429
|
type: "button",
|
|
410
430
|
onClick: d,
|
|
411
|
-
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 ${
|
|
412
|
-
title:
|
|
413
|
-
children:
|
|
431
|
+
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 ${v ? "bg-amber-500/90 hover:bg-amber-600" : "border border-white/15 bg-white/10 hover:bg-white/20"}`,
|
|
432
|
+
title: v ? "ピン留め解除" : "ピン留め",
|
|
433
|
+
children: v ? /* @__PURE__ */ n.jsx(de, { size: 14 }) : /* @__PURE__ */ n.jsx(fe, { size: 14 })
|
|
414
434
|
}
|
|
415
435
|
),
|
|
416
436
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -437,89 +457,89 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
437
457
|
)
|
|
438
458
|
] }) })
|
|
439
459
|
] });
|
|
440
|
-
},
|
|
441
|
-
const { isOverlay:
|
|
442
|
-
return /* @__PURE__ */ n.jsx("button", { type: "button", className: `fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${
|
|
443
|
-
},
|
|
444
|
-
const { open:
|
|
445
|
-
if (u.current && h.current &&
|
|
446
|
-
const
|
|
447
|
-
u.current.style.backgroundColor =
|
|
460
|
+
}, Ae = (t) => {
|
|
461
|
+
const { isOverlay: r, onOverlayClick: a } = t;
|
|
462
|
+
return /* @__PURE__ */ 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: a });
|
|
463
|
+
}, Me = (t) => {
|
|
464
|
+
const { open: r, onMenuOpen: a, onMenuClose: l, theme: c } = t, i = _(r), u = _(null), h = _(null), v = _(null), d = _(null), f = _(null), y = w(() => {
|
|
465
|
+
if (u.current && h.current && v.current && d.current && f.current) {
|
|
466
|
+
const E = c === "dark" ? "#fff" : "#000";
|
|
467
|
+
u.current.style.backgroundColor = E, u.current.style.width = "100%", u.current.style.height = "3px", u.current.style.transform = "", h.current.style.opacity = "1", h.current.style.backgroundColor = E, v.current.style.opacity = "1", v.current.style.backgroundColor = E, d.current.style.backgroundColor = E, d.current.style.width = "100%", d.current.style.height = "3px", d.current.style.transform = "", f.current.style.color = E, 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;
|
|
448
468
|
}
|
|
449
|
-
}, [c]),
|
|
450
|
-
u.current && h.current &&
|
|
451
|
-
}, []),
|
|
452
|
-
|
|
453
|
-
}, [
|
|
454
|
-
|
|
455
|
-
}, [
|
|
456
|
-
i.current ?
|
|
457
|
-
}, [
|
|
458
|
-
|
|
459
|
-
}, []),
|
|
460
|
-
|
|
469
|
+
}, [c]), j = w(() => {
|
|
470
|
+
u.current && h.current && v.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)", h.current.style.opacity = "0", v.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);
|
|
471
|
+
}, []), x = w(() => {
|
|
472
|
+
y(), l && l();
|
|
473
|
+
}, [y, l]), T = w(() => {
|
|
474
|
+
j(), a && a();
|
|
475
|
+
}, [j, a]), s = w(() => {
|
|
476
|
+
i.current ? T() : x();
|
|
477
|
+
}, [x, T]), m = w((E) => {
|
|
478
|
+
E.currentTarget.blur();
|
|
479
|
+
}, []), S = w((E) => {
|
|
480
|
+
E.preventDefault();
|
|
461
481
|
}, []);
|
|
462
|
-
return
|
|
463
|
-
|
|
464
|
-
}, [
|
|
482
|
+
return M(() => {
|
|
483
|
+
r ? y() : j();
|
|
484
|
+
}, [r, y, j]), /* @__PURE__ */ n.jsxs("button", { type: "button", className: "aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden", onClick: s, onFocus: m, onMouseDown: S, tabIndex: -1, children: [
|
|
465
485
|
/* @__PURE__ */ n.jsx("span", { className: "absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none", ref: u }),
|
|
466
486
|
/* @__PURE__ */ n.jsx("span", { className: "absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none", ref: h }),
|
|
467
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref:
|
|
487
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref: v }),
|
|
468
488
|
/* @__PURE__ */ n.jsx("span", { className: "absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none", ref: d }),
|
|
469
489
|
/* @__PURE__ */ n.jsx("div", { className: "absolute w-full text-xs after:mt-2 after:block", ref: f })
|
|
470
490
|
] });
|
|
471
|
-
},
|
|
472
|
-
const { menuList:
|
|
491
|
+
}, ce = typeof window < "u" ? ue : M, $e = (t) => {
|
|
492
|
+
const { menuList: r, menuHeader: a, onClickSignout: l, isMenuhide: c, theme: i, toggleTheme: u, onMenuNavigate: h, onPinChange: v, pinnedSubmenuIds: d, initialPinnedSubmenuIds: f, onSubmenuPinChange: y, closeOnEscape: j = "auto" } = t, [x, T] = Y(() => {
|
|
473
493
|
try {
|
|
474
494
|
return localStorage.getItem("aiquants-menu-pinned") === "true";
|
|
475
495
|
} catch {
|
|
476
496
|
return !1;
|
|
477
497
|
}
|
|
478
|
-
}), [
|
|
498
|
+
}), [s, m] = Y(x), [S, E] = Y(() => {
|
|
479
499
|
if (f)
|
|
480
500
|
return f;
|
|
481
501
|
try {
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
484
|
-
const
|
|
485
|
-
if (Array.isArray(
|
|
486
|
-
return
|
|
502
|
+
const k = localStorage.getItem("aiquants-submenu-pinned");
|
|
503
|
+
if (k) {
|
|
504
|
+
const N = JSON.parse(k);
|
|
505
|
+
if (Array.isArray(N))
|
|
506
|
+
return N.filter((C) => typeof C == "number");
|
|
487
507
|
}
|
|
488
508
|
} catch {
|
|
489
509
|
}
|
|
490
510
|
return [];
|
|
491
|
-
}),
|
|
492
|
-
(
|
|
493
|
-
const
|
|
511
|
+
}), $ = d !== void 0 ? d : S, z = w(
|
|
512
|
+
(k) => {
|
|
513
|
+
const N = d !== void 0 ? d : S, C = N.includes(k) ? N.filter((H) => H !== k) : [...N, k];
|
|
494
514
|
if (d === void 0) {
|
|
495
|
-
|
|
515
|
+
E(C);
|
|
496
516
|
try {
|
|
497
|
-
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(
|
|
517
|
+
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(C));
|
|
498
518
|
} catch {
|
|
499
519
|
}
|
|
500
520
|
}
|
|
501
|
-
|
|
521
|
+
y && y(C);
|
|
502
522
|
},
|
|
503
|
-
[d, S,
|
|
523
|
+
[d, S, y]
|
|
504
524
|
);
|
|
505
|
-
|
|
506
|
-
const
|
|
507
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width",
|
|
508
|
-
}, [
|
|
525
|
+
ce(() => {
|
|
526
|
+
const k = x ? "250px" : "0px";
|
|
527
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", k), v?.(x);
|
|
528
|
+
}, [x, v]), ce(() => () => {
|
|
509
529
|
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px");
|
|
510
530
|
}, []);
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
}, []),
|
|
514
|
-
|
|
531
|
+
const F = w(() => {
|
|
532
|
+
m(!0);
|
|
533
|
+
}, []), P = w(() => {
|
|
534
|
+
m(!1), T(!1);
|
|
515
535
|
try {
|
|
516
536
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
517
537
|
} catch {
|
|
518
538
|
}
|
|
519
|
-
}, []),
|
|
520
|
-
|
|
521
|
-
const
|
|
522
|
-
if (
|
|
539
|
+
}, []), W = w(() => {
|
|
540
|
+
T((k) => {
|
|
541
|
+
const N = !k;
|
|
542
|
+
if (N)
|
|
523
543
|
try {
|
|
524
544
|
localStorage.setItem("aiquants-menu-pinned", "true");
|
|
525
545
|
} catch {
|
|
@@ -529,45 +549,44 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
|
|
|
529
549
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
530
550
|
} catch {
|
|
531
551
|
}
|
|
532
|
-
return
|
|
552
|
+
return N;
|
|
533
553
|
});
|
|
534
|
-
}, []),
|
|
535
|
-
(
|
|
536
|
-
h && h(
|
|
554
|
+
}, []), U = w(
|
|
555
|
+
(k) => {
|
|
556
|
+
h && h(k), x || m(!1);
|
|
537
557
|
},
|
|
538
|
-
[h,
|
|
539
|
-
),
|
|
540
|
-
(
|
|
541
|
-
|
|
542
|
-
return R(), !1;
|
|
558
|
+
[h, x]
|
|
559
|
+
), R = w(
|
|
560
|
+
(k) => {
|
|
561
|
+
k.key === "Escape" && P();
|
|
543
562
|
},
|
|
544
|
-
[
|
|
545
|
-
);
|
|
546
|
-
return
|
|
547
|
-
window.removeEventListener("keydown",
|
|
548
|
-
}), [
|
|
549
|
-
/* @__PURE__ */ n.jsx(
|
|
563
|
+
[P]
|
|
564
|
+
), L = j === !0 || j === "auto" && !x;
|
|
565
|
+
return M(() => (s && L ? window.addEventListener("keydown", R, { passive: !0 }) : window.removeEventListener("keydown", R), () => {
|
|
566
|
+
window.removeEventListener("keydown", R);
|
|
567
|
+
}), [s, L, R]), c ? null : /* @__PURE__ */ n.jsxs("div", { className: `aiquants-menu-bar ${i}`, children: [
|
|
568
|
+
/* @__PURE__ */ n.jsx(Me, { onMenuClose: P, onMenuOpen: F, open: !s, theme: i }),
|
|
550
569
|
/* @__PURE__ */ n.jsx(
|
|
551
|
-
|
|
570
|
+
Ie,
|
|
552
571
|
{
|
|
553
|
-
menuList:
|
|
572
|
+
menuList: r,
|
|
554
573
|
menuHeader: a,
|
|
555
574
|
onClickSignout: l,
|
|
556
|
-
onMenuSelected:
|
|
557
|
-
open:
|
|
575
|
+
onMenuSelected: U,
|
|
576
|
+
open: s,
|
|
558
577
|
theme: i,
|
|
559
578
|
toggleTheme: u,
|
|
560
|
-
isPinned:
|
|
561
|
-
onTogglePin:
|
|
562
|
-
pinnedSubmenuIds:
|
|
563
|
-
onToggleSubmenuPin:
|
|
579
|
+
isPinned: x,
|
|
580
|
+
onTogglePin: W,
|
|
581
|
+
pinnedSubmenuIds: $,
|
|
582
|
+
onToggleSubmenuPin: z
|
|
564
583
|
}
|
|
565
584
|
),
|
|
566
|
-
/* @__PURE__ */ n.jsx(
|
|
585
|
+
/* @__PURE__ */ n.jsx(Ae, { isOverlay: s && !x, onOverlayClick: P })
|
|
567
586
|
] });
|
|
568
587
|
};
|
|
569
588
|
export {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
589
|
+
Te as DefaultLink,
|
|
590
|
+
$e as MenuBar,
|
|
591
|
+
Ye as SessionInfo
|
|
573
592
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(T,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react"),require("lucide-react"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-router-dom"],o):(T=typeof globalThis<"u"?globalThis:T||self,o(T["@aiquants/menu-bar"]={},T.React,T["lucide-react"],T.ReactRouterDOM))})(this,(function(T,o,C,z){"use strict";var L={exports:{}},A={};var Q;function ue(){if(Q)return A;Q=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,u,c){var d=null;if(c!==void 0&&(d=""+c),u.key!==void 0&&(d=""+u.key),"key"in u){c={};for(var b in u)b!=="key"&&(c[b]=u[b])}else c=u;return u=c.ref,{$$typeof:t,type:i,key:d,ref:u!==void 0?u:null,props:c}}return A.Fragment=r,A.jsx=l,A.jsxs=l,A}var M={};var X;function de(){return X||(X=1,process.env.NODE_ENV!=="production"&&(function(){function t(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 p:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case O:return"Suspense";case J: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 s:return"Portal";case U:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case H:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return a=e.displayName||null,a!==null?a:t(e.type)||"Memo";case R:a=e._payload,e=e._init;try{return t(e(a))}catch{}}return null}function r(e){return""+e}function l(e){try{r(e);var a=!1}catch{a=!0}if(a){a=console;var h=a.error,g=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return h.call(a,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",g),r(e)}}function i(e){if(e===p)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===R)return"<...>";try{var a=t(e);return a?"<"+a+">":"<...>"}catch{return"<...>"}}function u(){var e=S.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function d(e){if(P.call(e,"key")){var a=Object.getOwnPropertyDescriptor(e,"key").get;if(a&&a.isReactWarning)return!1}return e.key!==void 0}function b(e,a){function h(){oe||(oe=!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)",a))}h.isReactWarning=!0,Object.defineProperty(e,"key",{get:h,configurable:!0})}function v(){var e=t(this.type);return ae[e]||(ae[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,a,h,g,Y,B){var y=h.ref;return e={$$typeof:_,type:e,key:a,props:h,_owner:g},(y!==void 0?y:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:v}):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:Y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:B}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function m(e,a,h,g,Y,B){var y=a.children;if(y!==void 0)if(g)if(V(y)){for(g=0;g<y.length;g++)k(y[g]);Object.freeze&&Object.freeze(y)}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(y);if(P.call(a,"key")){y=t(e);var I=Object.keys(a).filter(function(Ee){return Ee!=="key"});g=0<I.length?"{key: someKey, "+I.join(": ..., ")+": ...}":"{key: someKey}",ce[y+g]||(I=0<I.length?"{"+I.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} />`,x,g,O,g),le[g+x]=!0)}if(g=null,h!==void 0&&(l(h),g=""+h),d(a)&&(l(a.key),g=""+a.key),"key"in a){h={};for(var Z in a)Z!=="key"&&(h[Z]=a[Z])}else h=a;return g&&b(h,typeof e=="function"?e.displayName||e.name||"Unknown":e),f(e,g,h,u(),Y,V)}function w(e){y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===k&&(e._payload.status==="fulfilled"?y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function y(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}var s=o,p=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),U=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),L=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,ke=Array.isArray,q=console.createTask?console.createTask:function(){return null};s={react_stack_bottom_frame:function(e){return e()}};var re,se={},oe=s.react_stack_bottom_frame.bind(s,c)(),ae=q(i(c)),le={};M.Fragment=C,M.jsx=function(e,a,h){var x=1e4>L.recentlyCreatedOwnerStacks++;return m(e,a,h,!1,x?Error("react-stack-top-frame"):oe,x?q(i(e)):ae)},M.jsxs=function(e,a,h){var x=1e4>L.recentlyCreatedOwnerStacks++;return m(e,a,h,!0,x?Error("react-stack-top-frame"):oe,x?q(i(e)):ae)}})()),M}var Q;function ue(){return Q||(Q=1,process.env.NODE_ENV==="production"?D.exports=ie():D.exports=ce()),D.exports}var n=ue();const de="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==",X=({to:t,className:r,children:l})=>n.jsx("a",{href:t,className:r,children:l}),fe=t=>{const{user:r,LinkComponent:l=X}=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||de,"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:"ログインはこちら"})})})},K=new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/),me={report:S.FileText,slip:S.FileText,table:S.Table,chart:S.BarChart,download:S.Download,lock:S.Lock,href:S.Link},pe=({mark:t,children:r})=>{const l=t?me[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}},he=({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(pe,{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}):K.test(t.href)?n.jsx("a",{href:t.href,...u,children:i}):n.jsx(z.Link,{to:t.href,...u,children:i})},$=t=>t?t.split(/[?#]/)[0].replace(/(?!^\/)\/$/,""):"",ee=(t,r)=>{const l=r!=="/"&&r.endsWith("/")?r.slice(0,-1):r;for(const i of t){if($(i.href)===l)return i.id;if(i.submenu){for(const u of i.submenu)if($(u.href)===l)return i.id}}return null},be=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(()=>ee(r,c),[r,c]),[b,v]=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=ee(r,c);s!==null&&(v(s),m.current=!0)}},[c,r]);const w=o.useCallback(s=>{i.includes(s)||v(T=>T===s?null:s)},[i]),y=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:K.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===b||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(),w(s.id)},onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),w(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(S.Pin,{size:14}):n.jsx(S.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(he,{item:p,parentMenu:s,onMenuSelected:l})},p.subid))})]})},s.id))}),[r,l,b,w,i]);return n.jsx("div",{className:"hidden-scrollbar h-0 grow overflow-y-scroll",children:y})},xe=t=>{const{menuList:r,menuHeader:l,open:i,onMenuSelected:u,onClickSignout:c,theme:d,toggleTheme:b,isPinned:v,onTogglePin:f,pinnedSubmenuIds:m,onToggleSubmenuPin:w}=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(be,{menuList:r,onMenuSelected:u,pinnedSubmenuIds:m,onToggleSubmenuPin:w})}),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,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 ${v?"bg-amber-500/90 hover:bg-amber-600":"border border-white/15 bg-white/10 hover:bg-white/20"}`,title:v?"ピン留め解除":"ピン留め",children:v?n.jsx(S.Pin,{size:14}):n.jsx(S.PinOff,{size:14})}),n.jsxs("button",{type:"button",onClick:b,className:"group relative flex flex-1 items-center gap-2 rounded-lg border border-white/15 bg-white/10 px-3 py-2 font-medium 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",children:[n.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-white/20 backdrop-blur-sm transition-all duration-300 group-hover:scale-110 group-hover:bg-white/30 dark:bg-gray-600/60 dark:group-hover:bg-gray-500/70",children:n.jsx("span",{className:"text-sm transition-transform duration-300 group-hover:scale-110",children:d==="dark"?"🌞":"🌙"})}),n.jsx("span",{className:"text-white transition-colors duration-300 group-hover:text-white/90 dark:text-gray-200 dark:group-hover:text-white",children:d==="dark"?"Light":"Dark"}),n.jsx("div",{className:"absolute inset-0 rounded-lg bg-gradient-to-r from-transparent via-white/5 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100 dark:via-gray-400/10"})]}),n.jsx("button",{type:"button",className:"aiquants-signout-button flex items-center justify-center 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:"サインアウト"})]})})]})},ge=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})},ve=t=>{const{open:r,onMenuOpen:l,onMenuClose:i,theme:u}=t,c=o.useRef(r),d=o.useRef(null),b=o.useRef(null),v=o.useRef(null),f=o.useRef(null),m=o.useRef(null),w=o.useCallback(()=>{if(d.current&&b.current&&v.current&&f.current&&m.current){const j=u==="dark"?"#fff":"#000";d.current.style.backgroundColor=j,d.current.style.width="100%",d.current.style.height="3px",d.current.style.transform="",b.current.style.opacity="1",b.current.style.backgroundColor=j,v.current.style.opacity="1",v.current.style.backgroundColor=j,f.current.style.backgroundColor=j,f.current.style.width="100%",f.current.style.height="3px",f.current.style.transform="",m.current.style.color=j,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]),y=o.useCallback(()=>{d.current&&b.current&&v.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)",b.current.style.opacity="0",v.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)},[]),s=o.useCallback(()=>{w(),i&&i()},[w,i]),p=o.useCallback(()=>{y(),l&&l()},[y,l]),T=o.useCallback(()=>{c.current?p():s()},[s,p]),C=o.useCallback(j=>{j.currentTarget.blur()},[]),A=o.useCallback(j=>{j.preventDefault()},[]);return o.useEffect(()=>{r?w():y()},[r,w,y]),n.jsxs("button",{type:"button",className:"aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden",onClick:T,onFocus:C,onMouseDown:A,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:b}),n.jsx("span",{className:"absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none",ref:v}),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})]})},ne=typeof window<"u"?o.useLayoutEffect:o.useEffect,ye=t=>{const{menuList:r,menuHeader:l,onClickSignout:i,isMenuhide:u,theme:c,toggleTheme:d,onMenuNavigate:b,onPinChange:v,pinnedSubmenuIds:f,initialPinnedSubmenuIds:m,onSubmenuPinChange:w}=t,[y,s]=o.useState(()=>{try{return localStorage.getItem("aiquants-menu-pinned")==="true"}catch{return!1}}),[p,T]=o.useState(y),[C,A]=o.useState(()=>{if(m)return m;try{const k=localStorage.getItem("aiquants-submenu-pinned");if(k){const N=JSON.parse(k);if(Array.isArray(N))return N.filter(_=>typeof _=="number")}}catch{}return[]}),j=f!==void 0?f:C,W=o.useCallback(k=>{const N=f!==void 0?f:C,_=N.includes(k)?N.filter(L=>L!==k):[...N,k];if(f===void 0){A(_);try{localStorage.setItem("aiquants-submenu-pinned",JSON.stringify(_))}catch{}}w&&w(_)},[f,C,w]);ne(()=>{const k=y?"250px":"0px";document.documentElement.style.setProperty("--aiquants-menu-pinned-width",k),v?.(y)},[y,v]),ne(()=>()=>{document.documentElement.style.setProperty("--aiquants-menu-pinned-width","0px")},[]);const U=o.useCallback(()=>{T(!0)},[]),P=o.useCallback(()=>{T(!1),s(!1);try{localStorage.removeItem("aiquants-menu-pinned")}catch{}},[]),H=o.useCallback(()=>{s(k=>{const N=!k;if(N)try{localStorage.setItem("aiquants-menu-pinned","true")}catch{}else try{localStorage.removeItem("aiquants-menu-pinned")}catch{}return N})},[]),J=o.useCallback(k=>{b&&b(k),y||T(!1)},[b,y]),R=o.useCallback(k=>{if(k.key==="Escape")return P(),!1},[P]);return o.useEffect(()=>(p?window.addEventListener("keydown",R,{passive:!0}):window.removeEventListener("keydown",R),()=>{window.removeEventListener("keydown",R)}),[p,R]),u?null:n.jsxs("div",{className:`aiquants-menu-bar ${c}`,children:[n.jsx(ve,{onMenuClose:P,onMenuOpen:U,open:!p,theme:c}),n.jsx(xe,{menuList:r,menuHeader:l,onClickSignout:i,onMenuSelected:J,open:p,theme:c,toggleTheme:d,isPinned:y,onTogglePin:H,pinnedSubmenuIds:j,onToggleSubmenuPin:W}),n.jsx(ge,{isOverlay:p&&!y,onOverlayClick:P})]})};E.DefaultLink=X,E.MenuBar=ye,E.SessionInfo=fe,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
6
|
+
<%s key={someKey} {...props} />`,g,y,I,y),ce[y+g]=!0)}if(y=null,h!==void 0&&(l(h),y=""+h),d(a)&&(l(a.key),y=""+a.key),"key"in a){h={};for(var q in a)q!=="key"&&(h[q]=a[q])}else h=a;return y&&b(h,typeof e=="function"?e.displayName||e.name||"Unknown":e),f(e,y,h,u(),Y,B)}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 x=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"),J=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),w=Symbol.for("react.client.reference"),S=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,V=Array.isArray,Z=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(e){return e()}};var oe,ae={},le=x.react_stack_bottom_frame.bind(x,c)(),ie=Z(i(c)),ce={};M.Fragment=p,M.jsx=function(e,a,h){var g=1e4>S.recentlyCreatedOwnerStacks++;return m(e,a,h,!1,g?Error("react-stack-top-frame"):le,g?Z(i(e)):ie)},M.jsxs=function(e,a,h){var g=1e4>S.recentlyCreatedOwnerStacks++;return m(e,a,h,!0,g?Error("react-stack-top-frame"):le,g?Z(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:"ログインはこちら"})})})},he=typeof window<"u"?o.useLayoutEffect:o.useEffect,ee="aiquants-menu-scroll",ne=new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/),be={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?be[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}},ge=({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},ye=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]),[b,v]=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&&(v(s),m.current=!0)}},[c,r]);const k=o.useCallback(s=>{i.includes(s)||v(N=>N===s?null:s)},[i]),j=o.useRef(null);he(()=>{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 x=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===b||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(ge,{item:p,parentMenu:s,onMenuSelected:l})},p.subid))})]})},s.id))}),[r,l,b,k,i]);return n.jsx("div",{ref:j,onScroll:x,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:b,isPinned:v,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(ye,{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,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 ${v?"bg-amber-500/90 hover:bg-amber-600":"border border-white/15 bg-white/10 hover:bg-white/20"}`,title:v?"ピン留め解除":"ピン留め",children:v?n.jsx(C.Pin,{size:14}):n.jsx(C.PinOff,{size:14})}),n.jsxs("button",{type:"button",onClick:b,className:"group relative flex flex-1 items-center gap-2 rounded-lg border border-white/15 bg-white/10 px-3 py-2 font-medium 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",children:[n.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-white/20 backdrop-blur-sm transition-all duration-300 group-hover:scale-110 group-hover:bg-white/30 dark:bg-gray-600/60 dark:group-hover:bg-gray-500/70",children:n.jsx("span",{className:"text-sm transition-transform duration-300 group-hover:scale-110",children:d==="dark"?"🌞":"🌙"})}),n.jsx("span",{className:"text-white transition-colors duration-300 group-hover:text-white/90 dark:text-gray-200 dark:group-hover:text-white",children:d==="dark"?"Light":"Dark"}),n.jsx("div",{className:"absolute inset-0 rounded-lg bg-gradient-to-r from-transparent via-white/5 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100 dark:via-gray-400/10"})]}),n.jsx("button",{type:"button",className:"aiquants-signout-button flex items-center justify-center 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:"サインアウト"})]})})]})},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),b=o.useRef(null),v=o.useRef(null),f=o.useRef(null),m=o.useRef(null),k=o.useCallback(()=>{if(d.current&&b.current&&v.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="",b.current.style.opacity="1",b.current.style.backgroundColor=E,v.current.style.opacity="1",v.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&&b.current&&v.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)",b.current.style.opacity="0",v.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)},[]),x=o.useCallback(()=>{k(),i&&i()},[k,i]),_=o.useCallback(()=>{j(),l&&l()},[j,l]),s=o.useCallback(()=>{c.current?_():x()},[x,_]),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",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:b}),n.jsx("span",{className:"absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none",ref:v}),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:b,onPinChange:v,pinnedSubmenuIds:f,initialPinnedSubmenuIds:m,onSubmenuPinChange:k,closeOnEscape:j="auto"}=t,[x,_]=o.useState(()=>{try{return localStorage.getItem("aiquants-menu-pinned")==="true"}catch{return!1}}),[s,p]=o.useState(x),[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(V=>V!==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=x?"250px":"0px";document.documentElement.style.setProperty("--aiquants-menu-pinned-width",w),v?.(x)},[x,v]),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{}},[]),J=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})},[]),G=o.useCallback(w=>{b&&b(w),x||p(!1)},[b,x]),R=o.useCallback(w=>{w.key==="Escape"&&O()},[O]),D=j===!0||j==="auto"&&!x;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:G,open:s,theme:c,toggleTheme:d,isPinned:x,onTogglePin:J,pinnedSubmenuIds:W,onToggleSubmenuPin:U}),n.jsx(ke,{isOverlay:s&&!x,onOverlayClick:O})]})};T.DefaultLink=$,T.MenuBar=je,T.SessionInfo=pe,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|