@bedard/hexboard 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.github/workflows/build.yml +65 -0
  2. package/.github/workflows/release.yml +0 -0
  3. package/.vscode/settings.json +5 -0
  4. package/LICENSE +21 -0
  5. package/README.md +8 -0
  6. package/dist/index.d.ts +127 -0
  7. package/dist/index.js +1056 -0
  8. package/eslint.config.js +85 -0
  9. package/index.html +22 -0
  10. package/package.json +58 -0
  11. package/src/lib/components/hexboard/Hexboard.vue +865 -0
  12. package/src/lib/components/hexboard/constants.ts +389 -0
  13. package/src/lib/components/hexboard/dom.ts +19 -0
  14. package/src/lib/components/hexboard/geometry.ts +59 -0
  15. package/src/lib/components/hexboard/haptics.ts +56 -0
  16. package/src/lib/components/hexboard/pieces/Celtic.vue +22 -0
  17. package/src/lib/components/hexboard/pieces/Fantasy.vue +22 -0
  18. package/src/lib/components/hexboard/pieces/Gioco.vue +22 -0
  19. package/src/lib/components/hexboard/pieces/Spatial.vue +22 -0
  20. package/src/lib/components/hexboard/pieces/index.ts +4 -0
  21. package/src/lib/components/hexboard/types.ts +28 -0
  22. package/src/lib/index.ts +1 -0
  23. package/src/sandbox/App.vue +28 -0
  24. package/src/sandbox/components/Button.vue +8 -0
  25. package/src/sandbox/components/icons/Github.vue +3 -0
  26. package/src/sandbox/components/icons/Menu.vue +3 -0
  27. package/src/sandbox/components/icons/X.vue +3 -0
  28. package/src/sandbox/index.ts +5 -0
  29. package/src/sandbox/tailwind.css +59 -0
  30. package/src/sandbox/views/HomeToolbar.vue +80 -0
  31. package/src/tests/example.test.tsx +18 -0
  32. package/src/tests/hexboard.test.tsx +832 -0
  33. package/src/tests/utils.ts +26 -0
  34. package/tsconfig.json +30 -0
  35. package/tsconfig.node.json +10 -0
  36. package/vite.config.ts +42 -0
  37. package/vite.sandbox.config.ts +21 -0
  38. package/vitest.config.ts +35 -0
