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