@bedard/hexboard 0.0.5 → 0.0.7

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.js CHANGED
@@ -1,44 +1,44 @@
1
- import { defineComponent as dt, createElementBlock as g, createCommentVNode as fe, openBlock as v, createStaticVNode as B, mergeModels as st, useModel as Y1, shallowRef as o1, useTemplateRef as xt, computed as j, onMounted as Mt, onUnmounted as zt, watch as lt, unref as f, normalizeStyle as d1, createElementVNode as Gt, Fragment as n1, renderList as i1, mergeProps as Pt, toDisplayString as Ut, createBlock as at, resolveDynamicComponent as ct, withModifiers as Ct, renderSlot as St, h as Tt } from "vue";
2
- import { Hexchess as ut, position as H, San as f1, isPromotionPosition as Et } from "@bedard/hexchess";
3
- function l(c, P, s) {
4
- return [c[0] + s * (P[0] - c[0]), c[1] + s * (P[1] - c[1])];
1
+ import { defineComponent as ao, createElementBlock as P, openBlock as b, createElementVNode as fo, toDisplayString as vo, mergeModels as so, useModel as Zt, shallowRef as et, useTemplateRef as Co, computed as z, onMounted as Eo, onUnmounted as $o, watch as ro, createCommentVNode as tt, unref as f, normalizeStyle as at, Fragment as ot, renderList as nt, mergeProps as Lo, createBlock as io, resolveDynamicComponent as uo, withModifiers as Bo, renderSlot as Mo, h as To } from "vue";
2
+ import { Hexchess as co, position as W, San as ft, isPromotionPosition as Fo } from "@bedard/hexchess";
3
+ function r(u, $, d) {
4
+ return [u[0] + d * ($[0] - u[0]), u[1] + d * ($[1] - u[1])];
5
5
  }
6
- function n(c) {
7
- return c.map(t);
6
+ function n(u) {
7
+ return u.map(t);
8
8
  }
9
- function e(c) {
9
+ function e(u) {
10
10
  return [
11
- x(c, -300, ae),
12
- x(c, 0, ae),
13
- x(c, -60, ae),
14
- x(c, -120, ae),
15
- x(c, -180, ae),
16
- x(c, -240, ae)
11
+ x(u, -300, ie),
12
+ x(u, 0, ie),
13
+ x(u, -60, ie),
14
+ x(u, -120, ie),
15
+ x(u, -180, ie),
16
+ x(u, -240, ie)
17
17
  ];
18
18
  }
19
- function x(c, P, s) {
20
- const K = Bt(P);
19
+ function x(u, $, d) {
20
+ const Q = Ro($);
21
21
  return [
22
- s * Math.cos(K) + c[0],
23
- s * Math.sin(K) + c[1]
22
+ d * Math.cos(Q) + u[0],
23
+ d * Math.sin(Q) + u[1]
24
24
  ];
25
25
  }
26
- function Bt(c) {
27
- return c * (Math.PI / 180);
26
+ function Ro(u) {
27
+ return u * (Math.PI / 180);
28
28
  }
29
- function t(c) {
30
- return [-c[0], -c[1]];
29
+ function t(u) {
30
+ return [-u[0], -u[1]];
31
31
  }
32
- function i(c, P) {
33
- return [c[0] + P[0], c[1] + P[1]];
32
+ function l(u, $) {
33
+ return [u[0] + $[0], u[1] + $[1]];
34
34
  }
35
- function pe(c) {
36
- return ve / 2 + c;
35
+ function fe(u) {
36
+ return ve / 2 + u;
37
37
  }
38
- function he(c) {
39
- return ve / 2 - c;
38
+ function de(u) {
39
+ return ve / 2 - u;
40
40
  }
41
- const ve = 23.6, $t = {
41
+ const ve = 23.6, So = {
42
42
  colors: [
43
43
  "oklch(0.9015 0.0729 70.7)",
44
44
  "oklch(0.8366 0.1165 66.29)",
@@ -57,133 +57,133 @@ const ve = 23.6, $t = {
57
57
  // red-500
58
58
  targetColor: "oklch(63.7% 0.237 25.331)"
59
59
  // red-500
60
- }, Lt = "b/qbk/n1b1n/r5r/ppppppppp/11/5P5/4P1P4/3P1B1P3/2P2B2P2/1PRNQBKNRP1 w - 0 1", a = 1.7, Q = 1.7, ae = 2 / Math.sqrt(3), w = ae * (Math.sqrt(3) / 2) * 2, k = w * 2, y = w * 3, M = w * 4, G = w * 5, m = [0, 0], F = x(m, 150, G), $ = x(m, 150, M), R = x(m, 150, y), L = x(m, 150, k), S = x(m, 150, w), T = x(m, 30, w), q = x(m, 30, k), N = x(m, 30, y), O = x(m, 30, M), W = x(m, 30, G), X = i(F, [0, -G]), Y = i($, [0, -G]), ge = i(R, [0, -G]), we = i(L, [0, -G]), me = i(S, [0, -G]), be = i(m, [0, -G]), ke = i(T, [0, -G]), ye = i(q, [0, -G]), xe = i(N, [0, -G]), Z = i(O, [0, -G]), J = i(W, [0, -G]), I = i(F, [0, -M]), _ = i($, [0, -M]), Me = i(R, [0, -M]), ze = i(L, [0, -M]), Ge = i(S, [0, -M]), Pe = i(m, [0, -M]), Ue = i(T, [0, -M]), Ce = i(q, [0, -M]), Se = i(N, [0, -M]), ee = i(O, [0, -M]), te = i(W, [0, -M]), Te = i(F, [0, -y]), Ee = i($, [0, -y]), p1 = i(R, [0, -y]), h1 = i(L, [0, -y]), v1 = i(S, [0, -y]), g1 = i(m, [0, -y]), w1 = i(T, [0, -y]), m1 = i(q, [0, -y]), b1 = i(N, [0, -y]), Be = i(O, [0, -y]), $e = i(W, [0, -y]), Le = i(F, [0, -k]), qe = i($, [0, -k]), k1 = i(R, [0, -k]), y1 = i(L, [0, -k]), x1 = i(S, [0, -k]), M1 = i(m, [0, -k]), z1 = i(T, [0, -k]), G1 = i(q, [0, -k]), P1 = i(N, [0, -k]), Oe = i(O, [0, -k]), je = i(W, [0, -k]), He = i(F, [0, -w]), Fe = i($, [0, -w]), U1 = i(R, [0, -w]), C1 = i(L, [0, -w]), S1 = i(S, [0, -w]), T1 = i(m, [0, -w]), E1 = i(T, [0, -w]), B1 = i(q, [0, -w]), $1 = i(N, [0, -w]), Re = i(O, [0, -w]), Ne = i(W, [0, -w]), We = i($, [0, w]), Ve = i(R, [0, w]), L1 = i(L, [0, w]), q1 = i(S, [0, w]), O1 = i(m, [0, w]), j1 = i(T, [0, w]), H1 = i(q, [0, w]), Ae = i(N, [0, w]), De = i(O, [0, w]), Ke = i(R, [0, k]), Qe = i(L, [0, k]), F1 = i(S, [0, k]), R1 = i(m, [0, k]), N1 = i(T, [0, k]), Xe = i(q, [0, k]), Ye = i(N, [0, k]), Ze = i(L, [0, y]), Je = i(S, [0, y]), W1 = i(m, [0, y]), Ie = i(T, [0, y]), _e = i(q, [0, y]), oe = i(S, [0, M]), ne = i(m, [0, M]), ie = i(T, [0, M]), re = i(m, [0, G]), o = [
61
- [2, re, t(re), e(re), n(e(re))],
62
- [1, oe, t(oe), e(oe), n(e(oe))],
63
- [0, ne, t(ne), e(ne), n(e(ne))],
64
- [1, ie, t(ie), e(ie), n(e(ie))],
60
+ }, qo = "b/qbk/n1b1n/r5r/ppppppppp/11/5P5/4P1P4/3P1B1P3/2P2B2P2/1PRNQBKNRP1 w - 0 1", i = 1.7, V = 1.7, ie = 2 / Math.sqrt(3), p = ie * (Math.sqrt(3) / 2) * 2, w = p * 2, y = p * 3, k = p * 4, E = p * 5, m = [0, 0], A = x(m, 150, E), R = x(m, 150, k), D = x(m, 150, y), S = x(m, 150, w), M = x(m, 150, p), T = x(m, 30, p), q = x(m, 30, w), H = x(m, 30, y), N = x(m, 30, k), O = x(m, 30, E), U = l(A, [0, -E]), Z = l(R, [0, -E]), he = l(D, [0, -E]), pe = l(S, [0, -E]), me = l(M, [0, -E]), ge = l(m, [0, -E]), we = l(T, [0, -E]), ye = l(q, [0, -E]), be = l(H, [0, -E]), j = l(N, [0, -E]), G = l(O, [0, -E]), J = l(A, [0, -k]), I = l(R, [0, -k]), xe = l(D, [0, -k]), ke = l(S, [0, -k]), Pe = l(M, [0, -k]), Ce = l(m, [0, -k]), Ee = l(T, [0, -k]), $e = l(q, [0, -k]), Le = l(H, [0, -k]), _ = l(N, [0, -k]), ee = l(O, [0, -k]), Be = l(A, [0, -y]), Me = l(R, [0, -y]), dt = l(D, [0, -y]), vt = l(S, [0, -y]), ht = l(M, [0, -y]), pt = l(m, [0, -y]), mt = l(T, [0, -y]), gt = l(q, [0, -y]), wt = l(H, [0, -y]), Te = l(N, [0, -y]), Fe = l(O, [0, -y]), Re = l(A, [0, -w]), Se = l(R, [0, -w]), yt = l(D, [0, -w]), bt = l(S, [0, -w]), xt = l(M, [0, -w]), kt = l(m, [0, -w]), Pt = l(T, [0, -w]), Ct = l(q, [0, -w]), Et = l(H, [0, -w]), qe = l(N, [0, -w]), Ne = l(O, [0, -w]), ze = l(A, [0, -p]), We = l(R, [0, -p]), $t = l(D, [0, -p]), Lt = l(S, [0, -p]), Bt = l(M, [0, -p]), Mt = l(m, [0, -p]), Tt = l(T, [0, -p]), Ft = l(q, [0, -p]), Rt = l(H, [0, -p]), Ae = l(N, [0, -p]), De = l(O, [0, -p]), He = l(R, [0, p]), Oe = l(D, [0, p]), St = l(S, [0, p]), qt = l(M, [0, p]), Nt = l(m, [0, p]), zt = l(T, [0, p]), Wt = l(q, [0, p]), Xe = l(H, [0, p]), Ye = l(N, [0, p]), Ke = l(D, [0, w]), Qe = l(S, [0, w]), At = l(M, [0, w]), Dt = l(m, [0, w]), Ht = l(T, [0, w]), Ve = l(q, [0, w]), Ue = l(H, [0, w]), Ze = l(S, [0, y]), je = l(M, [0, y]), Ot = l(m, [0, y]), Ge = l(T, [0, y]), Je = l(q, [0, y]), te = l(M, [0, k]), oe = l(m, [0, k]), ne = l(T, [0, k]), le = l(m, [0, E]), o = [
61
+ [2, le, t(le), e(le), n(e(le))],
62
+ [1, te, t(te), e(te), n(e(te))],
63
+ [0, oe, t(oe), e(oe), n(e(oe))],
64
+ [1, ne, t(ne), e(ne), n(e(ne))],
65
65
  [0, Ze, t(Ze), e(Ze), n(e(Ze))],
66
- [2, Je, t(Je), e(Je), n(e(Je))],
67
- [1, W1, t(W1), e(W1), n(e(W1))],
68
- [2, Ie, t(Ie), e(Ie), n(e(Ie))],
69
- [0, _e, t(_e), e(_e), n(e(_e))],
66
+ [2, je, t(je), e(je), n(e(je))],
67
+ [1, Ot, t(Ot), e(Ot), n(e(Ot))],
68
+ [2, Ge, t(Ge), e(Ge), n(e(Ge))],
69
+ [0, Je, t(Je), e(Je), n(e(Je))],
70
70
  [2, Ke, t(Ke), e(Ke), n(e(Ke))],
71
71
  [1, Qe, t(Qe), e(Qe), n(e(Qe))],
72
- [0, F1, t(F1), e(F1), n(e(F1))],
73
- [2, R1, t(R1), e(R1), n(e(R1))],
74
- [0, N1, t(N1), e(N1), n(e(N1))],
75
- [1, Xe, t(Xe), e(Xe), n(e(Xe))],
76
- [2, Ye, t(Ye), e(Ye), n(e(Ye))],
77
- [1, We, t(We), e(We), n(e(We))],
78
- [0, Ve, t(Ve), e(Ve), n(e(Ve))],
79
- [2, L1, t(L1), e(L1), n(e(L1))],
80
- [1, q1, t(q1), e(q1), n(e(q1))],
81
- [0, O1, t(O1), e(O1), n(e(O1))],
82
- [1, j1, t(j1), e(j1), n(e(j1))],
83
- [2, H1, t(H1), e(H1), n(e(H1))],
84
- [0, Ae, t(Ae), e(Ae), n(e(Ae))],
85
- [1, De, t(De), e(De), n(e(De))],
86
- [0, F, t(F), e(F), n(e(F))],
87
- [2, $, t($), e($), n(e($))],
88
- [1, R, t(R), e(R), n(e(R))],
89
- [0, L, t(L), e(L), n(e(L))],
90
- [2, S, t(S), e(S), n(e(S))],
72
+ [0, At, t(At), e(At), n(e(At))],
73
+ [2, Dt, t(Dt), e(Dt), n(e(Dt))],
74
+ [0, Ht, t(Ht), e(Ht), n(e(Ht))],
75
+ [1, Ve, t(Ve), e(Ve), n(e(Ve))],
76
+ [2, Ue, t(Ue), e(Ue), n(e(Ue))],
77
+ [1, He, t(He), e(He), n(e(He))],
78
+ [0, Oe, t(Oe), e(Oe), n(e(Oe))],
79
+ [2, St, t(St), e(St), n(e(St))],
80
+ [1, qt, t(qt), e(qt), n(e(qt))],
81
+ [0, Nt, t(Nt), e(Nt), n(e(Nt))],
82
+ [1, zt, t(zt), e(zt), n(e(zt))],
83
+ [2, Wt, t(Wt), e(Wt), n(e(Wt))],
84
+ [0, Xe, t(Xe), e(Xe), n(e(Xe))],
85
+ [1, Ye, t(Ye), e(Ye), n(e(Ye))],
86
+ [0, A, t(A), e(A), n(e(A))],
87
+ [2, R, t(R), e(R), n(e(R))],
88
+ [1, D, t(D), e(D), n(e(D))],
89
+ [0, S, t(S), e(S), n(e(S))],
90
+ [2, M, t(M), e(M), n(e(M))],
91
91
  [1, m, t(m), e(m), n(e(m))],
92
92
  [2, T, t(T), e(T), n(e(T))],
93
93
  [0, q, t(q), e(q), n(e(q))],
94
- [1, N, t(N), e(N), n(e(N))],
95
- [2, O, t(O), e(O), n(e(O))],
96
- [0, W, t(W), e(W), n(e(W))],
97
- [1, He, t(He), e(He), n(e(He))],
94
+ [1, H, t(H), e(H), n(e(H))],
95
+ [2, N, t(N), e(N), n(e(N))],
96
+ [0, O, t(O), e(O), n(e(O))],
97
+ [1, ze, t(ze), e(ze), n(e(ze))],
98
+ [0, We, t(We), e(We), n(e(We))],
99
+ [2, $t, t($t), e($t), n(e($t))],
100
+ [1, Lt, t(Lt), e(Lt), n(e(Lt))],
101
+ [0, Bt, t(Bt), e(Bt), n(e(Bt))],
102
+ [2, Mt, t(Mt), e(Mt), n(e(Mt))],
103
+ [0, Tt, t(Tt), e(Tt), n(e(Tt))],
104
+ [1, Ft, t(Ft), e(Ft), n(e(Ft))],
105
+ [2, Rt, t(Rt), e(Rt), n(e(Rt))],
106
+ [0, Ae, t(Ae), e(Ae), n(e(Ae))],
107
+ [1, De, t(De), e(De), n(e(De))],
108
+ [2, Re, t(Re), e(Re), n(e(Re))],
109
+ [1, Se, t(Se), e(Se), n(e(Se))],
110
+ [0, yt, t(yt), e(yt), n(e(yt))],
111
+ [2, bt, t(bt), e(bt), n(e(bt))],
112
+ [1, xt, t(xt), e(xt), n(e(xt))],
113
+ [0, kt, t(kt), e(kt), n(e(kt))],
114
+ [1, Pt, t(Pt), e(Pt), n(e(Pt))],
115
+ [2, Ct, t(Ct), e(Ct), n(e(Ct))],
116
+ [0, Et, t(Et), e(Et), n(e(Et))],
117
+ [1, qe, t(qe), e(qe), n(e(qe))],
118
+ [2, Ne, t(Ne), e(Ne), n(e(Ne))],
119
+ [0, Be, t(Be), e(Be), n(e(Be))],
120
+ [2, Me, t(Me), e(Me), n(e(Me))],
121
+ [1, dt, t(dt), e(dt), n(e(dt))],
122
+ [0, vt, t(vt), e(vt), n(e(vt))],
123
+ [2, ht, t(ht), e(ht), n(e(ht))],
124
+ [1, pt, t(pt), e(pt), n(e(pt))],
125
+ [2, mt, t(mt), e(mt), n(e(mt))],
126
+ [0, gt, t(gt), e(gt), n(e(gt))],
127
+ [1, wt, t(wt), e(wt), n(e(wt))],
128
+ [2, Te, t(Te), e(Te), n(e(Te))],
98
129
  [0, Fe, t(Fe), e(Fe), n(e(Fe))],
99
- [2, U1, t(U1), e(U1), n(e(U1))],
100
- [1, C1, t(C1), e(C1), n(e(C1))],
101
- [0, S1, t(S1), e(S1), n(e(S1))],
102
- [2, T1, t(T1), e(T1), n(e(T1))],
103
- [0, E1, t(E1), e(E1), n(e(E1))],
104
- [1, B1, t(B1), e(B1), n(e(B1))],
105
- [2, $1, t($1), e($1), n(e($1))],
106
- [0, Re, t(Re), e(Re), n(e(Re))],
107
- [1, Ne, t(Ne), e(Ne), n(e(Ne))],
130
+ [1, J, t(J), e(J), n(e(J))],
131
+ [0, I, t(I), e(I), n(e(I))],
132
+ [2, xe, t(xe), e(xe), n(e(xe))],
133
+ [1, ke, t(ke), e(ke), n(e(ke))],
134
+ [0, Pe, t(Pe), e(Pe), n(e(Pe))],
135
+ [2, Ce, t(Ce), e(Ce), n(e(Ce))],
136
+ [0, Ee, t(Ee), e(Ee), n(e(Ee))],
137
+ [1, $e, t($e), e($e), n(e($e))],
108
138
  [2, Le, t(Le), e(Le), n(e(Le))],
109
- [1, qe, t(qe), e(qe), n(e(qe))],
110
- [0, k1, t(k1), e(k1), n(e(k1))],
111
- [2, y1, t(y1), e(y1), n(e(y1))],
112
- [1, x1, t(x1), e(x1), n(e(x1))],
113
- [0, M1, t(M1), e(M1), n(e(M1))],
114
- [1, z1, t(z1), e(z1), n(e(z1))],
115
- [2, G1, t(G1), e(G1), n(e(G1))],
116
- [0, P1, t(P1), e(P1), n(e(P1))],
117
- [1, Oe, t(Oe), e(Oe), n(e(Oe))],
118
- [2, je, t(je), e(je), n(e(je))],
119
- [0, Te, t(Te), e(Te), n(e(Te))],
120
- [2, Ee, t(Ee), e(Ee), n(e(Ee))],
121
- [1, p1, t(p1), e(p1), n(e(p1))],
122
- [0, h1, t(h1), e(h1), n(e(h1))],
123
- [2, v1, t(v1), e(v1), n(e(v1))],
124
- [1, g1, t(g1), e(g1), n(e(g1))],
125
- [2, w1, t(w1), e(w1), n(e(w1))],
126
- [0, m1, t(m1), e(m1), n(e(m1))],
127
- [1, b1, t(b1), e(b1), n(e(b1))],
128
- [2, Be, t(Be), e(Be), n(e(Be))],
129
- [0, $e, t($e), e($e), n(e($e))],
130
- [1, I, t(I), e(I), n(e(I))],
131
139
  [0, _, t(_), e(_), n(e(_))],
132
- [2, Me, t(Me), e(Me), n(e(Me))],
133
- [1, ze, t(ze), e(ze), n(e(ze))],
134
- [0, Ge, t(Ge), e(Ge), n(e(Ge))],
135
- [2, Pe, t(Pe), e(Pe), n(e(Pe))],
136
- [0, Ue, t(Ue), e(Ue), n(e(Ue))],
137
- [1, Ce, t(Ce), e(Ce), n(e(Ce))],
138
- [2, Se, t(Se), e(Se), n(e(Se))],
139
- [0, ee, t(ee), e(ee), n(e(ee))],
140
- [1, te, t(te), e(te), n(e(te))],
141
- [2, X, t(X), e(X), n(e(X))],
142
- [1, Y, t(Y), e(Y), n(e(Y))],
143
- [0, ge, t(ge), e(ge), n(e(ge))],
144
- [2, we, t(we), e(we), n(e(we))],
140
+ [1, ee, t(ee), e(ee), n(e(ee))],
141
+ [2, U, t(U), e(U), n(e(U))],
142
+ [1, Z, t(Z), e(Z), n(e(Z))],
143
+ [0, he, t(he), e(he), n(e(he))],
144
+ [2, pe, t(pe), e(pe), n(e(pe))],
145
145
  [1, me, t(me), e(me), n(e(me))],
146
- [0, be, t(be), e(be), n(e(be))],
147
- [1, ke, t(ke), e(ke), n(e(ke))],
146
+ [0, ge, t(ge), e(ge), n(e(ge))],
147
+ [1, we, t(we), e(we), n(e(we))],
148
148
  [2, ye, t(ye), e(ye), n(e(ye))],
149
- [0, xe, t(xe), e(xe), n(e(xe))],
150
- [1, Z, t(Z), e(Z), n(e(Z))],
151
- [2, J, t(J), e(J), n(e(J))]
152
- ], qt = [
153
- ["11", l(ie, re, a), t(l(ie, re, a))],
154
- ["10", l(ne, oe, a), t(l(ne, oe, a))],
155
- ["9", l(Je, Ze, a), t(l(Je, Ze, a))],
156
- ["8", l(Qe, Ke, a), t(l(Qe, Ke, a))],
157
- ["7", l(Ve, We, a), t(l(Ve, We, a))],
158
- ["6", l($, F, a), t(l($, F, a))],
159
- ["5", l(Fe, He, a), t(l(Fe, He, a))],
160
- ["4", l(qe, Le, a), t(l(qe, Le, a))],
161
- ["3", l(Ee, Te, a), t(l(Ee, Te, a))],
162
- ["2", l(_, I, a), t(l(_, I, a))],
163
- ["1", l(Y, X, a), t(l(Y, X, a))],
164
- ["a", l(I, X, a), t(l(I, X, a))],
165
- ["b", l(_, Y, a), t(l(_, Y, a))],
166
- ["c", l(Me, ge, a), t(l(Me, ge, a))],
167
- ["d", l(ze, we, a), t(l(ze, we, a))],
168
- ["e", l(Ge, me, a), t(l(Ge, me, a))],
169
- ["f", l(Pe, be, a), t(l(Pe, be, a))],
170
- ["g", l(Ue, ke, a), t(l(Ue, ke, a))],
171
- ["h", l(Ce, ye, a), t(l(Ce, ye, a))],
172
- ["i", l(Se, xe, a), t(l(Se, xe, a))],
173
- ["k", l(ee, Z, a), t(l(ee, Z, a))],
174
- ["l", l(te, J, a), t(l(te, J, a))],
175
- ["1", l(Z, J, a), t(l(Z, J, a))],
176
- ["2", l(ee, te, a), t(l(ee, te, a))],
177
- ["3", l(Be, $e, a), t(l(Be, $e, a))],
178
- ["4", l(Oe, je, a), t(l(Oe, je, a))],
179
- ["5", l(Re, Ne, a), t(l(Re, Ne, a))],
180
- ["6", l(O, W, a), t(l(O, W, a))],
181
- ["7", l(Ae, De, a), t(l(Ae, De, a))],
182
- ["8", l(Xe, Ye, a), t(l(Xe, Ye, a))],
183
- ["9", l(Ie, _e, a), t(l(Ie, _e, a))],
184
- ["10", l(ne, ie, a), t(l(ne, ie, a))],
185
- ["11", l(oe, re, a), t(l(oe, re, a))]
186
- ], Ot = [
149
+ [0, be, t(be), e(be), n(e(be))],
150
+ [1, j, t(j), e(j), n(e(j))],
151
+ [2, G, t(G), e(G), n(e(G))]
152
+ ], No = [
153
+ ["11", r(ne, le, i), t(r(ne, le, i))],
154
+ ["10", r(oe, te, i), t(r(oe, te, i))],
155
+ ["9", r(je, Ze, i), t(r(je, Ze, i))],
156
+ ["8", r(Qe, Ke, i), t(r(Qe, Ke, i))],
157
+ ["7", r(Oe, He, i), t(r(Oe, He, i))],
158
+ ["6", r(R, A, i), t(r(R, A, i))],
159
+ ["5", r(We, ze, i), t(r(We, ze, i))],
160
+ ["4", r(Se, Re, i), t(r(Se, Re, i))],
161
+ ["3", r(Me, Be, i), t(r(Me, Be, i))],
162
+ ["2", r(I, J, i), t(r(I, J, i))],
163
+ ["1", r(Z, U, i), t(r(Z, U, i))],
164
+ ["a", r(J, U, i), t(r(J, U, i))],
165
+ ["b", r(I, Z, i), t(r(I, Z, i))],
166
+ ["c", r(xe, he, i), t(r(xe, he, i))],
167
+ ["d", r(ke, pe, i), t(r(ke, pe, i))],
168
+ ["e", r(Pe, me, i), t(r(Pe, me, i))],
169
+ ["f", r(Ce, ge, i), t(r(Ce, ge, i))],
170
+ ["g", r(Ee, we, i), t(r(Ee, we, i))],
171
+ ["h", r($e, ye, i), t(r($e, ye, i))],
172
+ ["i", r(Le, be, i), t(r(Le, be, i))],
173
+ ["k", r(_, j, i), t(r(_, j, i))],
174
+ ["l", r(ee, G, i), t(r(ee, G, i))],
175
+ ["1", r(j, G, i), t(r(j, G, i))],
176
+ ["2", r(_, ee, i), t(r(_, ee, i))],
177
+ ["3", r(Te, Fe, i), t(r(Te, Fe, i))],
178
+ ["4", r(qe, Ne, i), t(r(qe, Ne, i))],
179
+ ["5", r(Ae, De, i), t(r(Ae, De, i))],
180
+ ["6", r(N, O, i), t(r(N, O, i))],
181
+ ["7", r(Xe, Ye, i), t(r(Xe, Ye, i))],
182
+ ["8", r(Ve, Ue, i), t(r(Ve, Ue, i))],
183
+ ["9", r(Ge, Je, i), t(r(Ge, Je, i))],
184
+ ["10", r(oe, ne, i), t(r(oe, ne, i))],
185
+ ["11", r(te, le, i), t(r(te, le, i))]
186
+ ], zo = [
187
187
  o[
188
188
  0
189
189
  /* f11 */
@@ -557,111 +557,56 @@ const ve = 23.6, $t = {
557
557
  /* e10 */
558
558
  ][3][0]
559
559
  ];
560
- function V1(c) {
561
- if (c.length === 0)
560
+ function Xt(u) {
561
+ if (u.length === 0)
562
562
  return "";
563
- const [P, ...s] = c;
564
- let K = `M ${A1(pe(P[0]))} ${A1(he(P[1]))} L `;
565
- for (const E of s)
566
- K += `${A1(pe(E[0]))} ${A1(he(E[1]))} `;
567
- return `${K} Z`;
563
+ const [$, ...d] = u;
564
+ let Q = `M ${Yt(fe($[0]))} ${Yt(de($[1]))} L `;
565
+ for (const F of d)
566
+ Q += `${Yt(fe(F[0]))} ${Yt(de(F[1]))} `;
567
+ return `${Q} Z`;
568
568
  }
569
- function A1(c) {
570
- return c.toFixed(8);
569
+ function Yt(u) {
570
+ return u.toFixed(8);
571
571
  }
572
- const jt = {
573
- key: 0,
574
- xmlns: "http://www.w3.org/2000/svg",
575
- viewBox: "0 0 50 50"
576
- }, Ht = {
577
- key: 1,
578
- xmlns: "http://www.w3.org/2000/svg",
579
- viewBox: "0 0 50 50"
580
- }, Ft = {
581
- key: 2,
582
- xmlns: "http://www.w3.org/2000/svg",
583
- viewBox: "0 0 50 50"
584
- }, Rt = {
585
- key: 3,
586
- xmlns: "http://www.w3.org/2000/svg",
587
- viewBox: "0 0 50 50"
588
- }, Nt = {
589
- key: 4,
590
- xmlns: "http://www.w3.org/2000/svg",
591
- viewBox: "0 0 50 50"
592
- }, Wt = {
593
- key: 5,
594
- xmlns: "http://www.w3.org/2000/svg",
595
- viewBox: "0 0 50 50"
596
- }, Vt = {
597
- key: 6,
598
- xmlns: "http://www.w3.org/2000/svg",
599
- viewBox: "0 0 50 50"
600
- }, At = {
601
- key: 7,
602
- xmlns: "http://www.w3.org/2000/svg",
603
- viewBox: "0 0 50 50"
604
- }, Dt = {
605
- key: 8,
606
- xmlns: "http://www.w3.org/2000/svg",
607
- viewBox: "0 0 50 50"
608
- }, Kt = {
609
- key: 9,
610
- xmlns: "http://www.w3.org/2000/svg",
611
- viewBox: "0 0 50 50"
612
- }, Qt = {
613
- key: 10,
614
- xmlns: "http://www.w3.org/2000/svg",
615
- viewBox: "0 0 50 50"
616
- }, Xt = {
617
- key: 11,
618
- xmlns: "http://www.w3.org/2000/svg",
619
- viewBox: "0 0 50 50"
620
- }, Yt = /* @__PURE__ */ dt({
621
- __name: "Gioco",
572
+ const Wo = {
573
+ viewBox: "0 0 50 50",
574
+ xmlns: "http://www.w3.org/2000/svg"
575
+ }, Ao = ["textContent", "fill"], Do = /* @__PURE__ */ ao({
576
+ __name: "Letter",
622
577
  props: {
623
578
  type: {}
624
579
  },
625
- setup(c) {
626
- return (P, s) => c.type === "p" ? (v(), g("svg", jt, [...s[0] || (s[0] = [
627
- B('<defs><linearGradient id="gioco-a-bp" gradientTransform="matrix(.94331 0 0 1 615.66 493.37)" gradientUnits="userSpaceOnUse" x1="-639.4" x2="-612.91" y1="-465.15" y2="-465.15"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient></defs><path d="M25 12.264c-3.56 0-6.447 2.655-6.447 5.93 0 1.705.799 3.326 2.19 4.45h-1.666c-1.312 0-2.4.978-2.4 2.158v.438c0 1.18 1.088 2.157 2.4 2.157h2.376c0 7.293-9.342 6.457-8.689 16.78L25 44.167l12.236.008c.653-10.323-8.689-9.486-8.689-16.779h2.376c1.312 0 2.4-.978 2.4-2.157v-.438c0-1.18-1.087-2.157-2.4-2.157h-1.666c1.391-1.125 2.19-2.747 2.19-4.45 0-3.276-2.886-5.93-6.446-5.931z" fill="url(#gioco-a-bp)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.999 12.264c-.521 0-1.028.058-1.513.166 6.257.692 7.675 6.466 4.917 9.222-2.016 1.69-7.662.993-7.662.993 2.56.443 4.97 1.954 7.252 2.488-6.033 11.435 9.7 9.026 9.242 19.043.995-10.592-7.673-8.148-8.689-16.78h2.377c1.312 0 2.398-.977 2.398-2.156v-.438c0-1.18-1.086-2.158-2.398-2.158h-1.667c1.391-1.125 2.191-2.746 2.19-4.449 0-3.276-2.886-5.932-6.447-5.932z" opacity=".15"></path><path d="M22.959 13.401c-1.77 1.602-2.968 3.612-3.476 6.19 0 0-1.16-4.235 3.476-6.19zM13.342 43.419c.273-5.321 2.572-6.184 7.538-11.434-1.03 3.566-7.387 5.868-7.538 11.434z" fill="#fff" opacity=".25"></path>', 4)
628
- ])])) : c.type === "n" ? (v(), g("svg", Ht, [...s[1] || (s[1] = [
629
- B('<defs><linearGradient gradientTransform="matrix(1.0621 0 0 1.0589 -3487.5 459.63)" gradientUnits="userSpaceOnUse" x1="3295.1" x2="3321.5" xlink:href="#gioco-a-bn" id="gioco-b-bn" y1="-411.88" y2="-411.88"></linearGradient><linearGradient id="gioco-a-bn"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.24 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-bn" id="gioco-c-bn" y1="156.68" y2="156.68"></linearGradient></defs><path class="st28" d="m25.987 23.546-11.592 1.097-1.454-5.216 14.468-6.815 1.763-3.9 10.2 11.892-4.116 17.678H14.74c.245-11.292 9.64-8.1 11.247-14.736z" fill="url(#gioco-b-bn)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="m29.173 8.72-.879 1.945.426-.943c2.692 3.722 5.608 7.279 8.45 10.888l-5.285 17.671h3.372l4.117-17.671z" opacity=".15"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.748l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-bn)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M15.62 37.633c.159-4.472 2.145-6.971 8.667-9.837-.987 1.107-6.405 2.237-8.667 9.837zM14.418 21.67l-.523-1.803L28.03 13.21l1.217-2.764-.671 3.558-14.35 5.921z" fill="#fff" opacity=".25"></path>', 5)
630
- ])])) : c.type === "b" ? (v(), g("svg", Ft, [...s[2] || (s[2] = [
631
- B('<defs><linearGradient gradientTransform="matrix(1.019 0 0 1.0751 -3392.3 527.45)" gradientUnits="userSpaceOnUse" x1="3341.2" x2="3366.2" xlink:href="#gioco-a-bb" id="gioco-b-bb" y1="-469.28" y2="-469.28"></linearGradient><linearGradient id="gioco-a-bb"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.24 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-bb" id="gioco-c-bb" y1="156.68" y2="156.68"></linearGradient></defs><path d="M26.87 8.223c-5.797-2.298-6.952 2.527-4.668 5.86-9.898 10.6-11.253 16.425-6.195 24.204h17.99c6.084-6.912 2.558-14.515-4.823-22.3-2.883 4.119-3.274 7.35-3.946 11.131l-3.62-.071c-.66-6.006 7.622-15.14 5.261-18.823z" fill="url(#gioco-b-bb)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.933 7.654c-.625.02-.207.197-.771.567 0 .003.01.006.01.008 3.582-.311-2.369 11.772-3.394 18.894.536-3.014 1.325-5.68 3.082-8.725 2.003-4.351 4.237-8.681 3.008-10.169-.411-.38-1.144-.601-1.934-.575zm4.24 8.338c-.6.856-.517.67-.972 1.462 6.004 6.049 8.728 13.787 3.097 20.838h2.696c6.085-6.912 2.56-14.515-4.822-22.3z" opacity=".15"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-bb)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M14.895 34.327c-.716-1.396-3.266-6.812 4.513-15.739-2.1 4.86-5.958 8.69-4.513 15.739z" fill="#fff" opacity=".25"></path>', 5)
632
- ])])) : c.type === "r" ? (v(), g("svg", Rt, [...s[3] || (s[3] = [
633
- B('<defs><linearGradient gradientTransform="matrix(.23554 0 0 .25454 -3002.1 473.49)" gradientUnits="userSpaceOnUse" x1="12797" x2="12909" xlink:href="#gioco-a-br" id="gioco-b-br" y1="-1764.6" y2="-1764.6"></linearGradient><linearGradient id="gioco-a-br"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="translate(40.423 -.922)" gradientUnits="userSpaceOnUse" x1="-30.611" x2="-.235" xlink:href="#gioco-a-br" id="gioco-c-br" y1="42.165" y2="42.165"></linearGradient></defs><path d="M12.855 10.383v7.663c0 3.268 6.53 3.774 6.53 3.774-.352 9.864-5.036 16.486-5.036 16.486l21.428-.039s-4.651-6.62-5-16.446c0 0 6.896-.507 6.896-3.774v-7.663h-4.72s.459 2.25-.47 3.26c-1.035 1.126-2.418 1.126-3.454 0-.928-1.01-.47-3.26-.47-3.26h-6.59s.459 2.25-.47 3.26c-1.122 1.22-2.699 1.22-3.82 0-.929-1.01-.47-3.26-.47-3.26z" fill="url(#gioco-b-br)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="m37.543 10.462.014 7.585c.263 3.48-24.58 2.135-24.523 1.03 2.098 2.532 4.445 2.613 6.352 2.744 7.292.498 9.8 8.89 13.306 16.446h2.97s-4.65-6.62-5-16.446c2.547-.395 2.954-.812 4.037-1.058h.018l-.002-.004c1.023-.236 2.81-1.376 2.842-2.713v-7.663z" opacity=".15"></path><path d="M13.239 38.286c-1.437 0-2.627 1.216-2.627 2.685v.544l.013 2.685h28.75l.012-2.685v-.544c0-1.469-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-br)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.656 11.168v5.54c.48-1.867.299-4.088 1.554-5.54zM22.877 11.163c.055.896-.154 1.748-.269 2.616.48-1.866 1.823-2.616 1.823-2.616zM16.947 35.312c.875-1.143 3.603-10.333 3.233-13.244.7.39.658 10.057-3.233 13.244zM33.863 11.209c.005.598-.055 1.226-.187 2.02.48-1.867 1.295-2.04 1.295-2.04z" opacity=".25"></path></g>', 5)
634
- ])])) : c.type === "q" ? (v(), g("svg", Nt, [...s[4] || (s[4] = [
635
- B('<defs><linearGradient gradientTransform="translate(209.27 -109.27) scale(.31419)" gradientUnits="userSpaceOnUse" x1="-647.27" x2="-525.69" xlink:href="#gioco-a-bq" id="gioco-b-bq" y1="418.44" y2="418.44"></linearGradient><linearGradient id="gioco-a-bq"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.23 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-bq" id="gioco-c-bq" y1="156.68" y2="156.68"></linearGradient></defs><path d="M25 6.122c-2.635 0-4.771 2.098-4.771 4.685.002 1.855 1.118 3.534 2.846 4.283-.369 2.286-1.51 7.558-4.68 8.009-2.355.334-3.855-1.287-4.88-3.144a4.19 4.19 0 0 0 1.767-3.4c0-2.327-1.921-4.214-4.291-4.214S6.699 14.228 6.7 16.555c0 2.142 1.64 3.943 3.809 4.183l4.973 17.54h19.036l4.973-17.54c2.169-.24 3.807-2.041 3.809-4.183 0-2.327-1.922-4.214-4.292-4.214s-4.29 1.887-4.29 4.214a4.19 4.19 0 0 0 1.766 3.4c-1.025 1.857-2.525 3.478-4.88 3.144-3.17-.45-4.31-5.723-4.68-8.01 1.729-.748 2.845-2.427 2.847-4.282 0-2.587-2.136-4.685-4.77-4.685z" fill="url(#gioco-b-bq)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6"></path><path d="M39.002 12.342a4.348 4.348 0 0 0-1.567.296c4.741 1.678 3.877 6.805.591 7.316L30.414 38.28h4.2l4.87-17.541c2.17-.241 3.808-2.042 3.81-4.184 0-2.327-1.922-4.214-4.292-4.213z" opacity=".15"></path><path d="M13.227 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684H39.36l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-bq)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M9.515 13.489c-.794 1.17-1.726 2.667-1.554 4.779 0 0-1.604-3.01 1.554-4.779zM23.659 7.23c-.853.874-2.37 2.934-2.133 5.374-.207-.084-1.73-3.893 2.133-5.374zM12.062 23.328l5.244 14.111-1.17.023z" opacity=".25"></path></g>', 5)
636
- ])])) : c.type === "k" ? (v(), g("svg", Wt, [...s[5] || (s[5] = [
637
- B('<defs><linearGradient gradientTransform="matrix(.26458 0 0 .25357 227.43 -666.55)" gradientUnits="userSpaceOnUse" x1="-825.75" x2="-704.44" xlink:href="#gioco-a-bk" id="gioco-b-bk" y1="2712.8" y2="2712.8"></linearGradient><linearGradient id="gioco-a-bk"><stop offset="0" stop-color="#796c60"></stop><stop offset="1" stop-color="#4b403b"></stop></linearGradient><linearGradient gradientTransform="translate(225.05 -690.53)" gradientUnits="userSpaceOnUse" x1="-215.24" x2="-184.86" xlink:href="#gioco-a-bk" id="gioco-c-bk" y1="731.78" y2="731.78"></linearGradient></defs><path d="M25.006 3.868c-1.803.1-3.228 1.234-3.228 2.618 0 .565.244 1.644.693 2.097h-5.766v5.106h6.306l-2.61 2.833 2.673 2.167c-5.584.362-12.02 1.643-13.154 3.997-1.268 2.638 6.215 15.6 6.215 15.6h17.73s7.484-12.963 6.215-15.6c-1.133-2.357-7.594-3.64-13.179-3.999l2.71-2.165-2.61-2.833h6.306V8.583H27.54c.449-.453.693-1.531.693-2.097 0-1.384-1.425-2.518-3.228-2.618z" fill="url(#gioco-b-bk)" stroke="#1e1e1e" stroke-linejoin="round" stroke-width="1.6" style="paint-order:fill markers;"></path><path d="m31.289 38.283 2.573-.005s7.482-12.428 6.214-15.065c-4.136-3.824-13.18-4.525-13.18-4.525 11.05 2.822 12.618 5.028 4.393 19.595z" opacity=".15"></path><path d="M13.242 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-bk)" stroke="#1e1e1e" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.283 31.138s-3.074-6.555-2.666-8.092c.408-1.536 5.987-2.736 5.987-2.736-6.486 2.71-4.786 4.558-3.321 10.828zM17.521 12.884v-3.52l1.532-.011c-.891.007-1.532 2.147-1.532 3.531zM24.798 4.67s-2.614.92-1.53 3.522c-.178-.007-2.142-2.72 1.53-3.522z" opacity=".25"></path></g>', 5)
638
- ])])) : c.type === "P" ? (v(), g("svg", Vt, [...s[6] || (s[6] = [
639
- B('<defs><linearGradient id="gioco-a-wp" gradientTransform="matrix(.94331 0 0 1 615.66 493.37)" gradientUnits="userSpaceOnUse" x1="-639.4" x2="-612.91" y1="-465.15" y2="-465.15"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient></defs><path d="M25 12.264c-3.56 0-6.447 2.655-6.447 5.93 0 1.705.799 3.326 2.19 4.45h-1.666c-1.312 0-2.4.978-2.4 2.158v.438c0 1.18 1.088 2.157 2.4 2.157h2.376c0 7.293-9.342 6.457-8.689 16.78L25 44.167l12.236.008c.653-10.323-8.689-9.486-8.689-16.779h2.376c1.312 0 2.4-.978 2.4-2.157v-.438c0-1.18-1.087-2.157-2.4-2.157h-1.666c1.391-1.125 2.19-2.747 2.19-4.45 0-3.276-2.886-5.93-6.446-5.931z" fill="url(#gioco-a-wp)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.999 12.264c-.521 0-1.028.058-1.513.166 6.257.692 7.675 6.466 4.917 9.222-2.016 1.69-7.662.993-7.662.993 2.56.443 4.97 1.954 7.252 2.488-6.033 11.435 9.7 9.026 9.242 19.043.995-10.592-7.673-8.148-8.689-16.78h2.377c1.312 0 2.398-.977 2.398-2.156v-.438c0-1.18-1.086-2.158-2.398-2.158h-1.667c1.391-1.125 2.191-2.746 2.19-4.449 0-3.276-2.886-5.932-6.447-5.932z" opacity=".15"></path><path d="M22.959 13.401c-1.77 1.602-2.968 3.612-3.476 6.19 0 0-1.16-4.235 3.476-6.19zM13.342 43.419c.273-5.321 2.572-6.184 7.538-11.434-1.03 3.566-7.387 5.868-7.538 11.434z" fill="#fff"></path>', 4)
640
- ])])) : c.type === "N" ? (v(), g("svg", At, [...s[7] || (s[7] = [
641
- B('<defs><linearGradient gradientTransform="translate(474.35 493.34)" gradientUnits="userSpaceOnUse" x1="-462.21" x2="-434.18" xlink:href="#gioco-a-wn" id="gioco-b-wn" y1="-469.84" y2="-469.84"></linearGradient><linearGradient id="gioco-a-wn"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(474.35 493.34)" gradientUnits="userSpaceOnUse" x1="-464.54" x2="-434.16" xlink:href="#gioco-a-wn" id="gioco-c-wn" y1="-452.1" y2="-452.1"></linearGradient></defs><path class="st28" d="m25.987 23.546-11.592 1.097-1.454-5.216 14.468-6.815 1.763-3.9 10.2 11.892-4.116 17.678H14.74c.245-11.292 9.64-8.1 11.247-14.736z" fill="url(#gioco-b-wn)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="m29.173 8.72-.879 1.945.426-.943c2.692 3.722 5.608 7.279 8.45 10.888l-5.285 17.671h3.372l4.117-17.671z" opacity=".1"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.748l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-wn)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M15.62 37.633c.159-4.472 2.145-6.971 8.667-9.837-.987 1.107-6.405 2.237-8.667 9.837zM14.418 21.67l-.523-1.803L28.03 13.21l1.217-2.764-.671 3.558-14.35 5.921z" fill="#fff"></path>', 5)
642
- ])])) : c.type === "B" ? (v(), g("svg", Dt, [...s[8] || (s[8] = [
643
- B('<defs><linearGradient gradientTransform="matrix(1.019 0 0 1.0751 -3392.3 527.45)" gradientUnits="userSpaceOnUse" x1="3341.2" x2="3366.2" xlink:href="#gioco-a-wb" id="gioco-b-wb" y1="-469.26" y2="-469.26"></linearGradient><linearGradient id="gioco-a-wb"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="matrix(1.1509 0 0 1.1499 214.24 -138.92)" gradientUnits="userSpaceOnUse" x1="-177.63" x2="-151.24" xlink:href="#gioco-a-wb" id="gioco-c-wb" y1="156.68" y2="156.68"></linearGradient></defs><path d="M26.87 8.223c-5.797-2.298-6.952 2.527-4.668 5.86-9.898 10.6-11.253 16.425-6.195 24.204h17.99c6.084-6.912 2.558-14.515-4.823-22.3-2.883 4.119-3.274 7.35-3.946 11.131l-3.62-.071c-.66-6.006 7.622-15.14 5.261-18.823z" fill="url(#gioco-b-wb)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="M24.933 7.654c-.625.02-.207.197-.771.567 0 .003.01.006.01.008 3.582-.311-2.369 11.772-3.394 18.894.536-3.014 1.325-5.68 3.082-8.725 2.003-4.351 4.237-8.681 3.008-10.169-.411-.38-1.144-.601-1.934-.575zm4.24 8.338c-.6.856-.517.67-.972 1.462 6.004 6.049 8.728 13.787 3.097 20.838h2.696c6.085-6.912 2.56-14.515-4.822-22.3z" opacity=".1"></path><path d="M13.24 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-wb)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><path d="M14.895 34.327c-.716-1.396-3.266-6.812 4.513-15.739-2.1 4.86-5.958 8.69-4.513 15.739z" fill="#fff"></path>', 5)
644
- ])])) : c.type === "R" ? (v(), g("svg", Kt, [...s[9] || (s[9] = [
645
- B('<defs><linearGradient gradientTransform="translate(582.87 492.95)" gradientUnits="userSpaceOnUse" x1="-570.82" x2="-544.4" xlink:href="#gioco-a-wr" id="gioco-b-wr" y1="-468.61" y2="-468.61"></linearGradient><linearGradient id="gioco-a-wr"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(582.87 492.95)" gradientUnits="userSpaceOnUse" x1="-573.06" x2="-542.69" xlink:href="#gioco-a-wr" id="gioco-c-wr" y1="-451.71" y2="-451.71"></linearGradient></defs><path d="M12.855 10.383v7.663c0 3.268 6.53 3.774 6.53 3.774-.352 9.864-5.036 16.486-5.036 16.486l21.428-.039s-4.651-6.62-5-16.446c0 0 6.896-.507 6.896-3.774v-7.663h-4.72s.459 2.25-.47 3.26c-1.035 1.126-2.418 1.126-3.454 0-.928-1.01-.47-3.26-.47-3.26h-6.59s.459 2.25-.47 3.26c-1.122 1.22-2.699 1.22-3.82 0-.929-1.01-.47-3.26-.47-3.26z" fill="url(#gioco-b-wr)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="m37.543 10.462.014 7.585c.263 3.48-24.58 2.135-24.523 1.03 2.098 2.532 4.445 2.613 6.352 2.744 7.292.498 9.8 8.89 13.306 16.446h2.97s-4.65-6.62-5-16.446c2.547-.395 2.954-.812 4.037-1.058h.018l-.002-.004c1.023-.236 2.81-1.376 2.842-2.713v-7.663z" opacity=".1"></path><path d="M13.239 38.286c-1.437 0-2.627 1.216-2.627 2.685v.544l.013 2.685h28.75l.012-2.685v-.544c0-1.469-1.19-2.685-2.627-2.685H25z" fill="url(#gioco-c-wr)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.656 11.168v5.54c.48-1.867.299-4.088 1.554-5.54zM22.877 11.163c.055.896-.154 1.748-.269 2.616.48-1.866 1.823-2.616 1.823-2.616zM16.947 35.312c.875-1.143 3.603-10.333 3.233-13.244.7.39.658 10.057-3.233 13.244zM33.863 11.209c.005.598-.055 1.226-.187 2.02.48-1.867 1.295-2.04 1.295-2.04z"></path></g>', 5)
646
- ])])) : c.type === "Q" ? (v(), g("svg", Qt, [...s[10] || (s[10] = [
647
- B('<defs><linearGradient gradientTransform="translate(545.92 492.79)" gradientUnits="userSpaceOnUse" x1="-540.02" x2="-501.82" xlink:href="#gioco-a-wq" id="gioco-b-wq" y1="-470.59" y2="-470.59"></linearGradient><linearGradient id="gioco-a-wq"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(545.92 492.79)" gradientUnits="userSpaceOnUse" x1="-536.12" x2="-505.75" xlink:href="#gioco-a-wq" id="gioco-c-wq" y1="-451.55" y2="-451.55"></linearGradient></defs><path d="M25 6.122c-2.635 0-4.771 2.098-4.771 4.685.002 1.855 1.118 3.534 2.846 4.283-.369 2.286-1.51 7.558-4.68 8.009-2.355.334-3.855-1.287-4.88-3.144a4.19 4.19 0 0 0 1.767-3.4c0-2.327-1.921-4.214-4.291-4.214S6.699 14.228 6.7 16.555c0 2.142 1.64 3.943 3.809 4.183l4.973 17.54h19.036l4.973-17.54c2.169-.24 3.807-2.041 3.809-4.183 0-2.327-1.922-4.214-4.292-4.214s-4.29 1.887-4.29 4.214a4.19 4.19 0 0 0 1.766 3.4c-1.025 1.857-2.525 3.478-4.88 3.144-3.17-.45-4.31-5.723-4.68-8.01 1.729-.748 2.845-2.427 2.847-4.282 0-2.587-2.136-4.685-4.77-4.685z" fill="url(#gioco-b-wq)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6"></path><path d="M39.002 12.342a4.348 4.348 0 0 0-1.567.296c4.741 1.678 3.877 6.805.591 7.316L30.414 38.28h4.2l4.87-17.541c2.17-.241 3.808-2.042 3.81-4.184 0-2.327-1.922-4.214-4.292-4.213z" opacity=".1"></path><path d="M13.227 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684H39.36l.013-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-wq)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M9.515 13.489c-.794 1.17-1.726 2.667-1.554 4.779 0 0-1.604-3.01 1.554-4.779zM23.659 7.23c-.853.874-2.37 2.934-2.133 5.374-.207-.084-1.73-3.893 2.133-5.374zM12.062 23.328l5.244 14.111-1.17.023z"></path></g>', 5)
648
- ])])) : c.type === "K" ? (v(), g("svg", Xt, [...s[11] || (s[11] = [
649
- B('<defs><linearGradient gradientTransform="matrix(.26458 0 0 .25357 227.43 -666.55)" gradientUnits="userSpaceOnUse" x1="-825.75" x2="-704.44" xlink:href="#gioco-a-wk" id="gioco-b-wk" y1="2712.8" y2="2712.8"></linearGradient><linearGradient id="gioco-a-wk"><stop offset="0" stop-color="#fff"></stop><stop offset="1" stop-color="#bba38a"></stop></linearGradient><linearGradient gradientTransform="translate(225.05 -690.53)" gradientUnits="userSpaceOnUse" x1="-215.24" x2="-184.86" xlink:href="#gioco-a-wk" id="gioco-c-wk" y1="731.78" y2="731.78"></linearGradient></defs><path d="M25.006 3.868c-1.803.1-3.228 1.234-3.228 2.618 0 .565.244 1.644.693 2.097h-5.766v5.106h6.306l-2.61 2.833 2.673 2.167c-5.584.362-12.02 1.643-13.154 3.997-1.268 2.638 6.215 15.6 6.215 15.6h17.73s7.484-12.963 6.215-15.6c-1.133-2.357-7.594-3.64-13.179-3.999l2.71-2.165-2.61-2.833h6.306V8.583H27.54c.449-.453.693-1.531.693-2.097 0-1.384-1.425-2.518-3.228-2.618z" fill="url(#gioco-b-wk)" stroke="#323232" stroke-linejoin="round" stroke-width="1.6" style="paint-order:fill markers;"></path><path d="m31.289 38.283 2.573-.005s7.482-12.428 6.214-15.065c-4.136-3.824-13.18-4.525-13.18-4.525 11.05 2.822 12.618 5.028 4.393 19.595z" opacity=".1"></path><path d="M13.242 38.286c-1.437 0-2.627 1.216-2.627 2.685v.545l.013 2.684h28.749l.012-2.684v-.545c0-1.468-1.19-2.685-2.627-2.685h-11.76z" fill="url(#gioco-c-wk)" stroke="#323232" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.6"></path><g fill="#fff"><path d="M13.283 31.138s-3.074-6.555-2.666-8.092c.408-1.536 5.987-2.736 5.987-2.736-6.486 2.71-4.786 4.558-3.321 10.828zM17.521 12.884v-3.52l1.532-.011c-.891.007-1.532 2.147-1.532 3.531zM24.798 4.67s-2.614.92-1.53 3.522c-.178-.007-2.142-2.72 1.53-3.522z"></path></g>', 5)
650
- ])])) : fe("", !0);
580
+ setup(u) {
581
+ return ($, d) => (b(), P("svg", Wo, [
582
+ fo("text", {
583
+ textContent: vo(u.type),
584
+ "dominant-baseline": "middle",
585
+ "font-family": "sans-serif",
586
+ "font-size": "30",
587
+ "font-weight": "bold",
588
+ "text-anchor": "middle",
589
+ x: "25",
590
+ y: "27",
591
+ stroke: "oklch(37.3% 0.034 259.733)",
592
+ "stroke-width": "2",
593
+ fill: u.type === u.type.toLowerCase() ? "oklch(13% 0.028 261.692)" : "oklch(98.5% 0.002 247.839)"
594
+ }, null, 8, Ao)
595
+ ]));
651
596
  }
652
- }), Zt = ["viewBox"], Jt = ["d", "fill"], It = ["d", "data-hexboard-position", "data-testid", "fill"], _t = ["d", "data-testid", "fill"], e2 = ["d", "data-testid", "fill"], t2 = ["textContent", "data-testid", "x", "y"], o2 = ["cx", "cy", "data-testid", "fill"], n2 = ["viewBox"], s2 = /* @__PURE__ */ dt({
597
+ }), Ho = ["viewBox"], Oo = ["d", "fill"], Xo = ["d", "data-hexboard-position", "data-testid", "fill"], Yo = ["d", "data-testid", "fill"], Ko = ["d", "data-testid", "fill"], Qo = ["textContent", "data-testid", "x", "y"], Vo = ["cx", "cy", "data-testid", "fill"], Uo = ["viewBox"], Go = /* @__PURE__ */ ao({
653
598
  __name: "Hexboard",
654
- props: /* @__PURE__ */ st({
599
+ props: /* @__PURE__ */ so({
655
600
  active: { type: Boolean, default: !1 },
656
601
  autoselect: { type: Boolean, default: !1 },
657
602
  flipped: { type: Boolean, default: !1 },
658
- hexchess: { default: () => ut.init() },
603
+ hexchess: { default: () => co.init() },
659
604
  highlight: { default: () => [] },
660
605
  ignoreTurn: { type: Boolean, default: !1 },
661
606
  options: { default: () => ({}) },
662
- pieces: { default: () => Yt },
607
+ pieces: { default: () => Do },
663
608
  playing: { type: [String, Boolean], default: !1 },
664
- position: { default: Lt }
609
+ position: { default: qo }
665
610
  }, {
666
611
  "mouseover-position": {
667
612
  default: null,
@@ -679,212 +624,212 @@ const jt = {
679
624
  },
680
625
  targetsModifiers: {}
681
626
  }),
682
- emits: /* @__PURE__ */ st(["clickPosition", "move"], ["update:mouseover-position", "update:selected", "update:targets"]),
683
- setup(c, { emit: P }) {
684
- const s = c, K = P, E = Y1(c, "mouseover-position"), U = Y1(c, "selected"), V = Y1(c, "targets"), e1 = o1({ x: 0, y: 0 }), C = o1(null), ce = o1(se()), h = o1({
627
+ emits: /* @__PURE__ */ so(["clickPosition", "move"], ["update:mouseover-position", "update:selected", "update:targets"]),
628
+ setup(u, { emit: $ }) {
629
+ const d = u, Q = $, F = Zt(u, "mouseover-position"), L = Zt(u, "selected"), X = Zt(u, "targets"), Ie = et({ x: 0, y: 0 }), B = et(null), ue = et(se()), h = et({
685
630
  hexchess: null,
686
631
  promotionEl: null,
687
632
  promotionFrom: null,
688
633
  promotionTo: null,
689
634
  selected: null
690
- }), D1 = xt("svgEl"), A = o1(se());
691
- let K1 = !1;
692
- const ft = j(() => h.value.hexchess ? [] : V.value), ue = j(() => h.value.hexchess ? h.value.hexchess : s.hexchess ? s.hexchess : ut.init()), pt = j(() => ue.value.board.reduce(
693
- (r, d, u) => (d && u !== C.value && r.push({ piece: d, index: u }), r),
635
+ }), Kt = Co("svgEl"), Y = et(se());
636
+ let Qt = !1;
637
+ const ho = z(() => h.value.hexchess ? [] : X.value), ce = z(() => h.value.hexchess ? h.value.hexchess : d.hexchess ? d.hexchess : co.init()), po = z(() => ce.value.board.reduce(
638
+ (s, a, c) => (a && c !== B.value && s.push({ piece: a, index: c }), s),
694
639
  []
695
- )), r1 = j(() => typeof h.value.selected == "number" ? null : U.value), Z1 = j(() => {
696
- var r, d, u;
697
- if (Q1.value)
640
+ )), lt = z(() => typeof h.value.selected == "number" ? null : L.value), jt = z(() => {
641
+ var s, a, c;
642
+ if (Vt.value)
698
643
  return "grabbing";
699
- if (!(!s.active || E.value === null || h.value.hexchess)) {
700
- if (U.value !== null && V.value.includes(E.value)) {
701
- const p = (r = ue.value) == null ? void 0 : r.board[U.value];
702
- if (p) {
703
- const b = p === p.toLowerCase() ? "b" : "w", z = ((d = ue.value) == null ? void 0 : d.turn) === b;
704
- if ((s.playing === !0 || z) && a1(U.value))
644
+ if (!(!d.active || F.value === null || h.value.hexchess)) {
645
+ if (L.value !== null && X.value.includes(F.value)) {
646
+ const v = (s = ce.value) == null ? void 0 : s.board[L.value];
647
+ if (v) {
648
+ const g = v === v.toLowerCase() ? "b" : "w", C = ((a = ce.value) == null ? void 0 : a.turn) === g;
649
+ if ((d.playing === !0 || C) && it(L.value))
705
650
  return "pointer";
706
651
  }
707
652
  }
708
- if (s1.value)
709
- return s.playing === !0 || s.playing && I1.value === ((u = ue.value) == null ? void 0 : u.turn) && s.playing === I1.value ? "grab" : "pointer";
653
+ if (st.value)
654
+ return d.playing === !0 || d.playing && Jt.value === ((c = ce.value) == null ? void 0 : c.turn) && d.playing === Jt.value ? "grab" : "pointer";
710
655
  }
711
- }), J1 = j(() => ({
712
- x: e1.value.x - A.value.width / 2,
713
- y: e1.value.y - A.value.height / 2
714
- })), Q1 = j(() => !s.hexchess || h.value.hexchess || C.value === null ? null : s.hexchess.board[C.value]), D = j(() => ({ ...$t, ...s.options })), I1 = j(() => s1.value ? s1.value === s1.value.toLowerCase() ? "b" : "w" : null), s1 = j(() => {
715
- var r;
716
- return E.value === null ? null : ((r = ue.value) == null ? void 0 : r.board[E.value]) ?? null;
717
- }), l1 = j(() => {
718
- var p;
719
- const r = (p = h.value.hexchess) == null ? void 0 : p.board[h.value.selected ?? -1], d = r === (r == null ? void 0 : r.toUpperCase()), u = (b) => (z) => Tt(s.pieces, { ...z, type: b });
656
+ }), Gt = z(() => ({
657
+ x: Ie.value.x - Y.value.width / 2,
658
+ y: Ie.value.y - Y.value.height / 2
659
+ })), Vt = z(() => !d.hexchess || h.value.hexchess || B.value === null ? null : d.hexchess.board[B.value]), K = z(() => ({ ...So, ...d.options })), Jt = z(() => st.value ? st.value === st.value.toLowerCase() ? "b" : "w" : null), st = z(() => {
660
+ var s;
661
+ return F.value === null ? null : ((s = ce.value) == null ? void 0 : s.board[F.value]) ?? null;
662
+ }), rt = z(() => {
663
+ var v;
664
+ const s = (v = h.value.hexchess) == null ? void 0 : v.board[h.value.selected ?? -1], a = s === (s == null ? void 0 : s.toUpperCase()), c = (g) => (C) => To(d.pieces, { ...C, type: g });
720
665
  return {
721
- n: u(d ? "N" : "n"),
722
- b: u(d ? "B" : "b"),
723
- r: u(d ? "R" : "r"),
724
- q: u(d ? "Q" : "q")
666
+ n: c(a ? "N" : "n"),
667
+ b: c(a ? "B" : "b"),
668
+ r: c(a ? "R" : "r"),
669
+ q: c(a ? "Q" : "q")
725
670
  };
726
671
  });
727
- Mt(() => {
728
- s.active && _1();
729
- }), zt(rt), lt(Z1, (r) => {
672
+ Eo(() => {
673
+ d.active && It();
674
+ }), $o(lo), ro(jt, (s) => {
730
675
  document.body.style.setProperty(
731
676
  "cursor",
732
- r === "grabbing" ? "grabbing" : null
677
+ s === "grabbing" ? "grabbing" : null
733
678
  );
734
- }), lt(
735
- () => s.active,
736
- (r) => r ? _1() : rt()
679
+ }), ro(
680
+ () => d.active,
681
+ (s) => s ? It() : lo()
737
682
  );
738
- function X1(r, d) {
739
- var z, le;
740
- if (!V.value.includes(r.to))
683
+ function Ut(s, a) {
684
+ var C, re;
685
+ if (!X.value.includes(s.to))
741
686
  return;
742
- const u = (z = s.hexchess) == null ? void 0 : z.board[r.from];
743
- if (!u)
687
+ const c = (C = d.hexchess) == null ? void 0 : C.board[s.from];
688
+ if (!c)
744
689
  return;
745
- const p = u === u.toLowerCase() ? "b" : "w", b = ((le = s.hexchess) == null ? void 0 : le.turn) === p;
746
- if (s.hexchess && (u === "p" || u === "P") && Et(r.to, p)) {
747
- const de = s.hexchess.clone();
748
- de.board[r.from] = null, de.board[r.to] = u, h.value = {
749
- hexchess: de,
750
- promotionEl: (d == null ? void 0 : d.target) instanceof Element ? d.target : null,
751
- promotionFrom: r.from,
752
- promotionTo: r.to,
753
- selected: r.to
754
- }, (d == null ? void 0 : d.target) instanceof Element && (ce.value = d.target.getBoundingClientRect());
690
+ const v = c === c.toLowerCase() ? "b" : "w", g = ((re = d.hexchess) == null ? void 0 : re.turn) === v;
691
+ if (d.hexchess && (c === "p" || c === "P") && Fo(s.to, v)) {
692
+ const ae = d.hexchess.clone();
693
+ ae.board[s.from] = null, ae.board[s.to] = c, h.value = {
694
+ hexchess: ae,
695
+ promotionEl: (a == null ? void 0 : a.target) instanceof Element ? a.target : null,
696
+ promotionFrom: s.from,
697
+ promotionTo: s.to,
698
+ selected: s.to
699
+ }, (a == null ? void 0 : a.target) instanceof Element && (ue.value = a.target.getBoundingClientRect());
755
700
  return;
756
701
  }
757
- a1(r.from) && (s.ignoreTurn || b) && tt(r);
702
+ it(s.from) && (d.ignoreTurn || g) && eo(s);
758
703
  }
759
- function a1(r) {
760
- var p;
761
- const d = (p = s.hexchess) == null ? void 0 : p.board[r];
762
- if (!d)
704
+ function it(s) {
705
+ var v;
706
+ const a = (v = d.hexchess) == null ? void 0 : v.board[s];
707
+ if (!a)
763
708
  return !1;
764
- const u = d === d.toLowerCase() ? "b" : "w";
765
- return s.playing === !0 || s.playing === u;
709
+ const c = a === a.toLowerCase() ? "b" : "w";
710
+ return d.playing === !0 || d.playing === c;
766
711
  }
767
- function ht(r) {
768
- var d, u;
769
- return E.value === null ? D.value.labelColor : (d = H(E.value)) != null && d.startsWith(r) || (u = H(E.value)) != null && u.endsWith(r) ? D.value.labelActiveColor : D.value.labelInactiveColor;
712
+ function mo(s) {
713
+ var a, c;
714
+ return F.value === null ? K.value.labelColor : (a = W(F.value)) != null && a.startsWith(s) || (c = W(F.value)) != null && c.endsWith(s) ? K.value.labelActiveColor : K.value.labelInactiveColor;
770
715
  }
771
- function _1() {
772
- e1.value = { x: 0, y: 0 }, window.addEventListener("keyup", et), window.addEventListener("pointermove", ot), window.addEventListener("pointerup", it), window.addEventListener("resize", c1), window.addEventListener("scroll", c1), window.addEventListener("touchmove", nt, { passive: !1 });
716
+ function It() {
717
+ Ie.value = { x: 0, y: 0 }, window.addEventListener("keyup", _t), window.addEventListener("pointermove", to), window.addEventListener("pointerup", no), window.addEventListener("resize", ut), window.addEventListener("scroll", ut), window.addEventListener("touchmove", oo, { passive: !1 });
773
718
  }
774
- function c1() {
775
- var r;
776
- ce.value = ((r = h.value.promotionEl) == null ? void 0 : r.getBoundingClientRect()) ?? se();
719
+ function ut() {
720
+ var s;
721
+ ue.value = ((s = h.value.promotionEl) == null ? void 0 : s.getBoundingClientRect()) ?? se();
777
722
  }
778
- function vt(r, d) {
779
- if (s.active) {
780
- if (K1) {
781
- K1 = !1;
723
+ function go(s, a) {
724
+ if (d.active) {
725
+ if (Qt) {
726
+ Qt = !1;
782
727
  return;
783
728
  }
784
729
  if (h.value.hexchess) {
785
- h.value.selected !== r && t1();
730
+ h.value.selected !== s && _e();
786
731
  return;
787
732
  }
788
- if (U.value !== null && V.value.includes(r)) {
789
- const u = new f1({ from: U.value, to: r });
790
- X1(u, d);
733
+ if (L.value !== null && X.value.includes(s)) {
734
+ const c = new ft({ from: L.value, to: s });
735
+ Ut(c, a);
791
736
  return;
792
737
  }
793
- s.autoselect && !s.hexchess.board[r] && (U.value = null, V.value = []), K("clickPosition", r);
738
+ d.autoselect && !d.hexchess.board[s] && (L.value = null, X.value = []), Q("clickPosition", s);
794
739
  }
795
740
  }
796
- function et(r) {
797
- if (r.key === "Escape") {
741
+ function _t(s) {
742
+ if (s.key === "Escape") {
798
743
  if (h.value.hexchess) {
799
- t1();
744
+ _e();
800
745
  return;
801
746
  }
802
- s.autoselect && (U.value = null, V.value = []);
747
+ d.autoselect && (L.value = null, X.value = []);
803
748
  }
804
749
  }
805
- function tt(r) {
806
- K("move", r), u1();
750
+ function eo(s) {
751
+ Q("move", s), ct();
807
752
  }
808
- function gt(r, d) {
809
- var u;
810
- if (d.stopPropagation(), C.value !== null) {
811
- let p = r;
812
- const b = document.elementFromPoint(
813
- d.clientX,
814
- d.clientY
815
- ), z = b == null ? void 0 : b.getAttribute("data-hexboard-position");
816
- z !== null && (p = Number(z));
817
- const le = new f1({ from: C.value, to: p });
818
- if (X1(le, d), h.value.hexchess)
753
+ function wo(s, a) {
754
+ var c;
755
+ if (a.stopPropagation(), B.value !== null) {
756
+ let v = s;
757
+ const g = document.elementFromPoint(
758
+ a.clientX,
759
+ a.clientY
760
+ ), C = g == null ? void 0 : g.getAttribute("data-hexboard-position");
761
+ C !== null && (v = Number(C));
762
+ const re = new ft({ from: B.value, to: v });
763
+ if (Ut(re, a), h.value.hexchess)
819
764
  return;
820
- C.value = null, A.value = se();
765
+ B.value = null, Y.value = se();
821
766
  return;
822
767
  }
823
- if (U.value !== null && V.value.includes(r)) {
824
- const p = new f1({ from: U.value, to: r });
825
- return X1(p, d), h.value.hexchess, void 0;
768
+ if (L.value !== null && X.value.includes(s)) {
769
+ const v = new ft({ from: L.value, to: s });
770
+ return Ut(v, a), h.value.hexchess, void 0;
826
771
  }
827
772
  if (h.value.hexchess) {
828
- t1();
773
+ _e();
829
774
  return;
830
775
  }
831
- if ((u = s.hexchess) != null && u.board[r]) {
832
- C.value = null, A.value = se();
776
+ if ((c = d.hexchess) != null && c.board[s]) {
777
+ B.value = null, Y.value = se();
833
778
  return;
834
779
  }
835
- u1();
780
+ ct();
836
781
  }
837
- function t1() {
838
- const r = h.value.promotionFrom;
782
+ function _e() {
783
+ const s = h.value.promotionFrom;
839
784
  h.value = {
840
785
  hexchess: null,
841
786
  promotionEl: null,
842
787
  promotionFrom: null,
843
788
  promotionTo: null,
844
789
  selected: null
845
- }, typeof r == "number" && (U.value = r, V.value = s.hexchess.movesFrom(r).map((d) => d.to) ?? []), C.value = null, K1 = !0;
790
+ }, typeof s == "number" && (L.value = s, X.value = d.hexchess.movesFrom(s).map((a) => a.to) ?? []), B.value = null, Qt = !0;
846
791
  }
847
- function wt(r, d) {
848
- var z, le, de;
849
- if (d.preventDefault(), h.value.hexchess)
792
+ function yo(s, a) {
793
+ var C, re, ae;
794
+ if (a.preventDefault(), h.value.hexchess)
850
795
  return;
851
- const u = (z = s.hexchess) == null ? void 0 : z.board[r];
852
- if (!u || (s.autoselect && (U.value = r, V.value = ((le = s.hexchess) == null ? void 0 : le.movesFrom(r).map((yt) => yt.to)) ?? []), !a1(r)))
796
+ const c = (C = d.hexchess) == null ? void 0 : C.board[s];
797
+ if (!c || (d.autoselect && (L.value = s, X.value = ((re = d.hexchess) == null ? void 0 : re.movesFrom(s).map((Po) => Po.to)) ?? []), !it(s)))
853
798
  return;
854
- const p = u === u.toLowerCase() ? "b" : "w", b = ((de = s.hexchess) == null ? void 0 : de.turn) === p;
855
- !s.ignoreTurn && !b || (C.value = r, e1.value = { x: d.clientX, y: d.clientY }, D1.value instanceof Element && (A.value = D1.value.getBoundingClientRect()));
799
+ const v = c === c.toLowerCase() ? "b" : "w", g = ((ae = d.hexchess) == null ? void 0 : ae.turn) === v;
800
+ !d.ignoreTurn && !g || (B.value = s, Ie.value = { x: a.clientX, y: a.clientY }, Kt.value instanceof Element && (Y.value = Kt.value.getBoundingClientRect()));
856
801
  }
857
- function mt(r) {
858
- E.value = r;
802
+ function bo(s) {
803
+ F.value = s;
859
804
  }
860
- function bt() {
861
- E.value = null;
805
+ function xo() {
806
+ F.value = null;
862
807
  }
863
- function ot(r) {
864
- s.active && (e1.value = { x: r.clientX, y: r.clientY });
808
+ function to(s) {
809
+ d.active && (Ie.value = { x: s.clientX, y: s.clientY });
865
810
  }
866
- function nt(r) {
867
- C.value !== null && r.preventDefault();
811
+ function oo(s) {
812
+ B.value !== null && s.preventDefault();
868
813
  }
869
- function it() {
814
+ function no() {
870
815
  if (h.value.hexchess) {
871
- t1();
816
+ _e();
872
817
  return;
873
818
  }
874
- if (C.value !== null) {
875
- C.value = null, A.value = se();
819
+ if (B.value !== null) {
820
+ B.value = null, Y.value = se();
876
821
  return;
877
822
  }
878
- u1();
823
+ ct();
879
824
  }
880
- function kt(r) {
881
- if (typeof h.value.promotionFrom == "number" && a1(h.value.promotionFrom)) {
882
- const d = new f1({
825
+ function ko(s) {
826
+ if (typeof h.value.promotionFrom == "number" && it(h.value.promotionFrom)) {
827
+ const a = new ft({
883
828
  from: h.value.promotionFrom ?? 0,
884
829
  to: h.value.promotionTo ?? 0,
885
- promotion: r
830
+ promotion: s
886
831
  });
887
- tt(d);
832
+ eo(a);
888
833
  }
889
834
  }
890
835
  function se() {
@@ -899,150 +844,151 @@ const jt = {
899
844
  y: 0
900
845
  };
901
846
  }
902
- function u1() {
903
- document.body.style.setProperty("cursor", null), C.value = null, U.value = null, h.value = {
847
+ function ct() {
848
+ document.body.style.setProperty("cursor", null), B.value = null, L.value = null, h.value = {
904
849
  hexchess: null,
905
850
  promotionEl: null,
906
851
  promotionFrom: null,
907
852
  promotionTo: null,
908
853
  selected: null
909
- }, A.value = se(), V.value = [];
854
+ }, Y.value = se(), X.value = [];
910
855
  }
911
- function rt() {
912
- u1(), window.removeEventListener("keyup", et), window.removeEventListener("pointermove", ot), window.removeEventListener("pointerup", it), window.removeEventListener("resize", c1), window.removeEventListener("scroll", c1), window.removeEventListener("touchmove", nt);
856
+ function lo() {
857
+ ct(), window.removeEventListener("keyup", _t), window.removeEventListener("pointermove", to), window.removeEventListener("pointerup", no), window.removeEventListener("resize", ut), window.removeEventListener("scroll", ut), window.removeEventListener("touchmove", oo);
913
858
  }
914
- return (r, d) => (v(), g("div", null, [
915
- (v(), g("svg", {
859
+ return (s, a) => (b(), P("div", null, [
860
+ (b(), P("svg", {
916
861
  xmlns: "http://www.w3.org/2000/svg",
917
862
  ref_key: "svgEl",
918
- ref: D1,
919
- style: d1({ cursor: Z1.value }),
863
+ ref: Kt,
864
+ style: at({ cursor: jt.value }),
920
865
  viewBox: `0 0 ${f(ve)} ${f(ve)}`
921
866
  }, [
922
- Gt("path", {
923
- d: f(V1)(f(Ot)),
924
- fill: D.value.colors[1],
867
+ fo("path", {
868
+ d: f(Xt)(f(zo)),
869
+ fill: K.value.colors[1],
925
870
  style: { pointerEvents: "none" }
926
- }, null, 8, Jt),
927
- (v(!0), g(n1, null, i1(f(o), (u, p) => (v(), g("path", Pt(
871
+ }, null, 8, Oo),
872
+ (b(!0), P(ot, null, nt(f(o), (c, v) => (b(), P("path", Lo(
928
873
  { ref_for: !0 },
929
- c.active ? {
930
- onClick: (b) => vt(p, b),
931
- onMouseenter: () => mt(p),
932
- onMouseleave: () => bt(),
933
- onPointerdown: (b) => wt(p, b),
934
- onPointerup: (b) => gt(p, b)
874
+ u.active ? {
875
+ onClick: (g) => go(v, g),
876
+ onMouseenter: () => bo(v),
877
+ onMouseleave: () => xo(),
878
+ onPointerdown: (g) => yo(v, g),
879
+ onPointerup: (g) => wo(v, g)
935
880
  } : {},
936
881
  {
937
- d: f(V1)(c.flipped ? u[4] : u[3]),
938
- "data-hexboard-position": p,
939
- "data-testid": `position-${f(H)(p)}`,
940
- fill: D.value.colors[f(o)[p][0]],
941
- key: p
882
+ d: f(Xt)(u.flipped ? c[4] : c[3]),
883
+ "data-hexboard-position": v,
884
+ "data-testid": `position-${f(W)(v)}`,
885
+ fill: K.value.colors[f(o)[v][0]],
886
+ key: v
942
887
  }
943
- ), null, 16, It))), 128)),
944
- (v(!0), g(n1, null, i1(c.highlight, (u) => (v(), g("path", {
945
- d: f(V1)(c.flipped ? f(o)[u][4] : f(o)[u][3]),
946
- "data-testid": `highlight-${f(H)(u)}`,
947
- fill: D.value.highlightColor,
948
- key: `highlight-${u}`,
888
+ ), null, 16, Xo))), 128)),
889
+ (b(!0), P(ot, null, nt(u.highlight, (c) => (b(), P("path", {
890
+ d: f(Xt)(u.flipped ? f(o)[c][4] : f(o)[c][3]),
891
+ "data-testid": `highlight-${f(W)(c)}`,
892
+ fill: K.value.highlightColor,
893
+ key: `highlight-${c}`,
949
894
  style: { pointerEvents: "none" }
950
- }, null, 8, _t))), 128)),
951
- typeof r1.value == "number" ? (v(), g("path", {
895
+ }, null, 8, Yo))), 128)),
896
+ typeof lt.value == "number" ? (b(), P("path", {
952
897
  key: 0,
953
- d: f(V1)(c.flipped ? f(o)[r1.value][4] : f(o)[r1.value][3]),
954
- "data-testid": `selected-${f(H)(r1.value)}`,
955
- fill: D.value.selectedColor,
898
+ d: f(Xt)(u.flipped ? f(o)[lt.value][4] : f(o)[lt.value][3]),
899
+ "data-testid": `selected-${f(W)(lt.value)}`,
900
+ fill: K.value.selectedColor,
956
901
  ref: "selectedEl",
957
902
  style: { pointerEvents: "none" }
958
- }, null, 8, e2)) : fe("", !0),
959
- D.value.labels ? (v(!0), g(n1, { key: 1 }, i1(f(qt), ([u, p, b], z) => (v(), g("text", {
960
- textContent: Ut(u),
903
+ }, null, 8, Ko)) : tt("", !0),
904
+ K.value.labels ? (b(!0), P(ot, { key: 1 }, nt(f(No), ([c, v, g], C) => (b(), P("text", {
905
+ textContent: vo(c),
961
906
  "dominant-baseline": "central",
962
907
  "text-anchor": "middle",
963
- "data-testid": `label-${u}`,
964
- key: `label-${z}`,
965
- style: d1({
966
- fill: ht(u),
908
+ "data-testid": `label-${c}`,
909
+ key: `label-${C}`,
910
+ style: at({
911
+ fill: mo(c),
967
912
  fontSize: ".5px",
968
913
  pointerEvents: "none",
969
914
  userSelect: "none"
970
915
  }),
971
- x: f(pe)(c.flipped ? b[0] : p[0]),
972
- y: f(he)(c.flipped ? b[1] : p[1])
973
- }, null, 12, t2))), 128)) : fe("", !0),
974
- ue.value ? (v(!0), g(n1, { key: 2 }, i1(pt.value, ({ piece: u, index: p }) => (v(), at(ct(c.pieces), {
975
- "data-piece-type": u,
976
- "data-testid": `piece-${f(H)(p)}`,
977
- height: f(Q),
978
- key: `piece-${f(H)(p)}`,
916
+ x: f(fe)(u.flipped ? g[0] : v[0]),
917
+ y: f(de)(u.flipped ? g[1] : v[1])
918
+ }, null, 12, Qo))), 128)) : tt("", !0),
919
+ ce.value ? (b(!0), P(ot, { key: 2 }, nt(po.value, ({ piece: c, index: v }) => (b(), io(uo(u.pieces), {
920
+ "data-piece-type": c,
921
+ "data-testid": `piece-${f(W)(v)}`,
922
+ height: f(V),
923
+ key: `piece-${f(W)(v)}`,
979
924
  style: { pointerEvents: "none" },
980
- type: u,
981
- width: f(Q),
982
- x: f(pe)(f(o)[p][c.flipped ? 2 : 1][0] - f(Q) / 2),
983
- y: f(he)(f(o)[p][c.flipped ? 2 : 1][1] + f(Q) / 2)
984
- }, null, 8, ["data-piece-type", "data-testid", "height", "type", "width", "x", "y"]))), 128)) : fe("", !0),
985
- (v(!0), g(n1, null, i1(ft.value, (u) => (v(), g("circle", {
986
- cx: f(pe)(f(o)[u][c.flipped ? 2 : 1][0]),
987
- cy: f(he)(f(o)[u][c.flipped ? 2 : 1][1]),
988
- "data-testid": `target-${f(H)(u)}`,
989
- fill: D.value.targetColor,
990
- key: `target-${f(H)(u)}`,
925
+ type: c,
926
+ width: f(V),
927
+ x: f(fe)(f(o)[v][u.flipped ? 2 : 1][0] - f(V) / 2),
928
+ y: f(de)(f(o)[v][u.flipped ? 2 : 1][1] + f(V) / 2)
929
+ }, null, 8, ["data-piece-type", "data-testid", "height", "type", "width", "x", "y"]))), 128)) : tt("", !0),
930
+ (b(!0), P(ot, null, nt(ho.value, (c) => (b(), P("circle", {
931
+ cx: f(fe)(f(o)[c][u.flipped ? 2 : 1][0]),
932
+ cy: f(de)(f(o)[c][u.flipped ? 2 : 1][1]),
933
+ "data-testid": `target-${f(W)(c)}`,
934
+ fill: K.value.targetColor,
935
+ key: `target-${f(W)(c)}`,
991
936
  r: 0.3,
992
937
  style: { pointerEvents: "none" }
993
- }, null, 8, o2))), 128))
994
- ], 12, Zt)),
995
- Q1.value ? (v(), g("svg", {
938
+ }, null, 8, Vo))), 128))
939
+ ], 12, Ho)),
940
+ Vt.value ? (b(), P("svg", {
996
941
  key: 0,
997
942
  "data-testid": "drag-piece",
998
943
  xmlns: "http://www.w3.org/2000/svg",
999
- style: d1({
1000
- height: A.value.height + "px",
944
+ style: at({
945
+ height: Y.value.height + "px",
1001
946
  left: "0px",
1002
947
  pointerEvents: "none",
1003
948
  position: "fixed",
1004
949
  top: "0px",
1005
- transform: `translate(${J1.value.x}px, ${J1.value.y}px) scale(1.1)`,
1006
- width: A.value.width + "px",
950
+ transform: `translate(${Gt.value.x}px, ${Gt.value.y}px) scale(1.1)`,
951
+ width: Y.value.width + "px",
1007
952
  willChange: "transform"
1008
953
  }),
1009
954
  viewBox: `0 0 ${f(ve)} ${f(ve)}`
1010
955
  }, [
1011
- (v(), at(ct(c.pieces), {
1012
- height: f(Q),
956
+ (b(), io(uo(u.pieces), {
957
+ height: f(V),
1013
958
  style: { pointerEvents: "none" },
1014
- type: Q1.value,
1015
- width: f(Q),
1016
- x: f(pe)(f(Q) / -2),
1017
- y: f(he)(f(Q) / 2)
959
+ type: Vt.value,
960
+ width: f(V),
961
+ x: f(fe)(f(V) / -2),
962
+ y: f(de)(f(V) / 2)
1018
963
  }, null, 8, ["height", "type", "width", "x", "y"]))
1019
- ], 12, n2)) : fe("", !0),
1020
- typeof h.value.selected == "number" ? (v(), g("div", {
964
+ ], 12, Uo)) : tt("", !0),
965
+ typeof h.value.selected == "number" ? (b(), P("div", {
1021
966
  key: 1,
1022
- style: d1({
1023
- height: ce.value.height + "px",
1024
- left: ce.value.left + "px",
967
+ style: at({
968
+ height: ue.value.height + "px",
969
+ left: ue.value.left + "px",
1025
970
  position: "fixed",
1026
- top: ce.value.top + "px",
1027
- width: ce.value.width + "px"
971
+ top: ue.value.top + "px",
972
+ width: ue.value.width + "px"
1028
973
  }),
1029
- onPointerup: d[0] || (d[0] = Ct(() => {
974
+ onPointerup: a[0] || (a[0] = Bo(() => {
1030
975
  }, ["stop"]))
1031
976
  }, [
1032
- St(r.$slots, "promotion", {
1033
- b: l1.value.b,
1034
- cancel: t1,
1035
- file: f(H)(h.value.selected)[0],
1036
- n: l1.value.n,
1037
- promote: kt,
1038
- q: l1.value.q,
1039
- r: l1.value.r,
1040
- rank: Number(f(H)(h.value.selected).slice(1))
977
+ Mo(s.$slots, "promotion", {
978
+ b: rt.value.b,
979
+ cancel: _e,
980
+ file: f(W)(h.value.selected)[0],
981
+ n: rt.value.n,
982
+ promote: ko,
983
+ q: rt.value.q,
984
+ r: rt.value.r,
985
+ rank: Number(f(W)(h.value.selected).slice(1))
1041
986
  })
1042
- ], 36)) : fe("", !0)
987
+ ], 36)) : tt("", !0)
1043
988
  ]));
1044
989
  }
1045
990
  });
1046
991
  export {
1047
- s2 as Hexboard
992
+ Go as Hexboard,
993
+ So as defaultOptions
1048
994
  };