package/dist/index.js ADDED
@@ -0,0 +1,1056 @@
1
+ import { defineComponent as dt, createElementBlock as g, createCommentVNode as de, openBlock as v, createStaticVNode as B, mergeModels as it, useModel as Q1, shallowRef as t1, useTemplateRef as xt, computed as j, onMounted as Mt, onUnmounted as zt, watch as rt, unref as f, normalizeStyle as u1, createElementVNode as Gt, Fragment as o1, renderList as n1, mergeProps as Pt, toDisplayString as Ut, createBlock as st, resolveDynamicComponent as lt, withModifiers as Ct, renderSlot as Et, h as Tt } from "vue";
2
+ import { Hexchess as at, position as R, San as d1, isPromotionPosition as St } from "@bedard/hexchess";
3
+ function a(s, x, l) {
4
+ return [s[0] + l * (x[0] - s[0]), s[1] + l * (x[1] - s[1])];
5
+ }
6
+ function n(s) {
7
+ return s.map(t);
8
+ }
9
+ function e(s) {
10
+ return [
11
+ M(s, -300, le),
12
+ M(s, 0, le),
13
+ M(s, -60, le),
14
+ M(s, -120, le),
15
+ M(s, -180, le),
16
+ M(s, -240, le)
17
+ ];
18
+ }
19
+ function M(s, x, l) {
20
+ const K = Bt(x);
21
+ return [
22
+ l * Math.cos(K) + s[0],
23
+ l * Math.sin(K) + s[1]
24
+ ];
25
+ }
26
+ function Bt(s) {
27
+ return s * (Math.PI / 180);
28
+ }
29
+ function t(s) {
30
+ return [-s[0], -s[1]];
31
+ }
32
+ function i(s, x) {
33
+ return [s[0] + x[0], s[1] + x[1]];
34
+ }
35
+ function fe(s) {
36
+ return he / 2 + s;
37
+ }
38
+ function pe(s) {
39
+ return he / 2 - s;
40
+ }
41
+ const he = 23.6, Ot = {
42
+ colors: [
43
+ "oklch(0.9015 0.0729 70.7)",
44
+ "oklch(0.8366 0.1165 66.29)",
45
+ "oklch(0.6806 0.1423 75.83)"
46
+ ],
47
+ haptics: !0,
48
+ highlightColor: "oklch(90.5% 0.182 98.111 / 75%)",
49
+ // yellow-300 / 75% opacity
50
+ labelActiveColor: "oklch(76.9% 0.188 70.08)",
51
+ // amber-500
52
+ labelColor: "oklch(55.4% 0.046 257.417)",
53
+ // slate-500
54
+ labelInactiveColor: "oklch(70.4% 0.04 256.788)",
55
+ // slate-400
56
+ labels: !0,
57
+ selectedColor: "oklch(63.7% 0.237 25.331)",
58
+ // red-500
59
+ targetColor: "oklch(63.7% 0.237 25.331)"
60
+ // red-500
61
+ }, $t = "b/qbk/n1b1n/r5r/ppppppppp/11/5P5/4P1P4/3P1B1P3/2P2B2P2/1PRNQBKNRP1 w - 0 1", c = 1.7, Q = 1.7, le = 2 / Math.sqrt(3), w = le * (Math.sqrt(3) / 2) * 2, k = w * 2, y = w * 3, z = w * 4, P = w * 5, m = [0, 0], H = M(m, 150, P), O = M(m, 150, z), F = M(m, 150, y), $ = M(m, 150, k), E = M(m, 150, w), T = M(m, 30, w), L = M(m, 30, k), D = M(m, 30, y), q = M(m, 30, z), N = M(m, 30, P), X = i(H, [0, -P]), Y = i(O, [0, -P]), ve = i(F, [0, -P]), ge = i($, [0, -P]), we = i(E, [0, -P]), me = i(m, [0, -P]), be = i(T, [0, -P]), ke = i(L, [0, -P]), ye = i(D, [0, -P]), Z = i(q, [0, -P]), J = i(N, [0, -P]), I = i(H, [0, -z]), _ = i(O, [0, -z]), xe = i(F, [0, -z]), Me = i($, [0, -z]), ze = i(E, [0, -z]), Ge = i(m, [0, -z]), Pe = i(T, [0, -z]), Ue = i(L, [0, -z]), Ce = i(D, [0, -z]), ee = i(q, [0, -z]), te = i(N, [0, -z]), Ee = i(H, [0, -y]), Te = i(O, [0, -y]), f1 = i(F, [0, -y]), p1 = i($, [0, -y]), h1 = i(E, [0, -y]), v1 = i(m, [0, -y]), g1 = i(T, [0, -y]), w1 = i(L, [0, -y]), m1 = i(D, [0, -y]), Se = i(q, [0, -y]), Be = i(N, [0, -y]), Oe = i(H, [0, -k]), $e = i(O, [0, -k]), b1 = i(F, [0, -k]), k1 = i($, [0, -k]), y1 = i(E, [0, -k]), x1 = i(m, [0, -k]), M1 = i(T, [0, -k]), z1 = i(L, [0, -k]), G1 = i(D, [0, -k]), Le = i(q, [0, -k]), qe = i(N, [0, -k]), je = i(H, [0, -w]), Re = i(O, [0, -w]), P1 = i(F, [0, -w]), U1 = i($, [0, -w]), C1 = i(E, [0, -w]), E1 = i(m, [0, -w]), T1 = i(T, [0, -w]), S1 = i(L, [0, -w]), B1 = i(D, [0, -w]), He = i(q, [0, -w]), Fe = i(N, [0, -w]), De = i(O, [0, w]), Ne = i(F, [0, w]), O1 = i($, [0, w]), $1 = i(E, [0, w]), L1 = i(m, [0, w]), q1 = i(T, [0, w]), j1 = i(L, [0, w]), We = i(D, [0, w]), Ae = i(q, [0, w]), Ve = i(F, [0, k]), Ke = i($, [0, k]), R1 = i(E, [0, k]), H1 = i(m, [0, k]), F1 = i(T, [0, k]), Qe = i(L, [0, k]), Xe = i(D, [0, k]), Ye = i($, [0, y]), Ze = i(E, [0, y]), D1 = i(m, [0, y]), Je = i(T, [0, y]), Ie = i(L, [0, y]), oe = i(E, [0, z]), ne = i(m, [0, z]), ie = i(T, [0, z]), re = i(m, [0, P]), o = [
62
+ [2, re, t(re), e(re), n(e(re))],
63
+ [1, oe, t(oe), e(oe), n(e(oe))],
64
+ [0, ne, t(ne), e(ne), n(e(ne))],
65
+ [1, ie, t(ie), e(ie), n(e(ie))],
66
+ [0, Ye, t(Ye), e(Ye), n(e(Ye))],
67
+ [2, Ze, t(Ze), e(Ze), n(e(Ze))],
68
+ [1, D1, t(D1), e(D1), n(e(D1))],
69
+ [2, Je, t(Je), e(Je), n(e(Je))],
70
+ [0, Ie, t(Ie), e(Ie), n(e(Ie))],
71
+ [2, Ve, t(Ve), e(Ve), n(e(Ve))],
72
+ [1, Ke, t(Ke), e(Ke), n(e(Ke))],
73
+ [0, R1, t(R1), e(R1), n(e(R1))],
74
+ [2, H1, t(H1), e(H1), n(e(H1))],
75
+ [0, F1, t(F1), e(F1), n(e(F1))],
76
+ [1, Qe, t(Qe), e(Qe), n(e(Qe))],
77
+ [2, Xe, t(Xe), e(Xe), n(e(Xe))],
78
+ [1, De, t(De), e(De), n(e(De))],
79
+ [0, Ne, t(Ne), e(Ne), n(e(Ne))],
80
+ [2, O1, t(O1), e(O1), n(e(O1))],
81
+ [1, $1, t($1), e($1), n(e($1))],
82
+ [0, L1, t(L1), e(L1), n(e(L1))],
83
+ [1, q1, t(q1), e(q1), n(e(q1))],
84
+ [2, j1, t(j1), e(j1), n(e(j1))],
85
+ [0, We, t(We), e(We), n(e(We))],
86
+ [1, Ae, t(Ae), e(Ae), n(e(Ae))],
87
+ [0, H, t(H), e(H), n(e(H))],
88
+ [2, O, t(O), e(O), n(e(O))],
89
+ [1, F, t(F), e(F), n(e(F))],
90
+ [0, $, t($), e($), n(e($))],
91
+ [2, E, t(E), e(E), n(e(E))],
92
+ [1, m, t(m), e(m), n(e(m))],
93
+ [2, T, t(T), e(T), n(e(T))],
94
+ [0, L, t(L), e(L), n(e(L))],
95
+ [1, D, t(D), e(D), n(e(D))],
96
+ [2, q, t(q), e(q), n(e(q))],
97
+ [0, N, t(N), e(N), n(e(N))],
98
+ [1, je, t(je), e(je), n(e(je))],
99
+ [0, Re, t(Re), e(Re), n(e(Re))],
100
+ [2, P1, t(P1), e(P1), n(e(P1))],
101
+ [1, U1, t(U1), e(U1), n(e(U1))],
102
+ [0, C1, t(C1), e(C1), n(e(C1))],
103
+ [2, E1, t(E1), e(E1), n(e(E1))],
104
+ [0, T1, t(T1), e(T1), n(e(T1))],
105
+ [1, S1, t(S1), e(S1), n(e(S1))],
106
+ [2, B1, t(B1), e(B1), n(e(B1))],
107
+ [0, He, t(He), e(He), n(e(He))],
108
+ [1, Fe, t(Fe), e(Fe), n(e(Fe))],
109
+ [2, Oe, t(Oe), e(Oe), n(e(Oe))],
110
+ [1, $e, t($e), e($e), n(e($e))],
111
+ [0, b1, t(b1), e(b1), n(e(b1))],
112
+ [2, k1, t(k1), e(k1), n(e(k1))],
113
+ [1, y1, t(y1), e(y1), n(e(y1))],
114
+ [0, x1, t(x1), e(x1), n(e(x1))],
115
+ [1, M1, t(M1), e(M1), n(e(M1))],
116
+ [2, z1, t(z1), e(z1), n(e(z1))],
117
+ [0, G1, t(G1), e(G1), n(e(G1))],
118
+ [1, Le, t(Le), e(Le), n(e(Le))],
119
+ [2, qe, t(qe), e(qe), n(e(qe))],
120
+ [0, Ee, t(Ee), e(Ee), n(e(Ee))],
121
+ [2, Te, t(Te), e(Te), n(e(Te))],
122
+ [1, f1, t(f1), e(f1), n(e(f1))],
123
+ [0, p1, t(p1), e(p1), n(e(p1))],
124
+ [2, h1, t(h1), e(h1), n(e(h1))],
125
+ [1, v1, t(v1), e(v1), n(e(v1))],
126
+ [2, g1, t(g1), e(g1), n(e(g1))],
127
+ [0, w1, t(w1), e(w1), n(e(w1))],
128
+ [1, m1, t(m1), e(m1), n(e(m1))],
129
+ [2, Se, t(Se), e(Se), n(e(Se))],
130
+ [0, Be, t(Be), e(Be), n(e(Be))],
131
+ [1, I, t(I), e(I), n(e(I))],
132
+ [0, _, t(_), e(_), n(e(_))],
133
+ [2, xe, t(xe), e(xe), n(e(xe))],
134
+ [1, Me, t(Me), e(Me), n(e(Me))],
135
+ [0, ze, t(ze), e(ze), n(e(ze))],
136
+ [2, Ge, t(Ge), e(Ge), n(e(Ge))],
137
+ [0, Pe, t(Pe), e(Pe), n(e(Pe))],
138
+ [1, Ue, t(Ue), e(Ue), n(e(Ue))],
139
+ [2, Ce, t(Ce), e(Ce), n(e(Ce))],
140
+ [0, ee, t(ee), e(ee), n(e(ee))],
141
+ [1, te, t(te), e(te), n(e(te))],
142
+ [2, X, t(X), e(X), n(e(X))],
143
+ [1, Y, t(Y), e(Y), n(e(Y))],
144
+ [0, ve, t(ve), e(ve), n(e(ve))],
145
+ [2, ge, t(ge), e(ge), n(e(ge))],
146
+ [1, we, t(we), e(we), n(e(we))],
147
+ [0, me, t(me), e(me), n(e(me))],
148
+ [1, be, t(be), e(be), n(e(be))],
149
+ [2, ke, t(ke), e(ke), n(e(ke))],
150
+ [0, ye, t(ye), e(ye), n(e(ye))],
151
+ [1, Z, t(Z), e(Z), n(e(Z))],
152
+ [2, J, t(J), e(J), n(e(J))]
153
+ ], Lt = [
154
+ ["11", a(ie, re, c), t(a(ie, re, c))],
155
+ ["10", a(ne, oe, c), t(a(ne, oe, c))],
156
+ ["9", a(Ze, Ye, c), t(a(Ze, Ye, c))],
157
+ ["8", a(Ke, Ve, c), t(a(Ke, Ve, c))],
158
+ ["7", a(Ne, De, c), t(a(Ne, De, c))],
159
+ ["6", a(O, H, c), t(a(O, H, c))],
160
+ ["5", a(Re, je, c), t(a(Re, je, c))],
161
+ ["4", a($e, Oe, c), t(a($e, Oe, c))],
162
+ ["3", a(Te, Ee, c), t(a(Te, Ee, c))],
163
+ ["2", a(_, I, c), t(a(_, I, c))],
164
+ ["1", a(Y, X, c), t(a(Y, X, c))],
165
+ ["a", a(I, X, c), t(a(I, X, c))],
166
+ ["b", a(_, Y, c), t(a(_, Y, c))],
167
+ ["c", a(xe, ve, c), t(a(xe, ve, c))],
168
+ ["d", a(Me, ge, c), t(a(Me, ge, c))],
169
+ ["e", a(ze, we, c), t(a(ze, we, c))],
170
+ ["f", a(Ge, me, c), t(a(Ge, me, c))],
171
+ ["g", a(Pe, be, c), t(a(Pe, be, c))],
172
+ ["h", a(Ue, ke, c), t(a(Ue, ke, c))],
173
+ ["i", a(Ce, ye, c), t(a(Ce, ye, c))],
174
+ ["k", a(ee, Z, c), t(a(ee, Z, c))],
175
+ ["l", a(te, J, c), t(a(te, J, c))],
176
+ ["1", a(Z, J, c), t(a(Z, J, c))],
177
+ ["2", a(ee, te, c), t(a(ee, te, c))],
178
+ ["3", a(Se, Be, c), t(a(Se, Be, c))],
179
+ ["4", a(Le, qe, c), t(a(Le, qe, c))],
180
+ ["5", a(He, Fe, c), t(a(He, Fe, c))],
181
+ ["6", a(q, N, c), t(a(q, N, c))],
182
+ ["7", a(We, Ae, c), t(a(We, Ae, c))],
183
+ ["8", a(Qe, Xe, c), t(a(Qe, Xe, c))],
184
+ ["9", a(Je, Ie, c), t(a(Je, Ie, c))],
185
+ ["10", a(ne, ie, c), t(a(ne, ie, c))],
186
+ ["11", a(oe, re, c), t(a(oe, re, c))]
187
+ ], qt = [
188
+ o[
189
+ 0
190
+ /* f11 */
191
+ ][3][5],
192
+ o[
193
+ 0
194
+ /* f11 */
195
+ ][3][0],
196
+ o[
197
+ 0
198
+ /* f11 */
199
+ ][3][1],
200
+ o[
201
+ 3
202
+ /* g10 */
203
+ ][3][5],
204
+ o[
205
+ 3
206
+ /* g10 */
207
+ ][3][0],
208
+ o[
209
+ 3
210
+ /* g10 */
211
+ ][3][1],
212
+ o[
213
+ 8
214
+ /* h9 */
215
+ ][3][5],
216
+ o[
217
+ 8
218
+ /* h9 */
219
+ ][3][0],
220
+ o[
221
+ 8
222
+ /* h9 */
223
+ ][3][1],
224
+ o[
225
+ 15
226
+ /* i8 */
227
+ ][3][5],
228
+ o[
229
+ 15
230
+ /* i8 */
231
+ ][3][0],
232
+ o[
233
+ 15
234
+ /* i8 */
235
+ ][3][1],
236
+ o[
237
+ 24
238
+ /* k7 */
239
+ ][3][5],
240
+ o[
241
+ 24
242
+ /* k7 */
243
+ ][3][0],
244
+ o[
245
+ 24
246
+ /* k7 */
247
+ ][3][1],
248
+ o[
249
+ 35
250
+ /* l6 */
251
+ ][3][5],
252
+ o[
253
+ 35
254
+ /* l6 */
255
+ ][3][0],
256
+ o[
257
+ 35
258
+ /* l6 */
259
+ ][3][1],
260
+ o[
261
+ 35
262
+ /* l6 */
263
+ ][3][2],
264
+ o[
265
+ 46
266
+ /* l5 */
267
+ ][3][0],
268
+ o[
269
+ 46
270
+ /* l5 */
271
+ ][3][1],
272
+ o[
273
+ 46
274
+ /* l5 */
275
+ ][3][2],
276
+ o[
277
+ 57
278
+ /* l4 */
279
+ ][3][0],
280
+ o[
281
+ 57
282
+ /* l4 */
283
+ ][3][1],
284
+ o[
285
+ 57
286
+ /* l4 */
287
+ ][3][2],
288
+ o[
289
+ 68
290
+ /* l3 */
291
+ ][3][0],
292
+ o[
293
+ 68
294
+ /* l3 */
295
+ ][3][1],
296
+ o[
297
+ 68
298
+ /* l3 */
299
+ ][3][2],
300
+ o[
301
+ 79
302
+ /* l2 */
303
+ ][3][0],
304
+ o[
305
+ 79
306
+ /* l2 */
307
+ ][3][1],
308
+ o[
309
+ 79
310
+ /* l2 */
311
+ ][3][2],
312
+ o[
313
+ 90
314
+ /* l1 */
315
+ ][3][0],
316
+ o[
317
+ 90
318
+ /* l1 */
319
+ ][3][1],
320
+ o[
321
+ 90
322
+ /* l1 */
323
+ ][3][2],
324
+ o[
325
+ 90
326
+ /* l1 */
327
+ ][3][3],
328
+ o[
329
+ 89
330
+ /* k1 */
331
+ ][3][2],
332
+ o[
333
+ 89
334
+ /* k1 */
335
+ ][3][3],
336
+ o[
337
+ 89
338
+ /* k1 */
339
+ ][3][4],
340
+ o[
341
+ 88
342
+ /* i1 */
343
+ ][3][1],
344
+ o[
345
+ 88
346
+ /* i1 */
347
+ ][3][2],
348
+ o[
349
+ 88
350
+ /* i1 */
351
+ ][3][3],
352
+ o[
353
+ 87
354
+ /* h1 */
355
+ ][3][1],
356
+ o[
357
+ 87
358
+ /* h1 */
359
+ ][3][2],
360
+ o[
361
+ 87
362
+ /* h1 */
363
+ ][3][3],
364
+ o[
365
+ 86
366
+ /* g1 */
367
+ ][3][1],
368
+ o[
369
+ 86
370
+ /* g1 */
371
+ ][3][2],
372
+ o[
373
+ 86
374
+ /* g1 */
375
+ ][3][3],
376
+ o[
377
+ 85
378
+ /* f1 */
379
+ ][3][1],
380
+ o[
381
+ 85
382
+ /* f1 */
383
+ ][3][2],
384
+ o[
385
+ 85
386
+ /* f1 */
387
+ ][3][3],
388
+ o[
389
+ 85
390
+ /* f1 */
391
+ ][3][4],
392
+ o[
393
+ 84
394
+ /* e1 */
395
+ ][3][3],
396
+ o[
397
+ 84
398
+ /* e1 */
399
+ ][3][4],
400
+ o[
401
+ 83
402
+ /* d1 */
403
+ ][3][2],
404
+ o[
405
+ 83
406
+ /* d1 */
407
+ ][3][3],
408
+ o[
409
+ 83
410
+ /* d1 */
411
+ ][3][4],
412
+ o[
413
+ 82
414
+ /* c1 */
415
+ ][3][2],
416
+ o[
417
+ 82
418
+ /* c1 */
419
+ ][3][3],
420
+ o[
421
+ 82
422
+ /* c1 */
423
+ ][3][4],
424
+ o[
425
+ 81
426
+ /* b1 */
427
+ ][3][2],
428
+ o[
429
+ 81
430
+ /* b1 */
431
+ ][3][3],
432
+ o[
433
+ 81
434
+ /* b1 */
435
+ ][3][4],
436
+ o[
437
+ 80
438
+ /* a1 */
439
+ ][3][2],
440
+ o[
441
+ 80
442
+ /* a1 */
443
+ ][3][3],
444
+ o[
445
+ 80
446
+ /* a1 */
447
+ ][3][4],
448
+ o[
449
+ 80
450
+ /* a1 */
451
+ ][3][5],
452
+ o[
453
+ 69
454
+ /* a2 */
455
+ ][3][3],
456
+ o[
457
+ 69
458
+ /* a2 */
459
+ ][3][4],
460
+ o[
461
+ 69
462
+ /* a2 */
463
+ ][3][5],
464
+ o[
465
+ 58
466
+ /* a3 */
467
+ ][3][3],
468
+ o[
469
+ 58
470
+ /* a3 */
471
+ ][3][4],
472
+ o[
473
+ 58
474
+ /* a3 */
475
+ ][3][5],
476
+ o[
477
+ 47
478
+ /* a4 */
479
+ ][3][3],
480
+ o[
481
+ 47
482
+ /* a4 */
483
+ ][3][4],
484
+ o[
485
+ 47
486
+ /* a4 */
487
+ ][3][5],
488
+ o[
489
+ 36
490
+ /* a5 */
491
+ ][3][3],
492
+ o[
493
+ 36
494
+ /* a5 */
495
+ ][3][4],
496
+ o[
497
+ 36
498
+ /* a5 */
499
+ ][3][5],
500
+ o[
501
+ 25
502
+ /* a6 */
503
+ ][3][3],
504
+ o[
505
+ 25
506
+ /* a6 */
507
+ ][3][4],
508
+ o[
509
+ 25
510
+ /* a6 */
511
+ ][3][5],
512
+ o[
513
+ 16
514
+ /* b7 */
515
+ ][3][4],
516
+ o[
517
+ 16
518
+ /* b7 */
519
+ ][3][5],
520
+ o[
521
+ 16
522
+ /* b7 */
523
+ ][3][0],
524
+ o[
525
+ 9
526
+ /* c8 */
527
+ ][3][4],
528
+ o[
529
+ 9
530
+ /* c8 */
531
+ ][3][5],
532
+ o[
533
+ 9
534
+ /* c8 */
535
+ ][3][0],
536
+ o[
537
+ 4
538
+ /* d9 */
539
+ ][3][4],
540
+ o[
541
+ 4
542
+ /* d9 */
543
+ ][3][5],
544
+ o[
545
+ 4
546
+ /* d9 */
547
+ ][3][0],
548
+ o[
549
+ 1
550
+ /* e10 */
551
+ ][3][4],
552
+ o[
553
+ 1
554
+ /* e10 */
555
+ ][3][5],
556
+ o[
557
+ 1
558
+ /* e10 */
559
+ ][3][0]
560
+ ];
561
+ function N1(s) {
562
+ if (s.length === 0)
563
+ return "";
564
+ const [x, ...l] = s;
565
+ let K = `M ${fe(x[0])} ${pe(x[1])} L `;
566
+ for (const S of l)
567
+ K += `${fe(S[0])} ${pe(S[1])} `;
568
+ return `${K} Z`;
569
+ }
570
+ const jt = typeof window > "u" ? !1 : window.matchMedia("(pointer: coarse)").matches;
571
+ function ct() {
572
+ try {
573
+ if (navigator.vibrate) {
574
+ navigator.vibrate(50);
575
+ return;
576
+ }
577
+ if (!jt) return;
578
+ const s = document.createElement("label");
579
+ s.ariaHidden = "true", s.style.display = "none";
580
+ const x = document.createElement("input");
581
+ x.type = "checkbox", x.setAttribute("switch", ""), s.appendChild(x), document.head.appendChild(s), s.click(), document.head.removeChild(s);
582
+ } catch {
583
+ }
584
+ }
585
+ function ut() {
586
+ if (navigator.vibrate) {
587
+ navigator.vibrate([50, 70, 50]);
588
+ return;
589
+ }
590
+ ct(), setTimeout(ct, 120);
591
+ }
592
+ const Rt = {
593
+ key: 0,
594
+ xmlns: "http://www.w3.org/2000/svg",
595
+ viewBox: "0 0 50 50"
596
+ }, Ht = {
597
+ key: 1,
598
+ xmlns: "http://www.w3.org/2000/svg",
599
+ viewBox: "0 0 50 50"
600
+ }, Ft = {
601
+ key: 2,
602
+ xmlns: "http://www.w3.org/2000/svg",
603
+ viewBox: "0 0 50 50"
604
+ }, Dt = {
605
+ key: 3,
606
+ xmlns: "http://www.w3.org/2000/svg",
607
+ viewBox: "0 0 50 50"
608
+ }, Nt = {
609
+ key: 4,
610
+ xmlns: "http://www.w3.org/2000/svg",
611
+ viewBox: "0 0 50 50"
612
+ }, Wt = {
613
+ key: 5,
614
+ xmlns: "http://www.w3.org/2000/svg",
615
+ viewBox: "0 0 50 50"
616
+ }, At = {
617
+ key: 6,
618
+ xmlns: "http://www.w3.org/2000/svg",
619
+ viewBox: "0 0 50 50"
620
+ }, Vt = {
621
+ key: 7,
622
+ xmlns: "http://www.w3.org/2000/svg",
623
+ viewBox: "0 0 50 50"
624
+ }, Kt = {
625
+ key: 8,
626
+ xmlns: "http://www.w3.org/2000/svg",
627
+ viewBox: "0 0 50 50"
628
+ }, Qt = {
629
+ key: 9,
630
+ xmlns: "http://www.w3.org/2000/svg",
631
+ viewBox: "0 0 50 50"
632
+ }, Xt = {
633
+ key: 10,
634
+ xmlns: "http://www.w3.org/2000/svg",
635
+ viewBox: "0 0 50 50"
636
+ }, Yt = {
637
+ key: 11,
638
+ xmlns: "http://www.w3.org/2000/svg",
639
+ viewBox: "0 0 50 50"
640
+ }, Zt = /* @__PURE__ */ dt({
641
+ __name: "Gioco",
642
+ props: {
643
+ type: {}
644
+ },
645
+ setup(s) {
646
+ return (x, l) => s.type === "p" ? (v(), g("svg", Rt, [...l[0] || (l[0] = [
647
+ 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)
648
+ ])])) : s.type === "n" ? (v(), g("svg", Ht, [...l[1] || (l[1] = [
649
+ 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)
650
+ ])])) : s.type === "b" ? (v(), g("svg", Ft, [...l[2] || (l[2] = [
651
+ 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)
652
+ ])])) : s.type === "r" ? (v(), g("svg", Dt, [...l[3] || (l[3] = [
653
+ 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)
654
+ ])])) : s.type === "q" ? (v(), g("svg", Nt, [...l[4] || (l[4] = [
655
+ 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)
656
+ ])])) : s.type === "k" ? (v(), g("svg", Wt, [...l[5] || (l[5] = [
657
+ 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)
658
+ ])])) : s.type === "P" ? (v(), g("svg", At, [...l[6] || (l[6] = [
659
+ 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)
660
+ ])])) : s.type === "N" ? (v(), g("svg", Vt, [...l[7] || (l[7] = [
661
+ 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)
662
+ ])])) : s.type === "B" ? (v(), g("svg", Kt, [...l[8] || (l[8] = [
663
+ 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)
664
+ ])])) : s.type === "R" ? (v(), g("svg", Qt, [...l[9] || (l[9] = [
665
+ 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)
666
+ ])])) : s.type === "Q" ? (v(), g("svg", Xt, [...l[10] || (l[10] = [
667
+ 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)
668
+ ])])) : s.type === "K" ? (v(), g("svg", Yt, [...l[11] || (l[11] = [
669
+ 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)
670
+ ])])) : de("", !0);
671
+ }
672
+ }), Jt = ["viewBox"], It = ["d", "fill"], _t = ["d", "data-hexboard-position", "data-testid", "fill"], e2 = ["d", "data-testid", "fill"], t2 = ["d", "data-testid", "fill"], o2 = ["textContent", "data-testid", "x", "y"], n2 = ["cx", "cy", "data-testid", "fill"], i2 = ["viewBox"], l2 = /* @__PURE__ */ dt({
673
+ __name: "Hexboard",
674
+ props: /* @__PURE__ */ it({
675
+ active: { type: Boolean, default: !1 },
676
+ autoselect: { type: Boolean, default: !1 },
677
+ flipped: { type: Boolean, default: !1 },
678
+ hexchess: { default: () => at.init() },
679
+ highlight: { default: () => [] },
680
+ ignoreTurn: { type: Boolean, default: !1 },
681
+ options: { default: () => ({}) },
682
+ pieces: { default: () => Zt },
683
+ playing: { type: [String, Boolean], default: !1 },
684
+ position: { default: $t }
685
+ }, {
686
+ "mouseover-position": {
687
+ default: null,
688
+ required: !1
689
+ },
690
+ "mouseover-positionModifiers": {},
691
+ selected: {
692
+ default: null,
693
+ required: !1
694
+ },
695
+ selectedModifiers: {},
696
+ targets: {
697
+ default: () => [],
698
+ required: !1
699
+ },
700
+ targetsModifiers: {}
701
+ }),
702
+ emits: /* @__PURE__ */ it(["clickPosition", "move"], ["update:mouseover-position", "update:selected", "update:targets"]),
703
+ setup(s, { emit: x }) {
704
+ const l = s, K = x, S = Q1(s, "mouseover-position"), U = Q1(s, "selected"), W = Q1(s, "targets"), _e = t1({ x: 0, y: 0 }), C = t1(null), ae = t1(new DOMRect()), h = t1({
705
+ hexchess: null,
706
+ promotionEl: null,
707
+ promotionFrom: null,
708
+ promotionTo: null,
709
+ selected: null
710
+ }), W1 = xt("svgEl"), V = t1(new DOMRect());
711
+ let A1 = !1;
712
+ const ft = j(() => h.value.hexchess ? [] : W.value), ce = j(() => h.value.hexchess ? h.value.hexchess : l.hexchess ? l.hexchess : at.init()), pt = j(() => ce.value.board.reduce(
713
+ (r, d, u) => (d && u !== C.value && r.push({ piece: d, index: u }), r),
714
+ []
715
+ )), i1 = j(() => typeof h.value.selected == "number" ? null : U.value), X1 = j(() => {
716
+ var r, d, u;
717
+ if (V1.value)
718
+ return "grabbing";
719
+ if (!(!l.active || S.value === null || h.value.hexchess)) {
720
+ if (U.value !== null && W.value.includes(S.value)) {
721
+ const p = (r = ce.value) == null ? void 0 : r.board[U.value];
722
+ if (p) {
723
+ const b = p === p.toLowerCase() ? "b" : "w", G = ((d = ce.value) == null ? void 0 : d.turn) === b;
724
+ if ((l.playing === !0 || G) && l1(U.value))
725
+ return "pointer";
726
+ }
727
+ }
728
+ if (r1.value)
729
+ return l.playing === !0 || l.playing && Z1.value === ((u = ce.value) == null ? void 0 : u.turn) && l.playing === Z1.value ? "grab" : "pointer";
730
+ }
731
+ }), Y1 = j(() => ({
732
+ x: _e.value.x - V.value.width / 2,
733
+ y: _e.value.y - V.value.height / 2
734
+ })), V1 = j(() => !l.hexchess || h.value.hexchess || C.value === null ? null : l.hexchess.board[C.value]), A = j(() => ({ ...Ot, ...l.options })), Z1 = j(() => r1.value ? r1.value === r1.value.toLowerCase() ? "b" : "w" : null), r1 = j(() => {
735
+ var r;
736
+ return S.value === null ? null : ((r = ce.value) == null ? void 0 : r.board[S.value]) ?? null;
737
+ }), s1 = j(() => {
738
+ var p;
739
+ 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) => (G) => Tt(l.pieces, { ...G, type: b });
740
+ return {
741
+ n: u(d ? "N" : "n"),
742
+ b: u(d ? "B" : "b"),
743
+ r: u(d ? "R" : "r"),
744
+ q: u(d ? "Q" : "q")
745
+ };
746
+ });
747
+ Mt(() => {
748
+ l.active && J1();
749
+ }), zt(nt), rt(X1, (r) => {
750
+ document.body.style.setProperty(
751
+ "cursor",
752
+ r === "grabbing" ? "grabbing" : null
753
+ );
754
+ }), rt(
755
+ () => l.active,
756
+ (r) => r ? J1() : nt()
757
+ );
758
+ function K1(r, d) {
759
+ var G, se;
760
+ if (!W.value.includes(r.to))
761
+ return;
762
+ const u = (G = l.hexchess) == null ? void 0 : G.board[r.from];
763
+ if (!u)
764
+ return;
765
+ const p = u === u.toLowerCase() ? "b" : "w", b = ((se = l.hexchess) == null ? void 0 : se.turn) === p;
766
+ if (l.hexchess && (u === "p" || u === "P") && St(r.to, p)) {
767
+ const ue = l.hexchess.clone();
768
+ ue.board[r.from] = null, ue.board[r.to] = u, h.value = {
769
+ hexchess: ue,
770
+ promotionEl: (d == null ? void 0 : d.target) instanceof Element ? d.target : null,
771
+ promotionFrom: r.from,
772
+ promotionTo: r.to,
773
+ selected: r.to
774
+ }, (d == null ? void 0 : d.target) instanceof Element && (ae.value = d.target.getBoundingClientRect());
775
+ return;
776
+ }
777
+ l1(r.from) && (l.ignoreTurn || b) && _1(r);
778
+ }
779
+ function l1(r) {
780
+ var p;
781
+ const d = (p = l.hexchess) == null ? void 0 : p.board[r];
782
+ if (!d)
783
+ return !1;
784
+ const u = d === d.toLowerCase() ? "b" : "w";
785
+ return l.playing === !0 || l.playing === u;
786
+ }
787
+ function ht(r) {
788
+ var d, u;
789
+ return S.value === null ? A.value.labelColor : (d = R(S.value)) != null && d.startsWith(r) || (u = R(S.value)) != null && u.endsWith(r) ? A.value.labelActiveColor : A.value.labelInactiveColor;
790
+ }
791
+ function J1() {
792
+ _e.value = { x: 0, y: 0 }, window.addEventListener("keyup", I1), window.addEventListener("pointermove", et), window.addEventListener("pointerup", ot), window.addEventListener("resize", a1), window.addEventListener("scroll", a1), window.addEventListener("touchmove", tt, { passive: !1 });
793
+ }
794
+ function a1() {
795
+ var r;
796
+ ae.value = ((r = h.value.promotionEl) == null ? void 0 : r.getBoundingClientRect()) ?? new DOMRect();
797
+ }
798
+ function vt(r, d) {
799
+ if (l.active) {
800
+ if (A1) {
801
+ A1 = !1;
802
+ return;
803
+ }
804
+ if (h.value.hexchess) {
805
+ h.value.selected !== r && e1();
806
+ return;
807
+ }
808
+ if (U.value !== null && W.value.includes(r)) {
809
+ const u = new d1({ from: U.value, to: r });
810
+ K1(u, d);
811
+ return;
812
+ }
813
+ l.autoselect && !l.hexchess.board[r] && (U.value = null, W.value = []), K("clickPosition", r);
814
+ }
815
+ }
816
+ function I1(r) {
817
+ if (r.key === "Escape") {
818
+ if (h.value.hexchess) {
819
+ e1();
820
+ return;
821
+ }
822
+ l.autoselect && (U.value = null, W.value = []);
823
+ }
824
+ }
825
+ function _1(r) {
826
+ K("move", r), c1();
827
+ }
828
+ function gt(r, d) {
829
+ var u;
830
+ if (d.stopPropagation(), C.value !== null) {
831
+ let p = r;
832
+ const b = document.elementFromPoint(
833
+ d.clientX,
834
+ d.clientY
835
+ ), G = b == null ? void 0 : b.getAttribute("data-hexboard-position");
836
+ G !== null && (p = Number(G));
837
+ const se = new d1({ from: C.value, to: p });
838
+ if (K1(se, d), h.value.hexchess)
839
+ return;
840
+ C.value = null, V.value = new DOMRect();
841
+ return;
842
+ }
843
+ if (U.value !== null && W.value.includes(r)) {
844
+ const p = new d1({ from: U.value, to: r });
845
+ return K1(p, d), h.value.hexchess, void 0;
846
+ }
847
+ if (h.value.hexchess) {
848
+ e1();
849
+ return;
850
+ }
851
+ if ((u = l.hexchess) != null && u.board[r]) {
852
+ C.value = null, V.value = new DOMRect();
853
+ return;
854
+ }
855
+ c1();
856
+ }
857
+ function e1() {
858
+ const r = h.value.promotionFrom;
859
+ h.value = {
860
+ hexchess: null,
861
+ promotionEl: null,
862
+ promotionFrom: null,
863
+ promotionTo: null,
864
+ selected: null
865
+ }, typeof r == "number" && (U.value = r, W.value = l.hexchess.movesFrom(r).map((d) => d.to) ?? []), C.value = null, A1 = !0;
866
+ }
867
+ function wt(r, d) {
868
+ var G, se, ue;
869
+ if (d.preventDefault(), ut(), h.value.hexchess)
870
+ return;
871
+ const u = (G = l.hexchess) == null ? void 0 : G.board[r];
872
+ if (!u || (l.autoselect && (U.value = r, W.value = ((se = l.hexchess) == null ? void 0 : se.movesFrom(r).map((yt) => yt.to)) ?? [], A.value.haptics && ut()), !l1(r)))
873
+ return;
874
+ const p = u === u.toLowerCase() ? "b" : "w", b = ((ue = l.hexchess) == null ? void 0 : ue.turn) === p;
875
+ !l.ignoreTurn && !b || (C.value = r, _e.value = { x: d.clientX, y: d.clientY }, W1.value instanceof Element && (V.value = W1.value.getBoundingClientRect()));
876
+ }
877
+ function mt(r) {
878
+ S.value = r;
879
+ }
880
+ function bt() {
881
+ S.value = null;
882
+ }
883
+ function et(r) {
884
+ l.active && (_e.value = { x: r.clientX, y: r.clientY });
885
+ }
886
+ function tt(r) {
887
+ C.value !== null && r.preventDefault();
888
+ }
889
+ function ot() {
890
+ if (h.value.hexchess) {
891
+ e1();
892
+ return;
893
+ }
894
+ if (C.value !== null) {
895
+ C.value = null, V.value = new DOMRect();
896
+ return;
897
+ }
898
+ c1();
899
+ }
900
+ function kt(r) {
901
+ if (typeof h.value.promotionFrom == "number" && l1(h.value.promotionFrom)) {
902
+ const d = new d1({
903
+ from: h.value.promotionFrom ?? 0,
904
+ to: h.value.promotionTo ?? 0,
905
+ promotion: r
906
+ });
907
+ _1(d);
908
+ }
909
+ }
910
+ function c1() {
911
+ document.body.style.setProperty("cursor", null), C.value = null, U.value = null, h.value = {
912
+ hexchess: null,
913
+ promotionEl: null,
914
+ promotionFrom: null,
915
+ promotionTo: null,
916
+ selected: null
917
+ }, V.value = new DOMRect(), W.value = [];
918
+ }
919
+ function nt() {
920
+ c1(), window.removeEventListener("keyup", I1), window.removeEventListener("pointermove", et), window.removeEventListener("pointerup", ot), window.removeEventListener("resize", a1), window.removeEventListener("scroll", a1), window.removeEventListener("touchmove", tt);
921
+ }
922
+ return (r, d) => (v(), g("div", null, [
923
+ (v(), g("svg", {
924
+ xmlns: "http://www.w3.org/2000/svg",
925
+ ref_key: "svgEl",
926
+ ref: W1,
927
+ style: u1({ cursor: X1.value }),
928
+ viewBox: `0 0 ${f(he)} ${f(he)}`
929
+ }, [
930
+ Gt("path", {
931
+ d: f(N1)(f(qt)),
932
+ fill: A.value.colors[1],
933
+ style: { pointerEvents: "none" }
934
+ }, null, 8, It),
935
+ (v(!0), g(o1, null, n1(f(o), (u, p) => (v(), g("path", Pt(
936
+ { ref_for: !0 },
937
+ s.active ? {
938
+ onClick: (b) => vt(p, b),
939
+ onMouseenter: () => mt(p),
940
+ onMouseleave: () => bt(),
941
+ onPointerdown: (b) => wt(p, b),
942
+ onPointerup: (b) => gt(p, b)
943
+ } : {},
944
+ {
945
+ d: f(N1)(s.flipped ? u[4] : u[3]),
946
+ "data-hexboard-position": p,
947
+ "data-testid": `position-${f(R)(p)}`,
948
+ fill: A.value.colors[f(o)[p][0]],
949
+ key: p
950
+ }
951
+ ), null, 16, _t))), 128)),
952
+ (v(!0), g(o1, null, n1(s.highlight, (u) => (v(), g("path", {
953
+ d: f(N1)(s.flipped ? f(o)[u][4] : f(o)[u][3]),
954
+ "data-testid": `highlight-${f(R)(u)}`,
955
+ fill: A.value.highlightColor,
956
+ key: `highlight-${u}`,
957
+ style: { pointerEvents: "none" }
958
+ }, null, 8, e2))), 128)),
959
+ typeof i1.value == "number" ? (v(), g("path", {
960
+ key: 0,
961
+ d: f(N1)(s.flipped ? f(o)[i1.value][4] : f(o)[i1.value][3]),
962
+ "data-testid": `selected-${f(R)(i1.value)}`,
963
+ fill: A.value.selectedColor,
964
+ ref: "selectedEl",
965
+ style: { pointerEvents: "none" }
966
+ }, null, 8, t2)) : de("", !0),
967
+ A.value.labels ? (v(!0), g(o1, { key: 1 }, n1(f(Lt), ([u, p, b], G) => (v(), g("text", {
968
+ textContent: Ut(u),
969
+ "dominant-baseline": "central",
970
+ "text-anchor": "middle",
971
+ "data-testid": `label-${u}`,
972
+ key: `label-${G}`,
973
+ style: u1({
974
+ fill: ht(u),
975
+ fontSize: ".5px",
976
+ pointerEvents: "none",
977
+ userSelect: "none"
978
+ }),
979
+ x: f(fe)(s.flipped ? b[0] : p[0]),
980
+ y: f(pe)(s.flipped ? b[1] : p[1])
981
+ }, null, 12, o2))), 128)) : de("", !0),
982
+ ce.value ? (v(!0), g(o1, { key: 2 }, n1(pt.value, ({ piece: u, index: p }) => (v(), st(lt(s.pieces), {
983
+ "data-piece-type": u,
984
+ "data-testid": `piece-${f(R)(p)}`,
985
+ height: f(Q),
986
+ key: `piece-${f(R)(p)}`,
987
+ style: { pointerEvents: "none" },
988
+ type: u,
989
+ width: f(Q),
990
+ x: f(fe)(f(o)[p][s.flipped ? 2 : 1][0] - f(Q) / 2),
991
+ y: f(pe)(f(o)[p][s.flipped ? 2 : 1][1] + f(Q) / 2)
992
+ }, null, 8, ["data-piece-type", "data-testid", "height", "type", "width", "x", "y"]))), 128)) : de("", !0),
993
+ (v(!0), g(o1, null, n1(ft.value, (u) => (v(), g("circle", {
994
+ cx: f(fe)(f(o)[u][s.flipped ? 2 : 1][0]),
995
+ cy: f(pe)(f(o)[u][s.flipped ? 2 : 1][1]),
996
+ "data-testid": `target-${f(R)(u)}`,
997
+ fill: A.value.targetColor,
998
+ key: `target-${f(R)(u)}`,
999
+ r: 0.3,
1000
+ style: { pointerEvents: "none" }
1001
+ }, null, 8, n2))), 128))
1002
+ ], 12, Jt)),
1003
+ V1.value ? (v(), g("svg", {
1004
+ key: 0,
1005
+ "data-testid": "drag-piece",
1006
+ xmlns: "http://www.w3.org/2000/svg",
1007
+ style: u1({
1008
+ height: V.value.height + "px",
1009
+ left: "0px",
1010
+ pointerEvents: "none",
1011
+ position: "fixed",
1012
+ top: "0px",
1013
+ transform: `translate(${Y1.value.x}px, ${Y1.value.y}px) scale(1.1)`,
1014
+ width: V.value.width + "px",
1015
+ willChange: "transform"
1016
+ }),
1017
+ viewBox: `0 0 ${f(he)} ${f(he)}`
1018
+ }, [
1019
+ (v(), st(lt(s.pieces), {
1020
+ height: f(Q),
1021
+ style: { pointerEvents: "none" },
1022
+ type: V1.value,
1023
+ width: f(Q),
1024
+ x: f(fe)(f(Q) / -2),
1025
+ y: f(pe)(f(Q) / 2)
1026
+ }, null, 8, ["height", "type", "width", "x", "y"]))
1027
+ ], 12, i2)) : de("", !0),
1028
+ typeof h.value.selected == "number" ? (v(), g("div", {
1029
+ key: 1,
1030
+ style: u1({
1031
+ height: ae.value.height + "px",
1032
+ left: ae.value.left + "px",
1033
+ position: "fixed",
1034
+ top: ae.value.top + "px",
1035
+ width: ae.value.width + "px"
1036
+ }),
1037
+ onPointerup: d[0] || (d[0] = Ct(() => {
1038
+ }, ["stop"]))
1039
+ }, [
1040
+ Et(r.$slots, "promotion", {
1041
+ b: s1.value.b,
1042
+ cancel: e1,
1043
+ file: f(R)(h.value.selected)[0],
1044
+ n: s1.value.n,
1045
+ promote: kt,
1046
+ q: s1.value.q,
1047
+ r: s1.value.r,
1048
+ rank: Number(f(R)(h.value.selected).slice(1))
1049
+ })
1050
+ ], 36)) : de("", !0)
1051
+ ]));
1052
+ }
1053
+ });
1054
+ export {
1055
+ l2 as Hexboard
1056
+ };