@base-framework/ui 1.0.305 → 1.0.307

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.
@@ -1,22 +1,22 @@
1
- import { Button as x, Div as o, On as v, Span as D, Th as O, UseParent as F, I as E, Thead as Q, Tr as X, Table as I, P as p, Li as S, Time as q, Nav as C, Ul as w, Section as z, Canvas as K } from "@base-framework/atoms";
2
- import { Atom as d, Component as u, Data as L, DateTime as G, router as b, NavLink as $, DataTracker as N, Jot as V, base as M, Dom as R } from "@base-framework/base";
3
- import { B as T, I as _ } from "./buttons-CHEs54Wl.js";
4
- import { Icons as k } from "./icons.es.js";
1
+ import { Button as w, Div as o, On as S, Span as C, Th as z, UseParent as F, I as E, Thead as Q, Tr as G, Table as I, P as x, Li as y, Time as X, Nav as m, Ul as g, Section as L, Canvas as q } from "@base-framework/atoms";
2
+ import { Atom as h, Component as c, Data as B, DateTime as K, router as k, NavLink as T, DataTracker as N, Jot as V, base as R, Dom as O } from "@base-framework/base";
3
+ import { B as M, I as _ } from "./buttons-CHEs54Wl.js";
4
+ import { Icons as D } from "./icons.es.js";
5
5
  import { TableBody as J, DataTableBody as Z, ScrollableTableBody as ee, List as te, IntervalTimer as se } from "@base-framework/organisms";
6
6
  import { C as ae, I as ie, H as ne } from "./inputs-9udyzkHR.js";
7
7
  import { A as oe, P as le } from "./range-calendar-CnBylqhu.js";
