@mtgame/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/api/basketball-game-api.d.ts +17 -0
- package/api/league-api.d.ts +16 -0
- package/api/media-api.d.ts +24 -0
- package/api/notification-api.d.ts +4 -0
- package/api/notification-base-api.d.ts +22 -0
- package/api/org-notification-api.d.ts +4 -0
- package/api/paginated-response.interface.d.ts +4 -0
- package/api/public-api.d.ts +12 -0
- package/api/reference-api.d.ts +11 -0
- package/api/tournament-api.d.ts +64 -0
- package/api/tournament-join-api.d.ts +14 -0
- package/api/tournament-stage-api.d.ts +15 -0
- package/api/volleyball-game-api.d.ts +17 -0
- package/bundles/mtgame-core.umd.js +4785 -0
- package/bundles/mtgame-core.umd.js.map +1 -0
- package/bundles/mtgame-core.umd.min.js +16 -0
- package/bundles/mtgame-core.umd.min.js.map +1 -0
- package/esm2015/api/basketball-game-api.js +54 -0
- package/esm2015/api/league-api.js +60 -0
- package/esm2015/api/media-api.js +110 -0
- package/esm2015/api/notification-api.js +18 -0
- package/esm2015/api/notification-base-api.js +83 -0
- package/esm2015/api/org-notification-api.js +18 -0
- package/esm2015/api/paginated-response.interface.js +1 -0
- package/esm2015/api/public-api.js +12 -0
- package/esm2015/api/reference-api.js +40 -0
- package/esm2015/api/tournament-api.js +187 -0
- package/esm2015/api/tournament-join-api.js +51 -0
- package/esm2015/api/tournament-stage-api.js +56 -0
- package/esm2015/api/volleyball-game-api.js +54 -0
- package/esm2015/http-cookie.interceptor.js +34 -0
- package/esm2015/localization/basketball-game-log-types.js +26 -0
- package/esm2015/localization/overtime-types.js +7 -0
- package/esm2015/localization/public-api.js +7 -0
- package/esm2015/localization/team-event-type.js +6 -0
- package/esm2015/localization/team-user-role.js +7 -0
- package/esm2015/localization/user-profile.js +46 -0
- package/esm2015/localization/volleyball-game-log-types.js +25 -0
- package/esm2015/models/basketball-game-config.js +42 -0
- package/esm2015/models/basketball-game-log.js +109 -0
- package/esm2015/models/basketball-game-statistic.js +50 -0
- package/esm2015/models/basketball-game-team-statistic.js +27 -0
- package/esm2015/models/basketball-profile.js +43 -0
- package/esm2015/models/basketball-statistic.js +69 -0
- package/esm2015/models/city.js +22 -0
- package/esm2015/models/file.js +38 -0
- package/esm2015/models/game-invite.js +37 -0
- package/esm2015/models/game-log-base.js +1 -0
- package/esm2015/models/game-statistic-base.js +1 -0
- package/esm2015/models/game-timeline-stages.js +49 -0
- package/esm2015/models/game-user.js +32 -0
- package/esm2015/models/game.js +108 -0
- package/esm2015/models/league-court.js +24 -0
- package/esm2015/models/league.js +52 -0
- package/esm2015/models/media-item.js +40 -0
- package/esm2015/models/notification-settings.js +35 -0
- package/esm2015/models/notification.js +134 -0
- package/esm2015/models/organization.js +27 -0
- package/esm2015/models/playoff.js +78 -0
- package/esm2015/models/poll.js +132 -0
- package/esm2015/models/public-api.js +50 -0
- package/esm2015/models/sport.js +47 -0
- package/esm2015/models/team-event-invite.js +32 -0
- package/esm2015/models/team-event-type.js +6 -0
- package/esm2015/models/team-event.js +45 -0
- package/esm2015/models/team-invite-external.js +25 -0
- package/esm2015/models/team-invite.js +41 -0
- package/esm2015/models/team-user.js +39 -0
- package/esm2015/models/team.js +56 -0
- package/esm2015/models/tournament-disqualification.js +29 -0
- package/esm2015/models/tournament-event.js +38 -0
- package/esm2015/models/tournament-group.js +23 -0
- package/esm2015/models/tournament-invite.js +39 -0
- package/esm2015/models/tournament-join-team.js +55 -0
- package/esm2015/models/tournament-news.js +33 -0
- package/esm2015/models/tournament-stage-team.js +45 -0
- package/esm2015/models/tournament-stage.js +35 -0
- package/esm2015/models/tournament-team-user-invite.js +29 -0
- package/esm2015/models/tournament-team-user.js +49 -0
- package/esm2015/models/tournament-team.js +54 -0
- package/esm2015/models/tournament.js +161 -0
- package/esm2015/models/user-profile.js +24 -0
- package/esm2015/models/user.js +74 -0
- package/esm2015/models/util.js +208 -0
- package/esm2015/models/volleyball-game-config.js +40 -0
- package/esm2015/models/volleyball-game-log.js +139 -0
- package/esm2015/models/volleyball-game-statistic.js +50 -0
- package/esm2015/models/volleyball-game-team-statistic.js +27 -0
- package/esm2015/models/volleyball-profile.js +43 -0
- package/esm2015/models/volleyball-statistic.js +66 -0
- package/esm2015/mtgame-core.js +5 -0
- package/esm2015/public-api.js +8 -0
- package/esm2015/services/base.service.js +18 -0
- package/esm2015/services/centrifugo.service.js +107 -0
- package/esm2015/services/config.service.js +40 -0
- package/esm2015/services/public-api.js +4 -0
- package/esm2015/storage/local-storage-engine.js +18 -0
- package/esm2015/storage/public-api.js +4 -0
- package/esm2015/storage/storage-engine.js +61 -0
- package/esm2015/storage/store.js +63 -0
- package/esm2015/utils/array.js +18 -0
- package/esm2015/utils/component-destroyed.js +21 -0
- package/esm2015/utils/cookie.js +9 -0
- package/esm2015/utils/data.js +75 -0
- package/esm2015/utils/device.js +14 -0
- package/esm2015/utils/enum.js +7 -0
- package/esm2015/utils/errors.js +10 -0
- package/esm2015/utils/favicon.js +25 -0
- package/esm2015/utils/form.js +22 -0
- package/esm2015/utils/public-api.js +11 -0
- package/esm2015/utils/validators.js +47 -0
- package/esm5/api/basketball-game-api.js +65 -0
- package/esm5/api/league-api.js +70 -0
- package/esm5/api/media-api.js +125 -0
- package/esm5/api/notification-api.js +21 -0
- package/esm5/api/notification-base-api.js +109 -0
- package/esm5/api/org-notification-api.js +21 -0
- package/esm5/api/paginated-response.interface.js +1 -0
- package/esm5/api/public-api.js +12 -0
- package/esm5/api/reference-api.js +45 -0
- package/esm5/api/tournament-api.js +245 -0
- package/esm5/api/tournament-join-api.js +59 -0
- package/esm5/api/tournament-stage-api.js +65 -0
- package/esm5/api/volleyball-game-api.js +65 -0
- package/esm5/http-cookie.interceptor.js +35 -0
- package/esm5/localization/basketball-game-log-types.js +27 -0
- package/esm5/localization/overtime-types.js +8 -0
- package/esm5/localization/public-api.js +7 -0
- package/esm5/localization/team-event-type.js +7 -0
- package/esm5/localization/team-user-role.js +8 -0
- package/esm5/localization/user-profile.js +47 -0
- package/esm5/localization/volleyball-game-log-types.js +26 -0
- package/esm5/models/basketball-game-config.js +47 -0
- package/esm5/models/basketball-game-log.js +117 -0
- package/esm5/models/basketball-game-statistic.js +63 -0
- package/esm5/models/basketball-game-team-statistic.js +32 -0
- package/esm5/models/basketball-profile.js +48 -0
- package/esm5/models/basketball-statistic.js +78 -0
- package/esm5/models/city.js +27 -0
- package/esm5/models/file.js +41 -0
- package/esm5/models/game-invite.js +42 -0
- package/esm5/models/game-log-base.js +1 -0
- package/esm5/models/game-statistic-base.js +1 -0
- package/esm5/models/game-timeline-stages.js +57 -0
- package/esm5/models/game-user.js +37 -0
- package/esm5/models/game.js +134 -0
- package/esm5/models/league-court.js +29 -0
- package/esm5/models/league.js +69 -0
- package/esm5/models/media-item.js +49 -0
- package/esm5/models/notification-settings.js +40 -0
- package/esm5/models/notification.js +143 -0
- package/esm5/models/organization.js +32 -0
- package/esm5/models/playoff.js +91 -0
- package/esm5/models/poll.js +154 -0
- package/esm5/models/public-api.js +50 -0
- package/esm5/models/sport.js +52 -0
- package/esm5/models/team-event-invite.js +35 -0
- package/esm5/models/team-event-type.js +6 -0
- package/esm5/models/team-event.js +58 -0
- package/esm5/models/team-invite-external.js +30 -0
- package/esm5/models/team-invite.js +46 -0
- package/esm5/models/team-user.js +44 -0
- package/esm5/models/team.js +61 -0
- package/esm5/models/tournament-disqualification.js +34 -0
- package/esm5/models/tournament-event.js +43 -0
- package/esm5/models/tournament-group.js +28 -0
- package/esm5/models/tournament-invite.js +48 -0
- package/esm5/models/tournament-join-team.js +73 -0
- package/esm5/models/tournament-news.js +38 -0
- package/esm5/models/tournament-stage-team.js +54 -0
- package/esm5/models/tournament-stage.js +40 -0
- package/esm5/models/tournament-team-user-invite.js +34 -0
- package/esm5/models/tournament-team-user.js +66 -0
- package/esm5/models/tournament-team.js +63 -0
- package/esm5/models/tournament.js +176 -0
- package/esm5/models/user-profile.js +27 -0
- package/esm5/models/user.js +95 -0
- package/esm5/models/util.js +275 -0
- package/esm5/models/volleyball-game-config.js +49 -0
- package/esm5/models/volleyball-game-log.js +142 -0
- package/esm5/models/volleyball-game-statistic.js +71 -0
- package/esm5/models/volleyball-game-team-statistic.js +32 -0
- package/esm5/models/volleyball-profile.js +48 -0
- package/esm5/models/volleyball-statistic.js +71 -0
- package/esm5/mtgame-core.js +5 -0
- package/esm5/public-api.js +8 -0
- package/esm5/services/base.service.js +19 -0
- package/esm5/services/centrifugo.service.js +111 -0
- package/esm5/services/config.service.js +52 -0
- package/esm5/services/public-api.js +4 -0
- package/esm5/storage/local-storage-engine.js +25 -0
- package/esm5/storage/public-api.js +4 -0
- package/esm5/storage/storage-engine.js +77 -0
- package/esm5/storage/store.js +77 -0
- package/esm5/utils/array.js +18 -0
- package/esm5/utils/component-destroyed.js +21 -0
- package/esm5/utils/cookie.js +9 -0
- package/esm5/utils/data.js +79 -0
- package/esm5/utils/device.js +14 -0
- package/esm5/utils/enum.js +7 -0
- package/esm5/utils/errors.js +12 -0
- package/esm5/utils/favicon.js +47 -0
- package/esm5/utils/form.js +22 -0
- package/esm5/utils/public-api.js +11 -0
- package/esm5/utils/validators.js +49 -0
- package/fesm2015/mtgame-core.js +3749 -0
- package/fesm2015/mtgame-core.js.map +1 -0
- package/fesm5/mtgame-core.js +4455 -0
- package/fesm5/mtgame-core.js.map +1 -0
- package/http-cookie.interceptor.d.ts +10 -0
- package/localization/basketball-game-log-types.d.ts +25 -0
- package/localization/overtime-types.d.ts +6 -0
- package/localization/public-api.d.ts +6 -0
- package/localization/team-event-type.d.ts +5 -0
- package/localization/team-user-role.d.ts +6 -0
- package/localization/user-profile.d.ts +45 -0
- package/localization/volleyball-game-log-types.d.ts +24 -0
- package/models/basketball-game-config.d.ts +22 -0
- package/models/basketball-game-log.d.ts +52 -0
- package/models/basketball-game-statistic.d.ts +29 -0
- package/models/basketball-game-team-statistic.d.ts +8 -0
- package/models/basketball-profile.d.ts +20 -0
- package/models/basketball-statistic.d.ts +44 -0
- package/models/city.d.ts +7 -0
- package/models/file.d.ts +14 -0
- package/models/game-invite.d.ts +16 -0
- package/models/game-log-base.d.ts +10 -0
- package/models/game-statistic-base.d.ts +3 -0
- package/models/game-timeline-stages.d.ts +18 -0
- package/models/game-user.d.ts +12 -0
- package/models/game.d.ts +56 -0
- package/models/league-court.d.ts +9 -0
- package/models/league.d.ts +25 -0
- package/models/media-item.d.ts +15 -0
- package/models/notification-settings.d.ts +15 -0
- package/models/notification.d.ts +98 -0
- package/models/organization.d.ts +9 -0
- package/models/playoff.d.ts +25 -0
- package/models/poll.d.ts +46 -0
- package/models/public-api.d.ts +50 -0
- package/models/sport.d.ts +19 -0
- package/models/team-event-invite.d.ts +12 -0
- package/models/team-event-type.d.ts +4 -0
- package/models/team-event.d.ts +17 -0
- package/models/team-invite-external.d.ts +10 -0
- package/models/team-invite.d.ts +20 -0
- package/models/team-user.d.ts +18 -0
- package/models/team.d.ts +21 -0
- package/models/tournament-disqualification.d.ts +10 -0
- package/models/tournament-event.d.ts +16 -0
- package/models/tournament-group.d.ts +10 -0
- package/models/tournament-invite.d.ts +17 -0
- package/models/tournament-join-team.d.ts +19 -0
- package/models/tournament-news.d.ts +13 -0
- package/models/tournament-stage-team.d.ts +21 -0
- package/models/tournament-stage.d.ts +15 -0
- package/models/tournament-team-user-invite.d.ts +11 -0
- package/models/tournament-team-user.d.ts +22 -0
- package/models/tournament-team.d.ts +28 -0
- package/models/tournament.d.ts +87 -0
- package/models/user-profile.d.ts +8 -0
- package/models/user.d.ts +33 -0
- package/models/util.d.ts +49 -0
- package/models/volleyball-game-config.d.ts +17 -0
- package/models/volleyball-game-log.d.ts +54 -0
- package/models/volleyball-game-statistic.d.ts +28 -0
- package/models/volleyball-game-team-statistic.d.ts +8 -0
- package/models/volleyball-profile.d.ts +20 -0
- package/models/volleyball-statistic.d.ts +43 -0
- package/mtgame-core.d.ts +4 -0
- package/mtgame-core.metadata.json +1 -0
- package/package.json +23 -0
- package/public-api.d.ts +7 -0
- package/services/base.service.d.ts +5 -0
- package/services/centrifugo.service.d.ts +20 -0
- package/services/config.service.d.ts +11 -0
- package/services/public-api.d.ts +3 -0
- package/storage/local-storage-engine.d.ts +6 -0
- package/storage/public-api.d.ts +3 -0
- package/storage/storage-engine.d.ts +24 -0
- package/storage/store.d.ts +21 -0
- package/utils/array.d.ts +2 -0
- package/utils/component-destroyed.d.ts +7 -0
- package/utils/cookie.d.ts +1 -0
- package/utils/data.d.ts +6 -0
- package/utils/device.d.ts +1 -0
- package/utils/enum.d.ts +1 -0
- package/utils/errors.d.ts +1 -0
- package/utils/favicon.d.ts +9 -0
- package/utils/form.d.ts +2 -0
- package/utils/public-api.d.ts +10 -0
- package/utils/validators.d.ts +25 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("rxjs/internal/Subject"),require("rxjs/internal/ReplaySubject"),require("centrifuge"),require("@sentry/browser"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("@mtgame/core",["exports","@angular/core","@angular/common/http","rxjs/operators","rxjs","rxjs/internal/Subject","rxjs/internal/ReplaySubject","centrifuge","@sentry/browser","@angular/forms","@angular/common"],e):e(((t=t||self).mtgame=t.mtgame||{},t.mtgame.core={}),t.ng.core,t.ng.common.http,t.rxjs.operators,t.rxjs,t.rxjs["internal/Subject"],t.rxjs["internal/ReplaySubject"],t.Centrifuge,t.browser,t.ng.forms,t.ng.common)}(this,(function(t,e,n,o,i,r,a,s,u,l,c){"use strict";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function m(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return(f=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function d(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function _(t,e){return function(n,o){e(n,o,t)}}function g(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{u(o.next(t))}catch(t){r(t)}}function s(t){try{u(o.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((o=o.apply(t,e||[])).next())}))}function h(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function v(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}var k=function(){function t(t){var e,n;if(t)try{for(var o=v(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;this[r]=t[r]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}return t.toFront=function(t){},t.toBack=function(t){},t}();function T(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function S(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())).toISOString().slice(0,10):void 0},e}(k),w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){if(t){new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()));return t.toISOString()}},e}(k);function P(t){return function(e){t&&(t.mappingFields&&(e._mapping_fields_=t.mappingFields),t.relation&&(e._relation_=t.relation),e._to_front_=function(t,n){return function t(e,n,o){var i,r;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a=new e,s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=v(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p],f=j(p,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)},e._to_back_=function(t,n){return function t(e,n,o){var i,r;if(!n)return n;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a={},s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=v(Object.keys(s)),c=l.next();!c.done;c=l.next()){var p=c.value,m=s[p];u&&u.hasOwnProperty(m)&&void 0!==n[m]?a[p]=u[m].toBack(n[m]):a[p]=n[m]}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)})}}var B,I=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_front_;if(o)return o(e[0],e.length>1?e[1]:void 0)}}},G=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_back_;if(o)return o(e[0])}}};function j(t,e){var n,o;if(e){var i=t.split(".");if(1===i.length)return t in e?e[t]:void 0;try{for(var r=v(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(!e||!(s in e))return;e=e[s]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return e}}(B=t.FileEngine||(t.FileEngine={}))[B.django=1]="django",B[B.s3=2]="s3";var C,L=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine"},relation:{engine:T(t.FileEngine)}})],e)}();(C=t.SportTypes||(t.SportTypes={}))[C.basketball=1]="basketball",C[C.volleyball=2]="volleyball",C[C.classic_basketball=3]="classic_basketball",C[C.streetball=4]="streetball";var U,A,V=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.isBasketball=function(){return this.id===t.SportTypes.basketball||this.parentId===t.SportTypes.basketball},n.prototype.isClassicBasketball=function(){return this.id===t.SportTypes.classic_basketball},n.prototype.isVolleyball=function(){return this.id===t.SportTypes.volleyball||this.parentId===t.SportTypes.volleyball},n.prototype.isStreetball=function(){return this.id===t.SportTypes.streetball},n.toFront=function(t){return null},n.toBack=function(t){return null},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(k),x=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([I],t,"toFront",null),d([G],t,"toBack",null),t=d([P({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name"}})],e)}(k);(U=t.GameBasketballPosition||(t.GameBasketballPosition={}))[U.point_guard=1]="point_guard",U[U.shooting_guard=2]="shooting_guard",U[U.small_forward=3]="small_forward",U[U.power_forward=4]="power_forward",U[U.center=5]="center",(A=t.WorkHand||(t.WorkHand={}))[A.left=1]="left",A[A.right=2]="right";var E,N,H=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:T(t.GameBasketballPosition),workHand:T(t.WorkHand)}})],n)}(k);(E=t.GameVolleyballPosition||(t.GameVolleyballPosition={}))[E.setter=1]="setter",E[E.libero=2]="libero",E[E.middle_player=3]="middle_player",E[E.receiver_attacker=4]="receiver_attacker",E[E.dioganal=5]="dioganal",(N=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[N.left=1]="left",N[N.right=2]="right";var D,R=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:T(t.GameVolleyballPosition),workHand:T(t.VolleyballWorkHand)}})],n)}(k);(D=t.UserGender||(t.UserGender={}))[D.male=1]="male",D[D.female=2]="female";var z,M,q,W,$=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){return null},n.toBack=function(t){return null},Object.defineProperty(n.prototype,"fullName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"age",{get:function(){if(!this.birthDate)return null;var t=(new Date).getTime()-this.birthDate.getTime();return Math.floor(t/31536e6)},enumerable:!0,configurable:!0}),d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",last_name:"lastName",first_name:"firstName",middle_name:"middleName",email:"email",phone:"phone",birth_date:"birthDate",photo:"photo",profile:"profile",basketball_profile:"basketballProfile",volleyball_profile:"volleyballProfile",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:F,photo:L,profile:x,basketballProfile:H,volleyballProfile:R,city:O,gender:T(t.UserGender)}})],n)}(k),J=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",sport:"sport",logo:"logo",owner:"owner",city:"city",users_count:"usersCount",won_games_count:"wonGamesCount",games_count:"gamesCount",score_sum:"scoreSum",closest_game_datetime:"closestGameDatetime"},relation:{sport:V,logo:L,owner:$,city:O,closestGameDatetime:F}})],e)}(k),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:$}})],e)}(k),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"vkLink",{get:function(){return this.socialLinks.find((function(t){return"https://vk.com/"===t.substr(0,15)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fbLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.facebook.com/"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instaLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.instagram.com"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",logo:"logo",contact_email:"contactEmail",contact_phone:"contactPhone",name:"name",alias:"alias",sport:"sport",description:"description",social_links:"socialLinks",links:"links",organization:"organization",tournaments_count:"tournamentsCount",closest_game_datetime:"closestGameDatetime",cover:"cover"},relation:{organization:X,logo:L,cover:L,sport:V}})],e)}(k);(z=t.TournamentTypes||(t.TournamentTypes={})).group="group",z.elimination="elimination",z.fiba="fiba",(M=t.TournamentStatuses||(t.TournamentStatuses={}))[M.open=0]="open",M[M.in_progress=1]="in_progress",M[M.closed=2]="closed",(q=t.TournamentGender||(t.TournamentGender={}))[q.male=1]="male",q[q.female=2]="female",q[q.all=3]="all",(W=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[W.standard=1]="standard",W[W.light=2]="light",W[W.extended=3]="extended";var Z,K=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",gender:"gender",age_from:"ageFrom",age_to:"ageTo",max_team_players:"maxTeamPlayers",max_game_players:"maxGamePlayers",type:"type",tours_count:"toursCount",periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",game_up_to_score:"gameUpToScore",volleyball_score_in_set:"volleyballScoreInSet",volleyball_score_in_last_set:"volleyballScoreInLastSet",manage_team_application:"manageTeamApplication",recruitment_is_open:"recruitmentIsOpen",transfer_is_open:"transferIsOpen",basketball_statistic_type:"basketballStatisticType"},relation:{type:T(t.TournamentTypes),gender:T(t.TournamentGender),basketballStatisticType:T(t.BasketballStatisticTypes)}})],n)}(k),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:J}})],e)}(k),tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",city:"city",sport:"sport",location:"location",description:"description",date:"date",price:"price",regulation_files:"regulationFiles",settings:"settings",league:"league",teams_count:"teamsCount",closest_game_datetime:"closestGameDatetime",status:"status",team_winner:"teamWinner"},relation:{logo:L,cover:L,city:O,sport:V,regulationFile:L,settings:K,date:w,league:Y,status:T(t.TournamentStatuses),teamWinner:Q}})],n)}(k);(Z=t.OvertimeTypes||(t.OvertimeTypes={}))[Z.to_score_total=0]="to_score_total",Z[Z.to_score_diff=1]="to_score_diff",Z[Z.time=2]="time";var et,nt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",game_up_to_score:"gameUpToScore",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",statistic_type:"statisticType"},relation:{overtimeType:T(t.OvertimeTypes),statisticType:T(t.BasketballStatisticTypes)}})],n)}(k);(et=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[et.best_of_five=1]="best_of_five",et[et.best_of_three=2]="best_of_three";var ot,it,rt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"setsCount",{get:function(){return this.gameType===t.VolleyballGameTypes.best_of_three?3:5},enumerable:!0,configurable:!0}),n.prototype.getSetMaxScore=function(t){return t===this.setsCount?this.scoreInLastSet:this.scoreInSet},n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",score_in_set:"scoreInSet",score_in_last_set:"scoreInLastSet"},relation:{gameType:T(t.VolleyballGameTypes)}})],n)}(k),at=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(k),st=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isVideo",{get:function(){return Boolean(this.videoUrl)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",original_photo:"originalPhoto",list_photo:"listPhoto",detail_photo:"detailPhoto",game:"game",tournament:"tournament",game_id:"gameId",tournament_id:"tournament_id",video_url:"videoUrl",video_preview:"videoPreview"},relation:{originalPhoto:L,listPhoto:L,detailPhoto:L,videoPreview:L}})],e)}(k);(ot=t.GameStatuses||(t.GameStatuses={}))[ot.open=1]="open",ot[ot.in_progress=2]="in_progress",ot[ot.closed=3]="closed",ot[ot.archived=4]="archived",ot[ot.draft=5]="draft",(it=t.GameResultTypes||(t.GameResultTypes={}))[it.team_won=1]="team_won",it[it.competitor_team_won=2]="competitor_team_won",it[it.team_technical_defeat=3]="team_technical_defeat",it[it.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var ut,lt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"scoreByPeriodList",{get:function(){var t=this;return this.scoreByPeriod?Object.keys(this.scoreByPeriod).map((function(e){return{period:+e,teamScore:t.scoreByPeriod[e][0],competitorTeamScore:t.scoreByPeriod[e][1]}})):[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.status===t.GameStatuses.closed},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTeamWon",{get:function(){return this.teamScore>this.competitorTeamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCompetitorTeamWon",{get:function(){return this.competitorTeamScore>this.teamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"teamWinnerId",{get:function(){return this.status!==t.GameStatuses.closed||this.teamScore===this.competitorTeamScore?null:this.team.id?this.teamScore>this.competitorTeamScore?this.team.id:this.competitorTeam.id:this.teamScore>this.competitorTeamScore?this.teamId:this.competitorTeamId},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",status:"status",team:"team",team_id:"teamId",competitor_team:"competitorTeam",competitor_team_id:"competitorTeamId",competitor_team_name:"competitorTeamName",datetime:"datetime",location:"location",team_score:"teamScore",competitor_team_score:"competitorTeamScore",result_type:"resultType",playoff_number:"playoffNumber",tournament_id:"tournamentId",tournament_tour:"tournamentTour",basketball_game_config:"basketballGameConfig",volleyball_game_config:"volleyballGameConfig",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media:"media"},relation:{status:T(t.GameStatuses),team:J,competitorTeam:J,datetime:w,resultType:T(t.GameResultTypes),basketballGameConfig:nt,volleyballGameConfig:rt,tournamentCourt:at,media:S(st)}})],n)}(k);(ut=t.TeamUserRole||(t.TeamUserRole={}))[ut.member=1]="member",ut[ut.moderator=2]="moderator",ut[ut.admin=3]="admin";var ct=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:$,team:J,role:T(t.TeamUserRole)}})],n)}(k),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(k),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",tournament:"tournament",team:"team",group:"group",games_count:"gamesCount",won_games_count:"wonGamesCount",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",score_sum:"scoreSum",missed_sum:"missedSum",score_points_sum:"scorePointsSum",missed_points_sum:"missedPointsSum",points:"points",users_count:"usersCount",games:"games",notifications_count:"notificationsCount"},relation:{tournament:tt,team:J,group:pt,games:lt}})],e)}(k),ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:F,dateTo:F}})],e)}(k),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"fullName",{get:function(){return[this.lastName,this.firstName,this.middleName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",tournament_team:"tournamentTeam",team_user:"teamUser",disqualified:"disqualified",first_name:"firstName",last_name:"lastName",middle_name:"middleName",photo:"photo",disqualification:"disqualification",has_changes:"hasChanges"},relation:{tournamentTeam:mt,teamUser:ct,photo:L,disqualification:ft}})],e)}(k),_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",updated_at:"updatedAt"},relation:{teamUser:ct,tournamentTeamUser:dt,updatedAt:w}})],e)}(k);function gt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&kt(o)){if(!o(t))return t}else if(t.id!==e.id)return t;return t.updatedAt&&e.updatedAt&&!n&&t.updatedAt>e.updatedAt?t:e})):t}function ht(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=gt(t,e,n,o)})),t}function vt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return kt(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function yt(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=vt(t,e,n,o)})),t}function bt(t,e){return Array.isArray(t)?kt(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function kt(t){return t&&"[object Function]"==={}.toString.call(t)}var Tt,St=function(){function t(t){this.engine=t,this.data={}}return t.prototype.get=function(t){return this.getSubject(t).pipe(o.filter((function(t){return void 0!==t})))},t.prototype.value=function(t){return this.getSubject(t).value},t.prototype.save=function(t,e){this.getSubject(t).next(e),this.engine&&this.engine.save(t,e)},t.prototype.appendItem=function(t,e,n){this.save(t,vt(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,yt(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,vt(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,yt(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,gt(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,ht(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,bt(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=v(Object.keys(this.data)),o=n.next();!o.done;o=n.next()){var i=o.value;this.data[i].complete(),delete this.data[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.clearStorageData=function(){this.engine&&this.engine.clear()},t.prototype.getEngine=function(){return this.engine},t.prototype.getSubject=function(t){return this.data[t]||(this.data[t]=new i.BehaviorSubject(this.engine?this.engine.get(t):void 0)),this.data[t]},t}(),Ft=function(){function t(){this.store=new St}return t.prototype.dispose=function(){this.store.dispose()},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),wt=function(t){function n(e){var n=t.call(this)||this;return n.configData=e,e&&n.initialize(e),n}return m(n,t),Object.defineProperty(n.prototype,"config$",{get:function(){return this.store.get("config")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"config",{get:function(){return this.store.value("config")||{}},enumerable:!0,configurable:!0}),n.prototype.initialize=function(t){this.store.save("config",t)},n.prototype.set=function(t,e){var n;this.store.save("config",f(f({},this.config),((n={})[t]=e,n)))},n.prototype.get=function(t){return this.store.value("config")&&this.store.value("config")[t]},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:["mtg-core-config-data"]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject("mtg-core-config-data",8))},token:n,providedIn:"root"}),n=d([e.Injectable({providedIn:"root"}),_(0,e.Optional()),_(0,e.Inject("mtg-core-config-data"))],n)}(Ft),Pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"totalFouls",{get:function(){return this.personalFouls+this.technicalFouls+this.unsportsmanlikeFouls},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",free_throws_made:"freeThrowsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",two_point_percent:"twoPointPercent",three_point_percent:"threePointPercent",free_throw_percent:"freeThrowPercent",one_point_percent:"onePointPercent",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",newbie:"newbie"},relation:{tournamentTeamUser:dt,team:J,teamUser:ct,user:$,tournamentTeam:mt,month:F}})],e)}(k),Bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Pt,competitorTeam:Pt}})],e)}(k),It=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"totalFouls",{get:function(){return(this.personalFouls||0)+(this.technicalFouls||0)+(this.unsportsmanlikeFouls||0)},enumerable:!0,configurable:!0}),d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{game_user_id:"gameUserId",points:"points",free_throws_made:"freeThrowsMade",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",updated_at:"updatedAt"},relation:{updatedAt:w}})],e)}(k);(Tt=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[Tt.enter_game=1]="enter_game",Tt[Tt.exit_game=2]="exit_game",Tt[Tt.remove_game=3]="remove_game",Tt[Tt.two_point_made=4]="two_point_made",Tt[Tt.three_point_made=5]="three_point_made",Tt[Tt.free_throw_made=6]="free_throw_made",Tt[Tt.two_point_attempt=7]="two_point_attempt",Tt[Tt.three_point_attempt=8]="three_point_attempt",Tt[Tt.free_throw_attempt=9]="free_throw_attempt",Tt[Tt.assist=10]="assist",Tt[Tt.block=11]="block",Tt[Tt.rebound=12]="rebound",Tt[Tt.offensive_rebound=13]="offensive_rebound",Tt[Tt.defensive_rebound=14]="defensive_rebound",Tt[Tt.steal=15]="steal",Tt[Tt.turnover=16]="turnover",Tt[Tt.personal_foul=17]="personal_foul",Tt[Tt.technical_foul=18]="technical_foul",Tt[Tt.unsportsmanlike_foul=19]="unsportsmanlike_foul",Tt[Tt.one_point_attempt=20]="one_point_attempt",Tt[Tt.one_point_made=21]="one_point_made",Tt[Tt.timeout=22]="timeout";var Gt,jt=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.isPointsType=function(){return[t.BasketballGameLogTypes.two_point_made,t.BasketballGameLogTypes.three_point_made,t.BasketballGameLogTypes.free_throw_made,t.BasketballGameLogTypes.one_point_made].indexOf(this.logType)>-1},n.prototype.isReboundType=function(){return[t.BasketballGameLogTypes.rebound,t.BasketballGameLogTypes.offensive_rebound,t.BasketballGameLogTypes.defensive_rebound].indexOf(this.logType)>-1},n.prototype.isFoulType=function(){return[t.BasketballGameLogTypes.personal_foul,t.BasketballGameLogTypes.technical_foul,t.BasketballGameLogTypes.unsportsmanlike_foul].indexOf(this.logType)>-1},n.prototype.getScore=function(){var e;return((e={})[t.BasketballGameLogTypes.one_point_made]=1,e[t.BasketballGameLogTypes.free_throw_made]=1,e[t.BasketballGameLogTypes.two_point_made]=2,e[t.BasketballGameLogTypes.three_point_made]=3,e)[this.logType]},n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight"},relation:{datetime:w,logType:T(t.BasketballGameLogTypes)}})],n)}(k),Ct=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return _t.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return Bt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return It.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/logs/").pipe(o.map((function(t){return jt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();(Gt=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Gt.game_closed=1]="game_closed",Gt[Gt.media_added=2]="media_added";var Lt,Ut=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",game:"game",tournament:"tournament",event:"event",datetime:"datetime"},relation:{game:lt,tournament:tt,datetime:F,event:T(t.TournamentEventTypes)}})],n)}(k),At=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(o.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ut.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Vt=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getMedia=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return st.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(o.map((function(t){return st.toFront(t)}))).toPromise()]}))}))},i.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();(Lt=t.PollStatuses||(t.PollStatuses={}))[Lt.open=1]="open",Lt[Lt.closed=2]="closed",Lt[Lt.archived=3]="archived";var xt,Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{uuid:"uuid",name:"name"}})],e)}(k),Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:$}})],e)}(k),Nt=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.variantsWithAnswers=[],t}return m(n,e),Object.defineProperty(n.prototype,"variants",{get:function(){return this._variants},set:function(t){this._variants=t||[],this._answers&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"answers",{get:function(){return this._answers},set:function(t){this._answers=t||[],this._variants&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),n.prototype.calculateAnswersPercentage=function(){var t=this;if(this._answers.length){var e=this._variants.map((function(t){return t.uuid})),n=this._answers.reduce((function(t,n){return e.indexOf(n.answerUuid)<0||(t[n.answerUuid]||(t[n.answerUuid]=0),t[n.answerUuid]++),t}),{});this.variantsWithAnswers=this._variants.map((function(e){return{variant:e,percent:n[e.uuid]?Math.round(100*n[e.uuid]/t._answers.length):0}})).sort((function(t,e){return t.percent>e.percent?-1:1}))}},n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",active:"active",status:"status",team_id:"teamId",name:"name",description:"description",variants:"variants",author:"author",answers:"answers",multiple_answer:"multipleAnswer",anonymous:"anonymous",created_at:"createdAt"},relation:{status:T(t.PollStatuses),variants:Ot,author:$,answers:Et,createdAt:w}})],n)}(k),Ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",user_id:"userId",user:"user",team:"team",team_id:"teamId",user_accept:"userAccept",team_accept:"teamAccept",users_count:"usersCount",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",created_at:"createdAt",updated_at:"updatedAt"},relation:{user:$,team:J,createdAt:w,updateAt:w}})],e)}(k);(xt=t.GameInviteStatus||(t.GameInviteStatus={}))[xt.accepted=1]="accepted",xt[xt.declined=2]="declined";var Dt,Rt,zt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:lt,teamUser:ct,status:T(t.GameInviteStatus)}})],n)}(k);(Dt=t.TeamEventTypes||(t.TeamEventTypes={}))[Dt.training=1]="training",Dt[Dt.other=2]="other";var Mt,qt=((Rt={})[t.TeamEventTypes.training]="Тренировка",Rt[t.TeamEventTypes.other]="Другое",Rt),Wt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this.eventType===t.TeamEventTypes.other?this.eventCustomName:qt[this.eventType]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.datetime.getTime()<(new Date).getTime()},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:T(t.TeamEventTypes),team:J,datetime:w}})],n)}(k);(Mt=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[Mt.accepted=1]="accepted",Mt[Mt.declined=2]="declined";var $t,Jt,Xt=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:T(t.TeamEventInviteStatuses)}})],e)}(),Yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:ct}})],e)}(k),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return(null===this.teamAccept||null===this.organizationAccept)&&!1!==this.teamAccept&&!1!==this.organizationAccept},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team:"team",tournament:"tournament",team_accept:"teamAccept",organization_accept:"organizationAccept",user_invites_count:"userInvitesCount",user_invites:"userInvites",notifications_count:"notificationsCount"},relation:{team:J,tournament:tt,userInvites:Yt}})],e)}(k);($t=t.NotificationType||(t.NotificationType={}))[$t.team_updated=1]="team_updated",$t[$t.team_invited=2]="team_invited",$t[$t.team_join_request=3]="team_join_request",$t[$t.team_join_declined_by_team=4]="team_join_declined_by_team",$t[$t.team_join_declined_by_user=5]="team_join_declined_by_user",$t[$t.team_join_canceled_by_team=6]="team_join_canceled_by_team",$t[$t.team_join_canceled_by_user=7]="team_join_canceled_by_user",$t[$t.team_joined_for_user=8]="team_joined_for_user",$t[$t.team_joined_for_team=9]="team_joined_for_team",$t[$t.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",$t[$t.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",$t[$t.team_user_number_changed=12]="team_user_number_changed",$t[$t.team_user_deleted_for_user=13]="team_user_deleted_for_user",$t[$t.team_user_deleted_for_team=14]="team_user_deleted_for_team",$t[$t.team_user_left=15]="team_user_left",$t[$t.game_updated=16]="game_updated",$t[$t.game_invited=17]="game_invited",$t[$t.game_invite_accepted=18]="game_invite_accepted",$t[$t.game_invite_declined=19]="game_invite_declined",$t[$t.game_remind=20]="game_remind",$t[$t.game_won=21]="game_won",$t[$t.game_losing=22]="game_losing",$t[$t.game_tech_defeat=23]="game_tech_defeat",$t[$t.game_tech_victory=24]="game_tech_victory",$t[$t.poll_created=25]="poll_created",$t[$t.poll_closed=26]="poll_closed",$t[$t.team_event_invited=27]="team_event_invited",$t[$t.team_event_accepted=28]="team_event_accepted",$t[$t.team_event_declined=29]="team_event_declined",$t[$t.team_event_remind=30]="team_event_remind",$t[$t.tournament_invited=31]="tournament_invited",$t[$t.tournament_joined=32]="tournament_joined",$t[$t.tournament_join_declined=33]="tournament_join_declined",$t[$t.tournament_join_canceled=34]="tournament_join_canceled",$t[$t.tournament_user_invited=35]="tournament_user_invited",$t[$t.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",$t[$t.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",$t[$t.tournament_user_added=38]="tournament_user_added",$t[$t.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",$t[$t.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",$t[$t.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",$t[$t.tournament_user_deleted=42]="tournament_user_deleted",$t[$t.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",$t[$t.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",$t[$t.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",$t[$t.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",$t[$t.tournament_team_deleted=47]="tournament_team_deleted",$t[$t.org_tournament_invite_created=48]="org_tournament_invite_created",$t[$t.org_tournament_invite_declined=49]="org_tournament_invite_declined",$t[$t.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",$t[$t.org_tournament_invite_changed=51]="org_tournament_invite_changed",$t[$t.org_tournament_user_deleted=52]="org_tournament_user_deleted",$t[$t.org_tournament_user_invited=53]="org_tournament_user_invited",$t[$t.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",$t[$t.org_tournament_team_leave=55]="org_tournament_team_leave",(Jt=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[Jt.public=1]="public",Jt[Jt.org=2]="org";var Kt,Qt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"important",{get:function(){return!0},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",event_type:"event",data:"data",initiator:"initiator",team:"team",team_invite:"teamInvite",team_user:"teamUser",poll:"poll",game:"game",game_invite:"gameInvite",team_event:"teamEvent",team_event_invite:"teamEventInvite",tournament:"tournament",tournament_invite:"tournamentInvite",tournament_team:"tournamentTeam",viewed:"viewed",protected:"protected",service:"service",created_at:"createdAt"},relation:{event:T(t.NotificationType),initiator:$,team:J,teamInvite:Ht,teamUser:ct,poll:Nt,game:lt,gameInvite:zt,teamEvent:Wt,teamEventInvite:Xt,tournament:tt,tournamentInvite:Zt,tournamentTeam:mt,service:T(t.NotificationServiceEnum),createdAt:w}})],n)}(k);(Kt=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[Kt.all=1]="all",Kt[Kt.important=2]="important",Kt[Kt.none=3]="none";var te,ee=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:T(t.NotificationAllowTypes),browser:T(t.NotificationAllowTypes)}})],n)}(k),ne=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCount=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/count/").pipe(o.map((function(t){return+t}))).toPromise()]}))}))},t.prototype.getList=function(t,e,i){return void 0===i&&(i={}),g(this,void 0,void 0,(function(){var r,a,s,u,l,c;return h(this,(function(p){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=v(Object.keys(i)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,i[u])}catch(t){l={error:t}}finally{try{s&&!s.done&&(c=a.return)&&c.call(a)}finally{if(l)throw l.error}}return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/",{params:r,observe:"response"}).pipe(o.map((function(t){var e=Qt.toFront(t.body);return{total:+t.headers.get("x-page-count"),data:e}}))).toPromise()]}))}))},t.prototype.markViewed=function(t,e){return g(this,void 0,void 0,(function(){return h(this,(function(n){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/"+t+"/viewed/",{viewed:e}).pipe(o.map((function(t){return Qt.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Qt.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return ee.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",ee.toBack(t)).pipe(o.map((function(t){return ee.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),oe=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(ne),ie=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/org/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(ne),re=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCities=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return h(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:L,author:$,createdAt:w}})],e)}(k),se=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([I],t,"toFront",null),d([G],t,"toBack",null),t=d([P({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:S(se)}})],e)}(k);(te=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[te.open=0]="open",te[te.in_progress=1]="in_progress",te[te.closed=2]="closed";var le=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:F,status:T(t.TournamentStageStatuses)}})],n)}(k);function ce(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}var pe,me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount"}})],e)}(k),fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stages=[],e}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"stagesCount",{get:function(){return Math.log(this.settings.teamsCount)/Math.log(2)},enumerable:!0,configurable:!0}),e.prototype.getPlayoffStages=function(){var t=this;if(0===this.stages.length&&this.settings.teamsCount){var e=Math.log(this.settings.teamsCount)/Math.log(2);this.stages=ce(e).map((function(e){var n=t.settings.teamsCount/Math.pow(2,e);return{value:e,title:1===n?"Финал":"1 / "+n}}))}return this.stages},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:me}})],e)}(k),de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",tournament_team:"tournamentTeam",user:"user",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",serve_percent:"servePercent",ace_percent:"acePercent",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",block_percent:"blockPercent",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",attack_percent:"attackPercent",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",receive_percent:"receivePercent",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",serve_receive_percent:"serveReceivePercent",points:"points",faults:"faults",newbie:"newbie"},relation:{team:J,teamUser:ct,tournamentTeamUser:dt,tournamentTeam:mt,user:$,month:F}})],e)}(k),_e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",tournament_team:"tournamentTeam",group:"group",tournament_stage_id:"tournamentStageId",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",missed_sum:"missedSum",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",points:"points",final_standing:"finalStanding",received_points:"receivedPoints"},relation:{tournamentTeam:mt,group:pt}})],e)}(k),ge=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return h(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ut.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return fe.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return ue.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return void 0===a&&(a={}),g(this,void 0,void 0,(function(){var s;return h(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:lt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(o.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return _e.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return mt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return dt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/games/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return h(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return h(this,(function(l){if(e=new n.HttpParams,t){try{for(i=v(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),he=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"usersCount",{get:function(){return this.validUsersCount+this.invalidUsersCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.hasAccess&&!this.inviteSent&&!this.alreadyInTournament},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(k),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",join_data:"joinData"},relation:{team:J,joinData:he}})],e)}(k),ye=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamsForJoin=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams_for_join/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return ct.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return h(this,(function(r){return i={team:{id:e},user_invites:Yt.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),be=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return pt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return fe.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return _e.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:de,competitorTeam:de}})],e)}(k),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attacks",{get:function(){return this.attackSpikes+this.attackShots},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blocks",{get:function(){return this.stuffBlocks+this.blockRebounds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalReceives",{get:function(){return this.receives+this.excellentReceives},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{game_user_id:"gameUserId",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",points:"points",faults:"faults"}})],e)}(k);(pe=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[pe.enter_game=1]="enter_game",pe[pe.exit_game=2]="exit_game",pe[pe.remove_game=3]="remove_game",pe[pe.serve_hit=4]="serve_hit",pe[pe.serve_fault=5]="serve_fault",pe[pe.serve_ace=6]="serve_ace",pe[pe.stuff_block=7]="stuff_block",pe[pe.block_fault=8]="block_fault",pe[pe.block_rebound=9]="block_rebound",pe[pe.attack_spike=10]="attack_spike",pe[pe.attack_fault=11]="attack_fault",pe[pe.attack_shot=12]="attack_shot",pe[pe.receive=13]="receive",pe[pe.receive_fault=14]="receive_fault",pe[pe.excellent_receive=15]="excellent_receive",pe[pe.point=16]="point",pe[pe.fault=17]="fault",pe[pe.serve_receive=18]="serve_receive",pe[pe.serve_receive_fault=19]="serve_receive_fault",pe[pe.excellent_serve_receive=20]="excellent_serve_receive",pe[pe.timeout=21]="timeout";var Se,Fe,we,Pe,Be,Ie,Ge,je,Ce,Le,Ue,Ae=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],Ve=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],xe=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.rally===t.rally&&this.set===t.set?this.datetime&&t.datetime?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.id<t.id?1:-1:this.set===t.set?this.rally<t.rally?1:-1:this.set<t.set?1:-1},n.prototype.isScoreType=function(){return Ae.includes(this.logType)},n.prototype.isFaultType=function(){return Ve.includes(this.logType)},n.prototype.isServe=function(){return[t.VolleyballGameLogType.serve_hit,t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.serve_fault].includes(this.logType)},n.prototype.isAttack=function(){return[t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.attack_shot].includes(this.logType)},n.prototype.isReceive=function(){return[t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.receive,t.VolleyballGameLogType.excellent_receive].includes(this.logType)},n.prototype.isServeReceive=function(){return[t.VolleyballGameLogType.serve_receive_fault,t.VolleyballGameLogType.serve_receive,t.VolleyballGameLogType.excellent_serve_receive].includes(this.logType)},n.prototype.isBlock=function(){return[t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.block_rebound,t.VolleyballGameLogType.stuff_block].includes(this.logType)},n.prototype.isEnterExit=function(){return[t.VolleyballGameLogType.enter_game,t.VolleyballGameLogType.exit_game,t.VolleyballGameLogType.timeout].includes(this.logType)},n.prototype.isComboType=function(){return![t.VolleyballGameLogType.receive,t.VolleyballGameLogType.serve_receive].includes(this.logType)},n.toFront=function(t){},n.toBack=function(t){},d([I],n,"toFront",null),d([G],n,"toBack",null),n=d([P({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",log_type:"logType",set:"set",rally:"rally",position:"position",team_id:"teamId",datetime:"datetime"},relation:{logType:T(t.VolleyballGameLogType),datetime:w}})],n)}(k),Oe=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return _t.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return ke.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return h(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/logs/").pipe(o.map((function(t){return xe.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ee=((Se={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",Se[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",Se[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",Se[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",Se[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",Se[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",Se[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",Se[t.BasketballGameLogTypes.two_point_made]="2 очка",Se[t.BasketballGameLogTypes.three_point_made]="3 очка",Se[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",Se[t.BasketballGameLogTypes.one_point_made]="1 очко",Se[t.BasketballGameLogTypes.assist]="Передача",Se[t.BasketballGameLogTypes.block]="Блокшот",Se[t.BasketballGameLogTypes.rebound]="Подбор",Se[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",Se[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",Se[t.BasketballGameLogTypes.steal]="Перехват",Se[t.BasketballGameLogTypes.turnover]="Потеря",Se[t.BasketballGameLogTypes.personal_foul]="Фол",Se[t.BasketballGameLogTypes.technical_foul]="Технический фол",Se[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",Se[t.BasketballGameLogTypes.timeout]="Таймаут",Se),Ne=((Fe={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",Fe[t.OvertimeTypes.to_score_total]="До N очков",Fe[t.OvertimeTypes.time]="По времени",Fe),He=((we={})[t.TeamUserRole.moderator]="Модератор",we[t.TeamUserRole.member]="Пользователь",we[t.TeamUserRole.admin]="Владелец",we),De=((Pe={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",Pe[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",Pe[t.GameBasketballPosition.small_forward]="Легкий форвард",Pe[t.GameBasketballPosition.power_forward]="Мощный форвард",Pe[t.GameBasketballPosition.center]="Центровой",Pe),Re=((Be={})[t.GameBasketballPosition.point_guard]="PG",Be[t.GameBasketballPosition.shooting_guard]="SG",Be[t.GameBasketballPosition.small_forward]="SF",Be[t.GameBasketballPosition.power_forward]="PF",Be[t.GameBasketballPosition.center]="C",Be),ze=((Ie={})[t.WorkHand.left]="Левая",Ie[t.WorkHand.right]="Правая",Ie),Me=((Ge={})[t.GameVolleyballPosition.setter]="Связующий",Ge[t.GameVolleyballPosition.libero]="Либеро",Ge[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",Ge[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",Ge[t.GameVolleyballPosition.dioganal]="Диагональный",Ge),qe=((je={})[t.GameVolleyballPosition.setter]="S",je[t.GameVolleyballPosition.libero]="L",je[t.GameVolleyballPosition.middle_player]="MP",je[t.GameVolleyballPosition.receiver_attacker]="RA",je[t.GameVolleyballPosition.dioganal]="D",je),We=((Ce={})[t.GameVolleyballPosition.setter]="связ.",Ce[t.GameVolleyballPosition.libero]="либеро",Ce[t.GameVolleyballPosition.middle_player]="блок.",Ce[t.GameVolleyballPosition.receiver_attacker]="доигр.",Ce[t.GameVolleyballPosition.dioganal]="диаг.",Ce),$e=((Le={})[t.VolleyballWorkHand.left]="Левая",Le[t.VolleyballWorkHand.right]="Правая",Le),Je=((Ue={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",Ue[t.VolleyballGameLogType.exit_game]="Уход с площадки",Ue[t.VolleyballGameLogType.remove_game]="Удаление с площадки",Ue[t.VolleyballGameLogType.serve_ace]="Эйс",Ue[t.VolleyballGameLogType.serve_hit]="Подача",Ue[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",Ue[t.VolleyballGameLogType.attack_spike]="Результативная атака",Ue[t.VolleyballGameLogType.attack_shot]="Успешная атака",Ue[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",Ue[t.VolleyballGameLogType.stuff_block]="Результативный блок",Ue[t.VolleyballGameLogType.block_rebound]="Успешный блок",Ue[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",Ue[t.VolleyballGameLogType.excellent_receive]="Отличный прием",Ue[t.VolleyballGameLogType.receive]="Прием",Ue[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",Ue[t.VolleyballGameLogType.serve_receive]="Прием подачи",Ue[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",Ue[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",Ue[t.VolleyballGameLogType.point]="Очко",Ue[t.VolleyballGameLogType.fault]="Ошибка",Ue[t.VolleyballGameLogType.timeout]="Таймаут",Ue),Xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([I],e,"toFront",null),d([G],e,"toBack",null),e=d([P({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(k),Ye=function(){function t(t,e){this.httpClient=t,this.configService=e,this.channels$={},this.subscriptions={}}return t.prototype.listen=function(t){var e=this;if(t in this.channels$)return this.channels$[t];this.channels$[t]=new r.Subject;var n=this.connect().subscribe((function(o){e.subscriptions[t]=e.addEngineSubscription(t),setTimeout((function(){n.unsubscribe()}))}));return this.channels$[t]},t.prototype.unsubscribe=function(t){this.subscriptions[t]&&(this.subscriptions[t].unsubscribe(),delete this.subscriptions[t]),this.channels$[t]&&(this.channels$[t].complete(),delete this.channels$[t])},t.prototype.connect=function(){var t=this;return this.initializeEngineSubject||(this.initializeEngineSubject=new a.ReplaySubject(1),this.httpClient.get("/api/v1/centrifugo/").subscribe((function(e){t.initializeEngine({url:t.configService.get("centrifugoUrl"),user:e.user,timestamp:e.timestamp,token:e.token,transports:["websocket"]}),t.centrifuge.connect(),t.centrifuge.on("connect",(function(){t.initializeEngineSubject.next(!0)}))}))),this.initializeEngineSubject},t.prototype.publish=function(t,e){var n=this;return new i.Observable((function(o){n.connect().subscribe((function(){n.subscriptions[t]||(n.subscriptions[t]=n.addEngineSubscription(t)),n.subscriptions[t].publish(e).then((function(t){o.next(t),o.complete()}),(function(t){throw t}))}))}))},t.prototype.disconnect=function(){this.centrifuge.disconnect(),this.initializeEngineSubject=void 0,this.channels$={},this.subscriptions={}},t.prototype.initializeEngine=function(t){console.log(t),this.centrifuge=new s(t)},t.prototype.addEngineSubscription=function(t){return this.centrifuge.subscribe(t,this.resolveMessage.bind(this))},t.prototype.resolveMessage=function(t){var e=t.channel;this.channels$[e]&&this.channels$[e].next(t.data)},t.ctorParameters=function(){return[{type:n.HttpClient},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ze=function(){function t(t,e){this.modelClass=e,this.defaultValue=t}return t.prototype.toFront=function(t){return this.modelClass?this.modelClass.toFront(t):t},t.prototype.toBack=function(t){return this.modelClass?this.modelClass.toBack(t):t},t}(),Ke=function(){function t(t,e){this.name=t,this.fields=e}return t.prototype.addField=function(t,e){this.fields[t]=e},t.prototype.save=function(t,e){this.fields[t]&&this.setItem(this.name+"_"+t,this.fields[t].toBack(e))},t.prototype.get=function(t){if(this.fields[t]){var e=this.getItem(this.name+"_"+t);return null===e&&(e=this.fields[t].defaultValue),null==e?e:this.fields[t].toFront(e)}},t.prototype.clear=function(){var t,e;try{for(var n=v(Object.keys(this.fields)),o=n.next();!o.done;o=n.next()){var i=o.value;this.removeItem(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.getItem=function(t){throw new Error("Function getItem for store engine "+typeof this+" not implemented")},t.prototype.setItem=function(t,e){throw new Error("Function setItem for store engine "+typeof this+" not implemented")},t.prototype.removeItem=function(t){throw new Error("Function deleteItem for store engine "+typeof this+" not implemented")},t}(),Qe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.setItem=function(t,e){localStorage.setItem(t,JSON.stringify(e))},e.prototype.getItem=function(t){try{return JSON.parse(localStorage.getItem(t))}catch(t){return}},e.prototype.removeItem=function(t){localStorage.removeItem(t)},e}(Ke);function tn(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function en(t){return[{rel:"apple-touch-icon",sizes:"180x180",href:"/assets/favicon/"+t+"apple-touch-icon.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/assets/favicon/"+t+"favicon-32x32.png"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/assets/favicon/"+t+"favicon-16x16.png"},{rel:"shortcut icon",href:"/assets/favicon/"+t+"favicon.ico"},{rel:"manifest",href:"/assets/favicon/"+t+"site.webmanifest"},{rel:"mask-icon",href:"/assets/favicon/"+t+"safari-pinned-tab.svg",color:"#ff0000"}]}var nn=function(){function t(t,e){this.injector=t,this.platformId=e,this.isBrowser=c.isPlatformBrowser(this.platformId)}return t.prototype.intercept=function(t,e){if(!this.isBrowser)return e.handle(t);t=t.clone({withCredentials:!0});var n=tn("csrftoken");return n&&(t=t.clone({setHeaders:{"X-CSRFToken":n}})),e.handle(t)},t.ctorParameters=function(){return[{type:e.Injector},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t=d([e.Injectable(),_(1,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=k,t.BaseService=Ft,t.BasketballGameApi=Ct,t.BasketballGameConfig=nt,t.BasketballGameLog=jt,t.BasketballGameLogTypeLocalization=Ee,t.BasketballGameStatistic=It,t.BasketballGameTeamStatistic=Bt,t.BasketballProfile=H,t.BasketballStatistic=Pt,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=Ye,t.City=O,t.ConfigService=wt,t.DateField=F,t.DateTimeField=w,t.FAULT_LOG_TYPES=Ve,t.File=L,t.Game=lt,t.GameBasketballPositionLocalization=De,t.GameBasketballPositionShortLocalization=Re,t.GameInvite=zt,t.GameTimelineStageItem=se,t.GameTimelineStages=ue,t.GameUser=_t,t.GameVolleyballPositionLocalization=Me,t.GameVolleyballPositionShortLocalization=qe,t.GameVolleyballPositionShortRuLocalization=We,t.HttpCookieInterceptor=nn,t.League=Y,t.LeagueApi=At,t.LeagueCourt=at,t.LocalStorageEngine=Qe,t.MediaApi=Vt,t.MediaItem=st,t.ModelInstance=P,t.Notification=Qt,t.NotificationApi=oe,t.NotificationBaseApi=ne,t.NotificationSettings=ee,t.OrgNotificationApi=ie,t.Organization=X,t.OvertimeTypeLocalization=Ne,t.Playoff=fe,t.PlayoffSettings=me,t.Poll=Nt,t.PollAnswer=Et,t.PollVariant=Ot,t.ReferenceApi=re,t.SCORE_LOG_TYPES=Ae,t.Sport=V,t.StorageEngine=Ke,t.StorageEngineField=Ze,t.Store=St,t.Team=J,t.TeamEvent=Wt,t.TeamEventInvite=Xt,t.TeamEventTypeLocalization=qt,t.TeamInvite=Ht,t.TeamInviteExternal=Xe,t.TeamUser=ct,t.TeamUserRoleLocalization=He,t.ToBackHook=G,t.ToFrontHook=I,t.Tournament=tt,t.TournamentApi=ge,t.TournamentDisqualification=ft,t.TournamentEvent=Ut,t.TournamentGroup=pt,t.TournamentInvite=Zt,t.TournamentJoinApi=ye,t.TournamentJoinData=he,t.TournamentJoinTeam=ve,t.TournamentNews=ae,t.TournamentSettings=K,t.TournamentStage=le,t.TournamentStageApi=be,t.TournamentStageTeam=_e,t.TournamentTeam=mt,t.TournamentTeamUser=dt,t.TournamentTeamUserInvite=Yt,t.TournamentTeamWinner=Q,t.UntilDestroy=function(t){var e,n=(e=t).ɵcmp||e.ɵdir,o=n.onDestroy;t.__componentDestroyed$=new r.Subject,n.onDestroy=function(){t.__componentDestroyed$.next(),t.__componentDestroyed$.complete(),o.apply(this)}},t.User=$,t.UserProfile=x,t.VolleyballGameApi=Oe,t.VolleyballGameConfig=rt,t.VolleyballGameLog=xe,t.VolleyballGameLogTypeLocalization=Je,t.VolleyballGameStatistic=Te,t.VolleyballGameTeamStatistic=ke,t.VolleyballProfile=R,t.VolleyballStatistic=de,t.VolleyballWorkHandLocalization=$e,t.WorkHandLocalization=ze,t.addItemInArray=vt,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=en(a);try{for(var u=v(s),l=u.next();!l.done;l=u.next()){var c=l.value,p=t.createElement("link");try{for(var m=(i=void 0,v(Object.keys(c))),f=m.next();!f.done;f=m.next()){var d=f.value;p.setAttribute(d,c[d])}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(i)throw i.error}}t.head.appendChild(p)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}},t.componentDestroyed=function(t){if(t.constructor.__componentDestroyed$)return t.constructor.__componentDestroyed$;throw new Error("Use @UntilDestroy decorator in class")},t.deleteItemFromArray=bt,t.enumField=T,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=ce,t.getArrayChunks=function(t,e){var n=[],o=Math.ceil(t.length/e);if(0===o)return[t];for(var i=0;i<o;i++)n.push(t.slice(i*e,(i+1)*e));return n},t.getCookie=tn,t.getEnumOptions=function(t){return Object.keys(t).map((function(e){return t[e]})).filter((function(t){return!1===isNaN(+t)})).map((function(t){return+t}))},t.getIconsData=en,t.handleError=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),(!t||0!==t.status&&404!==t.status||e&&0!==t.status)&&u.captureException(t),n||console.error(t)},t.isTouchDevice=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)return!0;var e,n=["(",t.join("touch-enabled),("),"heartz",")"].join("");return e=n,window.matchMedia(e).matches},t.listField=S,t.markFormGroupTouched=function t(e){Object.values(e.controls).forEach((function(e){e.markAsTouched(),e.markAsDirty(),e instanceof l.FormGroup?t(e):e.controls&&e.controls.forEach((function(e){e instanceof l.FormGroup?t(e):(e.markAsTouched(),e.markAsDirty())}))}))},t.minLengthArrayValidator=function(t){return function(e){return e.value.length<t?{minLengthArray:{valid:!1}}:null}},t.patchItemInArray=function(t,e,n){return Array.isArray(t)?t.map((function(t){if(n&&kt(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=gt,t.updateItemsInArray=ht,t.validateDate=function(t){return!t.value||/\d{2}\.\d{2}\.\d{4}/gi.test(t.value)?null:{invalidDate:{valid:!1}}},t.validateEmail=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=[]);var r=i.of(null).pipe(o.delay(500));return function(a){return n.indexOf(a.value)>-1?i.of(null):r.pipe(o.switchMap((function(){return t.checkEmail(a.value,e).pipe(o.map((function(t){return t?null:{emailTaken:!0}})))})))}},t.validatePhone=function(t){return t.value?11===(""+t.value).replace(/\D/gi,"").length?null:{invalidPhone:{valid:!1}}:null},t.validateUrl=function(t){return!t.value||/^(?:http(s)?:\/\/)[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(t.value)?null:{invalidUrl:!0}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
+
//# sourceMappingURL=mtgame-core.umd.min.js.map
|