-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc_app_kingdom_kingdom_module_ts-es2015.js.map
1 lines (1 loc) · 357 KB
/
src_app_kingdom_kingdom_module_ts-es2015.js.map
1
{"version":3,"file":"src_app_kingdom_kingdom_module_ts-es2015.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAC6D;AACF;AACV;AACoB;AACX;AAEL;AACO;AAED;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICQrB,sFAAwD;IACtD,mFAAuL;IAAzJ,0XAAoC,IAAI,IAAC;IAAgH,4DAAe;IACxM,4DAAkB;;;IADwD,0DAAmD;IAAnD,0HAAmD;;;;IAG7H,2EAA4F;;IAC1F,mFAA8J;IAAhI,8LAAS,wBAAwB,IAAC,kWAAoB,oCAAwB,GAAG,IAAI,IAAnD;IAA8F,4DAAe;IAC/K,4DAAW;;;;;IAFwB,qKAAwD;IAC4B,0DAAwC;IAAxC,4GAAwC;;;IANjK,wEAAyD;IACvD,oKAEkB;IAElB,sJAEW;IACb,qEAAe;;;;IAST,6EAA6H;IAAlD,4dAA+B,EAAE,kCAAgB;IAC1H,2EAAU;IAAA,gEAAK;IAAA,4DAAW;IAC5B,4DAAS;;;;IAJX,qFAAgG;IAC9F,4EAA+F;IAA/E,yfAAmC;IAAnD,4DAA+F;IAC/F,oLAES;IACX,4DAAiB;;;;IAJC,0DAAmC;IAAnC,qGAAmC;IAC/B,0DAA2B;IAA3B,kGAA2B;;;;IAS/C,6EAA+H;IAApD,4dAA+B,IAAI,kCAAgB;IAC5H,2EAAU;IAAA,gEAAK;IAAA,4DAAW;IAC5B,4DAAS;;;;IANX,qFAAqG;IACnG,4EAAsH;IAAtG,yfAAmC;IAAnD,4DAAsH;IACtH,uFAA2E;IAC3E,oFAA6D;IAC7D,oLAES;IACX,4DAAiB;;;;;IANC,0DAAmC;IAAnC,qGAAmC;IAClB,0DAAiB;IAAjB,qEAAiB;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AuC;QACpC,0DAA8C;QAA9C,gKAA8C;QAGU,2DAAuC;QAAvC,kKAAuC;QAKhG,0DAA2C;QAA3C,sKAA2C;QAEb,0DAAsB;QAAtB,4FAAsB;QAgBnE,0DAAsD;QAAtD,gSAAsD;gyED/FvD,CAAC,2EAAsB,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAGxD,eAAe;IAD3B,oEAAY,EAAE;GACF,eAAe,CAiD3B;AAjD2B","sources":["./src/app/kingdom/archive/archive.component.ts","./src/app/kingdom/archive/archive.component.html","./src/app/kingdom/archive/report.component.ts","./src/app/kingdom/auction/auction.component.ts","./src/app/kingdom/auction/auction.component.html","./src/app/kingdom/auction/bid.component.ts","./src/app/kingdom/census/battle.component.ts","./src/app/kingdom/census/census.component.ts","./src/app/kingdom/census/census.component.html","./src/app/kingdom/census/detail.component.ts","./src/app/kingdom/census/letter.component.ts","./src/app/kingdom/city/build.component.ts","./src/app/kingdom/city/charge.component.ts","./src/app/kingdom/city/city.component.ts","./src/app/kingdom/city/city.component.html","./src/app/kingdom/city/explore.component.ts","./src/app/kingdom/city/tax.component.ts","./src/app/kingdom/clan/clan.component.ts","./src/app/kingdom/clan/clan.component.html","./src/app/kingdom/clan/foundation.component.ts","./src/app/kingdom/clan/manifest.component.ts","./src/app/kingdom/emporium/buy.component.ts","./src/app/kingdom/emporium/emporium.component.ts","./src/app/kingdom/emporium/emporium.component.html","./src/app/kingdom/emporium/perk.component.ts","./src/app/kingdom/emporium/plant.component.ts","./src/app/kingdom/kingdom-routing.module.ts","./src/app/kingdom/kingdom.module.ts","./src/app/kingdom/sorcery/activate.component.ts","./src/app/kingdom/sorcery/conjure.component.ts","./src/app/kingdom/sorcery/research.component.ts","./src/app/kingdom/sorcery/sorcery.component.ts","./src/app/kingdom/sorcery/sorcery.component.html","./src/app/kingdom/tavern/discharge.component.ts","./src/app/kingdom/tavern/tavern.component.ts","./src/app/kingdom/tavern/tavern.component.html","./src/app/kingdom/temple/break.component.ts","./src/app/kingdom/temple/dispel.component.ts","./src/app/kingdom/temple/offer.component.ts","./src/app/kingdom/temple/temple.component.ts","./src/app/kingdom/temple/temple.component.html"],"sourcesContent":["import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { SelectionModel } from '@angular/cdk/collections';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ReportComponent } from './report.component';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport * as moment from 'moment';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { DateAdapter } from '@angular/material/core';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\n@Component({\r\n selector: 'app-archive',\r\n templateUrl: './archive.component.html',\r\n styleUrls: ['./archive.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class ArchiveComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n columns = ['select', 'from', 'subject', 'timestamp'];\r\n filters: any = {\r\n from: {\r\n type: 'text',\r\n value: '',\r\n },\r\n subject: {\r\n type: 'text',\r\n value: '',\r\n },\r\n timestamp: {\r\n type: 'timestamp',\r\n value: null,\r\n },\r\n };\r\n selection: SelectionModel<any> = new SelectionModel<any>(true, []);\r\n data: MatTableDataSource<any> = new MatTableDataSource([]);\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n private notificationService: NotificationService,\r\n private translateService: TranslateService,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n private dateAdapter: DateAdapter<any>,\r\n public tutorialService: TutorialService,\r\n ) { }\r\n\r\n @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;\r\n @ViewChild(MatSort, {static: true}) sort: MatSort;\r\n\r\n ngOnInit(): void {\r\n this.dateAdapter.setLocale(this.translateService.currentLang);\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/letters`).valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(letters => {\r\n this.data = new MatTableDataSource(letters);\r\n this.data.paginator = this.paginator;\r\n this.data.sort = this.sort;\r\n this.data.filterPredicate = this.createFilter();\r\n this.applyFilter();\r\n });\r\n }\r\n\r\n applyFilter(): void {\r\n this.data.filter = JSON.stringify({\r\n from: this.filters.from.value,\r\n subject: this.filters.subject.value,\r\n timestamp: this.filters.timestamp.value,\r\n });\r\n }\r\n\r\n createFilter(): (data: any, filter: string) => boolean {\r\n const filterFunction = (data: any, filter: string): boolean => {\r\n const filters = JSON.parse(filter);\r\n return data && data.from && data.from.name && data.subject\r\n && this.translateService.instant(data.from.name).toLowerCase().includes(filters.from)\r\n && this.translateService.instant(data.subject).toString().toLowerCase().includes(filters.subject)\r\n && (!filters.timestamp || moment(data.timestamp.toMillis()).isBetween(moment(filters.timestamp).startOf('day'), moment(filters.timestamp).endOf('day'), 'days', '[]'));\r\n };\r\n return filterFunction;\r\n }\r\n\r\n isAllSelected(): boolean {\r\n return this.data.data.length === this.selection.selected.length;\r\n }\r\n\r\n masterToggle(): void {\r\n this.isAllSelected()\r\n ? this.selection.clear()\r\n : this.data.data.forEach(row => this.selection.select(row));\r\n }\r\n\r\n async openReportDialog(report: any) {\r\n if (report.data) report.data.join = report.data.hero || report.data.item || report.data.spell || report.data.unit;\r\n const dialogRef = this.dialog.open(ReportComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: report,\r\n });\r\n }\r\n\r\n async deleteReports() {\r\n if (this.selection.selected.length) {\r\n this.loadingService.startLoading();\r\n try {\r\n const fids = this.selection.selected.map(letter => letter.fid);\r\n await this.apiService.removeLetters(this.uid, fids);\r\n this.selection.clear();\r\n this.notificationService.success('kingdom.archive.success');\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.archive.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.archive.error');\r\n }\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-archive table-responsive\" [@fadeInOnEnter]>\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/archive.png\" [alt]=\"'kingdom.archive.name' | translate\">\r\n <mat-card-title>{{ \"kingdom.archive.name\" | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ \"kingdom.archive.description\" | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.archive')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>email</mat-icon>{{ data.data.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <p>{{ \"kingdom.archive.help\" | translate }}</p>\r\n <table mat-table matSort [dataSource]=\"data\" matSortActive=\"timestamp\" matSortDirection=\"desc\" tourAnchor=\"tour.archive\" [attr.aria-label]=\"'kingdom.archive.name' | translate\">\r\n\r\n <ng-container matColumnDef=\"{{ column }}\" *ngFor=\"let column of columns\">\r\n\r\n <ng-container *ngIf=\"column === 'select'; else noSelect\">\r\n <mat-header-cell class=\"table-header\" *matHeaderCellDef>\r\n <mat-checkbox color=\"primary\" (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"></mat-checkbox>\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let letter\" [attr.data-label]=\"'table.column.' + column | translate\">\r\n <mat-checkbox color=\"primary\" (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(letter) : null\" [checked]=\"selection.isSelected(letter)\"></mat-checkbox>\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <ng-template #noSelect>\r\n <mat-header-cell class=\"table-header\" *matHeaderCellDef>\r\n\r\n <div mat-sort-header>{{ 'table.column.' + column | translate }}</div>\r\n\r\n <mat-form-field class=\"table-filter\" *ngIf=\"filters[column] && filters[column].type === 'text'\">\r\n <input matInput [(ngModel)]=\"filters[column].value\" (keyup)=\"applyFilter()\" autocomplete=\"off\">\r\n <button mat-button *ngIf=\"filters[column].value\" matSuffix mat-icon-button (click)=\"filters[column].value=''; applyFilter()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"table-filter\" *ngIf=\"filters[column] && filters[column].type === 'timestamp'\">\r\n <input matInput [(ngModel)]=\"filters[column].value\" [matDatepicker]=\"timestamp\" disabled (dateChange)=\"applyFilter()\">\r\n <mat-datepicker-toggle matSuffix [for]=\"timestamp\"></mat-datepicker-toggle>\r\n <mat-datepicker #timestamp disabled=\"false\"></mat-datepicker>\r\n <button mat-button *ngIf=\"filters[column].value\" matSuffix mat-icon-button (click)=\"filters[column].value=null; applyFilter()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let letter\" [attr.data-label]=\"'table.column.' + column | translate\">\r\n\r\n <ng-template [ngIf]=\"column === 'from'\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[letter['from'].faction.id, letter['from'].id === uid ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"!letter.read ? '❕' : undefined\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"letter['from'].faction.image\" [alt]=\"'table.column.' + column | translate\">\r\n </div>\r\n <div mat-line>{{ letter['from'].name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ letter['from'].faction.name | translate }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'subject'\">\r\n {{ letter[column] | translate }}\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'timestamp'\">\r\n {{ letter[column]?.toMillis() | date:('dateformat.short' | translate) }}\r\n </ng-template>\r\n\r\n </mat-cell>\r\n\r\n </ng-template>\r\n </ng-container>\r\n\r\n <mat-header-row *matHeaderRowDef=\"columns; sticky: true\"></mat-header-row>\r\n <mat-row *matRowDef=\"let letter; columns: columns\" (click)=\"openReportDialog(letter)\"></mat-row>\r\n </table>\r\n\r\n <mat-toolbar>\r\n <mat-toolbar-row>\r\n <button mat-mini-fab color=\"primary\" [disabled]=\"!selection.selected.length\" (click)=\"deleteReports()\"><mat-icon>delete</mat-icon></button>\r\n <span class=\"fill-space\"></span>\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\r\n </mat-toolbar-row>\r\n </mat-toolbar>\r\n\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n</div>\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\n\r\n@Component({\r\n selector: 'app-report',\r\n template: `\r\n <h1 mat-dialog-title>{{ report.subject | translate }}</h1>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.report.from' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"report.from.faction.id\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"report.from.faction.image\">\r\n </div>\r\n <div mat-line>{{ report.from.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ report.from.faction.name | translate }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <!-- MESSAGE -->\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.report.message' | translate }}:</div>\r\n <p>{{ report.message | translate }}</p>\r\n </div>\r\n <!-- ESPIONAGE -->\r\n <div mat-dialog-content *ngIf=\"report.data && report.data.intel\" class=\"espionage\">\r\n <!-- SUPPLIES -->\r\n <div matSubheader>{{ 'kingdom.report.resources' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let supply of report.data.intel.supplies\" class=\"common\">\r\n <div mat-list-avatar [matBadge]=\"supply.quantity | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"supply.resource.image\">\r\n </div>\r\n <div mat-line>{{ supply.resource.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"supply.resource.description | translate | icon:supply.resource\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n <!-- TROOPS -->\r\n <div matSubheader>{{ 'kingdom.report.troops' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let troop of report.data.intel.troops\" [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"troop.quantity | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"troop.unit.image\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"troop.unit.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n <!-- CONTRACTS -->\r\n <div matSubheader>{{ 'kingdom.report.contracts' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let contract of report.data.intel.contracts\" [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"contract.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"contract.hero.image\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n <!-- BUILDINGS -->\r\n <div matSubheader>{{ 'kingdom.report.buildings' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let building of report.data.intel.buildings\" class=\"common\">\r\n <div mat-list-avatar [matBadge]=\"building.quantity | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"building.structure.image\">\r\n </div>\r\n <div mat-line>{{ building.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"building.structure.description | translate | icon:building.structure\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <!-- BATTLE -->\r\n <div mat-dialog-content *ngIf=\"report.data && report.data.logs\">\r\n <div matSubheader>{{ 'kingdom.report.attacker' | translate }}:<span class=\"fill-space\"></span>{{ 'kingdom.report.defender' | translate }}:</div>\r\n <mat-list dense>\r\n <ng-container *ngFor=\"let log of report.data.logs\">\r\n <!-- ARTIFACTS -->\r\n <mat-list-item [ngClass]=\"[log.attackerArtifact.item.faction.id, log.attackerArtifact.item.legendary ? 'legendary' : 'common', 'lefted']\" *ngIf=\"log.attackerArtifact\">\r\n <div mat-list-avatar [matBadge]=\"1\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"log.attackerArtifact.item.image\">\r\n </div>\r\n <div mat-line>{{ log.attackerArtifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"log.attackerArtifact.item.description | translate | icon:log.attackerArtifact.item\"></div>\r\n <mat-icon>{{ log.success ? 'check' : 'block' }}</mat-icon>\r\n </mat-list-item>\r\n <mat-list-item [ngClass]=\"[log.defenderArtifact.item.faction.id, log.defenderArtifact.item.legendary ? 'legendary' : 'common', 'righted']\" *ngIf=\"log.defenderArtifact\">\r\n <div mat-list-avatar [matBadge]=\"log.defenderArtifact.level | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"log.defenderArtifact.item.image\">\r\n </div>\r\n <div mat-line>{{ log.defenderArtifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"log.defenderArtifact.item.description | translate | icon:log.defenderArtifact.item\"></div>\r\n <mat-icon>{{ log.success ? 'check' : 'block' }}</mat-icon>\r\n </mat-list-item>\r\n <!-- CHARMS -->\r\n <mat-list-item [ngClass]=\"[log.attackerCharm.spell.faction.id, log.attackerCharm.spell.legendary ? 'legendary' : 'common', 'lefted']\" *ngIf=\"log.attackerCharm\">\r\n <div mat-list-avatar [matBadge]=\"1\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"log.attackerCharm.spell.image\">\r\n </div>\r\n <div mat-line>{{ log.attackerCharm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"log.attackerCharm.spell.description | translate | icon:log.attackerCharm.spell\"></div>\r\n <mat-icon>{{ log.success ? 'check' : 'block' }}</mat-icon>\r\n </mat-list-item>\r\n <mat-list-item [ngClass]=\"[log.defenderCharm.spell.faction.id, log.defenderCharm.spell.legendary ? 'legendary' : 'common', 'righted']\" *ngIf=\"log.defenderCharm\">\r\n <div mat-list-avatar [matBadge]=\"log.defenderCharm.level | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"log.defenderCharm.spell.image\">\r\n </div>\r\n <div mat-line>{{ log.defenderCharm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"log.defenderCharm.spell.description | translate | icon:log.defenderCharm.spell\"></div>\r\n <mat-icon>{{ log.success ? 'check' : 'block' }}</mat-icon>\r\n </mat-list-item>\r\n <!-- CONTRACTS -->\r\n <mat-list-item [ngClass]=\"[log.attackerContract.hero.faction.id, log.attackerContract.hero.legendary ? 'legendary' : 'common', 'lefted']\" *ngIf=\"log.attackerContract\">\r\n <div mat-list-avatar [matBadge]=\"log.attackerContract.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"log.attackerContract.hero.image\">\r\n </div>\r\n <div mat-line>{{ log.attackerContract.hero.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"!log.attackerContract.hero.battle\" [innerHTML]=\"log.defenderContract.hero.description | translate | icon:log.defenderContract.hero\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"log.attackerContract.hero.battle && log.attackerContract.hero.self\" [innerHTML]=\"'kingdom.report.bonus' | translate:{ family: this.getFamilies(log.attackerContract), attack: log.attackerContract.hero.attackBonus * log.attackerContract.level, defense: log.attackerContract.hero.defenseBonus * log.attackerContract.level, healths: log.attackerContract.hero.healthBonus * log.attackerContract.level } | icon:log.attackerContract.hero\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"log.attackerContract.hero.battle && !log.attackerContract.hero.self\" [innerHTML]=\"'kingdom.report.damage' | translate:{ category: this.getCategories(log.attackerContract), damage: log.attackerContract.hero.attack * log.attackerContract.level, casualties: log.totalCasualties | long } | icon:log.attackerContract.hero\"></div>\r\n <mat-icon>{{ log.attackerContract.hero.battle ? 'star' : 'star_border' }}</mat-icon>\r\n </mat-list-item>\r\n <mat-list-item [ngClass]=\"[log.defenderContract.hero.faction.id, log.defenderContract.hero.legendary ? 'legendary' : 'common', 'righted']\" *ngIf=\"log.defenderContract\">\r\n <div mat-list-avatar [matBadge]=\"log.defenderContract.level | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"log.defenderContract.hero.image\">\r\n </div>\r\n <div mat-line>{{ log.defenderContract.hero.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"!log.defenderContract.hero.battle\" [innerHTML]=\"log.defenderContract.hero.description | translate | icon:log.defenderContract.hero\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"log.defenderContract.hero.battle && log.defenderContract.hero.self\" [innerHTML]=\"'kingdom.report.bonus' | translate:{ family: this.getFamilies(log.defenderContract), attack: (log.defenderContract.hero.attackBonus * log.defenderContract.level) | long, defense: log.defenderContract.hero.defenseBonus * log.defenderContract.level, health: log.defenderContract.hero.healthBonus * log.defenderContract.level } | icon:log.defenderContract.hero\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"log.defenderContract.hero.battle && !log.defenderContract.hero.self\" [innerHTML]=\"'kingdom.report.damage' | translate:{ category: this.getCategories(log.defenderContract), damage: (log.defenderContract.hero.attack * log.defenderContract.level) | long, casualties: log.totalCasualties | long } | icon:log.defenderContract.hero\"></div>\r\n <mat-icon>{{ log.defenderContract.hero.battle ? 'star' : 'star_border' }}</mat-icon>\r\n </mat-list-item>\r\n <!-- TROOPS -->\r\n <ng-container *ngIf=\"log.attackerTroop && log.defenderTroop\">\r\n <ng-container *ngIf=\"log.direction === 'attacker-vs-defender'\">\r\n <mat-list-item [ngClass]=\"[log.attackerTroop.unit.faction.id, log.attackerTroop.unit.legendary ? 'legendary' : 'common', 'lefted']\">\r\n <div mat-list-avatar [matBadge]=\"(log.attackerTroop.quantity | long) + ' / ' + (log.attackerQuantity | long)\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"log.attackerTroop.unit.image\">\r\n </div>\r\n <div mat-line>{{ log.attackerTroop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"'kingdom.report.attack' | translate:{ category: '<'+log.attackerCategory.id+'>', quantity: log.attackerQuantity | long, initiative: log.attackerTroop.unit.initiativeWave, attack: (log.attackerTroop.unit.attackWave * log.attackerQuantity) | long, defense: (log.defenderTroop.unit.defenseWave * log.defenderQuantity) | long, health: (log.defenderTroop.unit.healthWave * log.defenderQuantity) | long, casualties: log.defenderCasualties | long } | icon:log.attackerTroop.unit\"></div>\r\n <mat-icon style=\"transform: rotate(-90deg)\">subdirectory_arrow_left</mat-icon>\r\n </mat-list-item>\r\n <mat-list-item [ngClass]=\"[log.defenderTroop.unit.faction.id, log.defenderTroop.unit.legendary ? 'legendary' : 'common', 'righted']\">\r\n <mat-icon style=\"transform: rotate(90deg)\">subdirectory_arrow_left</mat-icon>\r\n <div mat-line>{{ log.defenderTroop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"'kingdom.report.counterattack' | translate:{ category: '<'+log.defenderCategory.id+'>', quantity: log.defenderTroop.quantity | long, initiative: log.defenderTroop.unit.initiativeWave, attack: (log.defenderTroop.unit.attackWave * log.defenderTroop.quantity) | long, defense: (log.attackerTroop.unit.defenseWave * log.attackerQuantity) | long, health: (log.attackerTroop.unit.healthWave * log.attackerQuantity) | long, casualties: log.attackerCasualties | long } | icon:log.defenderTroop.unit\"></div>\r\n <div mat-list-avatar [matBadge]=\"(log.defenderTroop.quantity | long) + ' / ' + (log.defenderQuantity | long)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"log.defenderTroop.unit.image\">\r\n </div>\r\n </mat-list-item>\r\n </ng-container>\r\n <ng-container *ngIf=\"log.direction === 'defender-vs-attacker'\">\r\n <mat-list-item [ngClass]=\"[log.defenderTroop.unit.faction.id, log.defenderTroop.unit.legendary ? 'legendary' : 'common', 'righted']\">\r\n <div mat-list-avatar [matBadge]=\"(log.defenderTroop.quantity | long) + ' / ' + (log.defenderQuantity | long)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"log.defenderTroop.unit.image\">\r\n </div>\r\n <div mat-line>{{ log.defenderTroop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"'kingdom.report.attack' | translate:{ category: '<'+log.defenderCategory.id+'>', quantity: log.defenderQuantity | long, initiative: log.defenderTroop.unit.initiativeWave, attack: (log.defenderTroop.unit.attackWave * log.defenderQuantity) | long, defense: (log.attackerTroop.unit.defenseWave * log.attackerQuantity) | long, health: (log.attackerTroop.unit.healthWave * log.attackerQuantity) | long, casualties: log.attackerCasualties | long } | icon:log.defenderTroop.unit\"></div>\r\n <mat-icon style=\"transform: rotate(90deg)\">subdirectory_arrow_right</mat-icon>\r\n </mat-list-item>\r\n <mat-list-item [ngClass]=\"[log.attackerTroop.unit.faction.id, log.attackerTroop.unit.legendary ? 'legendary' : 'common', 'lefted']\">\r\n <mat-icon style=\"transform: rotate(-90deg)\">subdirectory_arrow_right</mat-icon>\r\n <div mat-line>{{ log.attackerTroop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"'kingdom.report.counterattack' | translate:{ category: '<'+log.attackerCategory.id+'>', quantity: log.attackerTroop.quantity | long, initiative: log.attackerTroop.unit.initiativeWave, attack: (log.attackerTroop.unit.attackWave * log.attackerTroop.quantity) | long, defense: (log.defenderTroop.unit.defenseWave * log.defenderQuantity) | long, health: (log.defenderTroop.unit.healthWave * log.defenderQuantity) | long, casualties: log.defenderCasualties | long } | icon:log.attackerTroop.unit\"></div>\r\n <div mat-list-avatar [matBadge]=\"(log.attackerTroop.quantity | long) + ' / ' + (log.attackerQuantity | long)\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"log.attackerTroop.unit.image\">\r\n </div>\r\n </mat-list-item>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </mat-list>\r\n </div>\r\n <!-- ATTACHMENTS -->\r\n <div mat-dialog-content *ngIf=\"report.data && report.data.join\">\r\n <div matSubheader>{{ 'kingdom.report.attachment' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[report.data.join.faction.id, report.data.join.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"(report.data.quantity || report.data.level || report.data.join.level) | short\" matBadgePosition=\"ahove before\">\r\n <img mat-list-avatar [src]=\"report.data.join.image\">\r\n </div>\r\n <div mat-line>{{ report.data.join.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['spell', 'hero', 'item', 'resource'].includes(report.data.join.type)\" [innerHTML]=\"report.data.join.description | translate | icon:report.data.join\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['unit'].includes(report.data.join.type)\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of report.data.join.families\" [src]=\"family.image\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of report.data.join.skills\" [src]=\"skill.image\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of report.data.join.categories\" [src]=\"category.image\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"report.data.join.legendary\" src=\"/assets/images/icons/legendary.png\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['unit'].includes(report.data.join.type) && report.data.join.categories && report.data.join.categories.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of report.data.join.resistances\" [src]=\"category.image\">\r\n </div>\r\n <div mat-list-avatar *ngIf=\"report.data.gold\" [matBadge]=\"report.data.gold | short\" matBadgePosition=\"ahove after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\">\r\n </div>\r\n <div mat-list-avatar *ngIf=\"report.data.gems\" [matBadge]=\"report.data.gems | short\" matBadgePosition=\"ahove after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gem.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.report.date' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/turn.png\">{{ report.timestamp.toMillis() | date:('dateformat.short' | translate) }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-raised-button color=\"primary\" (click)=\"close()\" cdkFocusInitial>{{ 'kingdom.report.close' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n p {\r\n margin: 0;\r\n }\r\n ::ng-deep .mat-list-base {\r\n max-height: none;\r\n }\r\n ::ng-deep .mat-dialog-content.espionage {\r\n max-height: 50vh !important;\r\n }\r\n ::ng-deep .mat-list-base .mat-list-item.righted .mat-list-item-content {\r\n flex-direction: row-reverse !important;\r\n }\r\n ::ng-deep .mat-list-base .mat-list-item.righted .mat-list-item-content .mat-list-text {\r\n text-align: right !important;\r\n }\r\n ::ng-deep .mat-list-base .mat-list-item .mat-list-item-content .mat-list-text {\r\n padding-right: 16px !important;\r\n }\r\n ::ng-deep .mat-list-base .mat-list-item .mat-list-item-content .mat-icon {\r\n margin: 0 16px !important;\r\n }\r\n @media screen and (max-width: 960px) {\r\n ::ng-deep .mat-list-base .mat-list-item .mat-list-item-content .mat-icon {\r\n margin: 0 !important;\r\n }\r\n ::ng-deep .mat-dialog-content.espionage {\r\n max-height: 35vh !important;\r\n }\r\n }\r\n `],\r\n})\r\nexport class ReportComponent implements OnInit {\r\n\r\n uid = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public report: any,\r\n private dialogRef: MatDialogRef<ReportComponent>,\r\n private apiService: ApiService,\r\n private store: Store,\r\n ) { }\r\n\r\n close() {\r\n this.dialogRef.close();\r\n }\r\n\r\n async ngOnInit(): Promise<void> {\r\n if (!this.report.read) {\r\n await this.apiService.readLetter(this.uid, this.report.fid);\r\n }\r\n }\r\n\r\n getFamilies(contract: any): string {\r\n return contract.hero.families.map((family: any) => `<${family.id}>`).join(', ');\r\n }\r\n\r\n getCategories(contract: any): string {\r\n return contract.hero.categories.map((category: any) => `<${category.id}>`).join(', ');\r\n }\r\n\r\n}\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport * as moment from 'moment';\r\nimport { BidComponent } from './bid.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { Store } from '@ngxs/store';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { TomeComponent } from 'src/app/user/encyclopedia/tome.component';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\n\r\n@Component({\r\n selector: 'app-auction',\r\n templateUrl: './auction.component.html',\r\n styleUrls: ['./auction.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class AuctionComponent implements OnInit {\r\n\r\n columns: string[] = [\r\n 'name',\r\n 'faction',\r\n 'actions',\r\n ];\r\n filters: any = {\r\n name: {\r\n type: 'text',\r\n value: '',\r\n },\r\n faction: {\r\n type: 'select',\r\n value: '',\r\n options: [],\r\n },\r\n };\r\n table: MatTableDataSource<any> = new MatTableDataSource([]);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;\r\n @ViewChild(MatSort, {static: true}) sort: MatSort;\r\n\r\n constructor(\r\n private translateService: TranslateService,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n private angularFirestore: AngularFirestore,\r\n private notificationService: NotificationService,\r\n public tutorialService: TutorialService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>('auctions').valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(async auctions => {\r\n const data = auctions.map((auction: any) => {\r\n auction.join = auction.hero || auction.item || auction.spell || auction.unit;\r\n return auction;\r\n });\r\n this.table = new MatTableDataSource(data);\r\n this.table.paginator = this.paginator;\r\n this.table.sort = this.sort;\r\n this.table.sortingDataAccessor = this.createSorter();\r\n this.table.filterPredicate = this.createFilter();\r\n this.filters.faction.options = [...new Set(data.map((auction: any) => auction.join.faction))];\r\n this.applyFilter();\r\n await this.refreshAuctions();\r\n });\r\n }\r\n\r\n applyFilter() {\r\n this.table.filter = JSON.stringify({\r\n name: this.filters.name.value,\r\n faction: this.filters.faction.value,\r\n });\r\n }\r\n\r\n createSorter(): (obj: any, property: string) => any {\r\n const sorterFunction = (obj: any, property: string): any => {\r\n if (property === 'name') return this.translateService.instant(obj['join']['name']);\r\n if (property === 'faction') return this.translateService.instant(obj['join']['faction']['name']);\r\n return obj[property];\r\n };\r\n return sorterFunction;\r\n }\r\n\r\n createFilter(): (data: any, filter: string) => boolean {\r\n const filterFunction = (data: any, filter: string): boolean => {\r\n const filters = JSON.parse(filter);\r\n return (this.translateService.instant(data.join.name).toLowerCase().includes(filters.name)\r\n || this.translateService.instant(data.join.description).toLowerCase().includes(filters.name))\r\n && data.join.faction.id.toLowerCase().includes(filters.faction);\r\n };\r\n return filterFunction;\r\n }\r\n\r\n async refreshAuctions() {\r\n if (!this.table.data.length || (this.table.data.length && moment().isAfter(moment(this.table.data[0].auctioned.toMillis())))) {\r\n this.loadingService.startLoading();\r\n try {\r\n await this.apiService.refreshAuction();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.auction.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n }\r\n\r\n openBidDialog(auction: any, $event: Event): void {\r\n $event.stopPropagation();\r\n const dialogRef = this.dialog.open(BidComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: auction,\r\n });\r\n }\r\n\r\n openTomeDialog(tome: any): void {\r\n const dialogRef = this.dialog.open(TomeComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: tome,\r\n });\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-auction table-responsive\" [@fadeInOnEnter]>\r\n <mat-card>\r\n\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/auction.png\" [alt]=\"'kingdom.auction.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.auction.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.auction.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.auction')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>gavel</mat-icon>{{ table.data.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.auction.help' | translate | icon\"></p>\r\n <table mat-table matSort matSortActive=\"name\" matSortDirection=\"asc\" [dataSource]=\"table\" tourAnchor=\"tour.auction\" [attr.aria-label]=\"'kingdom.auction.name' | translate\">\r\n <ng-container matColumnDef=\"{{ column }}\" *ngFor=\"let column of columns\">\r\n <mat-header-cell class=\"table-header\" *matHeaderCellDef>\r\n <div mat-sort-header>{{ 'table.column.' + column | translate }}</div>\r\n\r\n <mat-form-field class=\"table-filter\" *ngIf=\"filters[column] && filters[column].type === 'text'\">\r\n <input matInput [(ngModel)]=\"filters[column].value\" (keyup)=\"applyFilter()\" autocomplete=\"off\">\r\n <button mat-button *ngIf=\"filters[column].value\" matSuffix mat-icon-button (click)=\"filters[column].value=''; applyFilter()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <mat-form-field class=\"table-filter\" *ngIf=\"filters[column] && filters[column].type === 'select'\">\r\n <mat-select [(ngModel)]=\"filters[column].value\" (selectionChange)=\"applyFilter()\">\r\n <mat-option value=\"\">{{ 'table.filter.any' | translate }}</mat-option>\r\n <mat-option *ngFor=\"let option of filters[column].options\" [value]=\"option.value\">{{ option.name | translate }}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let auction\" [attr.data-label]=\"'table.column.' + column | translate\">\r\n\r\n <ng-template [ngIf]=\"column === 'name'\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[auction.join.faction.id, auction.join.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"(auction.quantity || auction.level || auction.spell.level) | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"auction.join.image\" [alt]=\"auction.join.name | translate\">\r\n </div>\r\n <div mat-line>{{ auction.join.name | translate:{name:auction.name} }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['artifact', 'contract', 'charm'].includes(auction.type)\" [innerHTML]=\"auction.join.description | translate | icon:auction.join\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['troop'].includes(auction.type)\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of auction.join.families\" [src]=\"family.image\" [alt]=\"family.name | translate\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of auction.join.skills\" [src]=\"skill.image\" [alt]=\"skill.name | translate\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of auction.join.categories\" [src]=\"category.image\" [alt]=\"category.name | translate\">\r\n <img [title]=\"'category.legendary.name' | translate\" class=\"icon\" *ngIf=\"auction.join.legendary\" src=\"/assets/images/icons/legendary.png\" [alt]=\"'category.legendary.name' | translate\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['troop'].includes(auction.type) && auction.join.resistances && auction.join.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of auction.join.resistances\" [src]=\"category.image\" [alt]=\"'category.resistance.name' | translate\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"auction.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\" [alt]=\"'resource.gold.name' | translate\"> [alt]=\"'resource.gold.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'faction'\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"auction.join.faction.id\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"auction.join.faction.image\" [alt]=\"auction.join.faction.name | translate\">\r\n </div>\r\n <div mat-line>{{ auction.join.faction.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"auction.join.faction.description | translate | icon:auction.join.faction\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'actions'\">\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.auction.bid' | translate }}\" [disabled]=\"auction.kingdom === uid\" (click)=\"openBidDialog(auction, $event)\">\r\n <mat-icon>gavel</mat-icon>\r\n </button>\r\n </ng-template>\r\n\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-header-row *matHeaderRowDef=\"columns; sticky: true\"></mat-header-row>\r\n <mat-row *matRowDef=\"let auction; columns: columns; let i = index\" [tourAnchor]=\"i === 0 ? 'tour.bid' : null\" (click)=\"openTomeDialog(auction.join)\"></mat-row>\r\n </table>\r\n\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\r\n </mat-card-content>\r\n </mat-card>\r\n</div>\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { Store } from '@ngxs/store';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-bid',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.bid.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.bid.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.bid.data' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[auction.join.faction.id, auction.join.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"(auction.quantity || auction.level || auction.spell.level) | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"auction.join.image\">\r\n </div>\r\n <div mat-line>{{ auction.join.name | translate:{name:auction.name} }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['artifact', 'contract'].includes(auction.type)\" [innerHTML]=\"auction.join.description | translate | icon:auction.join\"></div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['troop'].includes(auction.type)\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of auction.join.families\" [src]=\"family.image\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of auction.join.skills\" [src]=\"skill.image\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of auction.join.categories\" [src]=\"category.image\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"auction.join.resistances && auction.join.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of auction.join.resistances\" [src]=\"category.image\">\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"auction.gold | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gold.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.bid.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'resource.gold.name' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'resource.gold.name' | translate }}\" matInput formControlName=\"gold\">\r\n <mat-hint>{{ 'kingdom.bid.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.bid.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.bid.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"bid()\">{{ 'kingdom.bid.bid' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class BidComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomGold: any = this.store.selectSnapshot(AuthState.getKingdomGold);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public auction: any,\r\n private dialogRef: MatDialogRef<BidComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n gold: [Math.floor(this.auction.gold * 1.10), [Validators.required, Validators.min(Math.floor(this.auction.gold * 1.10)), Validators.max(this.kingdomGold.quantity)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async bid() {\r\n if (this.form.valid && this.form.value.gold <= this.kingdomGold.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const bidded = await this.apiService.bidAuction(this.uid, this.auction.fid, this.form.value.gold);\r\n this.notificationService.success('kingdom.bid.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.bid.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.bid.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FirebaseService } from 'src/app/services/firebase.service';\r\nimport { TroopAssignmentType } from '../army/army.component';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { CacheService } from 'src/app/services/cache.service';\r\n\r\nexport enum BattleType {\r\n 'siege' = 'siege',\r\n 'pillage' = 'pillage',\r\n 'assault' = 'assault',\r\n}\r\n\r\nconst BATTLE_TURNS = 2;\r\n\r\n@Component({\r\n selector: 'app-battle',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.battle.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.battle.description' | translate }}</p>\r\n <div matSubheader>{{ 'kingdom.battle.target' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"kingdom.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"kingdom.position | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"kingdom.faction.image\">\r\n </div>\r\n <div mat-line>{{ kingdom.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ kingdom.faction.name | translate }}</div>\r\n <div mat-list-avatar [matBadge]=\"BATTLE_TURNS\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n <div matSubheader>{{ 'kingdom.battle.select' | translate }}:</div>\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.battle.type' | translate }}</mat-label>\r\n <mat-select [(ngModel)]=\"attackType\">\r\n <mat-select-trigger>\r\n <mat-list dense>\r\n <mat-list-item>\r\n <div mat-list-avatar>\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"attackType.image\">\r\n </div>\r\n <div mat-line>{{ attackType.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"attackType.description | translate | icon:attackType\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let attack of attackTypes\" [value]=\"attack\">\r\n <mat-list dense>\r\n <mat-list-item>\r\n <div mat-list-avatar>\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"attack.image\">\r\n </div>\r\n <div mat-line>{{ attack.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"attack.description | translate | icon:attack\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.battle.cancel' | translate }}</button>\r\n <div class=\"button-container\">\r\n <div class=\"spinner-container\" *ngIf=\"loading\"><mat-spinner color=\"primary\" diameter=\"24\"></mat-spinner></div>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"loading\" (click)=\"battle()\" cdkFocusInitial>{{ 'kingdom.battle.attack' | translate }}</button>\r\n </div>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n .list-margened {\r\n margin-top: 15px;\r\n }\r\n `],\r\n})\r\n@UntilDestroy()\r\nexport class BattleComponent implements OnInit {\r\n\r\n readonly BATTLE_TURNS = BATTLE_TURNS;\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n loading: boolean = false;\r\n attackTypes: any[] = [];\r\n attackType: any = BattleType.assault;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public kingdom: any,\r\n private dialogRef: MatDialogRef<BattleComponent>,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private notificationService: NotificationService,\r\n private cacheService: CacheService,\r\n ) { }\r\n\r\n async ngOnInit(): Promise<void> {\r\n const attacks = await this.cacheService.getAttacks();\r\n this.attackTypes = attacks;\r\n this.attackType = this.attackTypes[0];\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async battle() {\r\n this.loading = true;\r\n if (this.BATTLE_TURNS <= this.kingdomTurn.quantity) {\r\n try {\r\n const battled = await this.apiService.battleKingdom(this.uid, this.kingdom.fid, this.attackType.id);\r\n this.notificationService.success('kingdom.battle.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.battle.error');\r\n }\r\n } else {\r\n this.notificationService.error('kingdom.battle.error');\r\n }\r\n this.loading = false;\r\n }\r\n\r\n}\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { fadeInOnEnterAnimation, fadeOutOnLeaveAnimation } from 'angular-animations';\r\nimport { BattleComponent } from './battle.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport * as moment from 'moment';\r\nimport { LetterComponent } from './letter.component';\r\nimport { ActivateComponent } from '../sorcery/activate.component';\r\nimport { ConjureComponent } from '../sorcery/conjure.component';\r\nimport { Router } from '@angular/router';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { DetailComponent } from './detail.component';\r\nimport { TourService } from 'ngx-ui-tour-core';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\n@Component({\r\n selector: 'app-census',\r\n templateUrl: './census.component.html',\r\n styleUrls: ['./census.component.scss'],\r\n animations: [\r\n fadeInOnEnterAnimation({ duration: 250, delay: 250 }),\r\n fadeOutOnLeaveAnimation({ duration: 250, delay: 250 }),\r\n ],\r\n})\r\n@UntilDestroy()\r\nexport class CensusComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n clock: Date = this.store.selectSnapshot(AuthState.getClock);\r\n protection: number = 8;\r\n columns = ['name', 'clan', 'actions'];\r\n filters: any = {\r\n name: {\r\n type: 'text',\r\n value: '',\r\n },\r\n clan: {\r\n type: 'text',\r\n value: '',\r\n },\r\n };\r\n data: MatTableDataSource<any> = new MatTableDataSource();\r\n @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;\r\n @ViewChild(MatSort, {static: true}) sort: MatSort;\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n private router: Router,\r\n public tutorialService: TutorialService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>('kingdoms').valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(async kingdoms => {\r\n this.data = new MatTableDataSource(kingdoms.sort((a, b) => b.power - a.power).map((kingdom, index) => {\r\n return {\r\n ...kingdom,\r\n position: index + 1,\r\n };\r\n }));\r\n this.data.paginator = this.paginator;\r\n this.data.sortingDataAccessor = (obj, property) => property === 'name' ? obj['power'] : obj[property];\r\n this.data.sort = this.sort;\r\n this.data.filterPredicate = this.createFilter();\r\n this.applyFilter();\r\n });\r\n }\r\n\r\n applyFilter() {\r\n this.data.filter = JSON.stringify({\r\n name: this.filters.name.value,\r\n clan: this.filters.clan.value,\r\n });\r\n }\r\n\r\n createFilter(): (data: any, filter: string) => boolean {\r\n const filterFunction = (data: any, filter: string): boolean => {\r\n const filters = JSON.parse(filter);\r\n return data.name.toLowerCase().includes(filters.name)\r\n && (!filters.clan\r\n || (data.clan && data.clan.name.toLowerCase().includes(filters.clan)))\r\n || (data.clan && data.clan.description.toLowerCase().includes(filters.clan));\r\n };\r\n return filterFunction;\r\n }\r\n\r\n openAttackDialog(kingdom: any, $event: Event): void {\r\n $event.stopPropagation();\r\n const dialogRef = this.dialog.open(BattleComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: kingdom,\r\n });\r\n }\r\n\r\n openLetterDialog(kingdom: any, $event: Event): void {\r\n $event.stopPropagation();\r\n const dialogRef = this.dialog.open(LetterComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: kingdom,\r\n });\r\n }\r\n\r\n openActivateDialog(kingdom: any, $event: Event): void {\r\n $event.stopPropagation();\r\n const dialogRef = this.dialog.open(ActivateComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n artifact: null,\r\n kingdom: kingdom,\r\n },\r\n });\r\n }\r\n\r\n openConjureDialog(kingdom: any, $event: Event): void {\r\n $event.stopPropagation();\r\n const dialogRef = this.dialog.open(ConjureComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n charm: null,\r\n kingdom: kingdom,\r\n },\r\n });\r\n }\r\n\r\n openDetailDialog(kingdom: any): void {\r\n const dialogRef = this.dialog.open(DetailComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: kingdom,\r\n });\r\n }\r\n\r\n async showInMap(kingdom: any, $event: Event) {\r\n $event.stopPropagation();\r\n await this.router.navigate([`/world/map/${kingdom.fid}`]);\r\n }\r\n\r\n canBeAttacked(kingdom: any): boolean {\r\n return kingdom.attacked\r\n ? moment(this.clock).isAfter(moment(kingdom.attacked.toMillis()))\r\n : true;\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-census table-responsive\" [@fadeInOnEnter]>\r\n <mat-card>\r\n\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/census.png\" [alt]=\"'kingdom.census.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.census.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.census.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.census')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>person</mat-icon>{{ data.data.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <p>{{ 'kingdom.census.help' | translate }}</p>\r\n <table mat-table matSort [dataSource]=\"data\" matSortDisableClear tourAnchor=\"tour.census\" [attr.aria-label]=\"'kingdom.census.name' | translate\">\r\n <ng-container matColumnDef=\"{{ column }}\" *ngFor=\"let column of columns\">\r\n <mat-header-cell class=\"table-header\" *matHeaderCellDef>\r\n\r\n <div mat-sort-header>{{ 'table.column.' + column | translate }}</div>\r\n\r\n <mat-form-field class=\"table-filter\" *ngIf=\"filters[column] && filters[column].type === 'text'\">\r\n <input matInput [(ngModel)]=\"filters[column].value\" (keyup)=\"applyFilter()\" autocomplete=\"off\">\r\n <button mat-button *ngIf=\"filters[column].value\" matSuffix mat-icon-button (click)=\"filters[column].value=''; applyFilter()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let kingdom\" [attr.data-label]=\"'table.column.' + column | translate\">\r\n\r\n <ng-template [ngIf]=\"column === 'name'\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[kingdom.faction.id, kingdom.fid === uid ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"kingdom.position | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"kingdom.faction.image\" [alt]=\"kingdom.faction.name | translate\">\r\n </div>\r\n <div mat-line>{{ kingdom.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ kingdom.faction.name | translate }}</div>\r\n <div mat-list-avatar [matBadge]=\"kingdom.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\" [alt]=\"'icon.power.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'clan'\">\r\n <mat-list dense *ngIf=\"kingdom.clan\">\r\n <mat-list-item class=\"grey\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"kingdom.clan.image\" [alt]=\"'kingdom.clan.name' | translate\">\r\n </div>\r\n <div mat-line>{{ kingdom.clan.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ kingdom.clan.description }}</div>\r\n <div mat-list-avatar [matBadge]=\"kingdom.clan.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\" [alt]=\"'icon.power.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n <div *ngIf=\"!kingdom.clan\" style=\"width: 100%; text-align: center\">-</div>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'actions'\">\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.battle.attack' | translate }}\" [disabled]=\"!canBeAttacked(kingdom) || kingdom.fid === uid\" (click)=\"openAttackDialog(kingdom, $event)\">\r\n <mat-icon>{{ canBeAttacked(kingdom) ? 'flag' : 'security' }}</mat-icon>\r\n </button>\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.activate.activate' | translate }}\" [disabled]=\"kingdom.fid === uid\" (click)=\"openActivateDialog(kingdom, $event)\">\r\n <mat-icon>api</mat-icon>\r\n </button>\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.conjure.conjure' | translate }}\" [disabled]=\"kingdom.fid === uid\" (click)=\"openConjureDialog(kingdom, $event)\">\r\n <mat-icon>whatshot</mat-icon>\r\n </button>\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.letter.name' | translate }}\" (click)=\"openLetterDialog(kingdom, $event)\">\r\n <mat-icon>mail</mat-icon>\r\n </button>\r\n <!--\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'world.map.localize' | translate }}\" (click)=\"showInMap(kingdom, $event)\">\r\n <mat-icon>place</mat-icon>\r\n </button>\r\n -->\r\n </ng-template>\r\n\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-header-row *matHeaderRowDef=\"columns; sticky: true\"></mat-header-row>\r\n <mat-row *matRowDef=\"let kingdom; columns: columns; let i = index\" [tourAnchor]=\"i === 0 ? 'tour.kingdom' : null\" (click)=\"openDetailDialog(kingdom)\"></mat-row>\r\n </table>\r\n\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\r\n </mat-card-content>\r\n </mat-card>\r\n</div>\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\n\r\n@Component({\r\n selector: 'app-detail',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.detail.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.detail.kingdom' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[kingdom.faction.id, kingdom.fid === uid ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"kingdom.position | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"kingdom.faction.image\">\r\n </div>\r\n <div mat-line>{{ kingdom.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ kingdom.faction.name | translate }}</div>\r\n <div mat-list-avatar [matBadge]=\"kingdom.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.detail.troops' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let troop of kingdomTroops\" [ngClass]=\"[troop.unit.faction.id, troop.unit.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"troop.unit.image\">\r\n </div>\r\n <div mat-line>{{ troop.unit.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">\r\n <img [title]=\"family.name | translate\" class=\"icon\" *ngFor=\"let family of troop.unit.families\" [src]=\"family.image\">\r\n <img [title]=\"skill.name | translate\" class=\"icon\" *ngFor=\"let skill of troop.unit.skills\" [src]=\"skill.image\">\r\n <img [title]=\"category.name | translate\" class=\"icon\" *ngFor=\"let category of troop.unit.categories\" [src]=\"category.image\">\r\n </div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"troop.unit.resistances && troop.unit.resistances.length\">\r\n <img [title]=\"('category.resistance.name' | translate) + (category.name | translate)\" class=\"icon grayscale\" *ngFor=\"let category of troop.unit.resistances\" [src]=\"category.image\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-raised-button color=\"primary\" (click)=\"close()\">{{ 'kingdom.detail.close' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [\r\n ],\r\n})\r\n@UntilDestroy()\r\nexport class DetailComponent implements OnInit {\r\n\r\n kingdomTroops: any[] = [];\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public kingdom: any,\r\n private dialogRef: MatDialogRef<DetailComponent>,\r\n private angularFirestore: AngularFirestore,\r\n private store: Store,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>(`kingdoms/${this.kingdom.id}/troops`, ref => ref.where('assignment', '==', 2)).valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(troops => {\r\n this.kingdomTroops = troops;\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { FormBuilder, Validators, FormGroup } from '@angular/forms';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\n\r\n@Component({\r\n selector: 'app-letter',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.letter.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.letter.description' | translate }}</p>\r\n <div matSubheader>{{ 'kingdom.letter.to' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[kingdom.faction.id, kingdom.fid === uid ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"kingdom.position | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"kingdom.faction.image\">\r\n </div>\r\n <div mat-line>{{ kingdom.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ kingdom.faction.name | translate }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.letter.contents' | translate }}:</div>\r\n <form [formGroup]=\"form\" autocomplete=\"off\">\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.letter.subject' | translate }}</mat-label>\r\n <input placeholder=\"{{ 'kingdom.letter.subject' | translate }}\" matInput formControlName=\"subject\">\r\n <mat-error>{{ 'kingdom.letter.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.letter.message' | translate }}</mat-label>\r\n <textarea placeholder=\"{{ 'kingdom.letter.message' | translate }}\" matInput rows=\"5\" formControlName=\"message\"></textarea>\r\n <mat-error>{{ 'kingdom.letter.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.letter.close' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!form.valid\" (click)=\"send()\">{{ 'kingdom.letter.send' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class LetterComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n form: FormGroup = null;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public kingdom: any,\r\n private formBuilder: FormBuilder,\r\n private dialogRef: MatDialogRef<LetterComponent>,\r\n private loadingService: LoadingService,\r\n private notificationService: NotificationService,\r\n private apiService: ApiService,\r\n private store: Store,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n subject: [null, [Validators.required]],\r\n message: [null, [Validators.required]],\r\n });\r\n }\r\n\r\n reset(): void {\r\n this.form.reset();\r\n }\r\n\r\n async send() {\r\n if (this.form.valid) {\r\n this.loadingService.startLoading();\r\n try {\r\n const sent = await this.apiService.sendLetter(this.kingdom.fid, this.form.value.subject, this.form.value.message, this.uid);\r\n this.notificationService.success('kingdom.letter.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.letter.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.letter.error');\r\n }\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-build',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.build.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.build.description' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.build.building' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"building.structure.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"building.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"building.structure.image\">\r\n </div>\r\n <div mat-line>{{ building.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"building.structure.description | translate | icon:building.structure\"></div>\r\n <div mat-list-avatar [matBadge]=\"Math.ceil((kingdomWorkshop.quantity + 1) / building.structure.turnRatio) + ('resource.turn.ratio' | translate)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.build.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'resource.land.name' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'resource.land.name' | translate }}\" matInput formControlName=\"quantity\">\r\n <mat-hint>{{ 'kingdom.build.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.build.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.build.costs' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ gold() | long}}</mat-chip>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/land.png\">{{ land() | long }}</mat-chip>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/turn.png\">{{ turn() | long }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.build.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"demolish()\">{{ 'kingdom.build.demolish' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"build()\">{{ 'kingdom.build.build' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class BuildComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n kingdomGold: any = this.store.selectSnapshot(AuthState.getKingdomGold);\r\n kingdomLand: any = this.store.selectSnapshot(AuthState.getKingdomLand);\r\n kingdomWorkshop: any = this.store.selectSnapshot(AuthState.getKingdomWorkshop);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n Math: any = Math;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public building: any,\r\n private dialogRef: MatDialogRef<BuildComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n quantity: [null, [Validators.required, Validators.min(1), Validators.max(Math.max(this.kingdomTurn.quantity, this.kingdomLand.quantity, this.kingdomGold.quantity))]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async build() {\r\n if (this.form.valid && this.land() <= this.kingdomLand.quantity && this.gold() <= this.kingdomGold.quantity && this.turn() <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const built = await this.apiService.buildStructure(this.uid, this.building.fid, this.form.value.quantity);\r\n this.notificationService.success('kingdom.build.built', built);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.build.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.build.error');\r\n }\r\n }\r\n\r\n async demolish() {\r\n if (this.form.valid && this.land() <= this.building.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const demolished = await this.apiService.demolishStructure(this.uid, this.building.fid, this.form.value.quantity);\r\n this.notificationService.success('kingdom.build.demolished', demolished);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.build.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.build.error');\r\n }\r\n }\r\n\r\n turn() {\r\n return Math.ceil(this.form.value.quantity / Math.ceil((this.kingdomWorkshop.quantity + 1) / this.building.structure.turnRatio));\r\n }\r\n\r\n gold() {\r\n return this.form.value.quantity * this.building.structure.goldCost;\r\n }\r\n\r\n land() {\r\n return this.form.value.quantity || 0;\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { Observable } from 'rxjs';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-charge',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.charge.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.charge.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.charge.source' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"(node$ | async)?.structure.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"(node$ | async)?.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"(node$ | async)?.structure.image\">\r\n </div>\r\n <div mat-line>{{ (node$ | async)?.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"(node$ | async)?.structure.description | translate | icon:(node$ | async)?.structure\"></div>\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.charge.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'resource.turn.name' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'resource.turn.name' | translate }}\" matInput formControlName=\"turns\">\r\n <mat-hint>{{ 'kingdom.charge.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.charge.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.charge.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"charge()\">{{ 'kingdom.charge.charge' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class ChargeComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public node$: Observable<any>,\r\n private dialogRef: MatDialogRef<ChargeComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n turns: [null, [Validators.required, Validators.min(1), Validators.max(this.kingdomTurn.quantity)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async charge() {\r\n if (this.form.valid && this.form.value.turns <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const charged = await this.apiService.chargeMana(this.uid, this.form.value.turns);\r\n this.notificationService.success('kingdom.charge.success', charged);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.charge.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.charge.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { BuildComponent } from './build.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Store, Select } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { TaxComponent } from './tax.component';\r\nimport { ChargeComponent } from './charge.component';\r\nimport { ExploreComponent } from './explore.component';\r\nimport { Observable, combineLatest } from 'rxjs';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-city',\r\n templateUrl: './city.component.html',\r\n styleUrls: ['./city.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\nexport class CityComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n @Select(AuthState.getKingdomBuildings) kingdomBuildings$: Observable<any[]>;\r\n @Select(AuthState.getKingdomVillage) village$: Observable<any>;\r\n @Select(AuthState.getKingdomNode) node$: Observable<any>;\r\n @Select(AuthState.getKingdomWorkshop) workshop$: Observable<any>;\r\n @Select(AuthState.getKingdomLand) land$: Observable<any>;\r\n @Select(AuthState.getKingdomTurn) turn$: Observable<any>;\r\n Math: any = Math;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private store: Store,\r\n public tutorialService: TutorialService,\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n /*\r\n combineLatest([\r\n this.kingdomBuildings$,\r\n this.village$,\r\n this.node$,\r\n this.workshop$,\r\n this.land$,\r\n this.turn$,\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(() => {\r\n this.tutorialService.ready('city');\r\n });\r\n */\r\n }\r\n\r\n openBuildDialog(building: any): void {\r\n const dialogRef = this.dialog.open(BuildComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: building,\r\n });\r\n }\r\n\r\n openTaxDialog(village$: any): void {\r\n const dialogRef = this.dialog.open(TaxComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: village$,\r\n });\r\n }\r\n\r\n openChargeDialog(node$: any): void {\r\n const dialogRef = this.dialog.open(ChargeComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: node$,\r\n });\r\n }\r\n\r\n openExploreDialog(land$: Observable<any>): void {\r\n const dialogRef = this.dialog.open(ExploreComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: land$,\r\n });\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-city\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/city.png\" [alt]=\"'kingdom.city.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.city.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.city.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.city')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>store</mat-icon>{{ (kingdomBuildings$ | async)?.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.buildings' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.city\">\r\n <button mat-list-item *ngFor=\"let building of kingdomBuildings$ | async\" (click)=\"openBuildDialog(building)\" class=\"common\">\r\n <div mat-list-avatar [matBadge]=\"building.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"building.structure.image\" [alt]=\"building.structure.name | translate\">\r\n </div>\r\n <div mat-line>{{ building.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"building.structure.description | translate | icon:building.structure\"></div>\r\n <div mat-list-avatar [matBadge]=\"Math.ceil(((workshop$ | async)?.quantity + 1) / building.structure.turnRatio) + ('resource.turn.ratio' | translate)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\"> [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.city.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"66\" fxFlex.lg=\"66\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\">\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/tax.png\" [alt]=\"'kingdom.tax.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.tax.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.tax.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.tax')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>store</mat-icon>1</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'kingdom.tax.tax' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.tax\">\r\n <button mat-list-item *ngIf=\"village$\" (click)=\"openTaxDialog(village$)\" class=\"common\">\r\n <div mat-list-avatar [matBadge]=\"(village$ | async)?.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"(village$ | async)?.structure.image\" [alt]=\"(village$ | async)?.structure.name | translate\">\r\n </div>\r\n <div mat-line>{{ (village$ | async)?.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"(village$ | async)?.structure.description | translate | icon:(village$ | async)?.structure\"></div>\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\"> [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.tax.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/charge.png\" [alt]=\"'kingdom.charge.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.charge.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.charge.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.charge')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>store</mat-icon>1</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'kingdom.charge.charge' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.charge\">\r\n <button mat-list-item *ngIf=\"node$\" (click)=\"openChargeDialog(node$)\" class=\"common\">\r\n <div mat-list-avatar [matBadge]=\"(node$ | async)?.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"(node$ | async)?.structure.image\" [alt]=\"(village$ | async)?.structure.name | translate\">\r\n </div>\r\n <div mat-line>{{ (node$ | async)?.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"(node$ | async)?.structure.description | translate | icon:(node$ | async)?.structure\"></div>\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\"> [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.charge.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/explore.png\" [alt]=\"'kingdom.explore.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.explore.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.explore.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.explore')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>store</mat-icon>1</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'kingdom.explore.explore' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.explore\">\r\n <button mat-list-item *ngIf=\"land$ | async\" (click)=\"openExploreDialog(land$)\" class=\"common\">\r\n <div mat-list-avatar [matBadge]=\"(land$ | async)?.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" src=\"/assets/images/resources/land.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n <div mat-line>{{ 'resource.land.name' | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ 'resource.land.description' | translate }}</div>\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.explore.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'app-explore',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.explore.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.explore.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.explore.discovery' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"(land$ | async).resource.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"(land$ | async).quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar src=\"/assets/images/resources/land.png\">\r\n </div>\r\n <div mat-line>{{ 'resource.land.name' | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ 'resource.land.description' | translate }}</div>\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.explore.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'resource.turn.name' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'resource.turn.name' | translate }}\" matInput formControlName=\"turns\">\r\n <mat-hint>{{ 'kingdom.explore.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.explore.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.explore.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"explore()\">{{ 'kingdom.explore.explore' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class ExploreComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n uid = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public land$: Observable<any>,\r\n private dialogRef: MatDialogRef<ExploreComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n turns: [null, [Validators.required, Validators.min(1), Validators.max(this.kingdomTurn.quantity)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async explore() {\r\n if (this.form.valid && this.form.value.turns <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const explored = await this.apiService.exploreLand(this.uid, this.form.value.turns);\r\n this.notificationService.success('kingdom.explore.success', explored);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.explore.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.explore.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { Observable } from 'rxjs';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-tax',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.tax.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.tax.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.tax.source' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"(village$ | async)?.structure.faction.id\">\r\n <div mat-list-avatar [matBadge]=\"(village$ | async)?.quantity | long\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"(village$ | async)?.structure.image\">\r\n </div>\r\n <div mat-line>{{ (village$ | async)?.structure.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"(village$ | async)?.structure.description | translate | icon:(village$ | async)?.structure\"></div>\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.tax.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'resource.turn.name' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'resource.turn.name' | translate }}\" matInput formControlName=\"turns\">\r\n <mat-hint>{{ 'kingdom.tax.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.tax.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.tax.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"tax()\">{{ 'kingdom.tax.tax' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class TaxComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public village$: Observable<any>,\r\n private dialogRef: MatDialogRef<TaxComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n turns: [null, [Validators.required, Validators.min(1), Validators.max(this.kingdomTurn.quantity)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async tax() {\r\n if (this.form.valid && this.form.value.turns <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const taxed = await this.apiService.taxGold(this.uid, this.form.value.turns);\r\n this.notificationService.success('kingdom.tax.success', taxed);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.tax.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.tax.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { fadeInOnEnterAnimation, fadeOutOnLeaveAnimation } from 'angular-animations';\r\nimport { Store } from '@ngxs/store';\r\nimport { CacheService } from 'src/app/services/cache.service';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport * as moment from 'moment';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';\r\nimport { map } from 'rxjs/operators';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { FoundationComponent } from './foundation.component';\r\nimport { Observable, combineLatest } from 'rxjs';\r\nimport { ManifestComponent } from './manifest.component';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\n@Component({\r\n selector: 'app-clan',\r\n templateUrl: './clan.component.html',\r\n styleUrls: ['./clan.component.scss'],\r\n animations: [\r\n fadeInOnEnterAnimation({ duration: 250, delay: 250 }),\r\n fadeOutOnLeaveAnimation({ duration: 250, delay: 250 }),\r\n ],\r\n})\r\n@UntilDestroy()\r\nexport class ClanComponent implements OnInit {\r\n\r\n kingdomGuilds: any[] = [];\r\n kingdomGuild: any = null;\r\n kingdomClan$: Observable<any> = this.store.select(AuthState.getKingdomClan);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomGuilded: any = null;\r\n columns = ['name', 'actions'];\r\n filters: any = {\r\n name: {\r\n type: 'text',\r\n value: '',\r\n },\r\n };\r\n data: MatTableDataSource<any> = new MatTableDataSource();\r\n @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;\r\n @ViewChild(MatSort, {static: true}) sort: MatSort;\r\n\r\n constructor(\r\n private store: Store,\r\n private cacheService: CacheService,\r\n private angularFirestore: AngularFirestore,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n private notificationService: NotificationService,\r\n private dialog: MatDialog,\r\n public tutorialService: TutorialService,\r\n ) { }\r\n\r\n async ngOnInit(): Promise<void> {\r\n this.kingdomGuilds = await this.cacheService.getGuilds();\r\n combineLatest([\r\n this.angularFirestore.collection<any>('clans').valueChanges({ idField: 'fid' }),\r\n this.store.select(AuthState.getKingdomGuild).pipe(map(((data: string) => JSON.parse(data)))),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([clans, kingdomGuild]) => {\r\n this.data = new MatTableDataSource(clans);\r\n this.data.paginator = this.paginator;\r\n this.data.sortingDataAccessor = (obj, property) => property === 'name' ? obj['power'] : obj[property];\r\n this.data.sort = this.sort;\r\n this.data.filterPredicate = this.createFilter();\r\n this.applyFilter();\r\n if (kingdomGuild) {\r\n this.kingdomGuild = this.kingdomGuilds.find(guild => guild.id === kingdomGuild.guild.id);\r\n this.kingdomGuilded = kingdomGuild.guilded;\r\n }\r\n });\r\n }\r\n\r\n applyFilter(): void {\r\n this.data.filter = JSON.stringify({\r\n name: this.filters.name.value,\r\n });\r\n }\r\n\r\n createFilter(): (data: any, filter: string) => boolean {\r\n const filterFunction = (data: any, filter: string): boolean => {\r\n const filters = JSON.parse(filter);\r\n return data.name.toLowerCase().includes(filters.name);\r\n };\r\n return filterFunction;\r\n }\r\n\r\n async joinClan(clan: any, $event: Event) {\r\n $event.stopPropagation();\r\n this.loadingService.startLoading();\r\n try {\r\n const joined = await this.apiService.joinClan(this.uid, clan.fid);\r\n this.notificationService.success('kingdom.clan.success');\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.clan.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n async leaveClan(clan: any, $event: Event) {\r\n $event.stopPropagation();\r\n this.loadingService.startLoading();\r\n try {\r\n const joined = await this.apiService.leaveClan(this.uid, clan.fid);\r\n this.notificationService.success('kingdom.clan.success');\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.clan.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n openManifestDialog(clan: any): void {\r\n const dialogRef = this.dialog.open(ManifestComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: { ...clan, members: [] },\r\n });\r\n }\r\n\r\n openFoundationDialog(): void {\r\n const dialogRef = this.dialog.open(FoundationComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: null,\r\n });\r\n }\r\n\r\n canBeFavored(): boolean {\r\n return this.kingdomGuilded\r\n ? moment(this.store.selectSnapshot(AuthState.getClock)).isAfter(moment(this.kingdomGuilded))\r\n : false;\r\n }\r\n\r\n async favorGuild() {\r\n if (this.kingdomGuild && this.canBeFavored()) {\r\n this.loadingService.startLoading();\r\n try {\r\n const favored = await this.apiService.favorGuild(this.uid, this.kingdomGuild.id);\r\n this.notificationService.success('kingdom.guild.success');\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.guild.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.guild.error');\r\n }\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-clan table-responsive\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"66\" fxFlex.lg=\"66\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/clan.png\" [alt]=\"'kingdom.clan.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.clan.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.clan.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.clan')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>people</mat-icon>{{ data.data.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.clan.help' | translate\"></p>\r\n <table mat-table matSort [dataSource]=\"data\" matSortDisableClear tourAnchor=\"tour.clan\" [attr.aria-label]=\"'kingdom.clan.name' | translate\">\r\n <ng-container matColumnDef=\"{{ column }}\" *ngFor=\"let column of columns\">\r\n <mat-header-cell class=\"table-header\" *matHeaderCellDef>\r\n\r\n <div mat-sort-header>{{ 'table.column.' + column | translate }}</div>\r\n\r\n <mat-form-field class=\"table-filter\" *ngIf=\"filters[column] && filters[column].type === 'text'\">\r\n <input matInput [(ngModel)]=\"filters[column].value\" (keyup)=\"applyFilter()\" autocomplete=\"off\">\r\n <button mat-button *ngIf=\"filters[column].value\" matSuffix mat-icon-button (click)=\"filters[column].value=''; applyFilter()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let clan\" [attr.data-label]=\"'table.column.' + column | translate\">\r\n\r\n <ng-template [ngIf]=\"column === 'name'\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"clan.fid === kingdomClan$ ? 'legendary': 'common'\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"clan.image\" [alt]=\"'kingdom.clan.name' | translate\">\r\n </div>\r\n <div mat-line>{{ clan.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ clan.description }}</div>\r\n <div mat-list-avatar [matBadge]=\"clan.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\" [alt]=\"'icon.power.name' | translate\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"column === 'actions'\">\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.clan.join' | translate }}\" (click)=\"joinClan(clan, $event)\" [disabled]=\"clan.fid === (kingdomClan$ | async)?.fid\">\r\n <mat-icon>thumb_up</mat-icon>\r\n </button>\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.clan.leave' | translate }}\" (click)=\"leaveClan(clan, $event)\" [disabled]=\"clan.fid !== (kingdomClan$ | async)?.fid\">\r\n <mat-icon>thumb_down</mat-icon>\r\n </button>\r\n </ng-template>\r\n\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-header-row *matHeaderRowDef=\"columns; sticky: true\"></mat-header-row>\r\n <mat-row *matRowDef=\"let clan; columns: columns; let i = index\" [tourAnchor]=\"i === 0 ? 'tour.kingdom' : null\" (click)=\"openManifestDialog(clan)\"></mat-row>\r\n </table>\r\n\r\n <mat-toolbar>\r\n <mat-toolbar-row>\r\n <button mat-mini-fab color=\"primary\" title=\"{{ 'kingdom.clan.found' | translate }}\" (click)=\"openFoundationDialog()\" [disabled]=\"(kingdomClan$ | async)\"><mat-icon>thumbs_up_down</mat-icon></button>\r\n <span class=\"fill-space\"></span>\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 20]\" showFirstLastButtons></mat-paginator>\r\n </mat-toolbar-row>\r\n </mat-toolbar>\r\n\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/guild.png\" [alt]=\"'kingdom.guild.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.guild.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.guild.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.guild')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>shield</mat-icon>{{ kingdomGuilds.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.guild.help' | translate\"></p>\r\n <div matSubheader>{{ 'card.list.guilds' | translate }}:</div>\r\n <mat-form-field tourAnchor=\"tour.guild\">\r\n <mat-label>{{ 'kingdom.guild.select' | translate }}</mat-label>\r\n <mat-select [(ngModel)]=\"kingdomGuild\">\r\n <mat-select-trigger *ngIf=\"kingdomGuild\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"kingdomGuild.faction.id\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"kingdomGuild.image\" [alt]=\"kingdomGuild.name | translate\">\r\n </div>\r\n <div mat-line>{{ kingdomGuild.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"kingdomGuild.description | translate | icon:kingdomGuild\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let guild of kingdomGuilds\" [value]=\"guild\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"guild.faction.id\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"guild.image\" [alt]=\"guild.name | translate\">\r\n </div>\r\n <div mat-line>{{ guild.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"guild.description | translate | icon:guild\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </mat-card-content>\r\n\r\n <mat-card-actions>\r\n <span class=\"fill-space\"></span>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!kingdomGuild || !canBeFavored()\" (click)=\"favorGuild()\" cdkFocusInitial>\r\n {{ canBeFavored() ? ('kingdom.guild.favor' | translate) : kingdomGuilded | date:('dateformat.short' | translate) }}\r\n </button>\r\n </mat-card-actions>\r\n </mat-card>\r\n\r\n </div>\r\n</div>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { MatDialogRef } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\nconst CLAN_COST = 1000000;\r\n\r\n@Component({\r\n selector: 'app-foundation',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.foundation.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.foundation.description' | translate}}</p>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.foundation.information' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.foundation.image' | translate }}</mat-label>\r\n <mat-select formControlName=\"image\">\r\n <mat-select-trigger>\r\n <mat-list dense>\r\n <mat-list-item class=\"common\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"form.value.image\">\r\n </div>\r\n <div mat-line>{{ form.value.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ form.value.description }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let image of images\" [value]=\"image\">\r\n <mat-list dense>\r\n <mat-list-item class=\"common\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"image\">\r\n </div>\r\n <div mat-line>{{ form.value.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ form.value.description }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.foundation.rubric' | translate }}</mat-label>\r\n <input placeholder=\"{{ 'kingdom.foundation.rubric' | translate }}\" matInput formControlName=\"name\">\r\n <mat-error>{{ 'kingdom.foundation.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.foundation.motto' | translate }}</mat-label>\r\n <textarea placeholder=\"{{ 'kingdom.foundation.motto' | translate }}\" matInput rows=\"2\" formControlName=\"description\"></textarea>\r\n <mat-error>{{ 'kingdom.foundation.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.foundation.costs' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ CLAN_COST | long}}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.foundation.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"foundation()\">{{ 'kingdom.foundation.found' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class FoundationComponent implements OnInit {\r\n\r\n form: FormGroup = null;\r\n kingdomGold: any = this.store.selectSnapshot(AuthState.getKingdomGold);\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n images: string[] = [];\r\n CLAN_COST = CLAN_COST;\r\n\r\n constructor(\r\n private dialogRef: MatDialogRef<FoundationComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.images = [\r\n '/assets/images/clans/crow.png',\r\n '/assets/images/clans/axe.png',\r\n '/assets/images/clans/hat.png',\r\n '/assets/images/clans/helmet.png',\r\n '/assets/images/clans/rip.png',\r\n ];\r\n this.form = this.formBuilder.group({\r\n image: [this.images[0], [Validators.required]],\r\n name: [null, [Validators.required, Validators.maxLength(50)]],\r\n description: [null, [Validators.required, Validators.maxLength(100)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async foundation() {\r\n if (this.form.valid && CLAN_COST <= this.kingdomGold.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const founded = await this.apiService.foundateClan(this.uid, this.form.value.name, this.form.value.description, this.form.value.image);\r\n this.notificationService.success('kingdom.foundation.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.foundation.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.foundation.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';\r\n\r\n@Component({\r\n selector: 'app-manifest',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.manifest.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.manifest.clan' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item class=\"common\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"clan.image\">\r\n </div>\r\n <div mat-line>{{ clan.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ clan.description }}</div>\r\n <div mat-list-avatar [matBadge]=\"clan.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.manifest.leader' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"clan.leader.faction.id\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"clan.leader.faction.image\">\r\n </div>\r\n <div mat-line>{{ clan.leader.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ clan.leader.faction.name | translate }}</div>\r\n <div mat-list-avatar [matBadge]=\"clan.leader.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.manifest.members' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item *ngFor=\"let member of clan.members\" [ngClass]=\"member.faction.id\">\r\n <div mat-list-avatar>\r\n <img mat-list-avatar [src]=\"member.faction.image\">\r\n </div>\r\n <div mat-line>{{ member.name }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ member.faction.name | translate }}</div>\r\n <div mat-list-avatar [matBadge]=\"member.power | short\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/icons/power.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-raised-button color=\"primary\" (click)=\"close()\">{{ 'kingdom.manifest.close' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [\r\n ],\r\n})\r\n@UntilDestroy()\r\nexport class ManifestComponent implements OnInit {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public clan: any,\r\n private dialogRef: MatDialogRef<ManifestComponent>,\r\n private angularFirestore: AngularFirestore,\r\n ) { }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>(`clans/${this.clan.fid}/members`).valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(members => {\r\n this.clan.members = members;\r\n });\r\n }\r\n\r\n}\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-buy',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.buy.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.buy.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.buy.artifact' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[item.faction.id, item.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"1\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"item.image\">\r\n </div>\r\n <div mat-line>{{ item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"item.description | translate | icon:item\"></div>\r\n <div mat-list-avatar [matBadge]=\"item.gems | long\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gem.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.buy.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"item.gems > kingdomGem.quantity\" (click)=\"buy()\" cdkFocusInitial>{{ 'kingdom.buy.buy' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n `],\r\n})\r\nexport class BuyComponent {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomGem: any = this.store.selectSnapshot(AuthState.getKingdomGem);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public item: any,\r\n private dialogRef: MatDialogRef<BuyComponent>,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private notificationService: NotificationService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async buy() {\r\n if (this.item.gems <= this.kingdomGem.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const bought = await this.apiService.buyEmporium(this.uid, this.item.id);\r\n this.notificationService.success('kingdom.emporium.success', bought);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.emporium.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.emporium.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { CacheService } from 'src/app/services/cache.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { BuyComponent } from './buy.component';\r\nimport { Store, Select } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\nimport { Observable } from 'rxjs';\r\nimport { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';\r\nimport { PERK_COST } from './perk.component';\r\nimport { PlantComponent } from './plant.component';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\n\r\n@Component({\r\n selector: 'app-emporium',\r\n templateUrl: './emporium.component.html',\r\n styleUrls: ['./emporium.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class EmporiumComponent implements OnInit {\r\n\r\n PERK_COST = PERK_COST;\r\n\r\n @Select(AuthState.getKingdomTree) tree$: Observable<any>;\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n gems: number = 0;\r\n kingdomTree: any = null;\r\n originalTree: any = null;\r\n emporiumItems: any[] = [];\r\n emporiumPacks: any[] = [];\r\n\r\n constructor(\r\n private cacheService: CacheService,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n public tutorialService: TutorialService,\r\n // private angularFirestore: AngularFirestore,\r\n ) { }\r\n\r\n async ngOnInit(): Promise<void> {\r\n this.emporiumItems = (await this.cacheService.getItems()).filter((item: any) => item.gems > 0);\r\n this.emporiumPacks = (await this.cacheService.getPacks()).sort((a: any, b: any) => a.quantity - b.quantity);\r\n this.tree$.pipe(untilDestroyed(this)).subscribe((tree: any) => {\r\n this.originalTree = tree;\r\n this.kingdomTree = JSON.parse(JSON.stringify(tree));\r\n });\r\n /*\r\n this.angularFirestore.doc<any>('perks/strategy').valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(tree => {\r\n this.originalTree = tree;\r\n this.kingdomTree = JSON.parse(JSON.stringify(tree));\r\n });\r\n */\r\n }\r\n\r\n openBuyDialog(item: any): void {\r\n const dialogRef = this.dialog.open(BuyComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: item,\r\n });\r\n }\r\n\r\n openPlantDialog(): void {\r\n const tree = {\r\n strategy: this.findTree(this.kingdomTree, 'strategy'),\r\n agriculture: this.findTree(this.kingdomTree, 'agriculture'),\r\n alchemy: this.findTree(this.kingdomTree, 'alchemy'),\r\n architecture: this.findTree(this.kingdomTree, 'architecture'),\r\n culture: this.findTree(this.kingdomTree, 'culture'),\r\n teology: this.findTree(this.kingdomTree, 'teology'),\r\n cartography: this.findTree(this.kingdomTree, 'cartography'),\r\n metalurgy: this.findTree(this.kingdomTree, 'metalurgy'),\r\n medicine: this.findTree(this.kingdomTree, 'medicine'),\r\n forge: this.findTree(this.kingdomTree, 'forge'),\r\n science: this.findTree(this.kingdomTree, 'science'),\r\n mysticism: this.findTree(this.kingdomTree, 'mysticism'),\r\n masonry: this.findTree(this.kingdomTree, 'masonry'),\r\n };\r\n const dialogRef = this.dialog.open(PlantComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n branches: tree,\r\n gems: this.gems,\r\n },\r\n });\r\n dialogRef.afterClosed().pipe(untilDestroyed(this)).subscribe((reset: boolean) => {\r\n if (reset) {\r\n this.gems = 0;\r\n }\r\n });\r\n }\r\n\r\n findTree(node: any, perk: string): number {\r\n if (node.id === perk) {\r\n return node.level;\r\n } else if (node.perks) {\r\n let found = null;\r\n for (let i = 0; found === null && i < node.perks.length; i++) {\r\n found = this.findTree(node.perks[i], perk);\r\n }\r\n return found;\r\n }\r\n return null;\r\n }\r\n\r\n increaseGems($event: number): void {\r\n this.gems += $event;\r\n }\r\n\r\n resetTree(): void {\r\n this.kingdomTree = JSON.parse(JSON.stringify(this.originalTree));\r\n this.gems = 0;\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-emporium\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/emporium.png\" [alt]=\"'kingdom.emporium.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.emporium.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.emporium.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.emporium')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>sell</mat-icon>{{ emporiumItems.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.artifacts' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.emporium\">\r\n <button mat-list-item *ngFor=\"let item of emporiumItems\" (click)=\"openBuyDialog(item)\" [ngClass]=\"item.legendary ? 'legendary' : 'common'\">\r\n <div mat-list-avatar matBadge=\"1\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"item.image\" [alt]=\"item.name | translate\">\r\n </div>\r\n <div mat-line>{{ item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"item.description | translate | icon:item\"></div>\r\n <div mat-list-avatar [matBadge]=\"item.gems\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gem.png\" [alt]=\"'resource.gem.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.emporium.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/tree.png\" [alt]=\"'kingdom.tree.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.tree.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.tree.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.tree')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>diamond</mat-icon>{{ PERK_COST }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content class=\"tree\" tourAnchor=\"tour.tree\">\r\n <app-perk [perk]=\"kingdomTree\" [disabled]=\"false\" *ngIf=\"kingdomTree\" (increasedPerk)=\"increaseGems($event)\"></app-perk>\r\n </mat-card-content>\r\n\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.tree.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n\r\n <mat-card-actions>\r\n <span class=\"fill-space\"></span>\r\n <button mat-button (click)=\"resetTree()\">{{ 'kingdom.tree.reset' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!gems\" (click)=\"openPlantDialog()\">{{ 'kingdom.tree.save' | translate }} ( {{ gems }} <img class=\"mat-icon\" src=\"/assets/images/resources/gem.png\" [alt]=\"'resource.gem.name' | translate\"> )</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/mining.png\" [alt]=\"'kingdom.mining.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.mining.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.mining.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.mining')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>redeem</mat-icon>{{ emporiumPacks.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.packs' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.mining\">\r\n <button mat-list-item *ngFor=\"let pack of emporiumPacks\" class=\"common\" disabled>\r\n <div mat-list-avatar [matBadge]=\"pack.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"pack.image\" [alt]=\"pack.name | translate\">\r\n </div>\r\n <div mat-line>{{ pack.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"pack.description | translate | icon:pack\"></div>\r\n <div mat-list-avatar [matBadge]=\"pack.money + '€'\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/stores/merchant.png\" [alt]=\"'store.merchant.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.mining.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n</div>\r\n","import { Component, Input, ViewChildren, QueryList, Output, EventEmitter } from '@angular/core';\r\nimport { MatTooltip } from '@angular/material/tooltip';\r\n\r\nexport const PERK_COST: number = 5;\r\n\r\n@Component({\r\n selector: 'app-perk',\r\n template: `\r\n <ng-container *ngTemplateOutlet=\"tree; context: { perk: perk, disabled: disabled }\"></ng-container>\r\n <ng-template #tree let-perk=\"perk\" let-disabled=\"disabled\">\r\n <div class=\"perk\" [matTooltip]=\"(perk.name | translate).toUpperCase() + '\\n' + (perk.description | translate)\" matTooltipPosition=\"below\" #tooltip>\r\n <button mat-fab color=\"primary\" [matBadge]=\"perk.level + '/' + perk.max\" matBadgePosition=\"before\" matBadgeColor=\"primary\" [disabled]=\"disabled\" (click)=\"increasePerk(perk)\">\r\n <img class=\"perk-image\" [src]=\"perk.image\">\r\n </button>\r\n </div>\r\n <div *ngIf=\"perk.perks && perk.perks.length\" class=\"perks\">\r\n <ng-container *ngFor=\"let child of perk.perks\">\r\n <ng-container *ngTemplateOutlet=\"tree; context: { perk: child, disabled: perk.level <= 0 }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n `,\r\n styles: [`\r\n .perk {\r\n display: inline-block;\r\n margin: 10px 5px;\r\n }\r\n .perk button {\r\n transition: all 0.5s ease;\r\n }\r\n ::ng-deep .mat-fab .mat-button-wrapper {\r\n padding: 0;\r\n line-height: 0;\r\n }\r\n ::ng-deep .mat-fab .mat-button-wrapper .perk-image {\r\n width: 100%;\r\n height: auto;\r\n border-radius: 50%;\r\n }\r\n .perk button:disabled {\r\n filter: grayscale(100%);\r\n }\r\n .perks {\r\n width: 100%;\r\n display: flex;\r\n flex-wrap: wrap;\r\n order: 999;\r\n justify-content: center;\r\n }\r\n `],\r\n})\r\nexport class PerkComponent {\r\n\r\n @Input() perk: any;\r\n @Input() disabled: boolean;\r\n @Output() increasedPerk = new EventEmitter<number>();\r\n\r\n @ViewChildren(MatTooltip) tooltips: QueryList<MatTooltip>;\r\n\r\n increasePerk(perk: any): void {\r\n if (perk.level < perk.max) {\r\n perk.level++;\r\n this.increasedPerk.emit(PERK_COST);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-plant',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.plant.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.plant.help' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.plant.costs' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item class=\"grey common\">\r\n <div mat-list-avatar [matBadge]=\"tree.gems\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar src=\"/assets/images/resources/gem.png\">\r\n </div>\r\n <div mat-line>{{ 'resource.gem.name' | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"'resource.gem.description' | translate\"></div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.plant.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"tree.gems > kingdomGem.quantity\" (click)=\"plant()\" cdkFocusInitial>{{ 'kingdom.plant.plant' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [\r\n ]\r\n})\r\nexport class PlantComponent {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomGem: any = this.store.selectSnapshot(AuthState.getKingdomGem);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public tree: any,\r\n private dialogRef: MatDialogRef<PlantComponent>,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private notificationService: NotificationService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n close(reset: boolean = false): void {\r\n this.dialogRef.close(reset);\r\n }\r\n\r\n async plant(): Promise<void> {\r\n if (this.tree.gems <= this.kingdomGem.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const planted = await this.apiService.plantTree(this.uid, this.tree.branches, this.tree.gems);\r\n this.notificationService.success('kingdom.tree.success', planted);\r\n this.close(true);\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.tree.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.tree.error');\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { CityComponent } from './city/city.component';\r\nimport { CensusComponent } from './census/census.component';\r\nimport { ArmyComponent } from './army/army.component';\r\nimport { SorceryComponent } from './sorcery/sorcery.component';\r\nimport { ArchiveComponent } from './archive/archive.component';\r\nimport { TempleComponent } from './temple/temple.component';\r\nimport { TavernComponent } from './tavern/tavern.component';\r\nimport { AuctionComponent } from './auction/auction.component';\r\nimport { EmporiumComponent } from './emporium/emporium.component';\r\nimport { ClanComponent } from './clan/clan.component';\r\n\r\nconst routes: Routes = [\r\n { path: 'city', component: CityComponent },\r\n { path: 'census', component: CensusComponent },\r\n { path: 'army', component: ArmyComponent },\r\n { path: 'sorcery', component: SorceryComponent },\r\n { path: 'archive', component: ArchiveComponent },\r\n { path: 'temple', component: TempleComponent },\r\n { path: 'tavern', component: TavernComponent },\r\n { path: 'auction', component: AuctionComponent },\r\n { path: 'emporium', component: EmporiumComponent },\r\n { path: 'clan', component: ClanComponent },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class KingdomRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { KingdomRoutingModule } from './kingdom-routing.module';\r\nimport { CityComponent } from './city/city.component';\r\nimport { SharedModule } from '../shared/shared.module';\r\nimport { CensusComponent } from './census/census.component';\r\nimport { ArmyComponent } from './army/army.component';\r\nimport { SorceryComponent } from './sorcery/sorcery.component';\r\nimport { ResearchComponent } from './sorcery/research.component';\r\nimport { ArchiveComponent } from './archive/archive.component';\r\nimport { ReportComponent } from './archive/report.component';\r\nimport { TempleComponent } from './temple/temple.component';\r\nimport { OfferComponent } from './temple/offer.component';\r\nimport { TavernComponent } from './tavern/tavern.component';\r\nimport { AuctionComponent } from './auction/auction.component';\r\nimport { BuildComponent } from './city/build.component';\r\nimport { EmporiumComponent } from './emporium/emporium.component';\r\nimport { RecruitComponent } from './army/recruit.component';\r\nimport { DispelComponent } from './temple/dispel.component';\r\nimport { ActivateComponent } from './sorcery/activate.component';\r\nimport { ConjureComponent } from './sorcery/conjure.component';\r\nimport { BattleComponent } from './census/battle.component';\r\nimport { BidComponent } from './auction/bid.component';\r\nimport { TaxComponent } from './city/tax.component';\r\nimport { ChargeComponent } from './city/charge.component';\r\nimport { ExploreComponent } from './city/explore.component';\r\nimport { BuyComponent } from './emporium/buy.component';\r\nimport { DisbandComponent } from './army/disband.component';\r\nimport { DischargeComponent } from './tavern/discharge.component';\r\nimport { LetterComponent } from './census/letter.component';\r\nimport { TourMatMenuModule } from 'ngx-ui-tour-md-menu';\r\nimport { ClanComponent } from './clan/clan.component';\r\nimport { NgxCurrencyModule } from 'ngx-currency';\r\nimport { FoundationComponent } from './clan/foundation.component';\r\nimport { ManifestComponent } from './clan/manifest.component';\r\nimport { DetailComponent } from './census/detail.component';\r\nimport { BreakComponent } from './temple/break.component';\r\nimport { PerkComponent } from './emporium/perk.component';\r\nimport { PlantComponent } from './emporium/plant.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n CityComponent,\r\n CensusComponent,\r\n ArmyComponent,\r\n SorceryComponent,\r\n ResearchComponent,\r\n ArchiveComponent,\r\n ReportComponent,\r\n TempleComponent,\r\n OfferComponent,\r\n TavernComponent,\r\n AuctionComponent,\r\n BuildComponent,\r\n EmporiumComponent,\r\n RecruitComponent,\r\n DispelComponent,\r\n ActivateComponent,\r\n ConjureComponent,\r\n BattleComponent,\r\n BidComponent,\r\n TaxComponent,\r\n ChargeComponent,\r\n ExploreComponent,\r\n BuyComponent,\r\n DisbandComponent,\r\n DischargeComponent,\r\n LetterComponent,\r\n ClanComponent,\r\n FoundationComponent,\r\n ManifestComponent,\r\n DetailComponent,\r\n BreakComponent,\r\n PerkComponent,\r\n PlantComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n KingdomRoutingModule,\r\n SharedModule,\r\n TourMatMenuModule,\r\n NgxCurrencyModule,\r\n ],\r\n})\r\nexport class KingdomModule { }\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\nexport enum ArtifactAssignmentType {\r\n NONE,\r\n ATTACK,\r\n DEFENSE,\r\n}\r\n\r\n@Component({\r\n selector: 'app-activate',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.activate.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.activate.description' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.activate.artifact' | translate }}:</div>\r\n <mat-form-field *ngIf=\"kingdomArtifacts\">\r\n <mat-label>{{ 'kingdom.activate.select' | translate }}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedArtifact\">\r\n <mat-select-trigger *ngIf=\"selectedArtifact\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[selectedArtifact.item.faction.id, selectedArtifact.item.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"selectedArtifact.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"selectedArtifact.item.image\">\r\n </div>\r\n <div mat-line>{{ selectedArtifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"selectedArtifact.item.description | translate | icon:selectedArtifact.item\"></div>\r\n <div mat-list-avatar [matBadge]=\"selectedArtifact.item.turns\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let artifact of kingdomArtifacts\" [value]=\"artifact\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[artifact.item.faction.id, artifact.item.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"artifact.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"artifact.item.image\">\r\n </div>\r\n <div mat-line>{{ artifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"artifact.item.description | translate | icon:artifact.item\"></div>\r\n <div mat-list-avatar [matBadge]=\"artifact.item.turns\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.activate.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!selectedArtifact\" (click)=\"activate()\">{{ 'kingdom.activate.activate' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\n@UntilDestroy()\r\nexport class ActivateComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n kingdomArtifacts: any[] = [];\r\n selectedArtifact: any = null;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public activation: {\r\n artifact: any,\r\n kingdom: any,\r\n },\r\n private dialogRef: MatDialogRef<ActivateComponent>,\r\n private angularFirestore: AngularFirestore,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private notificationService: NotificationService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/artifacts`, ref => ref.where('assignment', '==', ArtifactAssignmentType.NONE).where('item.battle', '==', false).where('item.self', '==', !this.activation.kingdom)).valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(artifacts => {\r\n this.kingdomArtifacts = artifacts;\r\n if (this.activation.artifact) this.selectedArtifact = this.kingdomArtifacts.find(artifact => artifact.fid === this.activation.artifact.fid);\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async activate() {\r\n if (this.selectedArtifact.quantity && this.selectedArtifact.item.turns <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const artifact = this.selectedArtifact; // copy because the artifact may be the last one and gets deleted from server\r\n const activated = await this.apiService.activateArtifact(this.uid, this.selectedArtifact.fid, this.activation.kingdom ? this.activation.kingdom.fid : this.uid);\r\n if (artifact.item.subtype === 'summon') this.notificationService.success('kingdom.activate.summon', activated);\r\n if (artifact.item.subtype === 'resource') this.notificationService.success('kingdom.activate.resource', activated);\r\n if (artifact.item.subtype === 'item') this.notificationService.success('kingdom.activate.item', activated);\r\n if (artifact.item.subtype === 'spell') this.notificationService.success('kingdom.activate.spell', activated);\r\n if (artifact.item.subtype === 'enchantment' && artifact.item.spells.length) this.notificationService.success('kingdom.activate.enchantment', activated);\r\n if (artifact.item.subtype === 'enchantment' && !artifact.item.spells.length) this.notificationService.success('kingdom.dispel.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.activate.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.activate.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\nexport enum CharmAssignmentType {\r\n NONE,\r\n ATTACK,\r\n DEFENSE,\r\n}\r\n\r\n@Component({\r\n selector: 'app-conjure',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.conjure.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.conjure.description' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.conjure.charm' | translate }}:</div>\r\n <mat-list dense *ngIf=\"!kingdomCharms && selectedCharm\">\r\n <mat-list-item [ngClass]=\"[selectedCharm.spell.faction.id, selectedCharm.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"selectedCharm.spell.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"selectedCharm.spell.image\">\r\n </div>\r\n <div mat-line>{{ selectedCharm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['god', 'family', 'skill', 'resource', 'category'].includes(selectedCharm.spell.type)\">{{ selectedCharm.spell.description | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['spell', 'item'].includes(selectedCharm.spell.type)\" [innerHTML]=\"selectedCharm.spell.description | translate | icon:selectedCharm.spell\"></div>\r\n <div mat-list-avatar [matBadge]=\"selectedCharm.spell.turnCost\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n <mat-form-field *ngIf=\"kingdomCharms\">\r\n <mat-label>{{ 'kingdom.conjure.select' | translate }}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedCharm\">\r\n <mat-select-trigger *ngIf=\"selectedCharm\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[selectedCharm.spell.faction.id, selectedCharm.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"selectedCharm.spell.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"selectedCharm.spell.image\">\r\n </div>\r\n <div mat-line>{{ selectedCharm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['god', 'family', 'skill', 'resource', 'category'].includes(selectedCharm.spell.type)\">{{ selectedCharm.spell.description | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['spell', 'hero', 'item'].includes(selectedCharm.spell.type)\" [innerHTML]=\"selectedCharm.spell.description | translate | icon:selectedCharm.spell\"></div>\r\n <div mat-list-avatar [matBadge]=\"selectedCharm.spell.turnCost\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-select-trigger>\r\n <mat-option *ngFor=\"let charm of kingdomCharms\" [value]=\"charm\">\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[charm.spell.faction.id, charm.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"charm.spell.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"charm.spell.image\">\r\n </div>\r\n <div mat-line>{{ charm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['god', 'family', 'skill', 'resource', 'category'].includes(charm.spell.type)\">{{ charm.spell.description | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" *ngIf=\"['spell', 'hero', 'item'].includes(charm.spell.type)\" [innerHTML]=\"charm.spell.description | translate | icon:charm.spell\"></div>\r\n <div mat-list-avatar [matBadge]=\"charm.spell.turnCost\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div mat-dialog-content *ngIf=\"selectedCharm\">\r\n <div matSubheader>{{ 'kingdom.conjure.costs' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/mana.png\">{{ selectedCharm.spell.manaCost | long }}</mat-chip>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/turn.png\">{{ selectedCharm.spell.turnCost | long }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.conjure.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!selectedCharm\" (click)=\"conjure()\">{{ 'kingdom.conjure.conjure' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\n@UntilDestroy()\r\nexport class ConjureComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n kingdomMana: any = this.store.selectSnapshot(AuthState.getKingdomMana);\r\n kingdomCharms: any[] = null;\r\n selectedCharm: any = null;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public conjuration: any,\r\n private dialogRef: MatDialogRef<ConjureComponent>,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private notificationService: NotificationService,\r\n private angularFirestore: AngularFirestore,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/charms`, ref => ref.where('spell.battle', '==', false).where('spell.self', '==', !this.conjuration.kingdom)).valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(charms => {\r\n this.kingdomCharms = charms;\r\n if (this.conjuration.charm) this.selectedCharm = this.kingdomCharms.find(charm => charm.fid === this.conjuration.charm.fid);\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async conjure() {\r\n if (this.selectedCharm.spell.turnCost <= this.kingdomTurn.quantity && this.selectedCharm.spell.manaCost <= this.kingdomMana.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const conjured = await this.apiService.conjureCharm(this.uid, this.selectedCharm.fid, this.conjuration.kingdom ? this.conjuration.kingdom.fid : this.uid);\r\n if (this.selectedCharm.spell.subtype === 'summon') this.notificationService.success('kingdom.conjure.summon', conjured);\r\n if (this.selectedCharm.spell.subtype === 'resource') this.notificationService.success('kingdom.conjure.resource', conjured);\r\n if (this.selectedCharm.spell.subtype === 'item') this.notificationService.success('kingdom.conjure.item', conjured);\r\n if (this.selectedCharm.spell.subtype === 'spell') this.notificationService.success('kingdom.conjure.spell', conjured);\r\n if (this.selectedCharm.spell.subtype === 'enchantment' && !this.selectedCharm.spell.multiple) this.notificationService.success('kingdom.conjure.enchantment', conjured);\r\n if (this.selectedCharm.spell.subtype === 'enchantment' && this.selectedCharm.spell.multiple) this.notificationService.success('kingdom.dispel.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.conjure.error');\r\n }\r\n } else {\r\n this.notificationService.error('kingdom.conjure.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-research',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.research.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p [innerHTML]=\"'kingdom.research.description' | translate | icon\"></p>\r\n <div matSubheader>{{ 'kingdom.research.charm' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[charm.spell.faction.id, charm.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"charm.spell.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"charm.spell.image\">\r\n </div>\r\n <div mat-line>{{ charm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"charm.spell.description | translate | icon:charm.spell\"></div>\r\n <div mat-line *ngIf=\"charm.turns < charm.spell.turnResearch\">\r\n <mat-progress-bar [value]=\"charm.turns * 100 / charm.spell.turnResearch\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"((charm.turns) | long) + ' / ' + (charm.spell.turnResearch | long)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.research.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'resource.turn.name' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'resource.turn.name' | translate }}\" matInput formControlName=\"turns\">\r\n <mat-hint>{{ 'kingdom.research.hint' | translate }}</mat-hint>\r\n <mat-error>{{ 'kingdom.research.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.research.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"research()\">{{ 'kingdom.research.research' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class ResearchComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n form: FormGroup = null;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public charm: any,\r\n private dialogRef: MatDialogRef<ResearchComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.form = this.formBuilder.group({\r\n turns: [null, [Validators.required, Validators.min(1), Validators.max(this.kingdomTurn.quantity)]],\r\n });\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async research() {\r\n if (this.form.valid && this.form.value.turns <= this.kingdomTurn.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const researched = await this.apiService.researchCharm(this.uid, this.charm.fid, this.form.value.turns);\r\n this.notificationService.success('kingdom.research.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.research.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.research.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ResearchComponent } from './research.component';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ConjureComponent, CharmAssignmentType } from './conjure.component';\r\nimport { ActivateComponent, ArtifactAssignmentType } from './activate.component';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\nimport { combineLatest } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'app-sorcery',\r\n templateUrl: './sorcery.component.html',\r\n styleUrls: ['./sorcery.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class SorceryComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n kingdomArtifacts: any[] = [];\r\n attackArtifacts: any[] = [];\r\n defenseArtifacts: any[] = [];\r\n maximumArtifacts: number = 1;\r\n\r\n kingdomCharms: any[] = [];\r\n attackCharms: any[] = [];\r\n defenseCharms: any[] = [];\r\n maximumCharms: number = 1;\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private notificationService: NotificationService,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n public tutorialService: TutorialService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n combineLatest([\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/artifacts`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/charms`).valueChanges({ idField: 'fid' }),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([artifacts, charms]) => {\r\n this.kingdomArtifacts = artifacts.filter(artifact => artifact.assignment === ArtifactAssignmentType.NONE || !artifact.assignment).sort((a, b) => a.item.battle === b.item.battle ? 0 : a.item.battle ? -1 : 1);\r\n this.attackArtifacts = artifacts.filter(artifact => artifact.assignment === ArtifactAssignmentType.ATTACK);\r\n this.defenseArtifacts = artifacts.filter(artifact => artifact.assignment === ArtifactAssignmentType.DEFENSE);\r\n this.kingdomCharms = charms.filter(charm => charm.assignment === CharmAssignmentType.NONE || !charm.assignment).sort((a, b) => (a.turns >= a.spell.research) === (b.turns >= b.spell.research) ? 0 : (a.turns >= a.spell.research) ? -1 : 1);\r\n this.attackCharms = charms.filter(charm => charm.assignment === CharmAssignmentType.ATTACK);\r\n this.defenseCharms = charms.filter(charm => charm.assignment === CharmAssignmentType.DEFENSE);\r\n });\r\n }\r\n\r\n async assignArtifact($event: CdkDragDrop<any>) {\r\n this.loadingService.startLoading();\r\n try {\r\n if ($event.container && $event.previousContainer === $event.container) {\r\n moveItemInArray($event.container.data, $event.previousIndex, $event.currentIndex);\r\n } else {\r\n if ($event.container && (Number($event.container.id) === 0 || $event.container.data.length < this.maximumArtifacts)) {\r\n transferArrayItem($event.previousContainer.data, $event.container.data, $event.previousIndex, $event.currentIndex);\r\n await this.apiService.assignArtifact(this.uid, $event.item.element.nativeElement.id, Number($event.container.id)); // ids 0,1,2\r\n this.notificationService.success('kingdom.sorcery.success');\r\n } else {\r\n this.notificationService.error('kingdom.sorcery.maximum');\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.sorcery.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n async assignCharm($event: CdkDragDrop<any>) {\r\n this.loadingService.startLoading();\r\n try {\r\n if ($event.container && $event.previousContainer === $event.container) {\r\n moveItemInArray($event.container.data, $event.previousIndex, $event.currentIndex);\r\n } else {\r\n if ($event.container && (Number($event.container.id) === 3 || $event.container.data.length < this.maximumCharms)) {\r\n transferArrayItem($event.previousContainer.data, $event.container.data, $event.previousIndex, $event.currentIndex);\r\n await this.apiService.assignCharm(this.uid, $event.item.element.nativeElement.id, Number($event.container.id) - 3); // ids 3,4,5\r\n this.notificationService.success('kingdom.sorcery.success');\r\n } else {\r\n this.notificationService.error('kingdom.sorcery.maximum');\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.sorcery.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n openResearchDialog(charm: any): void {\r\n const dialogRef = this.dialog.open(ResearchComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: charm,\r\n });\r\n }\r\n\r\n openConjureDialog(charm: any): void {\r\n const dialogRef = this.dialog.open(ConjureComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n charm: charm,\r\n kingdom: null,\r\n },\r\n });\r\n }\r\n\r\n openActivateDialog(artifact: any): void {\r\n const dialogRef = this.dialog.open(ActivateComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: {\r\n artifact: artifact,\r\n kingdom: null,\r\n },\r\n });\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-sorcery\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/sorcery.png\" [alt]=\"'kingdom.sorcery.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.sorcery.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.sorcery.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.sorcery')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_9_plus</mat-icon>{{ 'kingdom.sorcery.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.artifacts' | translate }}:</div>\r\n <div tourAnchor=\"tour.sorcery\">\r\n <mat-action-list dense class=\"dotted\" id=\"0\" #kngdmArtifacts=\"cdkDropList\" [cdkDropListConnectedTo]=\"[atckArtifacts, defArtifacts]\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignArtifact($event)\" [cdkDropListData]=\"kingdomArtifacts\">\r\n <button mat-list-item *ngFor=\"let artifact of kingdomArtifacts\" cdkDrag [cdkDragDisabled]=\"!artifact.item.battle\" [ngClass]=\"[artifact.item.faction.id, artifact.item.battle ? 'handle' : '', artifact.item.legendary ? 'legendary': 'common']\" [id]=\"artifact.fid\" (click)=\"!artifact.item.battle && artifact.item.self ? openActivateDialog(artifact) : null\" [disabled]=\"!artifact.item.battle && !artifact.item.self\">\r\n <div mat-list-avatar [matBadge]=\"artifact.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"artifact.item.image\" [alt]=\"artifact.item.name | translate\">\r\n </div>\r\n <div mat-line>{{ artifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"artifact.item.description | translate | icon:artifact.item\">\r\n </div>\r\n <mat-icon *ngIf=\"artifact.item.battle\">open_with</mat-icon>\r\n <div mat-list-avatar *ngIf=\"!artifact.item.battle\" [matBadge]=\"artifact.item.turns\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n\r\n <div matSubheader>{{ 'card.list.charms' | translate }}:</div>\r\n <mat-action-list dense class=\"dotted\" id=\"3\" #kngdmCharms=\"cdkDropList\" [cdkDropListConnectedTo]=\"[atckCharms, defCharms]\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignCharm($event)\" [cdkDropListData]=\"kingdomCharms\">\r\n <button mat-list-item *ngFor=\"let charm of kingdomCharms\" cdkDrag [cdkDragDisabled]=\"!charm.spell.battle || !charm.completed\" [ngClass]=\"[charm.spell.faction.id, charm.spell.battle && charm.completed ? 'handle' : '', charm.spell.legendary ? 'legendary' : 'common']\" (click)=\"!charm.completed ? openResearchDialog(charm) : !charm.spell.battle ? openConjureDialog(charm) : null\" [id]=\"charm.fid\" [disabled]=\"!charm.spell.battle && !charm.spell.self\">\r\n <div mat-list-avatar [matBadge]=\"charm.spell.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"charm.spell.image\" [alt]=\"charm.spell.name | translate\">\r\n </div>\r\n <div mat-line>{{ charm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"charm.spell.description | translate | icon:charm.spell\"></div>\r\n <div mat-line *ngIf=\"!charm.completed\">\r\n <mat-progress-bar [value]=\"charm.turns * 100 / charm.spell.turnResearch\"></mat-progress-bar>\r\n </div>\r\n <mat-icon *ngIf=\"charm.spell.battle && charm.completed\">open_with</mat-icon>\r\n <div mat-list-avatar *ngIf=\"!charm.spell.battle || !charm.completed\" [matBadge]=\"!charm.completed ? ((charm.turns) | long) + ' / ' + (charm.spell.turnResearch | long) : charm.spell.turnCost\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.sorcery.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"66\" fxFlex.lg=\"66\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\">\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/arcanism.png\" [alt]=\"'kingdom.arcanism.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.arcanism.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.arcanism.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.arcanism')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_1</mat-icon>{{ 'kingdom.arcanism.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.artifacts' | translate }}:</div>\r\n <div tourAnchor=\"tour.arcanism\">\r\n <mat-list dense class=\"dotted\" id=\"1\" #atckArtifacts=\"cdkDropList\" [cdkDropListConnectedTo]=\"[kngdmArtifacts, defArtifacts]\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignArtifact($event)\" [cdkDropListData]=\"attackArtifacts\">\r\n <mat-list-item *ngFor=\"let artifact of attackArtifacts\" cdkDrag class=\"handle\" [id]=\"artifact.fid\" [ngClass]=\"[artifact.item.faction.id, artifact.item.legendary ? 'legendary': 'common']\">\r\n <div mat-list-avatar [matBadge]=\"artifact.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"artifact.item.image\" [alt]=\"artifact.item.name | translate\">\r\n </div>\r\n <div mat-line>{{ artifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"artifact.item.description | translate | icon:artifact.item\"></div>\r\n <mat-icon *ngIf=\"artifact.item.battle\">open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n\r\n <div matSubheader>{{ 'card.list.charms' | translate }}:</div>\r\n <mat-list dense class=\"dotted\" id=\"4\" #atckCharms=\"cdkDropList\" [cdkDropListConnectedTo]=\"[kngdmCharms, defCharms]\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignCharm($event)\" [cdkDropListData]=\"attackCharms\">\r\n <mat-list-item *ngFor=\"let charm of attackCharms\" cdkDrag class=\"handle\" [id]=\"charm.fid\" [ngClass]=\"[charm.spell.faction.id, charm.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"charm.spell.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"charm.spell.image\" [alt]=\"charm.spell.name | translate\">\r\n </div>\r\n <div mat-line>{{ charm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"charm.spell.description | translate | icon:charm.spell\"></div>\r\n <mat-icon>open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.arcanism.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/protection.png\" [alt]=\"'kingdom.protection.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.protection.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.protection.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.protection')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_1</mat-icon>{{ 'kingdom.protection.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.artifacts' | translate }}:</div>\r\n <div tourAnchor=\"tour.protection\">\r\n <mat-list dense class=\"dotted\" id=\"2\" #defArtifacts=\"cdkDropList\" [cdkDropListConnectedTo]=\"[kngdmArtifacts, atckArtifacts]\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignArtifact($event)\" [cdkDropListData]=\"defenseArtifacts\">\r\n <mat-list-item *ngFor=\"let artifact of defenseArtifacts\" cdkDrag class=\"handle\" [id]=\"artifact.fid\" [ngClass]=\"[artifact.item.faction.id, artifact.item.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"artifact.quantity\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"artifact.item.image\" [alt]=\"artifact.item.name | translate\">\r\n </div>\r\n <div mat-line>{{ artifact.item.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"artifact.item.description | translate | icon:artifact.item\"></div>\r\n <mat-icon *ngIf=\"artifact.item.battle\">open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n\r\n <div matSubheader>{{ 'card.list.charms' | translate }}:</div>\r\n <mat-list dense class=\"dotted\" id=\"5\" #defCharms=\"cdkDropList\" [cdkDropListConnectedTo]=\"[kngdmCharms, atckCharms]\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignCharm($event)\" [cdkDropListData]=\"defenseCharms\">\r\n <mat-list-item *ngFor=\"let charm of defenseCharms\" cdkDrag class=\"handle\" [id]=\"charm.fid\" [ngClass]=\"[charm.spell.faction.id, charm.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"charm.spell.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"charm.spell.image\" [alt]=\"charm.spell.name | translate\">\r\n </div>\r\n <div mat-line>{{ charm.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"charm.spell.description | translate | icon:charm.spell\"></div>\r\n <mat-icon>open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.protection.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\n\r\n@Component({\r\n selector: 'app-discharge',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.discharge.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.discharge.description' | translate }}</p>\r\n <div matSubheader>{{ 'kingdom.discharge.contract' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"contract.level\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"contract.hero.image\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n <div mat-list-avatar [matBadge]=\"0\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.discharge.maintenances' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected *ngIf=\"contract.hero.goldMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ 'user.tome.goldMaintenance' | translate:{ number: (contract.hero.goldMaintenance * contract.level) | long } }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"contract.hero.manaMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/mana.png\">{{ 'user.tome.manaMaintenance' | translate:{ number: (contract.hero.manaMaintenance * contract.level) | long } }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"contract.hero.populationMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/population.png\">{{ 'user.tome.populationMaintenance' | translate:{ number: (contract.hero.populationMaintenance * contract.level) | long } }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.discharge.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"discharge()\" cdkFocusInitial>{{ 'kingdom.discharge.discharge' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class DischargeComponent {\r\n\r\n uid = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public contract: any,\r\n private dialogRef: MatDialogRef<DischargeComponent>,\r\n private loadingService: LoadingService,\r\n private notificationService: NotificationService,\r\n private apiService: ApiService,\r\n private store: Store,\r\n ) { }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async discharge() {\r\n this.loadingService.startLoading();\r\n try {\r\n const discharged = await this.apiService.dischargeContract(this.uid, this.contract.fid);\r\n this.notificationService.success('kingdom.discharge.success', discharged);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.discharge.error');\r\n }\r\n this.loadingService.stopLoading();\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { DischargeComponent } from './discharge.component';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\n\r\nexport enum ContractAssignmentType {\r\n NONE,\r\n ATTACK,\r\n DEFENSE,\r\n}\r\n\r\nconst MAXIMUM_CONTRACTS = 3;\r\n\r\n@Component({\r\n selector: 'app-tavern',\r\n templateUrl: './tavern.component.html',\r\n styleUrls: ['./tavern.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class TavernComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n\r\n kingdomContracts: any[] = [];\r\n attackContracts: any[] = [];\r\n defenseContracts: any[] = [];\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private notificationService: NotificationService,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n public tutorialService: TutorialService,\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/contracts`).valueChanges({ idField: 'fid' }).pipe(untilDestroyed(this)).subscribe(contracts => {\r\n this.kingdomContracts = contracts.filter(contract => contract.assignment === ContractAssignmentType.NONE || !contract.assignment);\r\n this.attackContracts = contracts.filter(contract => contract.assignment === ContractAssignmentType.ATTACK);\r\n this.defenseContracts = contracts.filter(contract => contract.assignment === ContractAssignmentType.DEFENSE);\r\n });\r\n }\r\n\r\n async assignContract($event: CdkDragDrop<any>) {\r\n if ([0, 3].includes(Number($event.container.id)) || $event.container.data.length < MAXIMUM_CONTRACTS) {\r\n this.loadingService.startLoading();\r\n try {\r\n if ($event.previousContainer === $event.container) {\r\n // moveItemInArray($event.container.data, $event.previousIndex, $event.currentIndex);\r\n } else {\r\n transferArrayItem($event.previousContainer.data, $event.container.data, $event.previousIndex, $event.currentIndex);\r\n const assigned = await this.apiService.assignContract(this.uid, $event.item.element.nativeElement.id, Number($event.container.id));\r\n this.notificationService.success('kingdom.tavern.success');\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.tavern.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.warning('kingdom.tavern.maximum');\r\n }\r\n }\r\n\r\n openDischargeDialog(troop: any): void {\r\n const dialogRef = this.dialog.open(DischargeComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: troop,\r\n });\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-tavern\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" cdkDropListGroup [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/tavern.png\" [alt]=\"'kingdom.tavern.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.tavern.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.tavern.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.tavern')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_9_plus</mat-icon>{{ 'kingdom.tavern.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.contracts' | translate }}:</div>\r\n <mat-action-list dense class=\"dotted\" tourAnchor=\"tour.tavern\" id=\"0\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignContract($event)\" [cdkDropListData]=\"kingdomContracts\">\r\n <button mat-list-item *ngFor=\"let contract of kingdomContracts\" cdkDrag class=\"handle\" [id]=\"contract.fid\" (click)=\"openDischargeDialog(contract)\" [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"contract.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"contract.hero.image\" [alt]=\"contract.hero.name | translate\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate:{name:contract.name} }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n <mat-icon>open_with</mat-icon>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.tavern.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/leadership.png\" [alt]=\"'kingdom.leadership.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.leadership.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.leadership.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.leadership')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_3</mat-icon>{{ 'kingdom.leadership.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.contracts' | translate }}:</div>\r\n <mat-list dense class=\"dotted\" id=\"1\" tourAnchor=\"tour.leadership\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignContract($event)\" [cdkDropListData]=\"attackContracts\">\r\n <mat-list-item *ngFor=\"let contract of attackContracts\" cdkDrag class=\"handle\" [id]=\"contract.fid\" [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"contract.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"contract.hero.image\" [alt]=\"contract.hero.name | translate\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate:{name:contract.name} }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n <mat-icon>open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.leadership.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/guard.png\" [alt]=\"'kingdom.guard.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.guard.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.guard.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.guard')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>filter_3</mat-icon>{{ 'kingdom.guard.max' | translate }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.contracts' | translate }}:</div>\r\n <mat-list dense class=\"dotted\" id=\"2\" tourAnchor=\"tour.guard\" cdkDropList cdkDropListOrientation=\"vertical\" (cdkDropListDropped)=\"assignContract($event)\" [cdkDropListData]=\"defenseContracts\">\r\n <mat-list-item *ngFor=\"let contract of defenseContracts\" cdkDrag class=\"handle\" [id]=\"contract.fid\" [ngClass]=\"[contract.hero.faction.id, contract.hero.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"contract.level | short\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"contract.hero.image\" [alt]=\"'kingdom.clan.name' | translate\">\r\n </div>\r\n <div mat-line>{{ contract.hero.name | translate:{name:contract.name} }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"contract.hero.description | translate | icon:contract.hero\"></div>\r\n <mat-icon>open_with</mat-icon>\r\n </mat-list-item>\r\n </mat-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.guard.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n</div>\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { ApiService } from 'src/app/services/api.service';\r\n\r\n@Component({\r\n selector: 'app-break',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.break.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.break.help' | translate }}</p>\r\n <div matSubheader>{{ 'kingdom.break.from' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[enchantment.from.faction.id, enchantment.from.fid === uid ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"enchantment.from.faction.image\">\r\n </div>\r\n <div mat-line>{{ enchantment.from.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ enchantment.from.faction.name | translate }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n <div matSubheader>{{ 'kingdom.break.enchantment' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item (click)=\"break()\" [ngClass]=\"[enchantment.spell.faction.id, enchantment.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"enchantment.spell.level\" matBadgePosition=\"above before\" [matBadgeColor]=\"enchantment.from.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar [src]=\"enchantment.spell.image\">\r\n </div>\r\n <div mat-line>{{ enchantment.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"enchantment.spell.description | translate | icon:enchantment.spell\"></div>\r\n <div mat-line>\r\n <mat-progress-bar [color]=\"enchantment.from.id === uid ? 'accent' : 'warn'\" [value]=\"enchantment.turns * 100 / enchantment.spell.turnDuration\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"enchantment.turns\" matBadgePosition=\"above after\" [matBadgeColor]=\"enchantment.from.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.break.costs' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected><img class=\"icon\" src=\"/assets/images/resources/mana.png\">{{ enchantment.spell.manaCost | long }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.break.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"break()\" cdkFocusInitial>{{ 'kingdom.break.break' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class BreakComponent {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomMana: any = this.store.selectSnapshot(AuthState.getKingdomMana);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public enchantment: any,\r\n private dialogRef: MatDialogRef<BreakComponent>,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private loadingService: LoadingService,\r\n private apiService: ApiService,\r\n ) { }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async break() {\r\n if (this.enchantment.spell.manaCost <= this.kingdomMana.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const broken = await this.apiService.breakEnchantment(this.uid, this.enchantment.fid);\r\n this.notificationService.success('kingdom.break.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.break.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.break.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\nimport { ApiService } from 'src/app/services/api.service';\r\n\r\n@Component({\r\n selector: 'app-dispel',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.dispel.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.dispel.help' | translate }}</p>\r\n <div matSubheader>{{ 'kingdom.dispel.to' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item [ngClass]=\"[incantation.to.faction.id, incantation.to.id === uid ? 'legendary' : 'common']\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar [src]=\"incantation.to.faction.image\">\r\n </div>\r\n <div mat-line>{{ incantation.to.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\">{{ incantation.to.faction.name | translate }}</div>\r\n </mat-list-item>\r\n </mat-list>\r\n <div matSubheader>{{ 'kingdom.dispel.incantation' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item (click)=\"dispel()\" [ngClass]=\"[incantation.spell.faction.id, incantation.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"incantation.spell.level\" matBadgePosition=\"above before\" [matBadgeColor]=\"incantation.to.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar [src]=\"incantation.spell.image\">\r\n </div>\r\n <div mat-line>{{ incantation.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"incantation.spell.description | translate | icon:incantation.spell\"></div>\r\n <div mat-line>\r\n <mat-progress-bar [color]=\"incantation.to.id === uid ? 'accent' : 'warn'\" [value]=\"incantation.turns * 100 / incantation.spell.turnDuration\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"incantation.turns\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.dispel.maintenances' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected *ngIf=\"incantation.spell.goldMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ 'user.tome.goldMaintenance' | translate:{ number: incantation.spell.goldMaintenance | long } }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"incantation.spell.manaMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/mana.png\">{{ 'user.tome.manaMaintenance' | translate:{ number: incantation.spell.manaMaintenance | long } }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"incantation.spell.populationMaintenance > 0\"><img class=\"icon\" src=\"/assets/images/resources/population.png\">{{ 'user.tome.populationMaintenance' | translate:{ number: incantation.spell.populationMaintenance | long } }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.dispel.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"dispel()\" cdkFocusInitial>{{ 'kingdom.dispel.dispel' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n `],\r\n})\r\nexport class DispelComponent {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomMana: any = this.store.selectSnapshot(AuthState.getKingdomMana);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public incantation: any,\r\n private dialogRef: MatDialogRef<DispelComponent>,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private loadingService: LoadingService,\r\n private apiService: ApiService,\r\n ) { }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async dispel() {\r\n if (this.incantation.spell.manaCost <= this.kingdomMana.quantity) {\r\n this.loadingService.startLoading();\r\n try {\r\n const dispelled = await this.apiService.dispelIncantation(this.uid, this.incantation.fid);\r\n this.notificationService.success('kingdom.dispel.success');\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.dispel.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.dispel.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { NotificationService } from 'src/app/services/notification.service';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { ApiService } from 'src/app/services/api.service';\r\nimport { LoadingService } from 'src/app/services/loading.service';\r\n\r\n@Component({\r\n selector: 'app-offer',\r\n template: `\r\n <h1 mat-dialog-title>{{ 'kingdom.offer.name' | translate }}</h1>\r\n <div mat-dialog-content>\r\n <p>{{ 'kingdom.offer.description' | translate }}</p>\r\n <div matSubheader>{{ 'kingdom.offer.god' | translate }}:</div>\r\n <mat-list dense>\r\n <mat-list-item class=\"grey legendary\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"god-avatar\" [src]=\"god.image\">\r\n </div>\r\n <div mat-line>{{ god.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"god.description | translate | icon:god\"></div>\r\n <div mat-line>\r\n <mat-progress-bar [value]=\"god.sacrifice * 100 / (god.gold || god.mana || god.population || god.land || god.turn)\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"(god.sacrifice | short) + ' / ' + ((god.gold || god.mana || god.population || god.land || god.turn) | short)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"god.gold ? '/assets/images/resources/gold.png' : god.mana ? '/assets/images/resources/mana.png' : god.population ? '/assets/images/resources/population.png' : god.land ? '/assets/images/resources/land.png' : '/assets/images/resources/turn.png'\">\r\n </div>\r\n </mat-list-item>\r\n </mat-list>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.offer.quantity' | translate }}:</div>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <mat-label>{{ 'kingdom.offer.sacrifice' | translate }}</mat-label>\r\n <input currencyMask placeholder=\"{{ 'kingdom.offer.sacrifice' | translate }}\" matInput formControlName=\"sacrifice\">\r\n <mat-hint>{{ 'kingdom.offer.hint' | translate:{ increment: god.increment | long } }}</mat-hint>\r\n <mat-error>{{ 'kingdom.offer.invalid' | translate }}</mat-error>\r\n </mat-form-field>\r\n </form>\r\n </div>\r\n <div mat-dialog-content>\r\n <div matSubheader>{{ 'kingdom.offer.costs' | translate }}:</div>\r\n <mat-chip-list>\r\n <mat-chip color=\"primary\" selected *ngIf=\"god.gold > 0\"><img class=\"icon\" src=\"/assets/images/resources/gold.png\">{{ god.increment | long }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"god.mana > 0\"><img class=\"icon\" src=\"/assets/images/resources/mana.png\">{{ god.increment | long }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"god.population > 0\"><img class=\"icon\" src=\"/assets/images/resources/population.png\">{{ god.increment | long }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"god.land > 0\"><img class=\"icon\" src=\"/assets/images/resources/land.png\">{{ god.increment | long }}</mat-chip>\r\n <mat-chip color=\"primary\" selected *ngIf=\"god.turn > 0\"><img class=\"icon\" src=\"/assets/images/resources/turn.png\">{{ god.increment | long }}</mat-chip>\r\n </mat-chip-list>\r\n </div>\r\n <div mat-dialog-actions>\r\n <button mat-button (click)=\"close()\">{{ 'kingdom.offer.cancel' | translate }}</button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"form.invalid\" (click)=\"offer()\">{{ 'kingdom.offer.offer' | translate }}</button>\r\n </div>\r\n `,\r\n styles: [`\r\n .mat-form-field {\r\n width: 100%;\r\n }\r\n .god-avatar {\r\n border-radius: 4px !important;\r\n }\r\n `],\r\n})\r\nexport class OfferComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n form: FormGroup = null;\r\n kingdomTurn: any = this.store.selectSnapshot(AuthState.getKingdomTurn);\r\n kingdomGold: any = this.store.selectSnapshot(AuthState.getKingdomGold);\r\n kingdomMana: any = this.store.selectSnapshot(AuthState.getKingdomMana);\r\n kingdomPopulation: any = this.store.selectSnapshot(AuthState.getKingdomPopulation);\r\n kingdomLand: any = this.store.selectSnapshot(AuthState.getKingdomLand);\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public god: any,\r\n private dialogRef: MatDialogRef<OfferComponent>,\r\n private formBuilder: FormBuilder,\r\n private notificationService: NotificationService,\r\n private store: Store,\r\n private apiService: ApiService,\r\n private loadingService: LoadingService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n const max = this.god.gold\r\n ? this.kingdomGold.quantity\r\n : this.god.mana\r\n ? this.kingdomMana.quantity\r\n : this.god.population\r\n ? this.kingdomPopulation.quantity\r\n : this.god.land\r\n ? this.kingdomLand.quantity\r\n : this.kingdomTurn.quantity;\r\n this.form = this.formBuilder.group({\r\n sacrifice: [this.god.increment, [Validators.required, Validators.min(this.god.increment), Validators.max(max)]],\r\n });\r\n this.form.markAllAsTouched();\r\n this.form.get('sacrifice').updateValueAndValidity();\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n async offer() {\r\n if (this.form.valid) {\r\n this.loadingService.startLoading();\r\n try {\r\n const offered = await this.apiService.offerGod(this.uid, this.god.fid, this.form.value.sacrifice);\r\n if (offered.hasOwnProperty('hero')) this.notificationService.success('kingdom.temple.hero', offered);\r\n if (offered.hasOwnProperty('item')) this.notificationService.success('kingdom.temple.item', offered);\r\n if (offered.hasOwnProperty('enchantment')) this.notificationService.success('kingdom.temple.enchantment', offered);\r\n if (offered.hasOwnProperty('unit')) this.notificationService.success('kingdom.temple.unit', offered);\r\n if (offered.hasOwnProperty('gold')) this.notificationService.success('kingdom.temple.gold', offered);\r\n if (offered.hasOwnProperty('mana')) this.notificationService.success('kingdom.temple.mana', offered);\r\n if (offered.hasOwnProperty('population')) this.notificationService.success('kingdom.temple.population', offered);\r\n if (offered.hasOwnProperty('land')) this.notificationService.success('kingdom.temple.land', offered);\r\n if (offered.hasOwnProperty('spell')) this.notificationService.success('kingdom.temple.spell', offered);\r\n if (offered.hasOwnProperty('building')) this.notificationService.success('kingdom.temple.building', offered);\r\n this.close();\r\n } catch (error) {\r\n console.error(error);\r\n this.notificationService.error('kingdom.offer.error');\r\n }\r\n this.loadingService.stopLoading();\r\n } else {\r\n this.notificationService.error('kingdom.offer.error');\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { OfferComponent } from './offer.component';\r\nimport { AngularFirestore } from '@angular/fire/firestore';\r\nimport { fadeInOnEnterAnimation } from 'angular-animations';\r\nimport { Store } from '@ngxs/store';\r\nimport { AuthState } from 'src/app/shared/auth/auth.state';\r\nimport { DispelComponent } from './dispel.component';\r\nimport { combineLatest } from 'rxjs';\r\nimport { TutorialService } from 'src/app/services/tutorial.service';\r\nimport { BreakComponent } from './break.component';\r\n\r\n@Component({\r\n selector: 'app-temple',\r\n templateUrl: './temple.component.html',\r\n styleUrls: ['./temple.component.scss'],\r\n animations: [fadeInOnEnterAnimation({ duration: 250, delay: 250 })],\r\n})\r\n@UntilDestroy()\r\nexport class TempleComponent implements OnInit {\r\n\r\n uid: string = this.store.selectSnapshot(AuthState.getUserUID);\r\n kingdomGods: any[] = [];\r\n kingdomEnchantments: any[] = [];\r\n kingdomIncantations: any[] = [];\r\n\r\n constructor(\r\n private angularFirestore: AngularFirestore,\r\n private dialog: MatDialog,\r\n private store: Store,\r\n public tutorialService: TutorialService,\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n combineLatest([\r\n this.angularFirestore.collection<any>('gods').valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/enchantments`).valueChanges({ idField: 'fid' }),\r\n this.angularFirestore.collection<any>(`kingdoms/${this.uid}/incantations`).valueChanges({ idField: 'fid' }),\r\n ])\r\n .pipe(untilDestroyed(this))\r\n .subscribe(([gods, enchantments, incantations]) => {\r\n this.kingdomGods = gods;\r\n this.kingdomEnchantments = enchantments.sort((a: any, b: any) => a.turns - b.turns);\r\n this.kingdomIncantations = incantations.sort((a: any, b: any) => a.turns - b.turns);\r\n });\r\n }\r\n\r\n openOfferDialog(god: any): void {\r\n const dialogRef = this.dialog.open(OfferComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: god,\r\n });\r\n }\r\n\r\n openDispelDialog(enchantment: any): void {\r\n const dialogRef = this.dialog.open(DispelComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: enchantment,\r\n });\r\n }\r\n\r\n openBreakDialog(incantation: any): void {\r\n const dialogRef = this.dialog.open(BreakComponent, {\r\n panelClass: 'dialog-responsive',\r\n data: incantation,\r\n });\r\n }\r\n\r\n}\r\n","<div class=\"kingdom-temple\" fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\" [@fadeInOnEnter]>\r\n\r\n <div fxFlex.xl=\"33\" fxFlex.lg=\"33\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/temple.png\" [alt]=\"'kingdom.temple.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.temple.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.temple.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.temple')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>notifications</mat-icon>{{ kingdomGods.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.gods' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.temple\">\r\n <button mat-list-item *ngFor=\"let god of kingdomGods\" [disabled]=\"god.armageddon\" (click)=\"openOfferDialog(god)\" class=\"grey legendary\">\r\n <div mat-list-avatar matBadge=\"?\" matBadgePosition=\"above before\">\r\n <img mat-list-avatar class=\"animated pulse infinite squared\" [src]=\"god.image\" [alt]=\"god.name | translate\">\r\n </div>\r\n <div mat-line>{{ god.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"god.description | translate | icon:god\"></div>\r\n <div mat-line>\r\n <mat-progress-bar [value]=\"god.sacrifice * 100 / (god.gold || god.mana || god.population || god.land || god.turn)\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"god.armageddon ? null : (god.sacrifice | short) + ' / ' + ((god.gold || god.mana || god.population || god.land || god.turn) | short)\" matBadgePosition=\"above after\">\r\n <img mat-list-avatar [src]=\"god.armageddon ? '/assets/images/spells/grey/armageddon.png' : god.gold ? '/assets/images/resources/gold.png' : god.mana ? '/assets/images/resources/mana.png' : god.population ? '/assets/images/resources/population.png' : god.land ? '/assets/images/resources/land.png' : '/assets/images/resources/turn.png'\" [alt]=\"'spell.armageddon.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.temple.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n <div fxFlex.xl=\"66\" fxFlex.lg=\"66\" fxFlex.md=\"50\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px grid\">\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/break.png\" [alt]=\"'kingdom.break.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.break.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.break.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.break')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>trending_down</mat-icon>{{ kingdomEnchantments.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.enchantments' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.break\">\r\n <button mat-list-item *ngFor=\"let enchantment of kingdomEnchantments\" (click)=\"openBreakDialog(enchantment)\" [ngClass]=\"[enchantment.spell.faction.id, enchantment.spell.legendary ? 'legendary' : 'common']\" [disabled]=\"enchantment.from.id === uid\">\r\n <div mat-list-avatar [matBadge]=\"enchantment.spell.level\" matBadgePosition=\"above before\" [matBadgeColor]=\"enchantment.from.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"enchantment.spell.image\" [alt]=\"enchantment.spell.name | translate\">\r\n </div>\r\n <div mat-line>{{ enchantment.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"enchantment.spell.description | translate | icon:enchantment.spell\"></div>\r\n <div mat-line>\r\n <mat-progress-bar [color]=\"enchantment.from.id === uid ? 'accent' : 'warn'\" [value]=\"enchantment.turns * 100 / enchantment.spell.turnDuration\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"enchantment.turns\" matBadgePosition=\"above after\" [matBadgeColor]=\"enchantment.from.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.break.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n <div fxFlex.xl=\"50\" fxFlex.lg=\"50\" fxFlex.md=\"100\" fxFlex.sm=\"100\" fxFlex.xs=\"100\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <img mat-card-avatar src=\"/assets/images/cards/dispel.png\" [alt]=\"'kingdom.dispel.name' | translate\">\r\n <mat-card-title>{{ 'kingdom.dispel.name' | translate }}</mat-card-title>\r\n <mat-card-subtitle>{{ 'kingdom.dispel.description' | translate }}</mat-card-subtitle>\r\n <div class=\"mat-card-extras\">\r\n <button mat-icon-button (click)=\"this.tutorialService.start('tour.dispel')\"><mat-icon>help</mat-icon></button>\r\n <mat-chip-list><mat-chip color=\"primary\"><mat-icon>trending_up</mat-icon>{{ kingdomIncantations.length | long }}</mat-chip></mat-chip-list>\r\n </div>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <div matSubheader>{{ 'card.list.incantations' | translate }}:</div>\r\n <mat-action-list dense tourAnchor=\"tour.dispel\">\r\n <button mat-list-item *ngFor=\"let incantation of kingdomIncantations\" (click)=\"openDispelDialog(incantation)\" [ngClass]=\"[incantation.spell.faction.id, incantation.spell.legendary ? 'legendary' : 'common']\">\r\n <div mat-list-avatar [matBadge]=\"incantation.spell.level\" matBadgePosition=\"above before\" [matBadgeColor]=\"incantation.to.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar class=\"animated pulse infinite\" [src]=\"incantation.spell.image\" [alt]=\"incantation.spell.name | translate\">\r\n </div>\r\n <div mat-line>{{ incantation.spell.name | translate }}</div>\r\n <div mat-line class=\"mat-card-subtitle\" [innerHTML]=\"incantation.spell.description | translate | icon:incantation.spell\"></div>\r\n <div mat-line>\r\n <mat-progress-bar [color]=\"incantation.to.id === uid ? 'accent' : 'warn'\" [value]=\"incantation.turns * 100 / incantation.spell.turnDuration\"></mat-progress-bar>\r\n </div>\r\n <div mat-list-avatar [matBadge]=\"incantation.turns\" matBadgePosition=\"above after\" [matBadgeColor]=\"incantation.to.id === uid ? 'accent' : 'warn'\">\r\n <img mat-list-avatar src=\"/assets/images/resources/turn.png\" [alt]=\"'resource.turn.name' | translate\">\r\n </div>\r\n </button>\r\n </mat-action-list>\r\n </mat-card-content>\r\n <mat-card-content>\r\n <p [innerHTML]=\"'kingdom.dispel.help' | translate | icon\"></p>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n"],"names":[],"sourceRoot":"webpack:///"}