@shiodome47/planner 0.2.0 → 0.3.1

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.
@@ -0,0 +1,1175 @@
1
+ import { HORIZON_NAME as e, PERIOD_NAME as t, PLACED_MARK as n, PLACE_LABEL as r, PRIORITIES as i, PRIORITY_NAME as a, bringToToday as o, dayKey as s, dayLabel as c, daysUntil as l, dueLabel as u, dueLabelWeekday as d, endHabit as f, goalDueNextWeek as p, habitPlaceTargets as m, habitRecord as h, habitToTask as g, horizonForDue as _, isForTomorrow as v, isMonthOnly as y, parseYearDay as b, periodHorizon as x, placeDown as S, placeHabitDown as C, placeTargets as w, postponeToTomorrow as T, quickTarget as ee, removeTask as E, resumeHabit as D, returnUp as O, setDue as k, setPriority as A, shortDueLabel as j, toggleDone as te, toggleHabitAll as M, whenLabel as ne, withDay as N, withWhen as P } from "../core.js";
2
+ import { createContext as F, useContext as I, useEffect as L, useLayoutEffect as R, useRef as z, useState as B } from "react";
3
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
4
+ import { CalendarPlus as re, Check as ie, CornerUpLeft as ae, FileText as W, GraduationCap as oe, Moon as se, MoreHorizontal as ce, X as le } from "lucide-react";
5
+ import { DndContext as ue, KeyboardSensor as de, closestCenter as fe, useSensor as pe, useSensors as me } from "@dnd-kit/core";
6
+ import { SortableContext as he, sortableKeyboardCoordinates as ge, useSortable as _e } from "@dnd-kit/sortable";
7
+ import { CSS as ve } from "@dnd-kit/utilities";
8
+ import { useDragSensors as ye } from "linkshelf";
9
+ import { createPortal as be } from "react-dom";
10
+ // src/ui/display.tsx
11
+ var xe = F({ simple: !1 }), G = () => I(xe);
12
+ // src/ui/Root.tsx
13
+ function Se({ simple: e = !1, theme: t = "system", className: n, children: r }) {
14
+ return /* @__PURE__ */ H(xe.Provider, {
15
+ value: { simple: e },
16
+ children: /* @__PURE__ */ H("div", {
17
+ className: [
18
+ "planner",
19
+ e ? "pl-simple" : "",
20
+ n ?? ""
21
+ ].filter(Boolean).join(" "),
22
+ "data-theme": t,
23
+ children: r
24
+ })
25
+ });
26
+ }
27
+ // src/ui/dnd.tsx
28
+ function Ce({ ids: e, strategy: t, onMove: n, onDragging: r, children: i }) {
29
+ let a = we();
30
+ return /* @__PURE__ */ H(ue, {
31
+ sensors: a,
32
+ collisionDetection: fe,
33
+ onDragStart: () => r?.(!0),
34
+ onDragCancel: () => r?.(!1),
35
+ onDragEnd: ({ active: e, over: t }) => {
36
+ r?.(!1), t && e.id !== t.id && n(String(e.id), String(t.id));
37
+ },
38
+ children: /* @__PURE__ */ H(he, {
39
+ items: e,
40
+ strategy: t,
41
+ children: i
42
+ })
43
+ });
44
+ }
45
+ function K(e, t = !1) {
46
+ let { attributes: n, listeners: r, setNodeRef: i, setActivatorNodeRef: a, transform: o, transition: s, isDragging: c } = _e({
47
+ id: e,
48
+ disabled: t
49
+ });
50
+ return {
51
+ ref: i,
52
+ activatorRef: a,
53
+ style: {
54
+ transform: ve.Translate.toString(o),
55
+ transition: s,
56
+ ...c ? {
57
+ position: "relative",
58
+ zIndex: 5
59
+ } : {}
60
+ },
61
+ isDragging: c,
62
+ handleProps: {
63
+ ...n,
64
+ ...r,
65
+ role: void 0,
66
+ "aria-disabled": void 0
67
+ }
68
+ };
69
+ }
70
+ function we() {
71
+ return me(...ye(), pe(de, { coordinateGetter: ge }));
72
+ }
73
+ // src/ui/Menu.tsx
74
+ var Te = {
75
+ position: "fixed",
76
+ top: 0,
77
+ left: 0,
78
+ right: "auto",
79
+ visibility: "hidden"
80
+ };
81
+ function q({ label: e, items: t, header: n }) {
82
+ let [r, i] = B(!1), a = z(null), o = z(null), [s, c] = B(Te);
83
+ return L(() => {
84
+ if (!r) return;
85
+ let e = (e) => {
86
+ let t = e.target;
87
+ a.current?.contains(t) || o.current?.contains(t) || i(!1);
88
+ }, t = (e) => {
89
+ e.key === "Escape" && i(!1);
90
+ }, n = (e) => {
91
+ o.current?.contains(e.target) || i(!1);
92
+ };
93
+ return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), window.addEventListener("scroll", n, !0), window.addEventListener("resize", n), () => {
94
+ document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t), window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n);
95
+ };
96
+ }, [r]), R(() => {
97
+ if (!r) {
98
+ c(Te);
99
+ return;
100
+ }
101
+ let e = a.current?.getBoundingClientRect(), t = o.current;
102
+ if (!e || !t) return;
103
+ let n = window.innerWidth, i = window.innerHeight, s = t.offsetHeight, l = t.offsetWidth, u = i - e.bottom - 8, d = e.top - 8, f = s > u && d > u, p = Math.min(s, Math.max(160, (f ? d : u) - 4)), m = Math.min(Math.max(8, e.right - l), n - l - 8), h = f ? Math.max(8, e.top - 4 - p) : e.bottom + 4;
104
+ c({
105
+ position: "fixed",
106
+ top: h,
107
+ left: m,
108
+ right: "auto",
109
+ maxHeight: p,
110
+ overflowY: s > p ? "auto" : void 0
111
+ });
112
+ }, [r]), /* @__PURE__ */ U("div", {
113
+ className: "pl-menu",
114
+ ref: a,
115
+ children: [/* @__PURE__ */ H("button", {
116
+ type: "button",
117
+ className: "pl-row-button",
118
+ "aria-label": e,
119
+ title: e,
120
+ "aria-haspopup": "menu",
121
+ "aria-expanded": r,
122
+ onClick: () => i((e) => !e),
123
+ children: /* @__PURE__ */ H(ce, { "aria-hidden": "true" })
124
+ }), r && be(/* @__PURE__ */ H("div", {
125
+ className: Ee(a.current)?.className ?? "planner",
126
+ "data-theme": Ee(a.current)?.dataset.theme,
127
+ children: /* @__PURE__ */ U("div", {
128
+ className: "pl-menu-list",
129
+ role: "menu",
130
+ ref: o,
131
+ style: s,
132
+ children: [n, t.map((e, t) => e === "separator" ? /* @__PURE__ */ H("div", {
133
+ className: "pl-menu-separator",
134
+ role: "separator"
135
+ }, `s${t}`) : /* @__PURE__ */ H("button", {
136
+ type: "button",
137
+ role: "menuitem",
138
+ disabled: e.disabled,
139
+ className: e.danger ? "pl-menu-item pl-menu-danger" : "pl-menu-item",
140
+ onClick: () => {
141
+ i(!1), e.onSelect();
142
+ },
143
+ children: e.label
144
+ }, e.label))]
145
+ })
146
+ }), document.body)]
147
+ });
148
+ }
149
+ function Ee(e) {
150
+ return e?.closest(".planner") ?? null;
151
+ }
152
+ // src/ui/DueChip.tsx
153
+ function De({ due: t, now: n, done: r, label: i, onChange: a, variant: o = "goal", opener: s }) {
154
+ let c = z(null), u = () => {
155
+ let e = c.current;
156
+ if (e) try {
157
+ e.showPicker();
158
+ } catch {
159
+ e.focus();
160
+ }
161
+ };
162
+ s?.(u);
163
+ let f = t ? l(t, n) : null, m = t ? p(t, n) ? "来週" : f === 1 ? "明日" : e[_(t, n)] : void 0, h = t ? `${d(t, n)} ${f === null || r ? "" : f > 0 ? `あと ${f} 日` : f === 0 ? "今日" : `${-f} 日過ぎ`}(時間軸の「${m}」に出ます)` : o === "goal" ? "期日を決めると、時間軸に出ます" : void 0, g = f !== null && f <= (o === "inline" ? 0 : 7) && !r, v = o === "inline" && !t;
164
+ return /* @__PURE__ */ U("span", {
165
+ className: `pl-due${o === "inline" ? " pl-due-inline" : ""}${t ? "" : " pl-due-empty"}${g ? " pl-due-soon" : ""}${v ? " pl-due-hidden" : ""}`,
166
+ title: h,
167
+ children: [!v && /* @__PURE__ */ H("button", {
168
+ type: "button",
169
+ className: "pl-due-button",
170
+ "aria-label": `${i}${t ? `(${t})` : "(未定)"}を変える`,
171
+ onClick: u,
172
+ children: t ? o === "inline" ? d(t, n) : j(t, n) : /* @__PURE__ */ H(re, { "aria-hidden": "true" })
173
+ }), /* @__PURE__ */ H("input", {
174
+ ref: c,
175
+ type: "date",
176
+ className: "pl-due-input",
177
+ value: t ?? "",
178
+ tabIndex: -1,
179
+ "aria-hidden": "true",
180
+ onChange: (e) => a(e.target.value)
181
+ })]
182
+ });
183
+ }
184
+ // src/ui/DaySelect.tsx
185
+ var Oe = [
186
+ 1,
187
+ 2,
188
+ 3,
189
+ 4,
190
+ "L"
191
+ ], ke = [
192
+ 1,
193
+ 2,
194
+ 3,
195
+ 4,
196
+ 5,
197
+ 6,
198
+ 0
199
+ ];
200
+ function Ae({ value: e, label: t, onChange: n, onBlur: r, autoFocus: i, className: a = "pl-select pl-select-quiet" }) {
201
+ return /* @__PURE__ */ U("select", {
202
+ className: a,
203
+ autoFocus: i,
204
+ "aria-label": t,
205
+ value: e === void 0 ? "" : String(e),
206
+ onBlur: r,
207
+ onChange: (e) => n(je(e.target.value)),
208
+ children: [
209
+ /* @__PURE__ */ H("option", {
210
+ value: "",
211
+ children: "決めない"
212
+ }),
213
+ /* @__PURE__ */ H("optgroup", {
214
+ label: "曜日(第何週)",
215
+ children: Oe.map((e) => ke.map((t) => {
216
+ let n = `w${e}-${t}`;
217
+ return /* @__PURE__ */ U("option", {
218
+ value: n,
219
+ children: [c(n), "曜"]
220
+ }, n);
221
+ }))
222
+ }),
223
+ /* @__PURE__ */ U("optgroup", {
224
+ label: "日にち",
225
+ children: [Array.from({ length: 31 }, (e, t) => /* @__PURE__ */ U("option", {
226
+ value: String(t + 1),
227
+ children: [t + 1, "日"]
228
+ }, t + 1)), /* @__PURE__ */ H("option", {
229
+ value: "end",
230
+ children: "月末"
231
+ })]
232
+ })
233
+ ]
234
+ });
235
+ }
236
+ function je(e) {
237
+ if (e === "") return;
238
+ if (e === "end") return "end";
239
+ if (/^w[1-5L]-[0-6]$/.test(e)) return e;
240
+ let t = Number(e);
241
+ return Number.isInteger(t) && t >= 1 && t <= 31 ? t : void 0;
242
+ }
243
+ // src/ui/WhenSelect.tsx
244
+ var Me = [
245
+ 1,
246
+ 2,
247
+ 3,
248
+ 4,
249
+ 5,
250
+ 6,
251
+ 0
252
+ ], Ne = [
253
+ "日",
254
+ "月",
255
+ "火",
256
+ "水",
257
+ "木",
258
+ "金",
259
+ "土"
260
+ ], J = (e) => String(e).padStart(2, "0");
261
+ function Pe({ habit: e, onChange: t, onBlur: n, autoFocus: r, className: i = "pl-select pl-select-quiet" }) {
262
+ if (e.period === "month") return /* @__PURE__ */ H(Ae, {
263
+ className: i,
264
+ autoFocus: r,
265
+ label: `「${e.title}」の毎月の日`,
266
+ value: e.day,
267
+ onBlur: n,
268
+ onChange: (n) => t(N(e, n))
269
+ });
270
+ if (e.period === "week") return /* @__PURE__ */ U("select", {
271
+ className: i,
272
+ autoFocus: r,
273
+ "aria-label": `「${e.title}」の毎週の曜日`,
274
+ value: e.weekday === void 0 ? "" : String(e.weekday),
275
+ onBlur: n,
276
+ onChange: (n) => t(P(e, n.target.value === "" ? void 0 : Number(n.target.value))),
277
+ children: [/* @__PURE__ */ H("option", {
278
+ value: "",
279
+ children: "曜日を決めない"
280
+ }), Me.map((e) => /* @__PURE__ */ U("option", {
281
+ value: e,
282
+ children: [Ne[e], "曜"]
283
+ }, e))]
284
+ });
285
+ if (e.period === "year") {
286
+ let a = b(e.yearDay), o = (n, r) => t(P(e, n ? r ? `${J(n)}-${J(r)}` : J(n) : void 0));
287
+ return /* @__PURE__ */ U("span", {
288
+ className: "pl-when-year",
289
+ onBlur: n,
290
+ children: [/* @__PURE__ */ U("select", {
291
+ className: i,
292
+ autoFocus: r,
293
+ "aria-label": `「${e.title}」の毎年の月`,
294
+ value: a ? String(a.month) : "",
295
+ onChange: (e) => o(e.target.value ? Number(e.target.value) : void 0, a?.day),
296
+ children: [/* @__PURE__ */ H("option", {
297
+ value: "",
298
+ children: "月を決めない"
299
+ }), Array.from({ length: 12 }, (e, t) => /* @__PURE__ */ U("option", {
300
+ value: t + 1,
301
+ children: [t + 1, "月"]
302
+ }, t + 1))]
303
+ }), a && /* @__PURE__ */ U("select", {
304
+ className: i,
305
+ "aria-label": `「${e.title}」の毎年の日`,
306
+ value: a.day ? String(a.day) : "",
307
+ onChange: (e) => o(a.month, e.target.value ? Number(e.target.value) : void 0),
308
+ children: [/* @__PURE__ */ H("option", {
309
+ value: "",
310
+ children: "月だけ"
311
+ }), Array.from({ length: new Date(2024, a.month, 0).getDate() }, (e, t) => /* @__PURE__ */ U("option", {
312
+ value: t + 1,
313
+ children: [t + 1, "日"]
314
+ }, t + 1))]
315
+ })]
316
+ });
317
+ }
318
+ return null;
319
+ }
320
+ // src/ui/Dialog.tsx
321
+ var Y = (e) => e.stopPropagation();
322
+ function X({ open: e, onClose: t, title: n, children: r, dismissible: i = !0, wide: a = !1 }) {
323
+ let o = z(null);
324
+ return L(() => {
325
+ let t = o.current;
326
+ t && (e && !t.open && t.showModal?.(), !e && t.open && t.close?.());
327
+ }, [e]), /* @__PURE__ */ H("dialog", {
328
+ ref: o,
329
+ className: a ? "pl-dialog pl-dialog-wide" : "pl-dialog",
330
+ "aria-label": n,
331
+ onCancel: (e) => {
332
+ e.preventDefault(), i && t();
333
+ },
334
+ onClick: (e) => {
335
+ e.stopPropagation(), i && e.target === e.currentTarget && t();
336
+ },
337
+ onPointerDown: Y,
338
+ onMouseDown: Y,
339
+ onTouchStart: Y,
340
+ onKeyDown: Y,
341
+ onDoubleClick: Y,
342
+ children: e && /* @__PURE__ */ U("div", {
343
+ className: "pl-dialog-body",
344
+ children: [/* @__PURE__ */ U("header", {
345
+ className: "pl-dialog-header",
346
+ children: [/* @__PURE__ */ H("h2", { children: n }), i && /* @__PURE__ */ H("button", {
347
+ type: "button",
348
+ className: "pl-icon-button",
349
+ onClick: t,
350
+ "aria-label": "閉じる",
351
+ children: /* @__PURE__ */ H(le, { "aria-hidden": "true" })
352
+ })]
353
+ }), r]
354
+ })
355
+ });
356
+ }
357
+ // src/ui/NoteDialog.tsx
358
+ var Fe = 2e4;
359
+ function Z({ open: e, title: t, note: n, onSave: r, onClose: i }) {
360
+ let [a, o] = B(!1), [s, c] = B(""), l = z(null);
361
+ L(() => {
362
+ e && (c(n), o(!n));
363
+ }, [e, n]), L(() => {
364
+ e && a && requestAnimationFrame(() => l.current?.focus());
365
+ }, [e, a]);
366
+ let u = () => {
367
+ r(s.trim() ? s.replace(/\s+$/, "") : ""), o(!1), s.trim() || i();
368
+ };
369
+ return /* @__PURE__ */ H(X, {
370
+ open: e,
371
+ onClose: i,
372
+ title: t,
373
+ children: a ? /* @__PURE__ */ U("form", {
374
+ className: "pl-stack",
375
+ onSubmit: (e) => {
376
+ e.preventDefault(), u();
377
+ },
378
+ children: [/* @__PURE__ */ H("textarea", {
379
+ ref: l,
380
+ className: "pl-input pl-note-input",
381
+ value: s,
382
+ maxLength: Fe,
383
+ rows: 10,
384
+ placeholder: "メモ(やり方・読む文章・手順など)",
385
+ "aria-label": `「${t}」のメモ`,
386
+ onChange: (e) => c(e.target.value),
387
+ onKeyDown: (e) => {
388
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), u());
389
+ }
390
+ }), /* @__PURE__ */ U("div", {
391
+ className: "pl-row pl-row-end",
392
+ children: [
393
+ /* @__PURE__ */ H("span", {
394
+ className: "pl-note pl-note-hint",
395
+ children: "⌘Enter で保存"
396
+ }),
397
+ /* @__PURE__ */ H("button", {
398
+ type: "button",
399
+ className: "pl-button",
400
+ onClick: () => {
401
+ n ? (c(n), o(!1)) : i();
402
+ },
403
+ children: "やめる"
404
+ }),
405
+ /* @__PURE__ */ H("button", {
406
+ type: "submit",
407
+ className: "pl-button pl-button-primary",
408
+ children: "保存"
409
+ })
410
+ ]
411
+ })]
412
+ }) : /* @__PURE__ */ U("div", {
413
+ className: "pl-stack",
414
+ children: [/* @__PURE__ */ H("div", {
415
+ className: "pl-note-view",
416
+ children: n
417
+ }), /* @__PURE__ */ U("div", {
418
+ className: "pl-row pl-row-end",
419
+ children: [/* @__PURE__ */ H("button", {
420
+ type: "button",
421
+ className: "pl-button",
422
+ onClick: () => o(!0),
423
+ children: "書き換える"
424
+ }), /* @__PURE__ */ H("button", {
425
+ type: "button",
426
+ className: "pl-button pl-button-primary",
427
+ onClick: i,
428
+ children: "閉じる"
429
+ })]
430
+ })]
431
+ })
432
+ });
433
+ }
434
+ function Q(e, t) {
435
+ let n = z(void 0);
436
+ return L(() => () => clearTimeout(n.current), []), {
437
+ onClick: () => {
438
+ clearTimeout(n.current), n.current = setTimeout(e, 250);
439
+ },
440
+ onDoubleClick: () => {
441
+ clearTimeout(n.current), window.getSelection?.()?.removeAllRanges(), t();
442
+ }
443
+ };
444
+ }
445
+ function Ie({ title: e, note: t, wrap: n = !1, renameLabel: r, onRename: i, onSaveNote: a, menuOpener: o }) {
446
+ let [s, c] = B(!1), [l, u] = B(!1), d = Q(() => u(!0), () => c(!0));
447
+ return o?.({
448
+ note: () => u(!0),
449
+ rename: () => c(!0)
450
+ }), /* @__PURE__ */ U(V, { children: [s ? /* @__PURE__ */ H($, {
451
+ initial: e,
452
+ label: r,
453
+ onDone: (t) => {
454
+ c(!1), t && t !== e && i(t);
455
+ }
456
+ }) : /* @__PURE__ */ U("button", {
457
+ type: "button",
458
+ className: `pl-task-title pl-title-button${n ? " pl-title-wrap" : ""}`,
459
+ title: t ? `${e}(押すとメモ)` : e,
460
+ ...d,
461
+ children: [/* @__PURE__ */ H("span", {
462
+ className: "pl-title-text",
463
+ children: e
464
+ }), t && /* @__PURE__ */ H(W, {
465
+ className: "pl-note-mark",
466
+ "aria-label": "メモあり"
467
+ })]
468
+ }), /* @__PURE__ */ H(Z, {
469
+ open: l,
470
+ title: e,
471
+ note: t ?? "",
472
+ onClose: () => u(!1),
473
+ onSave: a
474
+ })] });
475
+ }
476
+ var Le = [{
477
+ value: "graduated",
478
+ name: "卒業",
479
+ sub: "身についた",
480
+ Icon: oe
481
+ }, {
482
+ value: "paused",
483
+ name: "お休み",
484
+ sub: "続かなかった・今はやめる",
485
+ Icon: se
486
+ }], Re = {
487
+ day: {
488
+ name: "日",
489
+ count: "日"
490
+ },
491
+ week: {
492
+ name: "週",
493
+ count: "週"
494
+ },
495
+ month: {
496
+ name: "月",
497
+ count: "か月"
498
+ },
499
+ year: {
500
+ name: "年",
501
+ count: "年"
502
+ }
503
+ };
504
+ function ze(e, t, n) {
505
+ let [r, i] = B(!1), [a, o] = B(!1);
506
+ return {
507
+ items: [{
508
+ label: e.endedAt ? "卒業・お休みを変える…" : "卒業・お休みにする…",
509
+ onSelect: () => i(!0)
510
+ }, {
511
+ label: "完全に消す",
512
+ danger: !0,
513
+ onSelect: () => e.history?.length ? o(!0) : n({ deleteHabitIds: [e.id] })
514
+ }],
515
+ dialogs: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(Be, {
516
+ open: r,
517
+ habit: e,
518
+ onClose: () => i(!1),
519
+ onEnd: (r, a) => {
520
+ i(!1), n(f(t, e, r, a, /* @__PURE__ */ new Date()));
521
+ }
522
+ }), /* @__PURE__ */ H(Ve, {
523
+ open: a,
524
+ habit: e,
525
+ onClose: () => o(!1),
526
+ onRemove: () => {
527
+ o(!1), n({ deleteHabitIds: [e.id] });
528
+ }
529
+ })] })
530
+ };
531
+ }
532
+ function Be({ open: e, habit: t, onClose: n, onEnd: r }) {
533
+ let [i, a] = B(void 0), [o, s] = B(""), c = !!t.endedAt;
534
+ return L(() => {
535
+ e && (a(t.endedAs), s(t.endNote ?? ""));
536
+ }, [
537
+ e,
538
+ t.endedAs,
539
+ t.endNote
540
+ ]), /* @__PURE__ */ H(X, {
541
+ open: e,
542
+ onClose: n,
543
+ title: c ? `「${t.title}」の終え方を変える` : `「${t.title}」を終える`,
544
+ children: /* @__PURE__ */ U("form", {
545
+ className: "pl-stack",
546
+ onSubmit: (e) => {
547
+ e.preventDefault(), i && r(i, o);
548
+ },
549
+ children: [
550
+ !c && /* @__PURE__ */ H("p", {
551
+ className: "pl-note",
552
+ children: "チェックの記録は消えません。習慣の一番下の「これまでの習慣」に残り、また始めることもできます。"
553
+ }),
554
+ /* @__PURE__ */ H("div", {
555
+ className: "pl-end-choices",
556
+ role: "radiogroup",
557
+ "aria-label": "終え方",
558
+ children: Le.map(({ value: e, name: t, sub: n, Icon: r }) => /* @__PURE__ */ U("button", {
559
+ type: "button",
560
+ role: "radio",
561
+ "aria-checked": i === e,
562
+ className: `pl-end-choice pl-end-${e}${i === e ? " pl-end-choice-on" : ""}`,
563
+ onClick: () => a(e),
564
+ children: [
565
+ /* @__PURE__ */ H(r, { "aria-hidden": "true" }),
566
+ /* @__PURE__ */ H("span", {
567
+ className: "pl-end-choice-name",
568
+ children: t
569
+ }),
570
+ /* @__PURE__ */ H("span", {
571
+ className: "pl-end-choice-sub",
572
+ children: n
573
+ })
574
+ ]
575
+ }, e))
576
+ }),
577
+ /* @__PURE__ */ H("input", {
578
+ className: "pl-input",
579
+ value: o,
580
+ maxLength: 200,
581
+ placeholder: "ひとこと(なくてもよい)例: 朝が忙しかった",
582
+ "aria-label": "ひとこと",
583
+ onChange: (e) => s(e.target.value)
584
+ }),
585
+ /* @__PURE__ */ U("div", {
586
+ className: "pl-row pl-row-end",
587
+ children: [/* @__PURE__ */ H("button", {
588
+ type: "button",
589
+ className: "pl-button",
590
+ onClick: n,
591
+ children: "やめる"
592
+ }), /* @__PURE__ */ H("button", {
593
+ type: "submit",
594
+ className: "pl-button pl-button-primary",
595
+ disabled: !i,
596
+ children: c ? "変える" : i === "paused" ? "お休みにする" : i === "graduated" ? "卒業する" : "選んでください"
597
+ })]
598
+ })
599
+ ]
600
+ })
601
+ });
602
+ }
603
+ function Ve({ open: e, habit: t, onClose: n, onRemove: r }) {
604
+ let i = t.history?.length ?? 0;
605
+ return /* @__PURE__ */ H(X, {
606
+ open: e,
607
+ onClose: n,
608
+ title: `「${t.title}」を完全に消す`,
609
+ children: /* @__PURE__ */ U("div", {
610
+ className: "pl-stack",
611
+ children: [/* @__PURE__ */ U("p", {
612
+ className: "pl-text",
613
+ children: [
614
+ "チェックの記録(",
615
+ i,
616
+ " 日分)も消え、元に戻せません。記録を残したいときは「卒業・お休みにする」を使ってください。"
617
+ ]
618
+ }), /* @__PURE__ */ U("div", {
619
+ className: "pl-row pl-row-end",
620
+ children: [/* @__PURE__ */ H("button", {
621
+ type: "button",
622
+ className: "pl-button",
623
+ onClick: n,
624
+ children: "やめる"
625
+ }), /* @__PURE__ */ H("button", {
626
+ type: "button",
627
+ className: "pl-button pl-button-danger",
628
+ onClick: r,
629
+ children: "完全に消す"
630
+ })]
631
+ })]
632
+ })
633
+ });
634
+ }
635
+ function He({ habits: e, data: t, store: n, now: r, label: i = "これまでの習慣" }) {
636
+ if (e.length === 0) return null;
637
+ let a = (e) => void n.apply(e);
638
+ return /* @__PURE__ */ U("details", {
639
+ className: "pl-ended",
640
+ children: [/* @__PURE__ */ U("summary", {
641
+ className: "pl-ended-summary",
642
+ children: [
643
+ i,
644
+ "(",
645
+ e.length,
646
+ ")"
647
+ ]
648
+ }), /* @__PURE__ */ H("ul", {
649
+ className: "pl-list",
650
+ children: e.map((e) => /* @__PURE__ */ H(Ue, {
651
+ habit: e,
652
+ data: t,
653
+ apply: a,
654
+ now: r
655
+ }, e.id))
656
+ })]
657
+ });
658
+ }
659
+ function Ue({ habit: e, data: t, apply: n, now: r }) {
660
+ let { items: i, dialogs: a } = ze(e, t, n), o = {}, c = e.endedAs === "graduated", l = c ? oe : se, d = e.projectId ? t.projects.find((t) => t.id === e.projectId) : void 0, f = h(e, r), p = Re[e.period], m = `${u(s(f.start), r)}〜${f.end ? u(s(f.end), r) : ""}`, g = () => (/* @__PURE__ */ new Date()).toISOString();
661
+ return /* @__PURE__ */ U("li", {
662
+ className: `pl-ended-habit pl-ended-${c ? "graduated" : "paused"}`,
663
+ children: [
664
+ /* @__PURE__ */ H("span", {
665
+ className: "pl-ended-mark",
666
+ role: "img",
667
+ "aria-label": c ? "卒業" : "お休み",
668
+ title: c ? "卒業(身についた)" : "お休み(続かなかった・今はやめる)",
669
+ children: /* @__PURE__ */ H(l, { "aria-hidden": "true" })
670
+ }),
671
+ /* @__PURE__ */ U("div", {
672
+ className: "pl-ended-body",
673
+ children: [
674
+ /* @__PURE__ */ U("div", {
675
+ className: "pl-ended-line",
676
+ children: [d && /* @__PURE__ */ H(Ze, {
677
+ name: Xe(t, d),
678
+ color: d.color
679
+ }), /* @__PURE__ */ H(Ie, {
680
+ title: e.title,
681
+ note: e.note,
682
+ wrap: !0,
683
+ renameLabel: "習慣の名前",
684
+ menuOpener: (e) => Object.assign(o, e),
685
+ onRename: (t) => n({ habits: [{
686
+ ...e,
687
+ title: t,
688
+ updatedAt: g()
689
+ }] }),
690
+ onSaveNote: (t) => {
691
+ let { note: r, ...i } = e;
692
+ n({ habits: [{
693
+ ...i,
694
+ ...t ? { note: t } : {},
695
+ updatedAt: g()
696
+ }] });
697
+ }
698
+ })]
699
+ }),
700
+ /* @__PURE__ */ U("div", {
701
+ className: "pl-ended-meta",
702
+ children: [/* @__PURE__ */ H("span", { children: m }), f.total > 0 && /* @__PURE__ */ U("span", {
703
+ title: `${f.total} ${p.count}のうち ${f.done} ${p.count}`,
704
+ children: [
705
+ "できた",
706
+ p.name,
707
+ " ",
708
+ Math.round(f.done / f.total * 100),
709
+ "%"
710
+ ]
711
+ })]
712
+ }),
713
+ e.endNote && /* @__PURE__ */ U("p", {
714
+ className: "pl-ended-note",
715
+ children: [
716
+ "「",
717
+ e.endNote,
718
+ "」"
719
+ ]
720
+ })
721
+ ]
722
+ }),
723
+ /* @__PURE__ */ H(q, {
724
+ label: `「${e.title}」の操作`,
725
+ items: [
726
+ {
727
+ label: "また始める",
728
+ onSelect: () => n(D(t, e, /* @__PURE__ */ new Date()))
729
+ },
730
+ i[0],
731
+ {
732
+ label: "名前を変える",
733
+ onSelect: () => o.rename?.()
734
+ },
735
+ {
736
+ label: e.note ? "メモを見る" : "メモを書く",
737
+ onSelect: () => o.note?.()
738
+ },
739
+ "separator",
740
+ i[1]
741
+ ]
742
+ }),
743
+ a
744
+ ]
745
+ });
746
+ }
747
+ // src/ui/Rows.tsx
748
+ function We({ view: t, data: s, store: c, now: l }) {
749
+ let { task: u, label: f, done: p, faded: m, placedTo: h, from: g, project: _ } = t, { simple: y } = G(), [b, x] = B(!1), [C, D] = B(!1), j = K(u.id, b), M = !u.parentId && !u.habitId, ne = z(null), N = Q(() => D(!0), () => x(!0)), P = w(t.horizon), F = ee(t.horizon), I = (e) => void c.apply(e), L = t.horizon === "today" && !p && !m, R = L && v(u, l), V = [
750
+ ...L ? [R ? {
751
+ label: "今日やる(今日にもどす)",
752
+ onSelect: () => I(o(u, l))
753
+ } : {
754
+ label: "明日にまわす",
755
+ onSelect: () => I(T(u, l))
756
+ }] : [],
757
+ ...P.map((e) => ({
758
+ label: r[e],
759
+ onSelect: () => I(S(s, u, e, l)),
760
+ disabled: p
761
+ })),
762
+ ...P.length ? ["separator"] : [],
763
+ {
764
+ label: "名前を変える",
765
+ onSelect: () => x(!0)
766
+ },
767
+ ...M ? [{
768
+ label: u.due ? "日付を変える" : "日付を決める",
769
+ onSelect: () => ne.current?.()
770
+ }, ...u.due ? [{
771
+ label: "日付を外す",
772
+ onSelect: () => I(k(u, ""))
773
+ }] : []] : [],
774
+ {
775
+ label: u.note ? "メモを見る" : "メモを書く",
776
+ onSelect: () => D(!0)
777
+ },
778
+ "separator",
779
+ ...u.parentId || u.habitId ? [{
780
+ label: `${g ? e[g] ?? "元" : "元"}に戻す`,
781
+ onSelect: () => I(O(s, u, l))
782
+ }] : [],
783
+ {
784
+ label: "消す",
785
+ danger: !0,
786
+ onSelect: () => I(E(s, u, l))
787
+ }
788
+ ];
789
+ return /* @__PURE__ */ U("li", {
790
+ ref: j.ref,
791
+ style: j.style,
792
+ className: `pl-task pl-p-${u.priority}${m ? " pl-faded" : ""}${p ? " pl-done" : ""}${j.isDragging ? " pl-dragging" : ""}`,
793
+ ...j.handleProps,
794
+ children: [
795
+ /* @__PURE__ */ H("span", {
796
+ className: "pl-task-label",
797
+ children: f
798
+ }),
799
+ /* @__PURE__ */ H("button", {
800
+ type: "button",
801
+ role: "checkbox",
802
+ "aria-checked": p,
803
+ "aria-label": p ? `「${u.title}」を終えたのを取り消す` : `「${u.title}」を終える`,
804
+ className: "pl-circle",
805
+ onClick: () => I(te(s, u, l)),
806
+ children: p && /* @__PURE__ */ H(ie, { "aria-hidden": "true" })
807
+ }),
808
+ /* @__PURE__ */ U("div", {
809
+ className: "pl-task-main",
810
+ children: [b ? /* @__PURE__ */ H($, {
811
+ initial: u.title,
812
+ label: "名前",
813
+ onDone: (e) => {
814
+ x(!1), e && e !== u.title && I({ tasks: [{
815
+ ...u,
816
+ title: e,
817
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
818
+ }] });
819
+ }
820
+ }) : /* @__PURE__ */ U("button", {
821
+ type: "button",
822
+ className: "pl-task-title pl-title-button",
823
+ title: u.note ? `${u.title}(押すとメモ)` : u.title,
824
+ ...N,
825
+ children: [
826
+ _ && /* @__PURE__ */ H(Ze, {
827
+ name: Xe(s, _),
828
+ color: _.color
829
+ }),
830
+ /* @__PURE__ */ H("span", {
831
+ className: "pl-title-text",
832
+ children: u.title
833
+ }),
834
+ u.note && /* @__PURE__ */ H(W, {
835
+ className: "pl-note-mark",
836
+ "aria-label": "メモあり"
837
+ })
838
+ ]
839
+ }), !b && /* @__PURE__ */ U("span", {
840
+ className: "pl-task-meta",
841
+ children: [
842
+ !y && h && /* @__PURE__ */ U("span", {
843
+ className: "pl-chip",
844
+ children: ["→", n[h]]
845
+ }),
846
+ !y && g && g !== "pool" && /* @__PURE__ */ U("span", {
847
+ className: "pl-chip",
848
+ children: ["←", e[g]]
849
+ }),
850
+ M ? /* @__PURE__ */ H(De, {
851
+ variant: "inline",
852
+ due: u.due,
853
+ now: l,
854
+ done: p,
855
+ label: `「${u.title}」の日付`,
856
+ opener: (e) => ne.current = e,
857
+ onChange: (e) => I(k(u, e))
858
+ }) : u.due && /* @__PURE__ */ H("span", {
859
+ className: "pl-chip",
860
+ children: d(u.due, l)
861
+ })
862
+ ]
863
+ })]
864
+ }),
865
+ /* @__PURE__ */ U("div", {
866
+ className: "pl-task-actions",
867
+ children: [
868
+ (u.parentId || u.habitId) && /* @__PURE__ */ H("button", {
869
+ type: "button",
870
+ className: "pl-row-button",
871
+ "aria-label": `「${u.title}」を${g ? e[g] : "元"}に戻す`,
872
+ title: `${g ? e[g] : "元"}に戻す`,
873
+ onClick: () => I(O(s, u, l)),
874
+ children: /* @__PURE__ */ H(ae, { "aria-hidden": "true" })
875
+ }),
876
+ F && !p && !m && /* @__PURE__ */ U("button", {
877
+ type: "button",
878
+ className: "pl-place-button",
879
+ onClick: () => I(S(s, u, F, l)),
880
+ title: r[F],
881
+ children: [n[F], "↓"]
882
+ }),
883
+ L && /* @__PURE__ */ H("button", {
884
+ type: "button",
885
+ className: "pl-place-button",
886
+ onClick: () => I(R ? o(u, l) : T(u, l)),
887
+ title: R ? "今日やる(今日にもどす)" : "明日にまわす",
888
+ "aria-label": R ? `「${u.title}」を今日にもどす` : `「${u.title}」を明日にまわす`,
889
+ children: R ? "今日↑" : "明日→"
890
+ }),
891
+ /* @__PURE__ */ H(q, {
892
+ label: `「${u.title}」の操作`,
893
+ items: V,
894
+ header: /* @__PURE__ */ H("div", {
895
+ className: "pl-menu-priorities",
896
+ role: "group",
897
+ "aria-label": "優先度",
898
+ children: i.map((e) => /* @__PURE__ */ H("button", {
899
+ type: "button",
900
+ className: `pl-pchip pl-p-${e}`,
901
+ "aria-pressed": u.priority === e,
902
+ title: a[e],
903
+ onClick: () => I(A(s, u, e, l)),
904
+ children: e
905
+ }, e))
906
+ })
907
+ })
908
+ ]
909
+ }),
910
+ /* @__PURE__ */ H(Z, {
911
+ open: C,
912
+ title: u.title,
913
+ note: u.note ?? "",
914
+ onClose: () => D(!1),
915
+ onSave: (e) => {
916
+ let { note: t, ...n } = u;
917
+ I({ tasks: [{
918
+ ...n,
919
+ ...e ? { note: e } : {},
920
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
921
+ }] });
922
+ }
923
+ })
924
+ ]
925
+ });
926
+ }
927
+ var Ge = {
928
+ week: "毎週の曜日",
929
+ month: "毎月の日",
930
+ year: "毎年の日付・月"
931
+ };
932
+ function Ke({ view: e, data: i, store: a, now: o }) {
933
+ let { habit: c, checked: l, project: u, faded: d, placedTo: f, auto: p, dueDay: h } = e, { simple: _ } = G(), [v, b] = B(!1), [S, w] = B(!1), [T, E] = B(!1), D = K(p ? `auto-${c.id}` : c.id, v || p), O = Q(() => w(!0), () => b(!0)), k = (e) => void a.apply(e), A = p ? [] : m(c), j = p ? void 0 : ee(x(c.period)), te = p && h && !y(c) && s(h) < s(o), N = ne(c), P = ze(c, i, k);
934
+ return /* @__PURE__ */ U("li", {
935
+ ref: D.ref,
936
+ style: D.style,
937
+ className: `pl-habit${l ? " pl-done" : ""}${d ? " pl-faded" : ""}${p ? " pl-habit-auto" : ""}${D.isDragging ? " pl-dragging" : ""}`,
938
+ ...D.handleProps,
939
+ children: [
940
+ /* @__PURE__ */ H("button", {
941
+ type: "button",
942
+ role: "checkbox",
943
+ "aria-checked": l,
944
+ "aria-label": l ? `「${c.title}」のチェックを外す` : `「${c.title}」をチェック`,
945
+ className: "pl-square",
946
+ onClick: () => k(M(i, c, o)),
947
+ children: l && /* @__PURE__ */ H(ie, { "aria-hidden": "true" })
948
+ }),
949
+ v ? /* @__PURE__ */ H($, {
950
+ initial: c.title,
951
+ label: "習慣の名前",
952
+ onDone: (e) => {
953
+ b(!1), e && e !== c.title && k({ habits: [{
954
+ ...c,
955
+ title: e,
956
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
957
+ }] });
958
+ }
959
+ }) : /* @__PURE__ */ U("button", {
960
+ type: "button",
961
+ className: "pl-task-title pl-title-button",
962
+ title: c.note ? `${c.title}(押すとメモ)` : c.title,
963
+ ...O,
964
+ children: [
965
+ u && /* @__PURE__ */ H(Ze, {
966
+ name: Xe(i, u),
967
+ color: u.color
968
+ }),
969
+ /* @__PURE__ */ H("span", {
970
+ className: "pl-title-text",
971
+ children: c.title
972
+ }),
973
+ c.note && /* @__PURE__ */ H(W, {
974
+ className: "pl-note-mark",
975
+ "aria-label": "メモあり"
976
+ })
977
+ ]
978
+ }),
979
+ T ? /* @__PURE__ */ H(Pe, {
980
+ autoFocus: !0,
981
+ habit: c,
982
+ onBlur: c.period === "year" ? void 0 : () => E(!1),
983
+ onChange: (e) => {
984
+ k({ habits: [e] }), c.period !== "year" && E(!1);
985
+ }
986
+ }) : N && /* @__PURE__ */ H("span", {
987
+ className: `pl-day${te && !l ? " pl-day-over" : ""}`,
988
+ title: `${t[c.period]}${N}${p && h ? `(${h.getMonth() + 1}/${h.getDate()})` : ""}`,
989
+ children: N
990
+ }),
991
+ T && c.period === "year" && /* @__PURE__ */ H("button", {
992
+ type: "button",
993
+ className: "pl-place-button",
994
+ onClick: () => E(!1),
995
+ children: "決定"
996
+ }),
997
+ !_ && f && /* @__PURE__ */ U("span", {
998
+ className: "pl-chip",
999
+ children: ["→", n[f]]
1000
+ }),
1001
+ j && !l && !d && /* @__PURE__ */ U("button", {
1002
+ type: "button",
1003
+ className: "pl-place-button",
1004
+ onClick: () => k(C(i, c, j, o)),
1005
+ title: r[j],
1006
+ children: [n[j], "↓"]
1007
+ }),
1008
+ /* @__PURE__ */ H(q, {
1009
+ label: `「${c.title}」の操作`,
1010
+ items: [
1011
+ ...A.map((e) => ({
1012
+ label: r[e],
1013
+ onSelect: () => k(C(i, c, e, o)),
1014
+ disabled: l
1015
+ })),
1016
+ ...A.length ? ["separator"] : [],
1017
+ {
1018
+ label: "名前を変える",
1019
+ onSelect: () => b(!0)
1020
+ },
1021
+ {
1022
+ label: c.note ? "メモを見る" : "メモを書く",
1023
+ onSelect: () => w(!0)
1024
+ },
1025
+ ...c.period === "day" ? [] : [{
1026
+ label: N ? `${Ge[c.period]}を変える(${N})` : `${Ge[c.period]}を決める`,
1027
+ onSelect: () => E(!0)
1028
+ }],
1029
+ {
1030
+ label: "やることに移す(1 回で終わるもの)",
1031
+ onSelect: () => k(g(i, c, o))
1032
+ },
1033
+ P.items[0],
1034
+ "separator",
1035
+ P.items[1]
1036
+ ]
1037
+ }),
1038
+ P.dialogs,
1039
+ /* @__PURE__ */ H(Z, {
1040
+ open: S,
1041
+ title: c.title,
1042
+ note: c.note ?? "",
1043
+ onClose: () => w(!1),
1044
+ onSave: (e) => {
1045
+ let { note: t, ...n } = c;
1046
+ k({ habits: [{
1047
+ ...n,
1048
+ ...e ? { note: e } : {},
1049
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1050
+ }] });
1051
+ }
1052
+ })
1053
+ ]
1054
+ });
1055
+ }
1056
+ function $({ initial: e, label: t, onDone: n }) {
1057
+ let [r, i] = B(e), a = z(null), o = z(!1);
1058
+ L(() => {
1059
+ a.current?.focus(), a.current?.select();
1060
+ }, []);
1061
+ let s = (e) => {
1062
+ o.current || (o.current = !0, n(e.trim()));
1063
+ };
1064
+ return /* @__PURE__ */ H("input", {
1065
+ ref: a,
1066
+ className: "pl-inline-input",
1067
+ value: r,
1068
+ "aria-label": t,
1069
+ onChange: (e) => i(e.target.value),
1070
+ onKeyDown: (t) => {
1071
+ t.key === "Enter" && !t.nativeEvent.isComposing && s(r), t.key === "Escape" && s(e);
1072
+ },
1073
+ onBlur: () => s(r)
1074
+ });
1075
+ }
1076
+ function qe({ placeholder: e, label: t, onAdd: n, priority: r, onPriority: o }) {
1077
+ let s = `planner:draft:${t}`, [c, l] = B(() => Je(s)), u = (e) => {
1078
+ l(e), Ye(s, e);
1079
+ }, { simple: d } = G();
1080
+ return /* @__PURE__ */ U("form", {
1081
+ className: "pl-add",
1082
+ onSubmit: (e) => {
1083
+ e.preventDefault();
1084
+ let t = c.trim();
1085
+ t && (n(t), u(""));
1086
+ },
1087
+ children: [r && o && /* @__PURE__ */ H("div", {
1088
+ className: "pl-add-priorities",
1089
+ role: "radiogroup",
1090
+ "aria-label": "優先度",
1091
+ children: i.map((e) => /* @__PURE__ */ H("button", {
1092
+ type: "button",
1093
+ role: "radio",
1094
+ "aria-checked": r === e,
1095
+ title: a[e],
1096
+ className: `pl-pchip pl-p-${e}`,
1097
+ onClick: () => o(e),
1098
+ children: e
1099
+ }, e))
1100
+ }), /* @__PURE__ */ U("div", {
1101
+ className: "pl-add-line",
1102
+ children: [/* @__PURE__ */ H("input", {
1103
+ className: "pl-add-input",
1104
+ value: c,
1105
+ placeholder: d ? "+" : e,
1106
+ "aria-label": t,
1107
+ enterKeyHint: "done",
1108
+ onChange: (e) => u(e.target.value),
1109
+ onKeyDown: (e) => {
1110
+ e.key === "Enter" && e.nativeEvent.isComposing && e.preventDefault();
1111
+ }
1112
+ }), c.trim() && /* @__PURE__ */ H("button", {
1113
+ type: "submit",
1114
+ className: "pl-add-submit",
1115
+ "aria-label": `${t}(追加)`,
1116
+ children: "追加"
1117
+ })]
1118
+ })]
1119
+ });
1120
+ }
1121
+ function Je(e) {
1122
+ try {
1123
+ return sessionStorage.getItem(e) ?? "";
1124
+ } catch {
1125
+ return "";
1126
+ }
1127
+ }
1128
+ function Ye(e, t) {
1129
+ try {
1130
+ t ? sessionStorage.setItem(e, t) : sessionStorage.removeItem(e);
1131
+ } catch {}
1132
+ }
1133
+ function Xe(e, t) {
1134
+ let n = t.parentId ? e.projects.find((e) => e.id === t.parentId) : void 0;
1135
+ return n ? `${n.name}・${t.name}` : t.name;
1136
+ }
1137
+ function Ze({ name: e, color: t }) {
1138
+ return /* @__PURE__ */ H("span", {
1139
+ className: `pl-pdot pl-color-${t}`,
1140
+ role: "img",
1141
+ "aria-label": e,
1142
+ title: e
1143
+ });
1144
+ }
1145
+ // src/ui/JumpBar.tsx
1146
+ function Qe({ label: e, items: t, active: n, onJump: r, className: i }) {
1147
+ return t.length < 2 ? null : /* @__PURE__ */ H("nav", {
1148
+ className: `pl-jump ${i ?? ""}`,
1149
+ "aria-label": e,
1150
+ children: /* @__PURE__ */ H("ul", { children: t.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U("button", {
1151
+ type: "button",
1152
+ className: "pl-jump-chip",
1153
+ "aria-current": n === e.id ? "true" : void 0,
1154
+ onClick: () => r(e.id),
1155
+ children: [e.color && /* @__PURE__ */ H("span", {
1156
+ className: `pl-dot pl-color-${e.color}`,
1157
+ "aria-hidden": "true"
1158
+ }), /* @__PURE__ */ H("span", {
1159
+ className: "pl-jump-label",
1160
+ children: e.label
1161
+ })]
1162
+ }) }, e.id)) })
1163
+ });
1164
+ }
1165
+ function $e(e, t = !1) {
1166
+ e?.scrollIntoView?.(t ? {
1167
+ behavior: "smooth",
1168
+ inline: "start",
1169
+ block: "nearest"
1170
+ } : {
1171
+ behavior: "smooth",
1172
+ block: "start"
1173
+ });
1174
+ }
1175
+ export { $ as a, ze as c, De as d, q as f, Se as g, K as h, Ke as i, Ie as l, we as m, $e as n, We as o, Ce as p, qe as r, He as s, Qe as t, Pe as u };