8
- d((t, e) => ({
8
+ h((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
11
11
  children: e
12
12
  }));
13
- d(({ value: t, label: e }) => x({
13
+ h(({ value: t, label: e }) => w({
14
14
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-md px-8 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
15
15
  onState: ["performance", { active: t }],
16
16
  dataSet: ["performance", ["state", t, "active"]],
17
17
  click: (s, { state: a }) => a.performance = t
18
18
  }, e));
19
- class at extends u {
19
+ class ft extends c {
20
20
  /**
21
21
  * This will declare the props for the compiler.
22
22
  *
@@ -63,15 +63,15 @@ const re = (t) => {
63
63
  i.setDate(s.getDate() - a);
64
64
  const n = new Date(i);
65
65
  return n.setDate(i.getDate() + (t - 1) * 7), n;
66
- }, it = (t, e) => {
66
+ }, gt = (t, e) => {
67
67
  const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
68
68
  let n = [];
69
69
  for (let l = 1 - s; l <= a; l++) {
70
- const c = new Date(t, e, l);
71
- n.push(l > 0 ? c : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
70
+ const d = new Date(t, e, l);
71
+ n.push(l > 0 ? d : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
72
72
  }
73
73
  return i;
74
- }, nt = (t, e) => {
74
+ }, mt = (t, e) => {
75
75
  const s = new Date(t, e + 1, 0).getDate(), a = [];
76
76
  let i = [];
77
77
  for (let n = 1; n <= s; n++)
@@ -82,7 +82,7 @@ const re = (t) => {
82
82
  return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
83
83
  }, fe = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
84
  const n = ue(t, e, s);
85
- return x({
85
+ return w({
86
86
  text: t || "",
87
87
  disabled: !t,
88
88
  class: `
@@ -92,19 +92,19 @@ const re = (t) => {
92
92
  `,
93
93
  click: () => i(a, s)
94
94
  });
95
- }, me = (t, e) => {
96
- const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = de(t, e, s), n = Array.from({ length: a }, (h, g) => new Date(t, e, g + 1)), l = (i.length + n.length) % 7, c = l === 0 ? 0 : 7 - l, r = he(t, e, c), f = [...i, ...n, ...r], m = [];
97
- for (let h = 0; h < f.length; h += 7) {
98
- const g = f.slice(h, h + 7), y = g.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: U } = ce(y);
99
- m.push({
95
+ }, ge = (t, e) => {
96
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = de(t, e, s), n = Array.from({ length: a }, (u, b) => new Date(t, e, b + 1)), l = (i.length + n.length) % 7, d = l === 0 ? 0 : 7 - l, r = he(t, e, d), f = [...i, ...n, ...r], p = [];
97
+ for (let u = 0; u < f.length; u += 7) {
98
+ const b = f.slice(u, u + 7), v = b.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: H } = ce(v);
99
+ p.push({
100
100
  weekNumber: A,
101
- year: U,
102
- days: g
101
+ year: H,
102
+ days: b
103
103
  });
104
104
  }
105
- return m;
106
- }, ge = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
107
- const { year: i, month: n, currentDate: l } = a, c = me(i, n);
105
+ return p;
106
+ }, me = ({ selectWeek: t }) => S("month", (e, s, { data: a }) => {
107
+ const { year: i, month: n, currentDate: l } = a, d = ge(i, n);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -115,12 +115,12 @@ const re = (t) => {
115
115
  class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
116
116
  },
117
117
  ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
118
- (r) => D({ class: "px-1 py-1", text: r })
118
+ (r) => C({ class: "px-1 py-1", text: r })
119
119
  )
120
120
  ),
121
121
  // Render each "week" row
122
- ...c.map(
123
- ({ weekNumber: r, days: f, year: m }) => o({
122
+ ...d.map(
123
+ ({ weekNumber: r, days: f, year: p }) => o({
124
124
  class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
125
125
  onSet: ["currentWeek", {
126
126
  ring: r
@@ -129,7 +129,7 @@ const re = (t) => {
129
129
  // Left column: ISO week number
130
130
  o({
131
131
  class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
132
- click: () => t(r, m),
132
+ click: () => t(r, p),
133
133
  // If you have a 'currentWeek' state, you can highlight it with 'onSet'
134
134
  onSet: ["currentWeek", {
135
135
  "text-primary-foreground": r,
@@ -141,10 +141,10 @@ const re = (t) => {
141
141
  o(
142
142
  { class: "grid grid-cols-7 col-span-7 text-center" },
143
143
  f.map(
144
- (h) => fe({
145
- year: h?.getFullYear() || null,
146
- month: h?.getMonth() || null,
147
- day: h?.getDate() || null,
144
+ (u) => fe({
145
+ year: u?.getFullYear() || null,
146
+ month: u?.getMonth() || null,
147
+ day: u?.getDate() || null,
148
148
  weekNumber: r,
149
149
  selectWeek: t
150
150
  })
@@ -154,7 +154,7 @@ const re = (t) => {
154
154
  )
155
155
  ]
156
156
  );
157
- }), P = ({ label: t, click: e }) => T(
157
+ }), $ = ({ label: t, click: e }) => M(
158
158
  {
159
159
  class: `
160
160
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -165,20 +165,20 @@ const re = (t) => {
165
165
  click: e,
166
166
  "aria-label": `${t} month`,
167
167
  variant: "icon",
168
- icon: t === "Previous" ? k.chevron.single.left : k.chevron.single.right
168
+ icon: t === "Previous" ? D.chevron.single.left : D.chevron.single.right
169
169
  }
170
170
  ), pe = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
- D("[[monthName]] [[year]]"),
172
- P({
171
+ C("[[monthName]] [[year]]"),
172
+ $({
173
173
  label: "Previous",
174
174
  click: e
175
175
  }),
176
- P({
176
+ $({
177
177
  label: "Next",
178
178
  click: t
179
179
  })
180
180
  ]);
181
- class ot extends u {
181
+ class pt extends c {
182
182
  /**
183
183
  * This will declare the props for the compiler.
184
184
  *
@@ -194,7 +194,7 @@ class ot extends u {
194
194
  */
195
195
  setData() {
196
196
  const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = W(s, e.getFullYear());
197
- return new L({
197
+ return new B({
198
198
  monthName: this.getMonthName(a.getMonth()),
199
199
  year: a.getFullYear(),
200
200
  month: a.getMonth(),
@@ -231,7 +231,7 @@ class ot extends u {
231
231
  * @returns {string}
232
232
  */
233
233
  getMonthName(e) {
234
- return G.monthNames[e];
234
+ return K.monthNames[e];
235
235
  }
236
236
  /**
237
237
  * Updates the calendar to show the previous month.
@@ -290,34 +290,34 @@ class ot extends u {
290
290
  next: () => this.goToNextMonth(),
291
291
  previous: () => this.goToPreviousMonth()
292
292
  }),
293
- ge({
293
+ me({
294
294
  selectWeek: (e, s) => this.selectWeek(e, s)
295
295
  })
296
296
  ]);
297
297
  }
298
298
  }
299
- const we = (t, e) => {
299
+ const be = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
- }, ye = (t) => O({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
- F((e) => new ae({ class: "mr-2", onChange: (s, a) => we(e, a) }))
304
- ]), be = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
302
+ }, ke = (t) => z({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
+ F((e) => new ae({ class: "mr-2", onChange: (s, a) => be(e, a) }))
304
+ ]), we = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
305
305
  const l = t || "justify-start";
306
- return O({
306
+ return z({
307
307
  class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
308
308
  click: e && (() => i(s))
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
- D(a),
312
- e && E({ class: "ml-2", html: k.arrows.upDown })
311
+ C(a),
312
+ e && E({ class: "ml-2", html: D.arrows.upDown })
313
313
  ])
314
314
  ]);
315
- }, B = (t) => Q([
316
- X({
315
+ }, P = (t) => Q([
316
+ G({
317
317
  class: "text-muted-foreground border-b",
318
318
  map: [
319
319
  t.headers,
320
- (e) => e.label === "checkbox" ? ye({ toggle: t.toggle }) : be({
320
+ (e) => e.label === "checkbox" ? ke({ toggle: t.toggle }) : we({
321
321
  align: e.align,
322
322
  sortable: e.sortable,
323
323
  key: e.key,
@@ -326,17 +326,17 @@ const we = (t, e) => {
326
326
  })
327
327
  ]
328
328
  })
329
- ]), ke = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new J({
329
+ ]), ye = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new J({
330
330
  cache: "list",
331
331
  key: t,
332
332
  items: e,
333
- rowItem: (c) => a(c, s),
333
+ rowItem: (d) => a(d, s),
334
334
  class: "divide-y divide-border",
335
335
  emptyState: i,
336
336
  skeleton: n,
337
337
  columnCount: l
338
338
  });
339
- class H extends u {
339
+ class U extends c {
340
340
  /**
341
341
  * Initializes component data.
342
342
  *
@@ -344,7 +344,7 @@ class H extends u {
344
344
  */
345
345
  setData() {
346
346
  let e = this.rows && this.rows.length > 0;
347
- return (this.loadMoreItems || this.tableData) && !e && (e = null), new L({
347
+ return (this.loadMoreItems || this.tableData) && !e && (e = null), new B({
348
348
  selectedRows: [],
349
349
  // @ts-ignore
350
350
  hasItems: e,
@@ -415,14 +415,14 @@ class H extends u {
415
415
  render() {
416
416
  const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
417
417
  return o({ class: "w-full flex flex-auto flex-col" }, [
418
- v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
418
+ S("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
419
419
  o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
420
420
  I({ class: "w-full" }, [
421
421
  // @ts-ignore
422
- this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
422
+ this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
423
423
  // @ts-ignore
424
424
  this.customHeader ?? null,
425
- ke({
425
+ ye({
426
426
  // @ts-ignore
427
427
  key: this.key,
428
428
  // @ts-ignore
@@ -514,7 +514,7 @@ const xe = (t) => new Z({
514
514
  skeleton: t.skeleton,
515
515
  columnCount: t.columnCount
516
516
  });
517
- class ve extends H {
517
+ class ve extends U {
518
518
  /**
519
519
  * Renders the DataTable component.
520
520
  *
@@ -523,11 +523,11 @@ class ve extends H {
523
523
  render() {
524
524
  const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
525
525
  return o({ class: "w-full flex flex-auto flex-col" }, [
526
- v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
526
+ S("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
527
527
  o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
528
528
  I({ class: "w-full" }, [
529
529
  // @ts-ignore
530
- this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
530
+ this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
531
531
  // @ts-ignore
532
532
  this.customHeader ?? null,
533
533
  xe({
@@ -566,7 +566,7 @@ class ve extends H {
566
566
  this.list.refresh();
567
567
  }
568
568
  }
569
- const lt = d((t) => new ve(
569
+ const bt = h((t) => new ve(
570
570
  {
571
571
  cache: t.cache ?? "list",
572
572
  tableData: t.data,
@@ -597,7 +597,7 @@ const lt = d((t) => new ve(
597
597
  skeleton: t.skeleton,
598
598
  columnCount: t.columnCount
599
599
  });
600
- class Se extends H {
600
+ class Se extends U {
601
601
  /**
602
602
  * Renders the DataTable component.
603
603
  *
@@ -606,11 +606,11 @@ class Se extends H {
606
606
  render() {
607
607
  const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
608
608
  return o({ class: "w-full flex flex-auto flex-col" }, [
609
- v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
609
+ S("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
610
610
  o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
611
611
  I({ class: "w-full" }, [
612
612
  // @ts-ignore
613
- this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
613
+ this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
614
614
  // @ts-ignore
615
615
  this.customHeader ?? null,
616
616
  De({
@@ -651,7 +651,7 @@ class Se extends H {
651
651
  this.list.refresh();
652
652
  }
653
653
  }
654
- const rt = d((t) => new Se(
654
+ const kt = h((t) => new Se(
655
655
  {
656
656
  cache: t.cache ?? "list",
657
657
  tableData: t.data,
@@ -669,45 +669,45 @@ const rt = d((t) => new Se(
669
669
  emptyState: t.emptyState,
670
670
  skeleton: t.skeleton
671
671
  }
672
- )), Ce = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
673
- p({ class: "text-base font-semibold leading-6 m-0" }, t),
674
- p({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
675
- ])), Ie = () => o({ class: "flex items-center gap-x-1.5" }, [
672
+ )), Ce = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
673
+ x({ class: "text-base font-semibold leading-6 m-0" }, t),
674
+ x({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
675
+ ])), Le = () => o({ class: "flex items-center gap-x-1.5" }, [
676
676
  o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
677
677
  o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
678
678
  ]),
679
- p({ class: "text-xs leading-5 text-gray-500" }, "Online")
680
- ]), Le = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
681
- D("Last seen "),
682
- q({ datetime: t }, "3h ago")
683
- ]), Te = (t, e) => t === "online" ? Ie() : Le(e), Be = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
684
- p({ class: "text-sm leading-6 m-0" }, t),
685
- Te(s, e)
686
- ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
679
+ x({ class: "text-xs leading-5 text-gray-500" }, "Online")
680
+ ]), Ie = (t) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
681
+ C("Last seen "),
682
+ X({ datetime: t }, "3h ago")
683
+ ]), Be = (t, e) => t === "online" ? Le() : Ie(e), Te = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
684
+ x({ class: "text-sm leading-6 m-0" }, t),
685
+ Be(s, e)
686
+ ])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Pe = h((t) => y({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
687
687
  o({ class: "flex min-w-0 gap-x-4" }, [
688
688
  oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
689
689
  Ce({ name: t.name, email: t.email })
690
690
  ]),
691
- Be({
691
+ Te({
692
692
  role: t.role,
693
693
  lastSeen: t.lastSeen,
694
694
  status: t.status
695
695
  })
696
- ])), ct = d((t) => new te({
696
+ ])), wt = h((t) => new te({
697
697
  cache: "list",
698
698
  key: "name",
699
699
  items: t.users,
700
700
  role: "list",
701
701
  class: "divide-y divide-border",
702
- rowItem: Re
703
- })), We = (t, e) => e.includes(t), Pe = (t, e, s) => t.exact ? s === e : We(e, s), Oe = ({ text: t, href: e, exact: s, hidden: a }) => new $({
702
+ rowItem: Pe
703
+ })), Re = (t, e) => e.includes(t), Oe = (t, e, s) => t.exact ? s === e : Re(e, s), We = ({ text: t, href: e, exact: s, hidden: a }) => new T({
704
704
  text: t,
705
705
  href: e,
706
706
  exact: s,
707
707
  dataSet: ["selected", ["state", !0, "active"]],
708
708
  class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
709
709
  });
710
- class dt extends u {
710
+ class yt extends c {
711
711
  /**
712
712
  * This will declare the props for the compiler.
713
713
  *
@@ -728,14 +728,14 @@ class dt extends u {
728
728
  * @returns {object}
729
729
  */
730
730
  render() {
731
- return C(
731
+ return m(
732
732
  { class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
733
733
  [
734
- w({
734
+ g({
735
735
  class: "flex gap-x-4",
736
736
  map: [this.options, (e) => this.addLink(e)],
737
737
  watch: {
738
- value: ["[[path]]", b.data],
738
+ value: ["[[path]]", k.data],
739
739
  callBack: this.updateLinks.bind(this)
740
740
  }
741
741
  })
@@ -748,7 +748,7 @@ class dt extends u {
748
748
  * @returns {void}
749
749
  */
750
750
  afterSetup() {
751
- const e = b.data.path;
751
+ const e = k.data.path;
752
752
  this.updateLinks(e);
753
753
  }
754
754
  /**
@@ -763,7 +763,7 @@ class dt extends u {
763
763
  for (const a of this.links) {
764
764
  if (!a.rendered)
765
765
  continue;
766
- Pe(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
766
+ Oe(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
767
767
  }
768
768
  !s && this.links[0] && this.updateLink(this.links[0], !0);
769
769
  }
@@ -793,7 +793,7 @@ class dt extends u {
793
793
  * @returns {object}
794
794
  */
795
795
  addLink({ label: e, href: s, exact: a, hidden: i }) {
796
- const n = Oe({ text: e, href: s, exact: a, hidden: i });
796
+ const n = We({ text: e, href: s, exact: a, hidden: i });
797
797
  return this.links.push(n), n;
798
798
  }
799
799
  /**
@@ -805,13 +805,13 @@ class dt extends u {
805
805
  this.links = [];
806
806
  }
807
807
  }
808
- const ht = d((t) => {
808
+ const xt = h((t) => {
809
809
  const e = t.margin || "m-4 ml-0";
810
810
  return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
811
- T({ variant: "back", class: "ghost", ...t })
811
+ M({ variant: "back", class: "ghost", ...t })
812
812
  ]);
813
813
  });
814
- class j extends u {
814
+ class j extends c {
815
815
  /**
816
816
  * This will declare the props for the compiler.
817
817
  *
@@ -904,7 +904,7 @@ N.addType("dockableOverlay", (t) => {
904
904
  const e = t.component;
905
905
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
906
906
  });
907
- class ut extends j {
907
+ class vt extends j {
908
908
  /**
909
909
  * This will stop presistence.
910
910
  *
@@ -1013,7 +1013,7 @@ class ut extends j {
1013
1013
  document.documentElement.style.overflowY = "auto";
1014
1014
  }
1015
1015
  }
1016
- class ft extends j {
1016
+ class Dt extends j {
1017
1017
  /**
1018
1018
  * This will get the overlay type.
1019
1019
  *
@@ -1032,7 +1032,7 @@ class ft extends j {
1032
1032
  this.container = e, this.initialize();
1033
1033
  }
1034
1034
  }
1035
- const ze = d(({ index: t, click: e, state: s }, a) => S({
1035
+ const $e = h(({ index: t, click: e, state: s }, a) => y({
1036
1036
  class: "p-2 cursor-pointer hover:bg-muted/50",
1037
1037
  onState: [
1038
1038
  [s, "selectedIndex", {
@@ -1041,10 +1041,10 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1041
1041
  }]
1042
1042
  ],
1043
1043
  click: () => e(t)
1044
- }, a)), $e = d(({ selectOption: t, state: e }) => w({
1044
+ }, a)), ze = h(({ selectOption: t, state: e }) => g({
1045
1045
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
1046
- for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
1047
- })), Ne = d((t) => o({ class: "relative flex items-center" }, [
1046
+ for: ["filteredOptions", (s, a) => $e({ index: a, click: t, state: e }, s.label)]
1047
+ })), Ne = h((t) => o({ class: "relative flex items-center" }, [
1048
1048
  ie({
1049
1049
  cache: "input",
1050
1050
  class: t.class ?? "",
@@ -1063,7 +1063,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1063
1063
  t.icon && o({ class: "absolute flex right-0 mr-2" }, [
1064
1064
  _(t.icon)
1065
1065
  ])
1066
- ])), He = (t) => o({
1066
+ ])), Ue = (t) => o({
1067
1067
  class: "relative flex fle-auto flex-col",
1068
1068
  onState: ["open", (e, s, a) => {
1069
1069
  if (e)
@@ -1073,10 +1073,10 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1073
1073
  button: a.input,
1074
1074
  size: "xl"
1075
1075
  }, [
1076
- $e(t)
1076
+ ze(t)
1077
1077
  ]);
1078
1078
  }]
1079
- }), mt = V(
1079
+ }), St = V(
1080
1080
  {
1081
1081
  /**
1082
1082
  * This will set up the data object.
@@ -1085,7 +1085,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1085
1085
  */
1086
1086
  setData() {
1087
1087
  const t = this.options || [];
1088
- return new L({
1088
+ return new B({
1089
1089
  options: t,
1090
1090
  filteredOptions: t
1091
1091
  });
@@ -1185,7 +1185,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1185
1185
  // @ts-ignore
1186
1186
  handleKeyDown: this.handleKeyDown.bind(this)
1187
1187
  }),
1188
- He({
1188
+ Ue({
1189
1189
  // @ts-ignore
1190
1190
  state: this.state,
1191
1191
  // @ts-ignore
@@ -1196,22 +1196,22 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
1196
1196
  ]);
1197
1197
  }
1198
1198
  }
1199
- ), je = (t) => S(
1199
+ ), je = (t) => y(
1200
1200
  {
1201
1201
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1202
1202
  dataSet: ["selected", ["state", t.value, "active"]]
1203
1203
  },
1204
1204
  [
1205
- x({
1205
+ w({
1206
1206
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
1207
1207
  onSet: ["selected", { selected: t.value }],
1208
1208
  click: (e) => t.callBack(t.value)
1209
1209
  }, t.label)
1210
1210
  ]
1211
- ), Ae = (t, e) => (t.callBack = e, je(t)), Ue = (t) => C({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1212
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ae(e, t.callBack)] })
1211
+ ), Ae = (t, e) => (t.callBack = e, je(t)), He = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1212
+ g({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ae(e, t.callBack)] })
1213
1213
  ]);
1214
- class gt extends u {
1214
+ class Ct extends c {
1215
1215
  /**
1216
1216
  * This will declare the props for the compiler.
1217
1217
  *
@@ -1228,12 +1228,12 @@ class gt extends u {
1228
1228
  render() {
1229
1229
  const e = this.select.bind(this);
1230
1230
  return o({ class: "" }, [
1231
- Ue({
1231
+ He({
1232
1232
  class: this.class,
1233
1233
  options: this.options,
1234
1234
  callBack: e
1235
1235
  }),
1236
- z({
1236
+ L({
1237
1237
  class: "tab-content",
1238
1238
  onState: ["selected", this.updateContent.bind(this)]
1239
1239
  })
@@ -1298,23 +1298,23 @@ class gt extends u {
1298
1298
  };
1299
1299
  }
1300
1300
  }
1301
- const Ye = (t) => S(
1301
+ const Ye = (t) => y(
1302
1302
  {
1303
1303
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1304
1304
  dataSet: ["selected", ["state", t.value, "active"]]
1305
1305
  },
1306
1306
  [
1307
- x({
1307
+ w({
1308
1308
  class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
1309
1309
  onSet: ["selected", { selected: t.value }],
1310
1310
  click: (e) => t.callBack(t.value),
1311
1311
  disabled: t.disabled
1312
1312
  }, t.label)
1313
1313
  ]
1314
- ), Fe = (t, e) => (t.callBack = e, Ye(t)), Ee = (t) => C({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1315
- w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1314
+ ), Fe = (t, e) => (t.callBack = e, Ye(t)), Ee = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1315
+ g({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
1316
1316
  ]);
1317
- class pt extends u {
1317
+ class Lt extends c {
1318
1318
  /**
1319
1319
  * This will declare the props for the compiler.
1320
1320
  *
@@ -1356,17 +1356,17 @@ class pt extends u {
1356
1356
  };
1357
1357
  }
1358
1358
  }
1359
- const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
1359
+ const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Ge = (t, e) => {
1360
1360
  const s = t.getLinkPath();
1361
1361
  return t.exact ? e === s : Qe(s, e);
1362
- }, qe = ({ text: t, href: e, exact: s }) => new $({
1362
+ }, Xe = ({ text: t, href: e, exact: s }) => new T({
1363
1363
  text: t,
1364
1364
  href: e,
1365
1365
  exact: s,
1366
1366
  dataSet: ["selected", ["state", !0, "active"]],
1367
1367
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm"
1368
1368
  });
1369
- class Ke extends u {
1369
+ class qe extends c {
1370
1370
  /**
1371
1371
  * This will declare the props for the compiler.
1372
1372
  *
@@ -1387,12 +1387,12 @@ class Ke extends u {
1387
1387
  * @returns {object}
1388
1388
  */
1389
1389
  render() {
1390
- return C({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1391
- w({
1390
+ return m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
1391
+ g({
1392
1392
  class: "flex flex-auto flex-row",
1393
1393
  map: [this.options, (e) => this.addLink(e)],
1394
1394
  watch: {
1395
- value: ["[[path]]", b.data],
1395
+ value: ["[[path]]", k.data],
1396
1396
  callBack: this.updateLinks.bind(this)
1397
1397
  }
1398
1398
  })
@@ -1404,7 +1404,7 @@ class Ke extends u {
1404
1404
  * @returns {void}
1405
1405
  */
1406
1406
  afterSetup() {
1407
- const e = b.data.path;
1407
+ const e = k.data.path;
1408
1408
  this.updateLinks(e);
1409
1409
  }
1410
1410
  /**
@@ -1417,7 +1417,7 @@ class Ke extends u {
1417
1417
  let s = !1, a = this.links[0];
1418
1418
  this.deactivateAllLinks();
1419
1419
  for (const i of this.links)
1420
- if (i.rendered !== !1 && (s = Xe(i, e), s === !0)) {
1420
+ if (i.rendered !== !1 && (s = Ge(i, e), s === !0)) {
1421
1421
  this.updateLink(i, !0);
1422
1422
  break;
1423
1423
  }
@@ -1449,7 +1449,7 @@ class Ke extends u {
1449
1449
  * @returns {object}
1450
1450
  */
1451
1451
  addLink({ label: e, href: s, exact: a }) {
1452
- const i = qe({ text: e, href: s, exact: a });
1452
+ const i = Xe({ text: e, href: s, exact: a });
1453
1453
  return this.links.push(i), i;
1454
1454
  }
1455
1455
  /**
@@ -1461,7 +1461,7 @@ class Ke extends u {
1461
1461
  this.links = [];
1462
1462
  }
1463
1463
  }
1464
- class wt extends u {
1464
+ class It extends c {
1465
1465
  /**
1466
1466
  * This will declare the props for the compiler.
1467
1467
  *
@@ -1477,11 +1477,11 @@ class wt extends u {
1477
1477
  */
1478
1478
  render() {
1479
1479
  return o({ class: "tab-panel" }, [
1480
- new Ke({
1480
+ new qe({
1481
1481
  class: this.class,
1482
1482
  options: this.options
1483
1483
  }),
1484
- z({
1484
+ L({
1485
1485
  class: "tab-content",
1486
1486
  switch: this.addGroup()
1487
1487
  })
@@ -1507,7 +1507,309 @@ class wt extends u {
1507
1507
  return s;
1508
1508
  }
1509
1509
  }
1510
- class Ge extends u {
1510
+ const Ke = (t) => y(
1511
+ {
1512
+ class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
1513
+ dataSet: ["selected", ["state", t.value, "active"]]
1514
+ },
1515
+ [
1516
+ w({
1517
+ class: "flex flex-auto justify-center items-center px-4 py-3",
1518
+ onSet: ["selected", { selected: t.value }],
1519
+ click: (e) => t.callBack(t.value)
1520
+ }, t.label)
1521
+ ]
1522
+ ), Ve = (t, e) => (t.callBack = e, Ke(t)), _e = (t) => m({ class: `border-b border-border ${t.class}` }, [
1523
+ g({ class: "flex flex-row items-center", map: [t.options, (e) => Ve(e, t.callBack)] })
1524
+ ]);
1525
+ class Bt extends c {
1526
+ /**
1527
+ * This will declare the props for the compiler.
1528
+ *
1529
+ * @returns {void}
1530
+ */
1531
+ declareProps() {
1532
+ this.options = [], this.class = "", this.onSelect = null;
1533
+ }
1534
+ /**
1535
+ * This will render the component.
1536
+ *
1537
+ * @returns {object}
1538
+ */
1539
+ render() {
1540
+ const e = this.select.bind(this);
1541
+ return o({ class: "underlined-button-tab-panel" }, [
1542
+ _e({
1543
+ class: this.class,
1544
+ options: this.options,
1545
+ callBack: e
1546
+ }),
1547
+ L({
1548
+ class: "tab-content pt-6",
1549
+ onState: ["selected", this.updateContent.bind(this)]
1550
+ })
1551
+ ]);
1552
+ }
1553
+ /**
1554
+ * This will get the first value.
1555
+ *
1556
+ * @returns {*}
1557
+ */
1558
+ getFirstValue() {
1559
+ return this.options[0]?.value;
1560
+ }
1561
+ /**
1562
+ * This will select an option.
1563
+ *
1564
+ * @param {*} value
1565
+ * @returns {void}
1566
+ */
1567
+ select(e) {
1568
+ this.state.selected = e;
1569
+ }
1570
+ /**
1571
+ * This will update the content.
1572
+ *
1573
+ * @param {*} value
1574
+ * @returns {object}
1575
+ */
1576
+ updateContent(e) {
1577
+ const s = this.options;
1578
+ if (!s || s.length < 1)
1579
+ return;
1580
+ const a = s[0];
1581
+ for (const i of s)
1582
+ if (i.value === e)
1583
+ return i.component;
1584
+ return a.component;
1585
+ }
1586
+ /**
1587
+ * This will setup the states.
1588
+ *
1589
+ * @returns {object}
1590
+ */
1591
+ setupStates() {
1592
+ const e = this.onSelect, s = typeof e;
1593
+ return {
1594
+ selected: {
1595
+ state: this.getFirstValue(),
1596
+ callBack(a) {
1597
+ s === "function" && e(a);
1598
+ }
1599
+ }
1600
+ };
1601
+ }
1602
+ }
1603
+ const Je = (t) => y(
1604
+ {
1605
+ class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
1606
+ dataSet: ["selected", ["state", t.value, "active"]]
1607
+ },
1608
+ [
1609
+ w({
1610
+ class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed",
1611
+ onSet: ["selected", { selected: t.value }],
1612
+ click: (e) => t.callBack(t.value),
1613
+ disabled: t.disabled
1614
+ }, t.label)
1615
+ ]
1616
+ ), Ze = (t, e) => (t.callBack = e, Je(t)), et = (t) => m({ class: `border-b border-border ${t.class}` }, [
1617
+ g({ class: "flex flex-row items-center", map: [t.options, (e) => Ze(e, t.callBack)] })
1618
+ ]);
1619
+ class Tt extends c {
1620
+ /**
1621
+ * This will declare the props for the compiler.
1622
+ *
1623
+ * @returns {void}
1624
+ */
1625
+ declareProps() {
1626
+ this.options = [], this.class = "", this.onSelect = null;
1627
+ }
1628
+ /**
1629
+ * This will render the component.
1630
+ *
1631
+ * @returns {object}
1632
+ */
1633
+ render() {
1634
+ const e = this.select.bind(this);
1635
+ return et({
1636
+ class: this.class,
1637
+ options: this.options,
1638
+ callBack: e
1639
+ });
1640
+ }
1641
+ /**
1642
+ * This will select an option.
1643
+ *
1644
+ * @param {*} value
1645
+ * @returns {void}
1646
+ */
1647
+ select(e) {
1648
+ this.state.selected = e, typeof this.onSelect == "function" && this.onSelect(e, this.parent);
1649
+ }
1650
+ /**
1651
+ * This will setup the states.
1652
+ *
1653
+ * @returns {object}
1654
+ */
1655
+ setupStates() {
1656
+ return {
1657
+ selected: this.options[0]?.value || null
1658
+ };
1659
+ }
1660
+ }
1661
+ const tt = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), st = (t, e) => {
1662
+ const s = t.getLinkPath();
1663
+ return t.exact ? e === s : tt(s, e);
1664
+ }, at = ({ text: t, href: e, exact: s }) => new T({
1665
+ text: t,
1666
+ href: e,
1667
+ exact: s,
1668
+ dataSet: ["selected", ["state", !0, "active"]],
1669
+ class: "relative inline-flex items-center justify-center whitespace-nowrap px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100"
1670
+ });
1671
+ class it extends c {
1672
+ /**
1673
+ * This will declare the props for the compiler.
1674
+ *
1675
+ * @returns {void}
1676
+ */
1677
+ declareProps() {
1678
+ this.options = [], this.class = "", this.onSelect = null;
1679
+ }
1680
+ /**
1681
+ * This will configure the links.
1682
+ */
1683
+ beforeSetup() {
1684
+ this.links = [];
1685
+ }
1686
+ /**
1687
+ * This will render the component.
1688
+ *
1689
+ * @returns {object}
1690
+ */
1691
+ render() {
1692
+ return m({ class: `border-b border-border ${this.class}` }, [
1693
+ g({
1694
+ class: "flex flex-row items-center",
1695
+ map: [this.options, (e) => this.addLink(e)],
1696
+ watch: {
1697
+ value: ["[[path]]", k.data],
1698
+ callBack: this.updateLinks.bind(this)
1699
+ }
1700
+ })
1701
+ ]);
1702
+ }
1703
+ /**
1704
+ * This will update the links.
1705
+ *
1706
+ * @returns {void}
1707
+ */
1708
+ afterSetup() {
1709
+ const e = k.data.path;
1710
+ this.updateLinks(e);
1711
+ }
1712
+ /**
1713
+ * This will update the links.
1714
+ *
1715
+ * @param {string} value
1716
+ * @returns {void}
1717
+ */
1718
+ updateLinks(e) {
1719
+ let s = !1, a = this.links[0];
1720
+ this.deactivateAllLinks();
1721
+ for (const i of this.links)
1722
+ if (i.rendered !== !1 && (s = st(i, e), s === !0)) {
1723
+ this.updateLink(i, !0);
1724
+ break;
1725
+ }
1726
+ s !== !0 && a && this.updateLink(a, !0);
1727
+ }
1728
+ /**
1729
+ * This will deactivate all links.
1730
+ *
1731
+ * @returns {void}
1732
+ */
1733
+ deactivateAllLinks() {
1734
+ for (const e of this.links)
1735
+ this.updateLink(e, !1);
1736
+ }
1737
+ /**
1738
+ * This will update the link.
1739
+ *
1740
+ * @param {object} link
1741
+ * @param {boolean} selected
1742
+ * @returns {void}
1743
+ */
1744
+ updateLink(e, s) {
1745
+ e.update(s);
1746
+ }
1747
+ /**
1748
+ * This will add a link.
1749
+ *
1750
+ * @param {object} option
1751
+ * @returns {object}
1752
+ */
1753
+ addLink({ label: e, href: s, exact: a }) {
1754
+ const i = at({ text: e, href: s, exact: a });
1755
+ return this.links.push(i), i;
1756
+ }
1757
+ /**
1758
+ * This will remove all the links.
1759
+ *
1760
+ * @returns {void}
1761
+ */
1762
+ beforeDestroy() {
1763
+ this.links = [];
1764
+ }
1765
+ }
1766
+ class Mt extends c {
1767
+ /**
1768
+ * This will declare the props for the compiler.
1769
+ *
1770
+ * @returns {void}
1771
+ */
1772
+ declareProps() {
1773
+ this.options = [], this.class = "";
1774
+ }
1775
+ /**
1776
+ * This will render the component.
1777
+ *
1778
+ * @returns {object}
1779
+ */
1780
+ render() {
1781
+ return o({ class: "underlined-tab-panel" }, [
1782
+ new it({
1783
+ class: this.class,
1784
+ options: this.options
1785
+ }),
1786
+ L({
1787
+ class: "tab-content pt-6",
1788
+ switch: this.addGroup()
1789
+ })
1790
+ ]);
1791
+ }
1792
+ /**
1793
+ * This will add the group.
1794
+ *
1795
+ * @returns {array}
1796
+ */
1797
+ addGroup() {
1798
+ let e;
1799
+ const s = [], a = this.options;
1800
+ for (let i = 0, n = a.length; i < n; i++)
1801
+ e = a[i], s.push(
1802
+ {
1803
+ uri: e.uri || e.href,
1804
+ component: e.component,
1805
+ title: e.title || null,
1806
+ persist: !0
1807
+ }
1808
+ );
1809
+ return s;
1810
+ }
1811
+ }
1812
+ class nt extends c {
1511
1813
  /**
1512
1814
  * Runs before rendering, sets up defaults, a timer for drawing,
1513
1815
  * and basic canvas properties.
@@ -1525,7 +1827,7 @@ class Ge extends u {
1525
1827
  * @returns {object} Layout definition for the canvas.
1526
1828
  */
1527
1829
  render() {
1528
- return K({
1830
+ return q({
1529
1831
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1530
1832
  });
1531
1833
  }
@@ -1578,8 +1880,8 @@ class Ge extends u {
1578
1880
  s = f.clientX, a = f.clientY;
1579
1881
  } else
1580
1882
  s = e.x || e.clientX, a = e.y || e.clientY;
1581
- const c = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
1582
- this.mouse.x = c, this.mouse.y = r;
1883
+ const d = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
1884
+ this.mouse.x = d, this.mouse.y = r;
1583
1885
  }
1584
1886
  /**
1585
1887
  * Called when the pointer goes down on the canvas.
@@ -1622,8 +1924,8 @@ class Ge extends u {
1622
1924
  const { canvas: e, ctx: s } = this, a = e.toDataURL();
1623
1925
  if (this.scale(), this.setupBackground(s), a !== "data:,") {
1624
1926
  const i = new globalThis.Image();
1625
- M.on("load", i, function n() {
1626
- s.drawImage(i, 0, 0), M.off("load", i, n);
1927
+ R.on("load", i, function n() {
1928
+ s.drawImage(i, 0, 0), R.off("load", i, n);
1627
1929
  }), i.src = a;
1628
1930
  }
1629
1931
  this.draw();
@@ -1643,7 +1945,7 @@ class Ge extends u {
1643
1945
  * @returns {void}
1644
1946
  */
1645
1947
  noScaleResize() {
1646
- const e = R.getSize(container);
1948
+ const e = O.getSize(container);
1647
1949
  this.width = canvas.width = e.width, this.height = canvas.height = e.height;
1648
1950
  }
1649
1951
  /**
@@ -1653,13 +1955,13 @@ class Ge extends u {
1653
1955
  * @returns {void}
1654
1956
  */
1655
1957
  scale() {
1656
- const e = this.canvas, s = this.container, a = R.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1657
- let c = n + "px", r = l + "px";
1958
+ const e = this.canvas, s = this.container, a = O.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1959
+ let d = n + "px", r = l + "px";
1658
1960
  if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1659
- const f = a.width, m = a.height, h = f / n, g = m / l, y = Math.min(h, g);
1660
- c = n * y + "px", r = l * y + "px";
1961
+ const f = a.width, p = a.height, u = f / n, b = p / l, v = Math.min(u, b);
1962
+ d = n * v + "px", r = l * v + "px";
1661
1963
  }
1662
- e.style.width = c, e.style.height = r;
1964
+ e.style.width = d, e.style.height = r;
1663
1965
  }
1664
1966
  /**
1665
1967
  * Main drawing loop. If the mouse is down, adds a line
@@ -1733,7 +2035,7 @@ class Ge extends u {
1733
2035
  this.timer.stop(), this.status = "stopped";
1734
2036
  }
1735
2037
  }
1736
- class yt extends u {
2038
+ class Pt extends c {
1737
2039
  /**
1738
2040
  * Sets up default properties for the signature panel.
1739
2041
  *
@@ -1756,13 +2058,13 @@ class yt extends u {
1756
2058
  bind: this.path + ".data"
1757
2059
  }),
1758
2060
  o({ class: "absolute top-2 right-2" }, [
1759
- T({
2061
+ M({
1760
2062
  variant: "icon",
1761
- icon: k.circleX,
2063
+ icon: D.circleX,
1762
2064
  click: this.reset.bind(this)
1763
2065
  })
1764
2066
  ]),
1765
- new Ge({
2067
+ new nt({
1766
2068
  cache: "canvasLayer",
1767
2069
  margin: this.margin,
1768
2070
  targetSize: this.targetSize,
@@ -1812,36 +2114,40 @@ class yt extends u {
1812
2114
  }
1813
2115
  }
1814
2116
  export {
1815
- ht as B,
1816
- ye as C,
1817
- ke as D,
1818
- be as H,
1819
- ft as I,
1820
- dt as N,
2117
+ xt as B,
2118
+ ke as C,
2119
+ ye as D,
2120
+ we as H,
2121
+ Dt as I,
2122
+ yt as N,
1821
2123
  j as O,
1822
- at as P,
1823
- rt as S,
1824
- B as T,
1825
- Re as U,
1826
- ot as W,
2124
+ ft as P,
2125
+ kt as S,
2126
+ P as T,
2127
+ Pe as U,
2128
+ pt as W,
1827
2129
  he as a,
1828
2130
  W as b,
1829
2131
  ce as c,
1830
- it as d,
1831
- nt as e,
2132
+ gt as d,
2133
+ mt as e,
1832
2134
  fe as f,
1833
2135
  de as g,
1834
- ge as h,
2136
+ me as h,
1835
2137
  pe as i,
1836
- H as j,
1837
- lt as k,
1838
- ct as l,
1839
- ut as m,
1840
- mt as n,
2138
+ U as j,
2139
+ bt as k,
2140
+ wt as l,
2141
+ vt as m,
2142
+ St as n,
1841
2143
  Ne as o,
1842
- gt as p,
1843
- pt as q,
1844
- Ke as r,
1845
- wt as s,
1846
- yt as t
2144
+ Ct as p,
2145
+ Lt as q,
2146
+ qe as r,
2147
+ It as s,
2148
+ Bt as t,
2149
+ Tt as u,
2150
+ it as v,
2151
+ Mt as w,
2152
+ Pt as x
1847
2153
  };