(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ /***/ "+tor": /*!***********************************************************************!*\ !*** ./src/app/components/team-penalties/team-penalties.component.ts ***! \***********************************************************************/ /*! exports provided: TeamPenaltiesComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TeamPenaltiesComponent", function() { return TeamPenaltiesComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var src_app_helpers_time_conversion_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/helpers/time-conversion-helpers */ "sqvn"); /* harmony import */ var src_app_models_penalty_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/models/penalty.model */ "icgN"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "3Pt+"); /* harmony import */ var _penalty_control_penalty_control_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../penalty-control/penalty-control.component */ "xsKt"); function TeamPenaltiesComponent_div_11_Template(rf, ctx) { if (rf & 1) { const _r3 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "app-penalty-control", 13); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("removePenalty", function TeamPenaltiesComponent_div_11_Template_app_penalty_control_removePenalty_1_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r3); const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r2.onRemovePenalty($event); })("editPenalty", function TeamPenaltiesComponent_div_11_Template_app_penalty_control_editPenalty_1_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r3); const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r4.onEditPenalty($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { const penalty_r1 = ctx.$implicit; const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("timerRunning", ctx_r0.timerRunning)("penalty", penalty_r1); } } const _c0 = function (a0) { return { "disabled": a0 }; }; class TeamPenaltiesComponent { constructor() { this.model = { player: '', duration: '', }; } get penaltyDisplay() { let displayValues = []; for (let penalty of this.team.penalties) { if (penalty.active) { displayValues.push(penalty); } } return displayValues; } ngOnInit() { } onClearPenaltyClicked() { if (this.timerRunning) { return; } this.model.player = ''; this.model.duration = ''; this.editingPenalty = null; } onAddPenaltyClicked() { if (this.timerRunning) { return; } let player = +this.model.player; let duration = src_app_helpers_time_conversion_helpers__WEBPACK_IMPORTED_MODULE_1__["TimeConversionHelpers"].convert(this.model.duration); if (Number.isNaN(duration)) { return; } if (!player || !duration) { return; } if (this.editingPenalty) { this.editingPenalty.player = player; this.editingPenalty.timeRemaining = duration; } else { const penalty = new src_app_models_penalty_model__WEBPACK_IMPORTED_MODULE_2__["Penalty"]({ player: player, time: duration, }); this.team.penalties.push(penalty); } this.onClearPenaltyClicked(); } onRemovePenalty(penalty) { this.team.penalties.splice(this.team.penalties.indexOf(penalty), 1); } onEditPenalty(penalty) { this.editingPenalty = penalty; this.model.player = penalty.player.toString(); this.model.duration = penalty.timeRemaining.toString(); } onInputKeyDown(e) { if (e.key === 'Enter') { this.onAddPenaltyClicked(); } const allowedCharacters = /[0-9,\.:\+\-\*\/]+/; const allowedKeys = ['ArrowLeft', 'ArrowRight', 'Delete', 'Backspace', 'Tab', 'Shift', 'Home', 'End']; if (allowedKeys.indexOf(e.key) == -1 && !allowedCharacters.test(e.key)) { return false; } } onPlayerInputKeyDown(e) { if (e.key === 'Enter') { this.onAddPenaltyClicked(); } const allowedCharacters = /[0-9]+/; const allowedKeys = ['ArrowLeft', 'ArrowRight', 'Delete', 'Backspace', 'Tab', 'Shift', 'Home', 'End']; if (allowedKeys.indexOf(e.key) == -1 && !allowedCharacters.test(e.key)) { return false; } } onInputClicked(e) { const input = e.target; const value = input.value; input.setSelectionRange(0, value.length); } } TeamPenaltiesComponent.ɵfac = function TeamPenaltiesComponent_Factory(t) { return new (t || TeamPenaltiesComponent)(); }; TeamPenaltiesComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: TeamPenaltiesComponent, selectors: [["app-team-penalties"]], inputs: { team: "team", timerRunning: "timerRunning" }, decls: 21, vars: 13, consts: [[1, "card"], [1, "card-body"], [1, "container"], [1, "row"], [1, "col-4"], [1, "col-8"], [4, "ngFor", "ngForOf"], ["type", "text", "placeholder", "Player", 1, "form-control", 3, "ngModel", "ngModelChange", "keydown", "click"], [1, "col-5"], ["type", "text", "placeholder", "Duration", 1, "form-control", 3, "ngModel", "ngModelChange", "keydown", "click"], [1, "col-3"], [1, "bi-x", "icon-button", 3, "click"], [1, "bi-plus", "icon-button", 3, "click"], [3, "timerRunning", "penalty", "removePenalty", "editPenalty"]], template: function TeamPenaltiesComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](3, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "h5"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6, "Player"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](7, "div", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](8, "h5"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](9, "Duration"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](10, "hr"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](11, TeamPenaltiesComponent_div_11_Template, 2, 2, "div", 6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](12, "hr"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](14, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](15, "input", 7); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function TeamPenaltiesComponent_Template_input_ngModelChange_15_listener($event) { return ctx.model.player = $event; })("keydown", function TeamPenaltiesComponent_Template_input_keydown_15_listener($event) { return ctx.onPlayerInputKeyDown($event); })("click", function TeamPenaltiesComponent_Template_input_click_15_listener($event) { return ctx.onInputClicked($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](16, "div", 8); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](17, "input", 9); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function TeamPenaltiesComponent_Template_input_ngModelChange_17_listener($event) { return ctx.model.duration = $event; })("keydown", function TeamPenaltiesComponent_Template_input_keydown_17_listener($event) { return ctx.onInputKeyDown($event); })("click", function TeamPenaltiesComponent_Template_input_click_17_listener($event) { return ctx.onInputClicked($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](18, "div", 10); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](19, "i", 11); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function TeamPenaltiesComponent_Template_i_click_19_listener() { return ctx.onClearPenaltyClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](20, "i", 12); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function TeamPenaltiesComponent_Template_i_click_20_listener() { return ctx.onAddPenaltyClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](11); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx.penaltyDisplay); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.model.player); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("disabled", ctx.timerRunning ? true : null); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.model.duration); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("disabled", ctx.timerRunning ? true : null); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](9, _c0, ctx.timerRunning)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](11, _c0, ctx.timerRunning)); } }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["NgForOf"], _angular_forms__WEBPACK_IMPORTED_MODULE_4__["DefaultValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_4__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_4__["NgModel"], _penalty_control_penalty_control_component__WEBPACK_IMPORTED_MODULE_5__["PenaltyControlComponent"]], styles: [".icon-button[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy90ZWFtLXBlbmFsdGllcy90ZWFtLXBlbmFsdGllcy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLGlCQUFBO0FBQ0oiLCJmaWxlIjoic3JjL2FwcC9jb21wb25lbnRzL3RlYW0tcGVuYWx0aWVzL3RlYW0tcGVuYWx0aWVzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmljb24tYnV0dG9uIHtcclxuICAgIG1hcmdpbi1yaWdodDogNXB4O1xyXG59Il19 */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TeamPenaltiesComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-team-penalties', templateUrl: './team-penalties.component.html', styleUrls: ['./team-penalties.component.scss'] }] }], function () { return []; }, { team: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], timerRunning: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /***/ }), /***/ 0: /*!***************************!*\ !*** multi ./src/main.ts ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! C:\dev\IceHockeyScoreboard\interface\ice-hockey-scoreboard\src\main.ts */"zUnb"); /***/ }), /***/ "3PfB": /*!*********************************************************!*\ !*** ./src/app/components/display/display.component.ts ***! \*********************************************************/ /*! exports provided: DisplayComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DisplayComponent", function() { return DisplayComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "ofXK"); const _c0 = function (a0) { return { "disabled": a0 }; }; class DisplayComponent { constructor() { } get displayText() { return this.text.replace(/0/g, 'O'); } ngOnInit() { } } DisplayComponent.ɵfac = function DisplayComponent_Factory(t) { return new (t || DisplayComponent)(); }; DisplayComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: DisplayComponent, selectors: [["app-display"]], inputs: { text: "text", size: "size", disabled: "disabled" }, decls: 3, vars: 6, consts: [[1, "container"], [1, "text", 3, "ngClass"]], template: function DisplayComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("font-size", ctx.size, "px"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](4, _c0, ctx.disabled)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx.displayText, " "); } }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["NgClass"]], styles: ["[_nghost-%COMP%] {\n display: block;\n}\n\n.container[_ngcontent-%COMP%] {\n background-color: white;\n padding: 10px;\n}\n\n.disabled[_ngcontent-%COMP%] {\n opacity: 0.3;\n}\n\n.text[_ngcontent-%COMP%] {\n font-family: Scoreboard;\n font-size: 100px;\n color: black;\n text-align: center;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy9kaXNwbGF5L2Rpc3BsYXkuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxjQUFBO0FBQ0Y7O0FBRUE7RUFDRSx1QkFBQTtFQUNBLGFBQUE7QUFDRjs7QUFFQTtFQUNFLFlBQUE7QUFDRjs7QUFFQTtFQUNFLHVCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxZQUFBO0VBQ0Esa0JBQUE7QUFDRiIsImZpbGUiOiJzcmMvYXBwL2NvbXBvbmVudHMvZGlzcGxheS9kaXNwbGF5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3Qge1xyXG4gIGRpc3BsYXk6IGJsb2NrO1xyXG59XHJcblxyXG4uY29udGFpbmVyIHtcclxuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcclxuICBwYWRkaW5nOiAxMHB4O1xyXG59XHJcblxyXG4uZGlzYWJsZWQge1xyXG4gIG9wYWNpdHk6IDAuMztcclxufVxyXG5cclxuLnRleHQge1xyXG4gIGZvbnQtZmFtaWx5OiBTY29yZWJvYXJkO1xyXG4gIGZvbnQtc2l6ZTogMTAwcHg7XHJcbiAgY29sb3I6IGJsYWNrO1xyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxufSJdfQ== */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DisplayComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-display', templateUrl: './display.component.html', styleUrls: ['./display.component.scss'] }] }], function () { return []; }, { text: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], size: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], disabled: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /***/ }), /***/ "AytR": /*!*****************************************!*\ !*** ./src/environments/environment.ts ***! \*****************************************/ /*! exports provided: environment */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; }); // This file can be replaced during build by using the `fileReplacements` array. // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. const environment = { production: false }; /* * For easier debugging in development mode, you can import the following file * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. * * This import should be commented out in production mode because it will have a negative impact * on performance if an error is thrown. */ // import 'zone.js/dist/zone-error'; // Included with Angular CLI. /***/ }), /***/ "FOhG": /*!*************************************************!*\ !*** ./src/app/routes/setup/setup.component.ts ***! \*************************************************/ /*! exports provided: SetupComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SetupComponent", function() { return SetupComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var src_app_models_game_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/models/game.model */ "MZE5"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "LvDl"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var src_app_models_team_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/models/team.model */ "t6OC"); /* harmony import */ var src_app_helpers_time_conversion_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/helpers/time-conversion-helpers */ "sqvn"); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "tk/3"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "3Pt+"); /* harmony import */ var _components_team_info_team_info_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/team-info/team-info.component */ "RPQu"); /* harmony import */ var _components_team_penalties_team_penalties_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/team-penalties/team-penalties.component */ "+tor"); /* harmony import */ var _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../pipes/time-format.pipe */ "dDfN"); const _c0 = function (a0, a1) { return { "btn-outline-secondary": a0, "btn-secondary": a1 }; }; const _c1 = function (a0, a1) { return { "btn-outline-success": a0, "btn-success": a1 }; }; const _c2 = function (a0, a1) { return { "btn-outline-warning": a0, "btn-warning": a1 }; }; const _c3 = function (a0, a1) { return { "btn-outline-danger": a0, "btn-danger": a1 }; }; const _c4 = function (a0) { return { "disabled": a0 }; }; class SetupComponent { constructor(http) { this.http = http; this.model = { time: '', timeoutTime: '', }; this.baseUrl = 'http://127.0.0.1:1515'; this.game = new src_app_models_game_model__WEBPACK_IMPORTED_MODULE_2__["Game"](); this.gameEndSound = new Audio('./assets/sounds/air-horn.mp3'); this.gameWarningSound = new Audio('./assets/sounds/chime.mp3'); this.notificationSound = new Audio('./assets/sounds/notification.mp3'); this.timerRunning = false; } // ipc: IpcRenderer; // constructor() { // if ((window).require) { // try { // this.ipc = (window).require('electron').ipcRenderer; // } catch (e) { // } // } // } ngOnInit() { let delta = 0.1; let timerSource = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["timer"])(0, delta * 1000); this.timerSubscription = timerSource .subscribe((value) => this.tick()); this.gameEndSound.load(); this.gameWarningSound.load(); this.notificationSound.load(); } ngOnDestroy() { this.timerSubscription.unsubscribe(); } tick() { if (this.timerRunning) { let delta = Date.now() - this.startTime; let timeRemaining = Math.floor(this.game.timeRemaining); this.game.tick(delta); this.model.time = timeRemaining.toString(); this.model.timeoutTime = Math.floor(this.game.timeoutTimeRemaining).toString(); if (this.game.timeout && this.game.timeoutTimeRemaining <= 0) { this.gameWarningSound.play(); this.game.timeoutTimeRemaining = 0; this.game.timeout = false; this.timerRunning = false; } if (timeRemaining === 10 || timeRemaining === 5) { this.gameWarningSound.play(); } let penalties = lodash__WEBPACK_IMPORTED_MODULE_3__["concat"](this.game.teamA.penalties, this.game.teamB.penalties); if (lodash__WEBPACK_IMPORTED_MODULE_3__["some"](penalties, (penalty) => penalty.active && penalty.timeRemaining == 0)) { this.notificationSound.play(); } if (this.game.timeRemaining <= 0) { this.game.timeRemaining = 0; if (!this.game.endSoundPlayed) { this.game.endSoundPlayed = true; this.gameEndSound.play(); this.http.get(this.baseUrl + '/trigger').subscribe(); this.onPauseClicked(); } } } this.postGameState(); } postGameState() { localStorage.setItem('game', JSON.stringify(this.game)); } onPauseClicked() { this.timerRunning = false; } onPlayClicked() { this.timerRunning = true; this.startTime = Date.now(); this.game.cacheTimeRemaining(); } onInputKeyDown(e) { if (e.key === 'Enter') { this.onSetTime(); } const allowedCharacters = /[0-9,\.:\+\-\*\/]+/; const allowedKeys = ['ArrowLeft', 'ArrowRight', 'Delete', 'Backspace', 'Tab', 'Shift', 'Home', 'End']; if (allowedKeys.indexOf(e.key) == -1 && !allowedCharacters.test(e.key)) { return false; } } onInputClicked(e) { const input = e.target; const value = input.value; input.setSelectionRange(0, value.length); } onSetTime() { if (this.timerRunning) { return; } const time = src_app_helpers_time_conversion_helpers__WEBPACK_IMPORTED_MODULE_5__["TimeConversionHelpers"].convert(this.model.time); if (time != null) { this.game.timeRemaining = time; this.game.endSoundPlayed = false; } const timeoutTime = src_app_helpers_time_conversion_helpers__WEBPACK_IMPORTED_MODULE_5__["TimeConversionHelpers"].convert(this.model.timeoutTime); if (timeoutTime == null) { return; } this.game.timeoutTimeRemaining = timeoutTime; } onOpenGameClicked() { window.open('#/game', "_blank"); //this.ipc.send("openGameModal"); //window.open('file://' + __dirname + '/index.html#/game', '_blank', 'width=800,height=600,frame=true,nodeIntegration=true') // var win = new BrowserWindow({ // width: 800, // height: 600, // center: true, // resizable: false, // frame: true, // transparent: false // }); // // Load the page + route // win.loadURL('file://' + __dirname + '/index.html#/game'); } onResetClicked() { this.game = new src_app_models_game_model__WEBPACK_IMPORTED_MODULE_2__["Game"](); this.postGameState(); this.timerRunning = false; } onResetTeamAClicked() { this.game.teamA = new src_app_models_team_model__WEBPACK_IMPORTED_MODULE_4__["Team"](); this.timerRunning = false; } onResetTeamBClicked() { this.game.teamB = new src_app_models_team_model__WEBPACK_IMPORTED_MODULE_4__["Team"](); this.timerRunning = false; } onPeriodClicked(value) { this.game.period = value; } onTimeoutClicked() { this.game.timeout = !this.game.timeout; } handleKeyboardEvent(event) { if (event['path'][0] !== document.body) { return; } switch (event.code) { case 'Space': if (this.timerRunning) { this.onPauseClicked(); } else { this.onPlayClicked(); } break; } } } SetupComponent.ɵfac = function SetupComponent_Factory(t) { return new (t || SetupComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"])); }; SetupComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: SetupComponent, selectors: [["app-setup"]], hostBindings: function SetupComponent_HostBindings(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("keypress", function SetupComponent_keypress_HostBindingHandler($event) { return ctx.handleKeyboardEvent($event); }, false, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵresolveDocument"]); } }, decls: 76, vars: 64, consts: [[1, "container"], [1, "row"], [1, "col"], [1, "col-auto"], [1, "btn", "btn-sm", "btn-primary", 3, "click"], [1, "btn", "btn-sm", "btn-danger", 3, "click"], [1, "col-12"], [2, "font-style", "italic", "color", "grey"], [1, "card"], [1, "card-body"], [1, "col-5"], ["type", "text", "placeholder", "Time", 1, "form-control", 3, "ngModel", "readonly", "ngModelChange", "keydown", "click"], [1, "d-grid", "gap-2", "d-md-flex", "justify-content-start"], [1, "btn", "btn-sm", "btn-outline-secondary", 3, "click"], [1, "btn", "btn-sm", "btn-outline-success", 3, "click"], [1, "btn", "btn-sm", "btn-outline-warning", 3, "click"], [1, "btn", "btn-sm", "btn-outline-danger", 3, "click"], [1, "col-2"], [1, "col-4"], [1, "bi-check", "icon-button", 3, "click"], [1, "bi-pause", "icon-button", 3, "click"], [1, "bi-play", "icon-button", 3, "click"], [1, "col-6"], [1, "row", "justify-content-between"], [1, "col-8"], [1, "col-4", 2, "text-align", "end"], [3, "team"], [3, "timerRunning", "team"]], template: function SetupComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](3, "h2"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](4, "Ice Hockey Scoreboard"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_6_listener() { return ctx.onOpenGameClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](7, "Scoreboard"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](8, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](9, "div", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_9_listener() { return ctx.onResetClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](10, "Reset"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](12, "div", 6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "div", 7); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](14, "'20' - 20 seconds | '20.0' - 20 minutes | '15:30' - 15 minutes and 30 seconds | '2+2' - 4 minutes"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](15, "div", 8); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](16, "div", 9); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](17, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](18, "div", 10); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](19, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](20, "Game Time"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](21, "input", 11); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function SetupComponent_Template_input_ngModelChange_21_listener($event) { return ctx.model.time = $event; })("keydown", function SetupComponent_Template_input_keydown_21_listener($event) { return ctx.onInputKeyDown($event); })("click", function SetupComponent_Template_input_click_21_listener($event) { return ctx.onInputClicked($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](22, "timeFormat"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](23, "div", 12); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](24, "div", 13); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_24_listener() { return ctx.onPeriodClicked("--"); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](25, "N/A "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](26, "div", 14); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_26_listener() { return ctx.onPeriodClicked(1); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](27, "01"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](28, "div", 14); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_28_listener() { return ctx.onPeriodClicked(2); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](29, "02"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](30, "div", 14); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_30_listener() { return ctx.onPeriodClicked(3); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](31, "03"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](32, "div", 15); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_32_listener() { return ctx.onPeriodClicked("OT"); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](33, "OT"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](34, "div", 10); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](35, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](36, "Timeout"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](37, "input", 11); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function SetupComponent_Template_input_ngModelChange_37_listener($event) { return ctx.model.timeoutTime = $event; })("keydown", function SetupComponent_Template_input_keydown_37_listener($event) { return ctx.onInputKeyDown($event); })("click", function SetupComponent_Template_input_click_37_listener($event) { return ctx.onInputClicked($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](38, "timeFormat"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](39, "div", 16); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_39_listener() { return ctx.onTimeoutClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](40, "TO"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](41, "div", 17); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](42, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](43, "div", 18); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](44, "i", 19); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_i_click_44_listener() { return ctx.onSetTime(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](45, "div", 18); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](46, "i", 20); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_i_click_46_listener() { return ctx.onPauseClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](47, "div", 18); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](48, "i", 21); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_i_click_48_listener() { return ctx.onPlayClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](49, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](50, "div", 22); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](51, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](52, "div", 23); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](53, "div", 24); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](54, "h2"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](55); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](56, "div", 25); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](57, "div", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_57_listener() { return ctx.onResetTeamAClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](58, " Reset "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](59, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](60, "app-team-info", 26); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](61, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](62, "app-team-penalties", 27); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](63, "div", 22); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](64, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](65, "div", 23); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](66, "div", 24); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](67, "h2"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](68); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](69, "div", 25); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](70, "div", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SetupComponent_Template_div_click_70_listener() { return ctx.onResetTeamBClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](71, " Reset "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](72, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](73, "app-team-info", 26); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](74, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](75, "app-team-penalties", 27); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](15); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("border", ctx.timerRunning ? "3px solid green" : "3px solid red")("background-color", ctx.timerRunning ? "#00800010" : "#FF000010"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](22, 36, ctx.game.timeRemaining))("readonly", ctx.timerRunning); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](40, _c0, ctx.game.period != "--", ctx.game.period == "--")); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](43, _c1, ctx.game.period != 1, ctx.game.period == 1)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](46, _c1, ctx.game.period != 2, ctx.game.period == 2)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](49, _c1, ctx.game.period != 3, ctx.game.period == 3)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](52, _c2, ctx.game.period != "OT", ctx.game.period == "OT")); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](38, 38, ctx.game.timeoutTimeRemaining))("readonly", ctx.timerRunning); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](55, _c3, !ctx.game.timeout, ctx.game.timeout)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](58, _c4, ctx.timerRunning)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](60, _c4, !ctx.timerRunning)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](62, _c4, ctx.timerRunning)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](7); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate2"]("Team 1 ", ctx.game.teamA.name ? "-" : "", " ", ctx.game.teamA.name, ""); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("team", ctx.game.teamA); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("timerRunning", ctx.timerRunning)("team", ctx.game.teamA); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate2"]("Team 2 ", ctx.game.teamB.name ? "-" : "", " ", ctx.game.teamB.name, ""); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("team", ctx.game.teamB); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("timerRunning", ctx.timerRunning)("team", ctx.game.teamB); } }, directives: [_angular_forms__WEBPACK_IMPORTED_MODULE_7__["DefaultValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_7__["NgModel"], _components_team_info_team_info_component__WEBPACK_IMPORTED_MODULE_8__["TeamInfoComponent"], _components_team_penalties_team_penalties_component__WEBPACK_IMPORTED_MODULE_9__["TeamPenaltiesComponent"]], pipes: [_pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_10__["TimeFormatPipe"]], styles: ["[_nghost-%COMP%] {\n font-family: Arial, Helvetica, sans-serif;\n}\n\n[_nghost-%COMP%] > .container[_ngcontent-%COMP%] {\n padding: 20px;\n}\n\nh2[_ngcontent-%COMP%] {\n font-size: 30px;\n font-weight: bold;\n padding: 10px 0px;\n}\n\n.card[_ngcontent-%COMP%] {\n margin: 25px;\n}\n\n.card-title[_ngcontent-%COMP%] {\n font-weight: bold;\n}\n\napp-team-penalties[_ngcontent-%COMP%] {\n padding-top: 10px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcm91dGVzL3NldHVwL3NldHVwLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UseUNBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7QUFDRjs7QUFFQTtFQUNFLGVBQUE7RUFDQSxpQkFBQTtFQUNBLGlCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxZQUFBO0FBQ0Y7O0FBRUE7RUFDRSxpQkFBQTtBQUNGOztBQUVBO0VBQ0UsaUJBQUE7QUFDRiIsImZpbGUiOiJzcmMvYXBwL3JvdXRlcy9zZXR1cC9zZXR1cC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IHtcclxuICBmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgc2Fucy1zZXJpZjtcclxufVxyXG5cclxuOmhvc3QgPiAuY29udGFpbmVyIHtcclxuICBwYWRkaW5nOiAyMHB4O1xyXG59XHJcblxyXG5oMiB7XHJcbiAgZm9udC1zaXplOiAzMHB4O1xyXG4gIGZvbnQtd2VpZ2h0OiBib2xkO1xyXG4gIHBhZGRpbmc6IDEwcHggMHB4O1xyXG59XHJcblxyXG4uY2FyZCB7XHJcbiAgbWFyZ2luOiAyNXB4O1xyXG59XHJcblxyXG4uY2FyZC10aXRsZSB7XHJcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XHJcbn1cclxuXHJcbmFwcC10ZWFtLXBlbmFsdGllcyB7XHJcbiAgcGFkZGluZy10b3A6IDEwcHg7XHJcbn0iXX0= */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SetupComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-setup', templateUrl: './setup.component.html', styleUrls: ['./setup.component.scss'] }] }], function () { return [{ type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"] }]; }, { handleKeyboardEvent: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"], args: ['document:keypress', ['$event']] }] }); })(); /***/ }), /***/ "LSJS": /*!***********************************************!*\ !*** ./src/app/routes/game/game.component.ts ***! \***********************************************/ /*! exports provided: GameComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GameComponent", function() { return GameComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var _components_display_display_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/display/display.component */ "3PfB"); /* harmony import */ var _components_penalty_penalty_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/penalty/penalty.component */ "MDx2"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../pipes/time-format.pipe */ "dDfN"); /* harmony import */ var _pipes_period_format_pipe__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../pipes/period-format.pipe */ "R1Uq"); class GameComponent { constructor() { this.timerDisabled = false; this.currentTime = Date.now(); } get displayTime() { return (this.game.timeout && this.game.timeoutTimeRemaining) || this.game.timeRemaining; } ngOnInit() { this.game = JSON.parse(localStorage.getItem('game')); let updateSource = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["timer"])(0, 250); this.updateSubscription = updateSource .subscribe((value) => { this.game = JSON.parse(localStorage.getItem('game')); this.currentTime = Date.now(); if (value % 4 == 0) { this.timerDisabled = !this.game.timeRemaining && !this.timerDisabled; } }); } ngOnDestroy() { this.updateSubscription.unsubscribe(); } } GameComponent.ɵfac = function GameComponent_Factory(t) { return new (t || GameComponent)(); }; GameComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: GameComponent, selectors: [["app-game"]], decls: 25, vars: 23, consts: [[1, "scoreboard", "noselect"], [1, "heading", "d-flex", "justify-content-between"], [1, "text", "top", "p-2"], [1, "heading-items", "row"], ["size", "100", 1, "col-auto", 2, "margin", "20px", 3, "text"], ["size", "120", 1, "col", 2, "border", "5px solid grey", "margin", "20px", 3, "text", "disabled"], [1, "row", 2, "margin-top", "25px"], [1, "col-auto"], [3, "penalties"], [1, "col", 2, "margin-top", "50px"], [1, "text"], ["size", "75", 3, "text"], ["size", "40", 3, "text"]], template: function GameComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](7, "app-display", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](8, "number"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](9, "app-display", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](10, "timeFormat"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](11, "app-display", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](12, "number"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "div", 6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](14, "div", 7); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](15, "app-penalty", 8); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](16, "div", 9); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](17, "div", 10); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](18, "PERIOD"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](19, "app-display", 11); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](20, "periodFormat"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](21, "app-display", 12); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](22, "date"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](23, "div", 7); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](24, "app-penalty", 8); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx.game.teamA.name, " "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx.game.teamB.name, " "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("text", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind2"](8, 10, ctx.game.teamA.goals.length, "2.0")); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("text", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](10, 13, ctx.displayTime)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("disabled", ctx.timerDisabled); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("text", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind2"](12, 15, ctx.game.teamB.goals.length, "2.0")); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("penalties", ctx.game.teamA.penalties); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("text", ctx.game.timeout ? "TO" : _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](20, 18, ctx.game.period)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("text", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind2"](22, 20, ctx.currentTime, "HH:mm:ss")); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("penalties", ctx.game.teamB.penalties); } }, directives: [_components_display_display_component__WEBPACK_IMPORTED_MODULE_2__["DisplayComponent"], _components_penalty_penalty_component__WEBPACK_IMPORTED_MODULE_3__["PenaltyComponent"]], pipes: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["DecimalPipe"], _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_5__["TimeFormatPipe"], _pipes_period_format_pipe__WEBPACK_IMPORTED_MODULE_6__["PeriodFormatPipe"], _angular_common__WEBPACK_IMPORTED_MODULE_4__["DatePipe"]], styles: [".noselect[_ngcontent-%COMP%] {\n -webkit-touch-callout: none;\n \n -webkit-user-select: none;\n \n \n \n \n user-select: none;\n \n}\n\n.scoreboard[_ngcontent-%COMP%] {\n background-color: white;\n position: fixed;\n width: 100%;\n height: 100%;\n}\n\n.heading[_ngcontent-%COMP%] {\n height: 70px;\n}\n\n.text[_ngcontent-%COMP%] {\n font-weight: bold;\n padding: 10px;\n font-size: 50px;\n text-align: center;\n color: black;\n font-family: Arial, Helvetica, sans-serif;\n}\n\n.text.top[_ngcontent-%COMP%] {\n font-size: 60px;\n}\n\n.heading-items[_ngcontent-%COMP%] {\n height: 175px;\n}\n\napp-display[_ngcontent-%COMP%] {\n margin: 0px;\n}\n\napp-display.align-center[_ngcontent-%COMP%] {\n margin: 0px 0px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcm91dGVzL2dhbWUvZ2FtZS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLDJCQUFBO0VBQTZCLGVBQUE7RUFDM0IseUJBQUE7RUFBMkIsV0FBQTtFQUNBLG1CQUFBO0VBQ0EsNEJBQUE7RUFDQSwyQkFBQTtFQUNuQixpQkFBQTtFQUFtQjttREFBQTtBQVEvQjs7QUFKQTtFQUNFLHVCQUFBO0VBQ0EsZUFBQTtFQUNBLFdBQUE7RUFDQSxZQUFBO0FBT0Y7O0FBSkE7RUFDRSxZQUFBO0FBT0Y7O0FBSkE7RUFDRSxpQkFBQTtFQUNBLGFBQUE7RUFFQSxlQUFBO0VBQ0Esa0JBQUE7RUFDQSxZQUFBO0VBQ0EseUNBQUE7QUFNRjs7QUFGQTtFQUNFLGVBQUE7QUFLRjs7QUFGQTtFQUNFLGFBQUE7QUFLRjs7QUFGQTtFQUNFLFdBQUE7QUFLRjs7QUFGQTtFQUNFLGVBQUE7QUFLRiIsImZpbGUiOiJzcmMvYXBwL3JvdXRlcy9nYW1lL2dhbWUuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubm9zZWxlY3Qge1xyXG4gIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTsgLyogaU9TIFNhZmFyaSAqL1xyXG4gICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsgLyogU2FmYXJpICovXHJcbiAgICAgLWtodG1sLXVzZXItc2VsZWN0OiBub25lOyAvKiBLb25xdWVyb3IgSFRNTCAqL1xyXG4gICAgICAgLW1vei11c2VyLXNlbGVjdDogbm9uZTsgLyogT2xkIHZlcnNpb25zIG9mIEZpcmVmb3ggKi9cclxuICAgICAgICAtbXMtdXNlci1zZWxlY3Q6IG5vbmU7IC8qIEludGVybmV0IEV4cGxvcmVyL0VkZ2UgKi9cclxuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7IC8qIE5vbi1wcmVmaXhlZCB2ZXJzaW9uLCBjdXJyZW50bHlcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1cHBvcnRlZCBieSBDaHJvbWUsIEVkZ2UsIE9wZXJhIGFuZCBGaXJlZm94ICovXHJcbn1cclxuXHJcbi5zY29yZWJvYXJkIHtcclxuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcclxuICBwb3NpdGlvbjogZml4ZWQ7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbiAgaGVpZ2h0OiAxMDAlO1xyXG59XHJcblxyXG4uaGVhZGluZyB7XHJcbiAgaGVpZ2h0OiA3MHB4O1xyXG59XHJcblxyXG4udGV4dCB7XHJcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XHJcbiAgcGFkZGluZzogMTBweDtcclxuICAvL21hcmdpbi1ib3R0b206IDEwcHg7XHJcbiAgZm9udC1zaXplOiA1MHB4O1xyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxuICBjb2xvcjogYmxhY2s7XHJcbiAgZm9udC1mYW1pbHk6IEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7XHJcbiAgLy90ZXh0LXNoYWRvdzogMCAwIDNweCBibGFjaztcclxufVxyXG5cclxuLnRleHQudG9wIHtcclxuICBmb250LXNpemU6IDYwcHg7XHJcbn1cclxuXHJcbi5oZWFkaW5nLWl0ZW1zIHtcclxuICBoZWlnaHQ6IDE3NXB4O1xyXG59XHJcblxyXG5hcHAtZGlzcGxheSB7XHJcbiAgbWFyZ2luOiAwcHg7XHJcbn1cclxuXHJcbmFwcC1kaXNwbGF5LmFsaWduLWNlbnRlciB7XHJcbiAgbWFyZ2luOiAwcHggMHB4O1xyXG59Il19 */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](GameComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-game', templateUrl: './game.component.html', styleUrls: ['./game.component.scss'] }] }], function () { return []; }, null); })(); /***/ }), /***/ "MDx2": /*!*********************************************************!*\ !*** ./src/app/components/penalty/penalty.component.ts ***! \*********************************************************/ /*! exports provided: PenaltyComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PenaltyComponent", function() { return PenaltyComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _display_display_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../display/display.component */ "3PfB"); /* harmony import */ var _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../pipes/time-format.pipe */ "dDfN"); function PenaltyComponent_div_6_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](2, "app-display", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](3, "number"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](5, "app-display", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](6, "timeFormat"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { const penalty_r1 = ctx.$implicit; _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("text", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind2"](3, 4, penalty_r1.player, "2.0"))("disabled", penalty_r1.disabled); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("text", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](6, 7, penalty_r1.timeRemaining))("disabled", penalty_r1.disabled); } } class PenaltyComponent { constructor() { this.penalties = []; } get penaltyDisplay() { let displayValues = []; for (let penalty of this.penalties) { if (penalty.active) { displayValues.push(penalty); } } let emptyCount = 2 - displayValues.length; for (let i = 0; i < emptyCount; i++) { displayValues.push({ player: 0, timeRemaining: 0, disabled: true }); } return displayValues; } ngOnInit() { } } PenaltyComponent.ɵfac = function PenaltyComponent_Factory(t) { return new (t || PenaltyComponent)(); }; PenaltyComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: PenaltyComponent, selectors: [["app-penalty"]], inputs: { penalties: "penalties" }, decls: 7, vars: 1, consts: [[1, "container"], [1, "row"], [1, "column-1"], [1, "column-2"], ["class", "row", 4, "ngFor", "ngForOf"], ["size", "50", 3, "text", "disabled"]], template: function PenaltyComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3, " PLAYER "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](5, " PENALTY "); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](6, PenaltyComponent_div_6_Template, 7, 9, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx.penaltyDisplay); } }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["NgForOf"], _display_display_component__WEBPACK_IMPORTED_MODULE_2__["DisplayComponent"]], pipes: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["DecimalPipe"], _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_3__["TimeFormatPipe"]], styles: [".container[_ngcontent-%COMP%] {\n padding: 10px;\n margin-top: 25px;\n font-size: 25px;\n color: black;\n}\n\n.row[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n display: inline-block;\n}\n\n.column-1[_ngcontent-%COMP%] {\n font-size: 30px;\n font-weight: bold;\n width: 120px;\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n\n.column-2[_ngcontent-%COMP%] {\n font-size: 30px;\n font-weight: bold;\n width: 220px;\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy9wZW5hbHR5L3BlbmFsdHkuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0EsZ0JBQUE7RUFDQSxlQUFBO0VBQ0EsWUFBQTtBQUNGOztBQUVBO0VBQ0UscUJBQUE7QUFDRjs7QUFFQTtFQUNFLGVBQUE7RUFDQSxpQkFBQTtFQUNBLFlBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0Esa0JBQUE7QUFDRjs7QUFFQTtFQUNFLGVBQUE7RUFDQSxpQkFBQTtFQUNBLFlBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0Esa0JBQUE7QUFDRiIsImZpbGUiOiJzcmMvYXBwL2NvbXBvbmVudHMvcGVuYWx0eS9wZW5hbHR5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbnRhaW5lciB7XHJcbiAgcGFkZGluZzogMTBweDtcclxuICBtYXJnaW4tdG9wOiAyNXB4O1xyXG4gIGZvbnQtc2l6ZTogMjVweDtcclxuICBjb2xvcjogYmxhY2s7XHJcbn1cclxuXHJcbi5yb3cgPiBkaXYge1xyXG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxufVxyXG5cclxuLmNvbHVtbi0xIHtcclxuICBmb250LXNpemU6IDMwcHg7XHJcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XHJcbiAgd2lkdGg6IDEyMHB4O1xyXG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAgdGV4dC1hbGlnbjogY2VudGVyO1xyXG59XHJcblxyXG4uY29sdW1uLTIge1xyXG4gIGZvbnQtc2l6ZTogMzBweDtcclxuICBmb250LXdlaWdodDogYm9sZDtcclxuICB3aWR0aDogMjIwcHg7XHJcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XHJcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcbn1cclxuIl19 */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PenaltyComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-penalty', templateUrl: './penalty.component.html', styleUrls: ['./penalty.component.scss'] }] }], function () { return []; }, { penalties: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /***/ }), /***/ "MZE5": /*!**************************************!*\ !*** ./src/app/models/game.model.ts ***! \**************************************/ /*! exports provided: Game */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Game", function() { return Game; }); /* harmony import */ var _team_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./team.model */ "t6OC"); /* harmony import */ var _helpers_number_extensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/number-extensions */ "kOiN"); class Game { constructor(model) { this.timeout = false; this.timeRemaining = 0; this.timeoutTimeRemaining = 0; this.endSoundPlayed = false; this.teamA = (model === null || model === void 0 ? void 0 : model.teamA) || new _team_model__WEBPACK_IMPORTED_MODULE_0__["Team"](); this.teamB = (model === null || model === void 0 ? void 0 : model.teamB) || new _team_model__WEBPACK_IMPORTED_MODULE_0__["Team"](); this.period = (model === null || model === void 0 ? void 0 : model.period) || '--'; this.timeRemaining = (model === null || model === void 0 ? void 0 : model.timeRemaining) || 0; this.timeoutTimeRemaining = (model === null || model === void 0 ? void 0 : model.timeoutTimeRemaining) || 0; } cacheTimeRemaining() { this.cachedTimeRemaining = this.timeRemaining; this.cachedTimeoutTimeRemaining = this.timeoutTimeRemaining; this.teamA.cacheTimeRemaining(); this.teamB.cacheTimeRemaining(); } tick(delta) { if (this.timeout && this.timeoutTimeRemaining > 0) { this.timeoutTimeRemaining = this.cachedTimeoutTimeRemaining - (delta / 1000); } else if (this.timeRemaining > 0) { this.timeRemaining = this.cachedTimeRemaining - (delta / 1000); this.teamA.tick(delta); this.teamB.tick(delta); } } } /***/ }), /***/ "R1Uq": /*!*********************************************!*\ !*** ./src/app/pipes/period-format.pipe.ts ***! \*********************************************/ /*! exports provided: PeriodFormatPipe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PeriodFormatPipe", function() { return PeriodFormatPipe; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); class PeriodFormatPipe { transform(value) { if (typeof value === 'number') { return value.toString().padStart(2, '0'); } else { return value; } } } PeriodFormatPipe.ɵfac = function PeriodFormatPipe_Factory(t) { return new (t || PeriodFormatPipe)(); }; PeriodFormatPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "periodFormat", type: PeriodFormatPipe, pure: true }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PeriodFormatPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'periodFormat' }] }], null, null); })(); /***/ }), /***/ "RPQu": /*!*************************************************************!*\ !*** ./src/app/components/team-info/team-info.component.ts ***! \*************************************************************/ /*! exports provided: TeamInfoComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TeamInfoComponent", function() { return TeamInfoComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var src_app_models_goal_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/models/goal.model */ "ZxHb"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "3Pt+"); class TeamInfoComponent { constructor() { } ngOnInit() { } onSubtractScore() { if (this.team.goals.length) { this.team.goals.splice(this.team.goals.length - 1); } } onAddScore() { this.team.goals.push(new src_app_models_goal_model__WEBPACK_IMPORTED_MODULE_1__["Goal"]()); } } TeamInfoComponent.ɵfac = function TeamInfoComponent_Factory(t) { return new (t || TeamInfoComponent)(); }; TeamInfoComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: TeamInfoComponent, selectors: [["app-team-info"]], inputs: { team: "team" }, decls: 21, vars: 2, consts: [[1, "card"], [1, "card-body"], [1, "container", "overflow-hidden", "row"], [1, "col-6"], [1, "row"], [1, "col-12"], [1, "form-label"], ["type", "text", "id", "team-name", 1, "form-control", 3, "ngModel", "ngModelChange"], [1, "row", "justify-content-start"], [1, "col-2"], [1, "bi-dash", "icon-button", 3, "click"], [1, "col-auto"], [1, "score"], [1, "bi-plus", "icon-button", 3, "click"]], template: function TeamInfoComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](3, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](4, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "div", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "label", 6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](7, "Team Name"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](8, "input", 7); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("ngModelChange", function TeamInfoComponent_Template_input_ngModelChange_8_listener($event) { return ctx.team.name = $event; }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](9, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](10, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "label", 6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](12, "Score"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](13, "div", 8); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](14, "div", 9); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](15, "i", 10); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function TeamInfoComponent_Template_i_click_15_listener() { return ctx.onSubtractScore(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](16, "div", 11); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](17, "div", 12); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](18); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](19, "div", 9); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](20, "i", 13); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function TeamInfoComponent_Template_i_click_20_listener() { return ctx.onAddScore(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](8); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngModel", ctx.team.name); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](10); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx.team.goals.length, " "); } }, directives: [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["DefaultValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NgModel"]], styles: [".score[_ngcontent-%COMP%] {\n font-size: 25px;\n line-height: 45px;\n text-align: center;\n width: 50px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy90ZWFtLWluZm8vdGVhbS1pbmZvLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZUFBQTtFQUNBLGlCQUFBO0VBQ0Esa0JBQUE7RUFDQSxXQUFBO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9jb21wb25lbnRzL3RlYW0taW5mby90ZWFtLWluZm8uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuc2NvcmUge1xyXG4gIGZvbnQtc2l6ZTogMjVweDtcclxuICBsaW5lLWhlaWdodDogNDVweDtcclxuICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcbiAgd2lkdGg6IDUwcHg7XHJcbn1cclxuIl19 */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TeamInfoComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-team-info', templateUrl: './team-info.component.html', styleUrls: ['./team-info.component.scss'] }] }], function () { return []; }, { team: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /***/ }), /***/ "Sy1n": /*!**********************************!*\ !*** ./src/app/app.component.ts ***! \**********************************/ /*! exports provided: AppComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "tyNb"); class AppComponent { constructor() { this.title = 'Ice Hockey Scoreboard'; } } AppComponent.ɵfac = function AppComponent_Factory(t) { return new (t || AppComponent)(); }; AppComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: AppComponent, selectors: [["app-root"]], decls: 1, vars: 0, template: function AppComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "router-outlet"); } }, directives: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterOutlet"]], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FwcC5jb21wb25lbnQuc2NzcyJ9 */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AppComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }] }], null, null); })(); /***/ }), /***/ "ZAI4": /*!*******************************!*\ !*** ./src/app/app.module.ts ***! \*******************************/ /*! exports provided: AppModule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; }); /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "tk/3"); /* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./app.component */ "Sy1n"); /* harmony import */ var _routes_setup_setup_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./routes/setup/setup.component */ "FOhG"); /* harmony import */ var _routes_game_game_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./routes/game/game.component */ "LSJS"); /* harmony import */ var _components_display_display_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/display/display.component */ "3PfB"); /* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./app.routing.module */ "lm+D"); /* harmony import */ var _components_penalty_penalty_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/penalty/penalty.component */ "MDx2"); /* harmony import */ var _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pipes/time-format.pipe */ "dDfN"); /* harmony import */ var _pipes_period_format_pipe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./pipes/period-format.pipe */ "R1Uq"); /* harmony import */ var _components_command_input_command_input_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/command-input/command-input.component */ "pphr"); /* harmony import */ var _components_team_info_team_info_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./components/team-info/team-info.component */ "RPQu"); /* harmony import */ var _components_team_penalties_team_penalties_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/team-penalties/team-penalties.component */ "+tor"); /* harmony import */ var _components_penalty_control_penalty_control_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/penalty-control/penalty-control.component */ "xsKt"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/forms */ "3Pt+"); class AppModule { } AppModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: AppModule, bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_3__["AppComponent"]] }); AppModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ factory: function AppModule_Factory(t) { return new (t || AppModule)(); }, providers: [], imports: [[ _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClientModule"], _app_routing_module__WEBPACK_IMPORTED_MODULE_7__["AppRoutingModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_15__["FormsModule"] ]] }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](AppModule, { declarations: [_app_component__WEBPACK_IMPORTED_MODULE_3__["AppComponent"], _routes_setup_setup_component__WEBPACK_IMPORTED_MODULE_4__["SetupComponent"], _routes_game_game_component__WEBPACK_IMPORTED_MODULE_5__["GameComponent"], _components_display_display_component__WEBPACK_IMPORTED_MODULE_6__["DisplayComponent"], _components_penalty_penalty_component__WEBPACK_IMPORTED_MODULE_8__["PenaltyComponent"], _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_9__["TimeFormatPipe"], _pipes_period_format_pipe__WEBPACK_IMPORTED_MODULE_10__["PeriodFormatPipe"], _components_command_input_command_input_component__WEBPACK_IMPORTED_MODULE_11__["CommandInputComponent"], _components_penalty_control_penalty_control_component__WEBPACK_IMPORTED_MODULE_14__["PenaltyControlComponent"], _components_team_info_team_info_component__WEBPACK_IMPORTED_MODULE_12__["TeamInfoComponent"], _components_team_penalties_team_penalties_component__WEBPACK_IMPORTED_MODULE_13__["TeamPenaltiesComponent"]], imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClientModule"], _app_routing_module__WEBPACK_IMPORTED_MODULE_7__["AppRoutingModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_15__["FormsModule"]] }); })(); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](AppModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ declarations: [ _app_component__WEBPACK_IMPORTED_MODULE_3__["AppComponent"], _routes_setup_setup_component__WEBPACK_IMPORTED_MODULE_4__["SetupComponent"], _routes_game_game_component__WEBPACK_IMPORTED_MODULE_5__["GameComponent"], _components_display_display_component__WEBPACK_IMPORTED_MODULE_6__["DisplayComponent"], _components_penalty_penalty_component__WEBPACK_IMPORTED_MODULE_8__["PenaltyComponent"], _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_9__["TimeFormatPipe"], _pipes_period_format_pipe__WEBPACK_IMPORTED_MODULE_10__["PeriodFormatPipe"], _components_command_input_command_input_component__WEBPACK_IMPORTED_MODULE_11__["CommandInputComponent"], _components_penalty_control_penalty_control_component__WEBPACK_IMPORTED_MODULE_14__["PenaltyControlComponent"], _components_team_info_team_info_component__WEBPACK_IMPORTED_MODULE_12__["TeamInfoComponent"], _components_team_penalties_team_penalties_component__WEBPACK_IMPORTED_MODULE_13__["TeamPenaltiesComponent"] ], imports: [ _angular_platform_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClientModule"], _app_routing_module__WEBPACK_IMPORTED_MODULE_7__["AppRoutingModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_15__["FormsModule"] ], providers: [], bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_3__["AppComponent"]] }] }], null, null); })(); /***/ }), /***/ "ZxHb": /*!**************************************!*\ !*** ./src/app/models/goal.model.ts ***! \**************************************/ /*! exports provided: Goal */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Goal", function() { return Goal; }); class Goal { constructor(model) { this.number = 0; this.time = 0; this.scoringPlayer = 0; this.assists = []; this.number = (model === null || model === void 0 ? void 0 : model.number) || 0; this.time = (model === null || model === void 0 ? void 0 : model.time) || 0; this.scoringPlayer = (model === null || model === void 0 ? void 0 : model.scoringPlayer) || 0; this.assists = (model === null || model === void 0 ? void 0 : model.assists) || []; } } /***/ }), /***/ "dDfN": /*!*******************************************!*\ !*** ./src/app/pipes/time-format.pipe.ts ***! \*******************************************/ /*! exports provided: TimeFormatPipe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeFormatPipe", function() { return TimeFormatPipe; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); class TimeFormatPipe { transform(value) { let minutes = Math.floor(value / 60).toString().padStart(2, '0'); let seconds = Math.floor(value % 60).toString().padStart(2, '0'); return `${minutes}:${seconds}`; } } TimeFormatPipe.ɵfac = function TimeFormatPipe_Factory(t) { return new (t || TimeFormatPipe)(); }; TimeFormatPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "timeFormat", type: TimeFormatPipe, pure: true }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TimeFormatPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'timeFormat' }] }], null, null); })(); /***/ }), /***/ "icgN": /*!*****************************************!*\ !*** ./src/app/models/penalty.model.ts ***! \*****************************************/ /*! exports provided: Penalty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Penalty", function() { return Penalty; }); class Penalty { constructor(model) { this.active = true; this.endSoundPlayed = false; this.period = (model === null || model === void 0 ? void 0 : model.period) || 0; this.player = (model === null || model === void 0 ? void 0 : model.player) || 0; this.reason = (model === null || model === void 0 ? void 0 : model.reason) || 'unspecified'; this.time = (model === null || model === void 0 ? void 0 : model.time) || 0; this.timeRemaining = (model === null || model === void 0 ? void 0 : model.time) || 0; } cacheTimeRemaining() { this.cachedTimeRemaining = this.timeRemaining; } } /***/ }), /***/ "kOiN": /*!**********************************************!*\ !*** ./src/app/helpers/number-extensions.ts ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); Number.prototype.roundToDelta = function (delta) { const multiplier = 1 / delta; return Math.floor(this * multiplier) / multiplier; }; /***/ }), /***/ "lm+D": /*!***************************************!*\ !*** ./src/app/app.routing.module.ts ***! \***************************************/ /*! exports provided: AppRoutingModule */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRoutingModule", function() { return AppRoutingModule; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "tyNb"); /* harmony import */ var _routes_game_game_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./routes/game/game.component */ "LSJS"); /* harmony import */ var _routes_setup_setup_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./routes/setup/setup.component */ "FOhG"); const routes = [ { path: 'setup', component: _routes_setup_setup_component__WEBPACK_IMPORTED_MODULE_3__["SetupComponent"] }, { path: 'game', component: _routes_game_game_component__WEBPACK_IMPORTED_MODULE_2__["GameComponent"] }, { path: '**', component: _routes_setup_setup_component__WEBPACK_IMPORTED_MODULE_3__["SetupComponent"] }, ]; class AppRoutingModule { } AppRoutingModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: AppRoutingModule }); AppRoutingModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ factory: function AppRoutingModule_Factory(t) { return new (t || AppRoutingModule)(); }, imports: [[ _angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forRoot(routes, { useHash: true }) ], _angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]] }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](AppRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]] }); })(); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AppRoutingModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ declarations: [], imports: [ _angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forRoot(routes, { useHash: true }) ], exports: [ _angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"] ] }] }], null, null); })(); /***/ }), /***/ "pphr": /*!*********************************************************************!*\ !*** ./src/app/components/command-input/command-input.component.ts ***! \*********************************************************************/ /*! exports provided: CommandInputComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommandInputComponent", function() { return CommandInputComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); class CommandInputComponent { constructor() { } ngOnInit() { } } CommandInputComponent.ɵfac = function CommandInputComponent_Factory(t) { return new (t || CommandInputComponent)(); }; CommandInputComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: CommandInputComponent, selectors: [["app-command-input"]], decls: 11, vars: 0, consts: [[1, "container"], [1, "error"], [1, "focus", "error"]], template: function CommandInputComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](2, "penalty"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](3, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](4, "01"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6, "00:25"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](7, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](8, "00"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](9, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](10, "02:00"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } }, styles: ["[_nghost-%COMP%] {\n width: calc(100% - 20px);\n position: fixed;\n bottom: 10px;\n left: 10px;\n opacity: 0.3;\n}\n\n.container[_ngcontent-%COMP%] {\n height: 30px;\n padding: 10px;\n border-radius: 5px;\n background-color: grey;\n font-size: 20px;\n font-family: \"Courier New\", Courier, monospace;\n font-weight: bold;\n}\n\n.container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n display: inline-block;\n margin-right: 10px;\n line-height: 30px;\n}\n\n.focus[_ngcontent-%COMP%] {\n border: 1px solid black;\n color: black;\n background-color: white;\n}\n\n.error[_ngcontent-%COMP%] {\n color: red;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy9jb21tYW5kLWlucHV0L2NvbW1hbmQtaW5wdXQuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSx3QkFBQTtFQUNBLGVBQUE7RUFDQSxZQUFBO0VBQ0EsVUFBQTtFQUNBLFlBQUE7QUFDRjs7QUFFQTtFQUNFLFlBQUE7RUFDQSxhQUFBO0VBQ0Esa0JBQUE7RUFDQSxzQkFBQTtFQUNBLGVBQUE7RUFDQSw4Q0FBQTtFQUNBLGlCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxxQkFBQTtFQUNBLGtCQUFBO0VBQ0EsaUJBQUE7QUFDRjs7QUFFQTtFQUNFLHVCQUFBO0VBQ0EsWUFBQTtFQUNBLHVCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxVQUFBO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9jb21wb25lbnRzL2NvbW1hbmQtaW5wdXQvY29tbWFuZC1pbnB1dC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IHtcclxuICB3aWR0aDogY2FsYygxMDAlIC0gMjBweCk7XHJcbiAgcG9zaXRpb246IGZpeGVkO1xyXG4gIGJvdHRvbTogMTBweDtcclxuICBsZWZ0OiAxMHB4O1xyXG4gIG9wYWNpdHk6IDAuMztcclxufVxyXG5cclxuLmNvbnRhaW5lciB7XHJcbiAgaGVpZ2h0OiAzMHB4O1xyXG4gIHBhZGRpbmc6IDEwcHg7XHJcbiAgYm9yZGVyLXJhZGl1czogNXB4O1xyXG4gIGJhY2tncm91bmQtY29sb3I6IGdyZXk7XHJcbiAgZm9udC1zaXplOiAyMHB4O1xyXG4gIGZvbnQtZmFtaWx5OiAnQ291cmllciBOZXcnLCBDb3VyaWVyLCBtb25vc3BhY2U7XHJcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XHJcbn1cclxuXHJcbi5jb250YWluZXIgPiBkaXYge1xyXG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxuICBtYXJnaW4tcmlnaHQ6IDEwcHg7XHJcbiAgbGluZS1oZWlnaHQ6IDMwcHg7XHJcbn1cclxuXHJcbi5mb2N1cyB7XHJcbiAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7XHJcbiAgY29sb3I6IGJsYWNrO1xyXG4gIGJhY2tncm91bmQtY29sb3I6IHdoaXRlO1xyXG59XHJcblxyXG4uZXJyb3Ige1xyXG4gIGNvbG9yOiByZWQ7XHJcbn1cclxuIl19 */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CommandInputComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-command-input', templateUrl: './command-input.component.html', styleUrls: ['./command-input.component.scss'] }] }], function () { return []; }, null); })(); /***/ }), /***/ "sqvn": /*!****************************************************!*\ !*** ./src/app/helpers/time-conversion-helpers.ts ***! \****************************************************/ /*! exports provided: TimeConversionHelpers */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeConversionHelpers", function() { return TimeConversionHelpers; }); class TimeConversionHelpers { static convert(time) { time = time.replace(',', '.'); let amount = 0; var complexCharacters = /[\+\-\*\/]+/; var isComplex = complexCharacters.test(time); try { var evaluationResult = eval(time); if (isComplex) { time = (evaluationResult * 60).toString(); } } catch (_a) { } if (time.indexOf(':') != -1) { // interpret as time let parts = time.split(':'); amount = +parts[0] * 60 + +parts[1]; } else if (time.indexOf('.') != -1) { // interpret as minutes amount = +time * 60; } else { // interpret as seconds amount = +time; } if (Number.isNaN(amount)) { return null; } return Math.round(amount * 100) / 100; } } /***/ }), /***/ "t6OC": /*!**************************************!*\ !*** ./src/app/models/team.model.ts ***! \**************************************/ /*! exports provided: Team */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Team", function() { return Team; }); class Team { constructor(model) { this.name = (model === null || model === void 0 ? void 0 : model.name) || ''; this.goals = (model === null || model === void 0 ? void 0 : model.goals) || []; this.penalties = (model === null || model === void 0 ? void 0 : model.penalties) || []; } cacheTimeRemaining() { for (let penalty of this.penalties) { penalty.cacheTimeRemaining(); } } tick(delta) { for (let penalty of this.penalties) { if (penalty.timeRemaining > 0) { penalty.timeRemaining = penalty.cachedTimeRemaining - (delta / 1000); if (penalty.timeRemaining <= 0) { penalty.timeRemaining = 0; } } else { penalty.active = false; } } } } /***/ }), /***/ "xsKt": /*!*************************************************************************!*\ !*** ./src/app/components/penalty-control/penalty-control.component.ts ***! \*************************************************************************/ /*! exports provided: PenaltyControlComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PenaltyControlComponent", function() { return PenaltyControlComponent; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../pipes/time-format.pipe */ "dDfN"); const _c0 = function (a0) { return { "disabled": a0 }; }; class PenaltyControlComponent { constructor() { this.removePenalty = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](); this.editPenalty = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](); } ngOnInit() { } onRemovePenaltyClicked() { this.removePenalty.emit(this.penalty); } onEditPenaltyClicked() { if (this.timerRunning) { return; } this.editPenalty.emit(this.penalty); } } PenaltyControlComponent.ɵfac = function PenaltyControlComponent_Factory(t) { return new (t || PenaltyControlComponent)(); }; PenaltyControlComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: PenaltyControlComponent, selectors: [["app-penalty-control"]], inputs: { penalty: "penalty", timerRunning: "timerRunning" }, outputs: { removePenalty: "removePenalty", editPenalty: "editPenalty" }, decls: 12, vars: 11, consts: [[1, "container"], [1, "row"], [1, "col-4", "text"], [1, "col-5", "text"], [1, "col-1"], [1, "bi-pencil-fill", "icon-button", 2, "font-size", "15px", "padding", "10px", 3, "click"], [1, "bi-x", "icon-button", 3, "click"]], template: function PenaltyControlComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](1, "div", 1); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](4, "number"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "div", 3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipe"](7, "timeFormat"); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](8, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](9, "i", 5); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function PenaltyControlComponent_Template_i_click_9_listener() { return ctx.onEditPenaltyClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](10, "div", 4); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](11, "i", 6); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function PenaltyControlComponent_Template_i_click_11_listener() { return ctx.onRemovePenaltyClicked(); }); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind2"](4, 4, ctx.penalty.player, "2.0")); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpipeBind1"](7, 7, ctx.penalty.timeRemaining)); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](9, _c0, ctx.timerRunning)); } }, pipes: [_angular_common__WEBPACK_IMPORTED_MODULE_1__["DecimalPipe"], _pipes_time_format_pipe__WEBPACK_IMPORTED_MODULE_2__["TimeFormatPipe"]], styles: [".text[_ngcontent-%COMP%] {\n line-height: 47px;\n align-content: center;\n}\n\n.row[_ngcontent-%COMP%] {\n border: 1px solid grey;\n border-radius: 5px;\n}\n\n.container[_ngcontent-%COMP%] {\n padding: 5px;\n}\n\n.icon-button[_ngcontent-%COMP%] {\n line-height: 47px;\n margin: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29tcG9uZW50cy9wZW5hbHR5LWNvbnRyb2wvcGVuYWx0eS1jb250cm9sLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksaUJBQUE7RUFDQSxxQkFBQTtBQUNKOztBQUVBO0VBQ0ksc0JBQUE7RUFDQSxrQkFBQTtBQUNKOztBQUVBO0VBQ0ksWUFBQTtBQUNKOztBQUVBO0VBQ0ksaUJBQUE7RUFDQSxXQUFBO0FBQ0oiLCJmaWxlIjoic3JjL2FwcC9jb21wb25lbnRzL3BlbmFsdHktY29udHJvbC9wZW5hbHR5LWNvbnRyb2wuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudGV4dCB7XHJcbiAgICBsaW5lLWhlaWdodDogNDdweDtcclxuICAgIGFsaWduLWNvbnRlbnQ6IGNlbnRlcjtcclxufVxyXG5cclxuLnJvdyB7XHJcbiAgICBib3JkZXI6IDFweCBzb2xpZCBncmV5O1xyXG4gICAgYm9yZGVyLXJhZGl1czogNXB4O1xyXG59XHJcblxyXG4uY29udGFpbmVyIHtcclxuICAgIHBhZGRpbmc6IDVweDtcclxufVxyXG5cclxuLmljb24tYnV0dG9uIHtcclxuICAgIGxpbmUtaGVpZ2h0OiA0N3B4O1xyXG4gICAgbWFyZ2luOiA1cHg7XHJcbn0iXX0= */"] }); /*@__PURE__*/ (function () { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PenaltyControlComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{ selector: 'app-penalty-control', templateUrl: './penalty-control.component.html', styleUrls: ['./penalty-control.component.scss'] }] }], function () { return []; }, { penalty: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], timerRunning: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], removePenalty: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }], editPenalty: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] }] }); })(); /***/ }), /***/ "zUnb": /*!*********************!*\ !*** ./src/main.ts ***! \*********************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./environments/environment */ "AytR"); /* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "ZAI4"); /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser */ "jhN1"); if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__["environment"].production) { Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])(); } _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__["platformBrowser"]().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"]) .catch(err => console.error(err)); /***/ }), /***/ "zn8P": /*!******************************************************!*\ !*** ./$$_lazy_route_resource lazy namespace object ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function webpackEmptyAsyncContext(req) { // Here Promise.resolve().then() is used instead of new Promise() to prevent // uncaught exception popping up in devtools return Promise.resolve().then(function() { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; }); } webpackEmptyAsyncContext.keys = function() { return []; }; webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; module.exports = webpackEmptyAsyncContext; webpackEmptyAsyncContext.id = "zn8P"; /***/ }) },[[0,"runtime","vendor"]]]); //# sourceMappingURL=main.js.map