valtech-components 4.0.376 → 4.0.378
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/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +321 -24
- package/esm2022/lib/components/organisms/mini-games/chessimals-online.service.mjs +129 -9
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +57 -1
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +503 -30
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +19 -2
- package/lib/components/organisms/mini-games/chessimals-online.service.d.ts +10 -1
- package/lib/components/organisms/mini-games/types.d.ts +22 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, InjectionToken, makeEnvironmentProviders, APP_INITIALIZER, ErrorHandler, Injectable, DestroyRef, Inject, signal, computed, PLATFORM_ID, isDevMode, Optional, runInInjectionContext, effect, Pipe, TemplateRef, ViewContainerRef, input, Directive, EventEmitter, Component, Input, Output, ChangeDetectionStrategy, HostBinding, HostListener, SecurityContext, NgZone, ViewChild, ElementRef, ChangeDetectorRef, output, ContentChild, model, ViewEncapsulation, untracked, viewChild, Injector, isSignal } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject, throwError, Subject, map, distinctUntilChanged, filter as filter$1, take as take$1, firstValueFrom, of, from, EMPTY, Observable, interval, defer, timer, merge, concat, debounceTime, switchMap as switchMap$1, catchError as catchError$1, takeUntil, isObservable, forkJoin, race, Subscription, shareReplay as shareReplay$1 } from 'rxjs';
|
|
3
|
+
import { BehaviorSubject, throwError, Subject, map, distinctUntilChanged, filter as filter$1, take as take$1, firstValueFrom, of, from, EMPTY, Observable, interval, defer, timer, merge, concat, debounceTime, switchMap as switchMap$1, catchError as catchError$1, takeUntil, isObservable, forkJoin, race, tap as tap$1, Subscription, shareReplay as shareReplay$1 } from 'rxjs';
|
|
4
4
|
import { catchError, switchMap, finalize, filter, take, timeout, map as map$1, tap, shareReplay, distinctUntilChanged as distinctUntilChanged$1, retry, debounceTime as debounceTime$1, takeUntil as takeUntil$1 } from 'rxjs/operators';
|
|
5
5
|
import * as i1$3 from '@angular/common/http';
|
|
6
6
|
import { provideHttpClient, withInterceptors, HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';
|
|
@@ -58,7 +58,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
58
58
|
* Current version of valtech-components.
|
|
59
59
|
* This is automatically updated during the publish process.
|
|
60
60
|
*/
|
|
61
|
-
const VERSION = '4.0.
|
|
61
|
+
const VERSION = '4.0.378';
|
|
62
62
|
|
|
63
63
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
64
64
|
let isRefreshing = false;
|
|
@@ -61632,12 +61632,24 @@ class ChessimalsOnlineService {
|
|
|
61632
61632
|
rematchRequests: [],
|
|
61633
61633
|
},
|
|
61634
61634
|
});
|
|
61635
|
-
|
|
61636
|
-
|
|
61635
|
+
const next = this.withUpdatedAt(state, now);
|
|
61636
|
+
await setDoc(this.gameRef(gameId), next);
|
|
61637
|
+
await this.saveCurrentUserHistory(next);
|
|
61638
|
+
return next;
|
|
61637
61639
|
}
|
|
61638
61640
|
watchGame(gameId) {
|
|
61639
61641
|
const normalizedGameId = this.normalizeGameId(gameId);
|
|
61640
|
-
return docData(this.gameRef(normalizedGameId)).pipe(map((value) => (value ? value : null)))
|
|
61642
|
+
return docData(this.gameRef(normalizedGameId)).pipe(map((value) => (value ? value : null)), tap$1((state) => {
|
|
61643
|
+
if (state)
|
|
61644
|
+
void this.saveCurrentUserHistory(state);
|
|
61645
|
+
}));
|
|
61646
|
+
}
|
|
61647
|
+
watchHistory(limitCount = 8) {
|
|
61648
|
+
const uid = this.currentUid;
|
|
61649
|
+
if (!uid)
|
|
61650
|
+
return of([]);
|
|
61651
|
+
const historyQuery = query$1(collection(this.firestore, this.historyPath(uid)), orderBy('updatedAt', 'desc'), limit(limitCount));
|
|
61652
|
+
return collectionData(historyQuery).pipe(map((items) => items));
|
|
61641
61653
|
}
|
|
61642
61654
|
async joinGame(gameId) {
|
|
61643
61655
|
const normalizedGameId = this.normalizeGameId(gameId);
|
|
@@ -61655,18 +61667,46 @@ class ChessimalsOnlineService {
|
|
|
61655
61667
|
return;
|
|
61656
61668
|
if (state.status !== 'waiting' || !state.online?.lobby)
|
|
61657
61669
|
return;
|
|
61670
|
+
if (state.online.pendingGuest?.uid === uid)
|
|
61671
|
+
return;
|
|
61658
61672
|
const now = new Date();
|
|
61659
61673
|
const guest = this.createParticipant(uid, now.toISOString());
|
|
61674
|
+
const next = {
|
|
61675
|
+
...state,
|
|
61676
|
+
online: {
|
|
61677
|
+
...state.online,
|
|
61678
|
+
updatedAt: now.toISOString(),
|
|
61679
|
+
pendingGuest: guest,
|
|
61680
|
+
},
|
|
61681
|
+
};
|
|
61682
|
+
transaction.set(ref, next);
|
|
61683
|
+
});
|
|
61684
|
+
}
|
|
61685
|
+
async acceptGuest(gameId) {
|
|
61686
|
+
const normalizedGameId = this.normalizeGameId(gameId);
|
|
61687
|
+
const uid = await this.ensureUser();
|
|
61688
|
+
await runTransaction(this.firestore, async (transaction) => {
|
|
61689
|
+
const ref = this.gameRef(normalizedGameId);
|
|
61690
|
+
const snapshot = await transaction.get(ref);
|
|
61691
|
+
if (!snapshot.exists())
|
|
61692
|
+
throw new Error('CHESSIMALS_GAME_NOT_FOUND');
|
|
61693
|
+
const state = snapshot.data();
|
|
61694
|
+
this.assertNotExpired(state);
|
|
61695
|
+
if (state.status !== 'waiting' || state.online?.lobby?.uid !== uid || !state.online.pendingGuest)
|
|
61696
|
+
return;
|
|
61697
|
+
const now = new Date();
|
|
61660
61698
|
const [hostSide, guestSide] = Math.random() > 0.5 ? ['white', 'black'] : ['black', 'white'];
|
|
61661
61699
|
const lobby = state.online.lobby;
|
|
61662
|
-
const
|
|
61663
|
-
|
|
61700
|
+
const guest = state.online.pendingGuest;
|
|
61701
|
+
const online = { ...state.online };
|
|
61702
|
+
delete online.lobby;
|
|
61703
|
+
delete online.pendingGuest;
|
|
61664
61704
|
const next = {
|
|
61665
61705
|
...state,
|
|
61666
61706
|
status: 'in_progress',
|
|
61667
61707
|
currentTurn: 'white',
|
|
61668
61708
|
online: {
|
|
61669
|
-
...
|
|
61709
|
+
...online,
|
|
61670
61710
|
updatedAt: now.toISOString(),
|
|
61671
61711
|
participants: {
|
|
61672
61712
|
[hostSide]: { ...lobby, side: hostSide },
|
|
@@ -61678,6 +61718,24 @@ class ChessimalsOnlineService {
|
|
|
61678
61718
|
transaction.set(ref, next);
|
|
61679
61719
|
});
|
|
61680
61720
|
}
|
|
61721
|
+
async rejectGuest(gameId) {
|
|
61722
|
+
const normalizedGameId = this.normalizeGameId(gameId);
|
|
61723
|
+
const uid = await this.ensureUser();
|
|
61724
|
+
await runTransaction(this.firestore, async (transaction) => {
|
|
61725
|
+
const ref = this.gameRef(normalizedGameId);
|
|
61726
|
+
const snapshot = await transaction.get(ref);
|
|
61727
|
+
if (!snapshot.exists())
|
|
61728
|
+
throw new Error('CHESSIMALS_GAME_NOT_FOUND');
|
|
61729
|
+
const state = snapshot.data();
|
|
61730
|
+
this.assertNotExpired(state);
|
|
61731
|
+
if (state.status !== 'waiting' || state.online?.lobby?.uid !== uid || !state.online.pendingGuest)
|
|
61732
|
+
return;
|
|
61733
|
+
const now = new Date();
|
|
61734
|
+
const online = { ...state.online, updatedAt: now.toISOString() };
|
|
61735
|
+
delete online.pendingGuest;
|
|
61736
|
+
transaction.set(ref, { ...state, online });
|
|
61737
|
+
});
|
|
61738
|
+
}
|
|
61681
61739
|
async move(gameId, move) {
|
|
61682
61740
|
const normalizedGameId = this.normalizeGameId(gameId);
|
|
61683
61741
|
const uid = await this.ensureUser();
|
|
@@ -61780,9 +61838,24 @@ class ChessimalsOnlineService {
|
|
|
61780
61838
|
const normalizedBaseRoute = `/${baseRoute.replace(/^\/+|\/+$/g, '') || 'mini-games'}`;
|
|
61781
61839
|
return `${origin}${normalizedBaseRoute}/chessimals/${encodeURIComponent(this.normalizeGameId(gameId))}`;
|
|
61782
61840
|
}
|
|
61841
|
+
async saveCurrentUserHistory(state) {
|
|
61842
|
+
const uid = this.currentUid;
|
|
61843
|
+
if (!uid || state.mode !== 'online')
|
|
61844
|
+
return;
|
|
61845
|
+
const entry = this.createHistoryEntry(state, uid);
|
|
61846
|
+
if (!entry)
|
|
61847
|
+
return;
|
|
61848
|
+
await setDoc(this.historyRef(uid, state.id), this.withoutUndefined(entry), { merge: true });
|
|
61849
|
+
}
|
|
61783
61850
|
gameRef(gameId) {
|
|
61784
61851
|
return doc(this.firestore, `${COLLECTION_PATH}/${gameId}`);
|
|
61785
61852
|
}
|
|
61853
|
+
historyPath(uid) {
|
|
61854
|
+
return `users/${uid}/miniGames/chessimals/history`;
|
|
61855
|
+
}
|
|
61856
|
+
historyRef(uid, gameId) {
|
|
61857
|
+
return doc(this.firestore, `${this.historyPath(uid)}/${gameId}`);
|
|
61858
|
+
}
|
|
61786
61859
|
async ensureUser() {
|
|
61787
61860
|
await this.firebase.whenFirebaseAuthReady();
|
|
61788
61861
|
const user = this.auth.currentUser;
|
|
@@ -61816,6 +61889,53 @@ class ChessimalsOnlineService {
|
|
|
61816
61889
|
return state;
|
|
61817
61890
|
return { ...state, online: { ...state.online, updatedAt: date.toISOString() } };
|
|
61818
61891
|
}
|
|
61892
|
+
createHistoryEntry(state, uid) {
|
|
61893
|
+
if (!state.online)
|
|
61894
|
+
return undefined;
|
|
61895
|
+
const side = this.participantSide(state, uid);
|
|
61896
|
+
const isLobbyHost = state.online.lobby?.uid === uid;
|
|
61897
|
+
const isPendingGuest = state.online.pendingGuest?.uid === uid;
|
|
61898
|
+
if (!side && !isLobbyHost && !isPendingGuest)
|
|
61899
|
+
return undefined;
|
|
61900
|
+
const opponent = side
|
|
61901
|
+
? side === 'white'
|
|
61902
|
+
? state.online.participants?.black
|
|
61903
|
+
: state.online.participants?.white
|
|
61904
|
+
: isLobbyHost
|
|
61905
|
+
? state.online.pendingGuest
|
|
61906
|
+
: state.online.lobby;
|
|
61907
|
+
return {
|
|
61908
|
+
gameId: state.id,
|
|
61909
|
+
mode: 'online',
|
|
61910
|
+
boardSize: state.boardSize,
|
|
61911
|
+
status: state.status,
|
|
61912
|
+
outcome: this.historyOutcome(state, uid, side, isPendingGuest),
|
|
61913
|
+
side,
|
|
61914
|
+
opponentUid: opponent?.uid,
|
|
61915
|
+
opponentName: opponent?.name,
|
|
61916
|
+
winner: state.winner,
|
|
61917
|
+
winnerReason: state.winnerReason,
|
|
61918
|
+
moveCount: state.moveCount,
|
|
61919
|
+
round: state.online.round,
|
|
61920
|
+
createdAt: state.online.createdAt,
|
|
61921
|
+
updatedAt: state.online.updatedAt,
|
|
61922
|
+
finishedAt: state.status === 'finished' ? state.online.updatedAt : undefined,
|
|
61923
|
+
expiresAt: state.online.expiresAt,
|
|
61924
|
+
rematchOf: state.online.rematchOf,
|
|
61925
|
+
};
|
|
61926
|
+
}
|
|
61927
|
+
withoutUndefined(value) {
|
|
61928
|
+
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
|
|
61929
|
+
}
|
|
61930
|
+
historyOutcome(state, uid, side, isPendingGuest) {
|
|
61931
|
+
if (state.status === 'finished' && side && state.winner)
|
|
61932
|
+
return state.winner === side ? 'won' : 'lost';
|
|
61933
|
+
if (state.status === 'in_progress')
|
|
61934
|
+
return 'in_progress';
|
|
61935
|
+
if (isPendingGuest)
|
|
61936
|
+
return 'pending';
|
|
61937
|
+
return 'waiting';
|
|
61938
|
+
}
|
|
61819
61939
|
assertNotExpired(state) {
|
|
61820
61940
|
if ((state.online?.expiresAtMs ?? 0) < Date.now())
|
|
61821
61941
|
throw new Error('CHESSIMALS_GAME_EXPIRED');
|
|
@@ -61969,12 +62089,32 @@ const MINI_GAMES_I18N = {
|
|
|
61969
62089
|
chessimalsOnlineLoading: 'Abriendo partida...',
|
|
61970
62090
|
chessimalsWaitingTitle: 'Esperando rival',
|
|
61971
62091
|
chessimalsWaitingBody: 'Comparte este link o código. Cuando entre otra persona, se sortearán los colores y empezará la partida.',
|
|
62092
|
+
chessimalsLobbyGuestWaitingTitle: 'Esperando aprobación',
|
|
62093
|
+
chessimalsLobbyGuestWaitingBody: 'Avisamos al creador de la partida. La partida comenzará cuando acepte.',
|
|
62094
|
+
chessimalsJoinRequestTitle: 'Solicitud para unirse',
|
|
62095
|
+
chessimalsJoinRequestBody: '{player} quiere jugar esta partida. Acepta para sortear colores y comenzar.',
|
|
62096
|
+
chessimalsJoinRequestPlayer: 'Jugador',
|
|
62097
|
+
chessimalsAcceptGuest: 'Aceptar',
|
|
62098
|
+
chessimalsRejectGuest: 'Rechazar',
|
|
62099
|
+
chessimalsGuestAccepted: 'Partida iniciada.',
|
|
62100
|
+
chessimalsGuestRejected: 'Solicitud rechazada.',
|
|
62101
|
+
chessimalsHistoryTitle: 'Tus partidas',
|
|
62102
|
+
chessimalsHistoryBody: 'Historial guardado en tu cuenta.',
|
|
62103
|
+
chessimalsHistoryOpen: 'Abrir',
|
|
62104
|
+
chessimalsHistoryWaiting: 'Esperando rival',
|
|
62105
|
+
chessimalsHistoryPending: 'Esperando aprobación',
|
|
62106
|
+
chessimalsHistoryInProgress: 'En curso',
|
|
62107
|
+
chessimalsHistoryWon: 'Ganada',
|
|
62108
|
+
chessimalsHistoryLost: 'Perdida',
|
|
62109
|
+
chessimalsHistoryDeclined: 'Rechazada',
|
|
62110
|
+
chessimalsHistoryAgainst: 'contra {player}',
|
|
61972
62111
|
chessimalsGameCode: 'Código',
|
|
61973
62112
|
chessimalsCopyLink: 'Copiar link',
|
|
61974
62113
|
chessimalsShareLink: 'Compartir link',
|
|
61975
62114
|
chessimalsLinkCopied: 'Link de la partida copiado.',
|
|
61976
62115
|
chessimalsShareText: 'Únete a mi partida de Chessimals.',
|
|
61977
62116
|
chessimalsOnlineWaiting: 'Esperando',
|
|
62117
|
+
chessimalsOnlinePending: 'Pendiente',
|
|
61978
62118
|
chessimalsOnlinePlayer: 'Online',
|
|
61979
62119
|
chessimalsSpectator: 'Observador',
|
|
61980
62120
|
chessimalsOnlineViewer: 'Esta partida ya tiene dos jugadores. Puedes mirar cómo avanza.',
|
|
@@ -61982,6 +62122,14 @@ const MINI_GAMES_I18N = {
|
|
|
61982
62122
|
chessimalsYourTurnBody: 'Toca uno de tus peones para ver sus movimientos y juega cuando estés listo.',
|
|
61983
62123
|
chessimalsWaitingTurn: 'Espera a que juegue la otra persona.',
|
|
61984
62124
|
chessimalsRematch: 'Pedir revancha',
|
|
62125
|
+
chessimalsAcceptRematch: 'Aceptar revancha',
|
|
62126
|
+
chessimalsRematchRequestedAction: 'Revancha solicitada',
|
|
62127
|
+
chessimalsRematchRequestedTitle: 'Revancha solicitada',
|
|
62128
|
+
chessimalsRematchRequestedBody: 'Esperando que la otra persona acepte para sortear colores y empezar otra partida.',
|
|
62129
|
+
chessimalsRematchIncomingTitle: 'Te pidieron revancha',
|
|
62130
|
+
chessimalsRematchIncomingBody: 'Acepta para sortear colores y empezar una nueva partida.',
|
|
62131
|
+
chessimalsRematchRequestedToast: 'Revancha solicitada. Espera a que la otra persona acepte.',
|
|
62132
|
+
chessimalsRematchAccepted: 'Revancha aceptada. Preparando la nueva partida.',
|
|
61985
62133
|
chessimalsOnlineError: 'No pudimos abrir la partida. Revisa el código o intenta nuevamente.',
|
|
61986
62134
|
chessimalsResumeSplashTitle: 'Retomando partida',
|
|
61987
62135
|
chessimalsResumeSplashBody: 'Estamos cargando el tablero y sincronizando el turno.',
|
|
@@ -62167,12 +62315,32 @@ const MINI_GAMES_I18N = {
|
|
|
62167
62315
|
chessimalsOnlineLoading: 'Opening game...',
|
|
62168
62316
|
chessimalsWaitingTitle: 'Waiting for rival',
|
|
62169
62317
|
chessimalsWaitingBody: 'Share this link or code. When another player joins, colors are randomly assigned and the game starts.',
|
|
62318
|
+
chessimalsLobbyGuestWaitingTitle: 'Waiting for approval',
|
|
62319
|
+
chessimalsLobbyGuestWaitingBody: 'We notified the game creator. The game starts when they accept.',
|
|
62320
|
+
chessimalsJoinRequestTitle: 'Join request',
|
|
62321
|
+
chessimalsJoinRequestBody: '{player} wants to join this game. Accept to assign colors and start.',
|
|
62322
|
+
chessimalsJoinRequestPlayer: 'Player',
|
|
62323
|
+
chessimalsAcceptGuest: 'Accept',
|
|
62324
|
+
chessimalsRejectGuest: 'Reject',
|
|
62325
|
+
chessimalsGuestAccepted: 'Game started.',
|
|
62326
|
+
chessimalsGuestRejected: 'Request rejected.',
|
|
62327
|
+
chessimalsHistoryTitle: 'Your games',
|
|
62328
|
+
chessimalsHistoryBody: 'History saved to your account.',
|
|
62329
|
+
chessimalsHistoryOpen: 'Open',
|
|
62330
|
+
chessimalsHistoryWaiting: 'Waiting for rival',
|
|
62331
|
+
chessimalsHistoryPending: 'Waiting approval',
|
|
62332
|
+
chessimalsHistoryInProgress: 'In progress',
|
|
62333
|
+
chessimalsHistoryWon: 'Won',
|
|
62334
|
+
chessimalsHistoryLost: 'Lost',
|
|
62335
|
+
chessimalsHistoryDeclined: 'Declined',
|
|
62336
|
+
chessimalsHistoryAgainst: 'against {player}',
|
|
62170
62337
|
chessimalsGameCode: 'Code',
|
|
62171
62338
|
chessimalsCopyLink: 'Copy link',
|
|
62172
62339
|
chessimalsShareLink: 'Share link',
|
|
62173
62340
|
chessimalsLinkCopied: 'Game link copied.',
|
|
62174
62341
|
chessimalsShareText: 'Join my Chessimals game.',
|
|
62175
62342
|
chessimalsOnlineWaiting: 'Waiting',
|
|
62343
|
+
chessimalsOnlinePending: 'Pending',
|
|
62176
62344
|
chessimalsOnlinePlayer: 'Online',
|
|
62177
62345
|
chessimalsSpectator: 'Spectator',
|
|
62178
62346
|
chessimalsOnlineViewer: 'This game already has two players. You can watch it play out.',
|
|
@@ -62180,6 +62348,14 @@ const MINI_GAMES_I18N = {
|
|
|
62180
62348
|
chessimalsYourTurnBody: 'Tap one of your pawns to see its moves and play when you are ready.',
|
|
62181
62349
|
chessimalsWaitingTurn: 'Wait for the other player to move.',
|
|
62182
62350
|
chessimalsRematch: 'Request rematch',
|
|
62351
|
+
chessimalsAcceptRematch: 'Accept rematch',
|
|
62352
|
+
chessimalsRematchRequestedAction: 'Rematch requested',
|
|
62353
|
+
chessimalsRematchRequestedTitle: 'Rematch requested',
|
|
62354
|
+
chessimalsRematchRequestedBody: 'Waiting for the other player to accept before colors are drawn and the next game starts.',
|
|
62355
|
+
chessimalsRematchIncomingTitle: 'Rematch requested',
|
|
62356
|
+
chessimalsRematchIncomingBody: 'Accept to draw colors and start a new game.',
|
|
62357
|
+
chessimalsRematchRequestedToast: 'Rematch requested. Wait for the other player to accept.',
|
|
62358
|
+
chessimalsRematchAccepted: 'Rematch accepted. Preparing the new game.',
|
|
62183
62359
|
chessimalsOnlineError: 'We could not open this game. Check the code or try again.',
|
|
62184
62360
|
chessimalsResumeSplashTitle: 'Resuming game',
|
|
62185
62361
|
chessimalsResumeSplashBody: 'Loading the board and syncing the turn.',
|
|
@@ -62586,7 +62762,9 @@ class ChessimalsGameComponent {
|
|
|
62586
62762
|
this.onlineLoading = signal(false);
|
|
62587
62763
|
this.onlineError = signal('');
|
|
62588
62764
|
this.onlineUid = signal(undefined);
|
|
62765
|
+
this.onlineHistory = signal([]);
|
|
62589
62766
|
this.resumeSplashVisible = signal(false);
|
|
62767
|
+
this.rematchLoading = signal(false);
|
|
62590
62768
|
this.loggedInUser = this.auth.user;
|
|
62591
62769
|
this.localPlayerProfile = computed(() => this.playerProfiles.activeProfile());
|
|
62592
62770
|
this.localPlayerAvatar = computed(() => this.localPlayerProfile()?.avatar ?? '🌟');
|
|
@@ -62647,6 +62825,8 @@ class ChessimalsGameComponent {
|
|
|
62647
62825
|
return 'spectator';
|
|
62648
62826
|
if (this.online.isHostWaiting(game, uid))
|
|
62649
62827
|
return 'waiting';
|
|
62828
|
+
if (game.status === 'waiting' && game.online?.pendingGuest?.uid === uid)
|
|
62829
|
+
return 'pending';
|
|
62650
62830
|
return this.online.participantSide(game, uid) ?? 'spectator';
|
|
62651
62831
|
});
|
|
62652
62832
|
this.canPlayCurrentTurn = computed(() => {
|
|
@@ -62658,6 +62838,22 @@ class ChessimalsGameComponent {
|
|
|
62658
62838
|
return true;
|
|
62659
62839
|
return this.onlineRole() === game.currentTurn;
|
|
62660
62840
|
});
|
|
62841
|
+
this.rematchState = computed(() => {
|
|
62842
|
+
const game = this.game();
|
|
62843
|
+
if (game.mode !== 'online' || game.status !== 'finished')
|
|
62844
|
+
return 'none';
|
|
62845
|
+
const uid = this.onlineUid();
|
|
62846
|
+
if (!uid || this.onlineRole() === 'spectator')
|
|
62847
|
+
return 'none';
|
|
62848
|
+
const requests = game.online?.rematchRequests ?? [];
|
|
62849
|
+
const hasMine = requests.includes(uid);
|
|
62850
|
+
const hasOther = requests.some((item) => item !== uid);
|
|
62851
|
+
if (hasOther && !hasMine)
|
|
62852
|
+
return 'incoming';
|
|
62853
|
+
if (hasMine)
|
|
62854
|
+
return 'requested';
|
|
62855
|
+
return 'none';
|
|
62856
|
+
});
|
|
62661
62857
|
this.currentTurnTitle = computed(() => this.t('chessimalsCurrentTurn').replace('{player}', this.playerLabel(this.game().currentTurn)));
|
|
62662
62858
|
this.winTitle = computed(() => this.t('chessimalsWinTitle').replace('{player}', this.playerLabel(this.game().winner ?? 'white')));
|
|
62663
62859
|
this.winBody = computed(() => {
|
|
@@ -62706,6 +62902,7 @@ class ChessimalsGameComponent {
|
|
|
62706
62902
|
shape: 'round',
|
|
62707
62903
|
type: 'button',
|
|
62708
62904
|
token: 'cancel',
|
|
62905
|
+
handler: () => this.closeConfirmModal(),
|
|
62709
62906
|
},
|
|
62710
62907
|
{
|
|
62711
62908
|
text: action === 'resign'
|
|
@@ -62719,6 +62916,7 @@ class ChessimalsGameComponent {
|
|
|
62719
62916
|
shape: 'round',
|
|
62720
62917
|
type: 'button',
|
|
62721
62918
|
token: 'confirm',
|
|
62919
|
+
handler: () => this.confirmPendingAction('confirm'),
|
|
62722
62920
|
},
|
|
62723
62921
|
];
|
|
62724
62922
|
});
|
|
@@ -62732,6 +62930,17 @@ class ChessimalsGameComponent {
|
|
|
62732
62930
|
});
|
|
62733
62931
|
this.i18n.registerDefaults('MiniGames', MINI_GAMES_I18N);
|
|
62734
62932
|
this.audio.stopMusic();
|
|
62933
|
+
effect(() => {
|
|
62934
|
+
const user = this.loggedInUser();
|
|
62935
|
+
if (user) {
|
|
62936
|
+
this.queueHistoryWatch();
|
|
62937
|
+
return;
|
|
62938
|
+
}
|
|
62939
|
+
this.historyUid = undefined;
|
|
62940
|
+
this.historySubscription?.unsubscribe();
|
|
62941
|
+
this.historySubscription = undefined;
|
|
62942
|
+
this.onlineHistory.set([]);
|
|
62943
|
+
});
|
|
62735
62944
|
}
|
|
62736
62945
|
ngOnDestroy() {
|
|
62737
62946
|
this.resetFinishedLocalGameForNextVisit(true);
|
|
@@ -62742,7 +62951,10 @@ class ChessimalsGameComponent {
|
|
|
62742
62951
|
clearTimeout(this.moveAnimationTimer);
|
|
62743
62952
|
if (this.botTurnTimer)
|
|
62744
62953
|
clearTimeout(this.botTurnTimer);
|
|
62954
|
+
if (this.historyWatchTimer)
|
|
62955
|
+
clearTimeout(this.historyWatchTimer);
|
|
62745
62956
|
this.onlineSubscription?.unsubscribe();
|
|
62957
|
+
this.historySubscription?.unsubscribe();
|
|
62746
62958
|
}
|
|
62747
62959
|
ngOnInit() {
|
|
62748
62960
|
this.routeSubscription.add(this.router.events.subscribe((event) => {
|
|
@@ -62787,6 +62999,7 @@ class ChessimalsGameComponent {
|
|
|
62787
62999
|
try {
|
|
62788
63000
|
const game = await this.online.createGame(this.selectedBoardSize());
|
|
62789
63001
|
this.onlineUid.set(this.online.currentUid);
|
|
63002
|
+
this.queueHistoryWatch();
|
|
62790
63003
|
this.openedOnlineGameId = game.id;
|
|
62791
63004
|
this.watchOnlineGame(game.id);
|
|
62792
63005
|
this.game.set(game);
|
|
@@ -62836,6 +63049,7 @@ class ChessimalsGameComponent {
|
|
|
62836
63049
|
try {
|
|
62837
63050
|
await this.online.joinGame(normalizedGameId);
|
|
62838
63051
|
this.onlineUid.set(this.online.currentUid);
|
|
63052
|
+
this.queueHistoryWatch();
|
|
62839
63053
|
this.openedOnlineGameId = normalizedGameId;
|
|
62840
63054
|
this.watchOnlineGame(normalizedGameId);
|
|
62841
63055
|
this.screen.set('game');
|
|
@@ -63169,6 +63383,8 @@ class ChessimalsGameComponent {
|
|
|
63169
63383
|
const role = this.onlineRole();
|
|
63170
63384
|
if (role === 'waiting')
|
|
63171
63385
|
return this.t('chessimalsOnlineWaiting');
|
|
63386
|
+
if (role === 'pending')
|
|
63387
|
+
return this.t('chessimalsOnlinePending');
|
|
63172
63388
|
if (role === 'spectator')
|
|
63173
63389
|
return this.t('chessimalsSpectator');
|
|
63174
63390
|
return this.t('chessimalsOnlinePlayer');
|
|
@@ -63207,17 +63423,126 @@ class ChessimalsGameComponent {
|
|
|
63207
63423
|
}
|
|
63208
63424
|
await this.copyOnlineLink();
|
|
63209
63425
|
}
|
|
63426
|
+
canReviewPendingGuest() {
|
|
63427
|
+
const game = this.game();
|
|
63428
|
+
const uid = this.onlineUid();
|
|
63429
|
+
return !!uid
|
|
63430
|
+
&& game.mode === 'online'
|
|
63431
|
+
&& game.status === 'waiting'
|
|
63432
|
+
&& game.online?.lobby?.uid === uid
|
|
63433
|
+
&& !!game.online.pendingGuest;
|
|
63434
|
+
}
|
|
63435
|
+
pendingGuestName() {
|
|
63436
|
+
return this.game().online?.pendingGuest?.name ?? this.t('defaultPlayerName');
|
|
63437
|
+
}
|
|
63438
|
+
waitingTitle() {
|
|
63439
|
+
if (this.canReviewPendingGuest())
|
|
63440
|
+
return this.t('chessimalsJoinRequestTitle');
|
|
63441
|
+
if (this.onlineRole() === 'pending')
|
|
63442
|
+
return this.t('chessimalsLobbyGuestWaitingTitle');
|
|
63443
|
+
return this.t('chessimalsWaitingTitle');
|
|
63444
|
+
}
|
|
63445
|
+
waitingBody() {
|
|
63446
|
+
if (this.canReviewPendingGuest()) {
|
|
63447
|
+
return this.t('chessimalsJoinRequestBody').replace('{player}', this.pendingGuestName());
|
|
63448
|
+
}
|
|
63449
|
+
if (this.onlineRole() === 'pending')
|
|
63450
|
+
return this.t('chessimalsLobbyGuestWaitingBody');
|
|
63451
|
+
return this.t('chessimalsWaitingBody');
|
|
63452
|
+
}
|
|
63453
|
+
async acceptOnlineGuest() {
|
|
63454
|
+
if (!this.canReviewPendingGuest())
|
|
63455
|
+
return;
|
|
63456
|
+
this.onlineLoading.set(true);
|
|
63457
|
+
try {
|
|
63458
|
+
await this.online.acceptGuest(this.game().id);
|
|
63459
|
+
this.toast.show({ message: this.t('chessimalsGuestAccepted'), color: 'dark', duration: 2200, position: 'top' });
|
|
63460
|
+
this.audio.flip();
|
|
63461
|
+
}
|
|
63462
|
+
catch (error) {
|
|
63463
|
+
console.warn('[Chessimals] accept guest failed', error);
|
|
63464
|
+
this.onlineError.set(this.t('chessimalsOnlineError'));
|
|
63465
|
+
this.audio.miss();
|
|
63466
|
+
}
|
|
63467
|
+
finally {
|
|
63468
|
+
this.onlineLoading.set(false);
|
|
63469
|
+
}
|
|
63470
|
+
}
|
|
63471
|
+
async rejectOnlineGuest() {
|
|
63472
|
+
if (!this.canReviewPendingGuest())
|
|
63473
|
+
return;
|
|
63474
|
+
this.onlineLoading.set(true);
|
|
63475
|
+
try {
|
|
63476
|
+
await this.online.rejectGuest(this.game().id);
|
|
63477
|
+
this.toast.show({ message: this.t('chessimalsGuestRejected'), color: 'dark', duration: 2200, position: 'top' });
|
|
63478
|
+
this.audio.miss();
|
|
63479
|
+
}
|
|
63480
|
+
catch (error) {
|
|
63481
|
+
console.warn('[Chessimals] reject guest failed', error);
|
|
63482
|
+
this.onlineError.set(this.t('chessimalsOnlineError'));
|
|
63483
|
+
this.audio.miss();
|
|
63484
|
+
}
|
|
63485
|
+
finally {
|
|
63486
|
+
this.onlineLoading.set(false);
|
|
63487
|
+
}
|
|
63488
|
+
}
|
|
63489
|
+
openHistoryGame(entry) {
|
|
63490
|
+
this.onlineJoinCode.set(entry.gameId);
|
|
63491
|
+
void this.openOnlineGame(entry.gameId);
|
|
63492
|
+
void this.router.navigateByUrl(this.chessimalsGameRoute(entry.gameId));
|
|
63493
|
+
}
|
|
63494
|
+
historyOutcomeLabel(entry) {
|
|
63495
|
+
const outcomeKey = `chessimalsHistory${entry.outcome
|
|
63496
|
+
.split('_')
|
|
63497
|
+
.map((part) => this.capitalize(part))
|
|
63498
|
+
.join('')}`;
|
|
63499
|
+
const opponent = entry.opponentName
|
|
63500
|
+
? ` · ${this.t('chessimalsHistoryAgainst').replace('{player}', entry.opponentName)}`
|
|
63501
|
+
: '';
|
|
63502
|
+
return `${this.t(outcomeKey)}${opponent}`;
|
|
63503
|
+
}
|
|
63210
63504
|
async requestOnlineRematch() {
|
|
63211
63505
|
if (this.game().mode !== 'online')
|
|
63212
63506
|
return;
|
|
63507
|
+
if (this.rematchState() === 'requested' || this.rematchLoading())
|
|
63508
|
+
return;
|
|
63509
|
+
const accepting = this.rematchState() === 'incoming';
|
|
63510
|
+
this.rematchLoading.set(true);
|
|
63213
63511
|
try {
|
|
63214
63512
|
await this.online.requestRematch(this.game().id);
|
|
63513
|
+
this.toast.show({
|
|
63514
|
+
message: this.t(accepting ? 'chessimalsRematchAccepted' : 'chessimalsRematchRequestedToast'),
|
|
63515
|
+
color: 'dark',
|
|
63516
|
+
duration: 2400,
|
|
63517
|
+
position: 'top',
|
|
63518
|
+
});
|
|
63215
63519
|
this.audio.flip();
|
|
63216
63520
|
}
|
|
63217
63521
|
catch {
|
|
63218
63522
|
this.onlineError.set(this.t('chessimalsOnlineError'));
|
|
63219
63523
|
this.audio.miss();
|
|
63220
63524
|
}
|
|
63525
|
+
finally {
|
|
63526
|
+
this.rematchLoading.set(false);
|
|
63527
|
+
}
|
|
63528
|
+
}
|
|
63529
|
+
queueHistoryWatch() {
|
|
63530
|
+
if (this.historyWatchTimer)
|
|
63531
|
+
clearTimeout(this.historyWatchTimer);
|
|
63532
|
+
this.historyWatchTimer = setTimeout(() => this.watchOnlineHistory(), 220);
|
|
63533
|
+
}
|
|
63534
|
+
watchOnlineHistory() {
|
|
63535
|
+
const uid = this.online.currentUid;
|
|
63536
|
+
if (!uid)
|
|
63537
|
+
return;
|
|
63538
|
+
if (this.historyUid === uid && this.historySubscription)
|
|
63539
|
+
return;
|
|
63540
|
+
this.historyUid = uid;
|
|
63541
|
+
this.historySubscription?.unsubscribe();
|
|
63542
|
+
this.historySubscription = this.online.watchHistory().subscribe({
|
|
63543
|
+
next: (history) => this.onlineHistory.set(history),
|
|
63544
|
+
error: () => this.onlineHistory.set([]),
|
|
63545
|
+
});
|
|
63221
63546
|
}
|
|
63222
63547
|
unlockedLabel(color) {
|
|
63223
63548
|
return this.game().players[color].powerUnlocked ? this.t('chessimalsUnlocked') : this.t('chessimalsLocked');
|
|
@@ -63392,6 +63717,28 @@ class ChessimalsGameComponent {
|
|
|
63392
63717
|
</button>
|
|
63393
63718
|
</div>
|
|
63394
63719
|
</article>
|
|
63720
|
+
|
|
63721
|
+
@if (onlineHistory().length) {
|
|
63722
|
+
<article class="chessimals-online chessimals-history">
|
|
63723
|
+
<div class="chessimals-history__heading">
|
|
63724
|
+
<div>
|
|
63725
|
+
<h2>{{ t('chessimalsHistoryTitle') }}</h2>
|
|
63726
|
+
<p>{{ t('chessimalsHistoryBody') }}</p>
|
|
63727
|
+
</div>
|
|
63728
|
+
</div>
|
|
63729
|
+
<div class="chessimals-history__list">
|
|
63730
|
+
@for (entry of onlineHistory(); track entry.gameId) {
|
|
63731
|
+
<button type="button" class="chessimals-history__item" (click)="openHistoryGame(entry)">
|
|
63732
|
+
<span>
|
|
63733
|
+
<strong>{{ entry.gameId }}</strong>
|
|
63734
|
+
<small>{{ historyOutcomeLabel(entry) }}</small>
|
|
63735
|
+
</span>
|
|
63736
|
+
<em>{{ t('chessimalsHistoryOpen') }}</em>
|
|
63737
|
+
</button>
|
|
63738
|
+
}
|
|
63739
|
+
</div>
|
|
63740
|
+
</article>
|
|
63741
|
+
}
|
|
63395
63742
|
</section>
|
|
63396
63743
|
} @else {
|
|
63397
63744
|
<section class="chessimals-game">
|
|
@@ -63440,20 +63787,40 @@ class ChessimalsGameComponent {
|
|
|
63440
63787
|
@if (game().mode === 'online' && game().status === 'waiting') {
|
|
63441
63788
|
<article class="chessimals-online chessimals-online--waiting">
|
|
63442
63789
|
<div>
|
|
63443
|
-
<h2>{{
|
|
63444
|
-
<p>{{
|
|
63790
|
+
<h2>{{ waitingTitle() }}</h2>
|
|
63791
|
+
<p>{{ waitingBody() }}</p>
|
|
63445
63792
|
</div>
|
|
63793
|
+
@if (canReviewPendingGuest()) {
|
|
63794
|
+
<div class="chessimals-pending-player">
|
|
63795
|
+
<span class="chessimals-player-strip__avatar" aria-hidden="true">
|
|
63796
|
+
{{ game().online?.pendingGuest?.avatar ?? '♟️' }}
|
|
63797
|
+
</span>
|
|
63798
|
+
<div>
|
|
63799
|
+
<small>{{ t('chessimalsJoinRequestPlayer') }}</small>
|
|
63800
|
+
<strong>{{ pendingGuestName() }}</strong>
|
|
63801
|
+
</div>
|
|
63802
|
+
</div>
|
|
63803
|
+
}
|
|
63446
63804
|
<div class="chessimals-game-code">
|
|
63447
63805
|
<small>{{ t('chessimalsGameCode') }}</small>
|
|
63448
63806
|
<strong>{{ game().id }}</strong>
|
|
63449
63807
|
</div>
|
|
63450
63808
|
<div class="chessimals-online-actions">
|
|
63451
|
-
|
|
63452
|
-
|
|
63453
|
-
|
|
63454
|
-
|
|
63455
|
-
|
|
63456
|
-
|
|
63809
|
+
@if (canReviewPendingGuest()) {
|
|
63810
|
+
<button class="chessimals-secondary" type="button" (click)="rejectOnlineGuest()">
|
|
63811
|
+
{{ t('chessimalsRejectGuest') }}
|
|
63812
|
+
</button>
|
|
63813
|
+
<button class="chessimals-primary" type="button" (click)="acceptOnlineGuest()">
|
|
63814
|
+
{{ t('chessimalsAcceptGuest') }}
|
|
63815
|
+
</button>
|
|
63816
|
+
} @else {
|
|
63817
|
+
<button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
|
|
63818
|
+
{{ t('chessimalsCopyLink') }}
|
|
63819
|
+
</button>
|
|
63820
|
+
<button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
|
|
63821
|
+
{{ t('chessimalsShareLink') }}
|
|
63822
|
+
</button>
|
|
63823
|
+
}
|
|
63457
63824
|
</div>
|
|
63458
63825
|
</article>
|
|
63459
63826
|
}
|
|
@@ -63611,14 +63978,46 @@ class ChessimalsGameComponent {
|
|
|
63611
63978
|
</article>
|
|
63612
63979
|
}
|
|
63613
63980
|
|
|
63981
|
+
@if (rematchState() !== 'none') {
|
|
63982
|
+
<article class="chessimals-rematch-status" [class.is-incoming]="rematchState() === 'incoming'">
|
|
63983
|
+
<div>
|
|
63984
|
+
<strong>
|
|
63985
|
+
{{
|
|
63986
|
+
rematchState() === 'incoming'
|
|
63987
|
+
? t('chessimalsRematchIncomingTitle')
|
|
63988
|
+
: t('chessimalsRematchRequestedTitle')
|
|
63989
|
+
}}
|
|
63990
|
+
</strong>
|
|
63991
|
+
<p>
|
|
63992
|
+
{{
|
|
63993
|
+
rematchState() === 'incoming'
|
|
63994
|
+
? t('chessimalsRematchIncomingBody')
|
|
63995
|
+
: t('chessimalsRematchRequestedBody')
|
|
63996
|
+
}}
|
|
63997
|
+
</p>
|
|
63998
|
+
</div>
|
|
63999
|
+
</article>
|
|
64000
|
+
}
|
|
64001
|
+
|
|
63614
64002
|
<div class="chessimals-actions">
|
|
63615
64003
|
@if (game().status !== 'finished') {
|
|
63616
64004
|
<button class="chessimals-secondary" type="button" (click)="requestResign()">
|
|
63617
64005
|
{{ t('chessimalsResign') }}
|
|
63618
64006
|
</button>
|
|
63619
64007
|
} @else if (game().mode === 'online' && onlineRole() !== 'spectator') {
|
|
63620
|
-
<button
|
|
63621
|
-
|
|
64008
|
+
<button
|
|
64009
|
+
class="chessimals-secondary"
|
|
64010
|
+
type="button"
|
|
64011
|
+
[disabled]="rematchState() === 'requested' || rematchLoading()"
|
|
64012
|
+
(click)="requestOnlineRematch()"
|
|
64013
|
+
>
|
|
64014
|
+
{{
|
|
64015
|
+
rematchState() === 'incoming'
|
|
64016
|
+
? t('chessimalsAcceptRematch')
|
|
64017
|
+
: rematchState() === 'requested'
|
|
64018
|
+
? t('chessimalsRematchRequestedAction')
|
|
64019
|
+
: t('chessimalsRematch')
|
|
64020
|
+
}}
|
|
63622
64021
|
</button>
|
|
63623
64022
|
}
|
|
63624
64023
|
@if (game().mode !== 'online') {
|
|
@@ -63714,7 +64113,7 @@ class ChessimalsGameComponent {
|
|
|
63714
64113
|
/>
|
|
63715
64114
|
</ng-template>
|
|
63716
64115
|
</ion-modal>
|
|
63717
|
-
`, isInline: true, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}@keyframes chessimals-spin{to{transform:rotate(360deg)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online__loading{display:flex;align-items:center;gap:.625rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:999px;padding:.65rem .85rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08);color:var(--chessimals-text);font-size:.92rem;font-weight:900}.chessimals-online__loading span{width:1rem;height:1rem;border:.15rem solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-top-color:var(--chessimals-primary);border-radius:999px;animation:chessimals-spin .75s linear infinite}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ModalLayoutComponent, selector: "val-modal-layout", inputs: ["title", "subtitle", "closeLabel", "showClose", "actions", "actionsAlign", "footer", "footerClass"], outputs: ["close", "actionClick"] }, { kind: "component", type: UserAvatarComponent, selector: "val-user-avatar", inputs: ["props"], outputs: ["onClick"] }] }); }
|
|
64116
|
+
`, isInline: true, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}@keyframes chessimals-spin{to{transform:rotate(360deg)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online__loading{display:flex;align-items:center;gap:.625rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:999px;padding:.65rem .85rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08);color:var(--chessimals-text);font-size:.92rem;font-weight:900}.chessimals-online__loading span{width:1rem;height:1rem;border:.15rem solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-top-color:var(--chessimals-primary);border-radius:999px;animation:chessimals-spin .75s linear infinite}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-history{gap:.75rem}.chessimals-history__heading{display:flex;align-items:start;justify-content:space-between;gap:.75rem}.chessimals-history__list{display:grid;gap:.5rem}.chessimals-history__item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;border:1px solid var(--chessimals-border);border-radius:1rem;padding:.7rem .8rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-history__item span{display:grid;gap:.1rem;min-width:0}.chessimals-history__item strong{font-weight:950;letter-spacing:.04em}.chessimals-history__item small{overflow:hidden;color:var(--chessimals-muted);font-size:.82rem;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.chessimals-history__item em{flex:0 0 auto;color:var(--chessimals-primary);font-size:.86rem;font-style:normal;font-weight:950}.chessimals-pending-player{display:flex;align-items:center;gap:.7rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:1rem;padding:.75rem;background:var(--chessimals-soft)}.chessimals-pending-player div{display:grid;gap:.1rem;min-width:0}.chessimals-pending-player small{color:var(--chessimals-muted);font-size:.72rem;font-weight:950;letter-spacing:.07em;text-transform:uppercase}.chessimals-pending-player strong{overflow:hidden;font-size:1.05rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result,.chessimals-rematch-status{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-rematch-status{order:5;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12),transparent),var(--chessimals-panel)}.chessimals-rematch-status.is-incoming{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.38);background:linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.14),transparent),var(--chessimals-panel)}.chessimals-rematch-status strong{font-size:1rem;font-weight:950}.chessimals-rematch-status p{margin:0;color:var(--chessimals-muted);font-size:.88rem;line-height:1.35}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-rematch-status strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ModalLayoutComponent, selector: "val-modal-layout", inputs: ["title", "subtitle", "closeLabel", "showClose", "actions", "actionsAlign", "footer", "footerClass"], outputs: ["close", "actionClick"] }, { kind: "component", type: UserAvatarComponent, selector: "val-user-avatar", inputs: ["props"], outputs: ["onClick"] }] }); }
|
|
63718
64117
|
}
|
|
63719
64118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChessimalsGameComponent, decorators: [{
|
|
63720
64119
|
type: Component,
|
|
@@ -63826,6 +64225,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
63826
64225
|
</button>
|
|
63827
64226
|
</div>
|
|
63828
64227
|
</article>
|
|
64228
|
+
|
|
64229
|
+
@if (onlineHistory().length) {
|
|
64230
|
+
<article class="chessimals-online chessimals-history">
|
|
64231
|
+
<div class="chessimals-history__heading">
|
|
64232
|
+
<div>
|
|
64233
|
+
<h2>{{ t('chessimalsHistoryTitle') }}</h2>
|
|
64234
|
+
<p>{{ t('chessimalsHistoryBody') }}</p>
|
|
64235
|
+
</div>
|
|
64236
|
+
</div>
|
|
64237
|
+
<div class="chessimals-history__list">
|
|
64238
|
+
@for (entry of onlineHistory(); track entry.gameId) {
|
|
64239
|
+
<button type="button" class="chessimals-history__item" (click)="openHistoryGame(entry)">
|
|
64240
|
+
<span>
|
|
64241
|
+
<strong>{{ entry.gameId }}</strong>
|
|
64242
|
+
<small>{{ historyOutcomeLabel(entry) }}</small>
|
|
64243
|
+
</span>
|
|
64244
|
+
<em>{{ t('chessimalsHistoryOpen') }}</em>
|
|
64245
|
+
</button>
|
|
64246
|
+
}
|
|
64247
|
+
</div>
|
|
64248
|
+
</article>
|
|
64249
|
+
}
|
|
63829
64250
|
</section>
|
|
63830
64251
|
} @else {
|
|
63831
64252
|
<section class="chessimals-game">
|
|
@@ -63874,20 +64295,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
63874
64295
|
@if (game().mode === 'online' && game().status === 'waiting') {
|
|
63875
64296
|
<article class="chessimals-online chessimals-online--waiting">
|
|
63876
64297
|
<div>
|
|
63877
|
-
<h2>{{
|
|
63878
|
-
<p>{{
|
|
64298
|
+
<h2>{{ waitingTitle() }}</h2>
|
|
64299
|
+
<p>{{ waitingBody() }}</p>
|
|
63879
64300
|
</div>
|
|
64301
|
+
@if (canReviewPendingGuest()) {
|
|
64302
|
+
<div class="chessimals-pending-player">
|
|
64303
|
+
<span class="chessimals-player-strip__avatar" aria-hidden="true">
|
|
64304
|
+
{{ game().online?.pendingGuest?.avatar ?? '♟️' }}
|
|
64305
|
+
</span>
|
|
64306
|
+
<div>
|
|
64307
|
+
<small>{{ t('chessimalsJoinRequestPlayer') }}</small>
|
|
64308
|
+
<strong>{{ pendingGuestName() }}</strong>
|
|
64309
|
+
</div>
|
|
64310
|
+
</div>
|
|
64311
|
+
}
|
|
63880
64312
|
<div class="chessimals-game-code">
|
|
63881
64313
|
<small>{{ t('chessimalsGameCode') }}</small>
|
|
63882
64314
|
<strong>{{ game().id }}</strong>
|
|
63883
64315
|
</div>
|
|
63884
64316
|
<div class="chessimals-online-actions">
|
|
63885
|
-
|
|
63886
|
-
|
|
63887
|
-
|
|
63888
|
-
|
|
63889
|
-
|
|
63890
|
-
|
|
64317
|
+
@if (canReviewPendingGuest()) {
|
|
64318
|
+
<button class="chessimals-secondary" type="button" (click)="rejectOnlineGuest()">
|
|
64319
|
+
{{ t('chessimalsRejectGuest') }}
|
|
64320
|
+
</button>
|
|
64321
|
+
<button class="chessimals-primary" type="button" (click)="acceptOnlineGuest()">
|
|
64322
|
+
{{ t('chessimalsAcceptGuest') }}
|
|
64323
|
+
</button>
|
|
64324
|
+
} @else {
|
|
64325
|
+
<button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
|
|
64326
|
+
{{ t('chessimalsCopyLink') }}
|
|
64327
|
+
</button>
|
|
64328
|
+
<button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
|
|
64329
|
+
{{ t('chessimalsShareLink') }}
|
|
64330
|
+
</button>
|
|
64331
|
+
}
|
|
63891
64332
|
</div>
|
|
63892
64333
|
</article>
|
|
63893
64334
|
}
|
|
@@ -64045,14 +64486,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
64045
64486
|
</article>
|
|
64046
64487
|
}
|
|
64047
64488
|
|
|
64489
|
+
@if (rematchState() !== 'none') {
|
|
64490
|
+
<article class="chessimals-rematch-status" [class.is-incoming]="rematchState() === 'incoming'">
|
|
64491
|
+
<div>
|
|
64492
|
+
<strong>
|
|
64493
|
+
{{
|
|
64494
|
+
rematchState() === 'incoming'
|
|
64495
|
+
? t('chessimalsRematchIncomingTitle')
|
|
64496
|
+
: t('chessimalsRematchRequestedTitle')
|
|
64497
|
+
}}
|
|
64498
|
+
</strong>
|
|
64499
|
+
<p>
|
|
64500
|
+
{{
|
|
64501
|
+
rematchState() === 'incoming'
|
|
64502
|
+
? t('chessimalsRematchIncomingBody')
|
|
64503
|
+
: t('chessimalsRematchRequestedBody')
|
|
64504
|
+
}}
|
|
64505
|
+
</p>
|
|
64506
|
+
</div>
|
|
64507
|
+
</article>
|
|
64508
|
+
}
|
|
64509
|
+
|
|
64048
64510
|
<div class="chessimals-actions">
|
|
64049
64511
|
@if (game().status !== 'finished') {
|
|
64050
64512
|
<button class="chessimals-secondary" type="button" (click)="requestResign()">
|
|
64051
64513
|
{{ t('chessimalsResign') }}
|
|
64052
64514
|
</button>
|
|
64053
64515
|
} @else if (game().mode === 'online' && onlineRole() !== 'spectator') {
|
|
64054
|
-
<button
|
|
64055
|
-
|
|
64516
|
+
<button
|
|
64517
|
+
class="chessimals-secondary"
|
|
64518
|
+
type="button"
|
|
64519
|
+
[disabled]="rematchState() === 'requested' || rematchLoading()"
|
|
64520
|
+
(click)="requestOnlineRematch()"
|
|
64521
|
+
>
|
|
64522
|
+
{{
|
|
64523
|
+
rematchState() === 'incoming'
|
|
64524
|
+
? t('chessimalsAcceptRematch')
|
|
64525
|
+
: rematchState() === 'requested'
|
|
64526
|
+
? t('chessimalsRematchRequestedAction')
|
|
64527
|
+
: t('chessimalsRematch')
|
|
64528
|
+
}}
|
|
64056
64529
|
</button>
|
|
64057
64530
|
}
|
|
64058
64531
|
@if (game().mode !== 'online') {
|
|
@@ -64148,7 +64621,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
64148
64621
|
/>
|
|
64149
64622
|
</ng-template>
|
|
64150
64623
|
</ion-modal>
|
|
64151
|
-
`, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}@keyframes chessimals-spin{to{transform:rotate(360deg)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online__loading{display:flex;align-items:center;gap:.625rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:999px;padding:.65rem .85rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08);color:var(--chessimals-text);font-size:.92rem;font-weight:900}.chessimals-online__loading span{width:1rem;height:1rem;border:.15rem solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-top-color:var(--chessimals-primary);border-radius:999px;animation:chessimals-spin .75s linear infinite}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"] }]
|
|
64624
|
+
`, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}@keyframes chessimals-spin{to{transform:rotate(360deg)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online__loading{display:flex;align-items:center;gap:.625rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:999px;padding:.65rem .85rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08);color:var(--chessimals-text);font-size:.92rem;font-weight:900}.chessimals-online__loading span{width:1rem;height:1rem;border:.15rem solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-top-color:var(--chessimals-primary);border-radius:999px;animation:chessimals-spin .75s linear infinite}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-history{gap:.75rem}.chessimals-history__heading{display:flex;align-items:start;justify-content:space-between;gap:.75rem}.chessimals-history__list{display:grid;gap:.5rem}.chessimals-history__item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;border:1px solid var(--chessimals-border);border-radius:1rem;padding:.7rem .8rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-history__item span{display:grid;gap:.1rem;min-width:0}.chessimals-history__item strong{font-weight:950;letter-spacing:.04em}.chessimals-history__item small{overflow:hidden;color:var(--chessimals-muted);font-size:.82rem;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.chessimals-history__item em{flex:0 0 auto;color:var(--chessimals-primary);font-size:.86rem;font-style:normal;font-weight:950}.chessimals-pending-player{display:flex;align-items:center;gap:.7rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:1rem;padding:.75rem;background:var(--chessimals-soft)}.chessimals-pending-player div{display:grid;gap:.1rem;min-width:0}.chessimals-pending-player small{color:var(--chessimals-muted);font-size:.72rem;font-weight:950;letter-spacing:.07em;text-transform:uppercase}.chessimals-pending-player strong{overflow:hidden;font-size:1.05rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result,.chessimals-rematch-status{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-rematch-status{order:5;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12),transparent),var(--chessimals-panel)}.chessimals-rematch-status.is-incoming{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.38);background:linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.14),transparent),var(--chessimals-panel)}.chessimals-rematch-status strong{font-size:1rem;font-weight:950}.chessimals-rematch-status p{margin:0;color:var(--chessimals-muted);font-size:.88rem;line-height:1.35}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-rematch-status strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"] }]
|
|
64152
64625
|
}], ctorParameters: () => [], propDecorators: { boardAnchor: [{
|
|
64153
64626
|
type: ViewChild,
|
|
64154
64627
|
args: ['boardAnchor']
|