PageSourceSearch

https://eac.champaignschools.org/erp/EmployeeAccessCenter/Web/dist/powerschool-design-system-toolkit.js

js champaignschools.org collected 2026-09-27 20:59:02 UTC 1,106,003 bytes, 26,882 lines download raw bytes

vendor: 4,583 bytes, lines 1-109
1window["PowerSchoolDesignSystemToolkitModule"] =
2/******/ (function(modules) { // webpackBootstrap
3/******/ 	// The module cache
4/******/ 	var installedModules = {};
5/******/
6/******/ 	// The require function
7/******/ 	function __webpack_require__(moduleId) {
8/******/
9/******/ 		// Check if module is in cache
10/******/ 		if(installedModules[moduleId]) {
11/******/ 			return installedModules[moduleId].exports;
12/******/ 		}
13/******/ 		// Create a new module (and put it into the cache)
14/******/ 		var module = installedModules[moduleId] = {
15/******/ 			i: moduleId,
16/******/ 			l: false,
17/******/ 			exports: {}
18/******/ 		};
19/******/
20/******/ 		// Execute the module function
21/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22/******/
23/******/ 		// Flag the module as loaded
24/******/ 		module.l = true;
25/******/
26/******/ 		// Return the exports of the module
27/******/ 		return module.exports;
28/******/ 	}
29/******/
30/******/
31/******/ 	// expose the modules object (__webpack_modules__)
32/******/ 	__webpack_require__.m = modules;
33/******/
34/******/ 	// expose the module cache
35/******/ 	__webpack_require__.c = installedModules;
36/******/
37/******/ 	// define getter function for harmony exports
38/******/ 	__webpack_require__.d = function(exports, name, getter) {
39/******/ 		if(!__webpack_require__.o(exports, name)) {
40/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
41/******/ 		}
42/******/ 	};
43/******/
44/******/ 	// define __esModule on exports
45/******/ 	__webpack_require__.r = function(exports) {
46/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48/******/ 		}
49/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
50/******/ 	};
51/******/
52/******/ 	// create a fake namespace object
53/******/ 	// mode & 1: value is a module id, require it
54/******/ 	// mode & 2: merge all properties of value into the ns
55/******/ 	// mode & 4: return value when already ns object
56/******/ 	// mode & 8|1: behave like require
57/******/ 	__webpack_require__.t = function(value, mode) {
58/******/ 		if(mode & 1) value = __webpack_require__(value);
59/******/ 		if(mode & 8) return value;
60/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61/******/ 		var ns = Object.create(null);
62/******/ 		__webpack_require__.r(ns);
63/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65/******/ 		return ns;
66/******/ 	};
67/******/
68/******/ 	// getDefaultExport function for compatibility with non-harmony modules
69/******/ 	__webpack_require__.n = function(module) {
70/******/ 		var getter = module && module.__esModule ?
71/******/ 			function getDefault() { return module['default']; } :
72/******/ 			function getModuleExports() { return module; };
73/******/ 		__webpack_require__.d(getter, 'a', getter);
74/******/ 		return getter;
75/******/ 	};
76/******/
77/******/ 	// Object.prototype.hasOwnProperty.call
78/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79/******/
80/******/ 	// __webpack_public_path__
81/******/ 	__webpack_require__.p = "";
82/******/
83/******/
84/******/ 	// Load entry module and return exports
85/******/ 	return __webpack_require__(__webpack_require__.s = 109);
86/******/ })
87/************************************************************************/
88/******/ ([
89/* 0 */
90/***/ (function(module, __webpack_exports__, __webpack_require__) {
91
92"use strict";
93/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __extends; });
94/* unused harmony export __assign */
95/* unused harmony export __rest */
96/* unused harmony export __decorate */
97/* unused harmony export __param */
98/* unused harmony export __metadata */
99/* unused harmony export __awaiter */
100/* unused harmony export __generator */
101/* unused harmony export __exportStar */
102/* unused harmony export __values */
103/* unused harmony export __read */
104/* unused harmony export __spread */
105/* unused harmony export __spreadArrays */
106/* unused harmony export __await */
107/* unused harmony export __asyncGenerator */
108/* unused harmony export __asyncDelegator */
109/* unused harmony export __asyncValues */
vendor: 4,257 bytes, lines 110-195
110/* unused harmony export __makeTemplateObject */
111/* unused harmony export __importStar */
112/* unused harmony export __importDefault */
113/*! *****************************************************************************
114Copyright (c) Microsoft Corporation. All rights reserved.
115Licensed under the Apache License, Version 2.0 (the "License"); you may not use
116this file except in compliance with the License. You may obtain a copy of the
117License at http://www.apache.org/licenses/LICENSE-2.0
118
119THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
120KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
121WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
122MERCHANTABLITY OR NON-INFRINGEMENT.
123
124See the Apache Version 2.0 License for specific language governing permissions
125and limitations under the License.
126***************************************************************************** */
127/* global Reflect, Promise */
128
129var extendStatics = function(d, b) {
130    extendStatics = Object.setPrototypeOf ||
131        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
132        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
133    return extendStatics(d, b);
134};
135
136function __extends(d, b) {
137    extendStatics(d, b);
138    function __() { this.constructor = d; }
139    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
140}
141
142var __assign = function() {
143    __assign = Object.assign || function __assign(t) {
144        for (var s, i = 1, n = arguments.length; i < n; i++) {
145            s = arguments[i];
146            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
147        }
148        return t;
149    }
150    return __assign.apply(this, arguments);
151}
152
153function __rest(s, e) {
154    var t = {};
155    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
156        t[p] = s[p];
157    if (s != null && typeof Object.getOwnPropertySymbols === "function")
158        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
159            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
160                t[p[i]] = s[p[i]];
161        }
162    return t;
163}
164
165function __decorate(decorators, target, key, desc) {
166    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
167    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
168    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
169    return c > 3 && r && Object.defineProperty(target, key, r), r;
170}
171
172function __param(paramIndex, decorator) {
173    return function (target, key) { decorator(target, key, paramIndex); }
174}
175
176function __metadata(metadataKey, metadataValue) {
177    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
178}
179
180function __awaiter(thisArg, _arguments, P, generator) {
181    return new (P || (P = Promise))(function (resolve, reject) {
182        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
183        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
184        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
185        step((generator = generator.apply(thisArg, _arguments || [])).next());
186    });
187}
188
189function __generator(thisArg, body) {
190    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
191    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
192    function verb(n) { return function (v) { return step([n, v]); }; }
193    function step(op) {
194        if (f) throw new TypeError("Generator is already executing.");
195        while (_) try {
vendor: 4,124 bytes, lines 196-287
196            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
197            if (y = 0, t) op = [op[0] & 2, t.value];
198            switch (op[0]) {
199                case 0: case 1: t = op; break;
200                case 4: _.label++; return { value: op[1], done: false };
201                case 5: _.label++; y = op[1]; op = [0]; continue;
202                case 7: op = _.ops.pop(); _.trys.pop(); continue;
203                default:
204                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
205                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
206                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
207                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
208                    if (t[2]) _.ops.pop();
209                    _.trys.pop(); continue;
210            }
211            op = body.call(thisArg, _);
212        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
213        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
214    }
215}
216
217function __exportStar(m, exports) {
218    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
219}
220
221function __values(o) {
222    var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
223    if (m) return m.call(o);
224    return {
225        next: function () {
226            if (o && i >= o.length) o = void 0;
227            return { value: o && o[i++], done: !o };
228        }
229    };
230}
231
232function __read(o, n) {
233    var m = typeof Symbol === "function" && o[Symbol.iterator];
234    if (!m) return o;
235    var i = m.call(o), r, ar = [], e;
236    try {
237        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
238    }
239    catch (error) { e = { error: error }; }
240    finally {
241        try {
242            if (r && !r.done && (m = i["return"])) m.call(i);
243        }
244        finally { if (e) throw e.error; }
245    }
246    return ar;
247}
248
249function __spread() {
250    for (var ar = [], i = 0; i < arguments.length; i++)
251        ar = ar.concat(__read(arguments[i]));
252    return ar;
253}
254
255function __spreadArrays() {
256    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
257    for (var r = Array(s), k = 0, i = 0; i < il; i++)
258        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
259            r[k] = a[j];
260    return r;
261};
262
263function __await(v) {
264    return this instanceof __await ? (this.v = v, this) : new __await(v);
265}
266
267function __asyncGenerator(thisArg, _arguments, generator) {
268    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
269    var g = generator.apply(thisArg, _arguments || []), i, q = [];
270    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
271    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
272    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
273    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
274    function fulfill(value) { resume("next", value); }
275    function reject(value) { resume("throw", value); }
276    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
277}
278
279function __asyncDelegator(o) {
280    var i, p;
281    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
282    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
283}
284
285function __asyncValues(o) {
286    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
287    var m = o[Symbol.asyncIterator], i;
288    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
289    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
290    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
291}
292
293function __makeTemplateObject(cooked, raw) {
294    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
295    return cooked;
296};
297
298function __importStar(mod) {
299    if (mod && mod.__esModule) return mod;
300    var result = {};
301    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
302    result.default = mod;
303    return result;
304}
305
306function __importDefault(mod) {
307    return (mod && mod.__esModule) ? mod : { default: mod };
308}
309
310
311/***/ }),
312/* 1 */
313/***/ (function(module, __webpack_exports__, __webpack_require__) {
314
315"use strict";
316/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; });
317/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
318/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34);
319/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58);
320/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
321/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43);
322/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
323/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42);
324/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
325
326
327
328
329
330
331
332var Subscriber = /*@__PURE__*/ (function (_super) {
333    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](Subscriber, _super);
334    function Subscriber(destinationOrNext, error, complete) {
335        var _this = _super.call(this) || this;
336        _this.syncErrorValue = null;
337        _this.syncErrorThrown = false;
338        _this.syncErrorThrowable = false;
339        _this.isStopped = false;
340        switch (arguments.length) {
341            case 0:
342                _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__[/* empty */ "a"];
343                break;
344            case 1:
345                if (!destinationOrNext) {
346                    _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__[/* empty */ "a"];
347                    break;
348                }
349                if (typeof destinationOrNext === 'object') {
350                    if (isTrustedSubscriber(destinationOrNext)) {
351                        var trustedSubscriber = destinationOrNext[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* rxSubscriber */ "a"]]();
352                        _this.syncErrorThrowable = trustedSubscriber.syncErrorThrowable;
353                        _this.destination = trustedSubscriber;
354                        trustedSubscriber.add(_this);
355                    }
356                    else {
357                        _this.syncErrorThrowable = true;
358                        _this.destination = new SafeSubscriber(_this, destinationOrNext);
359                    }
360                    break;
361                }
362            default:
363                _this.syncErrorThrowable = true;
364                _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
365                break;
366        }
367        return _this;
368    }
369    Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* rxSubscriber */ "a"]] = function () { return this; };
370    Subscriber.create = function (next, error, complete) {
371        var subscriber = new Subscriber(next, error, complete);
372        subscriber.syncErrorThrowable = false;
373        return subscriber;
374    };
375    Subscriber.prototype.next = function (value) {
376        if (!this.isStopped) {
377            this._next(value);
378        }
379    };
380    Subscriber.prototype.error = function (err) {
381        if (!this.isStopped) {
382            this.isStopped = true;
383            this._error(err);
384        }
385    };
386    Subscriber.prototype.complete = function () {
387        if (!this.isStopped) {
388            this.isStopped = true;
389            this._complete();
390        }
391    };
392    Subscriber.prototype.unsubscribe = function () {
393        if (this.closed) {
394            return;
395        }
396        this.isStopped = true;
397        _super.prototype.unsubscribe.call(this);
398    };
399    Subscriber.prototype._next = function (value) {
400        this.destination.next(value);
401    };
402    Subscriber.prototype._error = function (err) {
403        this.destination.error(err);
404        this.unsubscribe();
405    };
406    Subscriber.prototype._complete = function () {
407        this.destination.complete();
408        this.unsubscribe();
409    };
410    Subscriber.prototype._unsubscribeAndRecycle = function () {
411        var _a = this, _parent = _a._parent, _parents = _a._parents;
412        this._parent = null;
413        this._parents = null;
414        this.unsubscribe();
415        this.closed = false;
416        this.isStopped = false;
417        this._parent = _parent;
418        this._parents = _parents;
419        return this;
420    };
421    return Subscriber;
422}(_Subscription__WEBPACK_IMPORTED_MODULE_3__[/* Subscription */ "a"]));
423
424var SafeSubscriber = /*@__PURE__*/ (function (_super) {
425    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](SafeSubscriber, _super);
426    function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
427        var _this = _super.call(this) || this;
428        _this._parentSubscriber = _parentSubscriber;
429        var next;
430        var context = _this;
431        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(observerOrNext)) {
432            next = observerOrNext;
433        }
434        else if (observerOrNext) {
435            next = observerOrNext.next;
436            error = observerOrNext.error;
437            complete = observerOrNext.complete;
438            if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__[/* empty */ "a"]) {
439                context = Object.create(observerOrNext);
440                if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__[/* isFunction */ "a"])(context.unsubscribe)) {
441                    _this.add(context.unsubscribe.bind(context));
442                }
443                context.unsubscribe = _this.unsubscribe.bind(_this);
444            }
445        }
446        _this._context = context;
447        _this._next = next;
448        _this._error = error;
449        _this._complete = complete;
450        return _this;
451    }
452    SafeSubscriber.prototype.next = function (value) {
453        if (!this.isStopped && this._next) {
454            var _parentSubscriber = this._parentSubscriber;
455            if (!_config__WEBPACK_IMPORTED_MODULE_5__[/* config */ "a"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
456                this.__tryOrUnsub(this._next, value);
457            }
458            else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
459                this.unsubscribe();
460            }
461        }
462    };
463    SafeSubscriber.prototype.error = function (err) {
464        if (!this.isStopped) {
465            var _parentSubscriber = this._parentSubscriber;
466            var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__[/* config */ "a"].useDeprecatedSynchronousErrorHandling;
467            if (this._error) {
468                if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
469                    this.__tryOrUnsub(this._error, err);
470                    this.unsubscribe();
471                }
472                else {
473                    this.__tryOrSetError(_parentSubscriber, this._error, err);
474                    this.unsubscribe();
475                }
476            }
477            else if (!_parentSubscriber.syncErrorThrowable) {
478                this.unsubscribe();
479                if (useDeprecatedSynchronousErrorHandling) {
480                    throw err;
481                }
482                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__[/* hostReportError */ "a"])(err);
483            }
484            else {
485                if (useDeprecatedSynchronousErrorHandling) {
486                    _parentSubscriber.syncErrorValue = err;
487                    _parentSubscriber.syncErrorThrown = true;
488                }
489                else {
490                    Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__[/* hostReportError */ "a"])(err);
491                }
492                this.unsubscribe();
493            }
494        }
495    };
496    SafeSubscriber.prototype.complete = function () {
497        var _this = this;
498        if (!this.isStopped) {
499            var _parentSubscriber = this._parentSubscriber;
500            if (this._complete) {
501                var wrappedComplete = function () { return _this._complete.call(_this._context); };
502                if (!_config__WEBPACK_IMPORTED_MODULE_5__[/* config */ "a"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
503                    this.__tryOrUnsub(wrappedComplete);
504                    this.unsubscribe();
505                }
506                else {
507                    this.__tryOrSetError(_parentSubscriber, wrappedComplete);
508                    this.unsubscribe();
509                }
510            }
511            else {
512                this.unsubscribe();
513            }
514        }
515    };
516    SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
517        try {
518            fn.call(this._context, value);
519        }
520        catch (err) {
521            this.unsubscribe();
522            if (_config__WEBPACK_IMPORTED_MODULE_5__[/* config */ "a"].useDeprecatedSynchronousErrorHandling) {
523                throw err;
524            }
525            else {
526                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__[/* hostReportError */ "a"])(err);
527            }
528        }
529    };
530    SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
531        if (!_config__WEBPACK_IMPORTED_MODULE_5__[/* config */ "a"].useDeprecatedSynchronousErrorHandling) {
532            throw new Error('bad call');
533        }
534        try {
535            fn.call(this._context, value);
536        }
537        catch (err) {
538            if (_config__WEBPACK_IMPORTED_MODULE_5__[/* config */ "a"].useDeprecatedSynchronousErrorHandling) {
539                parent.syncErrorValue = err;
540                parent.syncErrorThrown = true;
541                return true;
542            }
543            else {
544                Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__[/* hostReportError */ "a"])(err);
545                return true;
546            }
547        }
548        return false;
549    };
550    SafeSubscriber.prototype._unsubscribe = function () {
551        var _parentSubscriber = this._parentSubscriber;
552        this._context = null;
553        this._parentSubscriber = null;
554        _parentSubscriber.unsubscribe();
555    };
556    return SafeSubscriber;
557}(Subscriber));
558function isTrustedSubscriber(obj) {
559    return obj instanceof Subscriber || ('syncErrorThrowable' in obj && obj[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* rxSubscriber */ "a"]]);
560}
561
562
563/***/ }),
564/* 2 */
565/***/ (function(module, __webpack_exports__, __webpack_require__) {
566
567"use strict";
568
569// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
570var Subscriber = __webpack_require__(1);
571
572// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js
573var rxSubscriber = __webpack_require__(43);
574
575// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observer.js
576var Observer = __webpack_require__(58);
577
578// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/toSubscriber.js
579/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
580
581
582
583function toSubscriber(nextOrObserver, error, complete) {
584    if (nextOrObserver) {
585        if (nextOrObserver instanceof Subscriber["a" /* Subscriber */]) {
586            return nextOrObserver;
587        }
588        if (nextOrObserver[rxSubscriber["a" /* rxSubscriber */]]) {
589            return nextOrObserver[rxSubscriber["a" /* rxSubscriber */]]();
590        }
591    }
592    if (!nextOrObserver && !error && !complete) {
593        return new Subscriber["a" /* Subscriber */](Observer["a" /* empty */]);
594    }
595    return new Subscriber["a" /* Subscriber */](nextOrObserver, error, complete);
596}
597
598// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/symbol/observable.js
599var observable = __webpack_require__(27);
600
601// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/pipe.js
602var pipe = __webpack_require__(46);
603
604// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/config.js
605var config = __webpack_require__(21);
606
607// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js
608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable_Observable; });
609/** PURE_IMPORTS_START _util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
610
611
612
613
614var Observable_Observable = /*@__PURE__*/ (function () {
615    function Observable(subscribe) {
616        this._isScalar = false;
617        if (subscribe) {
618            this._subscribe = subscribe;
619        }
620    }
621    Observable.prototype.lift = function (operator) {
622        var observable = new Observable();
623        observable.source = this;
624        observable.operator = operator;
625        return observable;
626    };
627    Observable.prototype.subscribe = function (observerOrNext, error, complete) {
628        var operator = this.operator;
629        var sink = toSubscriber(observerOrNext, error, complete);
630        if (operator) {
631            operator.call(sink, this.source);
632        }
633        else {
634            sink.add(this.source || (config["a" /* config */].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
635                this._subscribe(sink) :
636                this._trySubscribe(sink));
637        }
638        if (config["a" /* config */].useDeprecatedSynchronousErrorHandling) {
639            if (sink.syncErrorThrowable) {
640                sink.syncErrorThrowable = false;
641                if (sink.syncErrorThrown) {
642                    throw sink.syncErrorValue;
643                }
644            }
645        }
646        return sink;
647    };
648    Observable.prototype._trySubscribe = function (sink) {
649        try {
650            return this._subscribe(sink);
651        }
652        catch (err) {
653            if (config["a" /* config */].useDeprecatedSynchronousErrorHandling) {
654                sink.syncErrorThrown = true;
655                sink.syncErrorValue = err;
656            }
657            sink.error(err);
658        }
659    };
660    Observable.prototype.forEach = function (next, promiseCtor) {
661        var _this = this;
662        promiseCtor = getPromiseCtor(promiseCtor);
663        return new promiseCtor(function (resolve, reject) {
664            var subscription;
665            subscription = _this.subscribe(function (value) {
666                try {
667                    next(value);
668                }
669                catch (err) {
670                    reject(err);
671                    if (subscription) {
672                        subscription.unsubscribe();
673                    }
674                }
675            }, reject, resolve);
676        });
677    };
678    Observable.prototype._subscribe = function (subscriber) {
679        var source = this.source;
680        return source && source.subscribe(subscriber);
681    };
682    Observable.prototype[observable["a" /* observable */]] = function () {
683        return this;
684    };
685    Observable.prototype.pipe = function () {
686        var operations = [];
687        for (var _i = 0; _i < arguments.length; _i++) {
688            operations[_i] = arguments[_i];
689        }
690        if (operations.length === 0) {
691            return this;
692        }
693        return Object(pipe["b" /* pipeFromArray */])(operations)(this);
694    };
695    Observable.prototype.toPromise = function (promiseCtor) {
696        var _this = this;
697        promiseCtor = getPromiseCtor(promiseCtor);
698        return new promiseCtor(function (resolve, reject) {
699            var value;
700            _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
701        });
702    };
703    Observable.create = function (subscribe) {
704        return new Observable(subscribe);
705    };
706    return Observable;
707}());
708
709function getPromiseCtor(promiseCtor) {
710    if (!promiseCtor) {
711        promiseCtor = config["a" /* config */].Promise || Promise;
712    }
713    if (!promiseCtor) {
714        throw new Error('no Promise impl found');
715    }
716    return promiseCtor;
717}
718
719
720/***/ }),
721/* 3 */
722/***/ (function(module, __webpack_exports__, __webpack_require__) {
723
724"use strict";
725
726// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
727var tslib_es6 = __webpack_require__(0);
728
729// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
730var Subscriber = __webpack_require__(1);
731
732// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/InnerSubscriber.js
733/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
734
735
736var InnerSubscriber_InnerSubscriber = /*@__PURE__*/ (function (_super) {
737    tslib_es6["a" /* __extends */](InnerSubscriber, _super);
738    function InnerSubscriber(parent, outerValue, outerIndex) {
739        var _this = _super.call(this) || this;
740        _this.parent = parent;
741        _this.outerValue = outerValue;
742        _this.outerIndex = outerIndex;
743        _this.index = 0;
744        return _this;
745    }
746    InnerSubscriber.prototype._next = function (value) {
747        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
748    };
749    InnerSubscriber.prototype._error = function (error) {
750        this.parent.notifyError(error, this);
751        this.unsubscribe();
752    };
753    InnerSubscriber.prototype._complete = function () {
754        this.parent.notifyComplete(this);
755        this.unsubscribe();
756    };
757    return InnerSubscriber;
758}(Subscriber["a" /* Subscriber */]));
759
760
761// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeTo.js
762var subscribeTo = __webpack_require__(82);
763
764// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js
765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToResult; });
766/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */
767
768
769function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
770    var destination = new InnerSubscriber_InnerSubscriber(outerSubscriber, outerValue, outerIndex);
771    return Object(subscribeTo["a" /* subscribeTo */])(result)(destination);
772}
773
774
775/***/ }),
776/* 4 */
777/***/ (function(module, __webpack_exports__, __webpack_require__) {
778
779"use strict";
780/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OuterSubscriber; });
781/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
782/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
783/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
784
785
786var OuterSubscriber = /*@__PURE__*/ (function (_super) {
787    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](OuterSubscriber, _super);
788    function OuterSubscriber() {
789        return _super !== null && _super.apply(this, arguments) || this;
790    }
791    OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
792        this.destination.next(innerValue);
793    };
794    OuterSubscriber.prototype.notifyError = function (error, innerSub) {
795        this.destination.error(error);
796    };
797    OuterSubscriber.prototype.notifyComplete = function (innerSub) {
798        this.destination.complete();
799    };
800    return OuterSubscriber;
801}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "a"]));
802
803
804
805/***/ }),
806/* 5 */
807/***/ (function(module, __webpack_exports__, __webpack_require__) {
808
809"use strict";
810/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; });
811/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
812/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79);
813/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34);
814/* harmony import */ var _util_tryCatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
815/* harmony import */ var _util_errorObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
816/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47);
817/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */
818
819
820
821
822
823
824var Subscription = /*@__PURE__*/ (function () {
825    function Subscription(unsubscribe) {
826        this.closed = false;
827        this._parent = null;
828        this._parents = null;
829        this._subscriptions = null;
830        if (unsubscribe) {
831            this._unsubscribe = unsubscribe;
832        }
833    }
834    Subscription.prototype.unsubscribe = function () {
835        var hasErrors = false;
836        var errors;
837        if (this.closed) {
838            return;
839        }
840        var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
841        this.closed = true;
842        this._parent = null;
843        this._parents = null;
844        this._subscriptions = null;
845        var index = -1;
846        var len = _parents ? _parents.length : 0;
847        while (_parent) {
848            _parent.remove(this);
849            _parent = ++index < len && _parents[index] || null;
850        }
851        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "a"])(_unsubscribe)) {
852            var trial = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__[/* tryCatch */ "a"])(_unsubscribe).call(this);
853            if (trial === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__[/* errorObject */ "a"]) {
854                hasErrors = true;
855                errors = errors || (_util_errorObject__WEBPACK_IMPORTED_MODULE_4__[/* errorObject */ "a"].e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__[/* UnsubscriptionError */ "a"] ?
856                    flattenUnsubscriptionErrors(_util_errorObject__WEBPACK_IMPORTED_MODULE_4__[/* errorObject */ "a"].e.errors) : [_util_errorObject__WEBPACK_IMPORTED_MODULE_4__[/* errorObject */ "a"].e]);
857            }
858        }
859        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__[/* isArray */ "a"])(_subscriptions)) {
860            index = -1;
861            len = _subscriptions.length;
862            while (++index < len) {
863                var sub = _subscriptions[index];
864                if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "a"])(sub)) {
865                    var trial = Object(_util_tryCatch__WEBPACK_IMPORTED_MODULE_3__[/* tryCatch */ "a"])(sub.unsubscribe).call(sub);
866                    if (trial === _util_errorObject__WEBPACK_IMPORTED_MODULE_4__[/* errorObject */ "a"]) {
867                        hasErrors = true;
868                        errors = errors || [];
869                        var err = _util_errorObject__WEBPACK_IMPORTED_MODULE_4__[/* errorObject */ "a"].e;
870                        if (err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__[/* UnsubscriptionError */ "a"]) {
871                            errors = errors.concat(flattenUnsubscriptionErrors(err.errors));
872                        }
873                        else {
874                            errors.push(err);
875                        }
876                    }
877                }
878            }
879        }
880        if (hasErrors) {
881            throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__[/* UnsubscriptionError */ "a"](errors);
882        }
883    };
884    Subscription.prototype.add = function (teardown) {
885        if (!teardown || (teardown === Subscription.EMPTY)) {
886            return Subscription.EMPTY;
887        }
888        if (teardown === this) {
889            return this;
890        }
891        var subscription = teardown;
892        switch (typeof teardown) {
893            case 'function':
894                subscription = new Subscription(teardown);
895            case 'object':
896                if (subscription.closed || typeof subscription.unsubscribe !== 'function') {
897                    return subscription;
898                }
899                else if (this.closed) {
900                    subscription.unsubscribe();
901                    return subscription;
902                }
903                else if (typeof subscription._addParent !== 'function') {
904                    var tmp = subscription;
905                    subscription = new Subscription();
906                    subscription._subscriptions = [tmp];
907                }
908                break;
909            default:
910                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
911        }
912        var subscriptions = this._subscriptions || (this._subscriptions = []);
913        subscriptions.push(subscription);
914        subscription._addParent(this);
915        return subscription;
916    };
917    Subscription.prototype.remove = function (subscription) {
918        var subscriptions = this._subscriptions;
919        if (subscriptions) {
920            var subscriptionIndex = subscriptions.indexOf(subscription);
921            if (subscriptionIndex !== -1) {
922                subscriptions.splice(subscriptionIndex, 1);
923            }
924        }
925    };
926    Subscription.prototype._addParent = function (parent) {
927        var _a = this, _parent = _a._parent, _parents = _a._parents;
928        if (!_parent || _parent === parent) {
929            this._parent = parent;
930        }
931        else if (!_parents) {
932            this._parents = [parent];
933        }
934        else if (_parents.indexOf(parent) === -1) {
935            _parents.push(parent);
936        }
937    };
938    Subscription.EMPTY = (function (empty) {
939        empty.closed = true;
940        return empty;
941    }(new Subscription()));
942    return Subscription;
943}());
944
945function flattenUnsubscriptionErrors(errors) {
946    return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_5__[/* UnsubscriptionError */ "a"]) ? err.errors : err); }, []);
947}
948
949
950/***/ }),
951/* 6 */
952/***/ (function(module, __webpack_exports__, __webpack_require__) {
953
954"use strict";
955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return errorObject; });
956/** PURE_IMPORTS_START  PURE_IMPORTS_END */
957var errorObject = { e: {} };
958
959
960/***/ }),
961/* 7 */
962/***/ (function(module, exports, __webpack_require__) {
963
964"use strict";
965
966Object.defineProperty(exports, "__esModule", { value: true });
967var pds_i18n_1 = __webpack_require__(15);
968var PdsWidget = (function () {
969    function PdsWidget() {
970        this.escKey = 27;
971        this.tabKey = 9;
972    }
973    PdsWidget.prototype.messageKeysUpdated = function () {
974        var _this = this;
975        setTimeout(function () {
976            _this.redrawTrigger = !_this.redrawTrigger;
977        });
978    };
979    PdsWidget.prototype.ready = function () {
980        this.redrawTrigger = true;
981    };
982    PdsWidget.prototype.attached = function () {
983        this.classList.add('pds-widget');
984        this.setAttribute('pds-widget', 'pds-widget');
985    };
986    PdsWidget.prototype.querySelector = function (param) {
987        console.error('this should never have been called');
988    };
989    PdsWidget.prototype.querySelectorAll = function (param) {
990        console.error('this should never have been called');
991    };
992    PdsWidget.prototype.dispatchEvent = function (e) {
993        console.error('this should never have been called');
994    };
995    PdsWidget.prototype.hasAttribute = function (name) {
996        console.error('this should never have been called');
997        return false;
998    };
999    PdsWidget.prototype.setAttribute = function (attr, value) {
1000        console.error('this should never have been called');
1001    };
1002    PdsWidget.prototype.appendChild = function (node) {
1003        console.error('this should never have been called');
1004        return node;
1005    };
1006    PdsWidget.prototype.verifyNamePresent = function () {
1007        if (this.name == null) {
1008            console.error(this.is + ' component is missing the name attribute.');
1009        }
1010    };
1011    PdsWidget.prototype.logicalAnd = function () {
1012        var value = [];
1013        for (var _i = 0; _i < arguments.length; _i++) {
1014            value[_i] = arguments[_i];
1015        }
1016        var answer = true === value.reduce(function (v1, v2) {
1017            return v1 && v2;
1018        });
1019        return answer;
1020    };
1021    PdsWidget.prototype.updateStyles = function (styleName, styleValue) {
1022        this.setAttribute('style', styleName + ": " + styleValue);
1023    };
1024    PdsWidget.prototype.conditionalClass = function (className, value1, operator, value2) {
1025        if (operator == null) {
1026            if (value1) {
1027                return className;
1028            }
1029        }
1030        else if (operator.trim() === '!') {
1031            if (!value1) {
1032                return className;
1033            }
1034        }
1035        else if (this.compare(value1, operator, value2)) {
1036            return className;
1037        }
1038    };
1039    PdsWidget.prototype.conditionalAttribute = function (attributeValue, value1, operator, value2) {
1040        return this.conditionalClass(attributeValue, value1, operator, value2);
1041    };
1042    PdsWidget.prototype.compare = function (value1, operator, value2) {
1043        switch (operator.trim()) {
1044            case 'is-blank':
1045                return value1 == null || value1.length === 0;
1046            case '== null':
1047            case '==null':
1048                return value1 == null;
1049            case '!= null':
1050            case '!=null':
1051                return value1 != null;
1052            case '==':
1053                return value1 == value2;
1054            case '!=':
1055                return value1 != value2;
1056            case '===':
1057                return value1 === value2;
1058            case '!==':
1059                return value1 !== value2;
1060            case '<':
1061                return value1 < value2;
1062            case '<=':
1063                return value1 <= value2;
1064            case '>':
1065                return value1 > value2;
1066            case '>=':
1067                return value1 >= value2;
1068            default:
1069                throw 'operator not found';
1070        }
1071    };
1072    PdsWidget.prototype.isDefined = function (propertyName, context) {
1073        if (context == null) {
1074            context = this;
1075        }
1076        return context[propertyName] != null;
1077    };
1078    PdsWidget.prototype.translate = function (redrawTrigger, key) {
1079        var params = [];
1080        for (var _i = 2; _i < arguments.length; _i++) {
1081            params[_i - 2] = arguments[_i];
1082        }
1083        var args = {};
1084        if (params != null && params.length > 0) {
1085            for (var i = 0; i < params.length; i++) {
1086                args['arg' + i] = params[i];
1087            }
1088        }
1089        return pds_i18n_1.pdsI18n.getText(key, args);
1090    };
1091    PdsWidget.prototype.redraw = function (path) {
1092        var opts = this[path];
1093        this[path] = null;
1094        this[path] = opts;
1095    };
1096    return PdsWidget;
1097}());
1098exports.PdsWidget = PdsWidget;
1099
1100
1101
1102/***/ }),
1103/* 8 */
1104/***/ (function(module, __webpack_exports__, __webpack_require__) {
1105
1106"use strict";
1107/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; });
1108/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; });
1109/* unused harmony export AnonymousSubject */
1110/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1111/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
1112/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
1113/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
1114/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
1115/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80);
1116/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43);
1117/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
1118
1119
1120
1121
1122
1123
1124
1125var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
1126    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](SubjectSubscriber, _super);
1127    function SubjectSubscriber(destination) {
1128        var _this = _super.call(this, destination) || this;
1129        _this.destination = destination;
1130        return _this;
1131    }
1132    return SubjectSubscriber;
1133}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__[/* Subscriber */ "a"]));
1134
1135var Subject = /*@__PURE__*/ (function (_super) {
1136    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](Subject, _super);
1137    function Subject() {
1138        var _this = _super.call(this) || this;
1139        _this.observers = [];
1140        _this.closed = false;
1141        _this.isStopped = false;
1142        _this.hasError = false;
1143        _this.thrownError = null;
1144        return _this;
1145    }
1146    Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__[/* rxSubscriber */ "a"]] = function () {
1147        return new SubjectSubscriber(this);
1148    };
1149    Subject.prototype.lift = function (operator) {
1150        var subject = new AnonymousSubject(this, this);
1151        subject.operator = operator;
1152        return subject;
1153    };
1154    Subject.prototype.next = function (value) {
1155        if (this.closed) {
1156            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__[/* ObjectUnsubscribedError */ "a"]();
1157        }
1158        if (!this.isStopped) {
1159            var observers = this.observers;
1160            var len = observers.length;
1161            var copy = observers.slice();
1162            for (var i = 0; i < len; i++) {
1163                copy[i].next(value);
1164            }
1165        }
1166    };
1167    Subject.prototype.error = function (err) {
1168        if (this.closed) {
1169            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__[/* ObjectUnsubscribedError */ "a"]();
1170        }
1171        this.hasError = true;
1172        this.thrownError = err;
1173        this.isStopped = true;
1174        var observers = this.observers;
1175        var len = observers.length;
1176        var copy = observers.slice();
1177        for (var i = 0; i < len; i++) {
1178            copy[i].error(err);
1179        }
1180        this.observers.length = 0;
1181    };
1182    Subject.prototype.complete = function () {
1183        if (this.closed) {
1184            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__[/* ObjectUnsubscribedError */ "a"]();
1185        }
1186        this.isStopped = true;
1187        var observers = this.observers;
1188        var len = observers.length;
1189        var copy = observers.slice();
1190        for (var i = 0; i < len; i++) {
1191            copy[i].complete();
1192        }
1193        this.observers.length = 0;
1194    };
1195    Subject.prototype.unsubscribe = function () {
1196        this.isStopped = true;
1197        this.closed = true;
1198        this.observers = null;
1199    };
1200    Subject.prototype._trySubscribe = function (subscriber) {
1201        if (this.closed) {
1202            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__[/* ObjectUnsubscribedError */ "a"]();
1203        }
1204        else {
1205            return _super.prototype._trySubscribe.call(this, subscriber);
1206        }
1207    };
1208    Subject.prototype._subscribe = function (subscriber) {
1209        if (this.closed) {
1210            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__[/* ObjectUnsubscribedError */ "a"]();
1211        }
1212        else if (this.hasError) {
1213            subscriber.error(this.thrownError);
1214            return _Subscription__WEBPACK_IMPORTED_MODULE_3__[/* Subscription */ "a"].EMPTY;
1215        }
1216        else if (this.isStopped) {
1217            subscriber.complete();
1218            return _Subscription__WEBPACK_IMPORTED_MODULE_3__[/* Subscription */ "a"].EMPTY;
1219        }
1220        else {
1221            this.observers.push(subscriber);
1222            return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__[/* SubjectSubscription */ "a"](this, subscriber);
1223        }
1224    };
1225    Subject.prototype.asObservable = function () {
1226        var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"]();
1227        observable.source = this;
1228        return observable;
1229    };
1230    Subject.create = function (destination, source) {
1231        return new AnonymousSubject(destination, source);
1232    };
1233    return Subject;
1234}(_Observable__WEBPACK_IMPORTED_MODULE_1__[/* Observable */ "a"]));
1235
1236var AnonymousSubject = /*@__PURE__*/ (function (_super) {
1237    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](AnonymousSubject, _super);
1238    function AnonymousSubject(destination, source) {
1239        var _this = _super.call(this) || this;
1240        _this.destination = destination;
1241        _this.source = source;
1242        return _this;
1243    }
1244    AnonymousSubject.prototype.next = function (value) {
1245        var destination = this.destination;
1246        if (destination && destination.next) {
1247            destination.next(value);
1248        }
1249    };
1250    AnonymousSubject.prototype.error = function (err) {
1251        var destination = this.destination;
1252        if (destination && destination.error) {
1253            this.destination.error(err);
1254        }
1255    };
1256    AnonymousSubject.prototype.complete = function () {
1257        var destination = this.destination;
1258        if (destination && destination.complete) {
1259            this.destination.complete();
1260        }
1261    };
1262    AnonymousSubject.prototype._subscribe = function (subscriber) {
1263        var source = this.source;
1264        if (source) {
1265            return this.source.subscribe(subscriber);
1266        }
1267        else {
1268            return _Subscription__WEBPACK_IMPORTED_MODULE_3__[/* Subscription */ "a"].EMPTY;
1269        }
1270    };
1271    return AnonymousSubject;
1272}(Subject));
1273
1274
1275
1276/***/ }),
1277/* 9 */
1278/***/ (function(module, __webpack_exports__, __webpack_require__) {
1279
1280"use strict";
1281/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EMPTY; });
1282/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return empty; });
1283/* unused harmony export emptyScheduled */
1284/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1285/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
1286
1287var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return subscriber.complete(); });
1288function empty(scheduler) {
1289    return scheduler ? emptyScheduled(scheduler) : EMPTY;
1290}
1291function emptyScheduled(scheduler) {
1292    return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
1293}
1294
1295
1296/***/ }),
1297/* 10 */
1298/***/ (function(module, __webpack_exports__, __webpack_require__) {
1299
1300"use strict";
1301/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; });
1302/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
1303/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
1304/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
1305
1306
1307var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__[/* AsyncScheduler */ "a"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__[/* AsyncAction */ "a"]);
1308
1309
1310/***/ }),
1311/* 11 */
1312/***/ (function(module, __webpack_exports__, __webpack_require__) {
1313
1314"use strict";
1315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArray; });
1316/** PURE_IMPORTS_START  PURE_IMPORTS_END */
1317var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
1318
1319
1320/***/ }),
1321/* 12 */
1322/***/ (function(module, __webpack_exports__, __webpack_require__) {
1323
1324"use strict";
1325/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isScheduler; });
1326/** PURE_IMPORTS_START  PURE_IMPORTS_END */
1327function isScheduler(value) {
1328    return value && typeof value.schedule === 'function';
1329}
1330
1331
1332/***/ }),
1333/* 13 */
1334/***/ (function(module, __webpack_exports__, __webpack_require__) {
1335
1336"use strict";
1337/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; });
1338/* unused harmony export MapOperator */
1339/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1340/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
1341/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
1342
1343
1344function map(project, thisArg) {
1345    return function mapOperation(source) {
1346        if (typeof project !== 'function') {
1347            throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
1348        }
1349        return source.lift(new MapOperator(project, thisArg));
1350    };
1351}
1352var MapOperator = /*@__PURE__*/ (function () {
1353    function MapOperator(project, thisArg) {
1354        this.project = project;
1355        this.thisArg = thisArg;
1356    }
1357    MapOperator.prototype.call = function (subscriber, source) {
1358        return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
1359    };
1360    return MapOperator;
1361}());
1362
1363var MapSubscriber = /*@__PURE__*/ (function (_super) {
1364    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](MapSubscriber, _super);
1365    function MapSubscriber(destination, project, thisArg) {
1366        var _this = _super.call(this, destination) || this;
1367        _this.project = project;
1368        _this.count = 0;
1369        _this.thisArg = thisArg || _this;
1370        return _this;
1371    }
1372    MapSubscriber.prototype._next = function (value) {
1373        var result;
1374        try {
1375            result = this.project.call(this.thisArg, value, this.count++);
1376        }
1377        catch (err) {
1378            this.destination.error(err);
1379            return;
1380        }
1381        this.destination.next(result);
1382    };
1383    return MapSubscriber;
1384}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "a"]));
1385
1386
1387/***/ }),
1388/* 14 */
1389/***/ (function(module, __webpack_exports__, __webpack_require__) {
1390
1391"use strict";
1392/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tryCatch; });
1393/* harmony import */ var _errorObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
1394/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */
1395
1396var tryCatchTarget;
1397function tryCatcher() {
1398    try {
1399        return tryCatchTarget.apply(this, arguments);
1400    }
1401    catch (e) {
1402        _errorObject__WEBPACK_IMPORTED_MODULE_0__[/* errorObject */ "a"].e = e;
1403        return _errorObject__WEBPACK_IMPORTED_MODULE_0__[/* errorObject */ "a"];
1404    }
1405}
1406function tryCatch(fn) {
1407    tryCatchTarget = fn;
1408    return tryCatcher;
1409}
1410
1411
1412/***/ }),
1413/* 15 */
1414/***/ (function(module, exports, __webpack_require__) {
1415
1416"use strict";
1417
1418var __extends = (this && this.__extends) || (function () {
1419    var extendStatics = function (d, b) {
1420        extendStatics = Object.setPrototypeOf ||
1421            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1422            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1423        return extendStatics(d, b);
1424    }
1425    return function (d, b) {
1426        extendStatics(d, b);
1427        function __() { this.constructor = d; }
1428        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1429    };
1430})();
1431Object.defineProperty(exports, "__esModule", { value: true });
1432var common_utils_1 = __webpack_require__(40);
1433var pds_local_storage_1 = __webpack_require__(45);
1434var pds_utils_1 = __webpack_require__(18);
1435var PdsI18n = (function (_super) {
1436    __extends(PdsI18n, _super);
1437    function PdsI18n() {
1438        var _this = _super !== null && _super.apply(this, arguments) || this;
1439        _this.pds = undefined;
1440        _this.newMessageKeys = {};
1441        _this.ckEditorEnglishMessages = {};
1442        return _this;
1443    }
1444    PdsI18n.prototype.setLocale = function (locale) {
1445        this.locale = locale;
1446        var elements = document.querySelectorAll('.pds-widget');
1447        for (var i = 0; i < elements.length; i++) {
1448            var element = elements[i];
1449            if (typeof element.messageKeysUpdated === 'function') {
1450                element.messageKeysUpdated();
1451            }
1452        }
1453    };
1454    PdsI18n.prototype.getNewMessageKeys = function () {
1455        var result = '';
1456        for (var _i = 0, _a = Object.keys(this.newMessageKeys); _i < _a.length; _i++) {
1457            var key = _a[_i];
1458            result += "\"" + key + "\": \"" + this.newMessageKeys[key] + "\",\n";
1459        }
1460        return result;
1461    };
1462    PdsI18n.prototype.stripContextFromKey = function (key) {
1463        var message = _super.prototype.stripContextFromKey.call(this, key);
1464        if (message != null && pds_local_storage_1.pdsLocalStorage.getPersistedBoolean('dev-mode')) {
1465            this.newMessageKeys[key] = message;
1466        }
1467        return message;
1468    };
1469    PdsI18n.prototype.updateCKEditorMessageKeys = function (messageKeysTree, scope) {
1470        if (scope === void 0) { scope = ''; }
1471        for (var _i = 0, _a = Object.keys(messageKeysTree); _i < _a.length; _i++) {
1472            var key = _a[_i];
1473            var current = messageKeysTree[key];
1474            if (typeof current === 'string') {
1475                var message = current;
1476                var englishMessagesKey = scope + '.' + key;
1477                if (!this.ckEditorEnglishMessages.hasOwnProperty(englishMessagesKey)) {
1478                    this.ckEditorEnglishMessages[englishMessagesKey] = message;
1479                }
1480                var englishMessage = this.ckEditorEnglishMessages[englishMessagesKey];
1481                var messageKey = 'pds|ckeditor|' + englishMessage;
1482                messageKeysTree[key] = this.getText(messageKey);
1483            }
1484            else {
1485                this.updateCKEditorMessageKeys(current, scope + '.' + key);
1486            }
1487        }
1488    };
1489    return PdsI18n;
1490}(common_utils_1.I18nUtil));
1491exports.pdsI18n = pds_utils_1.pdsUtils.createFlattenedClassInstance(PdsI18n);
1492exports.pdsI18n.messageKeys['pds|popover|Navigating From Single Element'] = 'Alert: navigating away from this entry will close the popup menu';
1493exports.pdsI18n.messageKeys['pds|popover|Forwards From Last Element'] = 'Alert: navigating past the last entry will close the popup menu';
1494exports.pdsI18n.messageKeys['pds|popover|Backwards From First Element'] = 'Alert: navigating backwards past the first entry will close the popup menu';
1495exports.pdsI18n.messageKeys['pds|copyright clause|Copyright Clause'] = '© 2010-2018 PowerSchool Group LLC and/or its affiliate(s). All rights reserved. All trademarks are either owned or licensed by PowerSchool Group LLC and/or its affiliates.';
1496exports.pdsI18n.messageKeys['pds|close-message'] = 'Close {{arg0}} Navigation';
1497exports.pdsI18n.messageKeys['pds|class picker|xx Classes'] = '{{arg0}} Classes';
1498exports.pdsI18n.messageKeys['pds|circular progress|xx% Complete'] = '{{percent}}% Complete';
1499exports.pdsI18n.messageKeys['pds|circular progress|xx of xx'] = '{{value}} of {{max}}';
1500exports.pdsI18n.messageKeys['pds|class picker|xx - xx Classes'] = '{{arg0}} - {{arg1}} Classes';
1501exports.pdsI18n.messageKeys['pds|grid widget|Select xx'] = 'Select {{selectCriteria}}';
1502exports.pdsI18n.messageKeys['pds|grid widget|Remove Filter xx yy'] = 'Remove Filter {{filterName}} {{filterValue}}';
1503exports.pdsI18n.messageKeys['pds|grid widget|xx Results'] = '{{number}} Results';
1504exports.pdsI18n.messageKeys['pds|notifications|Messages regarding xx'] = 'Messages regarding {{name}}';
1505exports.pdsI18n.messageKeys['pds|search|student dropped xx classes'] = 'student dropped {{arg0}} classes';
1506exports.pdsI18n.messageKeys['pds|search|xx photo'] = '{{arg0}}\'s photo';
1507exports.pdsI18n.messageKeys['global|Select Previous xx'] = 'Select Previous {{item}}';
1508exports.pdsI18n.messageKeys['global|Select Next xx'] = 'Select Next {{item}}';
1509exports.pdsI18n.messageKeys['pds|global create menu widget|Navigate to xx xx'] = 'Navigate to {{arg0}} {{arg1}}';
1510exports.pdsI18n.messageKeys['pds|global create menu widget|Set xx xx to default action'] = 'Set {{arg0}} {{arg1}} as default action';
1511exports.pdsI18n.messageKeys['cu|multi-select|Remove Selection Status xx'] = 'Remove Selection Status {{selectionStatus}}';
1512
1513
1514
1515/***/ }),
1516/* 16 */
1517/***/ (function(module, __webpack_exports__, __webpack_require__) {
1518
1519"use strict";
1520
1521// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 1 modules
1522var Observable = __webpack_require__(2);
1523
1524// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isPromise.js
1525var isPromise = __webpack_require__(85);
1526
1527// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isArrayLike.js
1528var isArrayLike = __webpack_require__(84);
1529
1530// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/symbol/observable.js
1531var symbol_observable = __webpack_require__(27);
1532
1533// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js
1534/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
1535
1536function isInteropObservable(input) {
1537    return input && typeof input[symbol_observable["a" /* observable */]] === 'function';
1538}
1539
1540// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/symbol/iterator.js
1541var symbol_iterator = __webpack_require__(25);
1542
1543// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/isIterable.js
1544/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
1545
1546function isIterable(input) {
1547    return input && typeof input[symbol_iterator["a" /* iterator */]] === 'function';
1548}
1549
1550// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromArray.js
1551var fromArray = __webpack_require__(20);
1552
1553// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js
1554var Subscription = __webpack_require__(5);
1555
1556// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js
1557var subscribeToPromise = __webpack_require__(86);
1558
1559// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromPromise.js
1560/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToPromise PURE_IMPORTS_END */
1561
1562
1563
1564function fromPromise(input, scheduler) {
1565    if (!scheduler) {
1566        return new Observable["a" /* Observable */](Object(subscribeToPromise["a" /* subscribeToPromise */])(input));
1567    }
1568    else {
1569        return new Observable["a" /* Observable */](function (subscriber) {
1570            var sub = new Subscription["a" /* Subscription */]();
1571            sub.add(scheduler.schedule(function () {
1572                return input.then(function (value) {
1573                    sub.add(scheduler.schedule(function () {
1574                        subscriber.next(value);
1575                        sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
1576                    }));
1577                }, function (err) {
1578                    sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
1579                });
1580            }));
1581            return sub;
1582        });
1583    }
1584}
1585
1586// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js
1587var subscribeToIterable = __webpack_require__(87);
1588
1589// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromIterable.js
1590/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */
1591
1592
1593
1594
1595function fromIterable(input, scheduler) {
1596    if (!input) {
1597        throw new Error('Iterable cannot be null');
1598    }
1599    if (!scheduler) {
1600        return new Observable["a" /* Observable */](Object(subscribeToIterable["a" /* subscribeToIterable */])(input));
1601    }
1602    else {
1603        return new Observable["a" /* Observable */](function (subscriber) {
1604            var sub = new Subscription["a" /* Subscription */]();
1605            var iterator;
1606            sub.add(function () {
1607                if (iterator && typeof iterator.return === 'function') {
1608                    iterator.return();
1609                }
1610            });
1611            sub.add(scheduler.schedule(function () {
1612                iterator = input[symbol_iterator["a" /* iterator */]]();
1613                sub.add(scheduler.schedule(function () {
1614                    if (subscriber.closed) {
1615                        return;
1616                    }
1617                    var value;
1618                    var done;
1619                    try {
1620                        var result = iterator.next();
1621                        value = result.value;
1622                        done = result.done;
1623                    }
1624                    catch (err) {
1625                        subscriber.error(err);
1626                        return;
1627                    }
1628                    if (done) {
1629                        subscriber.complete();
1630                    }
1631                    else {
1632                        subscriber.next(value);
1633                        this.schedule();
1634                    }
1635                }));
1636            }));
1637            return sub;
1638        });
1639    }
1640}
1641
1642// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js
1643var subscribeToObservable = __webpack_require__(83);
1644
1645// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromObservable.js
1646/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable,_util_subscribeToObservable PURE_IMPORTS_END */
1647
1648
1649
1650
1651function fromObservable(input, scheduler) {
1652    if (!scheduler) {
1653        return new Observable["a" /* Observable */](Object(subscribeToObservable["a" /* subscribeToObservable */])(input));
1654    }
1655    else {
1656        return new Observable["a" /* Observable */](function (subscriber) {
1657            var sub = new Subscription["a" /* Subscription */]();
1658            sub.add(scheduler.schedule(function () {
1659                var observable = input[symbol_observable["a" /* observable */]]();
1660                sub.add(observable.subscribe({
1661                    next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
1662                    error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
1663                    complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
1664                }));
1665            }));
1666            return sub;
1667        });
1668    }
1669}
1670
1671// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeTo.js
1672var subscribeTo = __webpack_require__(82);
1673
1674// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/from.js
1675/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return from; });
1676/** PURE_IMPORTS_START _Observable,_util_isPromise,_util_isArrayLike,_util_isInteropObservable,_util_isIterable,_fromArray,_fromPromise,_fromIterable,_fromObservable,_util_subscribeTo PURE_IMPORTS_END */
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687function from(input, scheduler) {
1688    if (!scheduler) {
1689        if (input instanceof Observable["a" /* Observable */]) {
1690            return input;
1691        }
1692        return new Observable["a" /* Observable */](Object(subscribeTo["a" /* subscribeTo */])(input));
1693    }
1694    if (input != null) {
1695        if (isInteropObservable(input)) {
1696            return fromObservable(input, scheduler);
1697        }
1698        else if (Object(isPromise["a" /* isPromise */])(input)) {
1699            return fromPromise(input, scheduler);
1700        }
1701        else if (Object(isArrayLike["a" /* isArrayLike */])(input)) {
1702            return Object(fromArray["a" /* fromArray */])(input, scheduler);
1703        }
1704        else if (isIterable(input) || typeof input === 'string') {
1705            return fromIterable(input, scheduler);
1706        }
1707    }
1708    throw new TypeError((input !== null && typeof input || input) + ' is not observable');
1709}
1710
1711
1712/***/ }),
1713/* 17 */
1714/***/ (function(module, __webpack_exports__, __webpack_require__) {
1715
1716"use strict";
1717__webpack_require__.r(__webpack_exports__);
1718
1719// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
1720var tslib_es6 = __webpack_require__(0);
1721
1722// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/tryCatch.js
1723var tryCatch = __webpack_require__(14);
1724
1725// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/errorObject.js
1726var errorObject = __webpack_require__(6);
1727
1728// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/OuterSubscriber.js
1729var OuterSubscriber = __webpack_require__(4);
1730
1731// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js + 1 modules
1732var subscribeToResult = __webpack_require__(3);
1733
1734// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/audit.js
1735/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
1736
1737
1738
1739
1740
1741function audit(durationSelector) {
1742    return function auditOperatorFunction(source) {
1743        return source.lift(new AuditOperator(durationSelector));
1744    };
1745}
1746var AuditOperator = /*@__PURE__*/ (function () {
1747    function AuditOperator(durationSelector) {
1748        this.durationSelector = durationSelector;
1749    }
1750    AuditOperator.prototype.call = function (subscriber, source) {
1751        return source.subscribe(new audit_AuditSubscriber(subscriber, this.durationSelector));
1752    };
1753    return AuditOperator;
1754}());
1755var audit_AuditSubscriber = /*@__PURE__*/ (function (_super) {
1756    tslib_es6["a" /* __extends */](AuditSubscriber, _super);
1757    function AuditSubscriber(destination, durationSelector) {
1758        var _this = _super.call(this, destination) || this;
1759        _this.durationSelector = durationSelector;
1760        _this.hasValue = false;
1761        return _this;
1762    }
1763    AuditSubscriber.prototype._next = function (value) {
1764        this.value = value;
1765        this.hasValue = true;
1766        if (!this.throttled) {
1767            var duration = Object(tryCatch["a" /* tryCatch */])(this.durationSelector)(value);
1768            if (duration === errorObject["a" /* errorObject */]) {
1769                this.destination.error(errorObject["a" /* errorObject */].e);
1770            }
1771            else {
1772                var innerSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, duration);
1773                if (!innerSubscription || innerSubscription.closed) {
1774                    this.clearThrottle();
1775                }
1776                else {
1777                    this.add(this.throttled = innerSubscription);
1778                }
1779            }
1780        }
1781    };
1782    AuditSubscriber.prototype.clearThrottle = function () {
1783        var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
1784        if (throttled) {
1785            this.remove(throttled);
1786            this.throttled = null;
1787            throttled.unsubscribe();
1788        }
1789        if (hasValue) {
1790            this.value = null;
1791            this.hasValue = false;
1792            this.destination.next(value);
1793        }
1794    };
1795    AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
1796        this.clearThrottle();
1797    };
1798    AuditSubscriber.prototype.notifyComplete = function () {
1799        this.clearThrottle();
1800    };
1801    return AuditSubscriber;
1802}(OuterSubscriber["a" /* OuterSubscriber */]));
1803
1804// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/async.js
1805var scheduler_async = __webpack_require__(10);
1806
1807// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/timer.js
1808var timer = __webpack_require__(77);
1809
1810// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/auditTime.js
1811/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
1812
1813
1814
1815function auditTime(duration, scheduler) {
1816    if (scheduler === void 0) {
1817        scheduler = scheduler_async["a" /* async */];
1818    }
1819    return audit(function () { return Object(timer["a" /* timer */])(duration, scheduler); });
1820}
1821
1822// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/buffer.js
1823/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
1824
1825
1826
1827function buffer_buffer(closingNotifier) {
1828    return function bufferOperatorFunction(source) {
1829        return source.lift(new BufferOperator(closingNotifier));
1830    };
1831}
1832var BufferOperator = /*@__PURE__*/ (function () {
1833    function BufferOperator(closingNotifier) {
1834        this.closingNotifier = closingNotifier;
1835    }
1836    BufferOperator.prototype.call = function (subscriber, source) {
1837        return source.subscribe(new buffer_BufferSubscriber(subscriber, this.closingNotifier));
1838    };
1839    return BufferOperator;
1840}());
1841var buffer_BufferSubscriber = /*@__PURE__*/ (function (_super) {
1842    tslib_es6["a" /* __extends */](BufferSubscriber, _super);
1843    function BufferSubscriber(destination, closingNotifier) {
1844        var _this = _super.call(this, destination) || this;
1845        _this.buffer = [];
1846        _this.add(Object(subscribeToResult["a" /* subscribeToResult */])(_this, closingNotifier));
1847        return _this;
1848    }
1849    BufferSubscriber.prototype._next = function (value) {
1850        this.buffer.push(value);
1851    };
1852    BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
1853        var buffer = this.buffer;
1854        this.buffer = [];
1855        this.destination.next(buffer);
1856    };
1857    return BufferSubscriber;
1858}(OuterSubscriber["a" /* OuterSubscriber */]));
1859
1860// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
1861var Subscriber = __webpack_require__(1);
1862
1863// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/bufferCount.js
1864/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
1865
1866
1867function bufferCount(bufferSize, startBufferEvery) {
1868    if (startBufferEvery === void 0) {
1869        startBufferEvery = null;
1870    }
1871    return function bufferCountOperatorFunction(source) {
1872        return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
1873    };
1874}
1875var BufferCountOperator = /*@__PURE__*/ (function () {
1876    function BufferCountOperator(bufferSize, startBufferEvery) {
1877        this.bufferSize = bufferSize;
1878        this.startBufferEvery = startBufferEvery;
1879        if (!startBufferEvery || bufferSize === startBufferEvery) {
1880            this.subscriberClass = bufferCount_BufferCountSubscriber;
1881        }
1882        else {
1883            this.subscriberClass = bufferCount_BufferSkipCountSubscriber;
1884        }
1885    }
1886    BufferCountOperator.prototype.call = function (subscriber, source) {
1887        return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
1888    };
1889    return BufferCountOperator;
1890}());
1891var bufferCount_BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
1892    tslib_es6["a" /* __extends */](BufferCountSubscriber, _super);
1893    function BufferCountSubscriber(destination, bufferSize) {
1894        var _this = _super.call(this, destination) || this;
1895        _this.bufferSize = bufferSize;
1896        _this.buffer = [];
1897        return _this;
1898    }
1899    BufferCountSubscriber.prototype._next = function (value) {
1900        var buffer = this.buffer;
1901        buffer.push(value);
1902        if (buffer.length == this.bufferSize) {
1903            this.destination.next(buffer);
1904            this.buffer = [];
1905        }
1906    };
1907    BufferCountSubscriber.prototype._complete = function () {
1908        var buffer = this.buffer;
1909        if (buffer.length > 0) {
1910            this.destination.next(buffer);
1911        }
1912        _super.prototype._complete.call(this);
1913    };
1914    return BufferCountSubscriber;
1915}(Subscriber["a" /* Subscriber */]));
1916var bufferCount_BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
1917    tslib_es6["a" /* __extends */](BufferSkipCountSubscriber, _super);
1918    function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
1919        var _this = _super.call(this, destination) || this;
1920        _this.bufferSize = bufferSize;
1921        _this.startBufferEvery = startBufferEvery;
1922        _this.buffers = [];
1923        _this.count = 0;
1924        return _this;
1925    }
1926    BufferSkipCountSubscriber.prototype._next = function (value) {
1927        var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
1928        this.count++;
1929        if (count % startBufferEvery === 0) {
1930            buffers.push([]);
1931        }
1932        for (var i = buffers.length; i--;) {
1933            var buffer = buffers[i];
1934            buffer.push(value);
1935            if (buffer.length === bufferSize) {
1936                buffers.splice(i, 1);
1937                this.destination.next(buffer);
1938            }
1939        }
1940    };
1941    BufferSkipCountSubscriber.prototype._complete = function () {
1942        var _a = this, buffers = _a.buffers, destination = _a.destination;
1943        while (buffers.length > 0) {
1944            var buffer = buffers.shift();
1945            if (buffer.length > 0) {
1946                destination.next(buffer);
1947            }
1948        }
1949        _super.prototype._complete.call(this);
1950    };
1951    return BufferSkipCountSubscriber;
1952}(Subscriber["a" /* Subscriber */]));
1953
1954// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isScheduler.js
1955var isScheduler = __webpack_require__(12);
1956
1957// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/bufferTime.js
1958/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
1959
1960
1961
1962
1963function bufferTime(bufferTimeSpan) {
1964    var length = arguments.length;
1965    var scheduler = scheduler_async["a" /* async */];
1966    if (Object(isScheduler["a" /* isScheduler */])(arguments[arguments.length - 1])) {
1967        scheduler = arguments[arguments.length - 1];
1968        length--;
1969    }
1970    var bufferCreationInterval = null;
1971    if (length >= 2) {
1972        bufferCreationInterval = arguments[1];
1973    }
1974    var maxBufferSize = Number.POSITIVE_INFINITY;
1975    if (length >= 3) {
1976        maxBufferSize = arguments[2];
1977    }
1978    return function bufferTimeOperatorFunction(source) {
1979        return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
1980    };
1981}
1982var BufferTimeOperator = /*@__PURE__*/ (function () {
1983    function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
1984        this.bufferTimeSpan = bufferTimeSpan;
1985        this.bufferCreationInterval = bufferCreationInterval;
1986        this.maxBufferSize = maxBufferSize;
1987        this.scheduler = scheduler;
1988    }
1989    BufferTimeOperator.prototype.call = function (subscriber, source) {
1990        return source.subscribe(new bufferTime_BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
1991    };
1992    return BufferTimeOperator;
1993}());
1994var Context = /*@__PURE__*/ (function () {
1995    function Context() {
1996        this.buffer = [];
1997    }
1998    return Context;
1999}());
2000var bufferTime_BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
2001    tslib_es6["a" /* __extends */](BufferTimeSubscriber, _super);
2002    function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
2003        var _this = _super.call(this, destination) || this;
2004        _this.bufferTimeSpan = bufferTimeSpan;
2005        _this.bufferCreationInterval = bufferCreationInterval;
2006        _this.maxBufferSize = maxBufferSize;
2007        _this.scheduler = scheduler;
2008        _this.contexts = [];
2009        var context = _this.openContext();
2010        _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
2011        if (_this.timespanOnly) {
2012            var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
2013            _this.add(context.closeAction = scheduler.schedule(dispat
2013chBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
2014        }
2015        else {
2016            var closeState = { subscriber: _this, context: context };
2017            var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
2018            _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
2019            _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
2020        }
2021        return _this;
2022    }
2023    BufferTimeSubscriber.prototype._next = function (value) {
2024        var contexts = this.contexts;
2025        var len = contexts.length;
2026        var filledBufferContext;
2027        for (var i = 0; i < len; i++) {
2028            var context_1 = contexts[i];
2029            var buffer = context_1.buffer;
2030            buffer.push(value);
2031            if (buffer.length == this.maxBufferSize) {
2032                filledBufferContext = context_1;
2033            }
2034        }
2035        if (filledBufferContext) {
2036            this.onBufferFull(filledBufferContext);
2037        }
2038    };
2039    BufferTimeSubscriber.prototype._error = function (err) {
2040        this.contexts.length = 0;
2041        _super.prototype._error.call(this, err);
2042    };
2043    BufferTimeSubscriber.prototype._complete = function () {
2044        var _a = this, contexts = _a.contexts, destination = _a.destination;
2045        while (contexts.length > 0) {
2046            var context_2 = contexts.shift();
2047            destination.next(context_2.buffer);
2048        }
2049        _super.prototype._complete.call(this);
2050    };
2051    BufferTimeSubscriber.prototype._unsubscribe = function () {
2052        this.contexts = null;
2053    };
2054    BufferTimeSubscriber.prototype.onBufferFull = function (context) {
2055        this.closeContext(context);
2056        var closeAction = context.closeAction;
2057        closeAction.unsubscribe();
2058        this.remove(closeAction);
2059        if (!this.closed && this.timespanOnly) {
2060            context = this.openContext();
2061            var bufferTimeSpan = this.bufferTimeSpan;
2062            var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
2063            this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
2064        }
2065    };
2066    BufferTimeSubscriber.prototype.openContext = function () {
2067        var context = new Context();
2068        this.contexts.push(context);
2069        return context;
2070    };
2071    BufferTimeSubscriber.prototype.closeContext = function (context) {
2072        this.destination.next(context.buffer);
2073        var contexts = this.contexts;
2074        var spliceIndex = contexts ? contexts.indexOf(context) : -1;
2075        if (spliceIndex >= 0) {
2076            contexts.splice(contexts.indexOf(context), 1);
2077        }
2078    };
2079    return BufferTimeSubscriber;
2080}(Subscriber["a" /* Subscriber */]));
2081function dispatchBufferTimeSpanOnly(state) {
2082    var subscriber = state.subscriber;
2083    var prevContext = state.context;
2084    if (prevContext) {
2085        subscriber.closeContext(prevContext);
2086    }
2087    if (!subscriber.closed) {
2088        state.context = subscriber.openContext();
2089        state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
2090    }
2091}
2092function dispatchBufferCreation(state) {
2093    var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
2094    var context = subscriber.openContext();
2095    var action = this;
2096    if (!subscriber.closed) {
2097        subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
2098        action.schedule(state, bufferCreationInterval);
2099    }
2100}
2101function dispatchBufferClose(arg) {
2102    var subscriber = arg.subscriber, context = arg.context;
2103    subscriber.closeContext(context);
2104}
2105
2106// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js
2107var Subscription = __webpack_require__(5);
2108
2109// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js
2110/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
2111
2112
2113
2114
2115function bufferToggle(openings, closingSelector) {
2116    return function bufferToggleOperatorFunction(source) {
2117        return source.lift(new BufferToggleOperator(openings, closingSelector));
2118    };
2119}
2120var BufferToggleOperator = /*@__PURE__*/ (function () {
2121    function BufferToggleOperator(openings, closingSelector) {
2122        this.openings = openings;
2123        this.closingSelector = closingSelector;
2124    }
2125    BufferToggleOperator.prototype.call = function (subscriber, source) {
2126        return source.subscribe(new bufferToggle_BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
2127    };
2128    return BufferToggleOperator;
2129}());
2130var bufferToggle_BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
2131    tslib_es6["a" /* __extends */](BufferToggleSubscriber, _super);
2132    function BufferToggleSubscriber(destination, openings, closingSelector) {
2133        var _this = _super.call(this, destination) || this;
2134        _this.openings = openings;
2135        _this.closingSelector = closingSelector;
2136        _this.contexts = [];
2137        _this.add(Object(subscribeToResult["a" /* subscribeToResult */])(_this, openings));
2138        return _this;
2139    }
2140    BufferToggleSubscriber.prototype._next = function (value) {
2141        var contexts = this.contexts;
2142        var len = contexts.length;
2143        for (var i = 0; i < len; i++) {
2144            contexts[i].buffer.push(value);
2145        }
2146    };
2147    BufferToggleSubscriber.prototype._error = function (err) {
2148        var contexts = this.contexts;
2149        while (contexts.length > 0) {
2150            var context_1 = contexts.shift();
2151            context_1.subscription.unsubscribe();
2152            context_1.buffer = null;
2153            context_1.subscription = null;
2154        }
2155        this.contexts = null;
2156        _super.prototype._error.call(this, err);
2157    };
2158    BufferToggleSubscriber.prototype._complete = function () {
2159        var contexts = this.contexts;
2160        while (contexts.length > 0) {
2161            var context_2 = contexts.shift();
2162            this.destination.next(context_2.buffer);
2163            context_2.subscription.unsubscribe();
2164            context_2.buffer = null;
2165            context_2.subscription = null;
2166        }
2167        this.contexts = null;
2168        _super.prototype._complete.call(this);
2169    };
2170    BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
2171        outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
2172    };
2173    BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
2174        this.closeBuffer(innerSub.context);
2175    };
2176    BufferToggleSubscriber.prototype.openBuffer = function (value) {
2177        try {
2178            var closingSelector = this.closingSelector;
2179            var closingNotifier = closingSelector.call(this, value);
2180            if (closingNotifier) {
2181                this.trySubscribe(closingNotifier);
2182            }
2183        }
2184        catch (err) {
2185            this._error(err);
2186        }
2187    };
2188    BufferToggleSubscriber.prototype.closeBuffer = function (context) {
2189        var contexts = this.contexts;
2190        if (contexts && context) {
2191            var buffer = context.buffer, subscription = context.subscription;
2192            this.destination.next(buffer);
2193            contexts.splice(contexts.indexOf(context), 1);
2194            this.remove(subscription);
2195            subscription.unsubscribe();
2196        }
2197    };
2198    BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
2199        var contexts = this.contexts;
2200        var buffer = [];
2201        var subscription = new Subscription["a" /* Subscription */]();
2202        var context = { buffer: buffer, subscription: subscription };
2203        contexts.push(context);
2204        var innerSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, closingNotifier, context);
2205        if (!innerSubscription || innerSubscription.closed) {
2206            this.closeBuffer(context);
2207        }
2208        else {
2209            innerSubscription.context = context;
2210            this.add(innerSubscription);
2211            subscription.add(innerSubscription);
2212        }
2213    };
2214    return BufferToggleSubscriber;
2215}(OuterSubscriber["a" /* OuterSubscriber */]));
2216
2217// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js
2218/** PURE_IMPORTS_START tslib,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
2219
2220
2221
2222
2223
2224
2225function bufferWhen(closingSelector) {
2226    return function (source) {
2227        return source.lift(new BufferWhenOperator(closingSelector));
2228    };
2229}
2230var BufferWhenOperator = /*@__PURE__*/ (function () {
2231    function BufferWhenOperator(closingSelector) {
2232        this.closingSelector = closingSelector;
2233    }
2234    BufferWhenOperator.prototype.call = function (subscriber, source) {
2235        return source.subscribe(new bufferWhen_BufferWhenSubscriber(subscriber, this.closingSelector));
2236    };
2237    return BufferWhenOperator;
2238}());
2239var bufferWhen_BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
2240    tslib_es6["a" /* __extends */](BufferWhenSubscriber, _super);
2241    function BufferWhenSubscriber(destination, closingSelector) {
2242        var _this = _super.call(this, destination) || this;
2243        _this.closingSelector = closingSelector;
2244        _this.subscribing = false;
2245        _this.openBuffer();
2246        return _this;
2247    }
2248    BufferWhenSubscriber.prototype._next = function (value) {
2249        this.buffer.push(value);
2250    };
2251    BufferWhenSubscriber.prototype._complete = function () {
2252        var buffer = this.buffer;
2253        if (buffer) {
2254            this.destination.next(buffer);
2255        }
2256        _super.prototype._complete.call(this);
2257    };
2258    BufferWhenSubscriber.prototype._unsubscribe = function () {
2259        this.buffer = null;
2260        this.subscribing = false;
2261    };
2262    BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
2263        this.openBuffer();
2264    };
2265    BufferWhenSubscriber.prototype.notifyComplete = function () {
2266        if (this.subscribing) {
2267            this.complete();
2268        }
2269        else {
2270            this.openBuffer();
2271        }
2272    };
2273    BufferWhenSubscriber.prototype.openBuffer = function () {
2274        var closingSubscription = this.closingSubscription;
2275        if (closingSubscription) {
2276            this.remove(closingSubscription);
2277            closingSubscription.unsubscribe();
2278        }
2279        var buffer = this.buffer;
2280        if (this.buffer) {
2281            this.destination.next(buffer);
2282        }
2283        this.buffer = [];
2284        var closingNotifier = Object(tryCatch["a" /* tryCatch */])(this.closingSelector)();
2285        if (closingNotifier === errorObject["a" /* errorObject */]) {
2286            this.error(errorObject["a" /* errorObject */].e);
2287        }
2288        else {
2289            closingSubscription = new Subscription["a" /* Subscription */]();
2290            this.closingSubscription = closingSubscription;
2291            this.add(closingSubscription);
2292            this.subscribing = true;
2293            closingSubscription.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, closingNotifier));
2294            this.subscribing = false;
2295        }
2296    };
2297    return BufferWhenSubscriber;
2298}(OuterSubscriber["a" /* OuterSubscriber */]));
2299
2300// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/catchError.js
2301/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
2302
2303
2304
2305function catchError(selector) {
2306    return function catchErrorOperatorFunction(source) {
2307        var operator = new CatchOperator(selector);
2308        var caught = source.lift(operator);
2309        return (operator.caught = caught);
2310    };
2311}
2312var CatchOperator = /*@__PURE__*/ (function () {
2313    function CatchOperator(selector) {
2314        this.selector = selector;
2315    }
2316    CatchOperator.prototype.call = function (subscriber, source) {
2317        return source.subscribe(new catchError_CatchSubscriber(subscriber, this.selector, this.caught));
2318    };
2319    return CatchOperator;
2320}());
2321var catchError_CatchSubscriber = /*@__PURE__*/ (function (_super) {
2322    tslib_es6["a" /* __extends */](CatchSubscriber, _super);
2323    function CatchSubscriber(destination, selector, caught) {
2324        var _this = _super.call(this, destination) || this;
2325        _this.selector = selector;
2326        _this.caught = caught;
2327        return _this;
2328    }
2329    CatchSubscriber.prototype.error = function (err) {
2330        if (!this.isStopped) {
2331            var result = void 0;
2332            try {
2333                result = this.selector(err, this.caught);
2334            }
2335            catch (err2) {
2336                _super.prototype.error.call(this, err2);
2337                return;
2338            }
2339            this._unsubscribeAndRecycle();
2340            this.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, result));
2341        }
2342    };
2343    return CatchSubscriber;
2344}(OuterSubscriber["a" /* OuterSubscriber */]));
2345
2346// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/combineLatest.js
2347var combineLatest = __webpack_require__(52);
2348
2349// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/combineAll.js
2350/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
2351
2352function combineAll(project) {
2353    return function (source) { return source.lift(new combineLatest["a" /* CombineLatestOperator */](project)); };
2354}
2355
2356// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isArray.js
2357var isArray = __webpack_require__(11);
2358
2359// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/from.js + 5 modules
2360var from = __webpack_require__(16);
2361
2362// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/combineLatest.js
2363/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
2364
2365
2366
2367var none = {};
2368function combineLatest_combineLatest() {
2369    var observables = [];
2370    for (var _i = 0; _i < arguments.length; _i++) {
2371        observables[_i] = arguments[_i];
2372    }
2373    var project = null;
2374    if (typeof observables[observables.length - 1] === 'function') {
2375        project = observables.pop();
2376    }
2377    if (observables.length === 1 && Object(isArray["a" /* isArray */])(observables[0])) {
2378        observables = observables[0].slice();
2379    }
2380    return function (source) { return source.lift.call(Object(from["a" /* from */])([source].concat(observables)), new combineLatest["a" /* CombineLatestOperator */](project)); };
2381}
2382
2383// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/concat.js
2384var concat = __webpack_require__(29);
2385
2386// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/concat.js
2387/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
2388
2389function concat_concat() {
2390    var observables = [];
2391    for (var _i = 0; _i < arguments.length; _i++) {
2392        observables[_i] = arguments[_i];
2393    }
2394    return function (source) { return source.lift.call(concat["a" /* concat */].apply(void 0, [source].concat(observables))); };
2395}
2396
2397// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/concatAll.js
2398var concatAll = __webpack_require__(74);
2399
2400// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/mergeMap.js
2401var mergeMap = __webpack_require__(32);
2402
2403// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/concatMap.js
2404/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
2405
2406function concatMap(project, resultSelector) {
2407    return Object(mergeMap["a" /* mergeMap */])(project, resultSelector, 1);
2408}
2409
2410// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js
2411/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
2412
2413function concatMapTo(innerObservable, resultSelector) {
2414    return concatMap(function () { return innerObservable; }, resultSelector);
2415}
2416
2417// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/count.js
2418/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
2419
2420
2421function count_count(predicate) {
2422    return function (source) { return source.lift(new CountOperator(predicate, source)); };
2423}
2424var CountOperator = /*@__PURE__*/ (function () {
2425    function CountOperator(predicate, source) {
2426        this.predicate = predicate;
2427        this.source = source;
2428    }
2429    CountOperator.prototype.call = function (subscriber, source) {
2430        return source.subscribe(new count_CountSubscriber(subscriber, this.predicate, this.source));
2431    };
2432    return CountOperator;
2433}());
2434var count_CountSubscriber = /*@__PURE__*/ (function (_super) {
2435    tslib_es6["a" /* __extends */](CountSubscriber, _super);
2436    function CountSubscriber(destination, predicate, source) {
2437        var _this = _super.call(this, destination) || this;
2438        _this.predicate = predicate;
2439        _this.source = source;
2440        _this.count = 0;
2441        _this.index = 0;
2442        return _this;
2443    }
2444    CountSubscriber.prototype._next = function (value) {
2445        if (this.predicate) {
2446            this._tryPredicate(value);
2447        }
2448        else {
2449            this.count++;
2450        }
2451    };
2452    CountSubscriber.prototype._tryPredicate = function (value) {
2453        var result;
2454        try {
2455            result = this.predicate(value, this.index++, this.source);
2456        }
2457        catch (err) {
2458            this.destination.error(err);
2459            return;
2460        }
2461        if (result) {
2462            this.count++;
2463        }
2464    };
2465    CountSubscriber.prototype._complete = function () {
2466        this.destination.next(this.count);
2467        this.destination.complete();
2468    };
2469    return CountSubscriber;
2470}(Subscriber["a" /* Subscriber */]));
2471
2472// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/debounce.js
2473/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
2474
2475
2476
2477function debounce(durationSelector) {
2478    return function (source) { return source.lift(new DebounceOperator(
2478durationSelector)); };
2479}
2480var DebounceOperator = /*@__PURE__*/ (function () {
2481    function DebounceOperator(durationSelector) {
2482        this.durationSelector = durationSelector;
2483    }
2484    DebounceOperator.prototype.call = function (subscriber, source) {
2485        return source.subscribe(new debounce_DebounceSubscriber(subscriber, this.durationSelector));
2486    };
2487    return DebounceOperator;
2488}());
2489var debounce_DebounceSubscriber = /*@__PURE__*/ (function (_super) {
2490    tslib_es6["a" /* __extends */](DebounceSubscriber, _super);
2491    function DebounceSubscriber(destination, durationSelector) {
2492        var _this = _super.call(this, destination) || this;
2493        _this.durationSelector = durationSelector;
2494        _this.hasValue = false;
2495        _this.durationSubscription = null;
2496        return _this;
2497    }
2498    DebounceSubscriber.prototype._next = function (value) {
2499        try {
2500            var result = this.durationSelector.call(this, value);
2501            if (result) {
2502                this._tryNext(value, result);
2503            }
2504        }
2505        catch (err) {
2506            this.destination.error(err);
2507        }
2508    };
2509    DebounceSubscriber.prototype._complete = function () {
2510        this.emitValue();
2511        this.destination.complete();
2512    };
2513    DebounceSubscriber.prototype._tryNext = function (value, duration) {
2514        var subscription = this.durationSubscription;
2515        this.value = value;
2516        this.hasValue = true;
2517        if (subscription) {
2518            subscription.unsubscribe();
2519            this.remove(subscription);
2520        }
2521        subscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, duration);
2522        if (subscription && !subscription.closed) {
2523            this.add(this.durationSubscription = subscription);
2524        }
2525    };
2526    DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
2527        this.emitValue();
2528    };
2529    DebounceSubscriber.prototype.notifyComplete = function () {
2530        this.emitValue();
2531    };
2532    DebounceSubscriber.prototype.emitValue = function () {
2533        if (this.hasValue) {
2534            var value = this.value;
2535            var subscription = this.durationSubscription;
2536            if (subscription) {
2537                this.durationSubscription = null;
2538                subscription.unsubscribe();
2539                this.remove(subscription);
2540            }
2541            this.value = null;
2542            this.hasValue = false;
2543            _super.prototype._next.call(this, value);
2544        }
2545    };
2546    return DebounceSubscriber;
2547}(OuterSubscriber["a" /* OuterSubscriber */]));
2548
2549// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/debounceTime.js
2550/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
2551
2552
2553
2554function debounceTime(dueTime, scheduler) {
2555    if (scheduler === void 0) {
2556        scheduler = scheduler_async["a" /* async */];
2557    }
2558    return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
2559}
2560var DebounceTimeOperator = /*@__PURE__*/ (function () {
2561    function DebounceTimeOperator(dueTime, scheduler) {
2562        this.dueTime = dueTime;
2563        this.scheduler = scheduler;
2564    }
2565    DebounceTimeOperator.prototype.call = function (subscriber, source) {
2566        return source.subscribe(new debounceTime_DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
2567    };
2568    return DebounceTimeOperator;
2569}());
2570var debounceTime_DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
2571    tslib_es6["a" /* __extends */](DebounceTimeSubscriber, _super);
2572    function DebounceTimeSubscriber(destination, dueTime, scheduler) {
2573        var _this = _super.call(this, destination) || this;
2574        _this.dueTime = dueTime;
2575        _this.scheduler = scheduler;
2576        _this.debouncedSubscription = null;
2577        _this.lastValue = null;
2578        _this.hasValue = false;
2579        return _this;
2580    }
2581    DebounceTimeSubscriber.prototype._next = function (value) {
2582        this.clearDebounce();
2583        this.lastValue = value;
2584        this.hasValue = true;
2585        this.add(this.debouncedSubscription = this.scheduler.schedule(dispat
2585chNext, this.dueTime, this));
2586    };
2587    DebounceTimeSubscriber.prototype._complete = function () {
2588        this.debouncedNext();
2589        this.destination.complete();
2590    };
2591    DebounceTimeSubscriber.prototype.debouncedNext = function () {
2592        this.clearDebounce();
2593        if (this.hasValue) {
2594            var lastValue = this.lastValue;
2595            this.lastValue = null;
2596            this.hasValue = false;
2597            this.destination.next(lastValue);
2598        }
2599    };
2600    DebounceTimeSubscriber.prototype.clearDebounce = function () {
2601        var debouncedSubscription = this.debouncedSubscription;
2602        if (debouncedSubscription !== null) {
2603            this.remove(debouncedSubscription);
2604            debouncedSubscription.unsubscribe();
2605            this.debouncedSubscription = null;
2606        }
2607    };
2608    return DebounceTimeSubscriber;
2609}(Subscriber["a" /* Subscriber */]));
2610function dispatchNext(subscriber) {
2611    subscriber.debouncedNext();
2612}
2613
2614// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js
2615/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
2616
2617
2618function defaultIfEmpty(defaultValue) {
2619    if (defaultValue === void 0) {
2620        defaultValue = null;
2621    }
2622    return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
2623}
2624var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
2625    function DefaultIfEmptyOperator(defaultValue) {
2626        this.defaultValue = defaultValue;
2627    }
2628    DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
2629        return source.subscribe(new defaultIfEmpty_DefaultIfEmptySubscriber(subscriber, this.defaultValue));
2630    };
2631    return DefaultIfEmptyOperator;
2632}());
2633var defaultIfEmpty_DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
2634    tslib_es6["a" /* __extends */](DefaultIfEmptySubscriber, _super);
2635    function DefaultIfEmptySubscriber(destination, defaultValue) {
2636        var _this = _super.call(this, destination) || this;
2637        _this.defaultValue = defaultValue;
2638        _this.isEmpty = true;
2639        return _this;
2640    }
2641    DefaultIfEmptySubscriber.prototype._next = function (value) {
2642        this.isEmpty = false;
2643        this.destination.next(value);
2644    };
2645    DefaultIfEmptySubscriber.prototype._complete = function () {
2646        if (this.isEmpty) {
2647            this.destination.next(this.defaultValue);
2648        }
2649        this.destination.complete();
2650    };
2651    return DefaultIfEmptySubscriber;
2652}(Subscriber["a" /* Subscriber */]));
2653
2654// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/isDate.js
2655/** PURE_IMPORTS_START  PURE_IMPORTS_END */
2656function isDate(value) {
2657    return value instanceof Date && !isNaN(+value);
2658}
2659
2660// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Notification.js
2661var Notification = __webpack_require__(24);
2662
2663// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/delay.js
2664/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
2665
2666
2667
2668
2669
2670function delay_delay(delay, scheduler) {
2671    if (scheduler === void 0) {
2672        scheduler = scheduler_async["a" /* async */];
2673    }
2674    var absoluteDelay = isDate(delay);
2675    var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
2676    return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
2677}
2678var DelayOperator = /*@__PURE__*/ (function () {
2679    function DelayOperator(delay, scheduler) {
2680        this.delay = delay;
2681        this.scheduler = scheduler;
2682    }
2683    DelayOperator.prototype.call = function (subscriber, source) {
2684        return source.subscribe(new delay_DelaySubscriber(subscriber, this.delay, this.scheduler));
2685    };
2686    return DelayOperator;
2687}());
2688var delay_DelaySubscriber = /*@__PURE__*/ (function (_super) {
2689    tslib_es6["a" /* __extends */](DelaySubscriber, _super);
2690    function DelaySubscriber(destination, delay, scheduler) {
2691        var _this = _super.call(this, destination) || this;
2692        _this.delay = delay;
2693        _this.scheduler = scheduler;
2694        _this.queue = [];
2695        _this.active = false;
2696        _this.errored = false;
2697        return _this;
2698    }
2699    DelaySubscriber.dispatch = function (state) {
2700        var source = state.source;
2701        var queue = source.queue;
2702        var scheduler = state.scheduler;
2703        var destination = state.destination;
2704        while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
2705            queue.shift().notification.observe(destination);
2706        }
2707        if (queue.length > 0) {
2708            var delay_1 = Math.max(0, queue[0].time - scheduler.now());
2709            this.schedule(state, delay_1);
2710        }
2711        else {
2712            this.unsubscribe();
2713            source.active = false;
2714        }
2715    };
2716    DelaySubscriber.prototype._schedule = function (scheduler) {
2717        this.active = true;
2718        this.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
2719            source: this, destination: this.destination, scheduler: scheduler
2720        }));
2721    };
2722    DelaySubscriber.prototype.scheduleNotification = function (notification) {
2723        if (this.errored === true) {
2724            return;
2725        }
2726        var scheduler = this.scheduler;
2727        var message = new DelayMessage(scheduler.now() + this.delay, notification);
2728        this.queue.push(message);
2729        if (this.active === false) {
2730            this._schedule(scheduler);
2731        }
2732    };
2733    DelaySubscriber.prototype._next = function (value) {
2734        this.scheduleNotification(Notification["a" /* Notification */].createNext(value));
2735    };
2736    DelaySubscriber.prototype._error = function (err) {
2737        this.errored = true;
2738        this.queue = [];
2739        this.destination.error(err);
2740    };
2741    DelaySubscriber.prototype._complete = function () {
2742        this.scheduleNotification(Notification["a" /* Notification */].createComplete());
2743    };
2744    return DelaySubscriber;
2745}(Subscriber["a" /* Subscriber */]));
2746var DelayMessage = /*@__PURE__*/ (function () {
2747    function DelayMessage(time, notification) {
2748        this.time = time;
2749        this.notification = notification;
2750    }
2751    return DelayMessage;
2752}());
2753
2754// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 1 modules
2755var Observable = __webpack_require__(2);
2756
2757// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/delayWhen.js
2758/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
2759
2760
2761
2762
2763
2764function delayWhen(delayDurationSelector, subscriptionDelay) {
2765    if (subscriptionDelay) {
2766        return function (source) {
2767            return new delayWhen_SubscriptionDelayObservable(source, subscriptionDelay)
2768                .lift(new DelayWhenOperator(delayDurationSelector));
2769        };
2770    }
2771    return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
2772}
2773var DelayWhenOperator = /*@__PURE__*/ (function () {
2774    function DelayWhenOperator(delayDurationSelector) {
2775        this.delayDurationSelector = delayDurationSelector;
2776    }
2777    DelayWhenOperator.prototype.call = function (subscriber, source) {
2778        return source.subscribe(new delayWhen_DelayWhenSubscriber(subscriber, this.delayDurationSelector));
2779    };
2780    return DelayWhenOperator;
2781}());
2782var delayWhen_DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
2783    tslib_es6["a" /* __extends */](DelayWhenSubscriber, _super);
2784    function DelayWhenSubscriber(destination, delayDurationSelector) {
2785        var _this = _super.call(this, destination) || this;
2786        _this.delayDurationSelector = delayDurationSelector;
2787        _this.completed = false;
2788        _this.delayNotifierSubscriptions = [];
2789        return _this;
2790    }
2791    DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
2792        this.destination.next(outerValue);
2793        this.removeSubscription(innerSub);
2794        this.tryComplete();
2795    };
2796    DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
2797        this._error(error);
2798    };
2799    DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
2800        var value = this.removeSubscription(innerSub);
2801        if (value) {
2802            this.destination.next(value);
2803        }
2804        this.tryComplete();
2805    };
2806    DelayWhenSubscriber.prototype._next = function (value) {
2807        try {
2808            var delayNotifier = this.delayDurationSelector(value);
2809            if (delayNotifier) {
2810                this.tryDelay(delayNotifier, value);
2811            }
2812        }
2813        catch (err) {
2814            this.destination.error(err);
2815        }
2816    };
2817    DelayWhenSubscriber.prototype._complete = function () {
2818        this.completed = true;
2819        this.tryComplete();
2820    };
2821    DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
2822        subscription.unsubscribe();
2823        var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
2824        if (subscriptionIdx !== -1) {
2825            this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
2826        }
2827        return subscription.outerValue;
2828    };
2829    DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
2830        var notifierSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, delayNotifier, value);
2831        if (notifierSubscription && !notifierSubscription.closed) {
2832            this.add(notifierSubscription);
2833            this.delayNotifierSubscriptions.push(notifierSubscription);
2834        }
2835    };
2836    DelayWhenSubscriber.prototype.tryComplete = function () {
2837        if (this.completed && this.delayNotifierSubscriptions.length === 0) {
2838            this.destination.complete();
2839        }
2840    };
2841    return DelayWhenSubscriber;
2842}(OuterSubscriber["a" /* OuterSubscriber */]));
2843var delayWhen_SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
2844    tslib_es6["a" /* __extends */](SubscriptionDelayObservable, _super);
2845    function SubscriptionDelayObservable(source, subscriptionDelay) {
2846        var _this = _super.call(this) || this;
2847        _this.source = source;
2848        _this.subscriptionDelay = subscriptionDelay;
2849        return _this;
2850    }
2851    SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
2852        this.subscriptionDelay.subscribe(new delayWhen_SubscriptionDelaySubscriber(subscriber, this.source));
2853    };
2854    return SubscriptionDelayObservable;
2855}
2855(Observable["a" /* Observable */]));
2856var delayWhen_SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
2857    tslib_es6["a" /* __extends */](SubscriptionDelaySubscriber, _super);
2858    function SubscriptionDelaySubscriber(parent, source) {
2859        var _this = _super.call(this) || this;
2860        _this.parent = parent;
2861        _this.source = source;
2862        _this.sourceSubscribed = false;
2863        return _this;
2864    }
2865    SubscriptionDelaySubscriber.prototype._next = function (unused) {
2866        this.subscribeToSource();
2867    };
2868    SubscriptionDelaySubscriber.prototype._error = function (err) {
2869        this.unsubscribe();
2870        this.parent.error(err);
2871    };
2872    SubscriptionDelaySubscriber.prototype._complete = function () {
2873        this.subscribeToSource();
2874    };
2875    SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
2876        if (!this.sourceSubscribed) {
2877            this.sourceSubscribed = true;
2878            this.unsubscribe();
2879            this.source.subscribe(this.parent);
2880        }
2881    };
2882    return SubscriptionDelaySubscriber;
2883}(Subscriber["a" /* Subscriber */]));
2884
2885// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/dematerialize.js
2886/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
2887
2888
2889function dematerialize() {
2890    return function dematerializeOperatorFunction(source) {
2891        return source.lift(new DeMaterializeOperator());
2892    };
2893}
2894var DeMaterializeOperator = /*@__PURE__*/ (function () {
2895    function DeMaterializeOperator() {
2896    }
2897    DeMaterializeOperator.prototype.call = function (subscriber, source) {
2898        return source.subscribe(new dematerialize_DeMaterializeSubscriber(subscriber));
2899    };
2900    return DeMaterializeOperator;
2901}());
2902var dematerialize_DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
2903    tslib_es6["a" /* __extends */](DeMaterializeSubscriber, _super);
2904    function DeMaterializeSubscriber(destination) {
2905        return _super.call(this, destination) || this;
2906    }
2907    DeMaterializeSubscriber.prototype._next = function (value) {
2908        value.observe(this.destination);
2909    };
2910    return DeMaterializeSubscriber;
2911}(Subscriber["a" /* Subscriber */]));
2912
2913// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/distinct.js
2914/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
2915
2916
2917
2918function distinct(keySelector, flushes) {
2919    return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
2920}
2921var DistinctOperator = /*@__PURE__*/ (function () {
2922    function DistinctOperator(keySelector, flushes) {
2923        this.keySelector = keySelector;
2924        this.flushes = flushes;
2925    }
2926    DistinctOperator.prototype.call = function (subscriber, source) {
2927        return source.subscribe(new distinct_DistinctSubscriber(subscriber, this.keySelector, this.flushes));
2928    };
2929    return DistinctOperator;
2930}());
2931var distinct_DistinctSubscriber = /*@__PURE__*/ (function (_super) {
2932    tslib_es6["a" /* __extends */](DistinctSubscriber, _super);
2933    function DistinctSubscriber(destination, keySelector, flushes) {
2934        var _this = _super.call(this, destination) || this;
2935        _this.keySelector = keySelector;
2936        _this.values = new Set();
2937        if (flushes) {
2938            _this.add(Object(subscribeToResult["a" /* subscribeToResult */])(_this, flushes));
2939        }
2940        return _this;
2941    }
2942    DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
2943        this.values.clear();
2944    };
2945    DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
2946        this._error(error);
2947    };
2948    DistinctSubscriber.prototype._next = function (value) {
2949        if (this.keySelector) {
2950            this._useKeySelector(value);
2951        }
2952        else {
2953            this._finalizeNext(value, value);
2954        }
2955    };
2956    DistinctSubscriber.prototype._useKeySelector = function (value) {
2957        var key;
2958        var destination = this.destination;
2959        try {
2960            key = this.keySelector(value);
2961        }
2962        catch (err) {
2963            destination.error(err);
2964            return;
2965        }
2966        this._finalizeNext(key, value);
2967    };
2968    DistinctSubscriber.prototype._finalizeNext = function (key, value) {
2969        var values = this.values;
2970        if (!values.has(key)) {
2971            values.add(key);
2972            this.destination.next(value);
2973        }
2974    };
2975    return DistinctSubscriber;
2976}(OuterSubscriber["a" /* OuterSubscriber */]));
2977
2978
2979// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js
2980/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
2981
2982
2983
2984
2985function distinctUntilChanged(compare, keySelector) {
2986    return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
2987}
2988var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
2989    function DistinctUntilChangedOperator(compare, keySelector) {
2990        this.compare = compare;
2991        this.keySelector = keySelector;
2992    }
2993    DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
2994        return source.subscribe(new distinctUntilChanged_DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
2995    };
2996    return DistinctUntilChangedOperator;
2997}());
2998var distinctUntilChanged_DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
2999    tslib_es6["a" /* __extends */](DistinctUntilChangedSubscriber, _super);
3000    function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
3001        var _this = _super.call(this, destination) || this;
3002        _this.keySelector = keySelector;
3003        _this.hasKey = false;
3004        if (typeof compare === 'function') {
3005            _this.compare = compare;
3006        }
3007        return _this;
3008    }
3009    DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
3010        return x === y;
3011    };
3012    DistinctUntilChangedSubscriber.prototype._next = function (value) {
3013        var keySelector = this.keySelector;
3014        var key = value;
3015        if (keySelector) {
3016            key = Object(tryCatch["a" /* tryCatch */])(this.keySelector)(value);
3017            if (key === errorObject["a" /* errorObject */]) {
3018                return this.destination.error(errorObject["a" /* errorObject */].e);
3019            }
3020        }
3021        var result = false;
3022        if (this.hasKey) {
3023            result = Object(tryCatch["a" /* tryCatch */])(this.compare)(this.key, key);
3024            if (result === errorObject["a" /* errorObject */]) {
3025                return this.destination.error(errorObject["a" /* errorObject */].e);
3026            }
3027        }
3028        else {
3029            this.hasKey = true;
3030        }
3031        if (Boolean(result) === false) {
3032            this.key = key;
3033            this.destination.next(value);
3034        }
3035    };
3036    return DistinctUntilChangedSubscriber;
3037}(Subscriber["a" /* Subscriber */]));
3038
3039// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js
3040/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
3041
3042function distinctUntilKeyChanged(key, compare) {
3043    return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
3044}
3045
3046// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js
3047var ArgumentOutOfRangeError = __webpack_require__(33);
3048
3049// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/filter.js
3050/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3051
3052
3053function filter(predicate, thisArg) {
3054    return function filterOperatorFunction(source) {
3055        return source.lift(new FilterOperator(predicate, thisArg));
3056    };
3057}
3058var FilterOperator = /*@__PURE__*/ (function () {
3059    function FilterOperator(predicate, thisArg) {
3060        this.predicate = predicate;
3061        this.thisArg = thisArg;
3062    }
3063    FilterOperator.prototype.call = function (subscriber, source) {
3064        return source.subscribe(new filter_FilterSubscriber(subscriber, this.predicate, this.thisArg));
3065    };
3066    return FilterOperator;
3067}());
3068var filter_FilterSubscriber = /*@__PURE__*/ (function (_super) {
3069    tslib_es6["a" /* __extends */](FilterSubscriber, _super);
3070    function FilterSubscriber(destination, predicate, thisArg) {
3071        var _this = _super.call(this, destination) || this;
3072        _this.predicate = predicate;
3073        _this.thisArg = thisArg;
3074        _this.count = 0;
3075        return _this;
3076    }
3077    FilterSubscriber.prototype._next = function (value) {
3078        var result;
3079        try {
3080            result = this.predicate.call(this.thisArg, value, this.count++);
3081        }
3082        catch (err) {
3083            this.destination.error(err);
3084            return;
3085        }
3086        if (result) {
3087            this.destination.next(value);
3088        }
3089    };
3090    return FilterSubscriber;
3091}(Subscriber["a" /* Subscriber */]));
3092
3093// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/noop.js
3094var noop = __webpack_require__(22);
3095
3096// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isFunction.js
3097var isFunction = __webpack_require__(34);
3098
3099// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/tap.js
3100/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
3101
3102
3103
3104
3105function tap(nextOrObserver, error, complete) {
3106    return function tapOperatorFunction(source) {
3107        return source.lift(new DoOperator(nextOrObserver, error, complete));
3108    };
3109}
3110var DoOperator = /*@__PURE__*/ (function () {
3111    function DoOperator(nextOrObserver, error, complete) {
3112        this.nextOrObserver = nextOrObserver;
3113        this.error = error;
3114        this.complete = complete;
3115    }
3116    DoOperator.prototype.call = function (subscriber, source) {
3117        return source.subscribe(new tap_TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
3118    };
3119    return DoOperator;
3120}());
3121var tap_TapSubscriber = /*@__PURE__*/ (function (_super) {
3122    tslib_es6["a" /* __extends */](TapSubscriber, _super);
3123    function TapSubscriber(destination, observerOrNext, error, complete) {
3124        var _this = _super.call(this, destination) || this;
3125        _this._tapNext = noop["a" /* noop */];
3126        _this._tapError = noop["a" /* noop */];
3127        _this._tapComplete = noop["a" /* noop */];
3128        _this._tapError = error || noop["a" /* noop */];
3129        _this._tapComplete = complete || noop["a" /* noop */];
3130        if (Object(isFunction["a" /* isFunction */])(observerOrNext)) {
3131            _this._context = _this;
3132            _this._tapNext = observerOrNext;
3133        }
3134        else if (observerOrNext) {
3135            _this._context = observerOrNext;
3136            _this._tapNext = observerOrNext.next || noop["a" /* noop */];
3137            _this._tapError = observerOrNext.error || noop["a" /* noop */];
3138            _this._tapComplete = observerOrNext.complete || noop["a" /* noop */];
3139        }
3140        return _this;
3141    }
3142    TapSubscriber.prototype._next = function (value) {
3143        try {
3144            this._tapNext.call(this._context, value);
3145        }
3146        catch (err) {
3147            this.destination.error(err);
3148            return;
3149        }
3150        this.destination.next(value);
3151    };
3152    TapSubscriber.prototype._error = function (err) {
3153        try {
3154            this._tapError.call(this._context, err);
3155        }
3156        catch (err) {
3157            this.destination.error(err);
3158            return;
3159        }
3160        this.destination.error(err);
3161    };
3162    TapSubscriber.prototype._complete = function () {
3163        try {
3164            this._tapComplete.call(this._context);
3165        }
3166        catch (err) {
3167            this.destination.error(err);
3168            return;
3169        }
3170        return this.destination.complete();
3171    };
3172    return TapSubscriber;
3173}(Subscriber["a" /* Subscriber */]));
3174
3175// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/EmptyError.js
3176var EmptyError = __webpack_require__(35);
3177
3178// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js
3179/** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */
3180
3181
3182var throwIfEmpty = function (errorFactory) {
3183    if (errorFactory === void 0) {
3184        errorFactory = defaultErrorFactory;
3185    }
3186    return tap({
3187        hasValue: false,
3188        next: function () { this.hasValue = true; },
3189        complete: function () {
3190            if (!this.hasValue) {
3191                throw errorFactory();
3192            }
3193        }
3194    });
3195};
3196function defaultErrorFactory() {
3197    return new EmptyError["a" /* EmptyError */]();
3198}
3199
3200// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/empty.js
3201var empty = __webpack_require__(9);
3202
3203// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/take.js
3204/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
3205
3206
3207
3208
3209function take(count) {
3210    return function (source) {
3211        if (count === 0) {
3212            return Object(empty["b" /* empty */])();
3213        }
3214        else {
3215            return source.lift(new take_TakeOperator(count));
3216        }
3217    };
3218}
3219var take_TakeOperator = /*@__PURE__*/ (function () {
3220    function TakeOperator(total) {
3221        this.total = total;
3222        if (this.total < 0) {
3223            throw new ArgumentOutOfRangeError["a" /* ArgumentOutOfRangeError */];
3224        }
3225    }
3226    TakeOperator.prototype.call = function (subscriber, source) {
3227        return source.subscribe(new take_TakeSubscriber(subscriber, this.total));
3228    };
3229    return TakeOperator;
3230}());
3231var take_TakeSubscriber = /*@__PURE__*/ (function (_super) {
3232    tslib_es6["a" /* __extends */](TakeSubscriber, _super);
3233    function TakeSubscriber(destination, total) {
3234        var _this = _super.call(this, destination) || this;
3235        _this.total = total;
3236        _this.count = 0;
3237        return _this;
3238    }
3239    TakeSubscriber.prototype._next = function (value) {
3240        var total = this.total;
3241        var count = ++this.count;
3242        if (count <= total) {
3243            this.destination.next(value);
3244            if (count === total) {
3245                this.destination.complete();
3246                this.unsubscribe();
3247            }
3248        }
3249    };
3250    return TakeSubscriber;
3251}(Subscriber["a" /* Subscriber */]));
3252
3253// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/elementAt.js
3254/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
3255
3256
3257
3258
3259
3260function elementAt(index, defaultValue) {
3261    if (index < 0) {
3262        throw new ArgumentOutOfRangeError["a" /* ArgumentOutOfRangeError */]();
3263    }
3264    var hasDefaultValue = arguments.length >= 2;
3265    return function (source) {
3266        return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue
3267            ? defaultIfEmpty(defaultValue)
3268            : throwIfEmpty(function () { return new ArgumentOutOfRangeError["a" /* ArgumentOutOfRangeError */](); }));
3269    };
3270}
3271
3272// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromArray.js
3273var fromArray = __webpack_require__(20);
3274
3275// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/scalar.js
3276var scalar = __webpack_require__(56);
3277
3278// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/endWith.js
3279/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
3280
3281
3282
3283
3284
3285function endWith() {
3286    var array = [];
3287    for (var _i = 0; _i < arguments.length; _i++) {
3288        array[_i] = arguments[_i];
3289    }
3290    return function (source) {
3291        var scheduler = array[array.length - 1];
3292        if (Object(isScheduler["a" /* isScheduler */])(scheduler)) {
3293            array.pop();
3294        }
3295        else {
3296            scheduler = null;
3297        }
3298        var len = array.length;
3299        if (len === 1 && !scheduler) {
3300            return Object(concat["a" /* concat */])(source, Object(scalar["a" /* scalar */])(array[0]));
3301        }
3302        else if (len > 0) {
3303            return Object(concat["a" /* concat */])(source, Object(fromArray["a" /* fromArray */])(array, scheduler));
3304        }
3305        else {
3306            return Object(concat["a" /* concat */])(source, Object(empty["b" /* empty */])(scheduler));
3307        }
3308    };
3309}
3310
3311// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/every.js
3312/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3313
3314
3315function every(predicate, thisArg) {
3316    return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
3317}
3318var EveryOperator = /*@__PURE__*/ (function () {
3319    function EveryOperator(predicate, thisArg, source) {
3320        this.predicate = predicate;
3321        this.thisArg = thisArg;
3322        this.source = source;
3323    }
3324    EveryOperator.prototype.call = function (observer, source) {
3325        return source.subscribe(new every_EverySubscriber(observer, this.predicate, this.thisArg, this.source));
3326    };
3327    return EveryOperator;
3328}());
3329var every_EverySubscriber = /*@__PURE__*/ (function (_super) {
3330    tslib_es6["a" /* __extends */](EverySubscriber, _super);
3331    function EverySubscriber(destination, predicate, thisArg, source) {
3332        var _this = _super.call(this, destination) || this;
3333        _this.predicate = predicate;
3334        _this.thisArg = thisArg;
3335        _this.source = source;
3336        _this.index = 0;
3337        _this.thisArg = thisArg || _this;
3338        return _this;
3339    }
3340    EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
3341        this.destination.next(everyValueMatch);
3342        this.destination.complete();
3343    };
3344    EverySubscriber.prototype._next = function (value) {
3345        var result = false;
3346        try {
3347            result = this.predicate.call(this.thisArg, value, this.index++, this.source);
3348        }
3349        catch (err) {
3350            this.destination.error(err);
3351            return;
3352        }
3353        if (!result) {
3354            this.notifyComplete(false);
3355        }
3356    };
3357    EverySubscriber.prototype._complete = function () {
3358        this.notifyComplete(true);
3359    };
3360    return EverySubscriber;
3361}(Subscriber["a" /* Subscriber */]));
3362
3363// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/exhaust.js
3364/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
3365
3366
3367
3368function exhaust() {
3369    return function (source) { return source.lift(new SwitchFirstOperator()); };
3370}
3371var SwitchFirstOperator = /*@__PURE__*/ (function () {
3372    function SwitchFirstOperator() {
3373    }
3374    SwitchFirstOperator.prototype.call = function (subscriber, source) {
3375        return source.subscribe(new exhaust_SwitchFirstSubscriber(subscriber));
3376    };
3377    return SwitchFirstOperator;
3378}());
3379var exhaust_SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
3380    tslib_es6["a" /* __extends */](SwitchFirstSubscriber, _super);
3381    function SwitchFirstSubscriber(destination) {
3382        var _this = _super.call(this, destination) || this;
3383        _this.hasCompleted = false;
3384        _this.hasSubscription = false;
3385        return _this;
3386    }
3387    SwitchFirstSubscriber.prototype._next = function (value) {
3388        if (!this.hasSubscription) {
3389            this.hasSubscription = true;
3390            this.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, value));
3391        }
3392    };
3393    SwitchFirstSubscriber.prototype._complete = function () {
3394        this.hasCompleted = true;
3395        if (!this.hasSubscription) {
3396            this.destination.complete();
3397        }
3398    };
3399    SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
3400        this.remove(innerSub);
3401        this.hasSubscription = false;
3402        if (this.hasCompleted) {
3403            this.destination.complete();
3404        }
3405    };
3406    return SwitchFirstSubscriber;
3407}(OuterSubscriber["a" /* OuterSubscriber */]));
3408
3409// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/map.js
3410var map = __webpack_require__(13);
3411
3412// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js
3413/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
3414
3415
3416
3417
3418
3419function exhaustMap(project, resultSelector) {
3420    if (resultSelector) {
3421        return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(from["a" /* from */])(project(a, i)).pipe(Object(map["a" /* map */])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
3422    }
3423    return function (source) {
3424        return source.lift(new ExhauseMapOperator(project));
3425    };
3426}
3427var ExhauseMapOperator = /*@__PURE__*/ (function () {
3428    function ExhauseMapOperator(project) {
3429        this.project = project;
3430    }
3431    ExhauseMapOperator.prototype.call = function (subscriber, source) {
3432        return source.subscribe(new exhaustMap_ExhaustMapSubscriber(subscriber, this.project));
3433    };
3434    return ExhauseMapOperator;
3435}());
3436var exhaustMap_ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
3437    tslib_es6["a" /* __extends */](ExhaustMapSubscriber, _super);
3438    function ExhaustMapSubscriber(destination, project) {
3439        var _this = _super.call(this, destination) || this;
3440        _this.project = project;
3441        _this.hasSubscription = false;
3442        _this.hasCompleted = false;
3443        _this.index = 0;
3444        return _this;
3445    }
3446    ExhaustMapSubscriber.prototype._next = function (value) {
3447        if (!this.hasSubscription) {
3448            this.tryNext(value);
3449        }
3450    };
3451    ExhaustMapSubscriber.prototype.tryNext = function (value) {
3452        var index = this.index++;
3453        var destination = this.destination;
3454        try {
3455            var result = this.project(value, index);
3456            this.hasSubscription = true;
3457            this.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, result, value, index));
3458        }
3459        catch (err) {
3460            destination.error(err);
3461        }
3462    };
3463    ExhaustMapSubscriber.prototype._complete = function () {
3464        this.hasCompleted = true;
3465        if (!this.hasSubscription) {
3466            this.destination.complete();
3467        }
3468    };
3469    ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
3470        this.destination.next(innerValue);
3471    };
3472    ExhaustMapSubscriber.prototype.notifyError = function (err) {
3473        this.destination.error(err);
3474    };
3475    ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
3476        this.remove(innerSub);
3477        this.hasSubscription = false;
3478        if (this.hasCompleted) {
3479            this.destination.complete();
3480        }
3481    };
3482    return ExhaustMapSubscriber;
3483}(OuterSubscriber["a" /* OuterSubscriber */]));
3484
3485// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/expand.js
3486/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
3487
3488
3489
3490
3491
3492function expand(project, concurrent, scheduler) {
3493    if (concurrent === void 0) {
3494        concurrent = Number.POSITIVE_INFINITY;
3495    }
3496    if (scheduler === void 0) {
3497        scheduler = undefined;
3498    }
3499    concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
3500    return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
3501}
3502var ExpandOperator = /*@__PURE__*/ (function () {
3503    function ExpandOperator(project, concurrent, scheduler) {
3504        this.project = project;
3505        this.concurrent = concurrent;
3506        this.scheduler = scheduler;
3507    }
3508    ExpandOperator.prototype.call = function (subscriber, source) {
3509        return source.subscribe(new expand_ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
3510    };
3511    return ExpandOperator;
3512}());
3513
3514var expand_ExpandSubscriber = /*@__PURE__*/ (function (_super) {
3515    tslib_es6["a" /* __extends */](ExpandSubscriber, _super);
3516    function ExpandSubscriber(destination, project, concurrent, scheduler) {
3517        var _this = _super.call(this, destination) || this;
3518        _this.project = project;
3519        _this.concurrent = concurrent;
3520        _this.scheduler = scheduler;
3521        _this.index = 0;
3522        _this.active = 0;
3523        _this.hasCompleted = false;
3524        if (concurrent < Number.POSITIVE_INFINITY) {
3525            _this.buffer = [];
3526        }
3527        return _this;
3528    }
3529    ExpandSubscriber.dispatch = function (arg) {
3530        var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
3531        subscriber.subscribeToProjection(result, value, index);
3532    };
3533    ExpandSubscriber.prototype._next = function (value) {
3534        var destination = this.destination;
3535        if (destination.closed) {
3536            this._complete();
3537            return;
3538        }
3539        var index = this.index++;
3540        if (this.active < this.concurrent) {
3541            destination.next(value);
3542            var result = Object(tryCatch["a" /* tryCatch */])(this.project)(value, index);
3543            if (result === errorObject["a" /* errorObject */]) {
3544                destination.error(errorObject["a" /* errorObject */].e);
3545            }
3546            else if (!this.scheduler) {
3547                this.subscribeToProjection(result, value, index);
3548            }
3549            else {
3550                var state = { subscriber: this, result: result, value: value, index: index };
3551                this.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
3552            }
3553        }
3554        else {
3555            this.buffer.push(value);
3556        }
3557    };
3558    ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
3559        this.active++;
3560        this.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, result, value, index));
3561    };
3562    ExpandSubscriber.prototype._complete = function () {
3563        this.hasCompleted = true;
3564        if (this.hasCompleted && this.active === 0) {
3565            this.destination.complete();
3566        }
3567    };
3568    ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
3569        this._next(innerValue);
3570    };
3571    ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
3572        var buffer = this.buffer;
3573        this.remove(innerSub);
3574        this.active--;
3575        if (buffer && buffer.length > 0) {
3576            this._next(buffer.shift());
3577        }
3578        if (this.hasCompleted && this.active === 0) {
3579            this.destination.complete();
3580        }
3581    };
3582    return ExpandSubscriber;
3583}(OuterSubscriber["a" /* OuterSubscriber */]));
3584
3585
3586// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/finalize.js
3587/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
3588
3589
3590
3591function finalize(callback) {
3592    return function (source) { return source.lift(new FinallyOperator(callback)); };
3593}
3594var FinallyOperator = /*@__PURE__*/ (function () {
3595    function FinallyOperator(callback) {
3596        this.callback = callback;
3597    }
3598    FinallyOperator.prototype.call = function (subscriber, source) {
3599        return source.subscribe(new finalize_FinallySubscriber(subscriber, this.callback));
3600    };
3601    return FinallyOperator;
3602}());
3603var finalize_FinallySubscriber = /*@__PURE__*/ (function (_super) {
3604    tslib_es6["a" /* __extends */](FinallySubscriber, _super);
3605    function FinallySubscriber(destination, callback) {
3606        var _this = _super.call(this, destination) || this;
3607        _this.add(new Subscription["a" /* Subscription */](callback));
3608        return _this;
3609    }
3610    return FinallySubscriber;
3611}(Subscriber["a" /* Subscriber */]));
3612
3613// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/find.js
3614/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3615
3616
3617function find(predicate, thisArg) {
3618    if (typeof predicate !== 'function') {
3619        throw new TypeError('predicate is not a function');
3620    }
3621    return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
3622}
3623var FindValueOperator = /*@__PURE__*/ (function () {
3624    function FindValueOperator(predicate, source, yieldIndex, thisArg) {
3625        this.predicate = predicate;
3626        this.source = source;
3627        this.yieldIndex = yieldIndex;
3628        this.thisArg = thisArg;
3629    }
3630    FindValueOperator.prototype.call = function (observer, source) {
3631        return source.subscribe(new find_FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
3632    };
3633    return FindValueOperator;
3634}());
3635
3636var find_FindValueSubscriber = /*@__PURE__*/ (function (_super) {
3637    tslib_es6["a" /* __extends */](FindValueSubscriber, _super);
3638    function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
3639        var _this = _super.call(this, destination) || this;
3640        _this.predicate = predicate;
3641        _this.source = source;
3642        _this.yieldIndex = yieldIndex;
3643        _this.thisArg = thisArg;
3644        _this.index = 0;
3645        return _this;
3646    }
3647    FindValueSubscriber.prototype.notifyComplete = function (value) {
3648        var destination = this.destination;
3649        destination.next(value);
3650        destination.complete();
3651    };
3652    FindValueSubscriber.prototype._next = function (value) {
3653        var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
3654        var index = this.index++;
3655        try {
3656            var result = predicate.call(thisArg || this, value, index, this.source);
3657            if (result) {
3658                this.notifyComplete(this.yieldIndex ? index : value);
3659            }
3660        }
3661        catch (err) {
3662            this.destination.error(err);
3663        }
3664    };
3665    FindValueSubscriber.prototype._complete = function () {
3666        this.notifyComplete(this.yieldIndex ? -1 : undefined);
3667    };
3668    return FindValueSubscriber;
3669}(Subscriber["a" /* Subscriber */]));
3670
3671
3672// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/findIndex.js
3673/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
3674
3675function findIndex(predicate, thisArg) {
3676    return function (source) { return source.lift(new FindValueOperator(predicate, source, true, thisArg)); };
3677}
3678
3679// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/identity.js
3680var identity = __webpack_require__(23);
3681
3682// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/first.js
3683/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
3684
3685
3686
3687
3688
3689
3690function first(predicate, defaultValue) {
3691    var hasDefaultValue = arguments.length >= 2;
3692    return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity["a" /* identity */], take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError["a" /* EmptyError */](); })); };
3693}
3694
3695// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/groupBy.js
3696var groupBy = __webpack_require__(66);
3697
3698// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js
3699/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3700
3701
3702function ignoreElements() {
3703    return function ignoreElementsOperatorFunction(source) {
3704        return source.lift(new IgnoreElementsOperator());
3705    };
3706}
3707var IgnoreElementsOperator = /*@__PURE__*/ (function () {
3708    function IgnoreElementsOperator() {
3709    }
3710    IgnoreElementsOperator.prototype.call = function (subscriber, source) {
3711        return source.subscribe(new ignoreElements_IgnoreElementsSubscriber(subscriber));
3712    };
3713    return IgnoreElementsOperator;
3714}());
3715var ignoreElements_IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
3716    tslib_es6["a" /* __extends */](IgnoreElementsSubscriber, _super);
3717    function IgnoreElementsSubscriber() {
3718        return _super !== null && _super.apply(this, arguments) || this;
3719    }
3720    IgnoreElementsSubscriber.prototype._next = function (unused) {
3721    };
3722    return IgnoreElementsSubscriber;
3723}(Subscriber["a" /* Subscriber */]));
3724
3725// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/isEmpty.js
3726/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3727
3728
3729function isEmpty() {
3730    return function (source) { return source.lift(new IsEmptyOperator()); };
3731}
3732var IsEmptyOperator = /*@__PURE__*/ (function () {
3733    function IsEmptyOperator() {
3734    }
3735    IsEmptyOperator.prototype.call = function (observer, source) {
3736        return source.subscribe(new isEmpty_IsEmptySubscriber(observer));
3737    };
3738    return IsEmptyOperator;
3739}());
3740var isEmpty_IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
3741    tslib_es6["a" /* __extends */](IsEmptySubscriber, _super);
3742    function IsEmptySubscriber(destination) {
3743        return _super.call(this, destination) || this;
3744    }
3745    IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
3746        var destination = this.destination;
3747        destination.next(isEmpty);
3748        destination.complete();
3749    };
3750    IsEmptySubscriber.prototype._next = function (value) {
3751        this.notifyComplete(false);
3752    };
3753    IsEmptySubscriber.prototype._complete = function () {
3754        this.notifyComplete(true);
3755    };
3756    return IsEmptySubscriber;
3757}(Subscriber["a" /* Subscriber */]));
3758
3759// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/takeLast.js
3760/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
3761
3762
3763
3764
3765function takeLast(count) {
3766    return function takeLastOperatorFunction(source) {
3767        if (count === 0) {
3768            return Object(empty["b" /* empty */])();
3769        }
3770        else {
3771            return source.lift(new takeLast_TakeLastOperator(count));
3772        }
3773    };
3774}
3775var takeLast_TakeLastOperator = /*@__PURE__*/ (function () {
3776    function TakeLastOperator(total) {
3777        this.total = total;
3778        if (this.total < 0) {
3779            throw new ArgumentOutOfRangeError["a" /* ArgumentOutOfRangeError */];
3780        }
3781    }
3782    TakeLastOperator.prototype.call = function (subscriber, source) {
3783        return source.subscribe(new takeLast_TakeLastSubscriber(subscriber, this.total));
3784    };
3785    return TakeLastOperator;
3786}());
3787var takeLast_TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
3788    tslib_es6["a" /* __extends */](TakeLastSubscriber, _super);
3789    function TakeLastSubscriber(destination, total) {
3790        var _this = _super.call(this, destination) || this;
3791        _this.total = total;
3792        _this.ring = new Array();
3793        _this.count = 0;
3794        return _this;
3795    }
3796    TakeLastSubscriber.prototype._next = function (value) {
3797        var ring = this.ring;
3798        var total = this.total;
3799        var count = this.count++;
3800        if (ring.length < total) {
3801            ring.push(value);
3802        }
3803        else {
3804            var index = count % total;
3805            ring[index] = value;
3806        }
3807    };
3808    TakeLastSubscriber.prototype._complete = function () {
3809        var destination = this.destination;
3810        var count = this.count;
3811        if (count > 0) {
3812            var total = this.count >= this.total ? this.total : this.count;
3813            var ring = this.ring;
3814            for (var i = 0; i < total; i++) {
3815                var idx = (count++) % total;
3816                destination.next(ring[idx]);
3817            }
3818        }
3819        destination.complete();
3820    };
3821    return TakeLastSubscriber;
3822}(Subscriber["a" /* Subscriber */]));
3823
3824// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/last.js
3825/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
3826
3827
3828
3829
3830
3831
3832function last(predicate, defaultValue) {
3833    var hasDefaultValue = arguments.length >= 2;
3834    return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity["a" /* identity */], takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError["a" /* EmptyError */](); })); };
3835}
3836
3837// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/mapTo.js
3838/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3839
3840
3841function mapTo(value) {
3842    return function (source) { return source.lift(new MapToOperator(value)); };
3843}
3844var MapToOperator = /*@__PURE__*/ (function () {
3845    function MapToOperator(value) {
3846        this.value = value;
3847    }
3848    MapToOperator.prototype.call = function (subscriber, source) {
3849        return source.subscribe(new mapTo_MapToSubscriber(subscriber, this.value));
3850    };
3851    return MapToOperator;
3852}());
3853var mapTo_MapToSubscriber = /*@__PURE__*/ (function (_super) {
3854    tslib_es6["a" /* __extends */](MapToSubscriber, _super);
3855    function MapToSubscriber(destination, value) {
3856        var _this = _super.call(this, destination) || 
3856this;
3857        _this.value = value;
3858        return _this;
3859    }
3860    MapToSubscriber.prototype._next = function (x) {
3861        this.destination.next(this.value);
3862    };
3863    return MapToSubscriber;
3864}(Subscriber["a" /* Subscriber */]));
3865
3866// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/materialize.js
3867/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
3868
3869
3870
3871function materialize() {
3872    return function materializeOperatorFunction(source) {
3873        return source.lift(new MaterializeOperator());
3874    };
3875}
3876var MaterializeOperator = /*@__PURE__*/ (function () {
3877    function MaterializeOperator() {
3878    }
3879    MaterializeOperator.prototype.call = function (subscriber, source) {
3880        return source.subscribe(new materialize_MaterializeSubscriber(subscriber));
3881    };
3882    return MaterializeOperator;
3883}());
3884var materialize_MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
3885    tslib_es6["a" /* __extends */](MaterializeSubscriber, _super);
3886    function MaterializeSubscriber(destination) {
3887        return _super.call(this, destination) || this;
3888    }
3889    MaterializeSubscriber.prototype._next = function (value) {
3890        this.destination.next(Notification["a" /* Notification */].createNext(value));
3891    };
3892    MaterializeSubscriber.prototype._error = function (err) {
3893        var destination = this.destination;
3894        destination.next(Notification["a" /* Notification */].createError(err));
3895        destination.complete();
3896    };
3897    MaterializeSubscriber.prototype._complete = function () {
3898        var destination = this.destination;
3899        destination.next(Notification["a" /* Notification */].createComplete());
3900        destination.complete();
3901    };
3902    return MaterializeSubscriber;
3903}(Subscriber["a" /* Subscriber */]));
3904
3905// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/scan.js
3906/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
3907
3908
3909function scan(accumulator, seed) {
3910    var hasSeed = false;
3911    if (arguments.length >= 2) {
3912        hasSeed = true;
3913    }
3914    return function scanOperatorFunction(source) {
3915        return source.lift(new ScanOperator(accumulator, seed, hasSeed));
3916    };
3917}
3918var ScanOperator = /*@__PURE__*/ (function () {
3919    function ScanOperator(accumulator, seed, hasSeed) {
3920        if (hasSeed === void 0) {
3921            hasSeed = false;
3922        }
3923        this.accumulator = accumulator;
3924        this.seed = seed;
3925        this.hasSeed = hasSeed;
3926    }
3927    ScanOperator.prototype.call = function (subscriber, source) {
3928        return source.subscribe(new scan_ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
3929    };
3930    return ScanOperator;
3931}());
3932var scan_ScanSubscriber = /*@__PURE__*/ (function (_super) {
3933    tslib_es6["a" /* __extends */](ScanSubscriber, _super);
3934    function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
3935        var _this = _super.call(this, destination) || this;
3936        _this.accumulator = accumulator;
3937        _this._seed = _seed;
3938        _this.hasSeed = hasSeed;
3939        _this.index = 0;
3940        return _this;
3941    }
3942    Object.defineProperty(ScanSubscriber.prototype, "seed", {
3943        get: function () {
3944            return this._seed;
3945        },
3946        set: function (value) {
3947            this.hasSeed = true;
3948            this._seed = value;
3949        },
3950        enumerable: true,
3951        configurable: true
3952    });
3953    ScanSubscriber.prototype._next = function (value) {
3954        if (!this.hasSeed) {
3955            this.seed = value;
3956            this.destination.next(value);
3957        }
3958        else {
3959            return this._tryNext(value);
3960        }
3961    };
3962    ScanSubscriber.prototype._tryNext = function (value) {
3963        var index = this.index++;
3964        var result;
3965        try {
3966            result = this.accumulator(this.seed, value, index);
3967        }
3968        catch (err) {
3969            this.destination.error(err);
3970        }
3971        this.seed = result;
3972        this.destination.next(result);
3973    };
3974    return ScanSubscriber;
3975}(Subscriber["a" /* Subscriber */]));
3976
3977// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/pipe.js
3978var pipe = __webpack_require__(46);
3979
3980// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/reduce.js
3981/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
3982
3983
3984
3985
3986function reduce(accumulator, seed) {
3987    if (arguments.length >= 2) {
3988        return function reduceOperatorFunctionWithSeed(source) {
3989            return Object(pipe["a" /* pipe */])(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);
3990        };
3991    }
3992    return function reduceOperatorFunction(source) {
3993        return Object(pipe["a" /* pipe */])(scan(function (acc, value, index) {
3994            return accumulator(acc, value, index + 1);
3995        }), takeLast(1))(source);
3996    };
3997}
3998
3999// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/max.js
4000/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
4001
4002function max_max(comparer) {
4003    var max = (typeof comparer === 'function')
4004        ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
4005        : function (x, y) { return x > y ? x : y; };
4006    return reduce(max);
4007}
4008
4009// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/merge.js
4010var merge = __webpack_require__(75);
4011
4012// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/merge.
4012js
4013/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
4014
4015function merge_merge() {
4016    var observables = [];
4017    for (var _i = 0; _i < arguments.length; _i++) {
4018        observables[_i] = arguments[_i];
4019    }
4020    return function (source) { return source.lift.call(merge["a" /* merge */].apply(void 0, [source].concat(observables))); };
4021}
4022
4023// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/mergeAll.js
4024var mergeAll = __webpack_require__(53);
4025
4026// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js
4027/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
4028
4029function mergeMapTo(innerObservable, resultSelector, concurrent) {
4030    if (concurrent === void 0) {
4031        concurrent = Number.POSITIVE_INFINITY;
4032    }
4033    if (typeof resultSelector === 'function') {
4034        return Object(mergeMap["a" /* mergeMap */])(function () { return innerObservable; }, resultSelector, concurrent);
4035    }
4036    if (typeof resultSelector === 'number') {
4037        concurrent = resultSelector;
4038    }
4039    return Object(mergeMap["a" /* mergeMap */])(function () { return innerObservable; }, concurrent);
4040}
4041
4042// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/mergeScan.js
4043/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
4044
4045
4046
4047
4048
4049function mergeScan(accumulator, seed, concurrent) {
4050    if (concurrent === void 0) {
4051        concurrent = Number.POSITIVE_INFINITY;
4052    }
4053    return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
4054}
4055var MergeScanOperator = /*@__PURE__*/ (function () {
4056    function MergeScanOperator(accumulator, seed, concurrent) {
4057        this.accumulator = accumulator;
4058        this.seed = seed;
4059        this.concurrent = concurrent;
4060    }
4061    MergeScanOperator.prototype.call = function (subscriber, source) {
4062        return source.subscribe(new mergeScan_MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
4063    };
4064    return MergeScanOperator;
4065}());
4066
4067var mergeScan_MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
4068    tslib_es6["a" /* __extends */](MergeScanSubscriber, _super);
4069    function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
4070        var _this = _super.call(this, destination) || this;
4071        _this.accumulator = accumulator;
4072        _this.acc = acc;
4073        _this.concurrent = concurrent;
4074        _this.hasValue = false;
4075        _this.hasCompleted = false;
4076        _this.buffer = [];
4077        _this.active = 0;
4078        _this.index = 0;
4079        return _this;
4080    }
4081    MergeScanSubscriber.prototype._next = function (value) {
4082        if (this.active < this.concurrent) {
4083            var index = this.index++;
4084            var ish = Object(tryCatch["a" /* tryCatch */])(this.accumulator)(this.acc, value);
4085            var destination = this.destination;
4086            if (ish === errorObject["a" /* errorObject */]) {
4087                destination.error(errorObject["a" /* errorObject */].e);
4088            }
4089            else {
4090                this.active++;
4091                this._innerSub(ish, value, index);
4092            }
4093        }
4094        else {
4095            this.buffer.push(value);
4096        }
4097    };
4098    MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
4099        this.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, ish, value, index));
4100    };
4101    MergeScanSubscriber.prototype._complete = function () {
4102        this.hasCompleted = true;
4103        if (this.active === 0 && this.buffer.length === 0) {
4104            if (this.hasValue === false) {
4105                this.destination.next(this.acc);
4106            }
4107            this.destination.complete();
4108        }
4109    };
4110    MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
4111        var destination = this.destination;
4112        this.acc = innerValue;
4113        this.hasValue = true;
4114        destination.next(innerValue);
4115    };
4116    MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
4117        var buffer = this.buffer;
4118        this.remove(innerSub);
4119        this.active--;
4120        if (buffer.length > 0) {
4121            this._next(buffer.shift());
4122        }
4123        else if (this.active === 0 && this.hasCompleted) {
4124            if (this.hasValue === false) {
4125                this.destination.next(this.acc);
4126            }
4127            this.destination.complete();
4128        }
4129    };
4130    return MergeScanSubscriber;
4131}(OuterSubscriber["a" /* OuterSubscriber */]));
4132
4133
4134// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/min.js
4135/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
4136
4137function min_min(comparer) {
4138    var min = (typeof comparer === 'function')
4139        ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
4140        : function (x, y) { return x < y ? x : y; };
4141    return reduce(min);
4142}
4143
4144// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js
4145var ConnectableObservable = __webpack_require__(70);
4146
4147// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/multicast.js
4148/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
4149
4150function multicast(subjectOrSubjectFactory, selector) {
4151    return function multicastOperatorFunction(source) {
4152        var subjectFactory;
4153        if (typeof subjectOrSubjectFactory === 'function') {
4154            subjectFactory = subjectOrSubjectFactory;
4155        }
4156        else {
4157            subjectFactory = function subjectFactory() {
4158                return subjectOrSubjectFactory;
4159            };
4160        }
4161        if (typeof selector === 'function') {
4162            return source.lift(new MulticastOperator(subjectFactory, selector));
4163        }
4164        var connectable = Object.create(source, ConnectableObservable["b" /* connectableObservableDescriptor */]);
4165        connectable.source = source;
4166        connectable.subjectFactory = subjectFactory;
4167        return connectable;
4168    };
4169}
4170var MulticastOperator = /*@__PURE__*/ (function () {
4171    function MulticastOperator(subjectFactory, selector) {
4172        this.subjectFactory = subjectFactory;
4173        this.selector = selector;
4174    }
4175    MulticastOperator.prototype.call = function (subscriber, source) {
4176        var selector = this.selector;
4177        var subject = this.subjectFactory();
4178        var subscription = selector(subject).subscribe(subscriber);
4179        subscription.add(source.subscribe(subject));
4180        return subscription;
4181    };
4182    return MulticastOperator;
4183}());
4184
4185
4186// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/observeOn.js
4187var observeOn = __webpack_require__(72);
4188
4189// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js
4190/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
4191
4192
4193
4194
4195
4196function onErrorResumeNext() {
4197    var nextSources = [];
4198    for (var _i = 0; _i < arguments.length; _i++) {
4199        nextSources[_i] = arguments[_i];
4200    }
4201    if (nextSources.length === 1 && Object(isArray["a" /* isArray */])(nextSources[0])) {
4202        nextSources = nextSources[0];
4203    }
4204    return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
4205}
4206function onErrorResumeNextStatic() {
4207    var nextSources = [];
4208    for (var _i = 0; _i < arguments.length; _i++) {
4209        nextSources[_i] = arguments[_i];
4210    }
4211    var source = null;
4212    if (nextSources.length === 1 && Object(isArray["a" /* isArray */])(nextSources[0])) {
4213        nextSources = nextSources[0];
4214    }
4215    source = nextSources.shift();
4216    return Object(from["a" /* from */])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
4217}
4218var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
4219    function OnErrorResumeNextOperator(nextSources) {
4220        this.nextSources = nextSources;
4221    }
4222    OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
4223        return source.subscribe(new onErrorResumeNext_OnErrorResumeNextSubscriber(subscriber, this.nextSources));
4224    };
4225    return OnErrorResumeNextOperator;
4226}());
4227var onErrorResumeNext_OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
4228    tslib_es6["a" /* __extends */](OnErrorResumeNextSubscriber, _super);
4229    function OnErrorResumeNextSubscriber(destination, nextSources) {
4230        var _this = _super.call(this, destination) || this;
4231        _this.destination = destination;
4232        _this.nextSources = nextSources;
4233        return _this;
4234    }
4235    OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
4236        this.subscribeToNextSource();
4237    };
4238    OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
4239        this.subscribeToNextSource();
4240    };
4241    OnErrorResumeNextSubscriber.prototype._error = function (err) {
4242        this.subscribeToNextSource();
4243    };
4244    OnErrorResumeNextSubscriber.prototype._complete = function () {
4245        this.subscribeToNextSource();
4246    };
4247    OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
4248        var next = this.nextSources.shift();
4249        if (next) {
4250            this.add(Object(subscribeToResult["a" /* subscribeToResult */])(this, next));
4251        }
4252        else {
4253            this.destination.complete();
4254        }
4255    };
4256    return OnErrorResumeNextSubscriber;
4257}(OuterSubscriber["a" /* OuterSubscriber */]));
4258
4259// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/pairwise.js
4260/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
4261
4262
4263function pairwise() {
4264    return function (source) { return source.lift(new PairwiseOperator()); };
4265}
4266var PairwiseOperator = /*@__PURE__*/ (function () {
4267    function PairwiseOperator() {
4268    }
4269    PairwiseOperator.prototype.call = function (subscriber, source) {
4270        return source.subscribe(new pairwise_PairwiseSubscriber(subscriber));
4271    };
4272    return PairwiseOperator;
4273}());
4274var pairwise_PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
4275    tslib_es6["a" /* __extends */](PairwiseSubscriber, _super);
4276    function PairwiseSubscriber(destination) {
4277        var _this = _super.call(this, destination) || this;
4278        _this.hasPrev = false;
4279        return _this;
4280    }
4281    PairwiseSubscriber.prototype._next = function (value) {
4282        if (this.hasPrev) {
4283            this.destination.next([this.prev, value]);
4284        }
4285        else {
4286            this.hasPrev = true;
4287        }
4288        this.prev = value;
4289    };
4290    return PairwiseSubscriber;
4291}(Subscriber["a" /* Subscriber */]));
4292
4293// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/not.js
4294/** PURE_IMPORTS_START  PURE_IMPORTS_END */
4295function not(pred, thisArg) {
4296    function notPred() {
4297        return !(notPred.pred.apply(notPred.thisArg, arguments));
4298    }
4299    notPred.pred = pred;
4300    notPred.thisArg = thisArg;
4301    return notPred;
4302}
4303
4304// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/partition.js
4305/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
4306
4307
4308function partition(predicate, thisArg) {
4309    return function (source) {
4310        return [
4311            filter(predicate, thisArg)(source),
4312            filter(not(predicate, thisArg))(source)
4313        ];
4314    };
4315}
4316
4317// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/pluck.js
4318/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
4319
4320function pluck() {
4321    var properties = [];
4322    for (var _i = 0; _i < arguments.length; _i++) {
4323        properties[_i] = arguments[_i];
4324    }
4325    var length = properties.length;
4326    if (length === 0) {
4327        throw new Error('list of properties cannot be empty.');
4328    }
4329    return function (source) { return Object(map["a" /* map */])(plucker(properties, length))(source); };
4330}
4331function plucker(props, length) {
4332    var mapper = function (x) {
4333        var currentProp = x;
4334        for (var i = 0; i < length; i++) {
4335            var p = currentProp[props[i]];
4336            if (typeof p !== 'undefined') {
4337                currentProp = p;
4338            }
4339            else {
4340                return undefined;
4341            }
4342        }
4343        return currentProp;
4344    };
4345    return mapper;
4346}
4347
4348// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subject.js
4349var Subject = __webpack_require__(8);
4350
4351// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/publish.js
4352/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
4353
4354
4355function publish(selector) {
4356    return selector ?
4357        multicast(function () { return new Subject["a" /* Subject */](); }, selector) :
4358        multicast(new Subject["a" /* Subject */]());
4359}
4360
4361// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/BehaviorSubject.js
4362var BehaviorSubject = __webpack_require__(71);
4363
4364// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js
4365/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
4366
4367
4368function publishBehavior(value) {
4369    return function (source) { return multicast(new BehaviorSubject["a" /* BehaviorSubject */](value))(source); };
4370}
4371
4372// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/AsyncSubject.js
4373var AsyncSubject = __webpack_require__(37);
4374
4375// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/publishLast.js
4376/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
4377
4378
4379function publishLast() {
4380    return function (source) { return multicast(new AsyncSubject["a" /* AsyncSubject */]())(source); };
4381}
4382
4383// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/ReplaySubject.js
4384var ReplaySubject = __webpack_require__(49);
4385
4386// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/publishReplay.js
4387/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
4388
4389
4390function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
4391    if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
4392        scheduler = selectorOrScheduler;
4393    }
4394    var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
4395    var subject = new ReplaySubject["a" /* ReplaySubject */](bufferSize, windowTime, scheduler);
4396    return function (source) { return multicast(function () { return subject; }, selector)(source); };
4397}
4398
4399// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/race.js
4400var race = __webpack_require__(76);
4401
4402// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/race.js
4403/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
4404
4405
4406function race_race() {
4407    var observables = [];
4408    for (var _i = 0; _i < arguments.length; _i++) {
4409        observables[_i] = arguments[_i];
4410    }
4411    return function raceOperatorFunction(source) {
4412        if (observables.length === 1 && Object(isArray["a" /* isArray */])(observables[0])) {
4413            observables = observables[0];
4414        }
4415        return source.lift.call(race["a" /* race */].apply(void 0, [source].concat(observables)));
4416    };
4417}
4418
4419// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/repeat.js
4420/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
4421
4422
4423
4424function repeat(count) {
4425    if (count === void 0) {
4426        count = -1;
4427    }
4428    return function (source) {
4429        if (count === 0) {
4430            return Object(empty["b" /* empty */])();
4431        }
4432        else if (count < 0) {
4433            return source.lift(new RepeatOperator(-1, source));
4434        }
4435        else {
4436            return source.lift(new RepeatOperator(count - 1, source));
4437        }
4438    };
4439}
4440var RepeatOperator = /*@__PURE__*/ (function () {
4441    function RepeatOperator(count, source) {
4442        this.count = count;
4443        this.source = source;
4444    }
4445    RepeatOperator.prototype.call = function (subscriber, source) {
4446        return source.subscribe(new repeat_RepeatSubscriber(subscriber, this.count, this.source));
4447    };
4448    return RepeatOperator;
4449}());
4450var repeat_RepeatSubscriber = /*@__PURE__*/ (function (_super) {
4451    tslib_es6["a" /* __extends */](RepeatSubscriber, _super);
4452    function RepeatSubscriber(destination, count, source) {
4453        var _this = _super.call(this, destination) || this;
4454        _this.count = count;
4455        _this.source = source;
4456        return _this;
4457    }
4458    RepeatSubscriber.prototype.complete = function () {
4459        if (!this.isStopped) {
4460            var _a = this, source = _a.source, count = _a.count;
4461            if (count === 0) {
4462                return _super.prototype.complete.call(this);
4463            }
4464            else if (count > -1) {
4465                this.count = count - 1;
4466            }
4467            source.subscribe(this._unsubscribeAndRecycle());
4468        }
4469    };
4470    return RepeatSubscriber;
4471}(Subscriber["a" /* Subscriber */]));
4472
4473// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js
4474/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
4475
4476
4477
4478
4479
4480
4481function repeatWhen(notifier) {
4482    return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
4483}
4484var RepeatWhenOperator = /*@__PURE__*/ (function () {
4485    function RepeatWhenOperator(notifier) {
4486        this.notifier = notifier;
4487    }
4488    RepeatWhenOperator.prototype.call = function (subscriber, source) {
4489        return source.subscribe(new repeatWhen_RepeatWhenSubscriber(subscriber, this.notifier, source));
4490    };
4491    return RepeatWhenOperator;
4492}());
4493var repeatWhen_RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
4494    tslib_es6["a" /* __extends */](RepeatWhenSubscriber, _super);
4495    function RepeatWhenSubscriber(destination, notifier, source) {
4496        var _this = _super.call(this, destination) || this;
4497        _this.notifier = notifier;
4498        _this.source = source;
4499        _this.sourceIsBeingSubscribedTo = true;
4500        return _this;
4501    }
4502    RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
4503        this.sourceIsBeingSubscribedTo = true;
4504        this.source.subscribe(this);
4505    };
4506    RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
4507        if (this.sourceIsBeingSubscribedTo === false) {
4508            return _super.prototype.complete.call(this);
4509        }
4510    };
4511    RepeatWhenSubscriber.prototype.complete = function () {
4512        this.sourceIsBeingSubscribedTo = false;
4513        if (!this.isStopped) {
4514            if (!this.retries) {
4515                this.subscribeToRetries();
4516            }
4517            if (!this.retriesSubscription || this.retriesSubscription.closed) {
4518                return _super.prototype.complete.call(this);
4519            }
4520            this._unsubscribeAndRecycle();
4521            this.notifications.next();
4522        }
4523    };
4524    RepeatWhenSubscriber.prototype._unsubscribe = function () {
4525        var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
4526        if (notifications) {
4527            notifications.unsubscribe();
4528            this.notifications = null;
4529        }
4530        if (retriesSubscription) {
4531            retriesSubscription.unsubscribe();
4532            this.retriesSubscription = null;
4533        }
4534        this.retries = null;
4535    };
4536    RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
4537        var _unsubscribe = this._unsubscribe;
4538        this._unsubscribe = null;
4539        _super.prototype._unsubscribeAndRecycle.call(this);
4540        this._unsubscribe = _unsubscribe;
4541        return this;
4542    };
4543    RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
4544        this.notifications = new Subject["a" /* Subject */]();
4545        var retries = Object(tryCatch["a" /* tryCatch */])(this.notifier)(this.notifications);
4546        if (retries === errorObject["a" /* errorObject */]) {
4547            return _super.prototype.complete.call(this);
4548        }
4549        this.retries = retries;
4550        this.retriesSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, retries);
4551    };
4552    return RepeatWhenSubscriber;
4553}(OuterSubscriber["a" /* OuterSubscriber */]));
4554
4555// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/retry.js
4556/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
4557
4558
4559function retry(count) {
4560    if (count === void 0) {
4561        count = -1;
4562    }
4563    return function (source) { return source.lift(new RetryOperator(count, source)); };
4564}
4565var RetryOperator = /*@__PURE__*/ (function () {
4566    function RetryOperator(count, source) {
4567        this.count = count;
4568        this.source = source;
4569    }
4570    RetryOperator.prototype.call = function (subscriber, source) {
4571        return source.subscribe(new retry_RetrySubscriber(subscriber, this.count, this.source));
4572    };
4573    return RetryOperator;
4574}());
4575var retry_RetrySubscriber = /*@__PURE__*/ (function (_super) {
4576    tslib_es6["a" /* __extends */](RetrySubscriber, _super);
4577    function RetrySubscriber(destination, count, source) {
4578        var _this = _super.call(this, destination) || this;
4579        _this.count = count;
4580        _this.source = source;
4581        return _this;
4582    }
4583    RetrySubscriber.prototype.error = function (err) {
4584        if (!this.isStopped) {
4585            var _a = this, source = _a.source, count = _a.count;
4586            if (count === 0) {
4587                return _super.prototype.error.call(this, err);
4588            }
4589            else if (count > -1) {
4590                this.count = count - 1;
4591            }
4592            source.subscribe(this._unsubscribeAndRecycle());
4593        }
4594    };
4595    return RetrySubscriber;
4596}(Subscriber["a" /* Subscriber */]));
4597
4598// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/retryWhen.js
4599/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
4600
4601
4602
4603
4604
4605
4606function retryWhen(notifier) {
4607    return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
4608}
4609var RetryWhenOperator = /*@__PURE__*/ (function () {
4610    function RetryWhenOperator(notifier, source) {
4611        this.notifier = notifier;
4612        this.source = source;
4613    }
4614    RetryWhenOperator.prototype.call = function (subscriber, source) {
4615        return source.subscribe(new retryWhen_RetryWhenSubscriber(subscriber, this.notifier, this.source));
4616    };
4617    return RetryWhenOperator;
4618}());
4619var retryWhen_RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
4620    tslib_es6["a" /* __extends */](RetryWhenSubscriber, _super);
4621    function RetryWhenSubscriber(destination, notifier, source) {
4622        var _this = _super.call(this, destination) || this;
4623        _this.notifier = notifier;
4624        _this.source = source;
4625        return _this;
4626    }
4627    RetryWhenSubscriber.prototype.error = function (err) {
4628        if (!this.isStopped) {
4629            var errors = this.errors;
4630            var retries = this.retries;
4631            var retriesSubscription = this.retriesSubscription;
4632            if (!retries) {
4633                errors = new Subject["a" /* Subject */]();
4634                retries = Object(tryCatch["a" /* tryCatch */])(this.notifier)(errors);
4635                if (retries === errorObject["a" /* errorObject */]) {
4636                    return _super.prototype.error.call(this, errorObject["a" /* errorObject */].e);
4637                }
4638                retriesSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, retries);
4639            }
4640            else {
4641                this.errors = null;
4642                this.retriesSubscription = null;
4643            }
4644            this._unsubscribeAndRecycle();
4645            this.errors = errors;
4646            this.retries = retries;
4647            this.retriesSubscription = retriesSubscription;
4648            errors.next(err);
4649        }
4650    };
4651    RetryWhenSubscriber.prototype._unsubscribe = function () {
4652        var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
4653        if (errors) {
4654            errors.unsubscribe();
4655            this.errors = null;
4656        }
4657        if (retriesSubscription) {
4658            retriesSubscription.unsubscribe();
4659            this.retriesSubscription = null;
4660        }
4661        this.retries = null;
4662    };
4663    RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
4664        var _unsubscribe = this._unsubscribe;
4665        this._unsubscribe = null;
4666        this._unsubscribeAndRecycle();
4667        this._unsubscribe = _unsubscribe;
4668        this.source.subscribe(this);
4669    };
4670    return RetryWhenSubscriber;
4671}(OuterSubscriber["a" /* OuterSubscriber */]));
4672
4673// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/refCount.js
4674var operators_refCount = __webpack_require__(48);
4675
4676// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/sample.js
4677/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
4678
4679
4680
4681function sample(notifier) {
4682    return function (source) { return source.lift(new sample_SampleOperator(notifier)); };
4683}
4684var sample_SampleOperator = /*@__PURE__*/ (function () {
4685    function SampleOperator(notifier) {
4686        this.notifier = notifier;
4687    }
4688    SampleOperator.prototype.call = function (subscriber, source) {
4689        var sampleSubscriber = new sample_SampleSubscriber(subscriber);
4690        var subscription = source.subscribe(sampleSubscriber);
4691        subscription.add(Object(subscribeToResult["a" /* subscribeToResult */])(sampleSubscriber, this.notifier));
4692        return subscription;
4693    };
4694    return SampleOperator;
4695}());
4696var sample_SampleSubscriber = /*@__PURE__*/ (function (_super) {
4697    tslib_es6["a" /* __extends */](SampleSubscriber, _super);
4698    function SampleSubscriber() {
4699        var _this = _super !== null && _super.apply(this, arguments) || this;
4700        _this.hasValue = false;
4701        return _this;
4702    }
4703    SampleSubscriber.prototype._next = function (value) {
4704        this.value = value;
4705        this.hasValue = true;
4706    };
4707    SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
4708        this.emitValue();
4709    };
4710    SampleSubscriber.prototype.notifyComplete = function () {
4711        this.emitValue();
4712    };
4713    SampleSubscriber.prototype.emitValue = function () {
4714        if (this.hasValue) {
4715            this.hasValue = false;
4716            this.destination.next(this.value);
4717        }
4718    };
4719    return SampleSubscriber;
4720}(OuterSubscriber["a" /* OuterSubscriber */]));
4721
4722// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/sampleTime.js
4723/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
4724
4725
4726
4727function sampleTime(period, scheduler) {
4728    if (scheduler === void 0) {
4729        scheduler = scheduler_async["a" /* async */];
4730    }
4731    return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
4732}
4733var SampleTimeOperator = /*@__PURE__*/ (function () {
4734    function SampleTimeOperator(period, scheduler) {
4735        this.period = period;
4736        this.scheduler = scheduler;
4737    }
4738    SampleTimeOperator.prototype.call = function (subscriber, source) {
4739        return source.subscribe(new sampleTime_SampleTimeSubscriber(subscriber, this.period, this.scheduler));
4740    };
4741    return SampleTimeOperator;
4742}());
4743var sampleTime_SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
4744    tslib_es6["a" /* __extends */](SampleTimeSubscriber, _super);
4745    function SampleTimeSubscriber(destination, period, scheduler) {
4746        var _this = _super.call(this, destination) || this;
4747        _this.period = period;
4748        _this.scheduler = scheduler;
4749        _this.hasValue = false;
4750        _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
4751        return _this;
4752    }
4753    SampleTimeSubscriber.prototype._next = function (value) {
4754        this.lastValue = value;
4755        this.hasValue = true;
4756    };
4757    SampleTimeSubscriber.prototype.notifyNext = function () {
4758        if (this.hasValue) {
4759            this.hasValue = false;
4760            this.destination.next(this.lastValue);
4761        }
4762    };
4763    return SampleTimeSubscriber;
4764}(Subscriber["a" /* Subscriber */]));
4765function dispatchNotification(state) {
4766    var subscriber = state.subscriber, period = state.period;
4767    subscriber.notifyNext();
4768    this.schedule(state, period);
4769}
4770
4771// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js
4772/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
4773
4774
4775
4776
4777function sequenceEqual(compareTo, comparor) {
4778    return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparor)); };
4779}
4780var SequenceEqualOperator = /*@__PURE__*/ (function () {
4781    function SequenceEqualOperator(compareTo, comparor) {
4782        this.compareTo = compareTo;
4783        this.comparor = comparor;
4784    }
4785    SequenceEqualOperator.prototype.call = function (subscriber, source) {
4786        return source.subscribe(new sequenceEqual_SequenceEqualSubscriber(subscriber, this.compareTo, this.comparor));
4787    };
4788    return SequenceEqualOperator;
4789}());
4790
4791var sequenceEqual_SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
4792    tslib_es6["a" /* __extends */](SequenceEqualSubscriber, _super);
4793    function SequenceEqualSubscriber(destination, compareTo, comparor) {
4794        var _this = _super.call(this, destination) || this;
4795        _this.compareTo = compareTo;
4796        _this.comparor = comparor;
4797        _this._a = [];
4798        _this._b = [];
4799        _this._oneComplete = false;
4800        _this.add(compareTo.subscribe(new sequenceEqual_SequenceEqualCompareToSubscriber(destination, _this)));
4801        return _this;
4802    }
4803    SequenceEqualSubscriber.prototype._next = function (value) {
4804        if (this._oneComplete && this._b.length === 0) {
4805            this.emit(false);
4806        }
4807        else {
4808            this._a.push(value);
4809            this.checkValues();
4810        }
4811    };
4812    SequenceEqualSubscriber.prototype._complete = function () {
4813        if (this._oneComplete) {
4814            this.emit(this._a.length === 0 && this._b.length === 0);
4815        }
4816        else {
4817            this._oneComplete = true;
4818        }
4819    };
4820    SequenceEqualSubscriber.prototype.checkValues = function () {
4821        var _c = this, _a = _c._a, _b = _c._b, comparor = _c.comparor;
4822        while (_a.length > 0 && _b.length > 0) {
4823            var a = _a.shift();
4824            var b = _b.shift();
4825            var areEqual = false;
4826            if (comparor) {
4827                areEqual = Object(tryCatch["a" /* tryCatch */])(comparor)(a, b);
4828                if (areEqual === errorObject["a" /* errorObject */]) {
4829                    this.destination.error(errorObject["a" /* errorObject */].e);
4830                }
4831            }
4832            else {
4833                areEqual = a === b;
4834            }
4835            if (!areEqual) {
4836                this.emit(false);
4837            }
4838        }
4839    };
4840    SequenceEqualSubscriber.prototype.emit = function (value) {
4841        var destination = this.destination;
4842        destination.next(value);
4843        destination.complete();
4844    };
4845    SequenceEqualSubscriber.prototype.nextB = function (value) {
4846        if (this._oneComplete && this._a.length === 0) {
4847            this.emit(false);
4848        }
4849        else {
4850            this._b.push(value);
4851            this.checkValues();
4852        }
4853    };
4854    return SequenceEqualSubscriber;
4855}(Subscriber["a" /* Subscriber */]));
4856
4857var sequenceEqual_SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
4858    tslib_es6["a" /* __extends */](SequenceEqualCompareToSubscriber, _super);
4859    function SequenceEqualCompareToSubscriber(destination, parent) {
4860        var _this = _super.call(this, destination) || this;
4861        _this.parent = parent;
4862        return _this;
4863    }
4864    SequenceEqualCompareToSubscriber.prototype._next = function (value) {
4865        this.parent.nextB(value);
4866    };
4867    SequenceEqualCompareToSubscriber.prototype._error = function (err) {
4868        this.parent.error(err);
4869    };
4870    SequenceEqualCompareToSubscriber.prototype._complete = function () {
4871        this.parent._complete();
4872    };
4873    return SequenceEqualCompareToSubscriber;
4874}(Subscriber["a" /* Subscriber */]));
4875
4876// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/share.js
4877/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
4878
4879
4880
4881function shareSubjectFactory() {
4882    return new Subject["a" /* Subject */]();
4883}
4884function share() {
4885    return function (source) { return Object(operators_refCount["a" /* refCount */])()(multicast(shareSubjectFactory)(source)); };
4886}
4887
4888// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/shareReplay.js
4889/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
4890
4891function shareReplay(bufferSize, windowTime, scheduler) {
4892    return function (source) { return source.lift(shareReplayOperator(bufferSize, windowTime, scheduler)); };
4893}
4894function shareReplayOperator(bufferSize, windowTime, scheduler) {
4895    var subject;
4896    var refCount = 0;
4897    var subscription;
4898    var hasError = false;
4899    var isComplete = false;
4900    return function shareReplayOperation(source) {
4901        refCount++;
4902        if (!subject || hasError) {
4903            hasError = false;
4904            subject = new ReplaySubject["a" /* ReplaySubject */](bufferSize, windowTime, scheduler);
4905            subscription = source.subscribe({
4906                next: function (value) { subject.next(value); },
4907                error: function (err) {
4908                    hasError = true;
4909                    subject.error(err);
4910                },
4911                complete: function () {
4912                    isComplete = true;
4913                    subject.complete();
4914                },
4915            });
4916        }
4917        var innerSub = subject.subscribe(this);
4918        return function () {
4919            refCount--;
4920            innerSub.unsubscribe();
4921            if (subscription && refCount === 0 && isComplete) {
4922                subscription.unsubscribe();
4923            }
4924        };
4925    };
4926}
4927
4928// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/single.js
4929/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
4930
4931
4932
4933function single(predicate) {
4934    return function (source) { return source.lift(new SingleOperator(predicate, source)); };
4935}
4936var SingleOperator = /*@__PURE__*/ (function () {
4937    function SingleOperator(predicate, source) {
4938        this.predicate = predicate;
4939        this.source = source;
4940    }
4941    SingleOperator.prototype.call = function (subscriber, source) {
4942        return source.subscribe(new single_SingleSubscriber(subscriber, this.predicate, this.source));
4943    };
4944    return SingleOperator;
4945}());
4946var single_SingleSubscriber = /*@__PURE__*/ (function (_super) {
4947    tslib_es6["a" /* __extends */](SingleSubscriber, _super);
4948    function SingleSubscriber(destination, predicate, source) {
4949        var _this = _super.call(this, destination) || this;
4950        _this.predicate = predicate;
4951        _this.source = source;
4952        _this.seenValue = false;
4953        _this.index = 0;
4954        return _this;
4955    }
4956    SingleSubscriber.prototype.applySingleValue = function (value) {
4957        if (this.seenValue) {
4958            this.destination.error('Sequence contains more than one element');
4959        }
4960        else {
4961            this.seenValue = true;
4962            this.singleValue = value;
4963        }
4964    };
4965    SingleSubscriber.prototype._next = function (value) {
4966        var index = this.index++;
4967        if (this.predicate) {
4968            this.tryNext(value, index);
4969        }
4970        else {
4971            this.applySingleValue(value);
4972        }
4973    };
4974    SingleSubscriber.prototype.tryNext = function (value, index) {
4975        try {
4976            if (this.predicate(value, index, this.source)) {
4977                this.applySingleValue(value);
4978            }
4979        }
4980        catch (err) {
4981            this.destination.error(err);
4982        }
4983    };
4984    SingleSubscriber.prototype._complete = function () {
4985        var destination = this.destination;
4986        if (this.index > 0) {
4987            destination.next(this.seenValue ? this.singleValue : undefined);
4988            destination.complete();
4989        }
4990        else {
4991            destination.error(new EmptyError["a" /* EmptyError */]);
4992        }
4993    };
4994    return SingleSubscriber;
4995}(Subscriber["a" /* Subscriber */]));
4996
4997// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/skip.js
4998/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
4999
5000
5001function skip(count) {
5002    return function (source) { return source.lift(new SkipOperator(count)); };
5003}
5004var SkipOperator = /*@__PURE__*/ (function () {
5005    function SkipOperator(total) {
5006        this.total = total;
5007    }
5008    SkipOperator.prototype.call = function (subscriber, source) {
5009        return source.subscribe(new skip_SkipSubscriber(subscriber, this.total));
5010    };
5011    return SkipOperator;
5012}());
5013var skip_SkipSubscriber = /*@__PURE__*/ (function (_super) {
5014    tslib_es6["a" /* __extends */](SkipSubscriber, _super);
5015    function SkipSubscriber(destination, total) {
5016        var _this = _super.call(this, destination) || this;
5017        _this.total = total;
5018        _this.count = 0;
5019        return _this;
5020    }
5021    SkipSubscriber.prototype._next = function (x) {
5022        if (++this.count > this.total) {
5023            this.destination.next(x);
5024        }
5025    };
5026    return SkipSubscriber;
5027}(Subscriber["a" /* Subscriber */]));
5028
5029// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/skipLast.js
5030/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
5031
5032
5033
5034function skipLast(count) {
5035    return function (source) { return source.lift(new skipLast_SkipLastOperator(count)); };
5036}
5037var skipLast_SkipLastOperator = /*@__PURE__*/ (function () {
5038    function SkipLastOperator(_skipCount) {
5039        this._skipCount = _skipCount;
5040        if (this._skipCount < 0) {
5041            throw new ArgumentOutOfRangeError["a" /* ArgumentOutOfRangeError */];
5042        }
5043    }
5044    SkipLastOperator.prototype.call = function (subscriber, source) {
5045        if (this._skipCount === 0) {
5046            return source.subscribe(new Subscriber["a" /* Subscriber */](subscriber));
5047        }
5048        else {
5049            return source.subscribe(new skipLast_SkipLastSubscriber(subscriber, this._skipCount));
5050        }
5051    };
5052    return SkipLastOperator;
5053}());
5054var skipLast_SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
5055    tslib_es6["a" /* __extends */](SkipLastSubscriber, _super);
5056    function SkipLastSubscriber(destination, _skipCount) {
5057        var _this = _super.call(this, destination) || this;
5058        _this._skipCount = _skipCount;
5059        _this._count = 0;
5060        _this._ring = new Array(_skipCount);
5061        return _this;
5062    }
5063    SkipLastSubscriber.prototype._next = function (value) {
5064        var skipCount = this._skipCount;
5065        var count = this._count++;
5066        if (count < skipCount) {
5067            this._ring[count] = value;
5068        }
5069        else {
5070            var currentIndex = count % skipCount;
5071            var ring = this._ring;
5072            var oldValue = ring[currentIndex];
5073            ring[currentIndex] = value;
5074            this.destination.next(oldValue);
5075        }
5076    };
5077    return SkipLastSubscriber;
5078}(Subscriber["a" /* Subscriber */]));
5079
5080// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/skipUntil.js
5081/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
5082
5083
5084
5085function skipUntil(notifier) {
5086    return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
5087}
5088var SkipUntilOperator = /*@__PURE__*/ (function () {
5089    function SkipUntilOperator(notifier) {
5090        this.notifier = notifier;
5091    }
5092    SkipUntilOperator.prototype.call = function (destination, source) {
5093        return source.subscribe(new skipUntil_SkipUntilSubscriber(destination, this.notifier));
5094    };
5095    return SkipUntilOperator;
5096}());
5097var skipUntil_SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
5098    tslib_es6["a" /* __extends */](SkipUntilSubscriber, _super);
5099    function SkipUntilSubscriber(destination, notifier) {
5100        var _this = _super.call(this, destination) || this;
5101        _this.hasValue = false;
5102        _this.add(_this.innerSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(_this, notifier));
5103        return _this;
5104    }
5105    SkipUntilSubscriber.prototype._next = function (value) {
5106        if (this.hasValue) {
5107            _super.prototype._next.call(this, value);
5108        }
5109    };
5110    SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
5111        this.hasValue = true;
5112        if (this.innerSubscription) {
5113            this.innerSubscription.unsubscribe();
5114        }
5115    };
5116    SkipUntilSubscriber.prototype.notifyComplete = function () {
5117    };
5118    return SkipUntilSubscriber;
5119}(OuterSubscriber["a" /* OuterSubscriber */]));
5120
5121// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/skipWhile.js
5122/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
5123
5124
5125function skipWhile(predicate) {
5126    return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
5127}
5128var SkipWhileOperator = /*@__PURE__*/ (function () {
5129    function SkipWhileOperator(predicate) {
5130        this.predicate = predicate;
5131    }
5132    SkipWhileOperator.prototype.call = function (subscriber, source) {
5133        return source.subscribe(new skipWhile_SkipWhileSubscriber(subscriber, this.predicate));
5134    };
5135    return SkipWhileOperator;
5136}());
5137var skipWhile_SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
5138    tslib_es6["a" /* __extends */](SkipWhileSubscriber, _super);
5139    function SkipWhileSubscriber(destination, predicate) {
5140        var _this = _super.call(this, destination) || this;
5141        _this.predicate = predicate;
5142        _this.skipping = true;
5143        _this.index = 0;
5144        return _this;
5145    }
5146    SkipWhileSubscriber.prototype._next = function (value) {
5147        var destination = this.destination;
5148        if (this.skipping) {
5149            this.tryCallPredicate(value);
5150        }
5151        if (!this.skipping) {
5152            destination.next(value);
5153        }
5154    };
5155    SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
5156        try {
5157            var result = this.predicate(value, this.index++);
5158            this.skipping = Boolean(result);
5159        }
5160        catch (err) {
5161            this.destination.error(err);
5162        }
5163    };
5164    return SkipWhileSubscriber;
5165}(Subscriber["a" /* Subscriber */]));
5166
5167// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/startWith.js
5168/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
5169
5170
5171
5172
5173
5174function startWith() {
5175    var array = [];
5176    for (var _i = 0; _i < arguments.length; _i++) {
5177        array[_i] = arguments[_i];
5178    }
5179    return function (source) {
5180        var scheduler = array[array.length - 1];
5181        if (Object(isScheduler["a" /* isScheduler */])(scheduler)) {
5182            array.pop();
5183        }
5184        else {
5185            scheduler = null;
5186        }
5187        var len = array.length;
5188        if (len === 1 && !scheduler) {
5189            return Object(concat["a" /* concat */])(Object(scalar["a" /* scalar */])(array[0]), source);
5190        }
5191        else if (len > 0) {
5192            return Object(concat["a" /* concat */])(Object(fromArray["a" /* fromArray */])(array, scheduler), source);
5193        }
5194        else {
5195            return Object(concat["a" /* concat */])(Object(empty["b" /* empty */])(scheduler), source);
5196        }
5197    };
5198}
5199
5200// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/asap.js + 3 modules
5201var asap = __webpack_require__(57);
5202
5203// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isNumeric.js
5204var isNumeric = __webpack_require__(39);
5205
5206// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js
5207/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
5208
5209
5210
5211
5212var SubscribeOnObservable_SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
5213    tslib_es6["a" /* __extends */](SubscribeOnObservable, _super);
5214    function SubscribeOnObservable(source, delayTime, scheduler) {
5215        if (delayTime === void 0) {
5216            delayTime = 0;
5217        }
5218        if (scheduler === void 0) {
5219            scheduler = asap["a" /* asap */];
5220        }
5221        var _this = _super.call(this) || this;
5222        _this.source = source;
5223        _this.delayTime = delayTime;
5224        _this.scheduler = scheduler;
5225        if (!Object(isNumeric["a" /* isNumeric */])(delayTime) || delayTime < 0) {
5226            _this.delayTime = 0;
5227        }
5228        if (!scheduler || typeof scheduler.schedule !== 'function') {
5229            _this.scheduler = asap["a" /* asap */];
5230        }
5231        return _this;
5232    }
5233    SubscribeOnObservable.create = function (source, delay, scheduler) {
5234        if (delay === void 0) {
5235            delay = 0;
5236        }
5237        if (scheduler === void 0) {
5238            scheduler = asap["a" /* asap */];
5239        }
5240        return new SubscribeOnObservable(source, delay, scheduler);
5241    };
5242    SubscribeOnObservable.dispatch = function (arg) {
5243        var source = arg.source, subscriber = arg.subscriber;
5244        return this.add(source.subscribe(subscriber));
5245    };
5246    SubscribeOnObservable.prototype._subscribe = function (subscriber) {
5247        var delay = this.delayTime;
5248        var source = this.source;
5249        var scheduler = this.scheduler;
5250        return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
5251            source: source, subscriber: subscriber
5252        });
5253    };
5254    return SubscribeOnObservable;
5255}(Observable["a" /* Observable */]));
5256
5257
5258// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js
5259/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
5260
5261function subscribeOn(scheduler, delay) {
5262    if (delay === void 0) {
5263        delay = 0;
5264    }
5265    return function subscribeOnOperatorFunction(source) {
5266        return source.lift(new subscribeOn_SubscribeOnOperator(scheduler, delay));
5267    };
5268}
5269var subscribeOn_SubscribeOnOperator = /*@__PURE__*/ (function () {
5270    function SubscribeOnOperator(scheduler, delay) {
5271        this.scheduler = scheduler;
5272        this.delay = delay;
5273    }
5274    SubscribeOnOperator.prototype.call = function (subscriber, source) {
5275        return new SubscribeOnObservable_SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);
5276    };
5277    return SubscribeOnOperator;
5278}());
5279
5280// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/switchMap.js
5281/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
5282
5283
5284
5285
5286
5287function switchMap(project, resultSelector) {
5288    if (typeof resultSelector === 'function') {
5289        return function (source) { return source.pipe(switchMap(function (a, i) { return Object(from["a" /* from */])(project(a, i)).pipe(Object(map["a" /* map */])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
5290    }
5291    return function (source) { return source.lift(new SwitchMapOperator(project)); };
5292}
5293var SwitchMapOperator = /*@__PURE__*/ (function () {
5294    function SwitchMapOperator(project) {
5295        this.project = project;
5296    }
5297    SwitchMapOperator.prototype.call = function (subscriber, source) {
5298        return source.subscribe(new switchMap_SwitchMapSubscriber(subscriber, this.project));
5299    };
5300    return SwitchMapOperator;
5301}());
5302var switchMap_SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
5303    tslib_es6["a" /* __extends */](SwitchMapSubscriber, _super);
5304    function SwitchMapSubscriber(destination, project) {
5305        var _this = _super.call(this, destination) || this;
5306        _this.project = project;
5307        _this.index = 0;
5308        return _this;
5309    }
5310    SwitchMapSubscriber.prototype._next = function (value) {
5311        var result;
5312        var index = this.index++;
5313        try {
5314            result = this.project(value, index);
5315        }
5316        catch (error) {
5317            this.destination.error(error);
5318            return;
5319        }
5320        this._innerSub(result, value, index);
5321    };
5322    SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
5323        var innerSubscription = this.innerSubscription;
5324        if (innerSubscription) {
5325            innerSubscription.unsubscribe();
5326        }
5327        this.add(this.innerSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, result, value, index));
5328    };
5329    SwitchMapSubscriber.prototype._complete = function () {
5330        var innerSubscription = this.innerSubscription;
5331        if (!innerSubscription || innerSubscription.closed) {
5332            _super.prototype._complete.call(this);
5333        }
5334    };
5335    SwitchMapSubscriber.prototype._unsubscribe = function () {
5336        this.innerSubscription = null;
5337    };
5338    SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
5339        this.remove(innerSub);
5340        this.innerSubscription = null;
5341        if (this.isStopped) {
5342            _super.prototype._complete.call(this);
5343        }
5344    };
5345    SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
5346        this.destination.next(innerValue);
5347    };
5348    return SwitchMapSubscriber;
5349}(OuterSubscriber["a" /* OuterSubscriber */]));
5350
5351// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/switchAll.js
5352/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
5353
5354
5355function switchAll() {
5356    return switchMap(identity["a" /* identity */]);
5357}
5358
5359// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js
5360/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
5361
5362function switchMapTo(innerObservable, resultSelector) {
5363    return resultSelector ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });
5364}
5365
5366// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/takeUntil.js
5367/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
5368
5369
5370
5371function takeUntil(notifier) {
5372    return function (source) { return source.lift(new takeUntil_TakeUntilOperator(notifier)); };
5373}
5374var takeUntil_TakeUntilOperator = /*@__PURE__*/ (function () {
5375    function TakeUntilOperator(notifier) {
5376        this.notifier = notifier;
5377    }
5378    TakeUntilOperator.prototype.call = function (subscriber, source) {
5379        var takeUntilSubscriber = new takeUntil_TakeUntilSubscriber(subscriber);
5380        var notifierSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(takeUntilSubscriber, this.notifier);
5381        if (notifierSubscription && !notifierSubscription.closed) {
5382            takeUntilSubscriber.add(notifierSubscription);
5383            return source.subscribe(takeUntilSubscriber);
5384        }
5385        return takeUntilSubscriber;
5386    };
5387    return TakeUntilOperator;
5388}());
5389var takeUntil_TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
5390    tslib_es6["a" /* __extends */](TakeUntilSubscriber, _super);
5391    function TakeUntilSubscriber(destination) {
5392        return _super.call(this, destination) || this;
5393    }
5394    TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
5395        this.complete();
5396    };
5397    TakeUntilSubscriber.prototype.notifyComplete = function () {
5398    };
5399    return TakeUntilSubscriber;
5400}(OuterSubscriber["a" /* OuterSubscriber */]));
5401
5402// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/takeWhile.js
5403/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
5404
5405
5406function takeWhile(predicate) {
5407    return function (source) { return source.lift(new TakeWhileOperator(predicate)); };
5408}
5409var TakeWhileOperator = /*@__PURE__*/ (function () {
5410    function TakeWhileOperator(predicate) {
5411        this.predicate = predicate;
5412    }
5413    TakeWhileOperator.prototype.call = function (subscriber, source) {
5414        return source.subscribe(new takeWhile_TakeWhileSubscriber(subscriber, this.predicate));
5415    };
5416    return TakeWhileOperator;
5417}());
5418var takeWhile_TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
5419    tslib_es6["a" /* __extends */](TakeWhileSubscriber, _super);
5420    function TakeWhileSubscriber(destination, predicate) {
5421        var _this = _super.call(this, destination) || this;
5422        _this.predicate = predicate;
5423        _this.index = 0;
5424        return _this;
5425    }
5426    TakeWhileSubscriber.prototype._next = function (value) {
5427        var destination = this.destination;
5428        var result;
5429        try {
5430            result = this.predicate(value, this.index++);
5431        }
5432        catch (err) {
5433            destination.error(err);
5434            return;
5435        }
5436        this.nextOrComplete(value, result);
5437    };
5438    TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
5439        var destination = this.destination;
5440        if (Boolean(predicateResult)) {
5441            destination.next(value);
5442        }
5443        else {
5444            destination.complete();
5445        }
5446    };
5447    return TakeWhileSubscriber;
5448}(Subscriber["a" /* Subscriber */]));
5449
5450// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/throttle.js
5451/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
5452
5453
5454
5455var defaultThrottleConfig = {
5456    leading: true,
5457    trailing: false
5458};
5459function throttle(durationSelector, config) {
5460    if (config === void 0) {
5461        config = defaultThrottleConfig;
5462    }
5463    return function (source) { return source.lift(new ThrottleOperator(
5463durationSelector, config.leading, config.trailing)); };
5464}
5465var ThrottleOperator = /*@__PURE__*/ (function () {
5466    function ThrottleOperator(durationSelector, leading, trailing) {
5467        this.durationSelector = durationSelector;
5468        this.leading = leading;
5469        this.trailing = trailing;
5470    }
5471    ThrottleOperator.prototype.call = function (subscriber, source) {
5472        return source.subscribe(new throttle_ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
5473    };
5474    return ThrottleOperator;
5475}());
5476var throttle_ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
5477    tslib_es6["a" /* __extends */](ThrottleSubscriber, _super);
5478    function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
5479        var _this = _super.call(this, destination) || this;
5480        _this.destination = destination;
5481        _this.durationSelector = durationSelector;
5482        _this._leading = _leading;
5483        _this._trailing = _trailing;
5484        _this._hasValue = false;
5485        return _this;
5486    }
5487    ThrottleSubscriber.prototype._next = function (value) {
5488        this._hasValue = true;
5489        this._sendValue = value;
5490        if (!this._throttled) {
5491            if (this._leading) {
5492                this.send();
5493            }
5494            else {
5495                this.throttle(value);
5496            }
5497        }
5498    };
5499    ThrottleSubscriber.prototype.send = function () {
5500        var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
5501        if (_hasValue) {
5502            this.destination.next(_sendValue);
5503            this.throttle(_sendValue);
5504        }
5505        this._hasValue = false;
5506        this._sendValue = null;
5507    };
5508    ThrottleSubscriber.prototype.throttle = function (value) {
5509        var duration = this.tryDurationSelector(value);
5510        if (duration) {
5511            this.add(this._throttled = Object(subscribeToResult["a" /* subscribeToResult */])(this, duration));
5512        }
5513    };
5514    ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
5515        try {
5516            return this.durationSelector(value);
5517        }
5518        catch (err) {
5519            this.destination.error(err);
5520            return null;
5521        }
5522    };
5523    ThrottleSubscriber.prototype.throttlingDone = function () {
5524        var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
5525        if (_throttled) {
5526            _throttled.unsubscribe();
5527        }
5528        this._throttled = null;
5529        if (_trailing) {
5530            this.send();
5531        }
5532    };
5533    ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
5534        this.throttlingDone();
5535    };
5536    ThrottleSubscriber.prototype.notifyComplete = function () {
5537        this.throttlingDone();
5538    };
5539    return ThrottleSubscriber;
5540}(OuterSubscriber["a" /* OuterSubscriber */]));
5541
5542// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/throttleTime.js
5543/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
5544
5545
5546
5547
5548function throttleTime(duration, scheduler, config) {
5549    if (scheduler === void 0) {
5550        scheduler = scheduler_async["a" /* async */];
5551    }
5552    if (config === void 0) {
5553        config = defaultThrottleConfig;
5554    }
5555    return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
5556}
5557var ThrottleTimeOperator = /*@__PURE__*/ (function () {
5558    function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
5559        this.duration = duration;
5560        this.scheduler = scheduler;
5561        this.leading = leading;
5562        this.trailing = trailing;
5563    }
5564    ThrottleTimeOperator.prototype.call = function (subscriber, source) {
5565        return source.subscribe(new throttleTime_ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
5566    };
5567    return ThrottleTimeOperator;
5568}());
5569var throttleTime_ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
5570    tslib_es6["a" /* __extends */](ThrottleTimeSubscriber, _super);
5571    function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
5572        var _this = _super.call(this, destination) || this;
5573        _this.duration = duration;
5574        _this.scheduler = scheduler;
5575        _this.leading = leading;
5576        _this.trailing = trailing;
5577        _this._hasTrailingValue = false;
5578        _this._trailingValue = null;
5579        return _this;
5580    }
5581    ThrottleTimeSubscriber.prototype._next = function (value) {
5582        if (this.throttled) {
5583            if (this.trailing) {
5584                this._trailingValue = value;
5585                this._hasTrailingValue = true;
5586            }
5587        }
5588        else {
5589            this.add(this.throttled = this.scheduler.schedule(throttleTime_dispatchNext, this.duration, { subscriber: this }));
5590            if (this.leading) {
5591                this.destination.next(value);
5592            }
5593        }
5594    };
5595    ThrottleTimeSubscriber.prototype._complete = function () {
5596        if (this._hasTrailingValue) {
5597            this.destination.next(this._trailingValue);
5598            this.destination.complete();
5599        }
5600        else {
5601            this.destination.complete();
5602        }
5603    };
5604    ThrottleTimeSubscriber.prototype.clearThrottle = function () {
5605        var throttled = this.throttled;
5606        if (throttled) {
5607            if (this.trailing && this._hasTrailingValue) {
5608                this.destination.next(this._trailingValue);
5609                this._trailingValue = null;
5610                this._hasTrailingValue = false;
5611            }
5612            throttled.unsubscribe();
5613            this.remove(throttled);
5614            this.throttled = null;
5615        }
5616    };
5617    return ThrottleTimeSubscriber;
5618}(Subscriber["a" /* Subscriber */]));
5619function throttleTime_dispatchNext(arg) {
5620    var subscriber = arg.subscriber;
5621    subscriber.clearThrottle();
5622}
5623
5624// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/defer.js
5625var defer = __webpack_require__(54);
5626
5627// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/timeInterval.js
5628/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
5629
5630
5631
5632
5633function timeInterval(scheduler) {
5634    if (scheduler === void 0) {
5635        scheduler = scheduler_async["a" /* async */];
5636    }
5637    return function (source) {
5638        return Object(defer["a" /* defer */])(function () {
5639            return source.pipe(scan(function (_a, value) {
5640                var current = _a.current;
5641                return ({ value: value, current: scheduler.now(), last: current });
5642            }, { current: scheduler.now(), value: undefined, last: undefined }), Object(map["a" /* map */])(function (_a) {
5643                var current = _a.current, last = _a.last, value = _a.value;
5644                return new TimeInterval(value, current - last);
5645            }));
5646        });
5647    };
5648}
5649var TimeInterval = /*@__PURE__*/ (function () {
5650    function TimeInterval(value, interval) {
5651        this.value = value;
5652        this.interval = interval;
5653    }
5654    return TimeInterval;
5655}());
5656
5657
5658// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/TimeoutError.js
5659var TimeoutError = __webpack_require__(73);
5660
5661// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js
5662/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
5663
5664
5665
5666
5667
5668function timeoutWith(due, withObservable, scheduler) {
5669    if (scheduler === void 0) {
5670        scheduler = scheduler_async["a" /* async */];
5671    }
5672    return function (source) {
5673        var absoluteTimeout = isDate(due);
5674        var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
5675        return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
5676    };
5677}
5678var TimeoutWithOperator = /*@__PURE__*/ (function () {
5679    function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
5680        this.waitFor = waitFor;
5681        this.absoluteTimeout = absoluteTimeout;
5682        this.withObservable = withObservable;
5683        this.scheduler = scheduler;
5684    }
5685    TimeoutWithOperator.prototype.call = function (subscriber, source) {
5686        return source.subscribe(new timeoutWith_TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
5687    };
5688    return TimeoutWithOperator;
5689}());
5690var timeoutWith_TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
5691    tslib_es6["a" /* __extends */](TimeoutWithSubscriber, _super);
5692    function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
5693        var _this = _super.call(this, destination) || this;
5694        _this.absoluteTimeout = absoluteTimeout;
5695        _this.waitFor = waitFor;
5696        _this.withObservable = withObservable;
5697        _this.scheduler = scheduler;
5698        _this.action = null;
5699        _this.scheduleTimeout();
5700        return _this;
5701    }
5702    TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
5703        var withObservable = subscriber.withObservable;
5704        subscriber._unsubscribeAndRecycle();
5705        subscriber.add(Object(subscribeToResult["a" /* subscribeToResult */])(subscriber, withObservable));
5706    };
5707    TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
5708        var action = this.action;
5709        if (action) {
5710            this.action = action.schedule(this, this.waitFor);
5711        }
5712        else {
5713            this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
5714        }
5715    };
5716    TimeoutWithSubscriber.prototype._next = function (value) {
5717        if (!this.absoluteTimeout) {
5718            this.scheduleTimeout();
5719        }
5720        _super.prototype._next.call(this, value);
5721    };
5722    TimeoutWithSubscriber.prototype._unsubscribe = function () {
5723        this.action = null;
5724        this.scheduler = null;
5725        this.withObservable = null;
5726    };
5727    return TimeoutWithSubscriber;
5728}(OuterSubscriber["a" /* OuterSubscriber */]));
5729
5730// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/throwError.js
5731var throwError = __webpack_require__(51);
5732
5733// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/timeout.js
5734/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
5735
5736
5737
5738
5739function timeout(due, scheduler) {
5740    if (scheduler === void 0) {
5741        scheduler = scheduler_async["a" /* async */];
5742    }
5743    return timeoutWith(due, Object(throwError["a" /* throwError */])(new TimeoutError["a" /* TimeoutError */]()), scheduler);
5744}
5745
5746// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/timestamp.js
5747/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
5748
5749
5750function timestamp(scheduler) {
5751    if (scheduler === void 0) {
5752        scheduler = scheduler_async["a" /* async */];
5753    }
5754    return Object(map["a" /* map */])(function (value) { return new Timestamp(value, scheduler.now()); });
5755}
5756var Timestamp = /*@__PURE__*/ (function () {
5757    function Timestamp(value, timestamp) {
5758        this.value = value;
5759        this.timestamp = timestamp;
5760    }
5761    return Timestamp;
5762}());
5763
5764
5765// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/toArray.js
5766/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
5767
5768function toArrayReducer(arr, item, index) {
5769    if (index === 0) {
5770        return [item];
5771    }
5772    arr.push(item);
5773    return arr;
5774}
5775function toArray() {
5776    return reduce(toArrayReducer, []);
5777}
5778
5779// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/window.js
5780/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
5781
5782
5783
5784
5785function window_window(windowBoundaries) {
5786    return function windowOperatorFunction(source) {
5787        return source.lift(new window_WindowOperator(windowBoundaries));
5788    };
5789}
5790var window_WindowOperator = /*@__PURE__*/ (function () {
5791    function WindowOperator(windowBoundaries) {
5792        this.windowBoundaries = windowBoundaries;
5793    }
5794    WindowOperator.prototype.call = function (subscriber, source) {
5795        var windowSubscriber = new window_WindowSubscriber(subscriber);
5796        var sourceSubscription = source.subscribe(windowSubscriber);
5797        if (!sourceSubscription.closed) {
5798            windowSubscriber.add(Object(subscribeToResult["a" /* subscribeToResult */])(windowSubscriber, this.windowBoundaries));
5799        }
5800        return sourceSubscription;
5801    };
5802    return WindowOperator;
5803}());
5804var window_WindowSubscriber = /*@__PURE__*/ (function (_super) {
5805    tslib_es6["a" /* __extends */](WindowSubscriber, _super);
5806    function WindowSubscriber(destination) {
5807        var _this = _super.call(this, destination) || this;
5808        _this.window = new Subject["a" /* Subject */]();
5809        destination.next(_this.window);
5810        return _this;
5811    }
5812    WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
5813        this.openWindow();
5814    };
5815    WindowSubscriber.prototype.notifyError = function (error, innerSub) {
5816        this._error(error);
5817    };
5818    WindowSubscriber.prototype.notifyComplete = function (innerSub) {
5819        this._complete();
5820    };
5821    WindowSubscriber.prototype._next = function (value) {
5822        this.window.next(value);
5823    };
5824    WindowSubscriber.prototype._error = function (err) {
5825        this.window.error(err);
5826        this.destination.error(err);
5827    };
5828    WindowSubscriber.prototype._complete = function () {
5829        this.window.complete();
5830        this.destination.complete();
5831    };
5832    WindowSubscriber.prototype._unsubscribe = function () {
5833        this.window = null;
5834    };
5835    WindowSubscriber.prototype.openWindow = function () {
5836        var prevWindow = this.window;
5837        if (prevWindow) {
5838            prevWindow.complete();
5839        }
5840        var destination = this.destination;
5841        var newWindow = this.window = new Subject["a" /* Subject */]();
5842        destination.next(newWindow);
5843    };
5844    return WindowSubscriber;
5845}(OuterSubscriber["a" /* OuterSubscriber */]));
5846
5847// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/windowCount.js
5848/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
5849
5850
5851
5852function windowCount(windowSize, startWindowEvery) {
5853    if (startWindowEvery === void 0) {
5854        startWindowEvery = 0;
5855    }
5856    return function windowCountOperatorFunction(source) {
5857        return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
5858    };
5859}
5860var WindowCountOperator = /*@__PURE__*/ (function () {
5861    function WindowCountOperator(windowSize, startWindowEvery) {
5862        this.windowSize = windowSize;
5863        this.startWindowEvery = startWindowEvery;
5864    }
5865    WindowCountOperator.prototype.call = function (subscriber, source) {
5866        return source.subscribe(new windowCount_WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
5867    };
5868    return WindowCountOperator;
5869}());
5870var windowCount_WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
5871    tslib_es6["a" /* __extends */](WindowCountSubscriber, _super);
5872    function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
5873        var _this = _super.call(this, destination) || this;
5874        _this.destination = destination;
5875        _this.windowSize = windowSize;
5876        _this.startWindowEvery = startWindowEvery;
5877        _this.windows = [new Subject["a" /* Subject */]()];
5878        _this.count = 0;
5879        destination.next(_this.windows[0]);
5880        return _this;
5881    }
5882    WindowCountSubscriber.prototype._next = function (value) {
5883        var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
5884        var destination = this.destination;
5885        var windowSize = this.windowSize;
5886        var windows = this.windows;
5887        var len = windows.length;
5888        for (var i = 0; i < len && !
5888this.closed; i++) {
5889            windows[i].next(value);
5890        }
5891        var c = this.count - windowSize + 1;
5892        if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
5893            windows.shift().complete();
5894        }
5895        if (++this.count % startWindowEvery === 0 && !this.closed) {
5896            var window_1 = new Subject["a" /* Subject */]();
5897            windows.push(window_1);
5898            destination.next(window_1);
5899        }
5900    };
5901    WindowCountSubscriber.prototype._error = function (err) {
5902        var windows = this.windows;
5903        if (windows) {
5904            while (windows.length > 0 && !this.closed) {
5905                windows.shift().error(err);
5906            }
5907        }
5908        this.destination.error(err);
5909    };
5910    WindowCountSubscriber.prototype._complete = function () {
5911        var windows = this.windows;
5912        if (windows) {
5913            while (windows.length > 0 && !this.closed) {
5914                windows.shift().complete();
5915            }
5916        }
5917        this.destination.complete();
5918    };
5919    WindowCountSubscriber.prototype._unsubscribe = function () {
5920        this.count = 0;
5921        this.windows = null;
5922    };
5923    return WindowCountSubscriber;
5924}(Subscriber["a" /* Subscriber */]));
5925
5926// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/windowTime.js
5927/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
5928
5929
5930
5931
5932
5933
5934function windowTime_windowTime(windowTimeSpan) {
5935    var scheduler = scheduler_async["a" /* async */];
5936    var windowCreationInterval = null;
5937    var maxWindowSize = Number.POSITIVE_INFINITY;
5938    if (Object(isScheduler["a" /* isScheduler */])(arguments[3])) {
5939        scheduler = arguments[3];
5940    }
5941    if (Object(isScheduler["a" /* isScheduler */])(arguments[2])) {
5942        scheduler = arguments[2];
5943    }
5944    else if (Object(isNumeric["a" /* isNumeric */])(arguments[2])) {
5945        maxWindowSize = arguments[2];
5946    }
5947    if (Object(isScheduler["a" /* isScheduler */])(arguments[1])) {
5948        scheduler = arguments[1];
5949    }
5950    else if (Object(isNumeric["a" /* isNumeric */])(arguments[1])) {
5951        windowCreationInterval = arguments[1];
5952    }
5953    return function windowTimeOperatorFunction(source) {
5954        return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
5955    };
5956}
5957var WindowTimeOperator = /*@__PURE__*/ (function () {
5958    function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
5959        this.windowTimeSpan = windowTimeSpan;
5960        this.windowCreationInterval = windowCreationInterval;
5961        this.maxWindowSize = maxWindowSize;
5962        this.scheduler = scheduler;
5963    }
5964    WindowTimeOperator.prototype.call = function (subscriber, source) {
5965        return source.subscribe(new windowTime_WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
5966    };
5967    return WindowTimeOperator;
5968}());
5969var windowTime_CountedSubject = /*@__PURE__*/ (function (_super) {
5970    tslib_es6["a" /* __extends */](CountedSubject, _super);
5971    function CountedSubject() {
5972        var _this = _super !== null && _super.apply(this, arguments) || this;
5973        _this._numberOfNextedValues = 0;
5974        return _this;
5975    }
5976    CountedSubject.prototype.next = function (value) {
5977        this._numberOfNextedValues++;
5978        _super.prototype.next.call(this, value);
5979    };
5980    Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
5981        get: function () {
5982            return this._numberOfNextedValues;
5983        },
5984        enumerable: true,
5985        configurable: true
5986    });
5987    return CountedSubject;
5988}(Subject["a" /* Subject */]));
5989var windowTime_WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
5990    tslib_es6["a" /* __extends */](WindowTimeSubscriber, _super);
5991    function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
5992        var _this = _super.call(this, destination) || this;
5993        _this.destination = destination;
5994        _this.windowTimeSpan = windowTimeSpan;
5995        _this.windowCreationInterval = windowCreationInterval;
5996        _this.maxWindowSize = maxWindowSize;
5997        _this.scheduler = scheduler;
5998        _this.windows = [];
5999        var window = _this.openWindow();
6000        if (windowCreationInterval !== null && windowCreationInterval >= 0) {
6001            var closeState = { subscriber: _this, window: window, context: null };
6002            var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
6003            _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
6004            _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
6005        }
6006        else {
6007            var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
6008            _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
6009        }
6010        return _this;
6011    }
6012    WindowTimeSubscriber.prototype._next = function (value) {
6013        var windows = this.windows;
6014        var len = windows.length;
6015        for (var i = 0; i < len; i++) {
6016            var window_1 = windows[i];
6017            if (!window_1.closed) {
6018                window_1.next(value);
6019                if (window_1.numberOfNextedValues >= this.maxWindowSize) {
6020                    this.closeWindow(window_1);
6021                }
6022            }
6023        }
6024    };
6025    WindowTimeSubscriber.prototype._error = function (err) {
6026        var windows = this.windows;
6027        while (windows.length > 0) {
6028            windows.shift().error(err);
6029        }
6030        this.destination.error(err);
6031    };
6032    WindowTimeSubscriber.prototype._complete = function () {
6033        var windows = this.windows;
6034        while (windows.length > 0) {
6035            var window_2 = windows.shift();
6036            if (!window_2.closed) {
6037                window_2.complete();
6038            }
6039        }
6040        this.destination.complete();
6041    };
6042    WindowTimeSubscriber.prototype.openWindow = function () {
6043        var window = new windowTime_CountedSubject();
6044        this.windows.push(window);
6045        var destination = this.destination;
6046        destination.next(window);
6047        return window;
6048    };
6049    WindowTimeSubscriber.prototype.closeWindow = function (window) {
6050        window.complete();
6051        var windows = this.windows;
6052        windows.splice(windows.indexOf(window), 1);
6053    };
6054    return WindowTimeSubscriber;
6055}(Subscriber["a" /* Subscriber */]));
6056function dispatchWindowTimeSpanOnly(state) {
6057    var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
6058    if (window) {
6059        subscriber.closeWindow(window);
6060    }
6061    state.window = subscriber.openWindow();
6062    this.schedule(state, windowTimeSpan);
6063}
6064function dispatchWindowCreation(state) {
6065    var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
6066    var window = subscriber.openWindow();
6067    var action = this;
6068    var context = { action: action, subscription: null };
6069    var timeSpanState = { subscriber: subscriber, window: window, context: context };
6070    context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
6071    action.add(context.subscription);
6072    action.schedule(state, windowCreationInterval);
6073}
6074function dispatchWindowClose(state) {
6075    var subscriber = state.subscriber, window = state.window, context = state.context;
6076    if (context && context.action && context.subscription) {
6077        context.action.remove(context.subscription);
6078    }
6079    subscriber.closeWindow(window);
6080}
6081
6082// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/windowToggle.js
6083/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
6084
6085
6086
6087
6088
6089
6090
6091function windowToggle(openings, closingSelector) {
6092    return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
6093}
6094var WindowToggleOperator = /*@__PURE__*/ (function () {
6095    function WindowToggleOperator(openings, closingSelector) {
6096        this.openings = openings;
6097        this.closingSelector = closingSelector;
6098    }
6099    WindowToggleOperator.prototype.call = function (subscriber, source) {
6100        return source.subscribe(new windowToggle_WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
6101    };
6102    return WindowToggleOperator;
6103}());
6104var windowToggle_WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
6105    tslib_es6["a" /* __extends */](WindowToggleSubscriber, _super);
6106    function WindowToggleSubscriber(destination, openings, closingSelector) {
6107        var _this = _super.call(this, destination) || this;
6108        _this.openings = openings;
6109        _this.closingSelector = closingSelector;
6110        _this.contexts = [];
6111        _this.add(_this.openSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(_this, openings, openings));
6112        return _this;
6113    }
6114    WindowToggleSubscriber.prototype._next = function (value) {
6115        var contexts = this.contexts;
6116        if (contexts) {
6117            var len = contexts.length;
6118            for (var i = 0; i < len; i++) {
6119                contexts[i].window.next(value);
6120            }
6121        }
6122    };
6123    WindowToggleSubscriber.prototype._error = function (err) {
6124        var contexts = this.contexts;
6125        this.contexts = null;
6126        if (contexts) {
6127            var len = contexts.length;
6128            var index = -1;
6129            while (++index < len) {
6130                var context_1 = contexts[index];
6131                context_1.window.error(err);
6132                context_1.subscription.unsubscribe();
6133            }
6134        }
6135        _super.prototype._error.call(this, err);
6136    };
6137    WindowToggleSubscriber.prototype._complete = function () {
6138        var contexts = this.contexts;
6139        this.contexts = null;
6140        if (contexts) {
6141            var len = contexts.length;
6142            var index = -1;
6143            while (++index < len) {
6144                var context_2 = contexts[index];
6145                context_2.window.complete();
6146                context_2.subscription.unsubscribe();
6147            }
6148        }
6149        _super.prototype._complete.call(this);
6150    };
6151    WindowToggleSubscriber.prototype._unsubscribe = function () {
6152        var contexts = this.contexts;
6153        this.contexts = null;
6154        if (contexts) {
6155            var len = contexts.length;
6156            var index = -1;
6157            while (++index < len) {
6158                var context_3 = contexts[index];
6159                context_3.window.unsubscribe();
6160                context_3.subscription.unsubscribe();
6161            }
6162        }
6163    };
6164    WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
6165        if (outerValue === this.openings) {
6166            var closingSelector = this.closingSelector;
6167            var closingNotifier = Object(tryCatch["a" /* tryCatch */])(closingSelector)(innerValue);
6168            if (closingNotifier === errorObject["a" /* errorObject */]) {
6169                return this.error(errorObject["a" /* errorObject */].e);
6170            }
6171            else {
6172                var window_1 = new Subject["a" /* Subject */]();
6173                var subscription = new Subscription["a" /* Subscription */]();
6174                var context_4 = { window: window_1, subscription: subscription };
6175                this.contexts.push(context_4);
6176                var innerSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(this, closingNotifier, context_4);
6177                if (innerSubscription.closed) {
6178                    this.closeWindow(this.contexts.length - 1);
6179                }
6180                else {
6181                    innerSubscription.context = context_4;
6182                    subscription.add(innerSubscription);
6183                }
6184                this.destination.next(window_1);
6185            }
6186        }
6187        else {
6188            this.closeWindow(this.contexts.indexOf(outerValue));
6189        }
6190    };
6191    WindowToggleSubscriber.prototype.notifyError = function (err) {
6192        this.error(err);
6193    };
6194    WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
6195        if (inner !== this.openSubscription) {
6196            this.closeWindow(this.contexts.indexOf(inner.context));
6197        }
6198    };
6199    WindowToggleSubscriber.prototype.closeWindow = function (index) {
6200        if (index === -1) {
6201            return;
6202        }
6203        var contexts = this.contexts;
6204        var context = contexts[index];
6205        var window = context.window, subscription = context.subscription;
6206        contexts.splice(index, 1);
6207        window.complete();
6208        subscription.unsubscribe();
6209    };
6210    return WindowToggleSubscriber;
6211}(OuterSubscriber["a" /* OuterSubscriber */]));
6212
6213// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/windowWhen.js
6214/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
6215
6216
6217
6218
6219
6220
6221function windowWhen(closingSelector) {
6222    return function windowWhenOperatorFunction(source) {
6223        return source.lift(new windowWhen_WindowOperator(closingSelector));
6224    };
6225}
6226var windowWhen_WindowOperator = /*@__PURE__*/ (function () {
6227    function WindowOperator(closingSelector) {
6228        this.closingSelector = closingSelector;
6229    }
6230    WindowOperator.prototype.call = function (subscriber, source) {
6231        return source.subscribe(new windowWhen_WindowSubscriber(subscriber, this.closingSelector));
6232    };
6233    return WindowOperator;
6234}());
6235var windowWhen_WindowSubscriber = /*@__PURE__*/ (function (_super) {
6236    tslib_es6["a" /* __extends */](WindowSubscriber, _super);
6237    function WindowSubscriber(destination, closingSelector) {
6238        var _this = _super.call(this, destination) || this;
6239        _this.destination = destination;
6240        _this.closingSelector = closingSelector;
6241        _this.openWindow();
6242        return _this;
6243    }
6244    WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
6245        this.openWindow(innerSub);
6246    };
6247    WindowSubscriber.prototype.notifyError = function (error, innerSub) {
6248        this._error(error);
6249    };
6250    WindowSubscriber.prototype.notifyComplete = function (innerSub) {
6251        this.openWindow(innerSub);
6252    };
6253    WindowSubscriber.prototype._next = function (value) {
6254        this.window.next(value);
6255    };
6256    WindowSubscriber.prototype._error = function (err) {
6257        this.window.error(err);
6258        this.destination.error(err);
6259        this.unsubscribeClosingNotification();
6260    };
6261    WindowSubscriber.prototype._complete = function () {
6262        this.window.complete();
6263        this.destination.complete();
6264        this.unsubscribeClosingNotification();
6265    };
6266    WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
6267        if (this.closingNotification) {
6268            this.closingNotification.unsubscribe();
6269        }
6270    };
6271    WindowSubscriber.prototype.openWindow = function (innerSub) {
6272        if (innerSub === void 0) {
6273            innerSub = null;
6274        }
6275        if (innerSub) {
6276            this.remove(innerSub);
6277            innerSub.unsubscribe();
6278        }
6279        var prevWindow = this.window;
6280        if (prevWindow) {
6281            prevWindow.complete();
6282        }
6283        var window = this.window = new Subject["a" /* Subject */]();
6284        this.destination.next(window);
6285        var closingNotifier = Object(tryCatch["a" /* tryCatch */])(this.closingSelector)();
6286        if (closingNotifier === errorObject["a" /* errorObject */]) {
6287            var err = errorObject["a" /* errorObject */].e;
6288            this.destination.error(err);
6289            this.window.error(err);
6290        }
6291        else {
6292            this.add(this.closingNotification = Object(subscribeToResult["a" /* subscribeToResult */])(this, closingNotifier));
6293        }
6294    };
6295    return WindowSubscriber;
6296}(OuterSubscriber["a" /* OuterSubscriber */]));
6297
6298// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js
6299/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
6300
6301
6302
6303function withLatestFrom() {
6304    var args = [];
6305    for (var _i = 0; _i < arguments.length; _i++) {
6306        args[_i] = arguments[_i];
6307    }
6308    return function (source) {
6309        var project;
6310        if (typeof args[args.length - 1] === 'function') {
6311            project = args.pop();
6312        }
6313        var observables = args;
6314        return source.lift(new WithLatestFromOperator(observables, project));
6315    };
6316}
6317var WithLatestFromOperator = /*@__PURE__*/ (function () {
6318    function WithLatestFromOperator(observables, project) {
6319        this.observables = observables;
6320        this.project = project;
6321    }
6322    WithLatestFromOperator.prototype.call = function (subscriber, source) {
6323        return source.subscribe(new withLatestFrom_WithLatestFromSubscriber(subscriber, this.observables, this.project));
6324    };
6325    return WithLatestFromOperator;
6326}());
6327var withLatestFrom_WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
6328    tslib_es6["a" /* __extends */](WithLatestFromSubscriber, _super);
6329    function WithLatestFromSubscriber(destination, observables, project) {
6330        var _this = _super.call(this, destination) || this;
6331        _this.observables = observables;
6332        _this.project = project;
6333        _this.toRespond = [];
6334        var len = observables.length;
6335        _this.values = new Array(len);
6336        for (var i = 0; i < len; i++) {
6337            _this.toRespond.push(i);
6338        }
6339        for (var i = 0; i < len; i++) {
6340            var observable = observables[i];
6341            _this.add(Object(subscribeToResult["a" /* subscribeToResult */])(_this, observable, observable, i));
6342        }
6343        return _this;
6344    }
6345    WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
6346        this.values[outerIndex] = innerValue;
6347        var toRespond = this.toRespond;
6348        if (toRespond.length > 0) {
6349            var found = toRespond.indexOf(outerIndex);
6350            if (found !== -1) {
6351                toRespond.splice(found, 1);
6352            }
6353        }
6354    };
6355    WithLatestFromSubscriber.prototype.notifyComplete = function () {
6356    };
6357    WithLatestFromSubscriber.prototype._next = function (value) {
6358        if (this.toRespond.length === 0) {
6359            var args = [value].concat(this.values);
6360            if (this.project) {
6361                this._tryProject(args);
6362            }
6363            else {
6364                this.destination.next(args);
6365            }
6366        }
6367    };
6368    WithLatestFromSubscriber.prototype._tryProject = function (args) {
6369        var result;
6370        try {
6371            result = this.project.apply(this, args);
6372        }
6373        catch (err) {
6374            this.destination.error(err);
6375            return;
6376        }
6377        this.destination.next(result);
6378    };
6379    return WithLatestFromSubscriber;
6380}(OuterSubscriber["a" /* OuterSubscriber */]));
6381
6382// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/zip.js
6383var zip = __webpack_require__(55);
6384
6385// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/zip.js
6386/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
6387
6388function zip_zip() {
6389    var observables = [];
6390    for (var _i = 0; _i < arguments.length; _i++) {
6391        observables[_i] = arguments[_i];
6392    }
6393    return function zipOperatorFunction(source) {
6394        return source.lift.call(zip["b" /* zip */].apply(void 0, [source].concat(observables)));
6395    };
6396}
6397
6398// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/operators/zipAll.js
6399/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
6400
6401function zipAll(project) {
6402    return function (source) { return source.lift(new zip["a" /* ZipOperator */](project)); };
6403}
6404
6405// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/operators/index.js
6406/* concated harmony reexport audit */__webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
6407/* concated harmony reexport auditTime */__webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
6408/* concated harmony reexport buffer */__webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer_buffer; });
6409/* concated harmony reexport bufferCount */__webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
6410/* concated harmony reexport bufferTime */__webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
6411/* concated harmony reexport bufferToggle */__webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
6412/* concated harmony reexport bufferWhen */__webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
6413/* concated harmony reexport catchError */__webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
6414/* concated harmony reexport combineAll */__webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
6415/* concated harmony reexport combineLatest */__webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest_combineLatest; });
6416/* concated harmony reexport concat */__webpack_require__.d(__webpack_exports__, "concat", function() { return concat_concat; });
6417/* concated harmony reexport concatAll */__webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll["a" /* concatAll */]; });
6418/* concated harmony reexport concatMap */__webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
6419/* concated harmony reexport concatMapTo */__webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
6420/* concated harmony reexport count */__webpack_require__.d(__webpack_exports__, "count", function() { return count_count; });
6421/* concated harmony reexport debounce */__webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
6422/* concated harmony reexport debounceTime */__webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
6423/* concated harmony reexport defaultIfEmpty */__webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
6424/* concated harmony reexport delay */__webpack_require__.d(__webpack_exports__, "delay", function() { return delay_delay; });
6425/* concated harmony reexport delayWhen */__webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
6426/* concated harmony reexport dematerialize */__webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
6427/* concated harmony reexport distinct */__webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
6428/* concated harmony reexport distinctUntilChanged */__webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
6429/* concated harmony reexport distinctUntilKeyChanged */__webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
6430/* concated harmony reexport elementAt */__webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
6431/* concated harmony reexport endWith */__webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
6432/* concated harmony reexport every */__webpack_require__.d(__webpack_exports__, "every", function() { return every; });
6433/* concated harmony reexport exhaust */__webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
6434/* concated harmony reexport exhaustMap */__webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
6435/* concated harmony reexport expand */__webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
6436/* concated harmony reexport filter */__webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
6437/* concated harmony reexport finalize */__webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
6438/* concated harmony reexport find */__webpack_require__.d(__webpack_exports__, "find", function() { return find; });
6439/* concated harmony reexport findIndex */__webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
6440/* concated harmony reexport first */__webpack_require__.d(__webpack_exports__, "first", function() { return first; });
6441/* concated harmony reexport groupBy */__webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy["b" /* groupBy */]; });
6442/* concated harmony reexport ignoreElements */__webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
6443/* concated harmony reexport isEmpty */__webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
6444/* concated harmony reexport last */__webpack_require__.d(__webpack_exports__, "last", function() { return last; });
6445/* concated harmony reexport map */__webpack_require__.d(__webpack_exports__, "map", function() { return map["a" /* map */]; });
6446/* concated harmony reexport mapTo */__webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
6447/* concated harmony reexport materialize */__webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
6448/* concated harmony reexport max */__webpack_require__.d(__webpack_exports__, "max", function() { return max_max; });
6449/* concated harmony reexport merge */__webpack_require__.d(__webpack_exports__, "merge", function() { return merge_merge; });
6450/* concated harmony reexport mergeAll */__webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll["a" /* mergeAll */]; });
6451/* concated harmony reexport mergeMap */__webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap["a" /* mergeMap */]; });
6452/* concated harmony reexport flatMap */__webpack_require__.d(__webpack_exports__, "flatMap", function() { return mergeMap["a" /* mergeMap */]; });
6453/* concated harmony reexport mergeMapTo */__webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
6454/* concated harmony reexport mergeScan */__webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
6455/* concated harmony reexport min */__webpack_require__.d(__webpack_exports__, "min", function() { return min_min; });
6456/* concated harmony reexport multicast */__webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
6457/* concated harmony reexport observeOn */__webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn["b" /* observeOn */]; });
6458/* concated harmony reexport onErrorResumeNext */__webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
6459/* concated harmony reexport pairwise */__webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
6460/* concated harmony reexport partition */__webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
6461/* concated harmony reexport pluck */__webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
6462/* concated harmony reexport publish */__webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
6463/* concated harmony reexport publishBehavior */__webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
6464/* concated harmony reexport publishLast */__webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
6465/* concated harmony reexport publishReplay */__webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
6466/* concated harmony reexport race */__webpack_require__.d(__webpack_exports__, "race", function() { return race_race; });
6467/* concated harmony reexport reduce */__webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
6468/* concated harmony reexport repeat */__webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
6469/* concated harmony reexport repeatWhen */__webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
6470/* concated harmony reexport retry */__webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
6471/* concated harmony reexport retryWhen */__webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
6472/* concated harmony reexport refCount */__webpack_require__.d(__webpack_exports__, "refCount", function() { return operators_refCount["a" /* refCount */]; });
6473/* concated harmony reexport sample */__webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
6474/* concated harmony reexport sampleTime */__webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
6475/* concated harmony reexport scan */__webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
6476/* concated harmony reexport sequenceEqual */__webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
6477/* concated harmony reexport share */__webpack_require__.d(__webpack_exports__, "share", function() { return share; });
6478/* concated harmony reexport shareReplay */__webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
6479/* concated harmony reexport single */__webpack_require__.d(__webpack_exports__, "single", function() { return single; });
6480/* concated harmony reexport skip */__webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
6481/* concated harmony reexport skipLast */__webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
6482/* concated harmony reexport skipUntil */__webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
6483/* concated harmony reexport skipWhile */__webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
6484/* concated harmony reexport startWith */__webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
6485/* concated harmony reexport subscribeOn */__webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
6486/* concated harmony reexport switchAll */__webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
6487/* concated harmony reexport switchMap */__webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
6488/* concated harmony reexport switchMapTo */__webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
6489/* concated harmony reexport take */__webpack_require__.d(__webpack_exports__, "take", function() { return take; });
6490/* concated harmony reexport takeLast */__webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
6491/* concated harmony reexport takeUntil */__webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
6492/* concated harmony reexport takeWhile */__webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
6493/* concated harmony reexport tap */__webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
6494/* concated harmony reexport throttle */__webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
6495/* concated harmony reexport throttleTime */__webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
6496/* concated harmony reexport throwIfEmpty */__webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
6497/* concated harmony reexport timeInterval */__webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
6498/* concated harmony reexport timeout */__webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
6499/* concated harmony reexport timeoutWith */__webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
6500/* concated harmony reexport timestamp */__webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
6501/* concated harmony reexport toArray */__webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
6502/* concated harmony reexport window */__webpack_require__.d(__webpack_exports__, "window", function() { return window_window; });
6503/* concated harmony reexport windowCount */__webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
6504/* concated harmony reexport windowTime */__webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime_windowTime; });
6505/* concated harmony reexport windowToggle */__webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
6506/* concated harmony reexport windowWhen */__webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
6507/* concated harmony reexport withLatestFrom */__webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
6508/* concated harmony reexport zip */__webpack_require__.d(__webpack_exports__, "zip", function() { return zip_zip; });
6509/* concated harmony reexport zipAll */__webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
6510/** PURE_IMPORTS_START  PURE_IMPORTS_END */
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617/***/ }),
6618/* 18 */
6619/***/ (function(module, exports, __webpack_require__) {
6620
6621"use strict";
6622
6623Object.defineProperty(exports, "__esModule", { value: true });
6624var pds_xss_1 = __webpack_require__(88);
6625var common_utils_1 = __webpack_require__(40);
6626var pds_local_storage_1 = __webpack_require__(45);
6627function getPropertyDescriptor(object, prop) {
6628    var objectDescriptor = Object.getOwnPropertyDescriptor(object, prop);
6629    if (objectDescriptor == null) {
6630        return getPropertyDescriptor(Object.getPrototypeOf(object), prop);
6631    }
6632    else {
6633        return objectDescriptor;
6634    }
6635}
6636var placeholderDivToStripHTML = document.createElement('div');
6637placeholderDivToStripHTML.setAttribute('id', 'divToStripHTML_NotMeantForDOM');
6638exports.pdsUtils = {
6639    window: window,
6640    pds: undefined,
6641    ESCAPE_USER_INPUT_REGEX: /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
6642    ESCAPE_EXCLUDE_CHARS_REGEX: common_utils_1.StringUtil.ESCAPE_EXCLUDE_CHARS_REGEX,
6643    TIME_STRING_AM_PM_SPACING_REGEX: /(\d)(pm|am)/i,
6644    sanitizeHtmlString: pds_xss_1.sanitizeHtmlString,
6645    TAB_ELEMENTS: [
6646        'input',
6647        'select',
6648        'a[href]',
6649        'textarea',
6650        'button',
6651        '[tabindex]'
6652    ],
6653    markedElements: [],
6654    stripHtml: function (value) {
6655        if (value == null) {
6656            return '';
6657        }
6658        placeholderDivToStripHTML.innerHTML = value;
6659        return placeholderDivToStripHTML.textContent || placeholderDivToStripHTML.innerText;
6660    },
6661    escapeUserInput: function (userInput) {
6662        if (userInput == null) {
6663            return userInput;
6664        }
6665        return userInput.replace(this.ESCAPE_USER_INPUT_REGEX, '\\$&');
6666    },
6667    getPersistedBoolean: function (key, defaultResult) {
6668        if (defaultResult === void 0) { defaultResult = false; }
6669        return pds_local_storage_1.pdsLocalStorage.getPersistedBoolean(key, defaultResult);
6670    },
6671    copyTextToClipboard: function (text, returnFocusId) {
6672        var textArea = document.createElement('textarea');
6673        textArea.setAttribute('id', 'textToCopy');
6674        textArea.style.display = 'hidden';
6675        textArea.value = text;
6676        document.body.appendChild(textArea);
6677        textArea.contentEditable = true;
6678        textArea.readOnly = false;
6679        if (navigator.userAgent.match(/ipad|ipod|iphone/i)) {
6680            var range = document.createRange();
6681            range.selectNodeContents(textArea);
6682            var s = window.getSelection();
6683            s.removeAllRanges();
6684            s.addRange(range);
6685            textArea.setSelectionRange(0, text.length);
6686        }
6687        else {
6688            textArea.select();
6689        }
6690        try {
6691            document.execCommand('copy');
6692        }
6693        catch (err) {
6694            console.error('Unable to copy');
6695        }
6696        document.body.removeChild(textArea);
6697        var returnFocusElement = document.getElementById(returnFocusId);
6698        if (returnFocusElement != null) {
6699            returnFocusElement.focus();
6700        }
6701    },
6702    markFocusableElement: function (elementToMark) {
6703        if (elementToMark != null && typeof elementToMark.focus === 'function') {
6704            this.markedElements.push(elementToMark);
6705        }
6706    },
6707    getListOfMarkedElements: function () {
6708        return this.markedElements;
6709    },
6710    getLastMarkedElement: function () {
6711        var lengthOfMarkedElements = this.markedElements.length;
6712        if (lengthOfMarkedElements > 0) {
6713            return this.markedElements.pop();
6714        }
6715        else {
6716            return undefined;
6717        }
6718    },
6719    peekLastMarkedElement: function () {
6720        return this.markedElements.length > 0 ? this.markedElements[this.markedElements.length - 1] : undefined;
6721    },
6722    findLastNode: function (myHTMLElement) {
6723        var myElements = myHTMLElement.querySelectorAll(':last-child');
6724        return myElements[myElements.length - 1];
6725    },
6726    findFirstNode: function (myHTMLElement) {
6727        if (myHTMLElement.childElementCount < 1) {
6728            return myHTMLElement;
6729        }
6730        else {
6731            return this.findFirstNode(myHTMLElement.firstElementChild);
6732        }
6733    },
6734    getAllTabbableElements: function (element) {
6735        if (element != null) {
6736            return element.querySelectorAll(this.TAB_ELEMENTS);
6737        }
6738    },
6739    getTabbableElementAtIndex: function (listOfTabbableElements, index) {
6740        if (listOfTabbableElements != null && index != null) {
6741            if (index <= listOfTabbableElements.length - 1) {
6742                return listOfTabbableElements[index];
6743            }
6744        }
6745    },
6746    getNextTabbableElement: function (listOfTabbableElements, elementReference) {
6747        if (listOfTabbableElements != null && elementReference != null) {
6748            var index = listOfTabbableElements.indexOf(elementReference);
6749            if (index !== -1) {
6750                if (index < listOfTabbableElements.length - 1) {
6751                    return listOfTabbableElements[index + 1];
6752                }
6753            }
6754        }
6755    },
6756    isMobile: function () {
6757        return this.window.orientation != null;
6758    },
6759    isValidEmail: function (email) {
6760        return common_utils_1.EmailUtil.validateEmail(email);
6761    },
6762    dateToTime: function (date) {
6763        if (date != null && typeof date.getTime === 'function') {
6764            return date.getTime();
6765        }
6766    },
6767    getClosest: function (element, selector) {
6768        if (element == null || typeof element.matches !== 'function' || selector == null) {
6769            return;
6770        }
6771        while (element != null) {
6772            try {
6773                if (element.matches(selector)) {
6774                    return element;
6775                }
6776            }
6777            catch (e) {
6778                return;
6779            }
6780            element = element.parentElement;
6781        }
6782    },
6783    prepend: function (newNode, referenceNode) {
6784        this.insertBefore(newNode, referenceNode.firstChild);
6785    },
6786    append: function (newNode, referenceNode) {
6787        referenceNode.appendChild(newNode);
6788    },
6789    insertBefore: function (newNode, referenceNode) {
6790        if (referenceNode.parentNode != null) {
6791            referenceNode.parentNode.insertBefore(newNode, referenceNode);
6792        }
6793    },
6794    insertAfter: function (newNode, referenceNode) {
6795        if (referenceNode.parentNode != null) {
6796            referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
6797        }
6798    },
6799    is: function (element, selector) {
6800        if (element == null || typeof element.matches !== 'function' || selector == null) {
6801            return;
6802        }
6803        try {
6804            return element.matches(selector);
6805        }
6806        catch (e) {
6807            return;
6808        }
6809    },
6810    addClass: function (element, className) {
6811        if (element == null || className == null || className.trim().length === 0) {
6812            return;
6813        }
6814        element.classList.add(className);
6815    },
6816    containsClass: function (element, className) {
6817        if (element == null || className == null) {
6818            return false;
6819        }
6820        else if (className.trim().length === 0) {
6821            return false;
6822        }
6823        else {
6824            return element.classList.contains(className);
6825        }
6826    },
6827    removeClass: function (element, className) {
6828        if (element == null || className == null || className.trim().length === 0) {
6829            return;
6830        }
6831        element.classList.remove(className);
6832    },
6833    toggleClass: function (element, className, force) {
6834        if (element == null || className == null || className.trim().length === 0) {
6835            return false;
6836        }
6837        if (force == null) {
6838            return element.classList.toggle(className);
6839        }
6840        if (force) {
6841            element.classList.add(className);
6842        }
6843        else {
6844            element.classList.remove(className);
6845        }
6846        return force;
6847    },
6848    remove: function (element) {
6849        if (element != null && element.parentNode != null) {
6850            element.parentNode.removeChild(element);
6851        }
6852    },
6853    flatten: function (arry) {
6854        var _this = this;
6855        var result = [];
6856        if (arry != null && arry instanceof Array) {
6857            arry.forEach(function (arrayElement) {
6858                if (arrayElement instanceof Array) {
6859                    _this.flatten(arrayElement).forEach(function (flattenedElement) {
6860                        result.push(flattenedElement);
6861                    });
6862                }
6863                else {
6864                    result.push(arrayElement);
6865                }
6866            });
6867        }
6868        return result;
6869    },
6870    generateDays: function (year, month, fillBlankDays) {
6871        if (fillBlankDays === void 0) { fillBlankDays = false; }
6872        if (typeof year !== 'number' || typeof month !== 'number') {
6873            return [];
6874        }
6875        var dateTimes = [];
6876        var dateItr = new Date(year, month, 1);
6877        var addBlanks = function (loopTimes, computeDates, ascending) {
6878            var alterDate;
6879            if (computeDates) {
6880                if (ascending) {
6881                    alterDate = new Date(year, month, -1 * loopTimes + 1);
6882                }
6883                else {
6884                    alterDate = new Date(year, month + 1, 1);
6885                }
6886            }
6887            var sizeModSeven;
6888            for (var i = 0; i < loopTimes; i++) {
6889                sizeModSeven = (dateTimes.length) % 7;
6890                if (computeDates && alterDate != null) {
6891                    dateTimes.push({
6892                        dayNum: alterDate.getDate(),
6893                        dateTimeNum: alterDate.getTime(),
6894                        isWeekend: sizeModSeven === 0 || sizeModSeven === 6,
6895                        isFilled: true,
6896                        dashCaseDate: alterDate.getFullYear() + "-" + ('0' + (alterDate.getMonth() + 1)).slice(-2) + "-" + ('0' + alterDate.getDate()).slice(-2)
6897                    });
6898                    alterDate.setDate(alterDate.getDate() + 1);
6899                }
6900                else {
6901                    dateTimes.push({
6902                        isWeekend: sizeModSeven === 0 || sizeModSeven === 6,
6903                        isFilled: true
6904                    });
6905                }
6906            }
6907        };
6908        addBlanks(dateItr.getDay(), fillBlankDays, true);
6909        var sizeModSeven;
6910        do {
6911            sizeModSeven = (dateTimes.length) % 7;
6912            dateTimes.push({
6913                dayNum: dateItr.getDate(),
6914                dateTimeNum: dateItr.getTime(),
6915                isWeekend: sizeModSeven === 0 || sizeModSeven === 6,
6916                dashCaseDate: dateItr.getFullYear() + "-" + ('0' + (dateItr.getMonth() + 1)).slice(-2) + "-" + ('0' + dateItr.getDate()).slice(-2)
6917            });
6918            dateItr.setDate(dateItr.getDate() + 1);
6919        } while (dateItr.getMonth() === month);
6920        if (dateTimes.length % 7 > 0) {
6921            addBlanks(7 - (dateTimes.length % 7), fillBlankDays, false);
6922        }
6923        return dateTimes;
6924    },
6925    getpageYOffsetLimit: function () {
6926        return Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) - this.window.innerHeight;
6927    },
6928    getUniqueId: function (theId) {
6929        var curNumber = 1;
6930        var curId = theId + "_" + curNumber;
6931        if (document.getElementById(theId) == null) {
6932            return theId;
6933        }
6934        while (document.getElementById(curId) != null) {
6935            curNumber += 1;
6936            curId = theId + "_" + curNumber;
6937        }
6938        return curId;
6939    },
6940    sort: function (array, valueExtractor) {
6941        if (array == null || array.length === 0) {
6942            return;
6943        }
6944        array.sort(function (a, b) {
6945            var varA = valueExtractor(a);
6946            var varB = valueExtractor(b);
6947            if (varA < varB) {
6948                return -1;
6949            }
6950            else if (varA > varB) {
6951                return 1;
6952            }
6953            else {
6954                return 0;
6955            }
6956        });
6957    },
6958    TOKEN_REGEX: /{[^}]+}/g,
6959    replaceTokensInString: function (theString, context) {
6960        if (theString == null || context == null || theString === '') {
6961            return theString;
6962        }
6963        if (typeof context === 'string') {
6964            var allTokens_1 = theString.match(this.TOKEN_REGEX);
6965            if (allTokens_1 == null) {
6966                return theString;
6967            }
6968            var valid = allTokens_1.every(function (_token) {
6969                return _token === allTokens_1[0];
6970            });
6971            if (!valid) {
6972                throw 'replaceTokensInString called with invalid parameters.';
6973            }
6974            return theString.replace(this.TOKEN_REGEX, context);
6975        }
6976        for (var key in context) {
6977            if (context.hasOwnProperty(key)) {
6978                var re = new RegExp("{" + key + "}", 'ig');
6979                theString = theString.replace(re, context[key]);
6980            }
6981        }
6982        return theString;
6983    },
6984    getUrlSearchParams: function () {
6985        var params = {};
6986        var search = this.window.location.search;
6987        if (search != null && search.length > 1) {
6988            var parts = void 0;
6989            search = search.substring(1);
6990            for (var _i = 0, _a = search.split('&'); _i < _a.length; _i++) {
6991                var token = _a[_i];
6992                parts = token.split('=');
6993                if (parts != null && parts.length > 0) {
6994                    params[parts[0]] = parts[1];
6995                }
6996            }
6997        }
6998        return params;
6999    },
7000    parseUrlSearchObjectParam: function (param, paramEncoded) {
7001        if (paramEncoded === void 0) { paramEncoded = true; }
7002        try {
7003            var paramString = unescape(param);
7004            if (paramEncoded) {
7005                paramString = decodeURIComponent(atob(paramString));
7006            }
7007            var parsedParam = JSON.parse(paramString);
7008            return parsedParam;
7009        }
7010        catch (err) {
7011            return {};
7012        }
7013    },
7014    stringifyUrlSearchObjectParam: function (param, encodeParam) {
7015        if (encodeParam === void 0) { encodeParam = true; }
7016        var p = JSON.stringify(param);
7017        if (encodeParam) {
7018            try {
7019                p = btoa(encodeURIComponent(p));
7020            }
7021            catch (err) {
7022                console.error('could not base 64 encode string: ' + p);
7023                p = btoa(JSON.stringify({}));
7024            }
7025        }
7026        return p;
7027    },
7028    removeContextMarkerFromUrl: function (url) {
7029        var ucCtx = 'ucCtx=\{unifiedClassroomContext\}';
7030        return url.replace(new RegExp('&' + ucCtx), '')
7031            .replace(new RegExp('\\?' + ucCtx + '&'), '?')
7032            .replace(new RegExp('\\?' + ucCtx), '');
7033    },
7034    getSectionColorForClass: function (sectionOrGroup) {
7035        var colorNumber = 1;
7036        if (sectionOrGroup == null) {
7037            return 'color-' + colorNumber;
7038        }
7039        if (sectionOrGroup && sectionOrGroup.sourceSystemId != null && sectionOrGroup.courseNumber != null) {
7040            if (isNaN(parseInt(sectionOrGroup.courseNumber))) {
7041                colorNumber = (Number(sectionOrGroup.sourceSystemId) % 4) + 1;
7042            }
7043            else {
7044                colorNumber = (parseInt(sectionOrGroup.courseNumber) % 4) + 1;
7045            }
7046        }
7047        else if (sectionOrGroup && sectionOrGroup.sectionUids != null) {
7048            colorNumber = (sectionOrGroup.sectionUids.length % 4) + 1;
7049        }
7050        return 'color-' + colorNumber;
7051    },
7052    fixTimeStringSpacing: function (timeString) {
7053        if (timeString != null) {
7054            return timeString.replace(this.TIME_STRING_AM_PM_SPACING_REGEX, '$1 $2');
7055        }
7056        else {
7057            return timeString;
7058        }
7059    },
7060    ajax: function (url, settings) {
7061        if (settings == null) {
7062            settings = {};
7063        }
7064        var async = settings.async || true;
7065        var method = settings.method || 'GET';
7066        var headers = settings.headers || {};
7067        var xhrFields = settings.xhrFields || {};
7068        var data = settings.data;
7069        var success = settings.success;
7070        var error = settings.error;
7071        var complete = settings.complete;
7072        var xhr = settings.xhr ? settings.xhr() : new XMLHttpRequest();
7073        try {
7074            xhr.open(method, url, async);
7075            for (var key in xhrFields) {
7076                if (xhrFields.hasOwnProperty(key)) {
7077                    xhr[key] = xhrFields[key];
7078                }
7079            }
7080            for (var key in headers) {
7081                if (headers.hasOwnProperty(key)) {
7082                    xhr.setRequestHeader(key, headers[key]);
7083                }
7084            }
7085            xhr.onreadystatechange = function () {
7086                if (xhr.readyState === XMLHttpRequest.DONE) {
7087                    if (xhr.status === 200 || xhr.status === 304) {
7088                        if (success != null) {
7089                            success(xhr.response, xhr, xhr.statusText);
7090                        }
7091                    }
7092                    else {
7093                        if (error != null) {
7094                            error(xhr, xhr.statusText);
7095                        }
7096                    }
7097                    if (complete != null) {
7098                        complete(xhr, xhr.statusText);
7099                    }
7100                }
7101            };
7102            xhr.send(data);
7103            return xhr;
7104        }
7105        catch (e) {
7106            console.error(e);
7107        }
7108    },
7109    createFlattenedClassInstance: function (token) {
7110        var tsObject = new token();
7111        var definition = {};
7112        var objectDef;
7113        for (var prop in tsObject) {
7114            objectDef = getPropertyDescriptor(tsObject, prop);
7115            if (objectDef != null && objectDef.hasOwnProperty('get')) {
7116                Object.defineProperty(definition, prop, objectDef);
7117            }
7118            else {
7119                definition[prop] = tsObject[prop];
7120            }
7121        }
7122        return definition;
7123    },
7124    groupBy: function (items, key) {
7125        var groups = {};
7126        for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
7127            var item = items_1[_i];
7128            if (groups[key(item)] == null) {
7129                groups[key(item)] = [item];
7130            }
7131            else {
7132                groups[key(item)].push(item);
7133            }
7134        }
7135        return groups;
7136    },
7137    getElementInFocus: function () {
7138        var elementInFocus = (document.hasFocus() &&
7139            document.activeElement !== document.body &&
7140            document.activeElement !== document.documentElement &&
7141            document.activeElement) || null;
7142        elementInFocus = elementInFocus || document.querySelector(':focus');
7143        return elementInFocus;
7144    },
7145    focus: function (query, context) {
7146        var element = context.querySelector(query);
7147        if (element != null) {
7148            element.focus();
7149            return true;
7150        }
7151        else {
7152            return false;
7153        }
7154    },
7155    throw: function (errorMessage) {
7156        console.trace(errorMessage);
7157        throw errorMessage;
7158    },
7159    roundNumber: function (value, precision) {
7160        return common_utils_1.NumberUtil.round(value, precision);
7161    },
7162    getStringBooleanValue: function (value) {
7163        return value && value.toLowerCase() === 'true' || false;
7164    }
7165};
7166if (typeof Element !== 'undefined' && !Element.prototype.matches) {
7167    Element.prototype.matches =
7168        Element.prototype.matchesSelector ||
7169            Element.prototype.mozMatchesSelector ||
7170            Element.prototype.msMatchesSelector ||
7171            Element.prototype.oMatchesSelector ||
7172            Element.prototype.webkitMatchesSelector ||
7173            function (s) {
7174                var matches = (this.document || this.ownerDocument).querySelectorAll(s), i = matches.length;
7175                while (--i >= 0 && matches.item(i) !== this) {
7176                }
7177                return i > -1;
7178            };
7179}
7180if (!Date.prototype.pdsToDateWidgetAttr) {
7181    Date.prototype.pdsToDateWidgetAttr = function () {
7182        return (this.getMonth() + 1) + '/' + this.getDate() + '/' + this.getFullYear();
7183    };
7184}
7185
7186
7187
7188/***/ }),
7189/* 19 */
7190/***/ (function(module, __webpack_exports__, __webpack_require__) {
7191
7192"use strict";
7193__webpack_require__.r(__webpack_exports__);
7194
7195// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 1 modules
7196var Observable = __webpack_require__(2);
7197
7198// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js
7199var ConnectableObservable = __webpack_require__(70);
7200
7201// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/groupBy.js
7202var groupBy = __webpack_require__(66);
7203
7204// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/symbol/observable.js
7205var observable = __webpack_require__(27);
vendor: 9,046 bytes, lines 7206-7448
7206
7207// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subject.js
7208var Subject = __webpack_require__(8);
7209
7210// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/BehaviorSubject.js
7211var BehaviorSubject = __webpack_require__(71);
7212
7213// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/ReplaySubject.js
7214var ReplaySubject = __webpack_require__(49);
7215
7216// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/AsyncSubject.js
7217var AsyncSubject = __webpack_require__(37);
7218
7219// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/asap.js + 3 modules
7220var asap = __webpack_require__(57);
7221
7222// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/async.js
7223var scheduler_async = __webpack_require__(10);
7224
7225// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/queue.js + 2 modules
7226var queue = __webpack_require__(78);
7227
7228// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
7229var tslib_es6 = __webpack_require__(0);
7230
7231// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js + 1 modules
7232var AsyncAction = __webpack_require__(38);
7233
7234// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js
7235/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
7236
7237
7238var AnimationFrameAction_AnimationFrameAction = /*@__PURE__*/ (function (_super) {
7239    tslib_es6["a" /* __extends */](AnimationFrameAction, _super);
7240    function AnimationFrameAction(scheduler, work) {
7241        var _this = _super.call(this, scheduler, work) || this;
7242        _this.scheduler = scheduler;
7243        _this.work = work;
7244        return _this;
7245    }
7246    AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
7247        if (delay === void 0) {
7248            delay = 0;
7249        }
7250        if (delay !== null && delay > 0) {
7251            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
7252        }
7253        scheduler.actions.push(this);
7254        return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
7255    };
7256    AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
7257        if (delay === void 0) {
7258            delay = 0;
7259        }
7260        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
7261            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
7262        }
7263        if (scheduler.actions.length === 0) {
7264            cancelAnimationFrame(id);
7265            scheduler.scheduled = undefined;
7266        }
7267        return undefined;
7268    };
7269    return AnimationFrameAction;
7270}(AsyncAction["a" /* AsyncAction */]));
7271
7272
7273// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js
7274var AsyncScheduler = __webpack_require__(36);
7275
7276// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js
7277/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
7278
7279
7280var AnimationFrameScheduler_AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
7281    tslib_es6["a" /* __extends */](AnimationFrameScheduler, _super);
7282    function AnimationFrameScheduler() {
7283        return _super !== null && _super.apply(this, arguments) || this;
7284    }
7285    AnimationFrameScheduler.prototype.flush = function (action) {
7286        this.active = true;
7287        this.scheduled = undefined;
7288        var actions = this.actions;
7289        var error;
7290        var index = -1;
7291        var count = actions.length;
7292        action = action || actions.shift();
7293        do {
7294            if (error = action.execute(action.state, action.delay)) {
7295                break;
7296            }
7297        } while (++index < count && (action = actions.shift()));
7298        this.active = false;
7299        if (error) {
7300            while (++index < count && (action = actions.shift())) {
7301                action.unsubscribe();
7302            }
7303            throw error;
7304        }
7305    };
7306    return AnimationFrameScheduler;
7307}(AsyncScheduler["a" /* AsyncScheduler */]));
7308
7309
7310// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js
7311/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
7312
7313
7314var animationFrame = /*@__PURE__*/ new AnimationFrameScheduler_AnimationFrameScheduler(AnimationFrameAction_AnimationFrameAction);
7315
7316// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js
7317/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
7318
7319
7320
7321var VirtualTimeScheduler_VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
7322    tslib_es6["a" /* __extends */](VirtualTimeScheduler, _super);
7323    function VirtualTimeScheduler(SchedulerAction, maxFrames) {
7324        if (SchedulerAction === void 0) {
7325            SchedulerAction = VirtualTimeScheduler_VirtualAction;
7326        }
7327        if (maxFrames === void 0) {
7328            maxFrames = Number.POSITIVE_INFINITY;
7329        }
7330        var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
7331        _this.maxFrames = maxFrames;
7332        _this.frame = 0;
7333        _this.index = -1;
7334        return _this;
7335    }
7336    VirtualTimeScheduler.prototype.flush = function () {
7337        var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
7338        var error, action;
7339        while ((action = actions.shift()) && (this.frame = action.delay) <= maxFrames) {
7340            if (error = action.execute(action.state, action.delay)) {
7341                break;
7342            }
7343        }
7344        if (error) {
7345            while (action = actions.shift()) {
7346                action.unsubscribe();
7347            }
7348            throw error;
7349        }
7350    };
7351    VirtualTimeScheduler.frameTimeFactor = 10;
7352    return VirtualTimeScheduler;
7353}(AsyncScheduler["a" /* AsyncScheduler */]));
7354
7355var VirtualTimeScheduler_VirtualAction = /*@__PURE__*/ (function (_super) {
7356    tslib_es6["a" /* __extends */](VirtualAction, _super);
7357    function VirtualAction(scheduler, work, index) {
7358        if (index === void 0) {
7359            index = scheduler.index += 1;
7360        }
7361        var _this = _super.call(this, scheduler, work) || this;
7362        _this.scheduler = scheduler;
7363        _this.work = work;
7364        _this.index = index;
7365        _this.active = true;
7366        _this.index = scheduler.index = index;
7367        return _this;
7368    }
7369    VirtualAction.prototype.schedule = function (state, delay) {
7370        if (delay === void 0) {
7371            delay = 0;
7372        }
7373        if (!this.id) {
7374            return _super.prototype.schedule.call(this, state, delay);
7375        }
7376        this.active = false;
7377        var action = new VirtualAction(this.scheduler, this.work);
7378        this.add(action);
7379        return action.schedule(state, delay);
7380    };
7381    VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
7382        if (delay === void 0) {
7383            delay = 0;
7384        }
7385        this.delay = scheduler.frame + delay;
7386        var actions = scheduler.actions;
7387        actions.push(this);
7388        actions.sort(VirtualAction.sortActions);
7389        return true;
7390    };
7391    VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
7392        if (delay === void 0) {
7393            delay = 0;
7394        }
7395        return undefined;
7396    };
7397    VirtualAction.prototype._execute = function (state, delay) {
7398        if (this.active === true) {
7399            return _super.prototype._execute.call(this, state, delay);
7400        }
7401    };
7402    VirtualAction.sortActions = function (a, b) {
7403        if (a.delay === b.delay) {
7404            if (a.index === b.index) {
7405                return 0;
7406            }
7407            else if (a.index > b.index) {
7408                return 1;
7409            }
7410            else {
7411                return -1;
7412            }
7413        }
7414        else if (a.delay > b.delay) {
7415            return 1;
7416        }
7417        else {
7418            return -1;
7419        }
7420    };
7421    return VirtualAction;
7422}(AsyncAction["a" /* AsyncAction */]));
7423
7424
7425// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Scheduler.js
7426var Scheduler = __webpack_require__(61);
7427
7428// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js
7429var Subscription = __webpack_require__(5);
7430
7431// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
7432var Subscriber = __webpack_require__(1);
7433
7434// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Notification.js
7435var Notification = __webpack_require__(24);
7436
7437// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/pipe.js
7438var pipe = __webpack_require__(46);
7439
7440// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/noop.js
7441var noop = __webpack_require__(22);
7442
7443// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/identity.js
7444var identity = __webpack_require__(23);
7445
7446// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/isObservable.js
7447/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
7448
7449function isObservable(obj) {
7450    return !!obj && (obj instanceof Observable["a" /* Observable */] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
7451}
7452
7453// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js
7454var ArgumentOutOfRangeError = __webpack_require__(33);
7455
7456// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/EmptyError.js
7457var EmptyError = __webpack_require__(35);
7458
7459// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js
7460var ObjectUnsubscribedError = __webpack_require__(28);
7461
7462// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js
7463var UnsubscriptionError = __webpack_require__(47);
7464
7465// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/TimeoutError.js
7466var TimeoutError = __webpack_require__(73);
7467
7468// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/operators/map.js
7469var map = __webpack_require__(13);
7470
7471// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isArray.js
7472var isArray = __webpack_require__(11);
7473
7474// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isScheduler.js
7475var isScheduler = __webpack_require__(12);
7476
7477// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/bindCallback.js
7478/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
7479
7480
7481
7482
7483
7484function bindCallback(callbackFunc, resultSelector, scheduler) {
7485    if (resultSelector) {
7486        if (Object(isScheduler["a" /* isScheduler */])(resultSelector)) {
7487            scheduler = resultSelector;
7488        }
7489        else {
7490            return function () {
7491                var args = [];
7492                for (var _i = 0; _i < arguments.length; _i++) {
7493                    args[_i] = arguments[_i];
7494                }
7495                return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(map["a" /* map */])(function (args) { return Object(isArray["a" /* isArray */])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
7496            };
7497        }
7498    }
7499    return function () {
7500        var args = [];
7501        for (var _i = 0; _i < arguments.length; _i++) {
7502            args[_i] = arguments[_i];
7503        }
7504        var context = this;
7505        var subject;
7506        var params = {
7507            context: context,
7508            subject: subject,
7509            callbackFunc: callbackFunc,
7510            scheduler: scheduler,
7511        };
7512        return new Observable["a" /* Observable */](function (subscriber) {
7513            if (!scheduler) {
7514                if (!subject) {
7515                    subject = new AsyncSubject["a" /* AsyncSubject */]();
7516                    var handler = function () {
7517                        var innerArgs = [];
7518                        for (var _i = 0; _i < arguments.length; _i++) {
7519                            innerArgs[_i] = arguments[_i];
7520                        }
7521                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
7522                        subject.complete();
7523                    };
7524                    try {
7525                        callbackFunc.apply(context, args.concat([handler]));
7526                    }
7527                    catch (err) {
7528                        subject.error(err);
7529                    }
7530                }
7531                return subject.subscribe(subscriber);
7532            }
7533            else {
7534                var state = {
7535                    args: args, subscriber: subscriber, params: params,
7536                };
7537                return scheduler.schedule(dispatch, 0, state);
7538            }
7539        });
7540    };
7541}
7542function dispatch(state) {
7543    var _this = this;
7544    var self = this;
7545    var args = state.args, subscriber = state.subscriber, params = state.params;
7546    var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
7547    var subject = params.subject;
7548    if (!subject) {
7549        subject = params.subject = new AsyncSubject["a" /* AsyncSubject */]();
7550        var handler = function () {
7551            var innerArgs = [];
7552            for (var _i = 0; _i < arguments.length; _i++) {
7553                innerArgs[_i] = arguments[_i];
7554            }
7555            var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
7556            _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
7557        };
7558        try {
7559            callbackFunc.apply(context, args.concat([handler]));
7560        }
7561        catch (err) {
7562            subject.error(err);
7563        }
7564    }
7565    this.add(subject.subscribe(subscriber));
7566}
7567function dispatchNext(state) {
7568    var value = state.value, subject = state.subject;
7569    subject.next(value);
7570    subject.complete();
7571}
7572function dispatchError(state) {
7573    var err = state.err, subject = state.subject;
7574    subject.error(err);
7575}
7576
7577// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js
7578/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
7579
7580
7581
7582
7583
7584function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
7585    if (resultSelector) {
7586        if (Object(isScheduler["a" /* isScheduler */])(resultSelector)) {
7587            scheduler = resultSelector;
7588        }
7589        else {
7590            return function () {
7591                var args = [];
7592                for (var _i = 0; _i < arguments.length; _i++) {
7593                    args[_i] = arguments[_i];
7594                }
7595                return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(map["a" /* map */])(function (args) { return Object(isArray["a" /* isArray */])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
7596            };
7597        }
7598    }
7599    return function () {
7600        var args = [];
7601        for (var _i = 0; _i < arguments.length; _i++) {
7602            args[_i] = arguments[_i];
7603        }
7604        var params = {
7605            subject: undefined,
7606            args: args,
7607            callbackFunc: callbackFunc,
7608            scheduler: scheduler,
7609            context: this,
7610        };
7611        return new Observable["a" /* Observable */](function (subscriber) {
7612            var context = params.context;
7613            var subject = params.subject;
7614            if (!scheduler) {
7615                if (!subject) {
7616                    subject = params.subject = new AsyncSubject["a" /* AsyncSubject */]();
7617                    var handler = function () {
7618                        var innerArgs = [];
7619                        for (var _i = 0; _i < arguments.length; _i++) {
7620                            innerArgs[_i] = arguments[_i];
7621                        }
7622                        var err = innerArgs.shift();
7623                        if (err) {
7624                            subject.error(err);
7625                            return;
7626                        }
7627                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
7628                        subject.complete();
7629                    };
7630                    try {
7631                        callbackFunc.apply(context, args.concat([handler]));
7632                    }
7633                    catch (err) {
7634                        subject.error(err);
7635                    }
7636                }
7637                return subject.subscribe(subscriber);
7638            }
7639            else {
7640                return scheduler.schedule(bindNodeCallback_dispatch, 0, { params: params, subscriber: subscriber, context: context });
7641            }
7642        });
7643    };
7644}
7645function bindNodeCallback_dispatch(state) {
7646    var _this = this;
7647    var params = state.params, subscriber = state.subscriber, context = state.context;
7648    var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
7649    var subject = params.subject;
7650    if (!subject) {
7651        subject = params.subject = new AsyncSubject["a" /* AsyncSubject */]();
7652        var handler = function () {
7653            var innerArgs = [];
7654            for (var _i = 0; _i < arguments.length; _i++) {
7655                innerArgs[_i] = arguments[_i];
7656            }
7657            var err = innerArgs.shift();
7658            if (err) {
7659                _this.add(scheduler.schedule(bindNodeCallback_dispatchError, 0, { err: err, subject: subject }));
7660            }
7661            else {
7662                var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
7663                _this.add(scheduler.schedule(bindNodeCallback_dispatchNext, 0, { value: value, subject: subject }));
7664            }
7665        };
7666        try {
7667            callbackFunc.apply(context, args.concat([handler]));
7668        }
7669        catch (err) {
7670            this.add(scheduler.schedule(bindNodeCallback_dispatchError, 0, { err: err, subject: subject }));
7671        }
7672    }
7673    this.add(subject.subscribe(subscriber));
7674}
7675function bindNodeCallback_dispatchNext(arg) {
7676    var value = arg.value, subject = arg.subject;
7677    subject.next(value);
7678    subject.complete();
7679}
7680function bindNodeCallback_dispatchError(arg) {
7681    var err = arg.err, subject = arg.subject;
7682    subject.error(err);
7683}
7684
7685// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/combineLatest.js
7686var combineLatest = __webpack_require__(52);
7687
7688// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/concat.js
7689var concat = __webpack_require__(29);
7690
7691// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/defer.js
7692var defer = __webpack_require__(54);
7693
7694// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/empty.js
7695var empty = __webpack_require__(9);
7696
7697// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js + 1 modules
7698var subscribeToResult = __webpack_require__(3);
7699
7700// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/OuterSubscriber.js
7701var OuterSubscriber = __webpack_require__(4);
7702
7703// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/forkJoin.js
7704/** PURE_IMPORTS_START tslib,_Observable,_util_isArray,_empty,_util_subscribeToResult,_OuterSubscriber,_operators_map PURE_IMPORTS_END */
7705
7706
7707
7708
7709
7710
7711
7712function forkJoin() {
7713    var sources = [];
7714    for (var _i = 0; _i < arguments.length; _i++) {
7715        sources[_i] = arguments[_i];
7716    }
7717    var resultSelector;
7718    if (typeof sources[sources.length - 1] === 'function') {
7719        resultSelector = sources.pop();
7720    }
7721    if (sources.length === 1 && Object(isArray["a" /* isArray */])(sources[0])) {
7722        sources = sources[0];
7723    }
7724    if (sources.length === 0) {
7725        return empty["a" /* EMPTY */];
7726    }
7727    if (resultSelector) {
7728        return forkJoin(sources).pipe(Object(map["a" /* map */])(function (args) { return resultSelector.apply(void 0, args); }));
7729    }
7730    return new Observable["a" /* Observable */](function (subscriber) {
7731        return new forkJoin_ForkJoinSubscriber(subscriber, sources);
7732    });
7733}
7734var forkJoin_ForkJoinSubscriber = /*@__PURE__*/ (function (_super) {
7735    tslib_es6["a" /* __extends */](ForkJoinSubscriber, _super);
7736    function ForkJoinSubscriber(destination, sources) {
7737        var _this = _super.call(this, destination) || this;
7738        _this.sources = sources;
7739        _this.completed = 0;
7740        _this.haveValues = 0;
7741        var len = sources.length;
7742        _this.values = new Array(len);
7743        for (var i = 0; i < len; i++) {
7744            var source = sources[i];
7745            var innerSubscription = Object(subscribeToResult["a" /* subscribeToResult */])(_this, source, null, i);
7746            if (innerSubscription) {
7747                _this.add(innerSubscription);
7748            }
7749        }
7750        return _this;
7751    }
7752    ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
7753        this.values[outerIndex] = innerValue;
7754        if (!innerSub._hasValue) {
7755            innerSub._hasValue = true;
7756            this.haveValues++;
7757        }
7758    };
7759    ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {
7760        var _a = this, destination = _a.destination, haveValues = _a.haveValues, values = _a.values;
7761        var len = values.length;
7762        if (!innerSub._hasValue) {
7763            destination.complete();
7764            return;
7765        }
7766        this.completed++;
7767        if (this.completed !== len) {
7768            return;
7769        }
7770        if (haveValues === len) {
7771            destination.next(values);
7772        }
7773        destination.complete();
7774    };
7775    return ForkJoinSubscriber;
7776}(OuterSubscriber["a" /* OuterSubscriber */]));
7777
7778// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/from.js + 5 modules
7779var from = __webpack_require__(16);
7780
7781// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isFunction.js
7782var isFunction = __webpack_require__(34);
7783
7784// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromEvent.js
7785/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
7786
7787
7788
7789
7790var fromEvent_toString = Object.prototype.toString;
7791function fromEvent(target, eventName, options, resultSelector) {
7792    if (Object(isFunction["a" /* isFunction */])(options)) {
7793        resultSelector = options;
7794        options = undefined;
7795    }
7796    if (resultSelector) {
7797        return fromEvent(target, eventName, options).pipe(Object(map["a" /* map */])(function (args) { return Object(isArray["a" /* isArray */])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
7798    }
7799    return new Observable["a" /* Observable */](function (subscriber) {
7800        function handler(e) {
7801            if (arguments.length > 1) {
7802                subscriber.next(Array.prototype.slice.call(arguments));
7803            }
7804            else {
7805                subscriber.next(e);
7806            }
7807        }
7808        setupSubscription(target, eventName, handler, subscriber, options);
7809    });
7810}
7811function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
7812    var unsubscribe;
7813    if (isEventTarget(sourceObj)) {
7814        var source_1 = sourceObj;
7815        sourceObj.addEventListener(eventName, handler, options);
7816        unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
7817    }
7818    else if (isJQueryStyleEventEmitter(sourceObj)) {
7819        var source_2 = sourceObj;
7820        sourceObj.on(eventName, handler);
7821        unsubscribe = function () { return source_2.off(eventName, handler); };
7822    }
7823    else if (isNodeStyleEventEmitter(sourceObj)) {
7824        var source_3 = sourceObj;
7825        sourceObj.addListener(eventName, handler);
7826        unsubscribe = function () { return source_3.removeListener(eventName, handler); };
7827    }
7828    else if (sourceObj && sourceObj.length) {
7829        for (var i = 0, len = sourceObj.length; i < len; i++) {
7830            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
7831        }
7832    }
7833    else {
7834        throw new TypeError('Invalid event target');
7835    }
7836    subscriber.add(unsubscribe);
7837}
7838function isNodeStyleEventEmitter(sourceObj) {
7839    return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
7840}
7841function isJQueryStyleEventEmitter(sourceObj) {
7842    return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
7843}
7844function isEventTarget(sourceObj) {
7845    return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
7846}
7847
7848// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js
7849/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
7850
7851
7852
7853
7854function fromEventPattern(addHandler, removeHandler, resultSelector) {
7855    if (resultSelector) {
7856        return fromEventPattern(addHandler, removeHandler).pipe(Object(map["a" /* map */])(function (args) { return Object(isArray["a" /* isArray */])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
7857    }
7858    return new Observable["a" /* Observable */](function (subscriber) {
7859        var handler = function () {
7860            var e = [];
7861            for (var _i = 0; _i < arguments.length; _i++) {
7862                e[_i] = arguments[_i];
7863            }
7864            return subscriber.next(e.length === 1 ? e[0] : e);
7865        };
7866        var retValue;
7867        try {
7868            retValue = addHandler(handler);
7869        }
7870        catch (err) {
7871            subscriber.error(err);
7872            return undefined;
7873        }
7874        if (!Object(isFunction["a" /* isFunction */])(removeHandler)) {
7875            return undefined;
7876        }
7877        return function () { return removeHandler(handler, retValue); };
7878    });
7879}
7880
7881// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/generate.js
7882/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
7883
7884
7885
7886function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
7887    var resultSelector;
7888    var initialState;
7889    if (arguments.length == 1) {
7890        var options = initialStateOrOptions;
7891        initialState = options.initialState;
7892        condition = options.condition;
7893        iterate = options.iterate;
7894        resultSelector = options.resultSelector || identity["a" /* identity */];
7895        scheduler = options.scheduler;
7896    }
7897    else if (resultSelectorOrObservable === undefined || Object(isScheduler["a" /* isScheduler */])(resultSelectorOrObservable)) {
7898        initialState = initialStateOrOptions;
7899        resultSelector = identity["a" /* identity */];
7900        scheduler = resultSelectorOrObservable;
7901    }
7902    else {
7903        initialState = initialStateOrOptions;
7904        resultSelector = resultSelectorOrObservable;
7905    }
7906    return new Observable["a" /* Observable */](function (subscriber) {
7907        var state = initialState;
7908        if (scheduler) {
7909            return scheduler.schedule(generate_dispatch, 0, {
7910                subscriber: subscriber,
7911                iterate: iterate,
7912                condition: condition,
7913                resultSelector: resultSelector,
7914                state: state
7915            });
7916        }
7917        do {
7918            if (condition) {
7919                var conditionResult = void 0;
7920                try {
7921                    conditionResult = condition(state);
7922                }
7923                catch (err) {
7924                    subscriber.error(err);
7925                    return undefined;
7926                }
7927                if (!conditionResult) {
7928                    subscriber.complete();
7929                    break;
7930                }
7931            }
7932            var value = void 0;
7933            try {
7934                value = resultSelector(state);
7935            }
7936            catch (err) {
7937                subscriber.error(err);
7938                return undefined;
7939            }
7940            subscriber.next(value);
7941            if (subscriber.closed) {
7942                break;
7943            }
7944            try {
7945                state = iterate(state);
7946            }
7947            catch (err) {
7948                subscriber.error(err);
7949                return undefined;
7950            }
7951        } while (true);
7952        return undefined;
7953    });
7954}
7955function generate_dispatch(state) {
7956    var subscriber = state.subscriber, condition = state.condition;
7957    if (subscriber.closed) {
7958        return undefined;
7959    }
7960    if (state.needIterate) {
7961        try {
7962            state.state = state.iterate(state.state);
7963        }
7964        catch (err) {
7965            subscriber.error(err);
7966            return undefined;
7967        }
7968    }
7969    else {
7970        state.needIterate = true;
7971    }
7972    if (condition) {
7973        var conditionResult = void 0;
7974        try {
7975            conditionResult = condition(state.state);
7976        }
7977        catch (err) {
7978            subscriber.error(err);
7979            return undefined;
7980        }
7981        if (!conditionResult) {
7982            subscriber.complete();
7983            return undefined;
7984        }
7985        if (subscriber.closed) {
7986            return undefined;
7987        }
7988    }
7989    var value;
7990    try {
7991        value = state.resultSelector(state.state);
7992    }
7993    catch (err) {
7994        subscriber.error(err);
7995        return undefined;
7996    }
7997    if (subscriber.closed) {
7998        return undefined;
7999    }
8000    subscriber.next(value);
8001    if (subscriber.closed) {
8002        return undefined;
8003    }
8004    return this.schedule(state);
8005}
8006
8007// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/iif.js
8008/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
8009
8010
8011function iif(condition, trueResult, falseResult) {
8012    if (trueResult === void 0) {
8013        trueResult = empty["a" /* EMPTY */];
8014    }
8015    if (falseResult === void 0) {
8016        falseResult = empty["a" /* EMPTY */];
8017    }
8018    return Object(defer["a" /* defer */])(function () { return condition() ? trueResult : falseResult; });
8019}
8020
8021// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isNumeric.js
8022var isNumeric = __webpack_require__(39);
8023
8024// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/interval.js
8025/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
8026
8027
8028
8029function interval(period, scheduler) {
8030    if (period === void 0) {
8031        period = 0;
8032    }
8033    if (scheduler === void 0) {
8034        scheduler = scheduler_async["a" /* async */];
8035    }
8036    if (!Object(isNumeric["a" /* isNumeric */])(period) || period < 0) {
8037        period = 0;
8038    }
8039    if (!scheduler || typeof scheduler.schedule !== 'function') {
8040        scheduler = scheduler_async["a" /* async */];
8041    }
8042    return new Observable["a" /* Observable */](function (subscriber) {
8043        subscriber.add(scheduler.schedule(interval_dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
8044        return subscriber;
8045    });
8046}
8047function interval_dispatch(state) {
8048    var subscriber = state.subscriber, counter = state.counter, period = state.period;
8049    subscriber.next(counter);
8050    this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
8051}
8052
8053// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/merge.js
8054var merge = __webpack_require__(75);
8055
8056// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/never.js
8057/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
8058
8059
8060var NEVER = /*@__PURE__*/ new Observable["a" /* Observable */](noop["a" /* noop */]);
8061function never() {
8062    return NEVER;
8063}
8064
8065// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/of.js
8066var of = __webpack_require__(50);
8067
8068// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js
8069/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
8070
8071
8072
8073
8074function onErrorResumeNext() {
8075    var sources = [];
8076    for (var _i = 0; _i < arguments.length; _i++) {
8077        sources[_i] = arguments[_i];
8078    }
8079    if (sources.length === 0) {
8080        return empty["a" /* EMPTY */];
8081    }
8082    var first = sources[0], remainder = sources.slice(1);
8083    if (sources.length === 1 && Object(isArray["a" /* isArray */])(first)) {
8084        return onErrorResumeNext.apply(void 0, first);
8085    }
8086    return new Observable["a" /* Observable */](function (subscriber) {
8087        var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
8088        return Object(from["a" /* from */])(first).subscribe({
8089            next: function (value) { subscriber.next(value); },
8090            error: subNext,
8091            complete: subNext,
8092        });
8093    });
8094}
8095
8096// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/pairs.js
8097/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
8098
8099
8100function pairs(obj, scheduler) {
8101    if (!scheduler) {
8102        return new Observable["a" /* Observable */](function (subscriber) {
8103            var keys = Object.keys(obj);
8104            for (var i = 0; i < keys.length && !subscriber.closed; i++) {
8105                var key = keys[i];
8106                if (obj.hasOwnProperty(key)) {
8107                    subscriber.next([key, obj[key]]);
8108                }
8109            }
8110            subscriber.complete();
8111        });
8112    }
8113    else {
8114        return new Observable["a" /* Observable */](function (subscriber) {
8115            var keys = Object.keys(obj);
8116            var subscription = new Subscription["a" /* Subscription */]();
8117            subscription.add(scheduler.schedule(pairs_dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
8118            return subscription;
8119        });
8120    }
8121}
8122function pairs_dispatch(state) {
8123    var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
8124    if (!subscriber.closed) {
8125        if (index < keys.length) {
8126            var key = keys[index];
8127            subscriber.next([key, obj[key]]);
8128            subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
8129        }
8130        else {
8131            subscriber.complete();
8132        }
8133    }
8134}
8135
8136// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/race.js
8137var race = __webpack_require__(76);
8138
8139// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/range.js
8140/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
8141
8142function range(start, count, scheduler) {
8143    if (start === void 0) {
8144        start = 0;
8145    }
8146    if (count === void 0) {
8147        count = 0;
8148    }
8149    return new Observable["a" /* Observable */](function (subscriber) {
8150        var index = 0;
8151        var current = start;
8152        if (scheduler) {
8153            return scheduler.schedule(range_dispatch, 0, {
8154                index: index, count: count, start: start, subscriber: subscriber
8155            });
8156        }
8157        else {
8158            do {
8159                if (index++ >= count) {
8160                    subscriber.complete();
8161                    break;
8162                }
8163                subscriber.next(current++);
8164                if (subscriber.closed) {
8165                    break;
8166                }
8167            } while (true);
8168        }
8169        return undefined;
8170    });
8171}
8172function range_dispatch(state) {
8173    var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
8174    if (index >= count) {
8175        subscriber.complete();
8176        return;
8177    }
8178    subscriber.next(start);
8179    if (subscriber.closed) {
8180        return;
8181    }
8182    state.index = index + 1;
8183    state.start = start + 1;
8184    this.schedule(state);
8185}
8186
8187// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/throwError.js
8188var throwError = __webpack_require__(51);
8189
8190// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/timer.js
8191var timer = __webpack_require__(77);
8192
8193// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/observable/using.js
8194/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
8195
8196
8197
8198function using(resourceFactory, observableFactory) {
8199    return new Observable["a" /* Observable */](function (subscriber) {
8200        var resource;
8201        try {
8202            resource = resourceFactory();
8203        }
8204        catch (err) {
8205            subscriber.error(err);
8206            return undefined;
8207        }
8208        var result;
8209        try {
8210            result = observableFactory(resource);
8211        }
8212        catch (err) {
8213            subscriber.error(err);
8214            return undefined;
8215        }
8216        var source = result ? Object(from["a" /* from */])(result) : empty["a" /* EMPTY */];
8217        var subscription = source.subscribe(subscriber);
8218        return function () {
8219            subscription.unsubscribe();
8220            if (resource) {
8221                resource.unsubscribe();
8222            }
8223        };
8224    });
8225}
8226
8227// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/observable/zip.js
8228var zip = __webpack_require__(55);
8229
8230// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/config.js
8231var config = __webpack_require__(21);
8232
8233// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/index.js
8234/* concated harmony reexport Observable */__webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable["a" /* Observable */]; });
8235/* concated harmony reexport ConnectableObservable */__webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable["a" /* ConnectableObservable */]; });
8236/* concated harmony reexport GroupedObservable */__webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return groupBy["a" /* GroupedObservable */]; });
8237/* concated harmony reexport observable */__webpack_require__.d(__webpack_exports__, "observable", function() { return observable["a" /* observable */]; });
8238/* concated harmony reexport Subject */__webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject["a" /* Subject */]; });
8239/* concated harmony reexport BehaviorSubject */__webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject["a" /* BehaviorSubject */]; });
8240/* concated harmony reexport ReplaySubject */__webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject["a" /* ReplaySubject */]; });
8241/* concated harmony reexport AsyncSubject */__webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject["a" /* AsyncSubject */]; });
8242/* concated harmony reexport asapScheduler */__webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return asap["a" /* asap */]; });
8243/* concated harmony reexport asyncScheduler */__webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return scheduler_async["a" /* async */]; });
8244/* concated harmony reexport queueScheduler */__webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return queue["a" /* queue */]; });
8245/* concated harmony reexport animationFrameScheduler */__webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return animationFrame; });
8246/* concated harmony reexport VirtualTimeScheduler */__webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler_VirtualTimeScheduler; });
8247/* concated harmony reexport VirtualAction */__webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualTimeScheduler_VirtualAction; });
8248/* concated harmony reexport Scheduler */__webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler["a" /* Scheduler */]; });
8249/* concated harmony reexport Subscription */__webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription["a" /* Subscription */]; });
8250/* concated harmony reexport Subscriber */__webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber["a" /* Subscriber */]; });
8251/* concated harmony reexport Notification */__webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification["a" /* Notification */]; });
8252/* concated harmony reexport pipe */__webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe["a" /* pipe */]; });
8253/* concated harmony reexport noop */__webpack_require__.d(__webpack_exports__, "noop", function() { return noop["a" /* noop */]; });
8254/* concated harmony reexport identity */__webpack_require__.d(__webpack_exports__, "identity", function() { return identity["a" /* identity */]; });
8255/* concated harmony reexport isObservable */__webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
8256/* concated harmony reexport ArgumentOutOfRangeError */__webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError["a" /* ArgumentOutOfRangeError */]; });
8257/* concated harmony reexport EmptyError */__webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError["a" /* EmptyError */]; });
8258/* concated harmony reexport ObjectUnsubscribedError */__webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError["a" /* ObjectUnsubscribedError */]; });
8259/* concated harmony reexport UnsubscriptionError */__webpack_require__.d(__webpack_exports__, "
8259UnsubscriptionError", function() { return UnsubscriptionError["a" /* UnsubscriptionError */]; });
8260/* concated harmony reexport TimeoutError */__webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError["a" /* TimeoutError */]; });
8261/* concated harmony reexport bindCallback */__webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
8262/* concated harmony reexport bindNodeCallback */__webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
8263/* concated harmony reexport combineLatest */__webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest["b" /* combineLatest */]; });
8264/* concated harmony reexport concat */__webpack_require__.d(__webpack_exports__, "concat", function() { return concat["a" /* concat */]; });
8265/* concated harmony reexport defer */__webpack_require__.d(__webpack_exports__, "defer", function() { return defer["a" /* defer */]; });
8266/* concated harmony reexport empty */__webpack_require__.d(__webpack_exports__, "empty", function() { return empty["b" /* empty */]; });
8267/* concated harmony reexport forkJoin */__webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
8268/* concated harmony reexport from */__webpack_require__.d(__webpack_exports__, "from", function() { return from["a" /* from */]; });
8269/* concated harmony reexport fromEvent */__webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
8270/* concated harmony reexport fromEventPattern */__webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
8271/* concated harmony reexport generate */__webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
8272/* concated harmony reexport iif */__webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
8273/* concated harmony reexport interval */__webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
8274/* concated harmony reexport merge */__webpack_require__.d(__webpack_exports__, "merge", function() { return merge["a" /* merge */]; });
8275/* concated harmony reexport never */__webpack_require__.d(__webpack_exports__, "never", function() { return never; });
8276/* concated harmony reexport of */__webpack_require__.d(__webpack_exports__, "of", function() { return of["a" /* of */]; });
8277/* concated harmony reexport onErrorResumeNext */__webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
8278/* concated harmony reexport pairs */__webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
8279/* concated harmony reexport race */__webpack_require__.d(__webpack_exports__, "race", function() { return race["a" /* race */]; });
8280/* concated harmony reexport range */__webpack_require__.d(__webpack_exports__, "range", function() { return range; });
8281/* concated harmony reexport throwError */__webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError["a" /* throwError */]; });
8282/* concated harmony reexport timer */__webpack_require__.d(__webpack_exports__, "timer", function() { return timer["a" /* timer */]; });
8283/* concated harmony reexport using */__webpack_require__.d(__webpack_exports__, "using", function() { return using; });
8284/* concated harmony reexport zip */__webpack_require__.d(__webpack_exports__, "zip", function() { return zip["b" /* zip */]; });
8285/* concated harmony reexport EMPTY */__webpack_require__.d(__webpack_exports__, "EMPTY", function() { return empty["a" /* EMPTY */]; });
8286/* concated harmony reexport NEVER */__webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
8287/* concated harmony reexport config */__webpack_require__.d(__webpack_exports__, "config", function() { return config["a" /* config */]; });
8288/** PURE_IMPORTS_START  PURE_IMPORTS_END */
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344/***/ }),
8345/* 20 */
8346/***/ (function(module, __webpack_exports__, __webpack_require__) {
8347
8348"use strict";
8349/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fromArray; });
8350/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
8351/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
8352/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81);
8353/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */
8354
8355
8356
8357function fromArray(input, scheduler) {
8358    if (!scheduler) {
8359        return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__[/* subscribeToArray */ "a"])(input));
8360    }
8361    else {
8362        return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) {
8363            var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "a"]();
8364            var i = 0;
8365            sub.add(scheduler.schedule(function () {
8366                if (i === input.length) {
8367                    subscriber.complete();
8368                    return;
8369                }
8370                subscriber.next(input[i++]);
8371                if (!subscriber.closed) {
8372                    sub.add(this.schedule());
8373                }
8374            }));
8375            return sub;
8376        });
8377    }
8378}
8379
8380
8381/***/ }),
8382/* 21 */
8383/***/ (function(module, __webpack_exports__, __webpack_require__) {
8384
8385"use strict";
8386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; });
8387/** PURE_IMPORTS_START  PURE_IMPORTS_END */
8388var _enable_super_gross_mode_that_will_cause_bad_things = false;
8389var config = {
8390    Promise: undefined,
8391    set useDeprecatedSynchronousErrorHandling(value) {
8392        if (value) {
8393            var error = /*@__PURE__*/ new Error();
8394            /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
8395        }
8396        else if (_enable_super_gross_mode_that_will_cause_bad_things) {
8397            /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
8398        }
8399        _enable_super_gross_mode_that_will_cause_bad_things = value;
8400    },
8401    get useDeprecatedSynchronousErrorHandling() {
8402        return _enable_super_gross_mode_that_will_cause_bad_things;
8403    },
8404};
8405
8406
8407/***/ }),
8408/* 22 */
8409/***/ (function(module, __webpack_exports__, __webpack_require__) {
8410
8411"use strict";
8412/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return noop; });
8413/** PURE_IMPORTS_START  PURE_IMPORTS_END */
8414function noop() { }
8415
8416
8417/***/ }),
8418/* 23 */
8419/***/ (function(module, __webpack_exports__, __webpack_require__) {
8420
8421"use strict";
8422/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return identity; });
8423/** PURE_IMPORTS_START  PURE_IMPORTS_END */
8424function identity(x) {
8425    return x;
8426}
8427
8428
8429/***/ }),
8430/* 24 */
8431/***/ (function(module, __webpack_exports__, __webpack_require__) {
8432
8433"use strict";
8434/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notification; });
8435/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
8436/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50);
8437/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51);
8438/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
8439
8440
8441
8442var Notification = /*@__PURE__*/ (function () {
8443    function Notification(kind, value, error) {
8444        this.kind = kind;
8445        this.value = value;
8446        this.error = error;
8447        this.hasValue = kind === 'N';
8448    }
8449    Notification.prototype.observe = function (observer) {
8450        switch (this.kind) {
8451            case 'N':
8452                return observer.next && observer.next(this.value);
8453            case 'E':
8454                return observer.error && observer.error(this.error);
8455            case 'C':
8456                return observer.complete && observer.complete();
8457        }
8458    };
8459    Notification.prototype.do = function (next, error, complete) {
8460        var kind = this.kind;
8461        switch (kind) {
8462            case 'N':
8463                return next && next(this.value);
8464            case 'E':
8465                return error && error(this.error);
8466            case 'C':
8467                return complete && complete();
8468        }
8469    };
8470    Notification.prototype.accept = function (nextOrObserver, error, complete) {
8471        if (nextOrObserver && typeof nextOrObserver.next === 'function') {
8472            return this.observe(nextOrObserver);
8473        }
8474        else {
8475            return this.do(nextOrObserver, error, complete);
8476        }
8477    };
8478    Notification.prototype.toObservable = function () {
8479        var kind = this.kind;
8480        switch (kind) {
8481            case 'N':
8482                return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__[/* of */ "a"])(this.value);
8483            case 'E':
8484                return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__[/* throwError */ "a"])(this.error);
8485            case 'C':
8486                return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__[/* empty */ "b"])();
8487        }
8488        throw new Error('unexpected notification kind value');
8489    };
8490    Notification.createNext = function (value) {
8491        if (typeof value !== 'undefined') {
8492            return new Notification('N', value);
8493        }
8494        return Notification.undefinedValueNotification;
8495    };
8496    Notification.createError = function (err) {
8497        return new Notification('E', undefined, err);
8498    };
8499    Notification.createComplete = function () {
8500        return Notification.completeNotification;
8501    };
8502    Notification.completeNotification = new Notification('C');
8503    Notification.undefinedValueNotification = new Notification('N', undefined);
8504    return Notification;
8505}());
8506
8507
8508
8509/***/ }),
8510/* 25 */
8511/***/ (function(module, __webpack_exports__, __webpack_require__) {
8512
8513"use strict";
8514/* unused harmony export getSymbolIterator */
8515/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iterator; });
8516/* unused harmony export $$iterator */
8517/** PURE_IMPORTS_START  PURE_IMPORTS_END */
8518function getSymbolIterator() {
8519    if (typeof Symbol !== 'function' || !Symbol.iterator) {
8520        return '@@iterator';
8521    }
8522    return Symbol.iterator;
8523}
8524var iterator = /*@__PURE__*/ getSymbolIterator();
8525var $$iterator = iterator;
8526
8527
8528/***/ }),
8529/* 26 */
8530/***/ (function(module, exports, __webpack_require__) {
8531
8532"use strict";
8533
8534Object.defineProperty(exports, "__esModule", { value: true });
8535var common_utils_1 = __webpack_require__(40);
8536var pds_utils_1 = __webpack_require__(18);
8537var pds_i18n_1 = __webpack_require__(15);
8538var flattenedPdsValidationRulesEngine = pds_utils_1.pdsUtils.createFlattenedClassInstance(common_utils_1.ValidationRulesEngine);
8539flattenedPdsValidationRulesEngine.setI18n(pds_i18n_1.pdsI18n);
8540exports.pdsValidationRulesEngine = flattenedPdsValidationRulesEngine;
8541
8542
8543
8544/***/ }),
8545/* 27 */
8546/***/ (function(module, __webpack_exports__, __webpack_require__) {
8547
8548"use strict";
8549/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return observable; });
8550/** PURE_IMPORTS_START  PURE_IMPORTS_END */
8551var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
8552
8553
8554/***/ }),
8555/* 28 */
8556/***/ (function(module, __webpack_exports__, __webpack_require__) {
8557
8558"use strict";
8559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObjectUnsubscribedError; });
8560/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
8561/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
8562
8563var ObjectUnsubscribedError = /*@__PURE__*/ (function (_super) {
8564    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ObjectUnsubscribedError, _super);
8565    function ObjectUnsubscribedError() {
8566        var _this = _super.call(this, 'object unsubscribed') || this;
8567        _this.name = 'ObjectUnsubscribedError';
8568        Object.setPrototypeOf(_this, ObjectUnsubscribedError.prototype);
8569        return _this;
8570    }
8571    return ObjectUnsubscribedError;
8572}(Error));
8573
8574
8575
8576/***/ }),
8577/* 29 */
8578/***/ (function(module, __webpack_exports__, __webpack_require__) {
8579
8580"use strict";
8581/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concat; });
8582/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
8583/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50);
8584/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
8585/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74);
8586/** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */
8587
8588
8589
8590
8591function concat() {
8592    var observables = [];
8593    for (var _i = 0; _i < arguments.length; _i++) {
8594        observables[_i] = arguments[_i];
8595    }
8596    if (observables.length === 1 || (observables.length === 2 && Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__[/* isScheduler */ "a"])(observables[1]))) {
8597        return Object(_from__WEBPACK_IMPORTED_MODULE_2__[/* from */ "a"])(observables[0]);
8598    }
8599    return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_3__[/* concatAll */ "a"])()(_of__WEBPACK_IMPORTED_MODULE_1__[/* of */ "a"].apply(void 0, observables));
8600}
8601
8602
8603/***/ }),
8604/* 30 */
8605/***/ (function(module, exports, __webpack_require__) {
8606
8607"use strict";
8608
8609var simple_time_1 = __webpack_require__(95);
8610/**
8611 * If you don't need to extend i18n to suit your own needs then just do: import i18n from 'common-utils'; to get a singleton object.
8612 * If you need to extend it import the class and then extend it: import {I18nUtil} from 'common-utils';
8613 * If you choose to import the class it will be up to the consuming application to maintain a singleton object.
8614 */
8615var defaultLocaleObject = {
8616    'LOCALE': 'en_US',
8617    'DATETIME_FORMATS': {
8618        'MONTH': ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
8619        'SHORTMONTH': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
8620        'medium': 'MM/dd/yyyy hh:mm:ss a',
8621        'mediumDateText': 'MM/DD/YYYY',
8622        'shortDateText': 'MM/DD/YY',
8623        'AMPMS': ['AM', 'PM'],
8624        'mediumDate': 'MM/dd/yyyy',
8625        'mediumTime': 'hh:mm:ss a',
8626        'shortTime': 'hh:mm a',
8627        'short': 'M/d/yy hh:mm a',
8628        'SHORTDAY': ['Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat'],
8629        'DAY': ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
8630        'shortDate': 'M/d/yy'
8631    },
8632    '$BREACH_MITIGATION': 'XRFmEENA55t627cN',
8633    'NUMBER_FORMATS': {
8634        'DECIMAL_SEP': '.',
8635        'number_regex': '([-]?(([0-9]{1,3}(,[0-9]{3})*(\\.[0-9]+)?|\\.[0-9]+)|([0-9]*(\\.[0-9]+)?)))',
8636        'CURRENCY_SYM': '$',
8637        'GROUP_SEP': ',',
8638        'PATTERNS': [{
8639                'negSuf': '',
8640                'posSuf': '',
8641                'lgSize': '3',
8642                'minFrac': 0,
8643                'minInt': 1,
8644                'negPre': '-',
8645                'gSize': 3,
8646                'maxFrac': 9,
8647                'macFrac': '0',
8648                'posPre': ''
8649            }],
8650        'number_format': '#,###.#########'
8651    }
8652};
8653var PIPE_REGEX = /\|([^|]+$)/;
8654var AM_PM_TIME_REGEX = /^ *(0?[1-9]|10|11|12) *: *([0-5]\d) *(am|pm|AM|PM) *$/;
8655var TWENTY_FOUR_HOUR_TIME_REGEX = /^ *(0?[0-9]|1[0-9]|2[0-3]) *: *([0-5]\d) *$/;
8656var I18nUtil = (function () {
8657    function I18nUtil() {
8658        this.twoDigitRegex = /^\d{2}$/;
8659        // public timeRegexString: string = '^(0?[1-9]|10|11|12) *: *([0-5]\\d) *(am|pm)$'; //Commenting out on 11/13/2017. Delete in 2018 if no one is complaining.
8660        this.messageKeys = {
8661            'cu|validation engine|The number must be greater than or equal to xx': 'The number must be greater than or equal to {{minValue}}',
8662            'cu|validation engine|The number must be less than or equal to xx': 'The number must be less than or equal to {{maxValue}}',
8663            'cu|validation engine|The number must be less than xx': 'The number must be less than {{maxValue}}',
8664            'cu|validation engine|The number must be greater than xx': 'The number must be greater than {{minValue}}',
8665            'cu|validation engine|xx is not a valid integer.': '{{input}} is not a valid integer.',
8666            'cu|validation engine|The number cannot have exceed xx decimal places.': 'The number cannot exceed {{maxDecimals}} decimal places.',
8667            'cu|validation engine|The number must have xx or more digits.': 'The number must have {{minLength}} or more digits.',
8668            'cu|validation engine|The number must have xx or less digits.': 'The number must have {{maxLength}} or less digits.',
8669            'cu|validation engine|The date must be on or after xx': 'The date must be on or after {{minDate}}',
8670            'cu|validation engine|The date must be on or before xx': 'The date must be on or before {{maxDate}}',
8671            'cu|validation engine|The text must have xx or more characters.': 'The text must have {{minLength}} or more characters.',
8672            'cu|validation engine|The text must have xx or less characters.': 'The text must have {{maxLength}} or less characters.',
8673            'cu|validation engine|Must not contain any characters in xx': 'Must not contain any characters in {{excludeChars}}',
8674            'cu|validation engine|The time must be on or before xx': 'The time must be on or before {{maxTime}}',
8675            'cu|validation engine|The time must be on or after xx': 'The time must be on or after {{minTime}}',
8676            'cu|validation engine|The email is not in the correct format.': 'The email is not in the correct format.',
8677            'global|Today': 'Today',
8678            'global|Tomorrow': 'Tomorrow',
8679            'global|Yesterday': 'Yesterday',
8680            'cu|date utils|xx at xx': '{{theDate}} at {{theTime}}'
8681        };
8682        this.locale = defaultLocaleObject;
8683    }
8684    I18nUtil.prototype.overWriteGetText = function (getTextOverwriteFunction) {
8685        this.getTextOverwriteFunction = getTextOverwriteFunction;
8686    };
8687    I18nUtil.prototype.getShortFormat = function () {
8688        return this.locale.DATETIME_FORMATS.shortDate;
8689    };
8690    I18nUtil.prototype.getDateFormat = function () {
8691        return this.locale.DATETIME_FORMATS.mediumDate;
8692    };
8693    I18nUtil.prototype.getDateText = function () {
8694        return this.locale.DATETIME_FORMATS.mediumDateText;
8695    };
8696    /**
8697     * This function is expceded to be overridden by applications using Angular.
8698     * @param key, this should be a string unless getTextOverwriteFunction is not null.
8699     * @param params, this should be a string or map of strings unless getTextOverwriteFunction is not null.
8700     * @returns {any}, this will be a string unless getTextOverwriteFunction is not null.
8701     */
8702    I18nUtil.prototype.getText = function (key, params) {
8703        //This is for Angular2 to use ng-translate instead of the default function.
8704        if (this.getTextOverwriteFunction != null) {
8705            return this.getTextOverwriteFunction(key, params);
8706        }
8707        if (typeof key !== 'string') {
8708            return;
8709        }
8710        var msg = this.messageKeys[key];
8711        if (msg == null) {
8712            msg = this.stripContextFromKey(key);
8713        }
8714        if (msg == null) {
8715            msg = key;
8716        }
8717        if (params != null) {
8718            if (typeof params === 'string' ||
8719                typeof params === 'boolean' ||
8720                typeof params === 'number') {
8721                msg = msg.replace(/{{[^}]+}}/g, String(params));
8722            }
8723            else {
8724                for (var _i = 0, _a = Object.keys(params); _i < _a.length; _i++) {
8725                    var k = _a[_i];
8726                    var regex = new RegExp('\\{\\{' + k + '}}', 'g');
8727                    msg = msg.replace(regex, params[k]);
8728                }
8729            }
8730        }
8731        return msg;
8732    };
8733    I18nUtil.prototype.stripContextFromKey = function (key) {
8734        var result = PIPE_REGEX.exec(key);
8735        if (result != null && result.length > 1) {
8736            return result[1];
8737        }
8738        return key;
8739    };
8740    I18nUtil.prototype.getNow = function () {
8741        //TODO: We may need to figure out how to get this to return the "now" of the server.
8742        return new Date();
8743    };
8744    /**
8745     * @param date: The date object to format
8746     * @param useMonthAbbeviations: Set to false for a date the screen readers can read nicely.
8747     * @returns String: The formatted date string.
8748     */
8749    I18nUtil.prototype.localizeDatePretty = function (date, useMonthAbbeviations) {
8750        if (useMonthAbbeviations === void 0) { useMonthAbbeviations = true; }
8751        if (!(date instanceof Date)) {
8752            return '';
8753        }
8754        var now = this.getNow();
8755        var tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
8756        var yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
8757        if (now.getDate() === date.getDate() &&
8758            now.getMonth() === date.getMonth() &&
8759            now.getFullYear() === date.getFullYear()) {
8760            return this.getText('global|Today');
8761        }
8762        else if (tomorrow.getDate() === date.getDate() &&
8763            tomorrow.getMonth() === date.getMonth() &&
8764            tomorrow.getFullYear() === date.getFullYear()) {
8765            return this.getText('global|Tomorrow');
8766        }
8767        else if (yesterday.getDate() === date.getDate() &&
8768            yesterday.getMonth() === date.getMonth() &&
8769            yesterday.getFullYear() === date.getFullYear()) {
8770            return this.getText('global|Yesterday');
8771        }
8772        var dateString;
8773        var dateFormat = this.locale.DATETIME_FORMATS.mediumDate.toLowerCase();
8774        var startType = dateFormat.charAt(0); //'y' | 'm' | 'd'
8775        var endType = dateFormat.charAt(dateFormat.length - 1);
8776        var useYear = now.getFullYear() !== date.getFullYear();
8777        var month;
8778        var day = date.getDate();
8779        var year = date.getFullYear();
8780        if (useMonthAbbeviations) {
8781            month = this.locale.DATETIME_FORMATS.SHORTMONTH[date.getMonth()];
8782        }
8783        else {
8784            month = this.locale.DATETIME_FORMATS.MONTH[date.getMonth()];
8785        }
8786        switch (startType) {
8787            case 'd':
8788                if (endType === 'y') {
8789                    //d m y
8790                    dateString = day + ' ' + month;
8791                    if (useYear) {
8792                        dateString += ' ' + year;
8793                    }
8794                }
8795                else {
8796                    //d, y m
8797                    if (useYear) {
8798                        dateString = day + ', ' + year + ' ' + month;
8799                    }
8800                    else {
8801                        dateString = day + ' ' + month;
8802                    }
8803                }
8804                break;
8805            default:
8806            case 'm':
8807                if (endType === 'y') {
8808                    //m d, y
8809                    dateString = month + ' ' + day;
8810                    if (useYear) {
8811                        dateString += ', ' + year;
8812                    }
8813                }
8814                else {
8815                    //m y, d
8816                    if (useYear) {
8817                        dateString = month + ' ' + year + ', ' + day;
8818                    }
8819                    else {
8820                        dateString = month + ' ' + day;
8821                    }
8822                }
8823                break;
8824            case 'y':
8825                if (useYear) {
8826                    if (endType === 'm') {
8827                        //y, d m
8828                        dateString = year + ', ' + day + ' ' + month;
8829                    }
8830                    else {
8831                        //y m d
8832                        dateString = year + ' ' + month + ' ' + day;
8833                    }
8834                }
8835                else {
8836                    if (endType === 'm') {
8837                        //d m
8838                        dateString = day + ' ' + month;
8839                    }
8840                    else {
8841                        //m d
8842                        dateString = month + ' ' + day;
8843                    }
8844                }
8845                break;
8846        }
8847        return dateString;
8848    };
8849    I18nUtil.prototype.localizeDate = function (d, fmt) {
8850        if (d == null) {
8851            return '';
8852        }
8853        if (!this.isValidDateObject(d)) {
8854            return String(d);
8855        }
8856        var seperator = this.locale.DATETIME_FORMATS.mediumDate.match(/[^A-Za-z]/);
8857        var patternPieces = this.locale.DATETIME_FORMATS.mediumDate.split(seperator[0]);
8858        var localizedStrings = [];
8859        for (var i = 0; i < 3; i++) {
8860            switch (patternPieces[i]) {
8861                case 'd':
8862                    localizedStrings.push(d.getDate());
8863                    break;
8864                case 'dd':
8865                    localizedStrings.push(d.getDate());
8866                    break;
8867                case 'M':
8868                    localizedStrings.push(d.getMonth() + 1);
8869                    break;
8870                case 'MM':
8871                    localizedStrings.push(d.getMonth() + 1);
8872                    break;
8873                case 'yy':
8874                    if (fmt !== 'mmdd') {
8875                        localizedStrings.push(d.getFullYear());
8876                    }
8877                    break;
8878                case 'yyyy':
8879                    if (fmt !== 'mmdd') {
8880                        localizedStrings.push(d.getFullYear());
8881                    }
8882                    break;
8883                default:
8884                    console.error('Unexpected format while localizing date');
8885            }
8886        }
8887        return localizedStrings.join(seperator);
8888    };
8889    I18nUtil.prototype.deLocalizeDate = function (localizedDateString) {
8890        if (localizedDateString == null || localizedDateString === '') {
8891            return;
8892        }
8893        var seperator = this.locale.DATETIME_FORMATS.mediumDate.match(/[^A-Za-z]/);
8894        var patternPieces = this.locale.DATETIME_FORMATS.mediumDate.split(seperator[0]);
8895        var localizedPieces = localizedDateString.split(seperator);
8896        if (localizedPieces.length === 3) {
8897            var day = void 0;
8898            var month = void 0;
8899            var year = void 0;
8900            for (var i = 0; i < 3; i++) {
8901                switch (patternPieces[i]) {
8902                    case 'd':
8903                    case 'dd':
8904                        day = localizedPieces[i];
8905                        break;
8906                    case 'M':
8907                    case 'MM':
8908                        month = localizedPieces[i];
8909                        break;
8910                    case 'yy':
8911                    case 'yyyy':
8912                        year = localizedPieces[i];
8913                        if (this.twoDigitRegex.test(year)) {
8914                            if (parseInt(year) > 50) {
8915                                year = '19' + year;
8916                            }
8917                            else {
8918                                year = '20' + year;
8919                            }
8920                        }
8921                        break;
8922                    default:
8923                        console.error('Unexpected format when delocalizing date.');
8924                }
8925            }
8926            //  /.-,
8927            var d = new Date(year, month - 1, day, 0, 0, 0);
8928            if (isNaN(year) || isNaN(month) || isNaN(day) ||
8929                d.getFullYear() !== Number(year) ||
8930                d.getMonth() !== Number(month - 1) ||
8931                d.getDate() !== Number(day)) {
8932                return;
8933            }
8934            if (this.isValidDateObject(d)) {
8935                return d;
8936            }
8937        }
8938    };
8939    /**
8940     * @param d - a javascript date object
8941     */
8942    I18nUtil.prototype.isValidDateObject = function (d) {
8943        if (d instanceof Date) {
8944            return !isNaN(d.getTime()); //invalid date object will return NaN for getTime
8945        }
8946        return false;
8947    };
8948    /**
8949     * Is the localized date string a valid date?
8950     * TODO - Should passing in '' evaluate to a valid date?  Maybe not so much.
8951     * @param localizedDate
8952     * @returns {any}
8953     */
8954    I18nUtil.prototype.isValidDate = function (localizedDate) {
8955        if (localizedDate !== '') {
8956            var parsedDate = this.deLocalizeDate(localizedDate);
8957            return this.isValidDateObject(parsedDate);
8958        }
8959        return true;
8960    };
8961    /**
8962     * @param psJsonDateString - String - in the form of yyyy-mm-dd or yyyy-mm-dd hh:mm:ss
8963     * @param preserceTimeOfDay - boolean - optional param to retain hh:mm:ss in returned date
8964     * object. Default is false if not passed.
8965     * @returns {*}
8966     */
8967    I18nUtil.prototype.parseJsonDate = function (psJsonDateString, preserveTimeOfDay) {
8968        if (psJsonDateString == null) {
8969            return;
8970        }
8971        var year = 0;
8972        var month = 0;
8973        var date = 0;
8974        var hours = 0;
8975        var minutes = 0;
8976        var seconds = 0;
8977        var split = psJsonDateString.split('-');
8978        if (split.length < 3) {
8979            return;
8980        }
8981        //a valid jsonDateString may contain a time of date hour/minute/seccond
8982        var dayTimeOfDay = split[2].split(' ');
8983        if (dayTimeOfDay.length === 2) {
8984            //time of day is present
8985            split[2] = dayTimeOfDay[0];
8986            if (preserveTimeOfDay) {
8987                var timeOfDay = dayTimeOfDay[1].split(':');
8988                if (timeOfDay.length === 3) {
8989                    hours = parseInt(timeOfDay[0]);
8990                    minutes = parseInt(timeOfDay[1]);
8991                    seconds = parseInt(timeOfDay[2]);
8992                }
8993            }
8994        }
8995        year = parseInt(split[0]);
8996        month = parseInt(split[1]) - 1;
8997        date = parseInt(split[2]);
8998        var returnDate = new Date(year, month, date, hours, minutes, seconds);
8999        if (isNaN(returnDate.getTime())) {
9000            return;
9001        }
9002        return returnDate;
9003    };
9004    /**
9005     * Sister function of parseJsonDate.  Converts a date object into the JsonDateString format
9006     * necessary for XTE.
9007     */
9008    I18nUtil.prototype.getJsonDate = function (javascriptDateObject, preserveTimeOfDay) {
9009        if (javascriptDateObject == null) {
9010            return;
9011        }
9012        if (isNaN(javascriptDateObject.getTime())) {
9013            return;
9014        }
9015        var psJsonDateString = javascriptDateObject.getFullYear() + '-' +
9016            this.padZeros((javascriptDateObject.getMonth() + 1), 2) + '-' +
9017            this.padZeros(javascriptDateObject.getDate(), 2);
9018        if (preserveTimeOfDay) {
9019            psJsonDateString += ' ' + this.padZeros(javascriptDateObject.getHours(), 2) + ':' +
9020                this.padZeros(javascriptDateObject.getMinutes(), 2) + ':' +
9021                this.padZeros(javascriptDateObject.getSeconds(), 2);
9022        }
9023        return psJsonDateString;
9024    };
9025    /**
9026     * Converts a JSON date to a non localized date
9027     * @param psJsonDateString - String - in the form of yyyy-mm-dd
9028     * @returns - String in the form of MM/DD/YYYY
9029     */
9030    I18nUtil.prototype.parseJsonDateToNonLocalized = function (psJsonDateString) {
9031        var date = this.parseJsonDate(psJsonDateString);
9032        if (date != null) {
9033            return this.getMmDdYyyyDateString(date);
9034        }
9035        return psJsonDateString;
9036    };
9037    /**
9038     * Gets the date in the form MM/DD/YYYY
9039     * @param date The date object to convert.
9040     */
9041    I18nUtil.prototype.getMmDdYyyyDateString = function (date) {
9042        return (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();
9043    };
9044    I18nUtil.prototype.addDaysToDate = function (date, numDays) {
9045        date.setDate(date.getDate() + numDays);
9046        return date;
9047    };
9048    I18nUtil.prototype.getLocalizedDayOfWeek = function (date) {
9049        return this.locale.DATETIME_FORMATS.DAY[date.getDay()];
9050    };
9051    I18nUtil.prototype.getNumericFormat = function () {
9052        //{ format: '#,##0.#########', size: '3', gs: ',', ds: '.', regex: '([-]?(([0-9]{1,3}(,[0-9]{3})*(\.[0-9]+)?|\.[0-9]+)|([0-9]*(\.[0-9]+)?)))' }
9053        return {
9054            format: this.locale.NUMBER_FORMATS.number_format,
9055            size: this.locale.NUMBER_FORMATS.PATTERNS[0].gSize,
9056            gs: this.locale.NUMBER_FORMATS.GROUP_SEP,
9057            ds: this.locale.NUMBER_FORMATS.DECIMAL_SEP,
9058            regex: this.locale.NUMBER_FORMATS.number_regex
9059        };
9060    };
9061    /**
9062     * Generate a localized time string from a javascript date object.
9063     * @param time - javascript date object
9064     * @returns {string}
9065     */
9066    I18nUtil.prototype.localizeTime = function (time, padWithZero) {
9067        if (padWithZero === void 0) { padWithZero = true; }
9068        if (time == null) {
9069            return;
9070        }
9071        var separator = ':';
9072        var ampmNames = this.locale.DATETIME_FORMATS.AMPMS;
9073        var show24Hours = this.locale.DATETIME_FORMATS.shortTime === 'HH:mm';
9074        var hours = time.getHours();
9075        var mins = time.getMinutes();
9076        var hoursString;
9077        var minsString;
9078        if (show24Hours) {
9079            padWithZero = true;
9080        }
9081        else {
9082            hours = ((hours + 11) % 12) + 1;
9083        }
9084        if (padWithZero && hours < 10) {
9085            hoursString = '0' + hours;
9086        }
9087        else {
9088            hoursString = String(hours);
9089        }
9090        if (mins < 10) {
9091            minsString = '0' + mins;
9092        }
9093        else {
9094            minsString = String(mins);
9095        }
9096        return hoursString + separator + minsString + (show24Hours ? '' : ' ' + ampmNames[time.getHours() < 12 ? 0 : 1]);
9097    };
9098    I18nUtil.prototype.deLocalizeTime = function (time) {
9099        if (time == null) {
9100            return;
9101        }
9102        var hours;
9103        var minutes;
9104        var timeTokens;
9105        if (this.locale.DATETIME_FORMATS.shortTime.endsWith('a')) {
9106            //AM PM time
9107            timeTokens = AM_PM_TIME_REGEX.exec(time);
9108            if (timeTokens == null || timeTokens.length < 4) {
9109                return;
9110            }
9111            hours = Number(timeTokens[1]);
9112            minutes = Number(timeTokens[2]);
9113            if (timeTokens[3].toLowerCase() === 'pm') {
9114                if (hours < 12) {
9115                    hours += 12;
9116                }
9117            }
9118            else {
9119                if (hours === 12) {
9120                    hours = 0;
9121                }
9122            }
9123        }
9124        else {
9125            //24 hour time
9126            return this.parse24HourTime(time);
9127        }
9128        return new simple_time_1.SimpleTime(hours, minutes);
9129    };
9130    I18nUtil.prototype.parse24HourTime = function (time) {
9131        var timeTokens = time.split(':');
9132        if (timeTokens.length !== 2) {
9133            return;
9134        }
9135        var hours = Number(timeTokens[0]);
9136        var minutes = Number(timeTokens[1]);
9137        if (isNaN(hours) || isNaN(minutes)) {
9138            return;
9139        }
9140        return new simple_time_1.SimpleTime(hours, minutes);
9141    };
9142    I18nUtil.prototype.isValidTime = function (localizedTime) {
9143        var show24Hours = this.locale.DATETIME_FORMATS.shortTime === 'HH:mm';
9144        if (show24Hours) {
9145            return TWENTY_FOUR_HOUR_TIME_REGEX.test(localizedTime);
9146        }
9147        else {
9148            return AM_PM_TIME_REGEX.test(localizedTime);
9149        }
9150    };
9151    /**
9152     * Localize a number, and optionally round it to a specific number of decimal places
9153     * @param number, number to localize
9154     * @param decimalPlaces (optional), number of decimal places to round to
9155     * @param strictDecimals (optional), appends zeroes if number has fewer decimal places
9156     * @returns the localized version of the number
9157     */
9158    I18nUtil.prototype.localizeNumber = function (number, decimalPlaces, strictDecimals) {
9159        if (number == null || isNaN(number)) {
9160            return;
9161        }
9162        if (decimalPlaces != null && !isNaN(decimalPlaces)) {
9163            // round the number to n decimal places before localizing
9164            var multiplier = 1;
9165            for (var i = 0; i < decimalPlaces; i++) {
9166                multiplier *= 10;
9167            }
9168            number = Math.round(number * multiplier) / multiplier;
9169        }
9170        var formattedNumber = this.formatNumber(this.getNumericFormat(), number);
9171        if (strictDecimals === true && decimalPlaces > 0) {
9172            //Add zeroes and an appropriate decimal separator as padding to the localized number
9173            var numDecimals = 0;
9174            if (String(formattedNumber).includes(this.locale.NUMBER_FORMATS.DECIMAL_SEP)) {
9175                var parts = String(formattedNumber).split(this.locale.NUMBER_FORMATS.DECIMAL_SEP);
9176                numDecimals = parts[parts.length - 1].length;
9177            }
9178            if (numDecimals === 0) {
9179                formattedNumber = formattedNumber + this.locale.NUMBER_FORMATS.DECIMAL_SEP;
9180            }
9181            formattedNumber = formattedNumber + ('0').repeat(decimalPlaces - numDecimals);
9182        }
9183        return formattedNumber;
9184    };
9185    I18nUtil.prototype.deLocalizeNumber = function (number) {
9186        return this.removeNumberFormat(this.getNumericFormat(), number);
9187    };
9188    I18nUtil.prototype.deLocalizeNumberToString = function (number) {
9189        var result = this.removeNumberFormat(this.getNumericFormat(), number);
9190        if (result == null) {
9191            return;
9192        }
9193        return String(result);
9194    };
9195    I18nUtil.prototype.removeNumberFormat = function (format, number) {
9196        if (number == null) {
9197            return;
9198        }
9199        // IE does not like instantiating RegExp objects with empty values, so we have to
9200        // check for valid values in the grouping separator before using it in a RegExp.
9201        var gsNotBlank = (format.gs === '.' || format.gs === ',' || format.gs === ' ');
9202        number = number.toString();
9203        // We also want to check that only valid characters are present.
9204        var regexString = '^' + format.regex + '$';
9205        var validNumber = new RegExp(regexString, 'g');
9206        if (number !== '' && number.match(validNumber) != null) {
9207            if (gsNotBlank) {
9208                var gs = new RegExp('\\' + format.gs, 'g');
9209                number = number.replace(gs, '');
9210            }
9211            var ds = new RegExp('\\' + format.ds, 'g'); //The decimal separator is not expected to be empty
9212            number = parseFloat(number.replace(ds, '.'));
9213        }
9214        else {
9215            return;
9216        }
9217        if (!isNaN(number)) {
9218            return number;
9219        }
9220    };
9221    I18nUtil.prototype.isValidNumber = function (numValue) {
9222        if (numValue !== '') {
9223            var regexString = '^' + this.locale.NUMBER_FORMATS.number_regex + '$';
9224            var regex = new RegExp(regexString, 'g');
9225            if (regex.test(numValue)) {
9226                return (this.deLocalizeNumber(numValue) != null);
9227            }
9228            else {
9229                return false;
9230            }
9231        }
9232        return true;
9233    };
9234    /**
9235     * Adds a new field for an object with the value localized.
9236     * This function will add a new field to the obejct with the localized value.
9237     * @param object An object with a number value that needs to be localized
9238     * @param key The key of the value that needs to be localized.
9239     */
9240    I18nUtil.prototype.localizeNumericObject = function (object, key) {
9241        object['_i18n_' + key] = this.localizeNumber(object[key]);
9242    };
9243    /**
9244     * This is the sister function of localizeNumericObject. If the localized value
9245     * can be parsed, it will update the original value with the deLocalized version.
9246     * @param object An object with a number value that has been localized using localizeNumericObject
9247     * @param key The key of the value that got localized.
9248     */
9249    I18nUtil.prototype.deLocalizeNumericObject = function (object, key) {
9250        if (!object.hasOwnProperty('_i18n_' + key)) {
9251            return;
9252        }
9253        if (object['_i18n_' + key] == null || object['_i18n_' + key] === '') {
9254            object[key] = '';
9255            return;
9256        }
9257        object[key] = this.deLocalizeNumber(object['_i18n_' + key]);
9258    };
9259    /**
9260     * @deprecated Use localizeTime() instead.
9261     */
9262    I18nUtil.prototype.makeStrFromTime = function (time, padWithZero) {
9263        if (padWithZero === void 0) { padWithZero = true; }
9264        return this.localizeTime.apply(this, arguments);
9265    };
9266    //TODO: Add unit tests
9267    /**
9268     * Creates a new Date object with the same day, month, and year of the passed in Date combined with the hours and minutes
9269     * of the time object.
9270     * @param date
9271     * @param time
9272     * @returns {Date} - A brand new date object.
9273     */
9274    I18nUtil.prototype.combineDateAndTime = function (date, time) {
9275        if (date == null) {
9276            return;
9277        }
9278        if (time == null) {
9279            time = new simple_time_1.SimpleTime(0, 0);
9280        }
9281        return new Date(date.getFullYear(), date.getMonth(), date.getDate(), time.getHours(), time.getMinutes());
9282    };
9283    //TODO: Add unit tests
9284    /**
9285     * Creates a time object based on the hours and minutes in the date object.
9286     * @param date
9287     * @returns Time
9288     */
9289    I18nUtil.prototype.extractTime = function (date) {
9290        return new simple_time_1.SimpleTime(date.getHours(), date.getMinutes());
9291    };
9292    /**
9293     * This is the function to format a date for display.
9294     */
9295    I18nUtil.prototype.formatDate = function (date, formatType) {
9296        if (date == null) {
9297            return '';
9298        }
9299        switch (formatType) {
9300            case 'DATE_TIME':
9301                return this.getText('cu|date utils|xx at xx', {
9302                    theDate: this.localizeDate(date),
9303                    theTime: this.localizeTime(date)
9304                });
9305            case 'DATE_TIME_SR':
9306                return this.getText('cu|date utils|xx at xx', {
9307                    theDate: this.localizeDatePretty(date, false),
9308                    theTime: this.localizeTime(date, false)
9309                });
9310            case 'DATE_TIME_PRETTY':
9311                return this.getText('cu|date utils|xx at xx', {
9312                    theDate: this.localizeDatePretty(date),
9313                    theTime: this.localizeTime(date, false)
9314                });
9315            case 'DATE':
9316                return this.localizeDate(date);
9317            case 'DATE_SR':
9318                return this.localizeDatePretty(date, false);
9319            case 'DATE_PRETTY':
9320            default:
9321                return this.localizeDatePretty(date);
9322        }
9323    };
9324    I18nUtil.prototype.formatNumber = function (format, number) {
9325        var ds = format.ds; // decimal separator
9326        var result = '';
9327        //curiously, isNaN(null) returns false.
9328        if (isNaN(number) || number == null) {
9329            if (number == null) {
9330                return;
9331            }
9332            return String(number);
9333        }
9334        else {
9335            result = number.toString();
9336            result = result.replace('.', ds);
9337            return result;
9338        }
9339    };
9340    I18nUtil.prototype.padZeros = function (number, padding) {
9341        var paddedString = '';
9342        if (isNaN(number) || isNaN(padding) || number == null || padding == null) {
9343            if (number == null) {
9344                return;
9345            }
9346            return String(number);
9347        }
9348        else {
9349            paddedString = number.toString();
9350            while (paddedString.length < padding) {
9351                paddedString = '0' + paddedString;
9352            }
9353            return paddedString;
9354        }
9355    };
9356    return I18nUtil;
9357}());
9358exports.I18nUtil = I18nUtil;
9359exports.i18n = new I18nUtil();
9360
9361
9362
9363/***/ }),
9364/* 31 */
9365/***/ (function(module, exports, __webpack_require__) {
9366
9367"use strict";
9368
9369var __extends = (this && this.__extends) || (function () {
9370    var extendStatics = function (d, b) {
9371        extendStatics = Object.setPrototypeOf ||
9372            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9373            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
9374        return extendStatics(d, b);
9375    }
9376    return function (d, b) {
9377        extendStatics(d, b);
9378        function __() { this.constructor = d; }
9379        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9380    };
9381})();
9382Object.defineProperty(exports, "__esModule", { value: true });
9383var pds_widget_1 = __webpack_require__(7);
9384var pds_validation_rules_engine_1 = __webpack_require__(26);
9385var pds_i18n_1 = __webpack_require__(15);
9386var pds_utils_1 = __webpack_require__(18);
9387var pds_logger_1 = __webpack_require__(41);
9388var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('input-widgets'), 'pds-abstract-input-widget.ts');
9389exports.allInputTagsSelector = 'pds-number-widget,pds-date-widget,pds-select-widget,pds-text-widget,pds-time-widget,pds-rich-text-editor,pds-file-picker-widget,pds-radio-button-widget,pds-checkbox-widget,pds-textarea-widget';
9390var tabKey = 9;
9391var PdsAbstractInputWidget = (function (_super) {
9392    __extends(PdsAbstractInputWidget, _super);
9393    function PdsAbstractInputWidget() {
9394        var _this = _super !== null && _super.apply(this, arguments) || this;
9395        _this.errorPresentWhenBlurOccurred = false;
9396        return _this;
9397    }
9398    PdsAbstractInputWidget.prototype.attributeChanged = function () {
9399        log('attributeChange() called');
9400        this.generateValidationRules();
9401    };
9402    PdsAbstractInputWidget.prototype.ready = function () {
9403        var _this = this;
9404        log('ready() called');
9405        _super.prototype.ready.call(this);
9406        this.errorMessage = '';
9407        this.isValid = true;
9408        this.invalidRule = '';
9409        this.isAttached = false;
9410        this.isBadgeElevated = false;
9411        this.isBadgeHidden = true;
9412        this.showTooltip = false;
9413        this.showValidIndicator = false;
9414        this.originalBadgeText = '';
9415        this.messageKeysUpdated();
9416        this.generateValidationRules();
9417        this.myErrorField = this.querySelector('.pds-validation');
9418        this.showErrorMessage(false);
9419        setTimeout(function () {
9420            if (!_this.disableErrorMessageLabelText && (_this.dataLabelText == null || _this.dataLabelText.length === 0)) {
9421                console.error('There needs to be a data-label-text attribute to this input widget', _this);
9422            }
9423        });
9424    };
9425    PdsAbstractInputWidget.prototype.inputSelector = function () {
9426        return this.querySelector('input');
9427    };
9428    PdsAbstractInputWidget.prototype.inputChange = function () {
9429        log('inputChange() called');
9430        this.validateWidget();
9431        this.setValue(this.value);
9432        this.dispatchEvent(new Event('modelValueChange', { bubbles: true }));
9433    };
9434    PdsAbstractInputWidget.prototype.focusLost = function (event) {
9435        log('focus lost');
9436        if (this.blurInterceptor != null) {
9437            this.blurInterceptor(this);
9438        }
9439        this.validateWidget(true, true);
9440        this.dispatchEvent(new Event('blur'));
9441    };
9442    PdsAbstractInputWidget.prototype.showErrorMessage = function (makeVisible) {
9443        log("showErrorMessage(" + makeVisible + ") called. this.errorMessage: " + this.errorMessage);
9444        if (this.myErrorField == null) {
9445            return;
9446        }
9447        pds_utils_1.pdsUtils.toggleClass(this.myErrorField, 'sr-only', this.errorMessage.length === 0 || !makeVisible);
9448        this.myErrorField.textContent = this.errorMessage;
9449    };
9450    Object.defineProperty(PdsAbstractInputWidget.prototype, "value", {
9451        get: function () {
9452            var result = this.inputSelector();
9453            if (result != null) {
9454                log("get value() called - value: " + result.value);
9455                return result.value;
9456            }
9457            log('get value() called - inputSelector not there yet');
9458        },
9459        set: function (value) {
9460            log("set value(" + value + ") called");
9461            this.setValue(value);
9462            this.setReadonlyText();
9463        },
9464        enumerable: true,
9465        configurable: true
9466    });
9467    Object.defineProperty(PdsAbstractInputWidget.prototype, "modelValue", {
9468        get: function () {
9469            var result = this.inputSelector();
9470            if (result != null) {
9471                log("get modelValue() called - value: " + result.modelValue);
9472                return result.modelValue;
9473            }
9474            log('get modelValue() called - inputSelector not there yet');
9475        },
9476        set: function (value) {
9477            log("set modelValue(" + value + ")");
9478            var modelValueChanged = this.setModelValue(value);
9479            if (modelValueChanged) {
9480                var showValidationResult = this.isErrorMessageShowing();
9481                this.validateWidget(showValidationResult);
9482            }
9483            this.setReadonlyText();
9484        },
9485        enumerable: true,
9486        configurable: true
9487    });
9488    PdsAbstractInputWidget.prototype.isErrorMessageShowing = function () {
9489        return this.myErrorField != null && !this.myErrorField.classList.contains('sr-only');
9490    };
9491    PdsAbstractInputWidget.prototype.validateWidget = function (showValidationResult, fromBlur) {
9492        log("validateWidget(" + showValidationResult + ", " + fromBlur + ") called.");
9493        if (fromBlur == null) {
9494            fromBlur = false;
9495        }
9496        var validationResult = pds_validation_rules_engine_1.pdsValidationRulesEngine.validate(this.value, this.validators);
9497        this.isValid = validationResult.isValid;
9498        if (showValidationResult === true || fromBlur) {
9499            this.showValidIndicator = true;
9500        }
9501        if (this.isValid) {
9502            this.setError('');
9503            this.invalidRule = '';
9504        }
9505        else {
9506            this.invalidRule = validationResult.invalidRule;
9507            if (validationResult.invalidRule === 'isRequired') {
9508                this.setError('');
9509            }
9510            else {
9511                this.setError(validationResult.errorMessage);
9512            }
9513        }
9514        this.setUpBadge();
9515        var showErrorMessages = false;
9516        if (!this.isValid && this.errorMessage.length > 0) {
9517            if (fromBlur && !this.errorPresentWhenBlurOccurred) {
9518                this.errorPresentWhenBlurOccurred = true;
9519            }
9520            if (showValidationResult == null) {
9521                showErrorMessages = this.errorPresentWhenBlurOccurred;
9522            }
9523            else {
9524                showErrorMessages = showValidationResult;
9525            }
9526        }
9527        this.showErrorMessage(showErrorMessages);
9528        return this.isValid;
9529    };
9530    PdsAbstractInputWidget.prototype.setError = function (errorMsg) {
9531        if (errorMsg != null && errorMsg.trim() !== '') {
9532            this.errorMessage = errorMsg;
9533        }
9534        else {
9535            this.errorMessage = '';
9536        }
9537    };
9538    PdsAbstractInputWidget.prototype.attached = function () {
9539        log('attached() called');
9540        var valueAttr = this.getAttribute('value');
9541        if (valueAttr != null) {
9542            this.removeAttribute('value');
9543            this.value = valueAttr;
9544        }
9545        this.isAttached = true;
9546        this.setUpBadge();
9547    };
9548    PdsAbstractInputWidget.prototype.setReadonlyText = function () {
9549        if (this.dataIsreadonly != null && this.value != null) {
9550            var readOnlyEle = this.querySelector('.pds-readonly-data');
9551            if (readOnlyEle == null) {
9552                return;
9553            }
9554            if (this.dataIsreadonly === 'true') {
9555                readOnlyEle.innerText = this.value;
9556            }
9557            else {
9558                readOnlyEle.innerText = '';
9559            }
9560        }
9561    };
9562    PdsAbstractInputWidget.prototype.setUpBadge = function () {
9563        log('setUpBadge() called');
9564        if (this.isAttached) {
9565            var isElevated = !this.isValid && this.dataDisableInvalidBadgeElevation !== 'true'
9566                && this.invalidRule === 'isRequired' && this.dataIsrequired === 'true';
9567            var isBadgeTextConfigured = (this.hasAttribute('data-badge-text')
9568                && this.dataBadgeText != null && this.dataBadgeText.length > 0);
9569            var hidingUnelevated = this.dataHideUnelevatedBadge === 'true' && !isElevated;
9570            var isRequired = this.dataIsrequired === 'true';
9571            this.isBadgeElevated = isElevated;
9572            if (this.dataBadgeText != null && this.dataBadgeText != null
9573                && this.dataBadgeText.length > 0 && this.originalBadgeText === '') {
9574                this.originalBadgeText = this.dataBadgeText;
9575            }
9576            if (this.dataIsrequired === 'true') {
9577                this.dataBadgeText = pds_i18n_1.pdsI18n.getText('pds|common|Required');
9578            }
9579            else if (!isBadgeTextConfigured) {
9580                this.originalBadgeText = '';
9581            }
9582            else if (isBadgeTextConfigured) {
9583                this.dataBadgeText = this.originalBadgeText;
9584            }
9585            if (!hidingUnelevated && (isRequired || isBadgeTextConfigured)) {
9586                this.isBadgeHidden = false;
9587            }
9588            else {
9589                this.isBadgeHidden = true;
9590            }
9591        }
9592    };
9593    PdsAbstractInputWidget.prototype.resetInputWidgetState = function () {
9594        log('resetInputWidgetState() called');
9595        this.errorPresentWhenBlurOccurred = false;
9596        this.showErrorMessage(false);
9597        this.isValid = true;
9598    };
9599    PdsAbstractInputWidget.prototype.showLabel = function (dataShowLabel, dataLabelText) {
9600        return (dataLabelText != null && dataLabelText.length > 0 && dataShowLabel !== 'false');
9601    };
9602    PdsAbstractInputWidget.prototype.showFieldHelp = function (dataFieldHelpText) {
9603        return (this.dataTooltipText != null && this.dataTooltipText.length > 0);
9604    };
9605    PdsAbstractInputWidget.prototype.showHelperText = function (dataHelperText) {
9606        return (this.dataHelperText != null && this.dataHelperText.length > 0);
9607    };
9608    PdsAbstractInputWidget.prototype.canShowIndicator = function (useValidIndicator, showValidIndicator) {
9609        return useValidIndicator === 'true' && showValidIndicator;
9610    };
9611    PdsAbstractInputWidget.prototype.canShowLoadingIndicator = function (useValidIndicator, showValidIndicator) {
9612        return useValidIndicator === 'loading' && showValidIndicator;
9613    };
9614    PdsAbstractInputWidget.prototype.actionButtonClickHandler = function (event) {
9615        this.fire('actionButtonEvent', event);
9616    };
9617    PdsAbstractInputWidget.prototype.dispatchInputEvent = function (inputElement) {
9618        var inputEvent = new Event('input', { bubbles: true });
9619        inputElement.dispatchEvent(inputEvent);
9620    };
9621    PdsAbstractInputWidget.prototype.isDisabled = function () {
9622        return this.disabled === 'true' || this.disabled === 'disabled' ? 'disabled' : null;
9623    };
9624    PdsAbstractInputWidget.prototype.getDisabledTextIfDisabled = function (disabled) {
9625        if (this.isDisabled()) {
9626            return pds_i18n_1.pdsI18n.getText('pds|common|Disabled field ');
9627        }
9628        else {
9629            return '';
9630        }
9631    };
9632    return PdsAbstractInputWidget;
9633}(pds_widget_1.PdsWidget));
9634exports.PdsAbstractInputWidget = PdsAbstractInputWidget;
9635
9636
9637
9638/***/ }),
9639/* 32 */
9640/***/ (function(module, __webpack_exports__, __webpack_require__) {
9641
9642"use strict";
9643/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeMap; });
9644/* unused harmony export MergeMapOperator */
9645/* unused harmony export MergeMapSubscriber */
9646/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
9647/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
9648/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
9649/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
9650/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16);
9651/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_map,_observable_from PURE_IMPORTS_END */
9652
9653
9654
9655
9656
9657function mergeMap(project, resultSelector, concurrent) {
9658    if (concurrent === void 0) {
9659        concurrent = Number.POSITIVE_INFINITY;
9660    }
9661    if (typeof resultSelector === 'function') {
9662        return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__[/* from */ "a"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__[/* map */ "a"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
9663    }
9664    else if (typeof resultSelector === 'number') {
9665        concurrent = resultSelector;
9666    }
9667    return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
9668}
9669var MergeMapOperator = /*@__PURE__*/ (function () {
9670    function MergeMapOperator(project, concurrent) {
9671        if (concurrent === void 0) {
9672            concurrent = Number.POSITIVE_INFINITY;
9673        }
9674        this.project = project;
9675        this.concurrent = concurrent;
9676    }
9677    MergeMapOperator.prototype.call = function (observer, source) {
9678        return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
9679    };
9680    return MergeMapOperator;
9681}());
9682
9683var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
9684    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](MergeMapSubscriber, _super);
9685    function MergeMapSubscriber(destination, project, concurrent) {
9686        if (concurrent === void 0) {
9687            concurrent = Number.POSITIVE_INFINITY;
9688        }
9689        var _this = _super.call(this, destination) || this;
9690        _this.project = project;
9691        _this.concurrent = concurrent;
9692        _this.hasCompleted = false;
9693        _this.buffer = [];
9694        _this.active = 0;
9695        _this.index = 0;
9696        return _this;
9697    }
9698    MergeMapSubscriber.prototype._next = function (value) {
9699        if (this.active < this.concurrent) {
9700            this._tryNext(value);
9701        }
9702        else {
9703            this.buffer.push(value);
9704        }
9705    };
9706    MergeMapSubscriber.prototype._tryNext = function (value) {
9707        var result;
9708        var index = this.index++;
9709        try {
9710            result = this.project(value, index);
9711        }
9712        catch (err) {
9713            this.destination.error(err);
9714            return;
9715        }
9716        this.active++;
9717        this._innerSub(result, value, index);
9718    };
9719    MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
9720        this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__[/* subscribeToResult */ "a"])(this, ish, value, index));
9721    };
9722    MergeMapSubscriber.prototype._complete = function () {
9723        this.hasCompleted = true;
9724        if (this.active === 0 && this.buffer.length === 0) {
9725            this.destination.complete();
9726        }
9727    };
9728    MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
9729        this.destination.next(innerValue);
9730    };
9731    MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
9732        var buffer = this.buffer;
9733        this.remove(innerSub);
9734        this.active--;
9735        if (buffer.length > 0) {
9736            this._next(buffer.shift());
9737        }
9738        else if (this.active === 0 && this.hasCompleted) {
9739            this.destination.complete();
9740        }
9741    };
9742    return MergeMapSubscriber;
9743}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__[/* OuterSubscriber */ "a"]));
9744
9745
9746
9747/***/ }),
9748/* 33 */
9749/***/ (function(module, __webpack_exports__, __webpack_require__) {
9750
9751"use strict";
9752/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArgumentOutOfRangeError; });
9753/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
9754/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
9755
9756var ArgumentOutOfRangeError = /*@__PURE__*/ (function (_super) {
9757    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ArgumentOutOfRangeError, _super);
9758    function ArgumentOutOfRangeError() {
9759        var _this = _super.call(this, 'argument out of range') || this;
9760        _this.name = 'ArgumentOutOfRangeError';
9761        Object.setPrototypeOf(_this, ArgumentOutOfRangeError.prototype);
9762        return _this;
9763    }
9764    return ArgumentOutOfRangeError;
9765}(Error));
9766
9767
9768
9769/***/ }),
9770/* 34 */
9771/***/ (function(module, __webpack_exports__, __webpack_require__) {
9772
9773"use strict";
9774/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isFunction; });
9775/** PURE_IMPORTS_START  PURE_IMPORTS_END */
9776function isFunction(x) {
9777    return typeof x === 'function';
9778}
9779
9780
9781/***/ }),
9782/* 35 */
9783/***/ (function(module, __webpack_exports__, __webpack_require__) {
9784
9785"use strict";
9786/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EmptyError; });
9787/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
9788/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
9789
9790var EmptyError = /*@__PURE__*/ (function (_super) {
9791    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](EmptyError, _super);
9792    function EmptyError() {
9793        var _this = _super.call(this, 'no elements in sequence') || this;
9794        _this.name = 'EmptyError';
9795        Object.setPrototypeOf(_this, EmptyError.prototype);
9796        return _this;
9797    }
9798    return EmptyError;
9799}(Error));
9800
9801
9802
9803/***/ }),
9804/* 36 */
9805/***/ (function(module, __webpack_exports__, __webpack_require__) {
9806
9807"use strict";
9808/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncScheduler; });
9809/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
9810/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61);
9811/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
9812
9813
9814var AsyncScheduler = /*@__PURE__*/ (function (_super) {
9815    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](AsyncScheduler, _super);
9816    function AsyncScheduler(SchedulerAction, now) {
9817        if (now === void 0) {
9818            now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__[/* Scheduler */ "a"].now;
9819        }
9820        var _this = _super.call(this, SchedulerAction, function () {
9821            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
9822                return AsyncScheduler.delegate.now();
9823            }
9824            else {
9825                return now();
9826            }
9827        }) || this;
9828        _this.actions = [];
9829        _this.active = false;
9830        _this.scheduled = undefined;
9831        return _this;
9832    }
9833    AsyncScheduler.prototype.schedule = function (work, delay, state) {
9834        if (delay === void 0) {
9835            delay = 0;
9836        }
9837        if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
9838            return AsyncScheduler.delegate.schedule(work, delay, state);
9839        }
9840        else {
9841            return _super.prototype.schedule.call(this, work, delay, state);
9842        }
9843    };
9844    AsyncScheduler.prototype.flush = function (action) {
9845        var actions = this.actions;
9846        if (this.active) {
9847            actions.push(action);
9848            return;
9849        }
9850        var error;
9851        this.active = true;
9852        do {
9853            if (error = action.execute(action.state, action.delay)) {
9854                break;
9855            }
9856        } while (action = actions.shift());
9857        this.active = false;
9858        if (error) {
9859            while (action = actions.shift()) {
9860                action.unsubscribe();
9861            }
9862            throw error;
9863        }
9864    };
9865    return AsyncScheduler;
9866}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__[/* Scheduler */ "a"]));
9867
9868
9869
9870/***/ }),
9871/* 37 */
9872/***/ (function(module, __webpack_exports__, __webpack_require__) {
9873
9874"use strict";
9875/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncSubject; });
9876/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
9877/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
9878/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
9879/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
9880
9881
9882
9883var AsyncSubject = /*@__PURE__*/ (function (_super) {
9884    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](AsyncSubject, _super);
9885    function AsyncSubject() {
9886        var _this = _super !== null && _super.apply(this, arguments) || this;
9887        _this.value = null;
9888        _this.hasNext = false;
9889        _this.hasCompleted = false;
9890        return _this;
9891    }
9892    AsyncSubject.prototype._subscribe = function (subscriber) {
9893        if (this.hasError) {
9894            subscriber.error(this.thrownError);
9895            return _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "a"].EMPTY;
9896        }
9897        else if (this.hasCompleted && this.hasNext) {
9898            subscriber.next(this.value);
9899            subscriber.complete();
9900            return _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "a"].EMPTY;
9901        }
9902        return _super.prototype._subscribe.call(this, subscriber);
9903    };
9904    AsyncSubject.prototype.next = function (value) {
9905        if (!this.hasCompleted) {
9906            this.value = value;
9907            this.hasNext = true;
9908        }
9909    };
9910    AsyncSubject.prototype.error = function (error) {
9911        if (!this.hasCompleted) {
9912            _super.prototype.error.call(this, error);
9913        }
9914    };
9915    AsyncSubject.prototype.complete = function () {
9916        this.hasCompleted = true;
9917        if (this.hasNext) {
9918            _super.prototype.next.call(this, this.value);
9919        }
9920        _super.prototype.complete.call(this);
9921    };
9922    return AsyncSubject;
9923}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]));
9924
9925
9926
9927/***/ }),
9928/* 38 */
9929/***/ (function(module, __webpack_exports__, __webpack_require__) {
9930
9931"use strict";
9932
9933// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
9934var tslib_es6 = __webpack_require__(0);
9935
9936// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js
9937var Subscription = __webpack_require__(5);
9938
9939// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/Action.js
9940/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
9941
9942
9943var Action_Action = /*@__PURE__*/ (function (_super) {
9944    tslib_es6["a" /* __extends */](Action, _super);
9945    function Action(scheduler, work) {
9946        return _super.call(this) || this;
9947    }
9948    Action.prototype.schedule = function (state, delay) {
9949        if (delay === void 0) {
9950            delay = 0;
9951        }
9952        return this;
9953    };
9954    return Action;
9955}(Subscription["a" /* Subscription */]));
9956
9957
9958// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js
9959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncAction_AsyncAction; });
9960/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
9961
9962
9963var AsyncAction_AsyncAction = /*@__PURE__*/ (function (_super) {
9964    tslib_es6["a" /* __extends */](AsyncAction, _super);
9965    function AsyncAction(scheduler, work) {
9966        var _this = _super.call(this, scheduler, work) || this;
9967        _this.scheduler = scheduler;
9968        _this.work = work;
9969        _this.pending = false;
9970        return _this;
9971    }
9972    AsyncAction.prototype.schedule = function (state, delay) {
9973        if (delay === void 0) {
9974            delay = 0;
9975        }
9976        if (this.closed) {
9977            return this;
9978        }
9979        this.state = state;
9980        var id = this.id;
9981        var scheduler = this.scheduler;
9982        if (id != null) {
9983            this.id = this.recycleAsyncId(scheduler, id, delay);
9984        }
9985        this.pending = true;
9986        this.delay = delay;
9987        this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
9988        return this;
9989    };
9990    AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
9991        if (delay === void 0) {
9992            delay = 0;
9993        }
9994        return setInterval(scheduler.flush.bind(scheduler, this), delay);
9995    };
9996    AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
9997        if (delay === void 0) {
9998            delay = 0;
9999        }
10000        if (delay !== null && this.delay === delay && this.pending === false) {
10001            return id;
10002        }
10003        return clearInterval(id) && undefined || undefined;
10004    };
10005    AsyncAction.prototype.execute = function (state, delay) {
10006        if (this.closed) {
10007            return new Error('executing a cancelled action');
10008        }
10009        this.pending = false;
10010        var error = this._execute(state, delay);
10011        if (error) {
10012            return error;
10013        }
10014        else if (this.pending === false && this.id != null) {
10015            this.id = this.recycleAsyncId(this.scheduler, this.id, null);
10016        }
10017    };
10018    AsyncAction.prototype._execute = function (state, delay) {
10019        var errored = false;
10020        var errorValue = undefined;
10021        try {
10022            this.work(state);
10023        }
10024        catch (e) {
10025            errored = true;
10026            errorValue = !!e && e || new Error(e);
10027        }
10028        if (errored) {
10029            this.unsubscribe();
10030            return errorValue;
10031        }
10032    };
10033    AsyncAction.prototype._unsubscribe = function () {
10034        var id = this.id;
10035        var scheduler = this.scheduler;
10036        var actions = scheduler.actions;
10037        var index = actions.indexOf(this);
10038        this.work = null;
10039        this.state = null;
10040        this.pending = false;
10041        this.scheduler = null;
10042        if (index !== -1) {
10043            actions.splice(index, 1);
10044        }
10045        if (id != null) {
10046            this.id = this.recycleAsyncId(scheduler, id, null);
10047        }
10048        this.delay = null;
10049    };
10050    return AsyncAction;
10051}(Action_Action));
10052
10053
10054
10055/***/ }),
10056/* 39 */
10057/***/ (function(module, __webpack_exports__, __webpack_require__) {
10058
10059"use strict";
10060/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isNumeric; });
10061/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
10062/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
10063
10064function isNumeric(val) {
10065    return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__[/* isArray */ "a"])(val) && (val - parseFloat(val) + 1) >= 0;
10066}
10067
10068
10069/***/ }),
10070/* 40 */
10071/***/ (function(module, exports, __webpack_require__) {
10072
10073module.exports = __webpack_require__(111);
10074
10075/***/ }),
10076/* 41 */
10077/***/ (function(module, exports, __webpack_require__) {
10078
10079"use strict";
10080
10081Object.defineProperty(exports, "__esModule", { value: true });
10082var pds_local_storage_1 = __webpack_require__(45);
10083exports.pdsLogger = {
10084    loggerStatus: {},
10085    setLoggerStatus: function (loggerName, showMessages) {
10086        this.loggerStatus[loggerName] = showMessages;
10087        try {
10088            if (showMessages) {
10089                pds_local_storage_1.pdsLocalStorage.setItem('PDS-LOGGER-' + loggerName, 'true');
10090            }
10091            else {
10092                pds_local_storage_1.pdsLocalStorage.removeItem('PDS-LOGGER-' + loggerName);
10093            }
10094        }
10095        catch (e) {
10096        }
10097        return 'Logger "' + loggerName + '" set set to ' + (showMessages ? 'show' : 'hide') + ' messages.\n NOTE: this persists to localStorage';
10098    },
10099    requiresLogger: function (functionName) {
10100        if (this.log[functionName] == null) {
10101            var loggerFunction = function (msg) {
10102                var params = [];
10103                for (var _i = 1; _i < arguments.length; _i++) {
10104                    params[_i - 1] = arguments[_i];
10105                }
10106                if (this.loggerStatus[functionName]) {
10107                    console.log.apply(console, arguments);
10108                }
10109            };
10110            this.log[functionName] = loggerFunction.bind(this);
10111            if (!this.loggerStatus.hasOwnProperty(functionName)) {
10112                this.loggerStatus[functionName] = false;
10113            }
10114        }
10115        return this.log[functionName];
10116    },
10117    prependLogger: function (logFunction, prependString) {
10118        return function () {
10119            var args = Array.from(arguments);
10120            args.unshift(prependString + ' - ');
10121            logFunction.apply(logFunction, args);
10122        };
10123    },
10124    log: function (msg) {
10125        var params = [];
10126        for (var _i = 1; _i < arguments.length; _i++) {
10127            params[_i - 1] = arguments[_i];
10128        }
10129        if (this.loggerStatus.log) {
10130            console.log.apply(console, arguments);
10131        }
10132    },
10133    init: function () {
10134        try {
10135            this.loggerStatus = {};
10136            var pdsLoggerRegex = /^PDS-LOGGER-/;
10137            for (var _i = 0, _a = Object.keys(localStorage); _i < _a.length; _i++) {
10138                var key = _a[_i];
10139                if (pdsLoggerRegex.test(key)) {
10140                    if (pds_local_storage_1.pdsLocalStorage.getUserPersistedBoolean(key)) {
10141                        this.loggerStatus[key.slice(11)] = true;
10142                    }
10143                }
10144            }
10145        }
10146        catch (e) {
10147        }
10148    }
10149};
10150exports.pdsLogger.log = exports.pdsLogger.log.bind(exports.pdsLogger);
10151exports.pdsLogger.init();
10152
10153
10154
10155/***/ }),
10156/* 42 */
10157/***/ (function(module, __webpack_exports__, __webpack_require__) {
10158
10159"use strict";
10160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hostReportError; });
10161/** PURE_IMPORTS_START  PURE_IMPORTS_END */
10162function hostReportError(err) {
10163    setTimeout(function () { throw err; });
10164}
10165
10166
10167/***/ }),
10168/* 43 */
10169/***/ (function(module, __webpack_exports__, __webpack_require__) {
10170
10171"use strict";
10172/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return rxSubscriber; });
10173/* unused harmony export $$rxSubscriber */
10174/** PURE_IMPORTS_START  PURE_IMPORTS_END */
10175var rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function')
10176    ? /*@__PURE__*/ Symbol.for('rxSubscriber')
10177    : '@@rxSubscriber';
10178var $$rxSubscriber = rxSubscriber;
10179
10180
10181/***/ }),
10182/* 44 */
10183/***/ (function(module, exports, __webpack_require__) {
10184
10185"use strict";
10186
10187Object.defineProperty(exports, "__esModule", { value: true });
10188var pds_utils_1 = __webpack_require__(18);
10189var rxjs_1 = __webpack_require__(19);
10190var pds_local_storage_1 = __webpack_require__(45);
10191exports.pdsHttpUtils = {
10192    get: function (url, queryParameters, headers) {
10193        var ajaxOptions = {
10194            headers: headers,
10195            method: 'GET'
10196        };
10197        return request(url, ajaxOptions, queryParameters);
10198    },
10199    post: function (url, data, queryParameters, headers) {
10200        if (headers === void 0) { headers = {}; }
10201        if (headers['content-type'] == null) {
10202            headers['content-type'] = 'application/json';
10203        }
10204        var ajaxOptions = {
10205            headers: headers,
10206            method: 'POST',
10207            data: JSON.stringify(data)
10208        };
10209        return request(url, ajaxOptions, queryParameters);
10210    },
10211    addUCAuthHeader: function (headers) {
10212        headers.Authorization = "Bearer " + pds_local_storage_1.pdsLocalStorage.getItem('auth_token');
10213        return headers;
10214    }
10215};
10216function request(url, settings, queryParameters) {
10217    if (settings === void 0) { settings = {}; }
10218    if (queryParameters != null && Object.keys(queryParameters).length > 0) {
10219        url = addQueryParams(url, queryParameters);
10220    }
10221    return rxjs_1.Observable.create(function (observer) {
10222        settings.success = function (data, xhr, status) {
10223            observer.next({ data: xhr.responseText, status: xhr.status });
10224            observer.complete();
10225        };
10226        settings.error = function (xhr, status) {
10227            observer.error(({ data: xhr.responseText, status: xhr.status }));
10228            observer.complete();
10229        };
10230        pds_utils_1.pdsUtils.ajax(url, settings);
10231    });
10232}
10233function addQueryParams(url, queryParameters) {
10234    if (queryParameters != null) {
10235        var queryParameterKeys = Object.keys(queryParameters);
10236        url += '?';
10237        for (var i = 0; i < queryParameterKeys.length; i++) {
10238            var key = queryParameterKeys[i];
10239            url += (key + '=' + queryParameters[key]);
10240            if (i !== queryParameterKeys.length - 1) {
10241                url += '&';
10242            }
10243        }
10244    }
10245    return url;
10246}
10247
10248
10249
10250/***/ }),
10251/* 45 */
10252/***/ (function(module, exports, __webpack_require__) {
10253
10254"use strict";
10255
10256Object.defineProperty(exports, "__esModule", { value: true });
10257var userPrefix = '';
10258var getPrefixedKey = function (key) {
10259    return userPrefix === '' ? key : userPrefix + "-" + key;
10260};
10261exports.pdsLocalStorage = {
10262    userPrefix: '',
10263    getItem: function (key) {
10264        return localStorage.getItem(key) || undefined;
10265    },
10266    getPersistedBoolean: function (key, defaultResult) {
10267        if (defaultResult === void 0) { defaultResult = false; }
10268        var item = this.getItem(key);
10269        if (item == null) {
10270            return defaultResult;
10271        }
10272        return item === 'true';
10273    },
10274    removeItem: function (key) {
10275        localStorage.removeItem(key);
10276    },
10277    setItem: function (key, value) {
10278        try {
10279            localStorage.setItem(key, value);
10280            return true;
10281        }
10282        catch (err) {
10283            console.error("Browser local storage is not available");
10284            return false;
10285        }
10286    },
10287    getUserItem: function (key) {
10288        return this.getItem(getPrefixedKey(key));
10289    },
10290    getUserPersistedBoolean: function (key, defaultResult) {
10291        if (defaultResult === void 0) { defaultResult = false; }
10292        return this.getPersistedBoolean(getPrefixedKey(key), defaultResult);
10293    },
10294    removeUserItem: function (key) {
10295        this.removeItem(getPrefixedKey(key));
10296    },
10297    setUserItem: function (key, value) {
10298        return this.setItem(getPrefixedKey(key), value);
10299    }
10300};
10301Object.defineProperty(exports.pdsLocalStorage, 'userPrefix', {
10302    get: function () {
10303        return userPrefix;
10304    },
10305    set: function (value) {
10306        userPrefix = value;
10307    }
10308});
10309
10310
10311
10312/***/ }),
10313/* 46 */
10314/***/ (function(module, __webpack_exports__, __webpack_require__) {
10315
10316"use strict";
10317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pipe; });
10318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return pipeFromArray; });
10319/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);
10320/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
10321
10322function pipe() {
10323    var fns = [];
10324    for (var _i = 0; _i < arguments.length; _i++) {
10325        fns[_i] = arguments[_i];
10326    }
10327    return pipeFromArray(fns);
10328}
10329function pipeFromArray(fns) {
10330    if (!fns) {
vendor: 9,721 bytes, lines 10331-10573
10331        return _noop__WEBPACK_IMPORTED_MODULE_0__[/* noop */ "a"];
10332    }
10333    if (fns.length === 1) {
10334        return fns[0];
10335    }
10336    return function piped(input) {
10337        return fns.reduce(function (prev, fn) { return fn(prev); }, input);
10338    };
10339}
10340
10341
10342/***/ }),
10343/* 47 */
10344/***/ (function(module, __webpack_exports__, __webpack_require__) {
10345
10346"use strict";
10347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UnsubscriptionError; });
10348/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
10349/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
10350
10351var UnsubscriptionError = /*@__PURE__*/ (function (_super) {
10352    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](UnsubscriptionError, _super);
10353    function UnsubscriptionError(errors) {
10354        var _this = _super.call(this, errors ?
10355            errors.length + " errors occurred during unsubscription:\n  " + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n  ') : '') || this;
10356        _this.errors = errors;
10357        _this.name = 'UnsubscriptionError';
10358        Object.setPrototypeOf(_this, UnsubscriptionError.prototype);
10359        return _this;
10360    }
10361    return UnsubscriptionError;
10362}(Error));
10363
10364
10365
10366/***/ }),
10367/* 48 */
10368/***/ (function(module, __webpack_exports__, __webpack_require__) {
10369
10370"use strict";
10371/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return refCount; });
10372/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
10373/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
10374/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
10375
10376
10377function refCount() {
10378    return function refCountOperatorFunction(source) {
10379        return source.lift(new RefCountOperator(source));
10380    };
10381}
10382var RefCountOperator = /*@__PURE__*/ (function () {
10383    function RefCountOperator(connectable) {
10384        this.connectable = connectable;
10385    }
10386    RefCountOperator.prototype.call = function (subscriber, source) {
10387        var connectable = this.connectable;
10388        connectable._refCount++;
10389        var refCounter = new RefCountSubscriber(subscriber, connectable);
10390        var subscription = source.subscribe(refCounter);
10391        if (!refCounter.closed) {
10392            refCounter.connection = connectable.connect();
10393        }
10394        return subscription;
10395    };
10396    return RefCountOperator;
10397}());
10398var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
10399    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](RefCountSubscriber, _super);
10400    function RefCountSubscriber(destination, connectable) {
10401        var _this = _super.call(this, destination) || this;
10402        _this.connectable = connectable;
10403        return _this;
10404    }
10405    RefCountSubscriber.prototype._unsubscribe = function () {
10406        var connectable = this.connectable;
10407        if (!connectable) {
10408            this.connection = null;
10409            return;
10410        }
10411        this.connectable = null;
10412        var refCount = connectable._refCount;
10413        if (refCount <= 0) {
10414            this.connection = null;
10415            return;
10416        }
10417        connectable._refCount = refCount - 1;
10418        if (refCount > 1) {
10419            this.connection = null;
10420            return;
10421        }
10422        var connection = this.connection;
10423        var sharedConnection = connectable._connection;
10424        this.connection = null;
10425        if (sharedConnection && (!connection || sharedConnection === connection)) {
10426            sharedConnection.unsubscribe();
10427        }
10428    };
10429    return RefCountSubscriber;
10430}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "a"]));
10431
10432
10433/***/ }),
10434/* 49 */
10435/***/ (function(module, __webpack_exports__, __webpack_require__) {
10436
10437"use strict";
10438/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ReplaySubject; });
10439/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
10440/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
10441/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78);
10442/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
10443/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(72);
10444/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28);
10445/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80);
10446/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
10447
10448
10449
10450
10451
10452
10453
10454var ReplaySubject = /*@__PURE__*/ (function (_super) {
10455    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ReplaySubject, _super);
10456    function ReplaySubject(bufferSize, windowTime, scheduler) {
10457        if (bufferSize === void 0) {
10458            bufferSize = Number.POSITIVE_INFINITY;
10459        }
10460        if (windowTime === void 0) {
10461            windowTime = Number.POSITIVE_INFINITY;
10462        }
10463        var _this = _super.call(this) || this;
10464        _this.scheduler = scheduler;
10465        _this._events = [];
10466        _this._infiniteTimeWindow = false;
10467        _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
10468        _this._windowTime = windowTime < 1 ? 1 : windowTime;
10469        if (windowTime === Number.POSITIVE_INFINITY) {
10470            _this._infiniteTimeWindow = true;
10471            _this.next = _this.nextInfiniteTimeWindow;
10472        }
10473        else {
10474            _this.next = _this.nextTimeWindow;
10475        }
10476        return _this;
10477    }
10478    ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
10479        var _events = this._events;
10480        _events.push(value);
10481        if (_events.length > this._bufferSize) {
10482            _events.shift();
10483        }
10484        _super.prototype.next.call(this, value);
10485    };
10486    ReplaySubject.prototype.nextTimeWindow = function (value) {
10487        this._events.push(new ReplayEvent(this._getNow(), value));
10488        this._trimBufferThenGetEvents();
10489        _super.prototype.next.call(this, value);
10490    };
10491    ReplaySubject.prototype._subscribe = function (subscriber) {
10492        var _infiniteTimeWindow = this._infiniteTimeWindow;
10493        var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
10494        var scheduler = this.scheduler;
10495        var len = _events.length;
10496        var subscription;
10497        if (this.closed) {
10498            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__[/* ObjectUnsubscribedError */ "a"]();
10499        }
10500        else if (this.isStopped || this.hasError) {
10501            subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__[/* Subscription */ "a"].EMPTY;
10502        }
10503        else {
10504            this.observers.push(subscriber);
10505            subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__[/* SubjectSubscription */ "a"](this, subscriber);
10506        }
10507        if (scheduler) {
10508            subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__[/* ObserveOnSubscriber */ "a"](subscriber, scheduler));
10509        }
10510        if (_infiniteTimeWindow) {
10511            for (var i = 0; i < len && !subscriber.closed; i++) {
10512                subscriber.next(_events[i]);
10513            }
10514        }
10515        else {
10516            for (var i = 0; i < len && !subscriber.closed; i++) {
10517                subscriber.next(_events[i].value);
10518            }
10519        }
10520        if (this.hasError) {
10521            subscriber.error(this.thrownError);
10522        }
10523        else if (this.isStopped) {
10524            subscriber.complete();
10525        }
10526        return subscription;
10527    };
10528    ReplaySubject.prototype._getNow = function () {
10529        return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__[/* queue */ "a"]).now();
10530    };
10531    ReplaySubject.prototype._trimBufferThenGetEvents = function () {
10532        var now = this._getNow();
10533        var _bufferSize = this._bufferSize;
10534        var _windowTime = this._windowTime;
10535        var _events = this._events;
10536        var eventsCount = _events.length;
10537        var spliceCount = 0;
10538        while (spliceCount < eventsCount) {
10539            if ((now - _events[spliceCount].time) < _windowTime) {
10540                break;
10541            }
10542            spliceCount++;
10543        }
10544        if (eventsCount > _bufferSize) {
10545            spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
10546        }
10547        if (spliceCount > 0) {
10548            _events.splice(0, spliceCount);
10549        }
10550        return _events;
10551    };
10552    return ReplaySubject;
10553}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]));
10554
10555var ReplayEvent = /*@__PURE__*/ (function () {
10556    function ReplayEvent(time, value) {
10557        this.time = time;
10558        this.value = value;
10559    }
10560    return ReplayEvent;
10561}());
10562
10563
10564/***/ }),
10565/* 50 */
10566/***/ (function(module, __webpack_exports__, __webpack_require__) {
10567
10568"use strict";
10569/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return of; });
10570/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
10571/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
10572/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
10573/* harmony import */ var _scalar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56);
10574/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */
10575
10576
10577
10578
10579function of() {
10580    var args = [];
10581    for (var _i = 0; _i < arguments.length; _i++) {
10582        args[_i] = arguments[_i];
10583    }
10584    var scheduler = args[args.length - 1];
10585    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__[/* isScheduler */ "a"])(scheduler)) {
10586        args.pop();
10587    }
10588    else {
10589        scheduler = undefined;
10590    }
10591    switch (args.length) {
10592        case 0:
10593            return Object(_empty__WEBPACK_IMPORTED_MODULE_2__[/* empty */ "b"])(scheduler);
10594        case 1:
10595            return scheduler ? Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__[/* fromArray */ "a"])(args, scheduler) : Object(_scalar__WEBPACK_IMPORTED_MODULE_3__[/* scalar */ "a"])(args[0]);
10596        default:
10597            return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__[/* fromArray */ "a"])(args, scheduler);
10598    }
10599}
10600
10601
10602/***/ }),
10603/* 51 */
10604/***/ (function(module, __webpack_exports__, __webpack_require__) {
10605
10606"use strict";
10607/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throwError; });
10608/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
10609/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
10610
10611function throwError(error, scheduler) {
10612    if (!scheduler) {
10613        return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return subscriber.error(error); });
10614    }
10615    else {
10616        return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
10617    }
10618}
10619function dispatch(_a) {
10620    var error = _a.error, subscriber = _a.subscriber;
10621    subscriber.error(error);
10622}
10623
10624
10625/***/ }),
10626/* 52 */
10627/***/ (function(module, __webpack_exports__, __webpack_require__) {
10628
10629"use strict";
10630/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return combineLatest; });
10631/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CombineLatestOperator; });
10632/* unused harmony export CombineLatestSubscriber */
10633/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
10634/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
10635/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
10636/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
10637/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
10638/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20);
10639/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
10640
10641
10642
10643
10644
10645
10646var NONE = {};
10647function combineLatest() {
10648    var observables = [];
10649    for (var _i = 0; _i < arguments.length; _i++) {
10650        observables[_i] = arguments[_i];
10651    }
10652    var resultSelector = null;
10653    var scheduler = null;
10654    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__[/* isScheduler */ "a"])(observables[observables.length - 1])) {
10655        scheduler = observables.pop();
10656    }
10657    if (typeof observables[observables.length - 1] === 'function') {
10658        resultSelector = observables.pop();
10659    }
10660    if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__[/* isArray */ "a"])(observables[0])) {
10661        observables = observables[0];
10662    }
10663    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__[/* fromArray */ "a"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
10664}
10665var CombineLatestOperator = /*@__PURE__*/ (function () {
10666    function CombineLatestOperator(resultSelector) {
10667        this.resultSelector = resultSelector;
10668    }
10669    CombineLatestOperator.prototype.call = function (subscriber, source) {
10670        return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
10671    };
10672    return CombineLatestOperator;
10673}());
10674
10675var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
10676    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](CombineLatestSubscriber, _super);
10677    function CombineLatestSubscriber(destination, resultSelector) {
10678        var _this = _super.call(this, destination) || this;
10679        _this.resultSelector = resultSelector;
10680        _this.active = 0;
10681        _this.values = [];
10682        _this.observables = [];
10683        return _this;
10684    }
10685    CombineLatestSubscriber.prototype._next = function (observable) {
10686        this.values.push(NONE);
10687        this.observables.push(observable);
10688    };
10689    CombineLatestSubscriber.prototype._complete = function () {
10690        var observables = this.observables;
10691        var len = observables.length;
10692        if (len === 0) {
10693            this.destination.complete();
10694        }
10695        else {
10696            this.active = len;
10697            this.toRespond = len;
10698            for (var i = 0; i < len; i++) {
10699                var observable = observables[i];
10700                this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__[/* subscribeToResult */ "a"])(this, observable, observable, i));
10701            }
10702        }
10703    };
10704    CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
10705        if ((this.active -= 1) === 0) {
10706            this.destination.complete();
10707        }
10708    };
10709    CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
10710        var values = this.values;
10711        var oldVal = values[outerIndex];
10712        var toRespond = !this.toRespond
10713            ? 0
10714            : oldVal === NONE ? --this.toRespond : this.toRespond;
10715        values[outerIndex] = innerValue;
10716        if (toRespond === 0) {
10717            if (this.resultSelector) {
10718                this._tryResultSelector(values);
10719            }
10720            else {
10721                this.destination.next(values.slice());
10722            }
10723        }
10724    };
10725    CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
10726        var result;
10727        try {
10728            result = this.resultSelector.apply(this, values);
10729        }
10730        catch (err) {
10731            this.destination.error(err);
10732            return;
10733        }
10734        this.destination.next(result);
10735    };
10736    return CombineLatestSubscriber;
10737}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* OuterSubscriber */ "a"]));
10738
10739
10740
10741/***/ }),
10742/* 53 */
10743/***/ (function(module, __webpack_exports__, __webpack_require__) {
10744
10745"use strict";
10746/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mergeAll; });
10747/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
10748/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
10749/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
10750
10751
10752function mergeAll(concurrent) {
10753    if (concurrent === void 0) {
10754        concurrent = Number.POSITIVE_INFINITY;
10755    }
10756    return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__[/* mergeMap */ "a"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__[/* identity */ "a"], concurrent);
10757}
10758
10759
10760/***/ }),
10761/* 54 */
10762/***/ (function(module, __webpack_exports__, __webpack_require__) {
10763
10764"use strict";
10765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defer; });
10766/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
10767/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
10768/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
10769/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
10770
10771
10772
10773function defer(observableFactory) {
10774    return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) {
10775        var input;
10776        try {
10777            input = observableFactory();
10778        }
10779        catch (err) {
10780            subscriber.error(err);
10781            return undefined;
10782        }
10783        var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__[/* from */ "a"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__[/* empty */ "b"])();
10784        return source.subscribe(subscriber);
10785    });
10786}
10787
10788
10789/***/ }),
10790/* 55 */
10791/***/ (function(module, __webpack_exports__, __webpack_require__) {
10792
10793"use strict";
10794/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return zip; });
10795/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ZipOperator; });
10796/* unused harmony export ZipSubscriber */
10797/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
10798/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
10799/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
10800/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
10801/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
10802/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
10803/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25);
10804/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
10805
10806
10807
10808
10809
10810
10811
10812function zip() {
10813    var observables = [];
10814    for (var _i = 0; _i < arguments.length; _i++) {
10815        observables[_i] = arguments[_i];
10816    }
10817    var resultSelector = observables[observables.length - 1];
10818    if (typeof resultSelector === 'function') {
10819        observables.pop();
10820    }
10821    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__[/* fromArray */ "a"])(observables, undefined).lift(new ZipOperator(resultSelector));
10822}
10823var ZipOperator = /*@__PURE__*/ (function () {
10824    function ZipOperator(resultSelector) {
10825        this.resultSelector = resultSelector;
10826    }
10827    ZipOperator.prototype.call = function (subscriber, source) {
10828        return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
10829    };
10830    return ZipOperator;
10831}());
10832
10833var ZipSubscriber = /*@__PURE__*/ (function (_super) {
10834    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ZipSubscriber, _super);
10835    function ZipSubscriber(destination, resultSelector, values) {
10836        if (values === void 0) {
10837            values = Object.create(null);
10838        }
10839        var _this = _super.call(this, destination) || this;
10840        _this.iterators = [];
10841        _this.active = 0;
10842        _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
10843        _this.values = values;
10844        return _this;
10845    }
10846    ZipSubscriber.prototype._next = function (value) {
10847        var iterators = this.iterators;
10848        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__[/* isArray */ "a"])(value)) {
10849            iterators.push(new StaticArrayIterator(value));
10850        }
10851        else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__[/* iterator */ "a"]] === 'function') {
10852            iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__[/* iterator */ "a"]]()));
10853        }
10854        else {
10855            iterators.push(new ZipBufferIterator(this.destination, this, value));
10856        }
10857    };
10858    ZipSubscriber.prototype._complete = function () {
10859        var iterators = this.iterators;
10860        var len = iterators.length;
10861        if (len === 0) {
10862            this.destination.complete();
10863            return;
10864        }
10865        this.active = len;
10866        for (var i = 0; i < len; i++) {
10867            var iterator = iterators[i];
10868            if (iterator.stillUnsubscribed) {
10869                this.add(iterator.subscribe(iterator, i));
10870            }
10871            else {
10872                this.active--;
10873            }
10874        }
10875    };
10876    ZipSubscriber.prototype.notifyInactive = function () {
10877        this.active--;
10878        if (this.active === 0) {
10879            this.destination.complete();
10880        }
10881    };
10882    ZipSubscriber.prototype.checkIterators = function () {
10883        var iterators = this.iterators;
10884        var len = iterators.length;
10885        var destination = this.destination;
10886        for (var i = 0; i < len; i++) {
10887            var iterator = iterators[i];
10888            if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
10889                return;
10890            }
10891        }
10892        var shouldComplete = false;
10893        var args = [];
10894        for (var i = 0; i < len; i++) {
10895            var iterator = iterators[i];
10896            var result = iterator.next();
10897            if (iterator.hasCompleted()) {
10898                shouldComplete = true;
10899            }
10900            if (result.done) {
10901                destination.complete();
10902                return;
10903            }
10904            args.push(result.value);
10905        }
10906        if (this.resultSelector) {
10907            this._tryresultSelector(args);
10908        }
10909        else {
10910            destination.next(args);
10911        }
10912        if (shouldComplete) {
10913            destination.complete();
10914        }
10915    };
10916    ZipSubscriber.prototype._tryresultSelector = function (args) {
10917        var result;
10918        try {
10919            result = this.resultSelector.apply(this, args);
10920        }
10921        catch (err) {
10922            this.destination.error(err);
10923            return;
10924        }
10925        this.destination.next(result);
10926    };
10927    return ZipSubscriber;
10928}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__[/* Subscriber */ "a"]));
10929
10930var StaticIterator = /*@__PURE__*/ (function () {
10931    function StaticIterator(iterator) {
10932        this.iterator = iterator;
10933        this.nextResult = iterator.next();
10934    }
10935    StaticIterator.prototype.hasValue = function () {
10936        return true;
10937    };
10938    StaticIterator.prototype.next = function () {
10939        var result = this.nextResult;
10940        this.nextResult = this.iterator.next();
10941        return result;
10942    };
10943    StaticIterator.prototype.hasCompleted = function () {
10944        var nextResult = this.nextResult;
10945        return nextResult && nextResult.done;
10946    };
10947    return StaticIterator;
10948}());
10949var StaticArrayIterator = /*@__PURE__*/ (function () {
10950    function StaticArrayIterator(array) {
10951        this.array = array;
10952        this.index = 0;
10953        this.length = 0;
10954        this.length = array.length;
10955    }
10956    StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__[/* iterator */ "a"]] = function () {
10957        return this;
10958    };
10959    StaticArrayIterator.prototype.next = function (value) {
10960        var i = this.index++;
10961        var array = this.array;
10962        return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
10963    };
10964    StaticArrayIterator.prototype.hasValue = function () {
10965        return this.array.length > this.index;
10966    };
10967    StaticArrayIterator.prototype.hasCompleted = function () {
10968        return this.array.length === this.index;
10969    };
10970    return StaticArrayIterator;
10971}());
10972var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
10973    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ZipBufferIterator, _super);
10974    function ZipBufferIterator(destination, parent, observable) {
10975        var _this = _super.call(this, destination) || this;
10976        _this.parent = parent;
10977        _this.observable = observable;
10978        _this.stillUnsubscribed = true;
10979        _this.buffer = [];
10980        _this.isComplete = false;
10981        return _this;
10982    }
10983    ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__[/* iterator */ "a"]] = function () {
10984        return this;
10985    };
10986    ZipBufferIterator.prototype.next = function () {
10987        var buffer = this.buffer;
10988        if (buffer.length === 0 && this.isComplete) {
10989            return { value: null, done: true };
10990        }
10991        else {
10992            return { value: buffer.shift(), done: false };
10993        }
10994    };
10995    ZipBufferIterator.prototype.hasValue = function () {
10996        return this.buffer.length > 0;
10997    };
10998    ZipBufferIterator.prototype.hasCompleted = function () {
10999        return this.buffer.length === 0 && this.isComplete;
11000    };
11001    ZipBufferIterator.prototype.notifyComplete = function () {
11002        if (this.buffer.length > 0) {
11003            this.isComplete = true;
11004            this.parent.notifyInactive();
11005        }
11006        else {
11007            this.destination.complete();
11008        }
11009    };
11010    ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
11011        this.buffer.push(innerValue);
11012        this.parent.checkIterators();
11013    };
11014    ZipBufferIterator.prototype.subscribe = function (value, index) {
11015        return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__[/* subscribeToResult */ "a"])(this, this.observable, this, index);
11016    };
11017    return ZipBufferIterator;
11018}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__[/* OuterSubscriber */ "a"]));
11019
11020
11021/***/ }),
11022/* 56 */
11023/***/ (function(module, __webpack_exports__, __webpack_require__) {
11024
11025"use strict";
11026/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scalar; });
11027/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
11028/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
11029
11030function scalar(value) {
11031    var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) {
11032        subscriber.next(value);
11033        subscriber.complete();
11034    });
11035    result._isScalar = true;
11036    result.value = value;
11037    return result;
11038}
11039
11040
11041/***/ }),
11042/* 57 */
11043/***/ (function(module, __webpack_exports__, __webpack_require__) {
11044
11045"use strict";
11046
11047// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
11048var tslib_es6 = __webpack_require__(0);
11049
11050// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/Immediate.js
11051/** PURE_IMPORTS_START  PURE_IMPORTS_END */
11052var nextHandle = 1;
11053var tasksByHandle = {};
11054function runIfPresent(handle) {
11055    var cb = tasksByHandle[handle];
11056    if (cb) {
11057        cb();
11058    }
11059}
11060var Immediate = {
11061    setImmediate: function (cb) {
11062        var handle = nextHandle++;
11063        tasksByHandle[handle] = cb;
11064        Promise.resolve().then(function () { return runIfPresent(handle); });
11065        return handle;
11066    },
11067    clearImmediate: function (handle) {
11068        delete tasksByHandle[handle];
11069    },
11070};
11071
11072// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js + 1 modules
11073var AsyncAction = __webpack_require__(38);
11074
11075// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js
11076/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
11077
11078
11079
11080var AsapAction_AsapAction = /*@__PURE__*/ (function (_super) {
11081    tslib_es6["a" /* __extends */](AsapAction, _super);
11082    function AsapAction(scheduler, work) {
11083        var _this = _super.call(this, scheduler, work) || this;
11084        _this.scheduler = scheduler;
11085        _this.work = work;
11086        return _this;
11087    }
11088    AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
11089        if (delay === void 0) {
11090            delay = 0;
11091        }
11092        if (delay !== null && delay > 0) {
11093            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
11094        }
11095        scheduler.actions.push(this);
11096        return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));
11097    };
11098    AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
11099        if (delay === void 0) {
11100            delay = 0;
11101        }
11102        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
11103            return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
11104        }
11105        if (scheduler.actions.length === 0) {
11106            Immediate.clearImmediate(id);
11107            scheduler.scheduled = undefined;
11108        }
11109        return undefined;
11110    };
11111    return AsapAction;
11112}(AsyncAction["a" /* AsyncAction */]));
11113
11114
11115// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js
11116var AsyncScheduler = __webpack_require__(36);
11117
11118// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js
11119/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
11120
11121
11122var AsapScheduler_AsapScheduler = /*@__PURE__*/ (function (_super) {
11123    tslib_es6["a" /* __extends */](AsapScheduler, _super);
11124    function AsapScheduler() {
11125        return _super !== null && _super.apply(this, arguments) || this;
11126    }
11127    AsapScheduler.prototype.flush = function (action) {
11128        this.active = true;
11129        this.scheduled = undefined;
11130        var actions = this.actions;
11131        var error;
11132        var index = -1;
11133        var count = actions.length;
11134        action = action || actions.shift();
11135        do {
11136            if (error = action.execute(action.state, action.delay)) {
11137                break;
11138            }
11139        } while (++index < count && (action = actions.shift()));
11140        this.active = false;
11141        if (error) {
11142            while (++index < count && (action = actions.shift())) {
11143                action.unsubscribe();
11144            }
11145            throw error;
11146        }
11147    };
11148    return AsapScheduler;
11149}(AsyncScheduler["a" /* AsyncScheduler */]));
11150
11151
11152// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/asap.js
11153/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asap; });
11154/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
11155
11156
11157var asap = /*@__PURE__*/ new AsapScheduler_AsapScheduler(AsapAction_AsapAction);
11158
11159
11160/***/ }),
11161/* 58 */
11162/***/ (function(module, __webpack_exports__, __webpack_require__) {
11163
11164"use strict";
11165/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; });
11166/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
11167/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42);
11168/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
11169
11170
11171var empty = {
11172    closed: true,
11173    next: function (value) { },
11174    error: function (err) {
11175        if (_config__WEBPACK_IMPORTED_MODULE_0__[/* config */ "a"].useDeprecatedSynchronousErrorHandling) {
11176            throw err;
11177        }
11178        else {
11179            Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__[/* hostReportError */ "a"])(err);
11180        }
11181    },
11182    complete: function () { }
11183};
11184
11185
11186/***/ }),
11187/* 59 */
11188/***/ (function(module, exports, __webpack_require__) {
11189
11190"use strict";
11191
11192Object.defineProperty(exports, "__esModule", { value: true });
11193var NotificationItem = (function () {
11194    function NotificationItem(type, isSeen, isRead, aggregationKey, subtype) {
11195        if (isSeen === void 0) { isSeen = false; }
11196        if (isRead === void 0) { isRead = false; }
11197        if (aggregationKey === void 0) { aggregationKey = ''; }
11198        this.type = type;
11199        this.isSeen = isSeen;
11200        this.isRead = isRead;
11201        this.aggregationKey = aggregationKey;
11202        this.subtype = subtype;
11203        this.isMarkedReadOnClick = true;
11204    }
11205    NotificationItem.prototype.getPostedAt = function () {
11206        return null;
11207    };
11208    NotificationItem.prototype.getColorClass = function () {
11209        return null;
11210    };
11211    NotificationItem.prototype.getSource = function () {
11212        return null;
11213    };
11214    NotificationItem.prototype.getTitle = function () {
11215        return this.type;
11216    };
11217    NotificationItem.prototype.getSubtitle = function () {
11218        return null;
11219    };
11220    NotificationItem.prototype.getUserType = function () {
11221        return null;
11222    };
11223    NotificationItem.prototype.getTooltip = function () {
11224        return null;
11225    };
11226    NotificationItem.prototype.getTooltipForSubtitle = function () {
11227        return null;
11228    };
11229    NotificationItem.prototype.getSenderUid = function () {
11230        return null;
11231    };
11232    NotificationItem.prototype.getRequiresAction = function () {
11233        return false;
11234    };
11235    NotificationItem.prototype.getAggregationKey = function () {
11236        if (this.aggregationKey != null && this.aggregationKey.length > 0) {
11237            var parsedKey = JSON.parse(this.aggregationKey);
11238            parsedKey.type = this.type;
11239            return JSON.stringify(parsedKey);
11240        }
11241        return JSON.stringify({
11242            type: this.type
11243        });
11244    };
11245    Object.defineProperty(NotificationItem.prototype, "lookUpKey", {
11246        get: function () {
11247            return '';
11248        },
11249        enumerable: true,
11250        configurable: true
11251    });
11252    return NotificationItem;
11253}());
11254exports.NotificationItem = NotificationItem;
11255
11256
11257
11258/***/ }),
11259/* 60 */
11260/***/ (function(module, exports, __webpack_require__) {
11261
11262"use strict";
11263
11264Object.defineProperty(exports, "__esModule", { value: true });
11265var rxjs_1 = __webpack_require__(19);
11266var NotificationService = (function () {
11267    function NotificationService(setup) {
11268        this.notificationStream = new rxjs_1.Subject();
11269    }
11270    return NotificationService;
11271}());
11272exports.NotificationService = NotificationService;
11273
11274
11275
11276/***/ }),
11277/* 61 */
11278/***/ (function(module, __webpack_exports__, __webpack_require__) {
11279
11280"use strict";
11281/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scheduler; });
11282var Scheduler = /*@__PURE__*/ (function () {
11283    function Scheduler(SchedulerAction, now) {
11284        if (now === void 0) {
11285            now = Scheduler.now;
11286        }
11287        this.SchedulerAction = SchedulerAction;
11288        this.now = now;
11289    }
11290    Scheduler.prototype.schedule = function (work, delay, state) {
11291        if (delay === void 0) {
11292            delay = 0;
11293        }
11294        return new this.SchedulerAction(this, work).schedule(state, delay);
11295    };
11296    Scheduler.now = function () { return Date.now(); };
11297    return Scheduler;
11298}());
11299
11300
11301
11302/***/ }),
11303/* 62 */
11304/***/ (function(module, exports, __webpack_require__) {
11305
11306"use strict";
11307
11308var DateUtil;
11309(function (DateUtil) {
11310    function compareDates(date1, date2) {
11311        if (date1 < date2) {
11312            return -1;
11313        }
11314        else if (date1 > date2) {
11315            return 1;
11316        }
11317        return 0;
11318    }
11319    DateUtil.compareDates = compareDates;
11320    function isBefore(date1, date2) {
11321        return compareDates(date1, date2) === -1;
11322    }
11323    DateUtil.isBefore = isBefore;
11324    function isAfter(date1, date2) {
11325        return compareDates(date1, date2) === 1;
11326    }
11327    DateUtil.isAfter = isAfter;
11328    /**
11329     * dateRangeIsContained - returns true if the first date range is completely contained by the second date range.
11330     * @param startDate - the start of the first date range
11331     * @param endDate - the end of the first date range
11332     * @param otherStartDate - the start of the date range that might contain the first date range
11333     * @param otherEndDate - the end of the date range that might contain the first date range
11334     * @returns {boolean}
11335     */
11336    function dateRangeIsContained(startDate, endDate, otherStartDate, otherEndDate) {
11337        return compareDates(startDate, otherStartDate) >= 0 && compareDates(endDate, otherEndDate) <= 0;
11338    }
11339    DateUtil.dateRangeIsContained = dateRangeIsContained;
11340})(DateUtil = exports.DateUtil || (exports.DateUtil = {}));
11341
11342
11343
11344/***/ }),
11345/* 63 */
11346/***/ (function(module, exports, __webpack_require__) {
11347
11348"use strict";
11349
11350var NumberUtil;
11351(function (NumberUtil) {
11352    function compareNumbers(number1, number2) {
11353        if (number1 < number2) {
11354            return -1;
11355        }
11356        else if (number1 > number2) {
11357            return 1;
11358        }
11359        return 0;
11360    }
11361    NumberUtil.compareNumbers = compareNumbers;
11362    function isNumber(num) {
11363        return num != null && !isNaN(num);
11364    }
11365    NumberUtil.isNumber = isNumber;
11366    function round(num, decimalPlaces) {
11367        if (num == null || decimalPlaces == null) {
11368            return num;
11369        }
11370        //http://www.jacklmoore.com/notes/rounding-in-javascript/
11371        return Number(Math.round((num + 'e' + decimalPlaces)) + 'e-' + decimalPlaces);
11372    }
11373    NumberUtil.round = round;
11374    function roundToPrecision(value, lowDecimals, highDecimals, useLow) {
11375        return round(value, useLow ? lowDecimals : highDecimals);
11376    }
11377    NumberUtil.roundToPrecision = roundToPrecision;
11378})(NumberUtil = exports.NumberUtil || (exports.NumberUtil = {}));
11379
11380
11381
11382/***/ }),
11383/* 64 */
11384/***/ (function(module, exports, __webpack_require__) {
11385
11386"use strict";
11387
11388var StringUtil;
11389(function (StringUtil) {
11390    function defaultString(value) {
11391        return value != null ? value : '';
11392    }
11393    StringUtil.defaultString = defaultString;
11394    function compareStrings(string1, string2) {
11395        if (string1 != null && string2 == null) {
11396            return -1;
11397        }
11398        else if (string1 == null && string2 != null) {
11399            return 1;
11400        }
11401        else if (string1 == null && string2 == null) {
11402            return 0;
11403        }
11404        return string1.localeCompare(string2);
11405    }
11406    StringUtil.compareStrings = compareStrings;
11407    function compareStringsIgnoreCase(string1, string2) {
11408        return this.compareStrings(string1.toLowerCase(), string2.toLowerCase());
11409    }
11410    StringUtil.compareStringsIgnoreCase = compareStringsIgnoreCase;
11411    StringUtil.ESCAPE_EXCLUDE_CHARS_REGEX = /[\-\^\*\\\]]/g;
11412    function scrubStringForFileName(value) {
11413        return value.replace(/[^a-z0-9]/gi, '_').toLowerCase();
11414    }
11415    StringUtil.scrubStringForFileName = scrubStringForFileName;
11416})(StringUtil = exports.StringUtil || (exports.StringUtil = {}));
11417
11418
11419
11420/***/ }),
11421/* 65 */
11422/***/ (function(module, exports, __webpack_require__) {
11423
11424"use strict";
11425
11426Object.defineProperty(exports, "__esModule", { value: true });
11427var pds_i18n_1 = __webpack_require__(15);
11428var MS_IN_DAY = 86400000;
11429var idx = 0;
11430var NotificationItemGroup = (function () {
11431    function NotificationItemGroup(type, aggregationKey, isMarkedReadOnClick, isRead, isSeen) {
11432        if (isRead === void 0) { isRead = true; }
11433        if (isSeen === void 0) { isSeen = true; }
11434        this.type = type;
11435        this.aggregationKey = aggregationKey;
11436        this.isMarkedReadOnClick = isMarkedReadOnClick;
11437        this.isRead = isRead;
11438        this.isSeen = isSeen;
11439        this.notifications = [];
11440        this.unreadNotificationCount = 0;
11441        this.unseenNotificationCount = 0;
11442        this.id = String(idx++);
11443    }
11444    NotificationItemGroup.compare = function (grp1, grp2) {
11445        if (grp1.mostRecentPostedAt != null && grp2.mostRecentPostedAt == null) {
11446            return -1;
11447        }
11448        else if (grp1.mostRecentPostedAt == null && grp2.mostRecentPostedAt != null) {
11449            return 1;
11450        }
11451        else if (grp1.mostRecentPostedAt == null && grp2.mostRecentPostedAt == null) {
11452            return 0;
11453        }
11454        else {
11455            return grp2.mostRecentPostedAt.getTime() - grp1.mostRecentPostedAt.getTime();
11456        }
11457    };
11458    NotificationItemGroup.prototype.addNotification = function (notification) {
11459        var title = notification.getTitle();
11460        if (this.notifications.length === 0) {
11461            this.title = title;
11462        }
11463        else if (this.title != null && this.title.indexOf(title) === -1) {
11464            this.title += ', ' + title;
11465        }
11466        var toolTipText = notification.getTooltip();
11467        if (this.tooltip == null) {
11468            this.tooltip = toolTipText;
11469        }
11470        var subtitle = notification.getSubtitle();
11471        if (!this.subtitle) {
11472            this.subtitle = subtitle;
11473        }
11474        var userType = notification.getUserType();
11475        if (!this.userType) {
11476            this.userType = userType;
11477        }
11478        if (this.senderUid == null) {
11479            this.senderUid = notification.getSenderUid();
11480        }
11481        var postedAt = notification.getPostedAt();
11482        if (postedAt != null && (this.mostRecentPostedAt == null || (postedAt.getTime() > this.mostRecentPostedAt.getTime()))) {
11483            this.senderUid = notification.getSenderUid();
11484            this.mostRecentPostedAt = postedAt;
11485            this.tooltip = toolTipText;
11486            this.postedAtUXFormat = pds_i18n_1.pdsI18n.formatDate(postedAt, 'DATE_TIME_PRETTY');
11487        }
11488        this.notifications.push(notification);
11489        if (!notification.isSeen) {
11490            this.isSeen = false;
11491            this.unseenNotificationCount++;
11492        }
11493        if (!notification.isRead) {
11494            this.isRead = false;
11495            this.unreadNotificationCount++;
11496        }
11497        if (!this.colorClass) {
11498            this.colorClass = notification.getColorClass();
11499        }
11500        this.requiresAction = this.requiresAction || notification.getRequiresAction();
11501    };
11502    NotificationItemGroup.prototype.markAsSeen = function () {
11503        for (var _i = 0, _a = this.notifications; _i < _a.length; _i++) {
11504            var notification = _a[_i];
11505            notification.isSeen = true;
11506        }
11507        this.unseenNotificationCount = 0;
11508        this.isSeen = true;
11509    };
11510    NotificationItemGroup.prototype.markAsRead = function () {
11511        for (var _i = 0, _a = this.notifications; _i < _a.length; _i++) {
11512            var notification = _a[_i];
11513            notification.isRead = true;
11514        }
11515        this.unreadNotificationCount = 0;
11516        this.isRead = true;
11517    };
11518    NotificationItemGroup.prototype.getUnreadNotifications = function () {
11519        return this.notifications.filter(function (notification) { return !notification.isRead; });
11520    };
11521    Object.defineProperty(NotificationItemGroup.prototype, "lookUpKey", {
11522        get: function () {
11523            if (this.notifications.length > 0) {
11524                return this.notifications[0].lookUpKey;
11525            }
11526            return '';
11527        },
11528        enumerable: true,
11529        configurable: true
11530    });
11531    NotificationItemGroup.prototype.markReadWhere = function (lookUpFunction) {
11532        var notificationsToMark = this.notifications.filter(lookUpFunction);
11533        for (var _i = 0, notificationsToMark_1 = notificationsToMark; _i < notificationsToMark_1.length; _i++) {
11534            var notification = notificationsToMark_1[_i];
11535            notification.isRead = true;
11536            this.unreadNotificationCount -= 1;
11537        }
11538        return notificationsToMark;
11539    };
11540    return NotificationItemGroup;
11541}());
11542exports.NotificationItemGroup = NotificationItemGroup;
11543
11544
11545
11546/***/ }),
11547/* 66 */
11548/***/ (function(module, __webpack_exports__, __webpack_require__) {
11549
11550"use strict";
11551/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return groupBy; });
11552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GroupedObservable; });
11553/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
11554/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
11555/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
11556/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
11557/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
11558/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
11559
11560
11561
11562
11563
11564function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
11565    return function (source) {
11566        return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
11567    };
11568}
11569var GroupByOperator = /*@__PURE__*/ (function () {
11570    function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
11571        this.keySelector = keySelector;
11572        this.elementSelector = elementSelector;
11573        this.durationSelector = durationSelector;
11574        this.subjectSelector = subjectSelector;
11575    }
11576    GroupByOperator.prototype.call = function (subscriber, source) {
11577        return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
11578    };
11579    return GroupByOperator;
11580}());
11581var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
11582    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](GroupBySubscriber, _super);
11583    function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
11584        var _this = _super.call(this, destination) || this;
11585        _this.keySelector = keySelector;
11586        _this.elementSelector = elementSelector;
11587        _this.durationSelector = durationSelector;
11588        _this.subjectSelector = subjectSelector;
11589        _this.groups = null;
11590        _this.attemptedToUnsubscribe = false;
11591        _this.count = 0;
11592        return _this;
11593    }
11594    GroupBySubscriber.prototype._next = function (value) {
11595        var key;
11596        try {
11597            key = this.keySelector(value);
11598        }
11599        catch (err) {
11600            this.error(err);
11601            return;
11602        }
11603        this._group(value, key);
11604    };
11605    GroupBySubscriber.prototype._group = function (value, key) {
11606        var groups = this.groups;
11607        if (!groups) {
11608            groups = this.groups = new Map();
11609        }
11610        var group = groups.get(key);
11611        var element;
11612        if (this.elementSelector) {
11613            try {
11614                element = this.elementSelector(value);
11615            }
11616            catch (err) {
11617                this.error(err);
11618            }
11619        }
11620        else {
11621            element = value;
11622        }
11623        if (!group) {
11624            group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__[/* Subject */ "a"]());
11625            groups.set(key, group);
11626            var groupedObservable = new GroupedObservable(key, group, this);
11627            this.destination.next(groupedObservable);
11628            if (this.durationSelector) {
11629                var duration = void 0;
11630                try {
11631                    duration = this.durationSelector(new GroupedObservable(key, group));
11632                }
11633                catch (err) {
11634                    this.error(err);
11635                    return;
11636                }
11637                this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
11638            }
11639        }
11640        if (!group.closed) {
11641            group.next(element);
11642        }
11643    };
11644    GroupBySubscriber.prototype._error = function (err) {
11645        var groups = this.groups;
11646        if (groups) {
11647            groups.forEach(function (group, key) {
11648                group.error(err);
11649            });
11650            groups.clear();
11651        }
11652        this.destination.error(err);
11653    };
11654    GroupBySubscriber.prototype._complete = function () {
11655        var groups = this.groups;
11656        if (groups) {
11657            groups.forEach(function (group, key) {
11658                group.complete();
11659            });
11660            groups.clear();
11661        }
11662        this.destination.complete();
11663    };
11664    GroupBySubscriber.prototype.removeGroup = function (key) {
11665        this.groups.delete(key);
11666    };
11667    GroupBySubscriber.prototype.unsubscribe = function () {
11668        if (!this.closed) {
11669            this.attemptedToUnsubscribe = true;
11670            if (this.count === 0) {
11671                _super.prototype.unsubscribe.call(this);
11672            }
11673        }
11674    };
11675    return GroupBySubscriber;
11676}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "a"]));
11677var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
11678    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](GroupDurationSubscriber, _super);
11679    function GroupDurationSubscriber(key, group, parent) {
11680        var _this = _super.call(this, group) || this;
11681        _this.key = key;
11682        _this.group = group;
11683        _this.parent = parent;
11684        return _this;
11685    }
11686    GroupDurationSubscriber.prototype._next = function (value) {
11687        this.complete();
11688    };
11689    GroupDurationSubscriber.prototype._unsubscribe = function () {
11690        var _a = this, parent = _a.parent, key = _a.key;
11691        this.key = this.parent = null;
11692        if (parent) {
11693            parent.removeGroup(key);
11694        }
11695    };
11696    return GroupDurationSubscriber;
11697}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "a"]));
11698var GroupedObservable = /*@__PURE__*/ (function (_super) {
11699    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](GroupedObservable, _super);
11700    function GroupedObservable(key, groupSubject, refCountSubscription) {
11701        var _this = _super.call(this) || this;
11702        _this.key = key;
11703        _this.groupSubject = groupSubject;
11704        _this.refCountSubscription = refCountSubscription;
11705        return _this;
11706    }
11707    GroupedObservable.prototype._subscribe = function (subscriber) {
11708        var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "a"]();
11709        var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
11710        if (refCountSubscription && !refCountSubscription.closed) {
11711            subscription.add(new InnerRefCountSubscription(refCountSubscription));
11712        }
11713        subscription.add(groupSubject.subscribe(subscriber));
11714        return subscription;
11715    };
11716    return GroupedObservable;
11717}(_Observable__WEBPACK_IMPORTED_MODULE_3__[/* Observable */ "a"]));
11718
11719var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
11720    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](InnerRefCountSubscription, _super);
11721    function InnerRefCountSubscription(parent) {
11722        var _this = _super.call(this) || this;
11723        _this.parent = parent;
11724        parent.count++;
11725        return _this;
11726    }
11727    InnerRefCountSubscription.prototype.unsubscribe = function () {
11728        var parent = this.parent;
11729        if (!parent.closed && !this.closed) {
11730            _super.prototype.unsubscribe.call(this);
11731            parent.count -= 1;
11732            if (parent.count === 0 && parent.attemptedToUnsubscribe) {
11733                parent.unsubscribe();
11734            }
11735        }
11736    };
11737    return InnerRefCountSubscription;
11738}(_Subscription__WEBPACK_IMPORTED_MODULE_2__[/* Subscription */ "a"]));
11739
11740
11741/***/ }),
11742/* 67 */
11743/***/ (function(module, exports, __webpack_require__) {
11744
11745"use strict";
11746
11747var __extends = (this && this.__extends) || (function () {
11748    var extendStatics = function (d, b) {
11749        extendStatics = Object.setPrototypeOf ||
11750            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11751            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11752        return extendStatics(d, b);
11753    }
11754    return function (d, b) {
11755        extendStatics(d, b);
11756        function __() { this.constructor = d; }
11757        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11758    };
11759})();
11760Object.defineProperty(exports, "__esModule", { value: true });
11761var notification_item_1 = __webpack_require__(59);
11762var pds_utils_1 = __webpack_require__(18);
11763var ActivityFeedNotificationItem = (function (_super) {
11764    __extends(ActivityFeedNotificationItem, _super);
11765    function ActivityFeedNotificationItem(isSeen, isRead, context) {
11766        var _this = _super.call(this, ActivityFeedNotificationItem.NOTIFICATION_TYPE, isSeen, isRead) || this;
11767        _this.context = context;
11768        _this.id = _this.context.activityId;
11769        _this.feedName = _this.context.feedName;
11770        _this.aggregationKey = JSON.stringify({
11771            sectionUid: _this.context.section.uid
11772        });
11773        return _this;
11774    }
11775    ActivityFeedNotificationItem.generateLookUpKey = function (sectionUid) {
11776        return [sectionUid, ActivityFeedNotificationItem.NOTIFICATION_TYPE].join(',');
11777    };
11778    ActivityFeedNotificationItem.prototype.getColorClass = function () {
11779        return pds_utils_1.pdsUtils.getSectionColorForClass(this.context.section);
11780    };
11781    ActivityFeedNotificationItem.prototype.getSource = function () {
11782        return this.context.activitySenderName;
11783    };
11784    ActivityFeedNotificationItem.prototype.getTitle = function () {
11785        if (this.context.userType === 'TEACHER') {
11786            var secondaryDisplay = this.context.section.secondaryDisplay || '';
11787            secondaryDisplay = secondaryDisplay.length > 15 ? (secondaryDisplay.slice(0, 15) + '...') : secondaryDisplay;
11788            return "" + (secondaryDisplay.length > 0 ? secondaryDisplay + ' ' : '') + this.context.section.primaryDisplay;
11789        }
11790        return "" + this.context.section.primaryDisplay;
11791    };
11792    ActivityFeedNotificationItem.prototype.getSubtitle = function () {
11793        if (this.context.userType !== 'PARENT' || this.context.students == null) {
11794            return '';
11795        }
11796        return this.context.students.map(function (student) {
11797            return student.firstName + " " + student.lastName;
11798        }).join(',');
11799    };
11800    ActivityFeedNotificationItem.prototype.getTooltip = function () {
11801        return this.context.activitySenderName + "\n" + this.context.section.secondaryDisplay + " " + this.context.section.primaryDisplay;
11802    };
11803    ActivityFeedNotificationItem.prototype.getPostedAt = function () {
11804        return this.context.postedAt;
11805    };
11806    ActivityFeedNotificationItem.prototype.getSenderUid = function () {
11807        return this.context.senderUid;
11808    };
11809    Object.defineProperty(ActivityFeedNotificationItem.prototype, "lookUpKey", {
11810        get: function () {
11811            return ActivityFeedNotificationItem.generateLookUpKey(this.context.section.uid);
11812        },
11813        enumerable: true,
11814        configurable: true
11815    });
11816    ActivityFeedNotificationItem.NOTIFICATION_TYPE = 'ACTIVITY_FEED_NOTIFICATION';
11817    return ActivityFeedNotificationItem;
11818}(notification_item_1.NotificationItem));
11819exports.ActivityFeedNotificationItem = ActivityFeedNotificationItem;
11820
11821
11822
11823/***/ }),
11824/* 68 */
11825/***/ (function(module, exports, __webpack_require__) {
11826
11827"use strict";
11828
11829Object.defineProperty(exports, "__esModule", { value: true });
11830var popper_configuration_1 = __webpack_require__(176);
11831exports.PoppableElementFactory = {
11832    generateTooltipConfig: function (defaultPlacement, triggerAction, htmlReference, customStyleClassName, showHideDuration) {
11833        if (showHideDuration === void 0) { showHideDuration = [420, 0]; }
11834        var showArrow = false;
11835        var appendTo = document.body;
11836        var stickToReference = false;
11837        var zIndex = 9999;
11838        var interactive = false;
11839        var displayAnimation = 'fade';
11840        var popperOptions = {
11841            modifiers: {
11842                preventOverflow: {
11843                    enabled: true
11844                },
11845                computeStyle: {
11846                    gpuAcceleration: false
11847                },
11848                hide: {
11849                    enabled: false
11850                },
11851                removeOnDestroy: true
11852            }
11853        };
11854        var beforeShownCallback = function (instance) {
11855            var content = instance.popper.querySelector('.tippy-content');
11856            if (content != null) {
11857                var innerHTML = content.innerHTML;
11858                if (innerHTML.trim() === '' && instance.popperInstance != null) {
11859                    instance.popperInstance.destroy();
11860                }
11861            }
11862        };
11863        return popper_configuration_1.PopperConfiguration.getPopperConfiguration({
11864            showArrow: showArrow,
11865            defaultPlacement: defaultPlacement,
11866            trigger: triggerAction,
11867            appendTo: appendTo,
11868            stickToReference: stickToReference,
11869            interactive: interactive,
11870            onDisplayAnimation: displayAnimation,
11871            customStyleClassName: customStyleClassName,
11872            htmlReference: htmlReference,
11873            popperJsOptions: popperOptions,
11874            zIndex: zIndex,
11875            transitionDuration: showHideDuration,
11876            beforeShownCallback: beforeShownCallback
11877        });
11878    },
11879    generatePopoverConfig: function (showArrow, defaultPlacement, zIndex, customStyleClassName, htmlReference, onHiddenCallback, onShownCallback, panelPlacementLocator) {
11880        if (panelPlacementLocator === void 0) { panelPlacementLocator = document.body; }
11881        var appendTo = panelPlacementLocator;
11882        var stickToReference = false;
11883        var interactive = true;
11884        var arrowSize = 'scale(2)';
11885        var triggerAction = 'click';
11886        var displayAnimation = 'shift-toward';
11887        var popperOptions = {
11888            modifiers: {
11889                preventOverflow: {
11890                    enabled: true,
11891                    priority: ['right', 'left'],
11892                    boundariesElement: document.body
11893                },
11894                computeStyle: {
11895                    gpuAcceleration: false
11896                },
11897                hide: {
11898                    enabled: false
11899                }
11900            }
11901        };
11902        return popper_configuration_1.PopperConfiguration.getPopperConfiguration({
11903            showArrow: showArrow,
11904            defaultPlacement: defaultPlacement,
11905            trigger: triggerAction,
11906            appendTo: appendTo,
11907            stickToReference: stickToReference,
11908            interactive: interactive,
11909            arrowSizeTransform: arrowSize,
11910            onDisplayAnimation: displayAnimation,
11911            customStyleClassName: customStyleClassName,
11912            htmlReference: htmlReference,
11913            popperJsOptions: popperOptions,
11914            zIndex: zIndex,
11915            onShownCallback: onShownCallback,
11916            onHiddenCallback: onHiddenCallback
11917        });
11918    },
11919    generatePoppableElement: function (trigger, config, scopeClass) {
11920        if (window.hasOwnProperty('tippy')) {
11921            tippy.disableAnimations();
11922            var tippyContainer = tippy.one(trigger, config);
11923            if (tippyContainer != null && tippyContainer.popper != null && scopeClass != null) {
11924                tippyContainer.popper.classList.add(scopeClass);
11925                tippyContainer.popper.firstChild.classList.add(scopeClass);
11926            }
11927            return tippyContainer;
11928        }
11929        else {
11930            console.error('tippy is undefined. Did the tippy.js script get loaded before calling this? - poppable-element-factory.ts');
11931        }
11932    }
11933};
11934
11935
11936
11937/***/ }),
11938/* 69 */
11939/***/ (function(module, exports, __webpack_require__) {
11940
11941"use strict";
11942
11943Object.defineProperty(exports, "__esModule", { value: true });
11944var rxjs_1 = __webpack_require__(19);
11945var pds_logger_1 = __webpack_require__(41);
11946var operators_1 = __webpack_require__(17);
11947var feedLog = pds_logger_1.pdsLogger.requiresLogger('feed');
11948var ACTIVITY_MESSAGE_PAGE_SIZE = 6;
11949var GetStreamFeedService = (function () {
11950    function GetStreamFeedService(client, groupName, feedName, token, isNotificationFeed) {
11951        if (isNotificationFeed === void 0) { isNotificationFeed = false; }
11952        this.client = client;
11953        this.groupName = groupName;
11954        this.feedName = feedName;
11955        this.isNotificationFeed = isNotificationFeed;
11956        this.clientFeedSubscriptions = [];
11957        this.token = token;
11958        this.clientFeed = this.client.feed(this.groupName, this.feedName, this.token);
11959        this.debug('New feed', this.clientFeed);
11960    }
11961    GetStreamFeedService.prototype.realTimeUpdates = function () {
11962        var _this = this;
11963        return rxjs_1.Observable.create(function (observer) {
11964            var connectionSuccessCallback = function () {
11965                _this.debug('Listening in realtime for ' + _this.feedInfo());
11966            };
11967            var connectionFailedCallback = function (data) {
11968                observer.complete();
11969                throw new Error('Getstream: something went wrong when initializing real-time updates connection for ' + _this.feedInfo());
11970            };
11971            var realTimeUpdatesCallback = function (data) {
11972                if (data.new && data.new.length > 0) {
11973                    for (var _i = 0, _a = data.new; _i < _a.length; _i++) {
11974                        var newActivity = _a[_i];
11975                        observer.next({
11976                            newActivity: newActivity
11977                        });
11978                    }
11979                }
11980                if (data.deleted && data.deleted.length > 0) {
11981                    for (var _b = 0, _c = data.deleted; _b < _c.length; _b++) {
11982                        var deletedActivity = _c[_b];
11983                        observer.next({
11984                            deletedActivity: {
11985                                id: deletedActivity,
11986                                feed: data.feed
11987                            }
11988                        });
11989                    }
11990                }
11991            };
11992            var subscription = _this.clientFeed.subscribe(realTimeUpdatesCallback);
11993            _this.clientFeedSubscriptions.push(subscription);
11994            subscription.then(connectionSuccessCallback, connectionFailedCallback);
11995        });
11996    };
11997    GetStreamFeedService.prototype.cancelSubscriptions = function () {
11998        for (var _i = 0, _a = this.clientFeedSubscriptions; _i < _a.length; _i++) {
11999            var subscription = _a[_i];
12000            subscription.cancel();
12001        }
12002        this.clientFeedSubscriptions = [];
12003    };
12004    GetStreamFeedService.prototype.getFeedId = function () {
12005        return this.clientFeed.id;
12006    };
12007    GetStreamFeedService.prototype.getSignedId = function () {
12008        return this.clientFeed.id + ' ' + this.clientFeed.token;
12009    };
12010    Object.defineProperty(GetStreamFeedService.prototype, "hasMoreActivities", {
12011        get: function () {
12012            return this.lastActivity !== null;
12013        },
12014        enumerable: true,
12015        configurable: true
12016    });
12017    GetStreamFeedService.prototype.getPreviousActivities = function (limit) {
12018        var _this = this;
12019        if (limit === void 0) { limit = ACTIVITY_MESSAGE_PAGE_SIZE; }
12020        if (this.isNotificationFeed) {
12021            throw 'can not fetch activities on notification feed yet';
12022        }
12023        var promise;
12024        if (this.lastActivity != null) {
12025            promise = this.clientFeed.get({ id_lt: this.lastActivity.id, limit: limit });
12026        }
12027        else {
12028            promise = this.clientFeed.get({ limit: limit });
12029        }
12030        return rxjs_1.from(promise
12031            .then(function (res) {
12032            if (res.results.length > 0) {
12033                _this.lastActivity = res.results[res.results.length - 1];
12034            }
12035            else {
12036                _this.lastActivity = null;
12037            }
12038            return res.results;
12039        })
12040            .catch(function (err) {
12041            _this.debug('[getPreviousActivities]', err);
12042        }));
12043    };
12044    GetStreamFeedService.prototype.getNotifications = function (limit) {
12045        if (limit === void 0) { limit = 200; }
12046        if (!this.isNotificationFeed) {
12047            throw 'can only get notifications from notification feeds';
12048        }
12049        return rxjs_1.from(this.clientFeed.get({ limit: limit })
12050            .then(function (res) {
12051            return res.results;
12052        }));
12053    };
12054    GetStreamFeedService.prototype.markNotificationsRead = function (getStreamGroupIds) {
12055        if (!this.isNotificationFeed) {
12056            throw 'can only mark notifications read on notification feeds';
12057        }
12058        if (getStreamGroupIds.length === 0) {
12059            return rxjs_1.of(null);
12060        }
12061        var ids = JSON.parse(JSON.stringify(getStreamGroupIds));
12062        var obs = [];
12063        while (ids.length > 0) {
12064            var batch = ids.splice(0, 45);
12065            obs.push(this.clientFeed.get({ limit: 5, mark_read: batch }));
12066        }
12067        return rxjs_1.forkJoin(obs).pipe(operators_1.mapTo(null));
12068    };
12069    GetStreamFeedService.prototype.getFeedName = function () {
12070        return this.feedName;
12071    };
12072    GetStreamFeedService.prototype.debug = function (msg) {
12073        var params = [];
12074        for (var _i = 1; _i < arguments.length; _i++) {
12075            params[_i - 1] = arguments[_i];
12076        }
12077        feedLog('Getstream(' + this.feedInfo() + '): ' + msg, params);
12078    };
12079    GetStreamFeedService.prototype.feedInfo = function () {
12080        return this.groupName + ': ' + this.feedName;
12081    };
12082    return GetStreamFeedService;
12083}());
12084exports.GetStreamFeedService = GetStreamFeedService;
12085
12086
12087
12088/***/ }),
12089/* 70 */
12090/***/ (function(module, __webpack_exports__, __webpack_require__) {
12091
12092"use strict";
12093/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ConnectableObservable; });
12094/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return connectableObservableDescriptor; });
vendor: 6,489 bytes, lines 12095-12250
12095/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
12096/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
12097/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
12098/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
12099/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
12100/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(48);
12101/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
12102
12103
12104
12105
12106
12107
12108var ConnectableObservable = /*@__PURE__*/ (function (_super) {
12109    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ConnectableObservable, _super);
12110    function ConnectableObservable(source, subjectFactory) {
12111        var _this = _super.call(this) || this;
12112        _this.source = source;
12113        _this.subjectFactory = subjectFactory;
12114        _this._refCount = 0;
12115        _this._isComplete = false;
12116        return _this;
12117    }
12118    ConnectableObservable.prototype._subscribe = function (subscriber) {
12119        return this.getSubject().subscribe(subscriber);
12120    };
12121    ConnectableObservable.prototype.getSubject = function () {
12122        var subject = this._subject;
12123        if (!subject || subject.isStopped) {
12124            this._subject = this.subjectFactory();
12125        }
12126        return this._subject;
12127    };
12128    ConnectableObservable.prototype.connect = function () {
12129        var connection = this._connection;
12130        if (!connection) {
12131            this._isComplete = false;
12132            connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__[/* Subscription */ "a"]();
12133            connection.add(this.source
12134                .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
12135            if (connection.closed) {
12136                this._connection = null;
12137                connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__[/* Subscription */ "a"].EMPTY;
12138            }
12139            else {
12140                this._connection = connection;
12141            }
12142        }
12143        return connection;
12144    };
12145    ConnectableObservable.prototype.refCount = function () {
12146        return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__[/* refCount */ "a"])()(this);
12147    };
12148    return ConnectableObservable;
12149}(_Observable__WEBPACK_IMPORTED_MODULE_2__[/* Observable */ "a"]));
12150
12151var connectableProto = ConnectableObservable.prototype;
12152var connectableObservableDescriptor = {
12153    operator: { value: null },
12154    _refCount: { value: 0, writable: true },
12155    _subject: { value: null, writable: true },
12156    _connection: { value: null, writable: true },
12157    _subscribe: { value: connectableProto._subscribe },
12158    _isComplete: { value: connectableProto._isComplete, writable: true },
12159    getSubject: { value: connectableProto.getSubject },
12160    connect: { value: connectableProto.connect },
12161    refCount: { value: connectableProto.refCount }
12162};
12163var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
12164    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ConnectableSubscriber, _super);
12165    function ConnectableSubscriber(destination, connectable) {
12166        var _this = _super.call(this, destination) || this;
12167        _this.connectable = connectable;
12168        return _this;
12169    }
12170    ConnectableSubscriber.prototype._error = function (err) {
12171        this._unsubscribe();
12172        _super.prototype._error.call(this, err);
12173    };
12174    ConnectableSubscriber.prototype._complete = function () {
12175        this.connectable._isComplete = true;
12176        this._unsubscribe();
12177        _super.prototype._complete.call(this);
12178    };
12179    ConnectableSubscriber.prototype._unsubscribe = function () {
12180        var connectable = this.connectable;
12181        if (connectable) {
12182            this.connectable = null;
12183            var connection = connectable._connection;
12184            connectable._refCount = 0;
12185            connectable._subject = null;
12186            connectable._connection = null;
12187            if (connection) {
12188                connection.unsubscribe();
12189            }
12190        }
12191    };
12192    return ConnectableSubscriber;
12193}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* SubjectSubscriber */ "b"]));
12194var RefCountOperator = /*@__PURE__*/ (function () {
12195    function RefCountOperator(connectable) {
12196        this.connectable = connectable;
12197    }
12198    RefCountOperator.prototype.call = function (subscriber, source) {
12199        var connectable = this.connectable;
12200        connectable._refCount++;
12201        var refCounter = new RefCountSubscriber(subscriber, connectable);
12202        var subscription = source.subscribe(refCounter);
12203        if (!refCounter.closed) {
12204            refCounter.connection = connectable.connect();
12205        }
12206        return subscription;
12207    };
12208    return RefCountOperator;
12209}());
12210var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
12211    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](RefCountSubscriber, _super);
12212    function RefCountSubscriber(destination, connectable) {
12213        var _this = _super.call(this, destination) || this;
12214        _this.connectable = connectable;
12215        return _this;
12216    }
12217    RefCountSubscriber.prototype._unsubscribe = function () {
12218        var connectable = this.connectable;
12219        if (!connectable) {
12220            this.connection = null;
12221            return;
12222        }
12223        this.connectable = null;
12224        var refCount = connectable._refCount;
12225        if (refCount <= 0) {
12226            this.connection = null;
12227            return;
12228        }
12229        connectable._refCount = refCount - 1;
12230        if (refCount > 1) {
12231            this.connection = null;
12232            return;
12233        }
12234        var connection = this.connection;
12235        var sharedConnection = connectable._connection;
12236        this.connection = null;
12237        if (sharedConnection && (!connection || sharedConnection === connection)) {
12238            sharedConnection.unsubscribe();
12239        }
12240    };
12241    return RefCountSubscriber;
12242}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__[/* Subscriber */ "a"]));
12243
12244
12245/***/ }),
12246/* 71 */
12247/***/ (function(module, __webpack_exports__, __webpack_require__) {
12248
12249"use strict";
12250/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BehaviorSubject; });
12251/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
12252/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
12253/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28);
12254/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
12255
12256
12257
12258var BehaviorSubject = /*@__PURE__*/ (function (_super) {
12259    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](BehaviorSubject, _super);
12260    function BehaviorSubject(_value) {
12261        var _this = _super.call(this) || this;
12262        _this._value = _value;
12263        return _this;
12264    }
12265    Object.defineProperty(BehaviorSubject.prototype, "value", {
12266        get: function () {
12267            return this.getValue();
12268        },
12269        enumerable: true,
12270        configurable: true
12271    });
12272    BehaviorSubject.prototype._subscribe = function (subscriber) {
12273        var subscription = _super.prototype._subscribe.call(this, subscriber);
12274        if (subscription && !subscription.closed) {
12275            subscriber.next(this._value);
12276        }
12277        return subscription;
12278    };
12279    BehaviorSubject.prototype.getValue = function () {
12280        if (this.hasError) {
12281            throw this.thrownError;
12282        }
12283        else if (this.closed) {
12284            throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__[/* ObjectUnsubscribedError */ "a"]();
12285        }
12286        else {
12287            return this._value;
12288        }
12289    };
12290    BehaviorSubject.prototype.next = function (value) {
12291        _super.prototype.next.call(this, this._value = value);
12292    };
12293    return BehaviorSubject;
12294}(_Subject__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]));
12295
12296
12297
12298/***/ }),
12299/* 72 */
12300/***/ (function(module, __webpack_exports__, __webpack_require__) {
12301
12302"use strict";
12303/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return observeOn; });
12304/* unused harmony export ObserveOnOperator */
12305/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObserveOnSubscriber; });
12306/* unused harmony export ObserveOnMessage */
12307/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
12308/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
12309/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
12310/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
12311
12312
12313
12314function observeOn(scheduler, delay) {
12315    if (delay === void 0) {
12316        delay = 0;
12317    }
12318    return function observeOnOperatorFunction(source) {
12319        return source.lift(new ObserveOnOperator(scheduler, delay));
12320    };
12321}
12322var ObserveOnOperator = /*@__PURE__*/ (function () {
12323    function ObserveOnOperator(scheduler, delay) {
12324        if (delay === void 0) {
12325            delay = 0;
12326        }
12327        this.scheduler = scheduler;
12328        this.delay = delay;
12329    }
12330    ObserveOnOperator.prototype.call = function (subscriber, source) {
12331        return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
12332    };
12333    return ObserveOnOperator;
12334}());
12335
12336var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
12337    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](ObserveOnSubscriber, _super);
12338    function ObserveOnSubscriber(destination, scheduler, delay) {
12339        if (delay === void 0) {
12340            delay = 0;
12341        }
12342        var _this = _super.call(this, destination) || this;
12343        _this.scheduler = scheduler;
12344        _this.delay = delay;
12345        return _this;
12346    }
12347    ObserveOnSubscriber.dispatch = function (arg) {
12348        var notification = arg.notification, destination = arg.destination;
12349        notification.observe(destination);
12350        this.unsubscribe();
12351    };
12352    ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
12353        this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
12354    };
12355    ObserveOnSubscriber.prototype._next = function (value) {
12356        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__[/* Notification */ "a"].createNext(value));
12357    };
12358    ObserveOnSubscriber.prototype._error = function (err) {
12359        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__[/* Notification */ "a"].createError(err));
12360    };
12361    ObserveOnSubscriber.prototype._complete = function () {
12362        this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__[/* Notification */ "a"].createComplete());
12363    };
12364    return ObserveOnSubscriber;
12365}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__[/* Subscriber */ "a"]));
12366
12367var ObserveOnMessage = /*@__PURE__*/ (function () {
12368    function ObserveOnMessage(notification, destination) {
12369        this.notification = notification;
12370        this.destination = destination;
12371    }
12372    return ObserveOnMessage;
12373}());
12374
12375
12376
12377/***/ }),
12378/* 73 */
12379/***/ (function(module, __webpack_exports__, __webpack_require__) {
12380
12381"use strict";
12382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TimeoutError; });
12383/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
12384/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */
12385
12386var TimeoutError = /*@__PURE__*/ (function (_super) {
12387    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](TimeoutError, _super);
12388    function TimeoutError() {
12389        var _this = _super.call(this, 'Timeout has occurred') || this;
12390        _this.name = 'TimeoutError';
12391        Object.setPrototypeOf(_this, TimeoutError.prototype);
12392        return _this;
12393    }
12394    return TimeoutError;
12395}(Error));
12396
12397
12398
12399/***/ }),
12400/* 74 */
12401/***/ (function(module, __webpack_exports__, __webpack_require__) {
12402
12403"use strict";
12404/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concatAll; });
12405/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53);
12406/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
12407
12408function concatAll() {
12409    return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__[/* mergeAll */ "a"])(1);
12410}
12411
12412
12413/***/ }),
12414/* 75 */
12415/***/ (function(module, __webpack_exports__, __webpack_require__) {
12416
12417"use strict";
12418/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return merge; });
12419/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
12420/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
12421/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
12422/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
12423/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
12424
12425
12426
12427
12428function merge() {
12429    var observables = [];
12430    for (var _i = 0; _i < arguments.length; _i++) {
12431        observables[_i] = arguments[_i];
12432    }
12433    var concurrent = Number.POSITIVE_INFINITY;
12434    var scheduler = null;
12435    var last = observables[observables.length - 1];
12436    if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__[/* isScheduler */ "a"])(last)) {
12437        scheduler = observables.pop();
12438        if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
12439            concurrent = observables.pop();
12440        }
12441    }
12442    else if (typeof last === 'number') {
12443        concurrent = observables.pop();
12444    }
12445    if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"]) {
12446        return observables[0];
12447    }
12448    return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__[/* mergeAll */ "a"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__[/* fromArray */ "a"])(observables, scheduler));
12449}
12450
12451
12452/***/ }),
12453/* 76 */
12454/***/ (function(module, __webpack_exports__, __webpack_require__) {
12455
12456"use strict";
12457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return race; });
12458/* unused harmony export RaceOperator */
12459/* unused harmony export RaceSubscriber */
12460/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
12461/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
12462/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
12463/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
12464/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
12465/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
12466
12467
12468
12469
12470
12471function race() {
12472    var observables = [];
12473    for (var _i = 0; _i < arguments.length; _i++) {
12474        observables[_i] = arguments[_i];
12475    }
12476    if (observables.length === 1) {
12477        if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__[/* isArray */ "a"])(observables[0])) {
12478            observables = observables[0];
12479        }
12480        else {
12481            return observables[0];
12482        }
12483    }
12484    return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__[/* fromArray */ "a"])(observables, undefined).lift(new RaceOperator());
12485}
12486var RaceOperator = /*@__PURE__*/ (function () {
12487    function RaceOperator() {
12488    }
12489    RaceOperator.prototype.call = function (subscriber, source) {
12490        return source.subscribe(new RaceSubscriber(subscriber));
12491    };
12492    return RaceOperator;
12493}());
12494
12495var RaceSubscriber = /*@__PURE__*/ (function (_super) {
12496    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](RaceSubscriber, _super);
12497    function RaceSubscriber(destination) {
12498        var _this = _super.call(this, destination) || this;
12499        _this.hasFirst = false;
12500        _this.observables = [];
12501        _this.subscriptions = [];
12502        return _this;
12503    }
12504    RaceSubscriber.prototype._next = function (observable) {
12505        this.observables.push(observable);
12506    };
12507    RaceSubscriber.prototype._complete = function () {
12508        var observables = this.observables;
12509        var len = observables.length;
12510        if (len === 0) {
12511            this.destination.complete();
12512        }
12513        else {
12514            for (var i = 0; i < len && !this.hasFirst; i++) {
12515                var observable = observables[i];
12516                var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__[/* subscribeToResult */ "a"])(this, observable, observable, i);
12517                if (this.subscriptions) {
12518                    this.subscriptions.push(subscription);
12519                }
12520                this.add(subscription);
12521            }
12522            this.observables = null;
12523        }
12524    };
12525    RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
12526        if (!this.hasFirst) {
12527            this.hasFirst = true;
12528            for (var i = 0; i < this.subscriptions.length; i++) {
12529                if (i !== outerIndex) {
12530                    var subscription = this.subscriptions[i];
12531                    subscription.unsubscribe();
12532                    this.remove(subscription);
12533                }
12534            }
12535            this.subscriptions = null;
12536        }
12537        this.destination.next(innerValue);
12538    };
12539    return RaceSubscriber;
12540}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__[/* OuterSubscriber */ "a"]));
12541
12542
12543
12544/***/ }),
12545/* 77 */
12546/***/ (function(module, __webpack_exports__, __webpack_require__) {
12547
12548"use strict";
12549/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timer; });
12550/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
12551/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
12552/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
12553/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
12554/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
12555
12556
12557
12558
12559function timer(dueTime, periodOrScheduler, scheduler) {
12560    if (dueTime === void 0) {
12561        dueTime = 0;
12562    }
12563    var period = -1;
12564    if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__[/* isNumeric */ "a"])(periodOrScheduler)) {
12565        period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
12566    }
12567    else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__[/* isScheduler */ "a"])(periodOrScheduler)) {
12568        scheduler = periodOrScheduler;
12569    }
12570    if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__[/* isScheduler */ "a"])(scheduler)) {
12571        scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__[/* async */ "a"];
12572    }
12573    return new _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"](function (subscriber) {
12574        var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__[/* isNumeric */ "a"])(dueTime)
12575            ? dueTime
12576            : (+dueTime - scheduler.now());
12577        return scheduler.schedule(dispatch, due, {
12578            index: 0, period: period, subscriber: subscriber
12579        });
12580    });
12581}
12582function dispatch(state) {
12583    var index = state.index, period = state.period, subscriber = state.subscriber;
12584    subscriber.next(index);
12585    if (subscriber.closed) {
12586        return;
12587    }
12588    else if (period === -1) {
12589        return subscriber.complete();
12590    }
12591    state.index = index + 1;
12592    this.schedule(state, period);
12593}
12594
12595
12596/***/ }),
12597/* 78 */
12598/***/ (function(module, __webpack_exports__, __webpack_require__) {
12599
12600"use strict";
12601
12602// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
12603var tslib_es6 = __webpack_require__(0);
12604
12605// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js + 1 modules
12606var AsyncAction = __webpack_require__(38);
12607
12608// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js
12609/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
12610
12611
12612var QueueAction_QueueAction = /*@__PURE__*/ (function (_super) {
12613    tslib_es6["a" /* __extends */](QueueAction, _super);
12614    function QueueAction(scheduler, work) {
12615        var _this = _super.call(this, scheduler, work) || this;
12616        _this.scheduler = scheduler;
12617        _this.work = work;
12618        return _this;
12619    }
12620    QueueAction.prototype.schedule = function (state, delay) {
12621        if (delay === void 0) {
12622            delay = 0;
12623        }
12624        if (delay > 0) {
12625            return _super.prototype.schedule.call(this, state, delay);
12626        }
12627        this.delay = delay;
12628        this.state = state;
12629        this.scheduler.flush(this);
12630        return this;
12631    };
12632    QueueAction.prototype.execute = function (state, delay) {
12633        return (delay > 0 || this.closed) ?
12634            _super.prototype.execute.call(this, state, delay) :
12635            this._execute(state, delay);
12636    };
12637    QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
12638        if (delay === void 0) {
12639            delay = 0;
12640        }
12641        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
12642            return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
12643        }
12644        return scheduler.flush(this);
12645    };
12646    return QueueAction;
12647}(AsyncAction["a" /* AsyncAction */]));
12648
12649
12650// EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js
12651var AsyncScheduler = __webpack_require__(36);
12652
12653// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js
12654/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
12655
12656
12657var QueueScheduler_QueueScheduler = /*@__PURE__*/ (function (_super) {
12658    tslib_es6["a" /* __extends */](QueueScheduler, _super);
12659    function QueueScheduler() {
12660        return _super !== null && _super.apply(this, arguments) || this;
12661    }
12662    return QueueScheduler;
12663}(AsyncScheduler["a" /* AsyncScheduler */]));
12664
12665
12666// CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduler/queue.js
12667/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return queue; });
12668/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
12669
12670
12671var queue = /*@__PURE__*/ new QueueScheduler_QueueScheduler(QueueAction_QueueAction);
12672
12673
12674/***/ }),
12675/* 79 */
12676/***/ (function(module, __webpack_exports__, __webpack_require__) {
12677
12678"use strict";
12679/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isObject; });
12680/** PURE_IMPORTS_START  PURE_IMPORTS_END */
12681function isObject(x) {
12682    return x != null && typeof x === 'object';
12683}
12684
12685
12686/***/ }),
12687/* 80 */
12688/***/ (function(module, __webpack_exports__, __webpack_require__) {
12689
12690"use strict";
12691/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SubjectSubscription; });
12692/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
12693/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
12694/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
12695
12696
12697var SubjectSubscription = /*@__PURE__*/ (function (_super) {
12698    tslib__WEBPACK_IMPORTED_MODULE_0__[/* __extends */ "a"](SubjectSubscription, _super);
12699    function SubjectSubscription(subject, subscriber) {
12700        var _this = _super.call(this) || this;
12701        _this.subject = subject;
12702        _this.subscriber = subscriber;
12703        _this.closed = false;
12704        return _this;
12705    }
12706    SubjectSubscription.prototype.unsubscribe = function () {
12707        if (this.closed) {
12708            return;
12709        }
12710        this.closed = true;
12711        var subject = this.subject;
12712        var observers = subject.observers;
12713        this.subject = null;
12714        if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
12715            return;
12716        }
12717        var subscriberIndex = observers.indexOf(this.subscriber);
12718        if (subscriberIndex !== -1) {
12719            observers.splice(subscriberIndex, 1);
12720        }
12721    };
12722    return SubjectSubscription;
12723}(_Subscription__WEBPACK_IMPORTED_MODULE_1__[/* Subscription */ "a"]));
12724
12725
12726
12727/***/ }),
12728/* 81 */
12729/***/ (function(module, __webpack_exports__, __webpack_require__) {
12730
12731"use strict";
12732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToArray; });
12733/** PURE_IMPORTS_START  PURE_IMPORTS_END */
12734var subscribeToArray = function (array) {
12735    return function (subscriber) {
12736        for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
12737            subscriber.next(array[i]);
12738        }
12739        if (!subscriber.closed) {
12740            subscriber.complete();
12741        }
12742    };
12743};
12744
12745
12746/***/ }),
12747/* 82 */
12748/***/ (function(module, __webpack_exports__, __webpack_require__) {
12749
12750"use strict";
12751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeTo; });
12752/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
12753/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81);
12754/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86);
12755/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87);
12756/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(83);
12757/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84);
12758/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85);
12759/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79);
12760/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25);
12761/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
12762/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773var subscribeTo = function (result) {
12774    if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__[/* Observable */ "a"]) {
12775        return function (subscriber) {
12776            if (result._isScalar) {
12777                subscriber.next(result.value);
12778                subscriber.complete();
12779                return undefined;
12780            }
12781            else {
12782                return result.subscribe(subscriber);
12783            }
12784        };
12785    }
12786    else if (result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_9__[/* observable */ "a"]] === 'function') {
12787        return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__[/* subscribeToObservable */ "a"])(result);
12788    }
12789    else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_5__[/* isArrayLike */ "a"])(result)) {
12790        return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__[/* subscribeToArray */ "a"])(result);
12791    }
12792    else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_6__[/* isPromise */ "a"])(result)) {
12793        return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__[/* subscribeToPromise */ "a"])(result);
12794    }
12795    else if (result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_8__[/* iterator */ "a"]] === 'function') {
12796        return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__[/* subscribeToIterable */ "a"])(result);
12797    }
12798    else {
12799        var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_7__[/* isObject */ "a"])(result) ? 'an invalid object' : "'" + result + "'";
12800        var msg = "You provided " + value + " where a stream was expected."
12801            + ' You can provide an Observable, Promise, Array, or Iterable.';
12802        throw new TypeError(msg);
12803    }
12804};
12805
12806
12807/***/ }),
12808/* 83 */
12809/***/ (function(module, __webpack_exports__, __webpack_require__) {
12810
12811"use strict";
12812/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToObservable; });
12813/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
12814/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
12815
12816var subscribeToObservable = function (obj) {
12817    return function (subscriber) {
12818        var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__[/* observable */ "a"]]();
12819        if (typeof obs.subscribe !== 'function') {
12820            throw new TypeError('Provided object does not correctly implement Symbol.observable');
12821        }
12822        else {
12823            return obs.subscribe(subscriber);
12824        }
12825    };
12826};
12827
12828
12829/***/ }),
12830/* 84 */
12831/***/ (function(module, __webpack_exports__, __webpack_require__) {
12832
12833"use strict";
12834/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArrayLike; });
12835/** PURE_IMPORTS_START  PURE_IMPORTS_END */
12836var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
12837
12838
12839/***/ }),
12840/* 85 */
12841/***/ (function(module, __webpack_exports__, __webpack_require__) {
12842
12843"use strict";
12844/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isPromise; });
12845/** PURE_IMPORTS_START  PURE_IMPORTS_END */
12846function isPromise(value) {
12847    return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
12848}
12849
12850
12851/***/ }),
12852/* 86 */
12853/***/ (function(module, __webpack_exports__, __webpack_require__) {
12854
12855"use strict";
12856/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToPromise; });
12857/* harmony 
12857import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
12858/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
12859
12860var subscribeToPromise = function (promise) {
12861    return function (subscriber) {
12862        promise.then(function (value) {
12863            if (!subscriber.closed) {
12864                subscriber.next(value);
12865                subscriber.complete();
12866            }
12867        }, function (err) { return subscriber.error(err); })
12868            .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__[/* hostReportError */ "a"]);
12869        return subscriber;
12870    };
12871};
12872
12873
12874/***/ }),
12875/* 87 */
12876/***/ (function(module, __webpack_exports__, __webpack_require__) {
12877
12878"use strict";
12879/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToIterable; });
12880/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
12881/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
12882
12883var subscribeToIterable = function (iterable) {
12884    return function (subscriber) {
12885        var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__[/* iterator */ "a"]]();
12886        do {
12887            var item = iterator.next();
12888            if (item.done) {
12889                subscriber.complete();
12890                break;
12891            }
12892            subscriber.next(item.value);
12893            if (subscriber.closed) {
12894                break;
12895            }
12896        } while (true);
12897        if (typeof iterator.return === 'function') {
12898            subscriber.add(function () {
12899                if (iterator.return) {
12900                    iterator.return();
12901                }
12902            });
12903        }
12904        return subscriber;
12905    };
12906};
12907
12908
12909/***/ }),
12910/* 88 */
12911/***/ (function(module, exports, __webpack_require__) {
12912
12913"use strict";
12914
12915Object.defineProperty(exports, "__esModule", { value: true });
12916exports.HTML_TAG_WHITELIST = [
12917    'strike', 'del', 'dd', 'h3', 'small', 'big', 'sub', 'tt', 'fieldset', 'a', 'ul', 'h4',
12918    'cite', 'dfn', 'thead', 'legend', 'h5', 'kbd', 'code', 'b', 'ins', 'img', 'acronym',
12919    'h6', 'sup', 'pre', 'iframe', 'tbody', 'blockquote', 'td', 'o:p', 'dt', 'br', 'output',
12920    'p', 'strong', 'caption', 'div', 'samp', 'table', 'li', 'ol', 'var', 's', 'font', 'tr',
12921    'em', 'th', 'h1', 'address', 'i', 'abbr', 'h2', 'span', 'hr', 'u'
12922];
12923exports.HTML_ATTRIBUTE_WHITELIST = [
12924    'name', 'face', 'href', 'cellspacing', 'bgcolor', 'size', 'cite', 'dir', 'class',
12925    'title', 'src', 'border', 'summary', 'color', 'height', 'rowspan', 'cellpadding',
12926    'align', 'datetime', 'alt', 'colspan', 'style', 'target', 'width'
12927];
12928exports.WHITE_LIST = {};
12929exports.HTML_TAG_WHITELIST.forEach(function (tag) {
12930    exports.WHITE_LIST[tag] = exports.HTML_ATTRIBUTE_WHITELIST;
12931});
12932var XSS_FILTER_OPTIONS = {
12933    whiteList: exports.WHITE_LIST
12934};
12935function sanitizeHtmlString(source) {
12936    return filterXSS(source, XSS_FILTER_OPTIONS);
12937}
12938exports.sanitizeHtmlString = sanitizeHtmlString;
12939
12940
12941
12942/***/ }),
12943/* 89 */
12944/***/ (function(module, exports, __webpack_require__) {
12945
12946"use strict";
12947
12948var __extends = (this && this.__extends) || (function () {
12949    var extendStatics = function (d, b) {
12950        extendStatics = Object.setPrototypeOf ||
12951            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12952            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12953        return extendStatics(d, b);
12954    }
12955    return function (d, b) {
12956        extendStatics(d, b);
12957        function __() { this.constructor = d; }
12958        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12959    };
12960})();
12961Object.defineProperty(exports, "__esModule", { value: true });
12962var pds_i18n_1 = __webpack_require__(15);
12963var notification_item_1 = __webpack_require__(59);
12964var AsgmtSubmissionNotificationItem = (function (_super) {
12965    __extends(AsgmtSubmissionNotificationItem, _super);
12966    function AsgmtSubmissionNotificationItem(isSeen, isRead, context) {
12967        if (isSeen === void 0) { isSeen = false; }
12968        if (isRead === void 0) { isRead = false; }
12969        var _this = _super.call(this, AsgmtSubmissionNotificationItem.NOTIFICATION_TYPE, isSeen, isRead, undefined, AsgmtSubmissionNotificationItem.NOTIFICATION_SUBTYPE) || this;
12970        _this.context = context;
12971        _this.id = _this.context.activity.group || _this.id;
12972        _this.aggregationKey = JSON.stringify({
12973            assignmentUid: _this.context.activity.assignmentUid
12974        });
12975        return _this;
12976    }
12977    AsgmtSubmissionNotificationItem.generateLookUpKey = function (assignmentUid) {
12978        return [assignmentUid, AsgmtSubmissionNotificationItem.NOTIFICATION_TYPE].join(',');
12979    };
12980    AsgmtSubmissionNotificationItem.prototype.getTitle = function () {
12981        return this.context.activity.assignmentName;
12982    };
12983    AsgmtSubmissionNotificationItem.prototype.getSubtitle = function () {
12984        return this.context.activity.studentName;
12985    };
12986    AsgmtSubmissionNotificationItem.prototype.getPostedAt = function () {
12987        return new Date(this.context.activity.time + 'Z');
12988    };
12989    AsgmtSubmissionNotificationItem.prototype.getUserType = function () {
12990        return this.context.userType;
12991    };
12992    AsgmtSubmissionNotificationItem.prototype.getTooltip = function () {
12993        return pds_i18n_1.pdsI18n.getText('pds|notifications|Student submitted homework');
12994    };
12995    AsgmtSubmissionNotificationItem.prototype.getSenderUid = function () {
12996        return this.context.activity.studentUid;
12997    };
12998    AsgmtSubmissionNotificationItem.prototype.getSectionUid = function () {
12999        return this.context.activity.sectionUid;
13000    };
13001    AsgmtSubmissionNotificationItem.prototype.getSectionName = function () {
13002        return this.context.sectionName;
13003    };
13004    AsgmtSubmissionNotificationItem.prototype.getColorClass = function () {
13005        return this.context.activity.assignmentCategoryColor;
13006    };
13007    Object.defineProperty(AsgmtSubmissionNotificationItem.prototype, "lookUpKey", {
13008        get: function () {
13009            return AsgmtSubmissionNotificationItem.generateLookUpKey(this.context.activity.assignmentUid);
13010        },
13011        enumerable: true,
13012        configurable: true
13013    });
13014    Object.defineProperty(AsgmtSubmissionNotificationItem.prototype, "currentUserUid", {
13015        get: function () {
13016            return this.context.currentUserUid;
13017        },
13018        enumerable: true,
13019        configurable: true
13020    });
13021    Object.defineProperty(AsgmtSubmissionNotificationItem.prototype, "getstreamGroupId", {
13022        get: function () {
13023            return this.context.getStreamGroupId;
13024        },
13025        enumerable: true,
13026        configurable: true
13027    });
13028    AsgmtSubmissionNotificationItem.NOTIFICATION_TYPE = 'ASSIGNMENT_NOTIFICATION';
13029    AsgmtSubmissionNotificationItem.NOTIFICATION_SUBTYPE = 'ASSIGNMENT_SUBMISSION_NOTIFICATION';
13030    return AsgmtSubmissionNotificationItem;
13031}(notification_item_1.NotificationItem));
13032exports.AsgmtSubmissionNotificationItem = AsgmtSubmissionNotificationItem;
13033
13034
13035
13036/***/ }),
13037/* 90 */
13038/***/ (function(module, exports, __webpack_require__) {
13039
13040"use strict";
13041
13042var __extends = (this && this.__extends) || (function () {
13043    var extendStatics = function (d, b) {
13044        extendStatics = Object.setPrototypeOf ||
13045            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13046            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
13047        return extendStatics(d, b);
13048    }
13049    return function (d, b) {
13050        extendStatics(d, b);
13051        function __() { this.constructor = d; }
13052        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13053    };
13054})();
13055Object.defineProperty(exports, "__esModule", { value: true });
13056var notification_item_1 = __webpack_require__(59);
13057var pds_i18n_1 = __webpack_require__(15);
13058var AssignmentTemplateNotificationItem = (function (_super) {
13059    __extends(AssignmentTemplateNotificationItem, _super);
13060    function AssignmentTemplateNotificationItem(context) {
13061        var _this = _super.call(this, AssignmentTemplateNotificationItem.NOTIFICATION_TYPE, false, context.hasBeenAssigned, undefined, AssignmentTemplateNotificationItem.NOTIFICATION_SUBTYPE) || this;
13062        _this.context = context;
13063        _this.isMarkedReadOnClick = false;
13064        _this.aggregationKey = JSON.stringify({
13065            assignmentTemplateUid: _this.context.assignmentTemplateUid,
13066            sectionUid: _this.context.sectionUid
13067        });
13068        return _this;
13069    }
13070    AssignmentTemplateNotificationItem.generateLookUpKey = function (context) {
13071        return [context.assignmentTemplateUid, context.sectionUid, AssignmentTemplateNotificationItem.NOTIFICATION_TYPE].join(',');
13072    };
13073    AssignmentTemplateNotificationItem.prototype.getTitle = function () {
13074        return this.context.assignmentName;
13075    };
13076    AssignmentTemplateNotificationItem.prototype.getSubtitle = function () {
13077        return this.context.sectionName || '';
13078    };
13079    AssignmentTemplateNotificationItem.prototype.getPostedAt = function () {
13080        return new Date(this.context.postedAt);
13081    };
13082    AssignmentTemplateNotificationItem.prototype.getTooltip = function () {
13083        return pds_i18n_1.pdsI18n.getText('pds|notifications|Messages regarding xx', { name: this.context.assignmentName });
13084    };
13085    AssignmentTemplateNotificationItem.prototype.getRequiresAction = function () {
13086        return !this.context.hasBeenAssigned;
13087    };
13088    Object.defineProperty(AssignmentTemplateNotificationItem.prototype, "lookUpKey", {
13089        get: function () {
13090            return AssignmentTemplateNotificationItem.generateLookUpKey(this.context);
13091        },
13092        enumerable: true,
13093        configurable: true
13094    });
13095    AssignmentTemplateNotificationItem.NOTIFICATION_TYPE = 'ASSIGNMENT_NOTIFICATION';
13096    AssignmentTemplateNotificationItem.NOTIFICATION_SUBTYPE = 'ASSIGNMENT_TEMPLATE_NOTIFICATION';
13097    return AssignmentTemplateNotificationItem;
13098}(notification_item_1.NotificationItem));
13099exports.AssignmentTemplateNotificationItem = AssignmentTemplateNotificationItem;
13100
13101
13102
13103/***/ }),
13104/* 91 */
13105/***/ (function(module, exports, __webpack_require__) {
13106
13107"use strict";
13108
13109var __extends = (this && this.__extends) || (function () {
13110    var extendStatics = function (d, b) {
13111        extendStatics = Object.setPrototypeOf ||
13112            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13113            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
13114        return extendStatics(d, b);
13115    }
13116    return function (d, b) {
13117        extendStatics(d, b);
13118        function __() { this.constructor = d; }
13119        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13120    };
13121})();
13122Object.defineProperty(exports, "__esModule", { value: true });
13123var notification_item_1 = __webpack_require__(59);
13124var pds_i18n_1 = __webpack_require__(15);
13125var CommunicationNotificationItem = (function (_super) {
13126    __extends(CommunicationNotificationItem, _super);
13127    function CommunicationNotificationItem(isSeen, isRead, context) {
13128        if (isSeen === void 0) { isSeen = false; }
13129        if (isRead === void 0) { isRead = false; }
13130        var _this = _super.call(this, CommunicationNotificationItem.NOTIFICATION_TYPE, isSeen, isRead) || this;
13131        _this.context = context;
13132        _this.id = _this.context.activity.group || _this.id;
13133        _this.isMarkedReadOnClick = false;
13134        _this.aggregationKey = JSON.stringify({
13135            topicUid: _this.context.activity.topicUid,
13136            threadOwnerUid: _this.context.activity.threadOwnerUid
13137        });
13138        _this.sectionToDetailMap = new Map();
13139        var sectionUids = new Set(_this.context.activity.message.associatedSectionUids || []);
13140        if (_this.context.senderInfo == null) {
13141            console.error('this context does not have senderInfo');
13142            return _this;
13143        }
13144        for (var _i = 0, _a = _this.context.senderInfo.sections; _i < _a.length; _i++) {
13145            var section = _a[_i];
13146            if (!sectionUids.has(section.uid)) {
13147                continue;
13148            }
13149            _this.sectionToDetailMap.set(section.uid, section);
13150        }
13151        return _this;
13152    }
13153    CommunicationNotificationItem.getIsPartOfThread = function (threadUid) {
13154        return function (notification) {
13155            return notification.getThreadUid() === threadUid && !notification.isRead;
13156        };
13157    };
13158    CommunicationNotificationItem.generateLookUpKey = function (topicUid, threadOwnerUid) {
13159        return [topicUid, threadOwnerUid, CommunicationNotificationItem.NOTIFICATION_TYPE].join(',');
13160    };
13161    CommunicationNotificationItem.prototype.getTitle = function () {
13162        if (this.context.senderInfo == null) {
13163            return 'Display Name Not Available';
13164        }
13165        return this.context.senderInfo.firstName + ' ' + this.context.senderInfo.lastName;
13166    };
13167    CommunicationNotificationItem.prototype.getSections = function () {
13168        return Array.from(this.sectionToDetailMap.values());
13169    };
13170    CommunicationNotificationItem.prototype.getPostedAt = function () {
13171        return new Date(this.context.activity.message.sentAt);
13172    };
13173    CommunicationNotificationItem.prototype.getThreadType = function () {
13174        return this.context.activity.threadType;
13175    };
13176    CommunicationNotificationItem.prototype.getUserType = function () {
13177        return this.context.userType;
13178    };
13179    CommunicationNotificationItem.prototype.getTopicUid = function () {
13180        return this.context.activity.topicUid;
13181    };
13182    CommunicationNotificationItem.prototype.getTopicOrOwnerUid = function () {
13183        if (this.context.userType === 'TEACHER') {
13184            return this.context.activity.topicUid;
13185        }
13186        return this.context.activity.threadOwnerUid;
13187    };
13188    CommunicationNotificationItem.prototype.getTooltip = function () {
13189        return pds_i18n_1.pdsI18n.getText('pds|notifications|Messages regarding xx', { name: this.getTitle() });
13190    };
13191    CommunicationNotificationItem.prototype.getThreadUid = function () {
13192        return this.context.activity.message.threadUid;
13193    };
13194    Object.defineProperty(CommunicationNotificationItem.prototype, "lookUpKey", {
13195        get: function () {
13196            return CommunicationNotificationItem.generateLookUpKey(this.context.activity.topicUid, this.context.activity.threadOwnerUid);
13197        },
13198        enumerable: true,
13199        configurable: true
13200    });
13201    Object.defineProperty(CommunicationNotificationItem.prototype, "message", {
13202        get: function () {
13203            return this.context.activity.message;
13204        },
13205        enumerable: true,
13206        configurable: true
13207    });
13208    Object.defineProperty(CommunicationNotificationItem.prototype, "threadUid", {
13209        get: function () {
13210            return this.context.activity.message.threadUid;
13211        },
13212        enumerable: true,
13213        configurable: true
13214    });
13215    Object.defineProperty(CommunicationNotificationItem.prototype, "currentUserUid", {
13216        get: function () {
13217            return this.context.currentUserUid;
13218        },
13219        enumerable: true,
13220        configurable: true
13221    });
13222    Object.defineProperty(CommunicationNotificationItem.prototype, "getstreamGroupId", {
13223        get: function () {
13224            return this.context.getStreamGroupId;
13225        },
13226        enumerable: true,
13227        configurable: true
13228    });
13229    CommunicationNotificationItem.NOTIFICATION_TYPE = 'COMMUNICATION_NOTIFICATION';
13230    return CommunicationNotificationItem;
13231}(notification_item_1.NotificationItem));
13232exports.CommunicationNotificationItem = CommunicationNotificationItem;
13233
13234
13235
13236/***/ }),
13237/* 92 */
13238/***/ (function(module, exports, __webpack_require__) {
13239
13240"use strict";
13241
13242Object.defineProperty(exports, "__esModule", { value: true });
13243var rxjs_1 = __webpack_require__(19);
13244var operators_1 = __webpack_require__(17);
13245var pds_http_utils_1 = __webpack_require__(44);
13246var ChatThreadService = (function () {
13247    function ChatThreadService() {
13248    }
13249    ChatThreadService.prototype.fetchParentParticipants = function (hostUrl, studentUid) {
13250        return pds_http_utils_1.pdsHttpUtils.get(hostUrl + ("/navigation/v1/student/" + studentUid + "/parents"), {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_1.map(function (response) {
13251            return JSON.parse(response.data).map(function (parent) { return { userUid: parent.uid, userType: 'PARENT' }; });
13252        }));
13253    };
13254    ChatThreadService.prototype.fetchTopicThread = function (hostUrl, thread) {
13255        var _this = this;
13256        var queryParams = {
13257            'topicUid': thread.topicUid,
13258            'threadType': String(thread.threadType),
13259            'ownerUid': thread.ownerUid
13260        };
13261        return pds_http_utils_1.pdsHttpUtils.get(hostUrl + '/communication/v1/topic_thread', queryParams, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_1.mergeMap(function (response) {
13262            if (response.status === 204) {
13263                return _this.createTopicThread(hostUrl, thread);
13264            }
13265            return rxjs_1.of(JSON.parse(response.data));
13266        }), operators_1.catchError(function (err, sourceObs) {
13267            if (err.status === 204) {
13268                return _this.createTopicThread(hostUrl, thread);
13269            }
13270            return sourceObs;
13271        }));
13272    };
13273    ChatThreadService.prototype.createTopicThread = function (hostUrl, thread) {
13274        return pds_http_utils_1.pdsHttpUtils.post(hostUrl + '/communication/v1/thread', thread, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_1.map(function (response) {
13275            return JSON.parse(response.data);
13276        }));
13277    };
13278    return ChatThreadService;
13279}());
13280exports.ChatThreadService = ChatThreadService;
13281
13282
13283
13284/***/ }),
13285/* 93 */
13286/***/ (function(module, exports, __webpack_require__) {
13287
13288"use strict";
13289
13290Object.defineProperty(exports, "__esModule", { value: true });
13291var popover_accessibility_controller_1 = __webpack_require__(180);
13292exports.PopoverAccessibilityControllerFactory = {
13293    getPopoverAccessibilityControllerInstance: function () {
13294        return new popover_accessibility_controller_1.PopoverAccessibilityController();
13295    }
13296};
13297
13298
13299
13300/***/ }),
13301/* 94 */
13302/***/ (function(module, exports, __webpack_require__) {
13303
13304"use strict";
13305
13306var ScoreIf = (function () {
13307    function ScoreIf() {
13308    }
13309    return ScoreIf;
13310}());
13311exports.ScoreIf = ScoreIf;
13312
13313
13314
13315/***/ }),
13316/* 95 */
13317/***/ (function(module, exports, __webpack_require__) {
13318
13319"use strict";
13320
13321var i18n_util_1 = __webpack_require__(30);
13322/**
13323 * This class purposefully has functions that match those from Date.
13324 * The reason is so someone wanting to pass a Date object into the pds-time-widget, or the
13325 * validation engine time rules they can do so and the code won't break.
13326 */
13327var SimpleTime = (function () {
13328    function SimpleTime(hours, minutes) {
13329        if (typeof hours === 'number') {
13330            this.setHours(hours);
13331            this.setMinutes(minutes || 0);
13332        }
13333        else if (typeof hours === 'string') {
13334            var t = i18n_util_1.i18n.parse24HourTime(hours);
13335            if (t != null) {
13336                this.set(t);
13337            }
13338        }
13339        else {
13340            this.setHours(0);
13341            this.setMinutes(0);
13342        }
13343    }
13344    SimpleTime.prototype.to24HourTime = function () {
13345        var hours = this.getHours();
13346        var minutes = this.getMinutes();
13347        if (hours < 10) {
13348            hours = '0' + hours;
13349        }
13350        if (minutes < 10) {
13351            minutes = '0' + minutes;
13352        }
13353        return hours + ':' + minutes;
13354    };
13355    SimpleTime.prototype.getHours = function () {
13356        return this.hours;
13357    };
13358    SimpleTime.prototype.getMinutes = function () {
13359        return this.minutes;
13360    };
13361    SimpleTime.prototype.setHours = function (hours) {
13362        var hrs = hours % 24;
13363        if (hrs >= 0) {
13364            this.hours = hrs;
13365        }
13366        else {
13367            //24 - hrs, but hrs is already negative
13368            this.hours = 24 + hrs;
13369        }
13370    };
13371    SimpleTime.prototype.setMinutes = function (minutes) {
13372        var overHours = Math.floor(minutes / 60);
13373        this.setHours(this.hours + overHours);
13374        var min = minutes % 60;
13375        if (min >= 0) {
13376            this.minutes = min;
13377        }
13378        else {
13379            //60 - min, but min is already negative
13380            this.minutes = 60 + min;
13381        }
13382    };
13383    SimpleTime.prototype.getTime = function () {
13384        return (this.hours * 60 + this.getMinutes()) * 60000;
13385    };
13386    SimpleTime.prototype.set = function (time) {
13387        this.setHours(time.getHours());
13388        this.setMinutes(time.getMinutes());
13389    };
13390    return SimpleTime;
13391}());
13392exports.SimpleTime = SimpleTime;
13393
13394
13395
13396/***/ }),
13397/* 96 */
13398/***/ (function(module, exports, __webpack_require__) {
13399
13400"use strict";
13401
13402// this email regex pass with 99.99% verification: http://emailregex.com/
13403var VALID_EMAIL_REGEX = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
13404// According to RFC section 2, the email validation above missed some cases
13405// https://tools.ietf.org/html/rfc3696#section-2%
13406var INVALID_RFC_EMAIL_REGEX = /@-|@.*\.-|@.*-\./;
13407var EmailUtil;
13408(function (EmailUtil) {
13409    // this email regex pass with 99.99% verification: http://emailregex.com/
13410    function validateEmail(email) {
13411        var result = false;
13412        if (VALID_EMAIL_REGEX.test(email) && !INVALID_RFC_EMAIL_REGEX.test(email)) {
13413            result = true;
13414        }
13415        return result;
13416    }
13417    EmailUtil.validateEmail = validateEmail;
13418})(EmailUtil = exports.EmailUtil || (exports.EmailUtil = {}));
13419
13420
13421
13422/***/ }),
13423/* 97 */
13424/***/ (function(module, exports, __webpack_require__) {
13425
13426"use strict";
13427
13428var validation_engine_1 = __webpack_require__(98);
13429var number_util_1 = __webpack_require__(63);
13430var roundToPrecision = number_util_1.NumberUtil.roundToPrecision;
13431var i18n_util_1 = __webpack_require__(30);
13432var PLUS_MINUS_REGEX = /[+\-]$/;
13433var PRECISION = 6;
13434var GradeScaleUtil;
13435(function (GradeScaleUtil) {
13436    function buildGradeScaleHierarchyRIs(rawItems) {
13437        return _buildGradeScaleHierarchyRIs(rawItems, false);
13438    }
13439    GradeScaleUtil.buildGradeScaleHierarchyRIs = buildGradeScaleHierarchyRIs;
13440    function buildSpecialGradeScaleHierarchyRIs(rawItems) {
13441        return _buildGradeScaleHierarchyRIs(rawItems, true);
13442    }
13443    GradeScaleUtil.buildSpecialGradeScaleHierarchyRIs = buildSpecialGradeScaleHierarchyRIs;
13444    function _buildGradeScaleHierarchyRIs(rawItems, isSpecialScale) {
13445        var scaleToScaleObjectMap = new Map();
13446        var scaleToItemObjectsMap = new Map();
13447        for (var _i = 0, rawItems_1 = rawItems; _i < rawItems_1.length; _i++) {
13448            var rawItem = rawItems_1[_i];
13449            var scaleUidKey = rawItem.gradeScaleUid;
13450            // creating GradeScaleRI object
13451            if (!scaleToScaleObjectMap.has(scaleUidKey)) {
13452                var scale = {
13453                    uid: rawItem.gradeScaleUid,
13454                    name: rawItem.gradeScaleName,
13455                    description: rawItem.gradeScaleDescription,
13456                    gradeScaleType: rawItem.gradeScaleType,
13457                    colorLevels: rawItem.colorLevels,
13458                    numericMax: rawItem.numericMax,
13459                    numericMin: rawItem.numericMin,
13460                    numericDecimals: rawItem.numericDecimals,
13461                    numericExtras: rawItem.numericExtras,
13462                    conversionToNumeric: rawItem.conversionToNumeric,
13463                    specialGradeScaleUid: rawItem.specialGradeScaleUid,
13464                    gradeScaleItems: []
13465                };
13466                scaleToScaleObjectMap.set(scaleUidKey, scale);
13467            }
13468            // creating GradeScaleItemRI objects
13469            if (!scaleToItemObjectsMap.has(scaleUidKey)) {
13470                scaleToItemObjectsMap.set(scaleUidKey, []);
13471            }
13472            var createdItem = isSpecialScale ? buildSpecialGradeScaleItemRI(rawItem) : buildGradeScaleItemRI(rawItem);
13473            if (createdItem != null) {
13474                scaleToItemObjectsMap.get(rawItem.gradeScaleUid).push(createdItem);
13475            }
13476        }
13477        var scales = Array.from(scaleToScaleObjectMap.values()).map(function (scale) {
13478            scale.gradeScaleItems = sortGradeScaleItems(scaleToItemObjectsMap.get(scale.uid) || []);
13479            return scale;
13480        });
13481        return sortGradeScales(scales);
13482    }
13483    function buildGradeScaleItemRI(rawItem) {
13484        if (rawItem.gradeScaleItemUid != null) {
13485            return {
13486                uid: rawItem.gradeScaleItemUid,
13487                name: rawItem.gradeScaleItemName,
13488                description: rawItem.gradeScaleItemDescription,
13489                color: rawItem.gradeScaleItemColor,
13490                numericCutOff: rawItem.gradeScaleItemNumericCutOff,
13491                cutOffPercentage: rawItem.gradeScaleItemCutOffPercentage,
13492                numericValue: rawItem.gradeScaleItemNumericValue,
13493                percentValue: rawItem.gradeScaleItemPercentValue,
13494                isProficient: rawItem.gradeScaleItemIsProficient === 1,
13495                displayPosition: rawItem.gradeScaleItemDisplayPosition
13496            };
13497        }
13498        return undefined;
13499    }
13500    GradeScaleUtil.buildGradeScaleItemRI = buildGradeScaleItemRI;
13501    function buildSpecialGradeScaleItemRI(rawItem) {
13502        var item = buildGradeScaleItemRI(rawItem);
13503        if (item != null && rawItem.gradeScaleItemUid != null) {
13504            var specialItem = item;
13505            specialItem.isAbsent = rawItem.gradeScaleItemIsAbsent === 1;
13506            specialItem.isCollected = rawItem.gradeScaleItemIsCollected === 1;
13507            specialItem.isExempt = rawItem.gradeScaleItemIsExempt === 1;
13508            specialItem.isIncomplete = rawItem.gradeScaleItemIsIncomplete === 1;
13509            specialItem.isLate = rawItem.gradeScaleItemIsLate === 1;
13510            specialItem.isMissing = rawItem.gradeScaleItemIsMissing === 1;
13511            specialItem.isScoreCodeOnAssignments = rawItem.gradeScaleItemIsScoreCodeOnAssignments === 1;
13512            specialItem.numericType = (rawItem.specialNumericType === 'Max' || rawItem.specialNumericType === 'Min' || rawItem.specialNumericType === 'Custom') ? rawItem.specialNumericType.toUpperCase() : undefined;
13513            specialItem.numericValue = rawItem.specialNumericValue;
13514            specialItem.percentValue = rawItem.specialPercentValue;
13515            specialItem.displayPosition = rawItem.gradeScaleItemDisplayPosition;
13516            return specialItem;
13517        }
13518        return undefined;
13519    }
13520    GradeScaleUtil.buildSpecialGradeScaleItemRI = buildSpecialGradeScaleItemRI;
13521    // sort GradeScaleItems by descending order by default
13522    function sortGradeScaleItems(scaleItems) {
13523        scaleItems.sort(function (a, b) {
13524            // The sorting below follows the sorting used in PowerSchool SIS' Edit Grade Scale page.
13525            // 1. Sort by cutoff percentage in descending order
13526            if (a.cutOffPercentage !== b.cutOffPercentage) {
13527                return b.cutOffPercentage - a.cutOffPercentage;
13528            }
13529            // 2. Sort by display position in descending order.  The one marked display position > 0 is the default zero cutoff.
13530            var aDisplayPos = a.displayPosition || 0;
13531            var bDisplayPos = b.displayPosition || 0;
13532            if (aDisplayPos - bDisplayPos) {
13533                return bDisplayPos - aDisplayPos;
13534            }
13535            // 3. Sort by grade scale item name in ascending order
13536            return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
13537        });
13538        return scaleItems;
13539    }
13540    GradeScaleUtil.sortGradeScaleItems = sortGradeScaleItems;
13541    // sort GradeScales by alphabetic order by default
13542    function sortGradeScales(scales) {
13543        scales.sort(function (a, b) {
13544            return a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1;
13545        });
13546        return scales;
13547    }
13548    GradeScaleUtil.sortGradeScales = sortGradeScales;
13549    /**
13550     * Main Function used by UI (hopefully serverside can use it too).
13551     * GradeScaleScore -> TypedScore
13552     */
13553    function convertGradeScaleItemToScoreOfType(gradeScaleItemToConvert, gradeScale, convertTo, roundNumbers, calcRelationship, pointsPossible) {
13554        if (calcRelationship === void 0) { calcRelationship = 'GRADESCALE'; }
13555        if (gradeScaleItemToConvert == null) {
13556            return;
13557        }
13558        var value;
13559        if (convertTo === 'GRADESCALE') {
13560            //Gradescale to gradescale is EASY!  Just return the item!!!
13561            return gradeScaleItemToConvert;
13562        }
13563        if (gradeScale.gradeScaleType === 'NUMERIC') {
13564            switch (convertTo) {
13565                case 'POINTS':
13566                    if (pointsPossible == null) {
13567                        return;
13568                    }
13569                    value = convertNumericGradeScaleItemToPoints(gradeScaleItemToConvert, gradeScale, calcRelationship, pointsPossible, roundNumbers);
13570                    break;
13571                case 'PERCENT':
13572                    value = convertNumericGradeScaleItemToPercent(gradeScaleItemToConvert, gradeScale, roundNumbers);
13573                    break;
13574                case 'COLLECTED_ONLY':
13575                    break;
13576                default:
13577                    break;
13578            }
13579        }
13580        else {
13581            //gradeScale.gradeScaleType === 'ALPHA'
13582            switch (convertTo) {
13583                case 'POINTS':
13584                    if (pointsPossible == null) {
13585                        return;
13586                    }
13587                    value = convertGradeScaleItemToPoints(gradeScaleItemToConvert, gradeScale, pointsPossible, roundNumbers);
13588                    break;
13589                case 'PERCENT':
13590                    value = convertGradeScaleItemToPercent(gradeScaleItemToConvert, gradeScale, roundNumbers);
13591                    break;
13592                case 'COLLECTED_ONLY':
13593                    break;
13594                default:
13595                    break;
13596            }
13597        }
13598        if (value == null) {
13599            return;
13600        }
13601        return String(value);
13602    }
13603    GradeScaleUtil.convertGradeScaleItemToScoreOfType = convertGradeScaleItemToScoreOfType;
13604    /**
13605     * Main Function used by UI (hopefully serverside can use it too).
13606     * TypedScore -> GradeScaleScore
13607     */
13608    function convertScoreOfTypeToGradeScaleItem(scoreValue, gradeScale, convertFrom, roundNumbers, calcRelationship, pointsPossible) {
13609        if (calcRelationship === void 0) { calcRelationship = 'GRADESCALE'; }
13610        if (scoreValue == null) {
13611            return;
13612        }
13613        //This ONLY returns a GSI if the current scoreValue cannot be used as is.
13614        var specialGradeScaleItem = getSpecialGradeScaleItem(scoreValue, gradeScale, convertFrom);
13615        if (specialGradeScaleItem != null) {
13616            var specialValue = convertSpecialGradeScaleItemTo(specialGradeScaleItem, gradeScale, 'GRADESCALE', true, calcRelationship, pointsPossible);
13617            if (specialValue == null) {
13618                return;
13619            }
13620            else {
13621                return String(specialValue);
13622            }
13623        }
13624        if (convertFrom === 'GRADESCALE') {
13625            //Gradescale to gradescale is EASY!  Just return the item!!!
13626            return scoreValue;
13627        }
13628        if (gradeScale.gradeScaleType === 'NUMERIC') {
13629            switch (convertFrom) {
13630                case 'POINTS':
13631                    if (pointsPossible == null) {
13632                        return;
13633                    }
13634                    return convertPointsToNumericGradeScaleItem(Number(scoreValue), pointsPossible, gradeScale, calcRelationship, roundNumbers);
13635                case 'PERCENT':
13636                    return convertPercentToNumericGradeScaleItem(Number(scoreValue), gradeScale, roundNumbers);
13637                case 'COLLECTED_ONLY':
13638                    break;
13639                default:
13640                    break;
13641            }
13642        }
13643        else {
13644            //gradeScale.gradeScaleType === 'ALPHA'
13645            switch (convertFrom) {
13646                case 'POINTS':
13647                    if (pointsPossible == null) {
13648                        return;
13649                    }
13650                    return convertPointsToGradeScaleItem(Number(scoreValue), pointsPossible, gradeScale);
13651                case 'PERCENT':
13652                    return convertPercentToGradeScaleItem(Number(scoreValue), gradeScale);
13653                case 'COLLECTED_ONLY':
13654                    break;
13655                default:
13656                    break;
13657            }
13658        }
13659    }
13660    GradeScaleUtil.convertScoreOfTypeToGradeScaleItem = convertScoreOfTypeToGradeScaleItem;
13661    /**
13662     * Works for any grade scale, but if the exact item is not found then it returns undefined.
13663     */
13664    function getGradeScaleItem(gradeScaleItemString, gradeScale) {
13665        if (gradeScaleItemString == null || gradeScale == null) {
13666            return;
13667        }
13668        var gradeScaleItemUpperCaseString = gradeScaleItemString.toUpperCase();
13669        for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
13670            var gradeScaleItem = _a[_i];
13671            if (gradeScaleItem.name.toUpperCase() === gradeScaleItemUpperCaseString) {
13672                return gradeScaleItem;
13673            }
13674        }
13675    }
13676    GradeScaleUtil.getGradeScaleItem = getGradeScaleItem;
13677    function convertNumericValueToNumericValue(numericValue, gradeScale) {
13678        if (numericValue == null) {
13679            return;
13680        }
13681        for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
13682            var gradeScaleItem = _a[_i];
13683            if (gradeScaleItem.numericCutOff <= numericValue) {
13684                return gradeScaleItem.numericValue;
13685            }
13686        }
13687    }
13688    GradeScaleUtil.convertNumericValueToNumericValue = convertNumericValueToNumericValue;
13689    function convertNumericValueTo(convertTo, numericValue, numericGradeScale, calcRelationship, roundNumbers, pointsPossible) {
13690        if (convertTo == null || numericValue == null || numericGradeScale == null) {
13691            return;
13692        }
13693        if (convertTo === 'GRADESCALE' && (hasNumericDecimals(numericGradeScale) || numericGradeScale.conversionToNumeric === 'PERCENT')) {
13694            return number_util_1.NumberUtil.round(numericValue, (hasNumericDecimals(numericGradeScale) ? numericGradeScale.numericDecimals : 2));
13695        }
13696        if (numericGradeScale.gradeScaleType !== 'NUMERIC') {
13697            console.error('convertNumericValueTo expects a Numeric gradeScaleType');
13698            return;
13699        }
13700        switch (convertTo) {
13701            case 'POINTS':
13702            case 'PERCENT':
13703                return convertGradeScaleItemToScoreOfType(String(numericValue), numericGradeScale, convertTo, roundNumbers, calcRelationship, pointsPossible);
13704            case 'GRADESCALE':
13705                var gradeScaleItem = numericGradeScale.gradeScaleItems.find(function (gradeScaleItem) {
13706                    return gradeScaleItem.numericCutOff <= numericValue;
13707                });
13708                if (gradeScaleItem == null) {
13709                    return;
13710                }
13711                if (!isNaN(gradeScaleItem.name)) {
13712                    return Number(gradeScaleItem.name);
13713                }
13714                else {
13715                    return gradeScaleItem.name;
13716                }
13717            default: //shut up tslint
13718        }
13719    }
13720    GradeScaleUtil.convertNumericValueTo = convertNumericValueTo;
13721    function convertNumericGradeScaleItemToNumericValue(gradeScaleItem, gradeScale) {
13722        if (gradeScaleItem == null) {
13723            return;
13724        }
13725        if (!isNaN(gradeScaleItem)) {
13726            return Number(gradeScaleItem);
13727        }
13728        else {
13729            var item = getGradeScaleItem(gradeScaleItem, gradeScale);
13730            if (item != null) {
13731                return item.numericValue;
13732            }
13733        }
13734    }
13735    GradeScaleUtil.convertNumericGradeScaleItemToNumericValue = convertNumericGradeScaleItemToNumericValue;
13736    /**
13737     * Gets the numeric grade scale item. If not found and the gradeScaleItemString is something that is numeric and larger
13738     * or smaller than the max and min. Then the numeric max or min will be returned.
13739     */
13740    function getNumericGradeScaleItem(gradeScaleItemString, gradeScale) {
13741        if (gradeScaleItemString == null) {
13742            return;
13743        }
13744        var gradeScaleItem = getGradeScaleItem(gradeScaleItemString, gradeScale);
13745        if (gradeScaleItem != null) {
13746            return gradeScaleItem;
13747        }
13748        if (gradeScaleItemString !== '' &&
13749            gradeScaleItemString !== String(gradeScale.numericMax) &&
13750            gradeScaleItemString !== String(gradeScale.numericMin)) {
13751            gradeScaleItemString = gradeScaleItemString.replace(PLUS_MINUS_REGEX, '');
13752            if (!isNaN(gradeScaleItemString)) {
13753                var itemAsNumber = Number(gradeScaleItemString);
13754                if (itemAsNumber > gradeScale.numericMax) {
13755                    return getGradeScaleItem(String(gradeScale.numericMax), gradeScale);
13756                }
13757                if (itemAsNumber < gradeScale.numericMin) {
13758                    return getGradeScaleItem(String(gradeScale.numericMin), gradeScale);
13759                }
13760            }
13761        }
13762    }
13763    GradeScaleUtil.getNumericGradeScaleItem = getNumericGradeScaleItem;
13764    //This works for both ALPHA.  Call convertNumericGradeScalItemToPercent if you want that.
13765    //The percent returned is from 0 - 100
13766    function convertGradeScaleItemToPercent(gradeScaleItemToConvert, gradeScale, roundNumber) {
13767        if (gradeScaleItemToConvert == null) {
13768            return;
13769        }
13770        var gradeScaleItem = getGradeScaleItem(gradeScaleItemToConvert, gradeScale);
13771        if (gradeScaleItem != null) {
13772            return roundToPrecision(gradeScaleItem.percentValue, 2, PRECISION, roundNumber);
13773        }
13774    }
13775    GradeScaleUtil.convertGradeScaleItemToPercent = convertGradeScaleItemToPercent;
13776    function convertNumericGradeScaleItemToPercent(gradeScaleItemToConvert, gradeScale, roundNumber) {
13777        if (gradeScaleItemToConvert == null) {
13778            return;
13779        }
13780        var gradeScaleItem = getNumericGradeScaleItem(gradeScaleItemToConvert, gradeScale);
13781        if (gradeScaleItem != null) {
13782            return roundToPrecision(gradeScaleItem.percentValue, 2, PRECISION, roundNumber);
13783        }
13784        //if we can't find it, try to convert using ratios.
13785        return convertCalculatedNumericValueToPercentUsingRatios(gradeScaleItemToConvert, gradeScale, roundNumber);
13786    }
13787    GradeScaleUtil.convertNumericGradeScaleItemToPercent = convertNumericGradeScaleItemToPercent;
13788    function convertGradeScaleItemToPoints(gradeScaleItemToConvert, gradeScale, pointsPossible, roundNumber) {
13789        if (gradeScaleItemToConvert == null) {
13790            return;
13791        }
13792        var percent = convertGradeScaleItemToPercent(gradeScaleItemToConvert, gradeScale, false);
13793        if (percent == null) {
13794            return;
13795        }
13796        return roundToPrecision(percent / 100 * pointsPossible, 2, PRECISION, roundNumber);
13797    }
13798    GradeScaleUtil.convertGradeScaleItemToPoints = convertGradeScaleItemToPoints;
13799    /**
13800     * @returns points
13801     */
13802    function convertNumericGradeScaleItemToPoints(gradeScaleItemToConvert, gradeScale, calcRelationship, pointsPossible, roundNumber) {
13803        if (gradeScaleItemToConvert == null) {
13804            return;
13805        }
13806        if (calcRelationship === 'LEVELS') {
13807            var gradeScaleItemAsNumber = void 0;
13808            var gradeScaleItem = getNumericGradeScaleItem(gradeScaleItemToConvert, gradeScale);
13809            if (gradeScaleItem != null) {
13810                gradeScaleItemAsNumber = gradeScaleItem.numericValue;
13811            }
13812            else if (!isNaN(gradeScaleItemToConvert)) {
13813                gradeScaleItemAsNumber = Number(gradeScaleItemToConvert);
13814            }
13815            if (gradeScaleItemAsNumber != null) {
13816                if (gradeScaleItemAsNumber > gradeScale.numericMax) {
13817                    gradeScaleItemAsNumber = gradeScale.numericMax;
13818                }
13819                if (gradeScaleItemAsNumber < gradeScale.numericMin) {
13820                    gradeScaleItemAsNumber = gradeScale.numericMin;
13821                }
13822                return roundToPrecision(pointsPossible * gradeScaleItemAsNumber / gradeScale.numericMax, 2, PRECISION, roundNumber);
13823            }
13824            return; //If we didn't get it right using levels, we just return undefined.
13825        }
13826        //Don't round this, we want all the decimals for the points conversion
13827        var percent = convertNumericGradeScaleItemToPercent(gradeScaleItemToConvert, gradeScale, false);
13828        if (percent != null) {
13829            return roundToPrecision(percent / 100 * pointsPossible, 2, PRECISION, roundNumber);
13830        }
13831    }
13832    GradeScaleUtil.convertNumericGradeScaleItemToPoints = convertNumericGradeScaleItemToPoints;
13833    function convertPointsToGradeScaleItem(points, pointsPossible, gradeScale) {
13834        if (points == null) {
13835            return;
13836        }
13837        //between 0 and 100;
13838        var percent = number_util_1.NumberUtil.round(points / pointsPossible * 100, PRECISION);
13839        return convertPercentToGradeScaleItem(percent, gradeScale);
13840    }
13841    GradeScaleUtil.convertPointsToGradeScaleItem = convertPointsToGradeScaleItem;
13842    //percent between 0 and 100;
13843    function convertPercentToGradeScaleItem(percent, gradeScale) {
13844        if (percent == null) {
13845            return;
13846        }
13847        for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
13848            var gradeScaleItem = _a[_i];
13849            if (gradeScaleItem.cutOffPercentage <= percent) {
13850                return gradeScaleItem.name;
13851            }
13852        }
13853    }
13854    GradeScaleUtil.convertPercentToGradeScaleItem = convertPercentToGradeScaleItem;
13855    //percent between 0 and 100
13856    function convertPercentToNumericGradeScaleItem(percent, gradeScale, roundNumber) {
13857        if (percent == null) {
13858            return;
13859        }
13860        if (gradeScale.conversionToNumeric === 'PERCENT' || hasNumericDecimals(gradeScale)) {
13861            return convertPercentToNumericGradeScaleItemUsingRatios(percent, gradeScale, roundNumber);
13862        }
13863        else {
13864            return convertPercentToGradeScaleItem(percent, gradeScale);
13865        }
13866    }
13867    GradeScaleUtil.convertPercentToNumericGradeScaleItem = convertPercentToNumericGradeScaleItem;
13868    function convertPointsToNumericGradeScaleItem(points, pointsPossible, gradeScale, calcRelationship, roundNumber) {
13869        if (points == null) {
13870            return;
13871        }
13872        var pointsAsPercentOfTotalPercent = number_util_1.NumberUtil.round(points / pointsPossible, PRECISION);
13873        if (calcRelationship === 'LEVELS') {
13874            if (gradeScale.conversionToNumeric === 'PERCENT' || hasNumericDecimals(gradeScale)) {
13875                //This calc will return a decimal answer
13876                var decimals = 2;
13877                if (gradeScale.numericDecimals != null && hasNumericDecimals(gradeScale)) {
13878                    decimals = gradeScale.numericDecimals;
13879                }
13880                //Ratios calc or numeric with decimals
13881                var numericValue = number_util_1.NumberUtil.roundToPrecision(pointsAsPercentOfTotalPercent * gradeScale.numericMax, decimals, PRECISION, roundNumber);
13882                if (gradeScale.numericMax != null && numericValue > gradeScale.numericMax) {
13883                    return String(gradeScale.numericMax);
13884                }
13885                if (gradeScale.numericMin != null && numericValue < gradeScale.numericMin) {
13886                    return String(gradeScale.numericMin);
13887                }
13888                return getMatchedNumericGradeScaleItem(numericValue, gradeScale);
13889            }
13890            else {
13891                //This calc will return something that matches a grade scale item.
13892                for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
13893                    var gradeScaleItem = _a[_i];
13894                    //percent between 0 and 1
13895                    var percent = void 0;
13896                    if (isNaN(gradeScaleItem.name)) {
13897                        percent = number_util_1.NumberUtil.round(gradeScaleItem.numericValue / gradeScale.numericMax, PRECISION);
13898                    }
13899                    else {
13900                        percent = number_util_1.NumberUtil.round(Number(gradeScaleItem.name) / gradeScale.numericMax, PRECISION);
13901                    }
13902                    if (percent <= pointsAsPercentOfTotalPercent) {
13903                        return gradeScaleItem.name;
13904                    }
13905                }
13906                //If we didn't get anything, we just use the last item in the scale.
13907                return gradeScale.gradeScaleItems.slice(-1)[0].name;
13908            }
13909        }
13910        else {
13911            if (gradeScale.conversionToNumeric === 'PERCENT' || hasNumericDecimals(gradeScale)) {
13912                //Ratios calc or numeric with decimals
13913                //This means we return decimal answers.
13914                return convertPercentToNumericGradeScaleItemUsingRatios(pointsAsPercentOfTotalPercent * 100, gradeScale, roundNumber);
13915            }
13916            else {
13917                return convertPointsToGradeScaleItem(points, pointsPossible, gradeScale);
13918            }
13919        }
13920    }
13921    GradeScaleUtil.convertPointsToNumericGradeScaleItem = convertPointsToNumericGradeScaleItem;
13922    function convertPercentToNumericGradeScaleItemUsingRatios(percent, gradeScale, roundNumber) {
13923        if (percent == null) {
13924            return;
13925        }
13926        var calculatedGsi = convertPercentToCalculatedNumericGradeScaleItemUsingRatios(percent, gradeScale, roundNumber);
13927        return getMatchedNumericGradeScaleItem(calculatedGsi, gradeScale);
13928    }
13929    GradeScaleUtil.convertPercentToNumericGradeScaleItemUsingRatios = convertPercentToNumericGradeScaleItemUsingRatios;
13930    function getMatchedNumericGradeScaleItem(numericValue, gradeScale) {
13931        if (numericValue == null) {
13932            return;
13933        }
13934        //If numeric decimals isn't set, or is 0.
13935        if (!gradeScale.numericDecimals) {
13936            //See if I can can find an actual gradeScaleItem.
13937            for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
13938                var gradeScaleItem = _a[_i];
13939                if ((gradeScaleItem.numericValue + .05) >= numericValue &&
13940                    (gradeScaleItem.numericValue - .05) <= numericValue) {
13941                    return gradeScaleItem.name;
13942                }
13943            }
13944        }
13945        return String(numericValue);
13946    }
13947    //percent between 0 and 100
13948    function convertPercentToCalculatedNumericGradeScaleItemUsingRatios(percent, gradeScale, roundNumber) {
13949        if (percent == null) {
13950            return;
13951        }
13952        var numberOfDecimals = gradeScale.numericDecimals ? gradeScale.numericDecimals : 2;
13953        var highGrade = undefined;
13954        var lowGrade = undefined;
13955        var grades = gradeScale.gradeScaleItems;
13956        for (var _i = 0, grades_1 = grades; _i < grades_1.length; _i++) {
13957            var grade = grades_1[_i];
13958            if (percent === grade.cutOffPercentage) {
13959                return grade.numericValue;
13960            }
13961            if (percent > grade.cutOffPercentage) {
13962                lowGrade = grade;
13963                break;
13964            }
13965            else {
13966                highGrade = grade;
13967            }
13968        }
13969        if (lowGrade == null && highGrade == null) {
13970            return roundToPrecision(getDefaultNumericGrade(percent, gradeScale), numberOfDecimals, PRECISION, roundNumber);
13971        }
13972        if (lowGrade != null && highGrade == null) {
13973            return roundToPrecision(lowGrade.numericValue, numberOfDecimals, PRECISION, roundNumber);
13974        }
13975        if (lowGrade == null && highGrade != null) {
13976            return roundToPrecision(highGrade.numericValue, numberOfDecimals, PRECISION, roundNumber);
13977        }
13978        if (lowGrade != null && highGrade != null) {
13979            var high = highGrade.numericValue;
13980            var low = lowGrade.numericValue;
13981            //both aren't null, so now its time to interpolate the new score based on low / high
13982            var highPercent = highGrade.cutOffPercentage;
13983            var lowPercent = lowGrade.cutOffPercentage;
13984            // given a percent score, calculate a score between low and high (numerics)
13985            return roundToPrecision(interpolateForYGivenX(percent, lowPercent, low, highPercent, high), numberOfDecimals, PRECISION, roundNumber);
13986        }
13987    }
13988    GradeScaleUtil.convertPercentToCalculatedNumericGradeScaleItemUsingRatios = convertPercentToCalculatedNumericGradeScaleItemUsingRatios;
13989    //returns 0-100
13990    function convertCalculatedNumericValueToPercentUsingRatios(numericGradeScaleItem, gradeScale, roundNumber) {
13991        if (isNaN(numericGradeScaleItem) || numericGradeScaleItem == null) {
13992            return;
13993        }
13994        var highGrade = undefined;
13995        var lowGrade = undefined;
13996        var gradeScaleItemAsNumber = Number(numericGradeScaleItem);
13997        for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
13998            var grade = _a[_i];
13999            if (numericGradeScaleItem === grade.name) {
14000                return grade.percentValue;
14001            }
14002            if (gradeScaleItemAsNumber > grade.numericValue) {
14003                lowGrade = grade;
14004                break;
14005            }
14006            else {
14007                highGrade = grade;
14008            }
14009        }
14010        if (lowGrade == null && highGrade == null) {
14011            return roundToPrecision(getDefaultNumericGrade(0, gradeScale), 2, PRECISION, roundNumber);
14012        }
14013        if (lowGrade != null && highGrade == null) {
14014            return roundToPrecision(lowGrade.percentValue, 2, PRECISION, roundNumber);
14015        }
14016        if (lowGrade == null && highGrade != null) {
14017            return roundToPrecision(highGrade.percentValue, 2, PRECISION, roundNumber);
14018        }
14019        if (lowGrade != null && highGrade != null) {
14020            var high = highGrade.numericValue;
14021            var low = lowGrade.numericValue;
14022            //both aren't null, so now its time to interpolate the new score based on low / high
14023            var highPercent = highGrade.percentValue;
14024            var lowPercent = lowGrade.percentValue;
14025            // given a percent score, calculate a score between low and high (numerics)
14026            return roundToPrecision(interpolateForYGivenX(gradeScaleItemAsNumber, low, lowPercent, high, highPercent), 2, PRECISION, roundNumber);
14027        }
14028    }
14029    GradeScaleUtil.convertCalculatedNumericValueToPercentUsingRatios = convertCalculatedNumericValueToPercentUsingRatios;
14030    function getDefaultNumericGrade(percent, scale) {
14031        //TODO: Brent will add some special logic in here.
14032        return scale.numericMin;
14033    }
14034    GradeScaleUtil.getDefaultNumericGrade = getDefaultNumericGrade;
14035    /**
14036     * this is a classic linear interpolation. Given a pair of (x,y) points on the gradescale
14037     * and an x value, calculate the new y value.
14038     * See http://en.wikipedia.org/wiki/Linear_interpolation.
14039     * @param x  - The x value (score you know)
14040     * @param x0 - low value on x axis
14041     * @param y0 - low value on y axis
14042     * @param x1 - high value on x axis
14043     * @param y1 - high value on the y axis
14044     * @return y
14045     */
14046    function interpolateForYGivenX(x, x0, y0, x1, y1) {
14047        var y;
14048        try {
14049            y = number_util_1.NumberUtil.round(y0 + (y1 - y0) * (x - x0) / (x1 - x0), PRECISION);
14050        }
14051        catch (e) {
14052            throw 'ArithmeticException Error Interpolating for Y given x, x0, y0, x1, y1: ' + x + ',' + x0 + ',' + y0 + ',' + x1 + ',' + y1;
14053        }
14054        if (isNaN(y) || !isFinite(y)) {
14055            throw 'Not a Number or Infinite result:  Interpolating for Y given x, x0, y0, x1, y1: ' + x + ',' + x0 + ',' + y0 + ',' + x1 + ',' + y1;
14056        }
14057        return y;
14058    }
14059    GradeScaleUtil.interpolateForYGivenX = interpolateForYGivenX;
14060    /**
14061     * @param validationEngine - When calling this on the client side, pass in the validation object so it has the correct
14062     * locale.  No need to pass in on the server side unless there is a specific reason to.
14063     * @param scoreType
14064     * @param gradeScale
14065     * @returns {any}
14066     */
14067    function generateValidators(scoreType, gradeScale, maxPoints, validationEngine) {
14068        if (validationEngine == null) {
14069            validationEngine = new validation_engine_1.ValidationRulesEngine();
14070        }
14071        var validators;
14072        var specialGradeScaleValidator;
14073        if (gradeScale.specialGradeScale != null) {
14074            var specialScale_1 = gradeScale.specialGradeScale;
14075            specialGradeScaleValidator = {
14076                execute: function validateSpecialGradeScale(value, condition, context) {
14077                    var ignoreSubsequentValidators = false;
14078                    if (value != null) {
14079                        var valueUpperCase_1 = value.toUpperCase();
14080                        ignoreSubsequentValidators = specialScale_1.gradeScaleItems.find(function (item) {
14081                            return item.name.toUpperCase() === valueUpperCase_1;
14082                        }) != null;
14083                    }
14084                    return {
14085                        isValid: true,
14086                        ignoreSubsequentValidators: ignoreSubsequentValidators
14087                    };
14088                }
14089            };
14090        }
14091        switch (scoreType) {
14092            case 'POINTS':
14093                validators = validationEngine.getValidatorsForRules({
14094                    isNumber: true,
14095                    minValue: 0,
14096                    maxValue: maxPoints,
14097                    maxDecimals: 2
14098                });
14099                if (specialGradeScaleValidator != null) {
14100                    validators.unshift(specialGradeScaleValidator);
14101                }
14102                // When max points is set to zero, treat any entered value as invalid.
14103                if (maxPoints === 0) {
14104                    validators.unshift({
14105                        execute: function validateMaxPoints(value, condition, context) {
14106                            return {
14107                                isValid: false,
14108                                ignoreSubsequentValidators: true,
14109                                errorMessage: this.i18n.getText('cu|grade scale util|Score entered is greater than maximum points.')
14110                            };
14111                        }
14112                    });
14113                }
14114                return validators;
14115            case 'PERCENT':
14116                validators = validationEngine.getValidatorsForRules({
14117                    isNumber: true,
14118                    minValue: 0,
14119                    maxValue: 200,
14120                    maxDecimals: 2
14121                });
14122                if (specialGradeScaleValidator != null) {
14123                    validators.unshift(specialGradeScaleValidator);
14124                }
14125                return validators;
14126            case 'GRADESCALE':
14127                var validationRules = {};
14128                var preValidator = void 0;
14129                var postValidator = void 0;
14130                if (gradeScale.gradeScaleType === 'NUMERIC') {
14131                    validationRules = {
14132                        isNumber: true,
14133                        maxValue: gradeScale.numericMax,
14134                        minValue: gradeScale.numericMin
14135                    };
14136                    if (gradeScale.numericDecimals != null && hasNumericDecimals(gradeScale)) {
14137                        validationRules.maxDecimals = gradeScale.numericDecimals;
14138                    }
14139                    else if (gradeScale.conversionToNumeric === 'PERCENT') {
14140                        validationRules.maxDecimals = 2;
14141                    }
14142                    var localizedGradeScaleItems_1 = gradeScale.gradeScaleItems.map(function (gradeScaleItem) {
14143                        if (!isNaN(gradeScaleItem.name)) {
14144                            //validationEngine IS defined because if it starts as undefined, one is created right at the beginning of the function.
14145                            var localizedNum = validationEngine.i18n.localizeNumber(Number(gradeScaleItem.name));
14146                            if (localizedNum != null) {
14147                                return localizedNum;
14148                            }
14149                        }
14150                        return gradeScaleItem.name;
14151                    });
14152                    preValidator = {
14153                        execute: function numericScalePreValidator(value, condition, context) {
14154                            var validationResult = {
14155                                isValid: true
14156                            };
14157                            if (localizedGradeScaleItems_1.find(function (gradeScaleItemName) {
14158                                return gradeScaleItemName === value;
14159                            }) != null) {
14160                                //If we find the item, no need to test any of the other rules.
14161                                validationResult.ignoreSubsequentValidators = true;
14162                            }
14163                            return validationResult;
14164                        }
14165                    };
14166                    if (!gradeScale.numericDecimals && gradeScale.conversionToNumeric !== 'PERCENT') {
14167                        postValidator = {
14168                            execute: function numericScalePostValidator(value, condition, context) {
14169                                //Really, if it's not a numeric scale, and not using the Ratios calc, then this should match a grade scale item.
14170                                //It didn't match and exit in the preValidator, so we return false here.
14171                                //So why didn't we just return invalid in the preValidator?  It's because the other numeric rules may still fail
14172                                //before we get to this validator which will give the user a better error message.
14173                                var validationResult = {
14174                                    isValid: false,
14175                                    errorMessage: validationEngine.i18n.getText('cu|grade scale util|Invalid')
14176                                };
14177                                return validationResult;
14178                            }
14179                        };
14180                    }
14181                }
14182                else {
14183                    //* * * * * * ALPHA GRADE SCALES * * * * * *
14184                    validationRules.isText = true;
14185                    validationRules.maxLength = 7;
14186                    preValidator = {
14187                        execute: function alphaScalePreValidator(value, condition, context) {
14188                            var valueUpperCase;
14189                            var isValid = false;
14190                            if (value != null) {
14191                                valueUpperCase = value.toUpperCase();
14192                                isValid = gradeScale.gradeScaleItems.find(function (gradeScaleItem) {
14193                                    return gradeScaleItem.name.toUpperCase() === valueUpperCase;
14194                                }) != null;
14195                            }
14196                            var validationResult = {
14197                                isValid: isValid
14198                            };
14199                            if (!validationResult.isValid) {
14200                                validationResult.errorMessage = validationEngine.i18n.getText('cu|grade scale util|Invalid');
14201                            }
14202                            return validationResult;
14203                        }
14204                    };
14205                }
14206                //Generate the validators
14207                validators = validationEngine.getValidatorsForRules(validationRules);
14208                //Add in the custom validators if applicable.
14209                if (preValidator != null) {
14210                    validators.unshift(preValidator);
14211                }
14212                //Special Scales validate before the preValidator in this case as they do not ever say something is invalid.
14213                if (specialGradeScaleValidator != null) {
14214                    validators.unshift(specialGradeScaleValidator);
14215                }
14216                if (postValidator != null) {
14217                    validators.push(postValidator);
14218                }
14219                return validators;
14220            case 'COLLECTED_ONLY':
14221                validators = [{
14222                        execute: function isEmptyOrUndefined(value, condition, context) {
14223                            var validationResult = {
14224                                isValid: value.length <= 0
14225                            };
14226                            if (!validationResult.isValid) {
14227                                validationResult.errorMessage = validationEngine.i18n.getText('cu|grade scale util|Collected Only assignments cannot accept scores.');
14228                            }
14229                            return validationResult;
14230                        }
14231                    }];
14232                return validators;
14233            default:
14234                return [];
14235        }
14236    }
14237    GradeScaleUtil.generateValidators = generateValidators;
14238    function getColorLevel(gradeScaleScore, gradeScale) {
14239        if (gradeScaleScore == null || gradeScaleScore.trim().length === 0 || gradeScale == null) {
14240            return;
14241        }
14242        var gradeScaleItem;
14243        if (gradeScale.gradeScaleType === 'ALPHA') {
14244            gradeScaleItem = getGradeScaleItem(gradeScaleScore, gradeScale);
14245        }
14246        else {
14247            gradeScaleItem = getNumericGradeScaleItem(gradeScaleScore, gradeScale);
14248            if (gradeScaleItem == null && !isNaN(gradeScaleScore)) {
14249                var itemAsNumber = Number(gradeScaleScore);
14250                for (var _i = 0, _a = gradeScale.gradeScaleItems; _i < _a.length; _i++) {
14251                    var gsi = _a[_i];
14252                    if (itemAsNumber >= gsi.numericCutOff) {
14253                        gradeScaleItem = gsi;
14254                        break;
14255                    }
14256                }
14257            }
14258        }
14259        if (gradeScaleItem != null) {
14260            return gradeScaleItem.color;
14261        }
14262    }
14263    GradeScaleUtil.getColorLevel = getColorLevel;
14264    /**
14265     * Gets the special grade scale item if its applicable for this score.
14266     * Such as, if 'inc' is an item in both the grade scale and the special scale, this method would return undefined.
14267     */
14268    function getSpecialGradeScaleItem(scoreValue, gradeScale, scoreType) {
14269        var specialCode = getGradeScaleItem(scoreValue, gradeScale.specialGradeScale);
14270        if (specialCode == null) {
14271            return;
14272        }
14273        //So we have the item. The question is, is the item part of the normal grade scale.
14274        switch (scoreType) {
14275            case 'POINTS':
14276            case 'PERCENT':
14277                //If the score value is a number so we will assume it is not a special scale item.
14278                if (!isNaN(scoreValue)) {
14279                    return;
14280                }
14281                break;
14282            case 'GRADESCALE':
14283                if (getGradeScaleItem(scoreValue, gradeScale) != null) {
14284                    return;
14285                }
14286                if (gradeScale.gradeScaleType === 'NUMERIC' && !isNaN(scoreValue) && (gradeScale.conversionToNumeric === 'PERCENT' || hasNumericDecimals(gradeScale))) {
14287                    var numericScore = Number(scoreValue);
14288                    if (numericScore >= gradeScale.numericMin &&
14289                        numericScore <= gradeScale.numericMax) {
14290                        //At this point we know the score is a valid numeric value even though it is not one of the grade scale items.
14291                        return;
14292                    }
14293                }
14294                break;
14295            default: //shut up tslint
14296        }
14297        return specialCode;
14298    }
14299    GradeScaleUtil.getSpecialGradeScaleItem = getSpecialGradeScaleItem;
14300    //GradeScaleItem -> points  (needed for inspectorScore.getGrade)
14301    //GradeScaleItem -> percent (needed for inspectorScore.getGrade)
14302    //GradeScaleItem -> NumericGradeScaleItem (as string) (needed for convertToGradeScale)
14303    //GradeScaleItem -> AlphaGradeScaleItem (as string) (needed for convertToGradeScale)
14304    function convertSpecialGradeScaleItemTo(specialGradeScaleItem, gradeScale, convertTo, roundNumbers, calcRelationship, pointsPossible) {
14305        if (specialGradeScaleItem.isExempt) {
14306            //Exempt stuff doesn't convert into anything.
14307            return;
14308        }
14309        switch (convertTo) {
14310            case 'POINTS':
14311                return number_util_1.NumberUtil.roundToPrecision(specialGradeScaleItem.percentValue / 100 * pointsPossible, 2, PRECISION, roundNumbers);
14312            case 'PERCENT':
14313                return number_util_1.NumberUtil.roundToPrecision(specialGradeScaleItem.percentValue, 2, PRECISION, roundNumbers);
14314            case 'GRADESCALE':
14315                if (gradeScale.gradeScaleType === 'ALPHA') {
14316                    return convertPercentToGradeScaleItem(specialGradeScaleItem.percentValue, gradeScale);
14317                }
14318                else {
14319                    if (specialGradeScaleItem.numericType === 'MAX') {
14320                        return gradeScale.numericMax;
14321                    }
14322                    else if (specialGradeScaleItem.numericType === 'MIN') {
14323                        return gradeScale.numericMin;
14324                    }
14325                    else {
14326                        return convertNumericValueTo('GRADESCALE', specialGradeScaleItem.numericValue, gradeScale, calcRelationship, true);
14327                    }
14328                }
14329            default: //shut up tslint
14330        }
14331    }
14332    GradeScaleUtil.convertSpecialGradeScaleItemTo = convertSpecialGradeScaleItemTo;
14333    function hasNumericDecimals(gradeScale) {
14334        if (gradeScale != null && gradeScale.numericDecimals == null) {
14335            return false;
14336        }
14337        return gradeScale.numericDecimals > 0;
14338    }
14339    GradeScaleUtil.hasNumericDecimals = hasNumericDecimals;
14340    function gradeScaleValueExpression(gradeScale, i18nUtil) {
14341        if (i18nUtil == null) {
14342            i18nUtil = new i18n_util_1.I18nUtil();
14343        }
14344        if (gradeScale.gradeScaleType === 'NUMERIC') {
14345            var extras = '';
14346            switch (gradeScale.numericExtras) {
14347                case 'QUARTER_POINT_25':
14348                    extras = ' (' + i18nUtil.localizeNumber(.25) + ')';
14349                    break;
14350                case 'THIRD_POINT_33':
14351                    extras = ' (' + i18nUtil.localizeNumber(.33) + ')';
14352                    break;
14353                case 'HALF_POINT_5':
14354                    extras = ' (' + i18nUtil.localizeNumber(.5) + ')';
14355                    break;
14356                case 'HALF_PLUS':
14357                    extras = ' (+)';
14358                    break;
14359                case 'THIRD_PLUS_MINUS':
14360                    extras = ' (+/-)';
14361                    break;
14362                default:
14363            }
14364            var decimals = gradeScale.numericDecimals ? gradeScale.numericDecimals : 0;
14365            var min = gradeScale.numericMin ? gradeScale.numericMin : 0;
14366            var max = gradeScale.numericMax ? gradeScale.numericMax : 0;
14367            return (i18nUtil.localizeNumber(min, decimals, decimals > 0) + '-' + i18nUtil.localizeNumber(max, decimals, decimals > 0) + extras);
14368        }
14369        else {
14370            return (gradeScale.gradeScaleItems[0].name + '-' + gradeScale.gradeScaleItems[gradeScale.gradeScaleItems.length - 1].name);
14371        }
14372    }
14373    GradeScaleUtil.gradeScaleValueExpression = gradeScaleValueExpression;
14374})(GradeScaleUtil = exports.GradeScaleUtil || (exports.GradeScaleUtil = {}));
14375
14376
14377
14378/***/ }),
14379/* 98 */
14380/***/ (function(module, exports, __webpack_require__) {
14381
14382"use strict";
14383
14384var number_validation_rules_1 = __webpack_require__(119);
14385var date_validation_rules_1 = __webpack_require__(120);
14386var text_validation_rules_1 = __webpack_require__(121);
14387var time_validation_rules_1 = __webpack_require__(122);
14388var string_util_1 = __webpack_require__(64);
14389var i18n_util_1 = __webpack_require__(30);
14390//by using a singleton here, we can avoid creating a brand new object every time.
14391var validResult = {
14392    isValid: true
14393};
14394//The point of this function is to not create a property on the BasicValidationRules object
14395//when the value is undefined, null, or ''.
14396//This is private. (really)
14397//This gets connected to an empty ValidationRules object
14398var setProperty = function (property, value, type) {
14399    if (type === void 0) { type = String; }
14400    var parsedValue;
14401    //Empty values are ignored.
14402    if (value == null || value === '') {
14403        return;
14404    }
14405    if (type === Boolean) {
14406        // this is here because new Boolean('false') evaluates to true
14407        parsedValue = value === 'true';
14408    }
14409    else if (type === Number) {
14410        parsedValue = type(value);
14411    }
14412    else {
14413        parsedValue = new type(value);
14414    }
14415    if (typeof parsedValue === 'number' && isNaN(parsedValue)) {
14416        return;
14417    }
14418    if (parsedValue instanceof Date && isNaN(parsedValue.getTime())) {
14419        return;
14420    }
14421    this[property] = parsedValue;
14422};
14423/**
14424 * This is a collection of static functions that will be used to support a single static function.
14425 *
14426 * pdsValidationRulesEngine.validate(inputString, rules)
14427 *
14428 * example: pdsValidationRulesEngine.validate(12345, {isRequired: true, maxValue: 100, minValue: 0, isInteger: true});
14429 */
14430var ValidationRulesEngine = (function () {
14431    function ValidationRulesEngine() {
14432        this.i18n = i18n_util_1.i18n;
14433    }
14434    // this only needs to be called if you aren't using the singleton i18n object provided by this module.
14435    ValidationRulesEngine.prototype.setI18n = function (i18nObject) {
14436        this.i18n = i18nObject;
14437        number_validation_rules_1.numberValidationRules.i18n = i18nObject;
14438        date_validation_rules_1.dateValidationRules.i18n = i18nObject;
14439        text_validation_rules_1.textValidationRules.i18n = i18nObject;
14440        time_validation_rules_1.timeValidationRules.i18n = i18nObject;
14441    };
14442    // * * * * * * Public Functions * * * * * *
14443    /**
14444     * This is a separate function because it allows for the validators for the set of rules to be cached.
14445     * @param rules
14446     * @private
14447     */
14448    ValidationRulesEngine.prototype.getValidatorsForRules = function (rules) {
14449        var validators = [];
14450        if (rules.isNumber) {
14451            validators = this._getNumberValidators(rules);
14452        }
14453        else if (rules.isDate) {
14454            validators = this._getDateValidators(rules);
14455        }
14456        else if (rules.isText) {
14457            validators = this._getTextValidators(rules);
14458        }
14459        else if (rules.isTime) {
14460            validators = this._getTimeValidators(rules);
14461        }
14462        return validators;
14463    };
14464    ValidationRulesEngine.prototype.validate = function (value, validators) {
14465        //If there are no validators, then it's valid!
14466        if (validators == null || validators.length === 0) {
14467            return {
14468                isValid: true
14469            };
14470        }
14471        //We are assuming that if isRequired would be the first validator.
14472        //If we decide there is a case where something else needs to be run first then
14473        //we can alter this test.
14474        if (validators[0].execute !== this._validateIsRequired &&
14475            (value === '' || value == null)) {
14476            //no value
14477            return {
14478                isValid: true
14479            };
14480        }
14481        var context = {};
14482        for (var _i = 0, validators_1 = validators; _i < validators_1.length; _i++) {
14483            var validator = validators_1[_i];
14484            //NOTE: validator run in the context of the validationRulesEngine
14485            var result = validator.execute.call(this, value, validator.condition, context);
14486            if (result.ignoreSubsequentValidators === true || !result.isValid) {
14487                return result;
14488            }
14489        }
14490        //If we made it here, it's valid.
14491        return {
14492            isValid: true
14493        };
14494    };
14495    ValidationRulesEngine.prototype.validateWithRules = function (value, rules) {
14496        var validators = this.getValidatorsForRules(rules);
14497        //console.log('validators.length: ' + validators.length);
14498        return this.validate(value, validators);
14499    };
14500    ValidationRulesEngine.prototype.getBasicValidationRules = function () {
14501        return {
14502            setProperty: setProperty
14503        };
14504    };
14505    //* * * * * Validator Functions * * * * *
14506    ValidationRulesEngine.prototype._validateIsRequired = function (input, condition, context) {
14507        if (input == null || input.trim().length === 0) {
14508            return {
14509                isValid: false,
14510                errorMessage: this.i18n.getText('cu|required'),
14511                invalidRule: 'isRequired'
14512            };
14513        }
14514        else {
14515            return validResult;
14516        }
14517    };
14518    //* * * * * GetValidators functions * * * * * * *
14519    ValidationRulesEngine.prototype._getNumberValidators = function (rules) {
14520        //console.log('gettign number validators');
14521        var validators = [];
14522        if (rules.isRequired) {
14523            validators.push({
14524                execute: this._validateIsRequired
14525            });
14526        }
14527        //No if here. If it's a number, it needs to be a valid number.
14528        validators.push({
14529            execute: number_validation_rules_1.numberValidationRules.validateIsNumber
14530        });
14531        if (rules.isInteger) {
14532            validators.push({
14533                execute: number_validation_rules_1.numberValidationRules.validateIsInteger
14534            });
14535        }
14536        if (rules.maxValue != null && typeof rules.maxValue !== 'string') {
14537            validators.push({
14538                execute: number_validation_rules_1.numberValidationRules.validateMaxNumberValue,
14539                condition: rules.maxValue
14540            });
14541        }
14542        if (rules.minValue != null && typeof rules.minValue !== 'string') {
14543            validators.push({
14544                execute: number_validation_rules_1.numberValidationRules.val
14544idateMinNumberValue,
14545                condition: rules.minValue
14546            });
14547        }
14548        if (rules.maxValueExclusive != null && typeof rules.maxValueExclusive !== 'string') {
14549            validators.push({
14550                execute: number_validation_rules_1.numberValidationRules.validateMaxNumberValueExclusive,
14551                condition: rules.maxValueExclusive
14552            });
14553        }
14554        if (rules.minValueExclusive != null && typeof rules.minValueExclusive !== 'string') {
14555            validators.push({
14556                execute: number_validation_rules_1.numberValidationRules.validateMinNumberValueExclusive,
14557                condition: rules.minValueExclusive
14558            });
14559        }
14560        if (rules.maxLength != null) {
14561            validators.push({
14562                execute: number_validation_rules_1.numberValidationRules.validateMaxNumberLength,
14563                condition: rules.maxLength
14564            });
14565        }
14566        if (rules.minLength != null) {
14567            validators.push({
14568                execute: number_validation_rules_1.numberValidationRules.validateMinNumberLength,
14569                condition: rules.minLength
14570            });
14571        }
14572        if (rules.maxDecimals != null) {
14573            validators.push({
14574                execute: number_validation_rules_1.numberValidationRules.validateMaxDecimals,
14575                condition: rules.maxDecimals
14576            });
14577        }
14578        return validators;
14579    };
14580    ValidationRulesEngine.prototype._getDateValidators = function (rules) {
14581        //console.log('getting date validators');
14582        var validators = [];
14583        if (rules.isRequired) {
14584            validators.push({
14585                execute: this._validateIsRequired
14586            });
14587        }
14588        validators.push({
14589            execute: date_validation_rules_1.dateValidationRules.validateIsDate
14590        });
14591        if (rules.maxValue instanceof Date) {
14592            validators.push({
14593                execute: date_validation_rules_1.dateValidationRules.validateMaxDate,
14594                condition: rules.maxValue
14595            });
14596        }
14597        if (rules.minValue instanceof Date) {
14598            validators.push({
14599                execute: date_validation_rules_1.dateValidationRules.validateMinDate,
14600                condition: rules.minValue
14601            });
14602        }
14603        return validators;
14604    };
14605    ValidationRulesEngine.prototype._getTimeValidators = function (rules) {
14606        //console.log('getting date validators');
14607        var validators = [];
14608        if (rules.isRequired) {
14609            validators.push({
14610                execute: this._validateIsRequired
14611            });
14612        }
14613        validators.push({
14614            execute: time_validation_rules_1.timeValidationRules.validateIsTime
14615        });
14616        if (rules.maxValue != null && typeof rules.maxValue.getHours === 'function' && typeof rules.maxValue.getMinutes === 'function') {
14617            validators.push({
14618                execute: time_validation_rules_1.timeValidationRules.validateMaxTime,
14619                condition: rules.maxValue
14620            });
14621        }
14622        if (rules.minValue != null && typeof rules.minValue.getHours === 'function' && typeof rules.minValue.getMinutes === 'function') {
14623            validators.push({
14624                execute: time_validation_rules_1.timeValidationRules.validateMinTime,
14625                condition: rules.minValue
14626            });
14627        }
14628        return validators;
14629    };
14630    ValidationRulesEngine.prototype._getTextValidators = function (rules) {
14631        var validators = [];
14632        if (rules.isRequired) {
14633            validators.push({
14634                execute: this._validateIsRequired
14635            });
14636        }
14637        if (rules.maxLength != null) {
14638            validators.push({
14639                execute: text_validation_rules_1.textValidationRules.validateMaxTextLength,
14640                condition: rules.maxLength
14641            });
14642        }
14643        if (rules.minLength != null) {
14644            validators.push({
14645                execute: text_validation_rules_1.textValidationRules.val
14645idateMinTextLength,
14646                condition: rules.minLength
14647            });
14648        }
14649        if (rules.excludeChars != null) {
14650            //Escape some characters that would mess up the regex.
14651            // let escapedChars =  rules.excludeChars.replace('^', '\\^').replace('\]', '\\]').replace('-', '\\-');
14652            var escapedChars = rules.excludeChars.replace(string_util_1.StringUtil.ESCAPE_EXCLUDE_CHARS_REGEX, '\\$&');
14653            validators.push({
14654                execute: text_validation_rules_1.textValidationRules.validateExcludeChars,
14655                condition: {
14656                    pattern: new RegExp("[" + escapedChars + "]", 'i'),
14657                    excludeChars: rules.excludeChars
14658                }
14659            });
14660        }
14661        if (rules.regex != null) {
14662            validators.push({
14663                execute: text_validation_rules_1.textValidationRules.validateRegex,
14664                condition: rules.regex
14665            });
14666        }
14667        if (rules.inverseRegex != null) {
14668            validators.push({
14669                execute: text_validation_rules_1.textValidationRules.validateInverseRegex,
14670                condition: rules.inverseRegex
14671            });
14672        }
14673        if (rules.isEmail) {
14674            validators.push({
14675                execute: text_validation_rules_1.textValidationRules.validateEmail
14676            });
14677        }
14678        return validators;
14679    };
14680    return ValidationRulesEngine;
14681}());
14682exports.ValidationRulesEngine = ValidationRulesEngine;
14683
14684
14685
14686/***/ }),
14687/* 99 */
14688/***/ (function(module, exports, __webpack_require__) {
14689
14690"use strict";
14691
14692var date_util_1 = __webpack_require__(62);
14693var string_util_1 = __webpack_require__(64);
14694var TreeSort;
14695(function (TreeSort) {
14696    (function (TreeSortType) {
14697        TreeSortType[TreeSortType["PRE_ORDER"] = 0] = "PRE_ORDER";
14698        TreeSortType[TreeSortType["POST_ORDER"] = 1] = "POST_ORDER";
14699        TreeSortType[TreeSortType["LEVEL_ORDER"] = 2] = "LEVEL_ORDER"; // Y,S1,S2,Q1,Q2,Q3,Q4
14700    })(TreeSort.TreeSortType || (TreeSort.TreeSortType = {}));
14701    var TreeSortType = TreeSort.TreeSortType;
14702    function getSortedTreesUsing(rootList, sortType) {
14703        if (sortType === void 0) { sortType = TreeSortType.PRE_ORDER; }
14704        var sortedTrees;
14705        switch (sortType) {
14706            case TreeSortType.LEVEL_ORDER:
14707                sortedTrees = traverseLevelOrder(rootList);
14708                break;
14709            case TreeSortType.POST_ORDER:
14710                sortedTrees = traversePostOrder(rootList);
14711                break;
14712            case TreeSortType.PRE_ORDER:
14713                sortedTrees = traversePreOrder(rootList);
14714                break;
14715            default:
14716                throw new Error('Unknown Sort Order');
14717        }
14718        return sortedTrees;
14719    }
14720    TreeSort.getSortedTreesUsing = getSortedTreesUsing;
14721    function traversePreOrder(rootList) {
14722        var wrappers = [];
14723        return doTraversePreOrder(rootList, wrappers);
14724    }
14725    function doTraversePreOrder(rootList, wrappers) {
14726        for (var _i = 0, rootList_1 = rootList; _i < rootList_1.length; _i++) {
14727            var parent_1 = rootList_1[_i];
14728            wrappers.push(parent_1);
14729            var children = parent_1.getChildren();
14730            if (children != null && children.length > 0) {
14731                doTraversePreOrder(children, wrappers);
14732            }
14733        }
14734        return wrappers;
14735    }
14736    function traversePostOrder(rootList) {
14737        var wrappers = [];
14738        return doTraversePostOrder(rootList, wrappers);
14739    }
14740    function doTraversePostOrder(rootList, wrappers) {
14741        for (var _i = 0, rootList_2 = rootList; _i < rootList_2.length; _i++) {
14742            var parent_2 = rootList_2[_i];
14743            var children = parent_2.getChildren();
14744            if (children != null && children.length > 0) {
14745                doTraversePostOrder(children, wrappers);
14746            }
14747            wrappers.push(parent_2);
14748        }
14749        return wrappers;
14750    }
14751    function traverseLevelOrder(rootList) {
14752        var wrappers = [];
14753        return doTraverseLevelOrder(wrappers, rootList);
14754    }
14755    function doTraverseLevelOrder(wrappers, rootList) {
14756        if (rootList == null) {
14757            return wrappers;
14758        }
14759        for (var _i = 0, rootList_3 = rootList; _i < rootList_3.length; _i++) {
14760            var parent_3 = rootList_3[_i];
14761            wrappers.push(parent_3);
14762        }
14763        for (var _a = 0, rootList_4 = rootList; _a < rootList_4.length; _a++) {
14764            var parent_4 = rootList_4[_a];
14765            doTraverseLevelOrder(wrappers, parent_4.getChildren());
14766        }
14767        return wrappers;
14768    }
14769    function sortTreesPostOrder(trees) {
14770        return trees.sort(function (o1, o2) {
14771            var i = date_util_1.DateUtil.compareDates(o1.getEndDate(), o2.getEndDate());
14772            if (i !== 0) {
14773                return i;
14774            }
14775            i = date_util_1.DateUtil.compareDates(o2.getStartDate(), o1.getStartDate());
14776            if (i !== 0) {
14777                return i;
14778            }
14779            return string_util_1.StringUtil.compareStrings(o1.getReportingTermName(), o2.getReportingTermName());
14780        });
14781    }
14782    TreeSort.sortTreesPostOrder = sortTreesPostOrder;
14783})(TreeSort = exports.TreeSort || (exports.TreeSort = {}));
14784
14785
14786
14787/***/ }),
14788/* 100 */
14789/***/ (function(module, exports, __webpack_require__) {
14790
14791"use strict";
14792
14793var i18n_util_1 = __webpack_require__(30);
14794var ReportingTerm = (function () {
14795    function ReportingTerm(reportingTerm) {
14796        this.uid = reportingTerm.uid;
14797        this.schedulingTermUid = reportingTerm.schedulingTermUid;
14798        this.reportingTermName = reportingTerm.reportingTermName;
14799        this.startDate = reportingTerm.startDate;
14800        this.endDate = reportingTerm.endDate;
14801    }
14802    ReportingTerm.prototype.getUid = function () {
14803        return this.uid;
14804    };
14805    ReportingTerm.prototype.getSchedulingTermUid = function () {
14806        return this.schedulingTermUid;
14807    };
14808    ReportingTerm.prototype.getReportingTermName = function () {
14809        return this.reportingTermName;
14810    };
14811    ReportingTerm.prototype.getStartDate = function () {
14812        if (typeof this.startDate === 'string') {
14813            return i18n_util_1.i18n.parseJsonDate(this.startDate);
14814        }
14815        return this.startDate;
14816    };
14817    ReportingTerm.prototype.getEndDate = function () {
14818        if (typeof this.endDate === 'string') {
14819            return i18n_util_1.i18n.parseJsonDate(this.endDate);
14820        }
14821        return this.endDate;
14822    };
14823    ReportingTerm.prototype.getName = function () {
14824        return this.reportingTermName;
14825    };
14826    return ReportingTerm;
14827}());
14828exports.ReportingTerm = ReportingTerm;
14829
14830
14831
14832/***/ }),
14833/* 101 */
14834/***/ (function(module, exports, __webpack_require__) {
14835
14836"use strict";
14837
14838var ReportingTermWrapper = (function () {
14839    function ReportingTermWrapper(term, children) {
14840        this.uid = term.getUid();
14841        this.schedulingTermUid = term.getSchedulingTermUid();
14842        this.reportingTermName = term.getReportingTermName();
14843        this.startDate = term.getStartDate();
14844        this.endDate = term.getEndDate();
14845        this.children = children;
14846    }
14847    ReportingTermWrapper.prototype.getUid = function () {
14848        return this.uid;
14849    };
14850    ReportingTermWrapper.prototype.getReportingTermName = function () {
14851        return this.reportingTermName;
14852    };
14853    ReportingTermWrapper.prototype.getName = function () {
14854        return this.reportingTermName;
14855    };
14856    ReportingTermWrapper.prototype.getSchedulingTermUid = function () {
14857        return this.schedulingTermUid;
14858    };
14859    ReportingTermWrapper.prototype.getStartDate = function () {
14860        return this.startDate;
14861    };
14862    ReportingTermWrapper.prototype.setStartDate = function (startDate) {
14863        this.startDate = startDate;
14864    };
14865    ReportingTermWrapper.prototype.getEndDate = function () {
14866        return this.endDate;
14867    };
14868    ReportingTermWrapper.prototype.setEndDate = function (endDate) {
14869        this.endDate = endDate;
14870    };
14871    ReportingTermWrapper.prototype.setParent = function (parent) {
14872        this.parent = parent;
14873        this.parent.addChild(this);
14874    };
14875    ReportingTermWrapper.prototype.isRoot = function () {
14876        return this.parent == null;
14877    };
14878    ReportingTermWrapper.prototype.addChild = function (child) {
14879        if (this.children == null) {
14880            this.children = [];
14881        }
14882        this.children.push(child);
14883    };
14884    ReportingTermWrapper.prototype.getChildren = function () {
14885        return this.children;
14886    };
14887    return ReportingTermWrapper;
14888}());
14889exports.ReportingTermWrapper = ReportingTermWrapper;
14890
14891
14892
14893/***/ }),
14894/* 102 */
14895/***/ (function(module, exports, __webpack_require__) {
14896
14897"use strict";
14898
14899var __extends = (this && this.__extends) || (function () {
14900    var extendStatics = function (d, b) {
14901        extendStatics = Object.setPrototypeOf ||
14902            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14903            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14904        return extendStatics(d, b);
14905    }
14906    return function (d, b) {
14907        extendStatics(d, b);
14908        function __() { this.constructor = d; }
14909        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14910    };
14911})();
14912Object.defineProperty(exports, "__esModule", { value: true });
14913var asgmt_submission_notification_item_1 = __webpack_require__(89);
14914var notification_item_group_1 = __webpack_require__(65);
14915var idx = 0;
14916var AssignmentNotificationItemGroup = (function (_super) {
14917    __extends(AssignmentNotificationItemGroup, _super);
14918    function AssignmentNotificationItemGroup(type, aggregationKey, isMarkedReadOnClick, subtype, isRead, isSeen) {
14919        if (isRead === void 0) { isRead = true; }
14920        if (isSeen === void 0) { isSeen = true; }
14921        var _this = _super.call(this, type, aggregationKey, isMarkedReadOnClick, isRead, isSeen) || this;
14922        _this.type = type;
14923        _this.aggregationKey = aggregationKey;
14924        _this.isMarkedReadOnClick = isMarkedReadOnClick;
14925        _this.subtype = subtype;
14926        _this.isRead = isRead;
14927        _this.isSeen = isSeen;
14928        _this.studentUidMap = {};
14929        _this.sectionNameMap = new Map();
14930        _this.id = String(idx++);
14931        return _this;
14932    }
14933    AssignmentNotificationItemGroup.prototype.addNotification = function (notification) {
14934        _super.prototype.addNotification.call(this, notification);
14935        if (notification.subtype === asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem.NOTIFICATION_SUBTYPE) {
14936            var studentUid = notification.getSenderUid() || '';
14937            var studentName = notification.getSubtitle() || '';
14938            if (this.studentUidMap[studentUid] == null) {
14939                this.studentUidMap[studentUid] = studentName;
14940            }
14941            var studentCount = Object.keys(this.studentUidMap).length - 1;
14942            var suffix = '';
14943            if (studentCount === 1) {
14944                suffix = " and " + studentCount + " other";
14945            }
14946            else if (studentCount > 1) {
14947                suffix = " and " + studentCount + " others";
14948            }
14949            this.updateSectionString(notification.getSectionUid(), notification.getSectionName());
14950            this.subtitle = studentName + suffix;
14951            this.tooltip = Object.values(this.studentUidMap).join(', ');
14952            this.userType = notification.getUserType();
14953        }
14954    };
14955    AssignmentNotificationItemGroup.prototype.markAsRead = function () {
14956        if (this.subtype === asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem.NOTIFICATION_SUBTYPE) {
14957            _super.prototype.markAsRead.call(this);
14958            this.studentUidMap = {};
14959            this.sectionNameMap = new Map();
14960        }
14961    };
14962    AssignmentNotificationItemGroup.prototype.getSectionUids = function () {
14963        return Array.from(this.sectionNameMap.keys());
14964    };
14965    AssignmentNotificationItemGroup.prototype.updateSectionString = function (sectionUid, sectionName) {
14966        if (!this.sectionNameMap.has(sectionUid)) {
14967            this.sectionNameMap.set(sectionUid, sectionName);
14968        }
14969        if (this.sectionNameMap.size === 1) {
14970            this.sectionString = sectionName;
14971        }
14972        else if (this.sectionNameMap.size > 1) {
14973            this.sectionString = this.sectionNameMap.size + " Sections";
14974        }
14975        else {
14976            this.sectionString = '';
14977        }
14978    };
14979    return AssignmentNotificationItemGroup;
14980}(notification_item_group_1.NotificationItemGroup));
14981exports.AssignmentNotificationItemGroup = AssignmentNotificationItemGroup;
14982
14983
14984
14985/***/ }),
14986/* 103 */
14987/***/ (function(module, exports, __webpack_require__) {
14988
14989"use strict";
14990
14991var __extends = (this && this.__extends) || (function () {
14992    var extendStatics = function (d, b) {
14993        extendStatics = Object.setPrototypeOf ||
14994            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14995            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
14996        return extendStatics(d, b);
14997    }
14998    return function (d, b) {
14999        extendStatics(d, b);
15000        function __() { this.constructor = d; }
15001        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15002    };
15003})();
15004Object.defineProperty(exports, "__esModule", { value: true });
15005var pds_i18n_1 = __webpack_require__(15);
15006var notification_item_1 = __webpack_require__(59);
15007var AsgmtReturnNotificationItem = (function (_super) {
15008    __extends(AsgmtReturnNotificationItem, _super);
15009    function AsgmtReturnNotificationItem(isSeen, isRead, context) {
15010        if (isSeen === void 0) { isSeen = false; }
15011        if (isRead === void 0) { isRead = false; }
15012        var _this = _super.call(this, AsgmtReturnNotificationItem.NOTIFICATION_TYPE, isSeen, isRead, undefined, AsgmtReturnNotificationItem.NOTIFICATION_SUBTYPE) || this;
15013        _this.context = context;
15014        _this.id = _this.context.activity.group || _this.id;
15015        _this.aggregationKey = JSON.stringify({
15016            assignmentUid: _this.context.activity.assignmentUid
15017        });
15018        return _this;
15019    }
15020    AsgmtReturnNotificationItem.generateLookUpKey = function (assignmentUid) {
15021        return [assignmentUid, AsgmtReturnNotificationItem.NOTIFICATION_TYPE].join(',');
15022    };
15023    AsgmtReturnNotificationItem.prototype.getTitle = function () {
15024        return this.context.activity.assignmentName;
15025    };
15026    AsgmtReturnNotificationItem.prototype.getSubtitle = function () {
15027        return this.context.activity.studentName;
15028    };
15029    AsgmtReturnNotificationItem.prototype.getPostedAt = function () {
15030        return new Date(this.context.activity.time + 'Z');
15031    };
15032    AsgmtReturnNotificationItem.prototype.getUserType = function () {
15033        return this.context.userType;
15034    };
15035    AsgmtReturnNotificationItem.prototype.getTooltip = function () {
15036        return pds_i18n_1.pdsI18n.getText('pds|notifications|Student submitted homework');
15037    };
15038    AsgmtReturnNotificationItem.prototype.getSenderUid = function () {
15039        return this.context.activity.studentUid;
15040    };
15041    AsgmtReturnNotificationItem.prototype.getSectionUid = function () {
15042        return this.context.activity.sectionUid;
15043    };
15044    AsgmtReturnNotificationItem.prototype.getSectionName = function () {
15045        return this.context.sectionName;
15046    };
15047    AsgmtReturnNotificationItem.prototype.getColorClass = function () {
15048        return this.context.activity.assignmentCategoryColor;
15049    };
15050    Object.defineProperty(AsgmtReturnNotificationItem.prototype, "lookUpKey", {
15051        get: function () {
15052            return AsgmtReturnNotificationItem.generateLookUpKey(this.context.activity.assignmentUid);
15053        },
15054        enumerable: true,
15055        configurable: true
15056    });
15057    Object.defineProperty(AsgmtReturnNotificationItem.prototype, "currentUserUid", {
15058        get: function () {
15059            return this.context.currentUserUid;
15060        },
15061        enumerable: true,
15062        configurable: true
15063    });
15064    Object.defineProperty(AsgmtReturnNotificationItem.prototype, "getstreamGroupId", {
15065        get: function () {
15066            return this.context.getStreamGroupId;
15067        },
15068        enumerable: true,
15069        configurable: true
15070    });
15071    AsgmtReturnNotificationItem.NOTIFICATION_TYPE = 'ASSIGNMENT_NOTIFICATION';
15072    AsgmtReturnNotificationItem.NOTIFICATION_SUBTYPE = 'ASSIGNMENT_SUBMISSION_NOTIFICATION';
15073    return AsgmtReturnNotificationItem;
15074}(notification_item_1.NotificationItem));
15075exports.AsgmtReturnNotificationItem = AsgmtReturnNotificationItem;
15076
15077
15078
15079/***/ }),
15080/* 104 */
15081/***/ (function(module, exports, __webpack_require__) {
15082
15083"use strict";
15084
15085Object.defineProperty(exports, "__esModule", { value: true });
15086var SUPPORTED_STRINGS_REGEX = /^[A-Za-z0-9_]+(\(\))?(\.[A-Za-z0-9_]+(\(\))?)*$/;
15087var PLAIN_KEY_REGEX = /^[A-Za-z0-9]+$/;
15088var FUNCTION_CALL_REGEX = /^([A-Za-z0-9]+)\( *\)$/;
15089var SimpleParseResolver = (function () {
15090    function SimpleParseResolver(parseText) {
15091        var _this = this;
15092        this.tokens = [];
15093        if (!SUPPORTED_STRINGS_REGEX.test(parseText)) {
15094            throw 'parseText not supported: ' + parseText;
15095        }
15096        parseText.split('.').forEach(function (textToken) {
15097            if (PLAIN_KEY_REGEX.test(textToken)) {
15098                _this.tokens.push({
15099                    hash: textToken,
15100                    isFunction: false
15101                });
15102            }
15103            else if (FUNCTION_CALL_REGEX.test(textToken)) {
15104                var pieces = FUNCTION_CALL_REGEX.exec(textToken);
15105                if (pieces != null) {
15106                    _this.tokens.push({
15107                        hash: pieces[1],
15108                        isFunction: true
15109                    });
15110                }
15111            }
15112        });
15113    }
15114    SimpleParseResolver.prototype.resolve = function (target) {
15115        var t = target;
15116        this.tokens.find(function (token) {
15117            if (t == null) {
15118                return true;
15119            }
15120            if (token.isFunction) {
15121                var fn = t[token.hash];
15122                t = fn.call(t);
15123            }
15124            else {
15125                t = t[token.hash];
15126            }
15127            return false;
15128        });
15129        return t;
15130    };
15131    return SimpleParseResolver;
15132}());
15133exports.SimpleParseResolver = SimpleParseResolver;
15134
15135
15136
15137/***/ }),
15138/* 105 */
15139/***/ (function(module, exports, __webpack_require__) {
15140
15141"use strict";
15142
15143Object.defineProperty(exports, "__esModule", { value: true });
15144var pds_abstract_input_widget_1 = __webpack_require__(31);
15145exports.pdsValidation = {
15146    pds: undefined,
15147    _customValidationFunctions: {},
15148    validateElements: function (element, setFocus) {
15149        if (setFocus === void 0) { setFocus = true; }
15150        if (element == null) {
15151            return true;
15152        }
15153        var allElementsAreValid = true;
15154        var inputWidgets = element.querySelectorAll(pds_abstract_input_widget_1.allInputTagsSelector);
15155        for (var i = 0; i < inputWidgets.length; i++) {
15156            allElementsAreValid = inputWidgets[i].validateWidget(true) && allElementsAreValid;
15157        }
15158        if (!allElementsAreValid && setFocus) {
15159            this.setFocusOnFirstInvalidElement(element);
15160        }
15161        return allElementsAreValid;
15162    },
15163    registerCustomValidate: function (functionName, executeFunction) {
15164        if (functionName == null || functionName === '' || executeFunction == null) {
15165            return;
15166        }
15167        this._customValidationFunctions[functionName] = executeFunction;
15168    },
15169    getCustomValidate: function (functionName) {
15170        return this._customValidationFunctions[functionName];
15171    },
15172    getAllInvalidElements: function (parentElement) {
15173        var myInvalidElements = new Array();
15174        var allMyChildInputElements = parentElement.querySelectorAll(pds_abstract_input_widget_1.allInputTagsSelector);
15175        for (var i = 0; i < allMyChildInputElements.length; i++) {
15176            if (!allMyChildInputElements[i].validateWidget(true)) {
15177                myInvalidElements.push(allMyChildInputElements[i]);
15178            }
15179        }
15180        return myInvalidElements;
15181    },
15182    getFirstInvalidElement: function (parentElement) {
15183        var myFirstInvalidElement;
15184        var allMyChildInputElements = parentElement.querySelectorAll(pds_abstract_input_widget_1.allInputTagsSelector);
15185        for (var i = 0; i < allMyChildInputElements.length; i++) {
15186            if (!allMyChildInputElements[i].validateWidget(true)) {
15187                myFirstInvalidElement = allMyChildInputElements[i];
15188                return myFirstInvalidElement;
15189            }
15190        }
15191        return myFirstInvalidElement;
15192    },
15193    setFocusOnFirstInvalidElement: function (parentElement) {
15194        var myFirstInvalidElement = this.getFirstInvalidElement(parentElement);
15195        if (myFirstInvalidElement != null) {
15196            myFirstInvalidElement.setAttribute('tabindex', '-1');
15197            myFirstInvalidElement.focus();
15198        }
15199    }
15200};
15201
15202
15203
15204/***/ }),
15205/* 106 */
15206/***/ (function(module, exports, __webpack_require__) {
15207
15208"use strict";
15209
15210Object.defineProperty(exports, "__esModule", { value: true });
15211var pds_http_utils_1 = __webpack_require__(44);
15212var pds_local_storage_1 = __webpack_require__(45);
15213var helpLinkRequestUrl = '/navigation/v1/navigationlink';
15214var HelpLinkService = (function () {
15215    function HelpLinkService() {
15216    }
15217    HelpLinkService.prototype.getNavLinks = function (districtUID, userType, navGroup, hostUrl) {
15218        var requestURL = hostUrl + helpLinkRequestUrl;
15219        if (typeof navGroup === 'string') {
15220            navGroup = [navGroup];
15221        }
15222        var queryParam = {
15223            'navigationGroups': navGroup.join(','),
15224            'userType': userType,
15225            'districtUid': districtUID
15226        };
15227        var headers = {
15228            'content-type': 'application/json',
15229            Authorization: "Bearer " + pds_local_storage_1.pdsLocalStorage.getItem('auth_token')
15230        };
15231        return pds_http_utils_1.pdsHttpUtils.get(requestURL, queryParam, headers);
15232    };
15233    return HelpLinkService;
15234}());
15235exports.HelpLinkService = HelpLinkService;
15236
15237
15238
15239/***/ }),
15240/* 107 */
15241/***/ (function(module, exports, __webpack_require__) {
15242
15243"use strict";
15244
15245var __extends = (this && this.__extends) || (function () {
15246    var extendStatics = function (d, b) {
15247        extendStatics = Object.setPrototypeOf ||
15248            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15249            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15250        return extendStatics(d, b);
15251    }
15252    return function (d, b) {
15253        extendStatics(d, b);
15254        function __() { this.constructor = d; }
15255        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15256    };
15257})();
15258Object.defineProperty(exports, "__esModule", { value: true });
15259var pds_widget_1 = __webpack_require__(7);
15260var escKey = 27;
15261var tabKey = 9;
15262var enterKey = 13;
15263var PdsDialog = (function (_super) {
15264    __extends(PdsDialog, _super);
15265    function PdsDialog() {
15266        var _this = _super !== null && _super.apply(this, arguments) || this;
15267        _this.is = 'pds-dialog';
15268        _this.modalTitle = '';
15269        _this.name = '';
15270        _this.dataIsDrawerMode = 'false';
15271        _this.properties = {
15272            name: {
15273                type: String,
15274                value: ''
15275            },
15276            dataReturnFocus: {
15277                type: String,
15278                value: ''
15279            },
15280            dataIsDrawerMode: {
15281                type: String,
15282                value: 'false'
15283            },
15284            dataIsLarge: {
15285                type: String,
15286                value: 'false'
15287            }
15288        };
15289        return _this;
15290    }
15291    PdsDialog.prototype.ready = function () {
15292        var _this = this;
15293        _super.prototype.ready.call(this);
15294        this.onKeyDown = function (event) {
15295            if (event.keyCode === escKey) {
15296                _this.closeDialog(event);
15297            }
15298        };
15299    };
15300    PdsDialog.prototype.attached = function () {
15301        var _this = this;
15302        this.classList.add('pds-is-hidden');
15303        if (this.dataIsDrawerMode === 'true') {
15304            var modalElement = this.querySelector('.pds-modal');
15305            if (modalElement != null) {
15306                modalElement.classList.add('pds-drawer-mode');
15307            }
15308        }
15309        setTimeout(function () {
15310            _super.prototype.attached.call(_this);
15311            window.addEventListener('keydown', _this.onKeyDown);
15312            var myModal = _this.querySelector('.pds-modal');
15313            var myFirstInputElement;
15314            var myLastElement;
15315            var myHeaderElement = _this.querySelector('header');
15316            var myTitleElement = _this.querySelector('h4');
15317            var myContentElement = _this.querySelector('section');
15318            var myFooter = _this.querySelector('footer');
15319            if (myTitleElement != null) {
15320                myTitleElement.classList.add('pds-modal-title');
15321                myTitleElement.setAttribute('tabindex', '0');
15322                _this.modalTitle = myTitleElement.innerText;
15323                myHeaderElement.appendChild(myTitleElement);
15324            }
15325            if (myContentElement != null) {
15326                myContentElement.classList.add('pds-modal-body');
15327                myContentElement.setAttribute('role', 'main');
15328                myModal.appendChild(myContentElement);
15329            }
15330            if (myFooter != null) {
15331                myFooter.classList.add('pds-modal-footer');
15332                myModal.appendChild(myFooter);
15333                if (myFooter.childElementCount >= 1) {
15334                    myLastElement = _this.pds.utils.findLastNode(myFooter);
15335                }
15336            }
15337            if (myLastElement == null) {
15338                myLastElement = _this.pds.utils.findLastNode(myModal);
15339                myLastElement.setAttribute('tabindex', '0');
15340            }
15341            if (document.querySelector('pds-main-loader') != null) {
15342                _this.pds.utils.markFocusableElement(myFirstInputElement);
15343            }
15344            var allTabbableElementsInHeader = _this.pds.utils.getAllTabbableElements(myHeaderElement);
15345            if (allTabbableElementsInHeader != null && allTabbableElementsInHeader.length > 0) {
15346                myFirstInputElement = allTabbableElementsInHeader[0];
15347                myFirstInputElement.focus();
15348            }
15349            _this.manageFocus(myModal, myHeaderElement, myFirstInputElement, myLastElement);
15350            _this.classList.remove('pds-is-hidden');
15351        });
15352    };
15353    PdsDialog.prototype.manageFocus = function (myModal, myHeaderElement, myFirstElement, myLastElement) {
15354        var _this = this;
15355        var copyOfFirstElement = myFirstElement;
15356        var copyOfLastElement = myLastElement;
15357        myModal.addEventListener('keydown', function (event) {
15358            copyOfLastElement = _this.pds.utils.findLastNode(myModal);
15359            copyOfLastElement.setAttribute('tabindex', '0');
15360            if (event.keyCode === tabKey) {
15361                if (!event.shiftKey && event.target === copyOfLastElement) {
15362                    copyOfFirstElement.focus();
15363                    event.preventDefault();
15364                }
15365                else if (event.shiftKey && ((event.target === copyOfFirstElement) || (event.target === myHeaderElement))) {
15366                    copyOfLastElement.focus();
15367                    event.preventDefault();
15368                }
15369            }
15370            if (event.keyCode === escKey) {
15371                _this.closeDialog(event);
15372                event.preventDefault();
15373                event.stopPropagation();
15374            }
15375        });
15376    };
15377    PdsDialog.prototype.detached = function () {
15378        window.removeEventListener('keydown', this.onKeyDown);
15379        if (this.dataReturnFocus != null && this.dataReturnFocus.trim().length !== 0) {
15380            var elementToFocus = document.querySelector(this.dataReturnFocus);
15381            if (elementToFocus != null) {
15382                elementToFocus.focus();
15383            }
15384            else if (document.activeElement != null) {
15385                document.activeElement.focus();
15386            }
15387            return;
15388        }
15389        else if (this.returnFocusCallback != null) {
15390            var returnSelector = this.returnFocusCallback();
15391            if (returnSelector instanceof HTMLElement) {
15392                returnSelector.focus();
15393                return;
15394            }
15395            else if (returnSelector != null && returnSelector.trim().length > 0) {
15396                var returnFocusElement = document.querySelector(returnSelector);
15397                if (returnFocusElement) {
15398                    returnFocusElement.focus();
15399                    return;
15400                }
15401            }
15402        }
15403        else if (this.pds.utils.peekLastMarkedElement() != null) {
15404            var myLastElement = this.pds.utils.getLastMarkedElement();
15405            if (myLastElement != null) {
15406                myLastElement.focus();
15407                return;
15408            }
15409        }
15410        console.error('Selector from data-return-focus did not find any elements, or a callback function was not specified for [returnFocusCallback]. Please set the data-return-focus attribute like: <pds-dialog data-return-focus="#i
15410d-of-button-that-opened-dialog"> or the callback function like <pds-dialog [returnFocusCallback]="returnFocusToElement"');
15411    };
15412    PdsDialog.prototype.closeDialog = function (event) {
15413        this.fire('pdsRemoveDialog', true);
15414    };
15415    PdsDialog.prototype.messageKeysUpdated = function () {
15416    };
15417    return PdsDialog;
15418}(pds_widget_1.PdsWidget));
15419exports.PdsDialog = PdsDialog;
15420
15421
15422
15423/***/ }),
15424/* 108 */
15425/***/ (function(module, exports, __webpack_require__) {
15426
15427"use strict";
15428
15429Object.defineProperty(exports, "__esModule", { value: true });
15430var immersive_reader_sdk_1 = __webpack_require__(185);
15431var rxjs_1 = __webpack_require__(19);
15432var operators_1 = __webpack_require__(17);
15433var immersiveReaderZIndex = 10000;
15434var defaultSeparator = '\n\n';
15435var AccessTokenCache = (function () {
15436    function AccessTokenCache() {
15437    }
15438    Object.defineProperty(AccessTokenCache.prototype, "isExpired", {
15439        get: function () {
15440            return !this.expiresAt || this.expiresAt < new Date();
15441        },
15442        enumerable: true,
15443        configurable: true
15444    });
15445    Object.defineProperty(AccessTokenCache.prototype, "cacheIsReady", {
15446        get: function () {
15447            return !!this.request;
15448        },
15449        enumerable: true,
15450        configurable: true
15451    });
15452    AccessTokenCache.prototype.getAccessToken = function () {
15453        if (!this.request) {
15454            return rxjs_1.throwError('The access token request has not been initialized.');
15455        }
15456        if (this.isExpired || !this.cachedRequest) {
15457            this.cachedRequest = this.request.pipe(operators_1.shareReplay());
15458        }
15459        return this.cachedRequest;
15460    };
15461    AccessTokenCache.prototype.initializeRequest = function (accessTokenRequest) {
15462        var _this = this;
15463        var observable = rxjs_1.defer(function () {
15464            var request = accessTokenRequest();
15465            if (request instanceof rxjs_1.Observable) {
15466                return request;
15467            }
15468            return rxjs_1.from(request);
15469        });
15470        this.request = observable
15471            .pipe(operators_1.tap(function () {
15472            _this.expiresAt = new Date();
15473            _this.expiresAt.setMinutes(_this.expiresAt.getMinutes() + 15);
15474        }));
15475    };
15476    AccessTokenCache.prototype.clearCache = function () {
15477        this.cachedRequest = undefined;
15478        this.request = undefined;
15479        this.expiresAt = new Date();
15480    };
15481    return AccessTokenCache;
15482}());
15483exports.immersiveReaderAccessTokenCache = new AccessTokenCache();
15484var ImmersiveReaderService = (function () {
15485    function ImmersiveReaderService() {
15486        this.msLaunchAsync = immersive_reader_sdk_1.launchAsync;
15487        this.defaultContentSeparator = defaultSeparator;
15488    }
15489    ImmersiveReaderService.prototype.start = function (config) {
15490        var _this = this;
15491        var values = this.getValues(config);
15492        if (values == null) {
15493            return rxjs_1.throwError('The Immersive Reader could not resolve the title, content, or access token.');
15494        }
15495        var irRequest = exports.immersiveReaderAccessTokenCache.getAccessToken()
15496            .pipe(operators_1.flatMap(function (token) {
15497            if (values == null) {
15498                return rxjs_1.throwError('The Immersive Reader could not resolve the title, content, or access token.');
15499            }
15500            if (!token) {
15501                var msg = 'The access token was not generated correctly.';
15502                console.warn(msg);
15503                return rxjs_1.throwError(msg);
15504            }
15505            var dataChunks = values.content.map(function (c) {
15506                return {
15507                    content: c,
15508                    lang: config.contentLanguage,
15509                    mimeType: 'text/plain'
15510                };
15511            });
15512            var irContent = {
15513                title: values.title,
15514                chunks: dataChunks
15515            };
15516            var options = {
15517                uiZIndex: immersiveReaderZIndex,
15518                uiLang: config.uiLanguage
15519            };
15520            return rxjs_1.from(_this.msLaunchAsync(token, null, irContent, options));
15521        }))
15522            .pipe(operators_1.shareReplay());
15523        irRequest.subscribe(undefined, function (error) { return rxjs_1.throwError(error); });
15524        return irRequest;
15525    };
15526    ImmersiveReaderService.prototype.setDefaultSeparator = function (separator) {
15527        this.defaultContentSeparator = separator;
15528    };
15529    ImmersiveReaderService.prototype.getContent = function (config) {
15530        var content = [];
15531        if (config.contentArray) {
15532            content = config.contentArray;
15533        }
15534        else if (config.content) {
15535            content = [config.content];
15536        }
15537        else if (config.contentSelector) {
15538            var targetElements = Array.from(document.querySelectorAll(config.contentSelector));
15539            if (targetElements == null || targetElements.length === 0) {
15540                console.warn("The Immersive Reader could not find '" + config.contentSelector + "'.");
15541                return [];
15542            }
15543            content = targetElements.map(function (el) { return el.innerText; });
15544        }
15545        var separator = config.contentSeparator || this.defaultContentSeparator;
15546        if (content.length > 1 && separator != null) {
15547            content = content
15548                .reduce(function (result, contentItem) { return result.concat(contentItem, separator); }, [])
15549                .slice(0, -1);
15550        }
15551        if (!Array.isArray(content) || content.length === 0) {
15552            console.warn("The Immersive Reader requires text content, an array of text content, or a content element selector.");
15553        }
15554        return content;
15555    };
15556    ImmersiveReaderService.prototype.getTitle = function (config) {
15557        if (config.title) {
15558            return config.title;
15559        }
15560        if (config.titleSelector) {
15561            var targetElement = document.querySelector(config.titleSelector);
15562            if (targetElement == null) {
15563                console.warn("The Immersive Reader could not find '" + config.titleSelector + "'.");
15564                return;
15565            }
15566            return targetElement.innerText;
15567        }
15568        console.warn("The Immersive Reader requires a title or a t
15568itle element selector.");
15569    };
15570    ImmersiveReaderService.prototype.getValues = function (config) {
15571        var title = this.getTitle(config);
15572        var content = this.getContent(config);
15573        if (!exports.immersiveReaderAccessTokenCache.cacheIsReady) {
15574            console.warn("The Immersive Reader requires a way to retrieve an access token.");
15575            return;
15576        }
15577        if (title && content && content.length > 0) {
15578            return { content: content, title: title };
15579        }
15580    };
15581    return ImmersiveReaderService;
15582}());
15583exports.ImmersiveReaderService = ImmersiveReaderService;
15584
15585
15586
15587/***/ }),
15588/* 109 */
15589/***/ (function(module, exports, __webpack_require__) {
15590
15591"use strict";
15592/* WEBPACK VAR INJECTION */(function(global) {
15593Object.defineProperty(exports, "__esModule", { value: true });
15594var common_utils_1 = __webpack_require__(40);
15595exports.ChatThreadTypeEnum = common_utils_1.ChatThreadTypeEnum;
15596exports.ReportingTermSort = common_utils_1.ReportingTermSort;
15597exports.SimpleTime = common_utils_1.SimpleTime;
15598exports.TreeSort = common_utils_1.TreeSort;
15599var notification_indicator_controller_1 = __webpack_require__(132);
15600exports.NotificationIndicatorController = notification_indicator_controller_1.NotificationIndicatorController;
15601var activity_feed_notification_item_1 = __webpack_require__(67);
15602exports.ActivityFeedNotificationItem = activity_feed_notification_item_1.ActivityFeedNotificationItem;
15603var asgmt_submission_notification_item_1 = __webpack_require__(89);
15604exports.AsgmtSubmissionNotificationItem = asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem;
15605var asgmt_return_notification_item_1 = __webpack_require__(103);
15606exports.AsgmtReturnNotificationItem = asgmt_return_notification_item_1.AsgmtReturnNotificationItem;
15607var assignment_template_notification_item_1 = __webpack_require__(90);
15608exports.AssignmentTemplateNotificationItem = assignment_template_notification_item_1.AssignmentTemplateNotificationItem;
15609var communication_notification_item_1 = __webpack_require__(91);
15610exports.CommunicationNotificationItem = communication_notification_item_1.CommunicationNotificationItem;
15611var pds_accessibility_1 = __webpack_require__(135);
15612var pds_i18n_1 = __webpack_require__(15);
15613var pds_local_storage_1 = __webpack_require__(45);
15614var pds_logger_1 = __webpack_require__(41);
15615var pds_natural_sort_1 = __webpack_require__(136);
15616exports.PdsNaturalSort = pds_natural_sort_1.PdsNaturalSort;
15617var pds_utils_1 = __webpack_require__(18);
15618var pds_validation_1 = __webpack_require__(105);
15619var pds_validation_rules_engine_1 = __webpack_require__(26);
15620var polymer_utils_1 = __webpack_require__(137);
15621var activity_feed_notification_service_1 = __webpack_require__(187);
15622exports.ActivityFeedNotificationService = activity_feed_notification_service_1.ActivityFeedNotificationService;
15623var aggregated_notification_service_1 = __webpack_require__(188);
15624exports.AggregatedNotificationService = aggregated_notification_service_1.AggregatedNotificationService;
15625var asgmt_submission_notification_service_1 = __webpack_require__(189);
15626exports.AsgmtSubmissionNotificationService = asgmt_submission_notification_service_1.AsgmtSubmissionNotificationService;
15627var asgmt_return_notification_service_1 = __webpack_require__(190);
15628exports.AsgmtReturnNotificationService = asgmt_return_notification_service_1.AsgmtReturnNotificationService;
15629var assignment_template_notification_service_1 = __webpack_require__(191);
15630exports.AssignmentTemplateNotificationService = assignment_template_notification_service_1.AssignmentTemplateNotificationService;
15631var communication_notification_service_1 = __webpack_require__(192);
15632exports.CommunicationNotificationService = communication_notification_service_1.CommunicationNotificationService;
15633var chat_thread_service_1 = __webpack_require__(92);
15634exports.ChatThreadService = chat_thread_service_1.ChatThreadService;
15635var get_stream_feed_service_1 = __webpack_require__(69);
15636exports.GetStreamFeedService = get_stream_feed_service_1.GetStreamFeedService;
15637var help_link_service_1 = __webpack_require__(106);
15638exports.HelpLinkService = help_link_service_1.HelpLinkService;
15639var simple_parse_resolver_1 = __webpack_require__(104);
15640exports.SimpleParseResolver = simple_parse_resolver_1.SimpleParseResolver;
15641var poppable_element_factory_1 = __webpack_require__(68);
15642exports.PoppableElementFactory = poppable_element_factory_1.PoppableElementFactory;
15643var message_history_1 = __webpack_require__(193);
15644var popover_accessibility_controller_factory_1 = __webpack_require__(93);
15645exports.PopoverAccessibilityControllerFactory = popover_accessibility_controller_factory_1.PopoverAccessibilityControllerFactory;
15646var immersive_reader_service_1 = __webpack_require__(108);
15647exports.ImmersiveReaderService = immersive_reader_service_1.ImmersiveReaderService;
15648var globalScope;
15649if (typeof window !== 'undefined') {
15650    globalScope = window;
15651}
15652else if (typeof global !== 'undefined') {
15653    globalScope = global;
15654}
15655if (globalScope.powerSchoolDesignSystemToolkit == null) {
15656    var pds_1 = {
15657        version: '15.0.1',
15658        i18n: pds_i18n_1.pdsI18n,
15659        validation: pds_validation_1.pdsValidation,
15660        utils: pds_utils_1.pdsUtils,
15661        accessibility: pds_accessibility_1.pdsAccessibility,
15662        localStorage: pds_local_storage_1.pdsLocalStorage,
15663        logger: pds_logger_1.pdsLogger,
15664        log: pds_logger_1.pdsLogger.log,
15665        naturalSort: new pds_natural_sort_1.PdsNaturalSort,
15666        naturalSortConstructor: pds_natural_sort_1.PdsNaturalSort,
15667        validationEngine: pds_validation_rules_engine_1.pdsValidationRulesEngine,
15668        reportingTermSort: common_utils_1.ReportingTermSort,
15669        pdsTreeSortUtil: common_utils_1.TreeSort,
15670        factories: {
15671            PoppableElementFactory: poppable_element_factory_1.PoppableElementFactory,
15672            PopoverAccessibilityControllerFactory: popover_accessibility_controller_factory_1.PopoverAccessibilityControllerFactory
15673        },
15674        controllers: {
15675            NotificationIndicatorController: notification_indicator_controller_1.NotificationIndicatorController
15676        },
15677        caches: {
15678            immersiveReaderAccessTokenCache: immersive_reader_service_1.immersiveReaderAccessTokenCache
15679        },
15680        services: {
15681            AggregatedNotificationService: aggregated_notification_service_1.AggregatedNotificationService,
15682            ActivityFeedNotificationService: activity_feed_notification_service_1.ActivityFeedNotificationService,
15683            AsgmtSubmissionNotificationService: asgmt_submission_notification_service_1.AsgmtSubmissionNotificationService,
15684            AsgmtReturnNotificationService: asgmt_return_notification_service_1.AsgmtReturnNotificationService,
15685            ChatThreadService: chat_thread_service_1.ChatThreadService,
15686            CommunicationNotificationService: communication_notification_service_1.CommunicationNotificationService,
15687            GetStreamFeedService: get_stream_feed_service_1.GetStreamFeedService,
15688            AssignmentTemplateNotificationService: assignment_template_notification_service_1.AssignmentTemplateNotificationService,
15689            HelpLinkService: help_link_service_1.HelpLinkService
15690        },
15691        models: {
15692            ActivityFeedNotificationItem: activity_feed_notification_item_1.ActivityFeedNotificationItem,
15693            CommunicationNotificationItem: communication_notification_item_1.CommunicationNotificationItem,
15694            AssignmentTemplateNotificationItem: assignment_template_notification_item_1.AssignmentTemplateNotificationItem,
15695            AsgmtSubmissionNotificationItem: asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem,
15696            AsgmtReturnNotificationItem: asgmt_return_notification_item_1.AsgmtReturnNotificationItem
15697        },
15698        polymerUtils: polymer_utils_1.polymerUtils,
15699        sectionUtil: common_utils_1.SectionUtil,
15700        preferences: {
15701            CACHE_KEY_PREFIX: undefined,
15702            host: '',
15703            getS3MediaPath: function () {
15704                return pds_1.preferences.host + '/s3media';
15705            }
15706        },
15707        setAutomationChecker: function (automationChecker) {
15708            if (this.automationChecker == null) {
15709                this.automationChecker = automationChecker;
15710                if (pds_local_storage_1.pdsLocalStorage.getPersistedBoolean('debug')) {
15711                    this.automationChecker.startChecking();
15712                }
15713            }
15714            else {
15715                console.error('The automation checker is already being downloaded in this app. To turn it on run localStorage.setItem(\'debug\', \'true\' and reload the page');
15716            }
15717        },
15718        svgSpritePath: 'dist/img/icons/pds-icons.svg',
15719        types: {
15720            Time: common_utils_1.SimpleTime,
15721            PdsNaturalSort: pds_natural_sort_1.PdsNaturalSort,
15722            ParseResolver: simple_parse_resolver_1.SimpleParseResolver,
15723            ReportingTermSort: common_utils_1.ReportingTermSort,
15724            TreeSort: common_utils_1.TreeSort,
15725            ChatThreadTypeEnum: common_utils_1.ChatThreadTypeEnum
15726        },
15727        messageHistory: message_history_1.MessageHistory
15728    };
15729    pds_1.naturalSort.ignoreCase();
15730    for (var prop in pds_1) {
15731        if (prop !== 'polymerUtils' && prop !== 'svgSpritePath' && prop !== 'version') {
15732            pds_1[prop].pds = pds_1;
15733        }
15734    }
15735    polymer_utils_1.polymerUtils.addPdsObjToPolymerComponent(pds_1);
15736    globalScope.powerSchoolDesignSystemToolkit = pds_1;
15737}
15738exports.default = globalScope.powerSchoolDesignSystemToolkit;
15739
15740
15741/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(110)))
15742
15743/***/ }),
15744/* 110 */
15745/***/ (function(module, exports) {
15746
15747var g;
15748
15749// This works in non-strict mode
15750g = (function() {
15751	return this;
15752})();
15753
15754try {
15755	// This works if eval is allowed (see CSP)
15756	g = g || new Function("return this")();
15757} catch (e) {
15758	// This works if the window reference is available
15759	if (typeof window === "object") g = window;
15760}
15761
15762// g can still be undefined, but nothing to do about it...
15763// We return undefined, instead of nothing here, so it's
15764// easier to handle this case. if(!global) { ...}
15765
15766module.exports = g;
15767
15768
15769/***/ }),
15770/* 111 */
15771/***/ (function(module, exports, __webpack_require__) {
15772
15773"use strict";
15774
15775function __export(m) {
15776    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
15777}
15778var score_calculator_1 = __webpack_require__(112);
15779exports.Calculator = score_calculator_1.Calculator;
15780exports.ScoreIf = score_calculator_1.ScoreIf;
15781__export(__webpack_require__(117));
15782__export(__webpack_require__(128));
15783__export(__webpack_require__(129));
15784__export(__webpack_require__(131));
15785
15786
15787
15788/***/ }),
15789/* 112 */
15790/***/ (function(module, exports, __webpack_require__) {
15791
15792"use strict";
15793
15794function __export(m) {
15795    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
15796}
15797var total_points_1 = __webpack_require__(113);
15798__export(__webpack_require__(115));
15799exports.Calculator = {
15800    calculateScore: function (calculationType, scores, options) {
15801        if (calculationType === void 0) { calculationType = 'TOTAL_POINTS'; }
15802        if (calculationType === 'TOTAL_POINTS') {
15803            return total_points_1.calculateTotalPointsScore(scores, options);
15804        }
15805        else {
15806            throw new Error('Unknown CalculationType');
15807        }
15808    }
15809};
15810
15811
15812
15813/***/ }),
15814/* 113 */
15815/***/ (function(module, exports, __webpack_require__) {
15816
15817"use strict";
15818
15819var valid_score_1 = __webpack_require__(114);
15820function calculateTotalPointsScore(scores, options) {
15821    var debug = (options && options.debug === true) || false;
15822    if (scores == null || scores.length === 0) {
15823        if (debug) {
15824            console.log('No scores were passed in to calculate.');
15825        }
15826        return undefined;
15827    }
15828    var filteredScores = scores.filter(function (score) {
15829        return score.getPoints() != null;
15830    });
15831    var validScoreCount = filteredScores.length;
15832    if (validScoreCount === 0) {
15833        if (debug) {
15834            console.log('No scores with points were passed in to calculate.');
15835        }
15836        return undefined;
15837    }
15838    var nonInfinityScoreCount = validScoreCount;
15839    var validFilteredScores = filteredScores.map(function (score) {
15840        var validScore = new valid_score_1.ValidScore(score);
15841        if (validScore.isPercentInfinity()) {
15842            if (debug) {
15843                console.log('Found score that is inifinity');
15844            }
15845            nonInfinityScoreCount--;
15846        }
15847        return validScore;
15848    });
15849    var dropLowScores = 0, dropHighScores = 0;
15850    if (options != null && options.dropScores != null) {
15851        dropLowScores = (options.dropScores.dropLowScores != null && options.dropScores.dropLowScores > 0) ? options.dropScores.dropLowScores : 0;
15852        dropHighScores = (options.dropScores.dropHighScores != null && options.dropScores.dropHighScores > 0) ? options.dropScores.dropHighScores : 0;
15853    }
15854    if ((dropLowScores > 0 || dropHighScores > 0) && nonInfinityScoreCount <= (dropLowScores + dropHighScores)) {
15855        if (debug) {
15856            console.log('Ignoring options.dropScores calculation settings as there are not enough scores to allow dropping');
15857        }
15858        dropLowScores = 0;
15859        dropHighScores = 0;
15860    }
15861    var droppedScores;
15862    if (dropLowScores > 0 || dropHighScores > 0) {
15863        var studentsFavor = options != null && options.dropScores != null && options.dropScores.studentsFavor === true;
15864        var filtered = doDropScores(debug, validFilteredScores, dropLowScores, dropHighScores, studentsFavor);
15865        validFilteredScores = filtered.scores;
15866        droppedScores = filtered.droppedScores.map(function (score) {
15867            return score.getSourceScore();
15868        });
15869        if (debug) {
15870            console.log("Dropped " + droppedScores.length + " score(s): " + JSON.stringify(droppedScores));
15871        }
15872    }
15873    if (debug) {
15874        console.log("Using " + validFilteredScores.length + " score(s) to calcuate metrics");
15875    }
15876    var scoreResult = getCalculationMetrics(debug, validFilteredScores);
15877    scoreResult.droppedScores = droppedScores;
15878    return scoreResult;
15879}
15880exports.calculateTotalPointsScore = calculateTotalPointsScore;
15881function getCalculationMetrics(debug, scores) {
15882    var points = 0, totalPoints = 0, weightedPoints = 0, totalWeightedPoints = 0;
15883    scores.forEach(function (score) {
15884        if (debug) {
15885            console.log("Running total: points: " + points + ", totalPoints: " + totalPoints + ", weightedPoints: " + weightedPoints + ", totalWeightedPoints: " + totalWeightedPoints + ", adding score: " + JSON.stringify(score));
15886        }
15887        points += score.getPoints();
15888        totalPoints += score.getTotalPoints();
15889        weightedPoints += score.getPoints() * score.getWeight();
15890        totalWeightedPoints += score.getTotalPoints() * score.getWeight();
15891    });
15892    if (debug) {
15893        console.log("Total: points: " + points + ", totalPoints: " + totalPoints + ", weightedPoints: " + weightedPoints + ", totalWeightedPoints: " + totalWeightedPoints);
15894    }
15895    return {
15896        points: points,
15897        totalPoints: totalPoints,
15898        weightedPoints: weightedPoints,
15899        totalWeightedPoints: totalWeightedPoints
15900    };
15901}
15902function doDropScores(debug, validFilteredScores, dropLowScores, dropHighScores, studentsFavor) {
15903    if (studentsFavor === true) {
15904        validFilteredScores.sort(sortScoresByAmountOfWeightedPointsMissing);
15905    }
15906    else {
15907        validFilteredScores.sort(sortScoresByPercentAscThenWeightedPointsDesc);
15908    }
15909    if (debug) {
15910        console.log("Sorted score(s) before drop: " + JSON.stringify(validFilteredScores));
15911    }
15912    var droppedScores = [];
15913    if (dropLowScores > 0) {
15914        droppedScores.push.apply(droppedScores, validFilteredScores.slice(0, dropLowScores));
15915    }
15916    if (dropHighScores > 0) {
15917        droppedScores.push.apply(droppedScores, validFilteredScores.slice(validFilteredScores.length - dropHighScores, validFilteredScores.length));
15918    }
15919    return {
15920        droppedScores: droppedScores,
15921        scores: validFilteredScores.splice(dropLowScores, validFilteredScores.length - dropHighScores - 1)
15922    };
15923}
15924function sortScoresByPercentAscThenWeightedPointsDesc(s1, s2) {
15925    //Percent asc
15926    var percent1 = s1.getPercent();
15927    var percent2 = s2.getPercent();
15928    if (percent1 < percent2) {
15929        return -1;
15930    }
15931    else if (percent1 > percent2) {
15932        return 1;
15933    }
15934    //Weighted Points desc
15935    var weightedPointsPossible1 = s1.getWeightedPointsPossible();
15936    var weightedPointsPossible2 = s2.getWeightedPointsPossible();
15937    if (weightedPointsPossible2 < weightedPointsPossible1) {
15938        return -1;
15939    }
15940    else if (weightedPointsPossible2 > weightedPointsPossible1) {
15941        return 1;
15942    }
15943    else {
15944        return 0;
15945    }
15946}
15947function sortScoresByAmountOfWeightedPointsMissing(s1, s2) {
15948    //How many points are they missing
15949    var missingPoints1 = s1.getWeightedMissingPoints();
15950    var missingPoints2 = s2.getWeightedMissingPoints();
15951    if (missingPoints1 > missingPoints2) {
15952        return -1;
15953    }
15954    else if (missingPoints1 < missingPoints2) {
15955        return 1;
15956    }
15957    else {
15958        return 0;
15959    }
15960}
15961
15962
15963
15964/***/ }),
15965/* 114 */
15966/***/ (function(module, exports, __webpack_require__) {
15967
15968"use strict";
15969
15970var ValidScore = (function () {
15971    function ValidScore(original) {
15972        this.points = original.getPoints();
15973        this.totalPoints = original.getTotalPoints();
15974        this.weight = original.getWeight();
15975        this.sourceScore = original;
15976    }
15977    ValidScore.prototype.getPoints = function () {
15978        return this.points;
15979    };
15980    ValidScore.prototype.getTotalPoints = function () {
15981        return this.totalPoints;
15982    };
15983    ValidScore.prototype.getPercent = function () {
15984        return this.points / this.totalPoints;
15985    };
15986    ValidScore.prototype.getWeight = function () {
15987        return this.weight;
15988    };
15989    ValidScore.prototype.isPercentInfinity = function () {
15990        return this.totalPoints === 0;
15991    };
15992    ValidScore.prototype.getWeightedPointsPossible = function () {
15993        return this.totalPoints * this.weight;
15994    };
15995    ValidScore.prototype.getWeightedMissingPoints = function () {
15996        return (this.totalPoints - this.points) * this.weight;
15997    };
15998    ValidScore.prototype.getSourceScore = function () {
15999        return this.sourceScore;
16000    };
16001    return ValidScore;
16002}());
16003exports.ValidScore = ValidScore;
16004
16005
16006
16007/***/ }),
16008/* 115 */
16009/***/ (function(module, exports, __webpack_require__) {
16010
16011"use strict";
16012
16013function __export(m) {
16014    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
16015}
16016__export(__webpack_require__(116));
16017__export(__webpack_require__(94));
16018
16019
16020
16021/***/ }),
16022/* 116 */
16023/***/ (function(module, exports, __webpack_require__) {
16024
16025"use strict";
16026
16027var __extends = (this && this.__extends) || function (d, b) {
16028    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
16029    function __() { this.constructor = d; }
16030    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16031};
16032var score_if_1 = __webpack_require__(94);
16033var PointsScore = (function (_super) {
16034    __extends(PointsScore, _super);
16035    function PointsScore(points, totalPoints, weight) {
16036        _super.call(this);
16037        this.points = points;
16038        this.totalPoints = totalPoints;
16039        this.weight = weight;
16040    }
16041    PointsScore.prototype.getWeight = function () {
16042        return this.weight || 1;
16043    };
16044    PointsScore.prototype.getPoints = function () {
16045        return this.points;
16046    };
16047    PointsScore.prototype.getTotalPoints = function () {
16048        return this.totalPoints;
16049    };
16050    PointsScore.prototype.getPercent = function () {
16051        return this.points / this.totalPoints;
16052    };
16053    return PointsScore;
16054}(score_if_1.ScoreIf));
16055exports.PointsScore = PointsScore;
16056
16057
16058
16059/***/ }),
16060/* 117 */
16061/***/ (function(module, exports, __webpack_require__) {
16062
16063"use strict";
16064
16065var date_util_1 = __webpack_require__(62);
16066exports.DateUtil = date_util_1.DateUtil;
16067var number_util_1 = __webpack_require__(63);
16068exports.NumberUtil = number_util_1.NumberUtil;
16069var section_util_1 = __webpack_require__(118);
16070exports.SectionUtil = section_util_1.SectionUtil;
16071var string_util_1 = __webpack_require__(64);
16072exports.StringUtil = string_util_1.StringUtil;
16073var email_util_1 = __webpack_require__(96);
16074exports.EmailUtil = email_util_1.EmailUtil;
16075var grade_scale_util_1 = __webpack_require__(97);
16076exports.GradeScaleUtil = grade_scale_util_1.GradeScaleUtil;
16077var i18n_util_1 = __webpack_require__(30);
16078exports.I18nUtil = i18n_util_1.I18nUtil;
16079exports.i18n = i18n_util_1.i18n;
16080var tree_sort_1 = __webpack_require__(99);
16081exports.TreeSort = tree_sort_1.TreeSort;
16082var reporting_term_sort_1 = __webpack_require__(123);
16083exports.ReportingTermSort = reporting_term_sort_1.ReportingTermSort;
16084var xss_options_1 = __webpack_require__(124);
16085exports.XssOptions = xss_options_1.XssOptions;
16086var feature_access_checker_1 = __webpack_require__(125);
16087exports.FeatureAccessChecker = feature_access_checker_1.FeatureAccessChecker;
16088var score_util_1 = __webpack_require__(126);
16089exports.ScoreUtil = score_util_1.ScoreUtil;
16090var smart_text_util_1 = __webpack_require__(127);
16091exports.SmartTextUtil = smart_text_util_1.SmartTextUtil;
16092
16093
16094
16095/***/ }),
16096/* 118 */
16097/***/ (function(module, exports, __webpack_require__) {
16098
16099"use strict";
16100
16101var string_util_1 = __webpack_require__(64);
16102var date_util_1 = __webpack_require__(62);
16103var number_util_1 = __webpack_require__(63);
16104var i18n_util_1 = __webpack_require__(30);
16105var SectionUtil;
16106(function (SectionUtil) {
16107    // sections comparators
16108    function getPeriodDayComparator(termMap) {
16109        return function (o1, o2) {
16110            var term1;
16111            var term2;
16112            // sort by school names first
16113            var comparedResult = string_util_1.StringUtil.compareStrings(o1.schoolName, o2.schoolName);
16114            if (comparedResult !== 0) {
16115                return comparedResult;
16116            }
16117            // then sort by school uid
16118            comparedResult = string_util_1.StringUtil.compareStrings(o1.schoolUid, o2.schoolUid);
16119            if (comparedResult !== 0) {
16120                return comparedResult;
16121            }
16122            // then sort by period day expression
16123            if (o1.periodDay == null && o2.periodDay == null) {
16124                return 0;
16125            }
16126            else if (o1.periodDay == null) {
16127                return 1;
16128            }
16129            else if (o2.periodDay == null) {
16130                return -1;
16131            }
16132            else {
16133                comparedResult = string_util_1.StringUtil.compareStrings(parseFirstPeriod(o1.periodDay), parseFirstPeriod(o2.periodDay));
16134                if (comparedResult !== 0) {
16135                    return comparedResult;
16136                }
16137                comparedResult = string_util_1.StringUtil.compareStrings(parseFirstCycleDay(o1.periodDay), parseFirstCycleDay(o2.periodDay));
16138                if (comparedResult !== 0) {
16139                    return comparedResult;
16140                }
16141            }
16142            // then sort by courseName
16143            comparedResult = compareCourseName(o1, o2);
16144            if (comparedResult !== 0) {
16145                return comparedResult;
16146            }
16147            //then sort by scheduling term
16148            term1 = o1.schedulingTerm != null ? termMap.get(o1.schedulingTerm.uid) : undefined;
16149            term2 = o2.schedulingTerm != null ? termMap.get(o2.schedulingTerm.uid) : undefined;
16150            //Nulls to the end
16151            if (term1 == null && term2 == null) {
16152                return 0;
16153            }
16154            else if (term1 == null) {
16155                return 1;
16156            }
16157            else if (term2 == null) {
16158                return -1;
16159            }
16160            var term1Date = term1.startDate instanceof Date ? term1.startDate : i18n_util_1.i18n.parseJsonDate(term1.startDate);
16161            var term2Date = term2.startDate instanceof Date ? term2.startDate : i18n_util_1.i18n.parseJsonDate(term2.startDate);
16162            comparedResult = date_util_1.DateUtil.compareDates(term1Date, term2Date);
16163            if (comparedResult !== 0) {
16164                return comparedResult;
16165            }
16166            term1Date = term1.endDate instanceof Date ? term1.endDate : i18n_util_1.i18n.parseJsonDate(term1.endDate);
16167            term2Date = term2.endDate instanceof Date ? term2.endDate : i18n_util_1.i18n.parseJsonDate(term2.endDate);
16168            comparedResult = date_util_1.DateUtil.compareDates(term1Date, term2Date);
16169            if (comparedResult !== 0) {
16170                return comparedResult;
16171            }
16172            return compareSourceSystemId(o1, o2);
16173        };
16174    }
16175    function getSectionNumberComparator() {
16176        return function (o1, o2) {
16177            var compareTo = compareSectionNumber(o1, o2);
16178            if (compareTo !== 0) {
16179                return compareTo;
16180            }
16181            compareTo = compareCourseName(o1, o2);
16182            if (compareTo !== 0) {
16183                return compareTo;
16184            }
16185            return compareSourceSystemId(o1, o2);
16186        };
16187    }
16188    function getSectionNameComparator() {
16189        return function (o1, o2) {
16190            var compare = compareCourseName(o1, o2);
16191            if (compare !== 0) {
16192                return compare;
16193            }
16194            compare = compareSectionNumber(o1, o2);
16195            if (compare !== 0) {
16196                return compare;
16197            }
16198            return compareSourceSystemId(o1, o2);
16199        };
16200    }
16201    // section mutators
16202    function periodAndDayMutator(section) {
16203        section.primaryDisplay = section.preferredCourseName || section.courseName;
16204        section.secondaryDisplay = section.periodDay;
16205        section.classDisplayPreference = 'PeriodAndDay';
16206    }
16207    function customPeriodAndDayMutator(section) {
16208        periodAndDayMutator(section);
16209        section.classDisplayPreference = 'CustomPeriodAndDayMutator';
16210        // once some provisioning work is done we need to do something like this here:
16211        // section.primaryDisplay = section.customCourseName;
16212    }
16213    function customMutator(section) {
16214        sectionNumberMutator(section);
16215        section.classDisplayPreference = 'Custom';
16216        // once some provisioning work is done we need to do something like this here:
16217        // section.primaryDisplay = section.customCourseName;
16218    }
16219    function sectionNumberMutator(section) {
16220        section.primaryDisplay = section.preferredCourseName || section.courseName;
16221        section.secondaryDisplay = section.sectionNumber;
16222        section.classDisplayPreference = 'SectionNumber';
16223    }
16224    // preference application functions
16225    function setDisplayValuesByPreference(sections, classDisplayPrefValue) {
16226        var mutator;
16227        switch (classDisplayPrefValue) {
16228            case 'Custom': // eventually custom will need to use a different mutator but we don't have section nickname yet.
16229            case 'SectionNumber':
16230            case 'Alphabetical':
16231                mutator = sectionNumberMutator;
16232                break;
16233            case 'CustomPeriodDay': // eventually custom period day will need to use a different mutator but we don't have section nickname yet.
16234            case 'PeriodAndDay':
16235            default:
16236                mutator = periodAndDayMutator;
16237                break;
16238        }
16239        sections.forEach(mutator);
16240    }
16241    SectionUtil.setDisplayValuesByPreference = setDisplayValuesByPreference;
16242    function getSortSectionByPreferenceComparator(classDisplayPrefValue, termMap) {
16243        switch (classDisplayPrefValue) {
16244            case 'SectionNumber':
16245                return getSectionNumberComparator();
16246            case 'Custom': // eventually custom will need to use a different comparator but we don't have section nickname yet.
16247            case 'Alphabetical':
16248                return getSectionNameComparator();
16249            case 'CustomPeriodDay': // eventually custom period day will need to use a different comparator but we don't have section nickname yet.
16250            case 'PeriodAndDay':
16251            default:
16252                if (termMap == null) {
16253                    throw Error('tried to sort by period day without passing in a termMap');
16254                }
16255                return getPeriodDayComparator(termMap);
16256        }
16257    }
16258    SectionUtil.getSortSectionByPreferenceComparator = getSortSectionByPreferenceComparator;
16259    function sortSectionsByPreference(sections, classDisplayPrefValue, termMap) {
16260        var comparator = getSortSectionByPreferenceComparator(classDisplayPrefValue, termMap);
16261        //s.schoolName asc, s.schoolUid asc, s.periodDay asc, s.courseName asc, s.schedulingTerm asc
16262        sections.sort(comparator);
16263    }
16264    SectionUtil.sortSectionsByPreference = sortSectionsByPreference;
16265    // general utility methods
16266    function compareSectionNumber(o1, o2) {
16267        var sectionNumber1 = o1.sectionNumber != null ? o1.sectionNumber.trim() : '';
16268        var sectionNumber2 = o2.sectionNumber != null ? o2.sectionNumber.trim() : '';
16269        var section1AsNumber = parseInt(sectionNumber1);
16270        var section2AsNumber = parseInt(sectionNumber2);
16271        var compareTo;
16272        if (number_util_1.NumberUtil.isNumber(section1AsNumber) && number_util_1.NumberUtil.isNumber(section2AsNumber)) {
16273            compareTo = number_util_1.NumberUtil.compareNumbers(section1AsNumber, section2AsNumber);
16274        }
16275        else if (!number_util_1.NumberUtil.isNumber(section1AsNumber) && !number_util_1.NumberUtil.isNumber(section2AsNumber)) {
16276            compareTo = string_util_1.StringUtil.compareStringsIgnoreCase(sectionNumber1, sectionNumber2);
16277        }
16278        else if (number_util_1.NumberUtil.isNumber(section1AsNumber) && !number_util_1.NumberUtil.isNumber(section2AsNumber)) {
16279            return -1;
16280        }
16281        else {
16282            return 1;
16283        }
16284        return compareTo;
16285    }
16286    function compareSourceSystemId(o1, o2) {
16287        var sourceSystemId1 = parseInt(o1.sourceSystemId);
16288        var sourceSystemId2 = parseInt(o2.sourceSystemId);
16289        if (!number_util_1.NumberUtil.isNumber(sourceSystemId1) || !number_util_1.NumberUtil.isNumber(sourceSystemId2)) {
16290            return string_util_1.StringUtil.compareStringsIgnoreCase(o1.sourceSystemId, o2.sourceSystemId);
16291        }
16292        return number_util_1.NumberUtil.compareNumbers(sourceSystemId1, sourceSystemId2);
16293    }
16294    function compareCourseName(o1, o2) {
16295        var courseName1 = o1.preferredCourseName ? string_util_1.StringUtil.defaultString(o1.preferredCourseName).trim() : string_util_1.StringUtil.defaultString(o1.courseName).trim();
16296        var courseName2 = o2.preferredCourseName ? string_util_1.StringUtil.defaultString(o2.preferredCourseName).trim() : string_util_1.StringUtil.defaultString(o2.courseName).trim();
16297        return string_util_1.StringUtil.compareStringsIgnoreCase(courseName1, courseName2);
16298    }
16299    function parseFirstPeriod(periodDayExpression) {
16300        var upToParen = periodDayExpression.substr(0, periodDayExpression.indexOf('('));
16301        if (upToParen !== periodDayExpression) {
16302            var hyphenIndex = upToParen.indexOf('-');
16303            if (hyphenIndex !== -1) {
16304                return upToParen.substr(0, hyphenIndex);
16305            }
16306            return upToParen;
16307        }
16308        return periodDayExpression;
16309    }
16310    function parseFirstCycleDay(periodDayExpression) {
16311        var firstCycleDays = periodDayExpression.substr(periodDayExpression.indexOf('(') + 1, periodDayExpression.indexOf(')') - 1);
16312        if (firstCycleDays !== periodDayExpression) {
16313            var charIndex = firstCycleDays.indexOf(',');
16314            if (charIndex !== -1) {
16315                return firstCycleDays.substr(0, charIndex);
16316            }
16317            charIndex = firstCycleDays.indexOf('-');
16318            if (charIndex !== -1) {
16319                return firstCycleDays.substr(0, charIndex);
16320            }
16321            return firstCycleDays;
16322        }
16323        return periodDayExpression;
16324    }
16325})(SectionUtil = exports.SectionUtil || (exports.SectionUtil = {}));
16326
16327
16328
16329/***/ }),
16330/* 119 */
16331/***/ (function(module, exports, __webpack_require__) {
16332
16333"use strict";
16334
16335var i18n_util_1 = __webpack_require__(30);
16336exports.numberValidationRules = {
16337    i18n: i18n_util_1.i18n,
16338    validateIsNumber: function validateIsNumber(input, condition, context) {
16339        //console.log('validating isNumber');
16340        var result = {
16341            isValid: this.i18n.isValidNumber(input)
16342        };
16343        if (result.isValid) {
16344            context.parsedNumber = this.i18n.deLocalizeNumber(input);
16345        }
16346        else {
16347            result.errorMessage = this.i18n.getText('cu|validation engine|Must be a number');
16348        }
16349        //console.log('result: ' + result.isValid);
16350        return result;
16351    },
16352    validateIsInteger: function validateIsInteger(input, condition, context) {
16353        // an integer string should have no chars that aren't numeric, except an optional negative sign at start
16354        //console.log('validating integer');
16355        //At this point we should already know that it is a number.
16356        //So then it's just a matter of whether it's a
16357        var result = {
16358            isValid: input.indexOf(this.i18n.locale.NUMBER_FORMATS.DECIMAL_SEP) === -1
16359        };
16360        if (!result.isValid) {
16361            result.errorMessage = this.i18n.getText('cu|validation engine|xx is not a valid integer.', { input
16361: input });
16362        }
16363        //console.log(`result: ${result.isValid}`);
16364        return result;
16365    },
16366    validateMaxNumberValue: function validateMaxNumberValue(input, maxValue, context) {
16367        //console.log('validating max number');
16368        var result = {
16369            isValid: context.parsedNumber <= maxValue
16370        };
16371        if (!result.isValid) {
16372            result.errorMessage = this.i18n.getText('cu|validation engine|The number must be less than or equal to xx', {
16373                maxValue: this.i18n.localizeNumber(maxValue)
16374            });
16375        }
16376        //console.log('result: ' + result.isValid);
16377        return result;
16378    },
16379    validateMinNumberValue: function validateMinNumberValue(input, minValue, context) {
16380        //console.log('validating min number');
16381        var result = {
16382            isValid: context.parsedNumber >= minValue
16383        };
16384        if (!result.isValid) {
16385            result.errorMessage = this.i18n.getText('cu|validation engine|The number must be greater than or equal to xx', {
16386                minValue: this.i18n.localizeNumber(minValue)
16387            });
16388        }
16389        //console.log('result: ' + result.isValid);
16390        return result;
16391    },
16392    validateMaxNumberLength: function validateMaxNumberLength(input, maxLength, context) {
16393        var result = {
16394            isValid: input.length <= maxLength
16395        };
16396        if (!result.isValid) {
16397            result.errorMessage = this.i18n.getText('cu|validation engine|The number must have xx or less digits.', { maxLength: maxLength });
16398        }
16399        return result;
16400    },
16401    validateMinNumberLength: function validateMinNumberLength(input, minLength, context) {
16402        var result = {
16403            isValid: input.length >= minLength
16404        };
16405        if (!result.isValid) {
16406            result.errorMessage = this.i18n.getText('cu|validation engine|The number must have xx or more digits.', { minLength: minLength });
16407        }
16408        return result;
16409    },
16410    validateMaxNumberValueExclusive: function validateMaxNumberValueExclusive(input, maxValue, context) {
16411        //console.log('validating min number');
16412        var result = {
16413            isValid: context.parsedNumber < maxValue
16414        };
16415        if (!result.isValid) {
16416            result.errorMessage = this.i18n.getText('cu|validation engine|The number must be less than xx', {
16417                maxValue: this.i18n.localizeNumber(maxValue)
16418            });
16419        }
16420        //console.log('result: ' + result.isValid);
16421        return result;
16422    },
16423    validateMinNumberValueExclusive: function validateMinNumberValueExclusive(input, minValue, context) {
16424        //console.log('validating min number');
16425        var result = {
16426            isValid: context.parsedNumber > minValue
16427        };
16428        if (!result.isValid) {
16429            result.errorMessage = this.i18n.getText('cu|validation engine|The number must be greater than xx', {
16430                minValue: this.i18n.localizeNumber(minValue)
16431            });
16432        }
16433        //console.log('result: ' + result.isValid);
16434        return result;
16435    },
16436    validateMaxDecimals: function validateMaxDecimals(input, maxDecimals, context) {
16437        var countDecimals = function (value) {
16438            if ((value % 1) === 0) {
16439                //integer
16440                return 0;
16441            }
16442            return value.toString().split('.')[1].length;
16443        };
16444        //console.log('validating max decimals');
16445        var result = {
16446            isValid: countDecimals(context.parsedNumber) <= maxDecimals
16447        };
16448        if (!result.isValid) {
16449            result.errorMessage = this.i18n.getText('cu|validation engine|The number cannot have exceed xx decimal places.', { maxDecimals: maxDecimals });
16450        }
16451        //console.log('result: ' + result.isValid);
16452        return result;
16453    }
16454};
16455
16456
16457
16458/***/ }),
16459/* 120 */
16460/***/ (function(module, exports, __webpack_require__) {
16461
16462"use strict";
16463
16464var i18n_util_1 = __webpack_require__(30);
16465exports.dateValidationRules = {
16466    i18n: i18n_util_1.i18n,
16467    validateIsDate: function validateIsDate(input, condition, context) {
16468        //console.log('validating isDate');
16469        var thisI18n = this.i18n;
16470        var result = {
16471            isValid: thisI18n.isValidDate(input)
16472        };
16473        if (result.isValid) {
16474            context.parsedDate = thisI18n.deLocalizeDate(input);
16475        }
16476        else {
16477            result.errorMessage = this.i18n.getText('cu|validation engine|Must be a date');
16478        }
16479        //console.log('result: ' + result.isValid);
16480        return result;
16481    },
16482    validateMaxDate: function validateMaxDate(input, maxDate, context) {
16483        //console.log('validating maxDate');
16484        var result = {
16485            isValid: context.parsedDate.getTime() <= maxDate.getTime()
16486        };
16487        if (!result.isValid) {
16488            result.errorMessage = this.i18n.getText('cu|validation engine|The date must be on or before xx', { maxDate: this.i18n.localizeDate(maxDate) });
16489        }
16490        //console.log('result: ' + result.isValid);
16491        return result;
16492    },
16493    validateMinDate: function validateMinDate(input, minDate, context) {
16494        //console.log('validating minDate');
16495        var result = {
16496            isValid: context.parsedDate.getTime() >= minDate.getTime()
16497        };
16498        if (!result.isValid) {
16499            result.errorMessage = this.i18n.getText('cu|validation engine|The date must be on or after xx', { minDate: this.i18n.localizeDate(minDate) });
16500        }
16501        //console.log('result: ' + result.isValid);
16502        return result;
16503    }
16504};
16505
16506
16507
16508/***/ }),
16509/* 121 */
16510/***/ (function(module, exports, __webpack_require__) {
16511
16512"use strict";
16513
16514var i18n_util_1 = __webpack_require__(30);
16515var email_util_1 = __webpack_require__(96);
16516exports.textValidationRules = {
16517    i18n: i18n_util_1.i18n,
16518    validateMaxTextLength: function validateMaxTextLength(input, maxLength, context) {
16519        var result = {
16520            isValid: input.length <= maxLength
16521        };
16522        if (!result.isValid) {
16523            result.errorMessage = this.i18n.getText('cu|validation engine|The text must have xx or less characters.', { maxLength: maxLength });
16524        }
16525        return result;
16526    },
16527    validateMinTextLength: function validateMinTextLength(input, minLength, context) {
16528        var result = {
16529            isValid: input.length >= minLength
16530        };
16531        if (!result.isValid) {
16532            result.errorMessage = this.i18n.getText('cu|validation engine|The text must have xx or more characters.', { minLength: minLength });
16533        }
16534        return result;
16535    },
16536    validateExcludeChars: function validateExcludeChars(input, condition, context) {
16537        //console.log('validating excludeChars');
16538        var result = {
16539            isValid: !condition.pattern.test(input)
16540        };
16541        if (!result.isValid) {
16542            result.errorMessage = this.i18n.getText('cu|validation engine|Must not contain any characters in xx', { excludeChars: condition.excludeChars });
16543        }
16544        //console.log('result: ' + result.isValid);
16545        return result;
16546    },
16547    validateRegex: function validateRegex(input, condition, context) {
16548        var result = {
16549            isValid: condition.pattern.test(input)
16550        };
16551        if (!result.isValid) {
16552            result.errorMessage = condition.errorMessage;
16553        }
16554        return result;
16555    },
16556    validateInverseRegex: function validateInverseRegex(input, condition, context) {
16557        var result = {
16558            isValid: !condition.pattern.test(input)
16559        };
16560        if (!result.isValid) {
16561            result.errorMessage = condition.errorMessage;
16562        }
16563        return result;
16564    },
16565    validateEmail: function (input, condition, context) {
16566        var result = {
16567            isValid: email_util_1.EmailUtil.validateEmail(input)
16568        };
16569        if (!result.isValid) {
16570            result.errorMessage = this.i18n.getText('cu|validation engine|The email is not in the correct format.');
16571        }
16572        return result;
16573    }
16574};
16575
16576
16577
16578/***/ }),
16579/* 122 */
16580/***/ (function(module, exports, __webpack_require__) {
16581
16582"use strict";
16583
16584var i18n_util_1 = __webpack_require__(30);
16585exports.timeValidationRules = {
16586    i18n: i18n_util_1.i18n,
16587    validateIsTime: function validateIsTime(input, condition, context) {
16588        var thisI18n = this.i18n;
16589        var result = {
16590            isValid: thisI18n.isValidTime(input)
16591        };
16592        if (result.isValid) {
16593            context.parsedTime = thisI18n.deLocalizeTime(input);
16594        }
16595        else {
16596            result.errorMessage = this.i18n.getText(thisI18n.locale.DATETIME_FORMATS.shortTime === 'HH:mm' ? 'cu|validation engine|Must be a time (HH:MM)' : 'cu|validation engine|Must be a time (HH:MM AM or PM)');
16597        }
16598        return result;
16599    },
16600    validateMaxTime: function validateMaxTime(input, maxTime, context) {
16601        var result = {
16602            isValid: context.parsedTime.getHours() * 60 + context.parsedTime.getMinutes() <= maxTime.getHours() * 60 + maxTime.getMinutes()
16603        };
16604        if (!result.isValid) {
16605            result.errorMessage = this.i18n.getText('cu|validation engine|The time must be on or before xx', { maxTime: this.i18n.localizeTime(maxTime) });
16606        }
16607        return result;
16608    },
16609    validateMinTime: function validateMinTime(input, minTime, context) {
16610        var result = {
16611            isValid: context.parsedTime.getHours() * 60 + context.parsedTime.getMinutes() >= minTime.getHours() * 60 + minTime.getMinutes()
16612        };
16613        if (!result.isValid) {
16614            result.errorMessage = this.i18n.getText('cu|validation engine|The time must be on or after xx', { minTime: this.i18n.localizeTime(minTime) });
16615        }
16616        return result;
16617    }
16618};
16619
16620
16621
16622/***/ }),
16623/* 123 */
16624/***/ (function(module, exports, __webpack_require__) {
16625
16626"use strict";
16627
16628var reporting_term_1 = __webpack_require__(100);
16629var reporting_term_wrapper_1 = __webpack_require__(101);
16630var tree_sort_1 = __webpack_require__(99);
16631var date_util_1 = __webpack_require__(62);
16632var ReportingTermSort;
16633(function (ReportingTermSort) {
16634    function sortReportingTerms(terms, allowDuplicates, sortType) {
16635        if (allowDuplicates === void 0) { allowDuplicates = false; }
16636        if (sortType === void 0) { sortType = tree_sort_1.TreeSort.TreeSortType.PRE_ORDER; }
16637        var allReportingTerms = [];
16638        terms.forEach(function (term) {
16639            var rtTermIf = new reporting_term_1.ReportingTerm(term);
16640            allReportingTerms.push(new reporting_term_wrapper_1.ReportingTermWrapper(rtTermIf));
16641        });
16642        if (!allowDuplicates) {
16643            allReportingTerms = mergeDuplicateNamedTermbins(allReportingTerms);
16644        }
16645        tree_sort_1.TreeSort.sortTreesPostOrder(allReportingTerms);
16646        for (var i = 0; i < allReportingTerms.length; i++) {
16647            var child = allReportingTerms[i];
16648            for (var i1 = i + 1; i1 < allReportingTerms.length; i1++) {
16649                var possibleParent = allReportingTerms[i1];
16650                if (date_util_1.DateUtil.dateRangeIsContained(child.getStartDate(), child.getEndDate(), possibleParent.getStartDate(), possibleParent.getEndDate())) {
16651                    child.setParent(possibleParent);
16652                    break;
16653                }
16654            }
16655        }
16656        var rootTerms = [];
16657        for (var _i = 0, allReportingTerms_1 = allReportingTerms; _i < allReportingTerms_1.length; _i++) {
16658            var possibleRoot = allReportingTerms_1[_i];
16659            if (possibleRoot.isRoot()) {
16660                rootTerms.push(new reporting_term_wrapper_1.ReportingTermWrapper(possibleRoot, possibleRoot.getChildren()));
16661            }
16662        }
16663        var reportingTerms = [];
16664        var sortedTermWrappers = tree_sort_1.TreeSort.getSortedTreesUsing(rootTerms, sortType);
16665        for (var _a = 0, sortedTermWrappers_1 = sortedTermWrappers; _a < sortedTermWrappers_1.length; _a++) {
16666            var termWrapper = sortedTermWrappers_1[_a];
16667            reportingTerms.push({
16668                uid: termWrapper.getUid(),
16669                schedulingTermUid: termWrapper.getSchedulingTermUid(),
16670                reportingTermName: termWrapper.getReportingTermName(),
16671                startDate: termWrapper.getStartDate(),
16672                endDate: termWrapper.getEndDate()
16673            });
16674        }
16675        return reportingTerms;
16676    }
16677    ReportingTermSort.sortReportingTerms = sortReportingTerms;
16678    function mergeDuplicateNamedTermbins(termWrappers) {
16679        var merged = new Map();
16680        for (var _i = 0, termWrappers_1 = termWrappers; _i < termWrappers_1.length; _i++) {
16681            var wrapper = termWrappers_1[_i];
16682            var value = merged.get(wrapper.getReportingTermName());
16683            if (value != null) {
16684                if (date_util_1.DateUtil.isAfter(value.getStartDate(), wrapper.getEndDate())) {
16685                    value.setStartDate(wrapper.getStartDate());
16686                }
16687                if (date_util_1.DateUtil.isBefore(value.getEndDate(), wrapper.getEndDate())) {
16688                    value.setEndDate(wrapper.getEndDate());
16689                }
16690            }
16691            else {
16692                merged.set(wrapper.getReportingTermName(), new reporting_term_wrapper_1.ReportingTermWrapper(wrapper));
16693            }
16694        }
16695        return Array.from(merged.values());
16696    }
16697})(ReportingTermSort = exports.ReportingTermSort || (exports.ReportingTermSort = {}));
16698
16699
16700
16701/***/ }),
16702/* 124 */
16703/***/ (function(module, exports, __webpack_require__) {
16704
16705"use strict";
16706
16707var XssOptions;
16708(function (XssOptions) {
16709    XssOptions.options = getOptions();
16710    function getOptions() {
16711        var tags = [
16712            'strike', 'del', 'dd', 'h3', 'small', 'big', 'sub', 'tt', 'fieldset', 'a', 'ul', 'h4',
16713            'cite', 'dfn', 'thead', 'legend', 'h5', 'kbd', 'code', 'b', 'ins', 'img', 'acronym',
16714            'h6', 'sup', 'pre', 'iframe', 'tbody', 'blockquote', 'td', 'o:p', 'dt', 'br', 'output',
16715            'p', 'strong', 'caption', 'div', 'samp', 'table', 'li', 'ol', 'var', 's', 'font', 'tr',
16716            'em', 'th', 'h1', 'address', 'i', 'abbr', 'h2', 'span', 'hr', 'u'];
16717        var attributes = [
16718            'name', 'face', 'href', 'cellspacing', 'bgcolor', 'size', 'cite', 'dir', 'class',
16719            'title', 'src', 'border', 'summary', 'color', 'height', 'rowspan', 'cellpadding',
16720            'align', 'datetime', 'alt', 'colspan', 'style', 'target', 'width'];
16721        var whiteList = {};
16722        tags.forEach(function (tag) {
16723            whiteList[tag] = attributes;
16724        });
16725        return { whiteList: whiteList };
16726    }
16727})(XssOptions = exports.XssOptions || (exports.XssOptions = {}));
16728
16729
16730
16731/***/ }),
16732/* 125 */
16733/***/ (function(module, exports, __webpack_require__) {
16734
16735"use strict";
16736
16737var FeatureAccessChecker = (function () {
16738    function FeatureAccessChecker(featureAccess) {
16739        this.featureAccess = featureAccess;
16740    }
16741    FeatureAccessChecker.prototype.hasAccess = function (featureName) {
16742        return this.featureAccess[featureName] === true;
16743    };
16744    return FeatureAccessChecker;
16745}());
16746exports.FeatureAccessChecker = FeatureAccessChecker;
16747
16748
16749
16750/***/ }),
16751/* 126 */
16752/***/ (function(module, exports, __webpack_require__) {
16753
16754"use strict";
16755
16756var number_util_1 = __webpack_require__(63);
16757var roundToPrecision = number_util_1.NumberUtil.roundToPrecision;
16758var grade_scale_util_1 = __webpack_require__(97);
16759var PRECISION = 6;
16760var PLUS_MINUS_REGEX = /[+\-]$/;
16761var ScoreUtil;
16762(function (ScoreUtil) {
16763    /* Percent Value Determination to assign to Standard Score for Push Calculation as per AC's discussion with Danny and Jeff.  These have been blessed by Renee and Pamela.
16764  
16765      Assignment Score Type -> Standard Score Type
16766  
16767      Rule 1:
16768          POINTS -> POINTS
16769          POINTS -> PERCENT
16770          POINTS -> GRADESCALE
16771          - Always use the % calculated from the assignment points
16772  
16773      Rule 2:
16774          PERCENT -> POINTS
16775          PERCENT -> PERCENT
16776          PERCENT -> GRADESCALE
16777          - Always use the assignment %
16778  
16779      Rule 3:
16780          GRADESCALE -> POINTS
16781          GRADESCALE -> PERCENT
16782          GRADESCALE -> GRADESCALE
16783          - Always use the assignment % calculated based on the assignment grade scale
16784    */
16785    function pushCalculation(fromScore, fromGradeScale, fromScoreType, fromMaxPoints, toGradeScale, toScoreType, toMaxPoints, toScore) {
16786        if (toScore == null) {
16787            toScore = {};
16788        }
16789        // * * * * * * * * * * * * * * * * *       Populate Typed Score First       * * * * * * * * * * * * * * * * * *
16790        //Easiest case first.
16791        if (toGradeScale.uid === fromGradeScale.uid &&
16792            toScoreType === fromScoreType &&
16793            toMaxPoints === fromMaxPoints) {
16794            //Everything is the same! Just copy it over!
16795            copyFullScore(fromScore, toScore);
16796        }
16797        switch (fromScoreType) {
16798            case 'POINTS':
16799                pushPoints(fromScore, fromGradeScale, fromMaxPoints, toGradeScale, toScoreType, toMaxPoints, toScore);
16800                break;
16801            case 'PERCENT':
16802                pushPercent(fromScore, fromGradeScale, toGradeScale, toScoreType, toMaxPoints, toScore);
16803                break;
16804            case 'GRADESCALE':
16805                pushGradeScale(fromScore, fromGradeScale, fromMaxPoints, toGradeScale, toScoreType, toMaxPoints, toScore);
16806                break;
16807            default:
16808                throw 'do not call this function on something without a scoretype';
16809        }
16810        // For cases when we need to use the percentage coming from the "to" grade scale (condition where the toScore.percent is null), this function will compute this percent.
16811        var calculatePercentForGradeScaleIfMissing = function (score, scoreType, gradeScale) {
16812            if (score != null && score.percent == null) {
16813                // Alwyas compute the percent when converting to score type of GRADESCALE.  This is required in order for the standards progress to get updated in SIS.
16814                var grade = getGrade(score, gradeScale);
16815                //Push does not support 'LEVELS' calcRelationship
16816                var percentAsString = grade_scale_util_1.GradeScaleUtil.convertGradeScaleItemToScoreOfType(grade, gradeScale, 'PERCENT', false, 'GRADESCALE');
16817                if (percentAsString != null) {
16818                    score.percent = Number(percentAsString);
16819                }
16820            }
16821        };
16822        // * * * * * * * * * * * * * * * * *       Populate GradeScale Score Second       * * * * * * * * * * * * * * * * * *
16823        var gsi;
16824        if (fromGradeScale.gradeScaleType === toGradeScale.gradeScaleType) {
16825            if (fromGradeScale.gradeScaleType === 'ALPHA') {
16826                if (fromGradeScale.uid === toGradeScale.uid) {
16827                    var gs = grade_scale_util_1.GradeScaleUtil.getGradeScaleItem(fromScore.letterGrade, fromGradeScale);
16828                    if (gs != null) {
16829                        toScore.letterGrade = fromScore.letterGrade;
16830                        calculatePercentForGradeScaleIfMissing(toScore, toScoreType, toGradeScale);
16831                        delete toScore.numericGrade;
16832                        return toScore;
16833                    }
16834                }
16835            }
16836            else if (fromGradeScale.gradeScaleType === 'NUMERIC') {
16837                if (fromGradeScale.numericMax === toGradeScale.numericMax &&
16838                    fromGradeScale.numericMin === toGradeScale.numericMin) {
16839                    //They are similar grade scales.
16840                    numericGradeScaleToNumericGradeScale(fromScore, fromGradeScale, toScore, toGradeScale);
16841                    calculatePercentForGradeScaleIfMissing(toScore, toScoreType, toGradeScale);
16842                    return toScore;
16843                }
16844            }
16845        }
16846        //This is populating the gradeScale Score VIA conversion of the typed score. (2 hops)
16847        switch (toScoreType) {
16848            case 'POINTS':
16849                gsi = grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(toScore.points), toGradeScale, 'POINTS', false, 'GRADESCALE', toMaxPoints);
16850                setGrade(gsi, toScore, toGradeScale);
16851                break;
16852            case 'PERCENT':
16853                gsi = grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(toScore.percent), toGradeScale, 'PERCENT', false, 'GRADESCALE', 0);
16854                setGrade(gsi, toScore, toGradeScale);
16855                break;
16856            case 'GRADESCALE':
16857                calculatePercentForGradeScaleIfMissing(toScore, toScoreType, toGradeScale);
16858                break;
16859            default: //shut up tslint
16860        }
16861        if (toScore.points != null) {
16862            toScore.points = number_util_1.NumberUtil.round(toScore.points, 2);
16863        }
16864        if (toScore.percent != null) {
16865            toScore.percent = number_util_1.NumberUtil.round(toScore.percent, 2);
16866        }
16867        var numberOfDecimals = toGradeScale.numericDecimals ? toGradeScale.numericDecimals : 2;
16868        if (toScore.letterGrade != null && !isNaN(toScore.letterGrade)) {
16869            toScore.letterGrade = String(number_util_1.NumberUtil.round(Number(toScore.letterGrade), numberOfDecimals));
16870        }
16871        if (toScore.numericGrade != null) {
16872            toScore.numericGrade = number_util_1.NumberUtil.round(toScore.numericGrade, numberOfDecimals);
16873        }
16874        return toScore;
16875    }
16876    ScoreUtil.pushCalculation = pushCalculation;
16877    function pushPoints(fromScore, fromGradeScale, fromMaxPoints, toGradeScale, toScoreType, toMaxPoints, toScore, roundNumber) {
16878        if (roundNumber === void 0) { roundNumber = true; }
16879        var calcPercent = function (points, maxPoints) {
16880            if (points === void 0) { points = 0; }
16881            return roundToPrecision(points / maxPoints * 100, 2, PRECISION, roundNumber);
16882        };
16883        switch (toScoreType) {
16884            case 'POINTS':
16885                if (fromMaxPoints === toMaxPoints) {
16886                    toScore.points = fromScore.points;
16887                }
16888                else {
16889                    toScore.points = roundToPrecision(fromScore.points / fromMaxPoints * toMaxPoints, 2, PRECISION, roundNumber);
16890                }
16891                // As per AC's conversation with Danny, use the percent calculated from points as the percent to use for toScore.percent.
16892                toScore.percent = calcPercent(fromScore.points, fromMaxPoints);
16893                break;
16894            case 'PERCENT':
16895                toScore.percent = calcPercent(fromScore.points, fromMaxPoints);
16896                break;
16897            case 'GRADESCALE':
16898                //Push does not support 'LEVELS' calcRelationship
16899                toScore.percent = calcPercent(fromScore.points, fromMaxPoints);
16900                setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(fromScore.points), toGradeScale, 'POINTS', true, 'GRADESCALE', fromMaxPoints), toScore, toGradeScale);
16901                break;
16902            default: //no-op
16903        }
16904    }
16905    ScoreUtil.pushPoints = pushPoints;
16906    function pushPercent(fromScore, fromGradeScale, toGradeScale, toScoreType, toMaxPoints, toScore, roundNumber) {
16907        if (roundNumber === void 0) { roundNumber = true; }
16908        switch (toScoreType) {
16909            case 'POINTS':
16910                toScore.points = roundToPrecision(fromScore.percent / 100 * toMaxPoints, 2, PRECISION, roundNumber);
16911                // As per AC's conversation with Danny, for percent, we just want to use the fromScore.percent value as the toScore.percent
16912                toScore.percent = fromScore.percent;
16913                break;
16914            case 'PERCENT':
16915                toScore.percent = fromScore.percent;
16916                break;
16917            case 'GRADESCALE':
16918                //Push does not support 'LEVELS' calcRelationship
16919                // As per AC's conversation with Danny, for percent, we just want to use the fromScore.percent value as the toScore.percent
16920                toScore.percent = fromScore.percent;
16921                setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(fromScore.percent), toGradeScale, 'PERCENT', true, 'GRADESCALE'), toScore, toGradeScale);
16922                break;
16923            default: //no-op
16924        }
16925    }
16926    ScoreUtil.pushPercent = pushPercent;
16927    function pushGradeScale(fromScore, fromGradeScale, fromMaxPoints, toGradeScale, toScoreType, toMaxPoints, toScore, roundNumber) {
16928        if (roundNumber === void 0) { roundNumber = true; }
16929        switch (toScoreType) {
16930            case 'POINTS':
16931                var points = grade_scale_util_1.GradeScaleUtil.convertGradeScaleItemToScoreOfType(getGrade(fromScore, fromGradeScale), fromGradeScale, 'POINTS', true, 'GRADESCALE', toMaxPoints);
16932                var fromPoints = points != null ? Number(points) : 0;
16933                toScore.points = fromPoints;
16934                // As per AC's conversation with Danny, use the percent calculated from points as the percent to use for toScore.percent.
16935                toScore.percent = roundToPrecision(fromPoints / fromMaxPoints * 100, 2, PRECISION, roundNumber);
16936                break;
16937            case 'PERCENT':
16938                var percent = grade_scale_util_1.GradeScaleUtil.convertGradeScaleItemToScoreOfType(getGrade(fromScore, fromGradeScale), fromGradeScale, 'PERCENT', true, 'GRADESCALE', toMaxPoints);
16939                toScore.percent = percent != null ? Number(percent) : undefined;
16940                break;
16941            case 'GRADESCALE':
16942                gradeScaleToGradeScale(fromScore, fromGradeScale, toScore, toGradeScale);
16943                break;
16944            default: //no op
16945        }
16946    }
16947    ScoreUtil.pushGradeScale = pushGradeScale;
16948    function gradeScaleToGradeScale(fromScore, fromGradeScale, toScore, toGradeScale) {
16949        if (fromGradeScale.uid === toGradeScale.uid) {
16950            toScore.letterGrade = fromScore.letterGrade;
16951            toScore.numericGrade = fromScore.numericGrade;
16952            return;
16953        }
16954        if (fromGradeScale.gradeScaleType === 'NUMERIC') {
16955            if (toGradeScale.gradeScaleType === 'NUMERIC') {
16956                // NUMERIC ---> NUMERIC
16957                numericGradeScaleToNumericGradeScale(fromScore, fromGradeScale, toScore, toGradeScale);
16958            }
16959            else {
16960                // NUMERIC ---> ALPHA
16961                var fromGrade = getGrade(fromScore, fromGradeScale);
16962                var fromPercent = grade_scale_util_1.GradeScaleUtil.convertNumericGradeScaleItemToPercent(fromGrade, fromGradeScale, false);
16963                setGrade(grade_scale_util_1.GradeScaleUtil.convertPercentToGradeScaleItem(fromPercent, toGradeScale), toScore, toGradeScale);
16964                // As per discussion with Danny, Jeff and AC, this is what we concluded this should be.
16965                toScore.percent = fromPercent;
16966            }
16967        }
16968        else {
16969            // ALPHA ---> NUMERIC
16970            // ALPHA ---> ALPHA
16971            var percent = grade_scale_util_1.GradeScaleUtil.convertNumericGradeScaleItemToPercent(fromScore.letterGrade, fromGradeScale, false);
16972            // As per discussion with Danny, Jeff and AC, this is what we concluded this should be.
16973            toScore.percent = percent;
16974            setGrade(grade_scale_util_1.GradeScaleUtil.convertPercentToGradeScaleItem(percent, toGradeScale), toScore, toGradeScale);
16975        }
16976    }
16977    ScoreUtil.gradeScaleToGradeScale = gradeScaleToGradeScale;
16978    function numericGradeScaleToNumericGradeScale(fromScore, fromGradeScale, toScore, toGradeScale) {
16979        var gradeScaleScore = getGrade(fromScore, fromGradeScale);
16980        if (fromGradeScale.numericMin === toGradeScale.numericMin && fromGradeScale.numericMax === toGradeScale.numericMax) {
16981            //Searching the toGradeScale for the fromScore.
16982            var foundGsi = grade_scale_util_1.GradeScaleUtil.getGradeScaleItem(gradeScaleScore, toGradeScale);
16983            if (foundGsi != null) {
16984                setGrade(gradeScaleScore, toScore, toGradeScale);
16985            }
16986            else {
16987                var fromNumericValue = grade_scale_util_1.GradeScaleUtil.convertNumericGradeScaleItemToNumericValue(gradeScaleScore, fromGradeScale);
16988                if (fromNumericValue == null) {
16989                    delete toScore.letterGrade;
16990                    delete toScore.numericGrade;
16991                    return;
16992                }
16993                if (toGradeScale.conversionToNumeric === 'PERCENT' || hasNumericDecimals(toGradeScale)) {
16994                    setGrade(String(fromNumericValue), toScore, toGradeScale);
16995                }
16996                else {
16997                    setGrade(String(grade_scale_util_1.GradeScaleUtil.convertNumericValueTo('GRADESCALE', fromNumericValue, toGradeScale, 'GRADESCALE', true)), toScore, toGradeScale);
16998                }
16999            }
17000            if (toScore.percent == null) {
17001                // As per discussion with Danny, Jeff and AC, this is what we concluded this should be.
17002                var fromPercent = grade_scale_util_1.GradeScaleUtil.convertNumericGradeScaleItemToPercent(gradeScaleScore, fromGradeScale, false);
17003                toScore.percent = fromPercent;
17004            }
17005        }
17006        else {
17007            //The numeric grade scales aren't really compatible.
17008            var fromPercent = grade_scale_util_1.GradeScaleUtil.convertNumericGradeScaleItemToPercent(gradeScaleScore, fromGradeScale, false);
17009            if (toScore.percent == null) {
17010                toScore.percent = fromPercent;
17011            }
17012            setGrade(grade_scale_util_1.GradeScaleUtil.convertPercentToNumericGradeScaleItem(fromPercent, toGradeScale, true), toScore, toGradeScale);
17013        }
17014    }
17015    ScoreUtil.numericGradeScaleToNumericGradeScale = numericGradeScaleToNumericGradeScale;
17016    /**
17017     * Just copies all values from fromScore to toScore.
17018     */
17019    function copyFullScore(fromScore, toScore) {
17020        toScore.actualScoreEntered = fromScore.actualScoreEntered;
17021        toScore.letterGrade = fromScore.letterGrade;
17022        toScore.numericGrade = fromScore.numericGrade;
17023        toScore.percent = fromScore.percent;
17024        toScore.points = fromScore.points;
17025    }
17026    ScoreUtil.copyFullScore = copyFullScore;
17027    function setGrade(gradeScaleScore, score, gradeScale) {
17028        if (score == null) {
17029            return {};
17030        }
17031        if (gradeScale == null) {
17032            return score;
17033        }
17034        if (gradeScaleScore == null) {
17035            delete score.numericGrade;
17036            delete score.letterGrade;
17037            return score;
17038        }
17039        if (gradeScale.gradeScaleType === 'ALPHA') {
17040            score.letterGrade = String(gradeScaleScore);
17041            delete score.numericGrade;
17042            return score;
17043        }
17044        if (gradeScale.gradeScaleType === 'NUMERIC') {
17045            var numericWithExtras = gradeScale.numericExtras != null && gradeScale.numericExtras !== 'NONE';
17046            if (numericWithExtras) {
17047                score.letterGrade = String(gradeScaleScore);
17048            }
17049            if (!isNaN(gradeScaleScore)) {
17050                score.numericGrade = Number(gradeScaleScore);
17051            }
17052            else {
17053                if (gradeScaleScore != null) {
17054                    gradeScaleScore = String(gradeScaleScore);
17055                }
17056                var gradeScaleItem = grade_scale_util_1.GradeScaleUtil.getNumericGradeScaleItem(gradeScaleScore, gradeScale);
17057                if (gradeScaleItem != null) {
17058                    score.numericGrade = gradeScaleItem.numericValue;
17059                }
17060                else {
17061                    delete score.numericGrade;
17062                }
17063            }
17064        }
17065        return score;
17066    }
17067    ScoreUtil.setGrade = setGrade;
17068    function getGrade(score, gradeScale) {
17069        if (gradeScale == null || score == null) {
17070            return;
17071        }
17072        if (gradeScale.gradeScaleType === 'ALPHA') {
17073            return score.letterGrade;
17074        }
17075        var numericWithExtras = gradeScale.numericExtras != null && gradeScale.numericExtras !== 'NONE';
17076        if (numericWithExtras) {
17077            return score.letterGrade;
17078        }
17079        if (score.numericGrade != null) {
17080            return String(score.numericGrade);
17081        }
17082    }
17083    ScoreUtil.getGrade = getGrade;
17084    function rollUpCalculation(fromScores, calcRelationship, toGradeScale, toScoreType, toMaxPoints, toScore) {
17085        if (toScore == null) {
17086            toScore = {};
17087        }
17088        //Figure out if all of the child grade scales are numeric AND have similar grade scales. (same max and min)
17089        var types = {};
17090        var numericSimilar;
17091        for (var _i = 0, fromScores_1 = fromScores; _i < fromScores_1.length; _i++) {
17092            var fromScoreInfo = fromScores_1[_i];
17093            types[fromScoreInfo.fromScoreType] = true;
17094            if (numericSimilar !== false) {
17095                if (fromScoreInfo.fromScoreType === 'GRADESCALE' && fromScoreInfo.fromGradeScale.gradeScaleType === 'NUMERIC') {
17096                    if (numericSimilar == null) {
17097                        if (fromScoreInfo.fromGradeScale.numericMax != null ||
17098                            fromScoreInfo.fromGradeScale.numericMin != null) {
17099                            numericSimilar = {
17100                                max: fromScoreInfo.fromGradeScale.numericMax,
17101                                min: fromScoreInfo.fromGradeScale.numericMin
17102                            };
17103                        }
17104                        else {
17105                            numericSimilar = false;
17106                        }
17107                    }
17108                    else {
17109                        if (fromScoreInfo.fromGradeScale.numericMax !== numericSimilar.max ||
17110                            fromScoreInfo.fromGradeScale.numericMin !== numericSimilar.min) {
17111                            numericSimilar = false;
17112                        }
17113                    }
17114                }
17115                else {
17116                    numericSimilar = false;
17117                }
17118            }
17119        }
17120        var fromScoreTypes = Object.keys(types);
17121        var fromScoreType;
17122        if (fromScoreTypes.length === 1) {
17123            switch (fromScoreTypes[0]) {
17124                case 'POINTS':
17125                    fromScoreType = 'POINTS';
17126                    break;
17127                case 'PERCENT':
17128                    fromScoreType = 'MIX';
17129                    break;
17130                case 'GRADESCALE':
17131                    fromScoreType = numericSimilar ? 'ALL_SIMILAR_NUMERIC' : 'MIX';
17132                    break;
17133                default: //shut up tslint
17134            }
17135        }
17136        else {
17137            fromScoreType = 'MIX';
17138        }
17139        switch (fromScoreType) {
17140            case 'POINTS':
17141                rollUpPoints(fromScores, calcRelationship, toGradeScale, toScoreType, toScore, toMaxPoints);
17142                break;
17143            case 'MIX':
17144                rollUpMix(fromScores, calcRelationship, toGradeScale, toScoreType, toScore, toMaxPoints);
17145                break;
17146            case 'ALL_SIMILAR_NUMERIC':
17147                rollUpAllNumeric(fromScores, calcRelationship, toGradeScale, toScoreType, toScore, toMaxPoints);
17148                break;
17149            default: //shut up tslint
17150        }
17151        return toScore;
17152    }
17153    ScoreUtil.rollUpCalculation = rollUpCalculation;
17154    function rollUpMix(fromScores, calcRelationship, toGradeScale, toScoreType, toScore, toMaxPoints) {
17155        var numerator = 0;
17156        var denominator = 0;
17157        for (var _i = 0, fromScores_2 = fromScores; _i < fromScores_2.length; _i++) {
17158            var fromScoreInfo = fromScores_2[_i];
17159            switch (fromScoreInfo.fromScoreType) {
17160                case 'POINTS':
17161                    numerator += fromScoreInfo.fromScore.points / fromScoreInfo.fromMaxPoints;
17162                    denominator += 1;
17163                    break;
17164                case 'PERCENT':
17165                    numerator += fromScoreInfo.fromScore.percent / 100;
17166                    denominator += 1;
17167                    break;
17168                case 'GRADESCALE':
17169                    var percentString = grade_scale_util_1.GradeScaleUtil.convertGradeScaleItemToScoreOfType(getGrade(fromScoreInfo.fromScore, fromScoreInfo.fromGradeScale), fromScoreInfo.fromGradeScale, 'PERCENT', false, calcRelationship);
17170                    if (percentString != null) {
17171                        var weight = fromScoreInfo.fromWeight;
17172                        if (weight == null) {
17173                            weight = 1;
17174                        }
17175                        numerator += Number(percentString) / 100 * weight;
17176                        denominator += weight;
17177                    }
17178                    break;
17179                default: //shut up tslint
17180            }
17181        }
17182        var percent = numerator / denominator;
17183        switch (toScoreType) {
17184            case 'POINTS':
17185                toScore.points = number_util_1.NumberUtil.round(percent * toMaxPoints, 2);
17186                setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(toScore.points), toGradeScale, 'POINTS', true, calcRelationship, toMaxPoints), toScore, toGradeScale);
17187                break;
17188            case 'PERCENT':
17189                toScore.percent = number_util_1.NumberUtil.round(percent * 100, 2);
17190            //Fall through and set the gradeScale
17191            case 'GRADESCALE':
17192                setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(percent * 100), toGradeScale, 'PERCENT', true, calcRelationship, toMaxPoints), toScore, toGradeScale);
17193                break;
17194            default: //shut up tslint
17195        }
17196        if (toScoreType !== 'PERCENT') {
17197            toScore.percent = number_util_1.NumberUtil.round(percent * 100, PRECISION);
17198        }
17199    }
17200    ScoreUtil.rollUpMix = rollUpMix;
17201    function rollUpPoints(fromScores, calcRelationship, toGradeScale, toScoreType, toScore, toMaxPoints) {
17202        var totals = fromScores.reduce(function (total, fromScoreInfo) {
17203            return {
17204                numerator: fromScoreInfo.fromScore.points ? (fromScoreInfo.fromScore.points + total.numerator) : total.numerator,
17205                denominator: fromScoreInfo.fromMaxPoints + total.denominator
17206            };
17207        }, { numerator: 0, denominator: 0 });
17208        var totalsAsPercent = totals.numerator / totals.denominator;
17209        //In the case that the denominator has 0 points, set the total to 0.
17210        if (isNaN(totalsAsPercent)) {
17211            totalsAsPercent = 0;
17212        }
17213        switch (toScoreType) {
17214            case 'POINTS':
17215                if (totals.denominator === toMaxPoints) {
17216                    toScore.points = totals.numerator;
17217                }
17218                else {
17219                    toScore.points = number_util_1.NumberUtil.round(totalsAsPercent * toMaxPoints, 2);
17220                }
17221                setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(toScore.points), toGradeScale, 'POINTS', true, calcRelationship, toMaxPoints), toScore, toGradeScale);
17222                break;
17223            case 'PERCENT':
17224                toScore.percent = number_util_1.NumberUtil.round(totalsAsPercent * 100, 2);
17225            //Fall through and set the gradeScale
17226            case 'GRADESCALE':
17227                setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(totalsAsPercent * 100), toGradeScale, 'PERCENT', true, calcRelationship, 0), toScore, toGradeScale);
17228                break;
17229            default: //shut up tslint
17230        }
17231        if (toScoreType !== 'PERCENT') {
17232            toScore.percent = number_util_1.NumberUtil.round(totalsAsPercent * 100, PRECISION);
17233        }
17234    }
17235    ScoreUtil.rollUpPoints = rollUpPoints;
17236    function rollUpAllNumeric(fromScores, calcRelationship, toGradeScale, toScoreType, toScore, toMaxPoints) {
17237        var totals = fromScores.reduce(function (total, fromScoreInfo) {
17238            if (fromScoreInfo.fromScore.numericGrade) {
17239                var weight = fromScoreInfo.fromWeight != null ? fromScoreInfo.fromWeight : 1;
17240                return {
17241                    numerator: fromScoreInfo.fromScore.numericGrade * weight + total.numerator,
17242                    denominator: total.denominator + weight
17243                };
17244            }
17245            else {
17246                return {
17247                    numerator: total.numerator,
17248                    denominator: total.denominator
17249                };
17250            }
17251        }, { numerator: 0, denominator: 0 });
17252        var numericValue = totals.numerator / totals.denominator;
17253        if (toGradeScale.gradeScaleType === 'NUMERIC' &&
17254            toGradeScale.numericMin === fromScores[0].fromGradeScale.numericMin &&
17255            toGradeScale.numericMax === fromScores[0].fromGradeScale.numericMax) {
17256            switch (toScoreType) {
17257                case 'POINTS':
17258                    toScore.points = grade_scale_util_1.GradeScaleUtil.convertNumericValueTo('POINTS', numericValue, toGradeScale, calcRelationship, true, toMaxPoints);
17259                    break;
17260                case 'PERCENT':
17261                    toScore.percent = grade_scale_util_1.GradeScaleUtil.convertNumericValueTo('PERCENT', numericValue, toGradeScale, calcRelationship, true);
17262                    break;
17263                default: //shut up tslint
17264            }
17265            setGrade(grade_scale_util_1.GradeScaleUtil.convertNumericValueTo('GRADESCALE', numericValue, toGradeScale, calcRelationship, true), toScore, toGradeScale);
17266        }
17267        else {
17268            var highestWeightFromScoreInfo = void 0;
17269            for (var _i = 0, fromScores_3 = fromScores; _i < fromScores_3.length; _i++) {
17270                var fromScoreInfo = fromScores_3[_i];
17271                if (highestWeightFromScoreInfo == null || highestWeightFromScoreInfo.fromWeight < fromScoreInfo.fromWeight) {
17272                    highestWeightFromScoreInfo = fromScoreInfo;
17273                }
17274            }
17275            var percent = grade_scale_util_1.GradeScaleUtil.convertNumericValueTo('PERCENT', numericValue, highestWeightFromScoreInfo.fromGradeScale, calcRelationship, true, toMaxPoints);
17276            switch (toScoreType) {
17277                case 'POINTS':
17278                    toScore.points = Number(grade_scale_util_1.GradeScaleUtil.convertNumericValueTo('POINTS', numericValue, highestWeightFromScoreInfo.fromGradeScale, calcRelationship, true, toMaxPoints));
17279                    setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(toScore.points), toGradeScale, 'POINTS', true, calcRelationship, toMaxPoints), toScore, toGradeScale);
17280                    break;
17281                case 'PERCENT':
17282                    toScore.percent = number_util_1.NumberUtil.round(percent, 2);
17283                    setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(percent), toGradeScale, 'PERCENT', true), toScore, toGradeScale);
17284                    break;
17285                case 'GRADESCALE':
17286                    setGrade(grade_scale_util_1.GradeScaleUtil.convertScoreOfTypeToGradeScaleItem(String(percent), toGradeScale, 'PE
17286RCENT', true), toScore, toGradeScale);
17287                    break;
17288                default: //shut up tslint
17289            }
17290            if (toScoreType !== 'PERCENT') {
17291                toScore.percent = number_util_1.NumberUtil.round(percent, PRECISION);
17292            }
17293        }
17294    }
17295    ScoreUtil.rollUpAllNumeric = rollUpAllNumeric;
17296    function generateScoreRi(typedScore, gradeScaleScore, scoreType, gradeScale, calcRelationship, percent, pointsPossible) {
17297        var hasTypedScore = typedScore != null && typedScore.trim().length > 0;
17298        var hasGradeScaleScore = gradeScaleScore != null && gradeScaleScore.trim().length > 0;
17299        var score = {
17300            actualScoreEntered: hasTypedScore ? typedScore : ''
17301        };
17302        if (hasTypedScore || hasGradeScaleScore) {
17303            setGrade(hasGradeScaleScore ? gradeScaleScore.trim() : undefined, score, gradeScale);
17304            var specialGradeScaleItem = grade_scale_util_1.GradeScaleUtil.getSpecialGradeScaleItem(typedScore, gradeScale, scoreType);
17305            score.actualScoreKind = specialGradeScaleItem != null ? 'SCORE_CODE' : 'REAL_SCORE';
17306            switch (scoreType) {
17307                case 'POINTS':
17308                    if (specialGradeScaleItem != null) {
17309                        var scoreAsString = grade_scale_util_1.GradeScaleUtil.convertSpecialGradeScaleItemTo(specialGradeScaleItem, gradeScale, scoreType, false, calcRelationship, pointsPossible);
17310                        if (scoreAsString != null) {
17311                            score.points = Number(scoreAsString);
17312                        }
17313                    }
17314                    else {
17315                        score.points = Number(typedScore);
17316                    }
17317                    score.percent = percent;
17318                    break;
17319                case 'PERCENT':
17320                case 'GRADESCALE':
17321                    score.percent = percent;
17322                    if (percent != null && pointsPossible != null) {
17323                        score.points = roundToPrecision(percent / 100 * pointsPossible, 2, PRECISION, true);
17324                    }
17325                    break;
17326                default: //shut up tslint
17327            }
17328        }
17329        return score;
17330    }
17331    ScoreUtil.generateScoreRi = generateScoreRi;
17332    function hasNumericDecimals(gradeScale) {
17333        if (gradeScale != null && gradeScale.numericDecimals == null) {
17334            return false;
17335        }
17336        return gradeScale.numericDecimals > 0;
17337    }
17338    ScoreUtil.hasNumericDecimals = hasNumericDecimals;
17339    function isBlank(score) {
17340        return score.points == null && score.percent == null && (score.letterGrade == null || score.letterGrade === '') && score.numericGrade == null;
17341    }
17342    ScoreUtil.isBlank = isBlank;
17343})(ScoreUtil = exports.ScoreUtil || (exports.ScoreUtil = {}));
17344
17345
17346
17347/***/ }),
17348/* 127 */
17349/***/ (function(module, exports, __webpack_require__) {
17350
17351"use strict";
17352
17353var i18n_util_1 = __webpack_require__(30);
17354var SmartTextUtil;
17355(function (SmartTextUtil) {
17356    // -------------------------------- Helper Functions (Start) ----------------------------------------
17357    function getLastNameFirstName(data, util) {
17358        if (data.firstName) {
17359            return data.lastName + ', ' + data.firstName;
17360        }
17361        return data.lastName;
17362    }
17363    function getFirstNameLastName(data, util) {
17364        if (data.firstName) {
17365            return data.firstName + ' ' + data.lastName;
17366        }
17367        return data.lastName;
17368    }
17369    function getFirstName(data, util) {
17370        if (data.firstName) {
17371            return data.firstName;
17372        }
17373        return util.getText(this.fallbackMessageKey);
17374    }
17375    function getLastName(data, util) {
17376        return data.lastName;
17377    }
17378    function getGenderString(data, util) {
17379        var messageKey;
17380        if (data.gender === 'M') {
17381            messageKey = this.maleMessageKey;
17382        }
17383        else if (data.gender === 'F') {
17384            messageKey = this.femaleMessageKey;
17385        }
17386        else {
17387            // We do not have alternate pronouns yet.  For now, return the fallback string (i.e., he/she, etc.)
17388            messageKey = this.fallbackMessageKey;
17389            if (data.alternatePronouns != null) {
17390                var alternatePronoun = data.alternatePronouns[messageKey];
17391                if (alternatePronoun != null) {
17392                    return alternatePronoun;
17393                }
17394            }
17395        }
17396        return util.getText(messageKey);
17397    }
17398    // --------------------------------- Helper Functions (End) -----------------------------------------
17399    var smartTextDefinitions = [{
17400            key: '<last name, first name>',
17401            regEx: /<last name, first name>/g,
17402            getString: getLastNameFirstName
17403        }, {
17404            key: '<first name last name>',
17405            regEx: /<first name last name>/g,
17406            getString: getFirstNameLastName
17407        }, {
17408            key: '<preferred name>',
17409            regEx: /<preferred name>/g,
17410            fallbackMessageKey: 'student',
17411            getString: getFirstName
17412        }, {
17413            key: '<first name>',
17414            regEx: /<first name>/g,
17415            fallbackMessageKey: 'student',
17416            getString: getFirstName
17417        }, {
17418            key: '<last name>',
17419            regEx: /<last name>/g,
17420            getString: getLastName
17421        }, {
17422            key: '<he/she>',
17423            regEx: /<he\/she>/g,
17424            maleMessageKey: 'he',
17425            femaleMessageKey: 'she',
17426            fallbackMessageKey: 'he/she',
17427            getString: getGenderString
17428        }, {
17429            key: '<He/She>',
17430            regEx: /<He\/She>/g,
17431            maleMessageKey: 'He',
17432            femaleMessageKey: 'She',
17433            fallbackMessageKey: 'He/She',
17434            getString: getGenderString
17435        }, {
17436            key: '<his/her>',
17437            regEx: /<his\/her>/g,
17438            maleMessageKey: 'his',
17439            femaleMessageKey: 'her',
17440            fallbackMessageKey: 'his/her',
17441            getString: getGenderString
17442        }, {
17443            key: '<His/Her>',
17444            regEx: /<His\/Her>/g,
17445            maleMessageKey: 'His',
17446            femaleMessageKey: 'Her',
17447            fallbackMessageKey: 'His/Her',
17448            getString: getGenderString
17449        }, {
17450            key: '<him/her>',
17451            regEx: /<him\/her>/g,
17452            maleMessageKey: 'him',
17453            femaleMessageKey: 'her',
17454            fallbackMessageKey: 'him/her',
17455            getString: getGenderString
17456        }, {
17457            key: '<son/daughter>',
17458            regEx: /<son\/daughter>/g,
17459            maleMessageKey: 'son',
17460            femaleMessageKey: 'daughter',
17461            fallbackMessageKey: 'son/daughter',
17462            getString: getGenderString
17463        }];
17464    /**
17465     * Generates word search regex
17466     * @param str - the word to transform into a regular expression word search.
17467     * @returns word search regex
17468     */
17469    function generateWordSearchRegex(str) {
17470        if (str) {
17471            // Since we are building a regular expression out of the string, we need to escape the characters match the
17472            // regular expression metacharacters so they do not affect the word search.
17473            // https://stackoverflow.com/questions/3115150/how-to-escape-regular-expression-special-characters-using-javascript
17474            // https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
17475            var escapedString = str.replace(/[\-\[\]\/{}()*+?.\\^$|]/g, '\\$&');
17476            // Lookahead does not work on Safari browsers.  This regex has a better chance of matching the desired string
17477            // instead of the word boundary used by PowerTeacher Pro (i.e.: `\\b${escapedString}\\b`).
17478            return RegExp("(?!\\B)" + escapedString + "(?=$|\\.|,|!|\\?|;|:|\\s)", 'g');
17479        }
17480        return undefined;
17481    }
17482    /**
17483     * Generates smart text from simple string
17484     * @param str - the string to start from and replace known words with smart tags.
17485     * @param relatedCommentData - the data to associate with smart tags
17486     * @param [util] - the i18n utility
17487     * @returns smart text from simple string
17488     */
17489    function generateSmartTextFromSimpleString(str, relatedCommentData, util) {
17490        if (util === void 0) { util = i18n_util_1.i18n; }
17491        if (str != null && relatedCommentData != null) {
17492            for (var _i = 0, smartTextDefinitions_1 = smartTextDefinitions; _i < smartTextDefinitions_1.length; _i++) {
17493                var smartTextDefinition = smartTextDefinitions_1[_i];
17494                // Currently, the preferred name pulls in data out of the first name.  We do not have the preferred name data available yet.
17495                // To build the smart text template, we do not want to use the preferred name as this will conflict with the <first name> key.
17496                if (smartTextDefinition.key === '<preferred name>') {
17497                    continue;
17498                }
17499                // For female gender, we will end up with two possibilities of what smart key to use: <his/her> and <him/her>.
17500                // We cannot simply choose one or the other without knowing the context on how the "her" is used in the input comment.
17501                // This will require an enhancement where we can prompt the user to pick which one but we will need to show the user
17502                // the context of where her is used.  For now, we are going to simply match exactly what PTP does when generating the
17503                // comment template.
17504                if (relatedCommentData.gender === 'F' && smartTextDefinition.key === '<him/her>') {
17505                    continue;
17506                }
17507                var wordRegex = generateWordSearchRegex(smartTextDefinition.getString(relatedCommentData, util));
17508                if (wordRegex != null) {
17509                    str = str.replace(wordRegex, smartTextDefinition.key);
17510                }
17511            }
17512        }
17513        return str;
17514    }
17515    /**
17516     * Defaults string smart text replacer.
17517     * @param str - string to transform into another string with smart tags.  This string should NOT contain
17518     *              html code as this function may replace words with smart tags within each html tags. If
17519     *              you need a specialized replacer, create a custom one and pass it to the generateSmartText
17520     *              function.
17521     * @param replaceWithSmartTextFunction
17522     * @returns string smart text replacer
17523     */
17524    function defaultStringSmartTextReplacer(str, replaceWithSmartTextFunction) {
17525        if (str) {
17526            str = replaceWithSmartTextFunction(str);
17527        }
17528        return str;
17529    }
17530    function getSmartTextList() {
17531        // Currently, preferred name is not supported so lets filter it out.
17532        return smartTextDefinitions.filter(function (item) { return item.key !== '<preferred name>'; }).map(function (item) { return item.key; });
17533    }
17534    SmartTextUtil.getSmartTextList = getSmartTextList;
17535    /**
17536     * Resolves text
17537     * @param data - the information to use in placeholders represented by smart tags.
17538     * @param text - string that contains smart tags to be replaced with actual information
17539     * @param [util] - the i18n utility
17540     * @returns the text with the smart tags replaced with actual information.
17541     */
17542    function resolveText(data, text, util) {
17543        if (util === void 0) { util = i18n_util_1.i18n; }
17544        if (text) {
17545            for (var _i = 0, smartTextDefinitions_2 = smartTextDefinitions; _i < smartTextDefinitions_2.length; _i++) {
17546                var smartTextDefinition = smartTextDefinitions_2[_i];
17547                var replacementValue = smartTextDefinition.getString(data, util);
17548                text = text.replace(smartTextDefinition.regEx, replacementValue);
17549            }
17550        }
17551        return text;
17552    }
17553    SmartTextUtil.resolveText = resolveText;
17554    /**
17555     * Generates smart text
17556     * @param comment - the string to replace words that matches the information from relatedCommentData.
17557     * @param relatedCommentData - the information to use for searching the comment with and replace with the associated smart tags.
17558     * @param [util] - the i18n utility
17559     * @param [stringSmartTextReplacer] - function to replace words that matches the information from relatedCommentData returning the resulting string with smart tags.
17560     * @returns comment with smart tags
17561     */
17562    function generateSmartText(comment, relatedCommentData, util, stringSmartTextReplacer) {
17563        if (util === void 0) { util = i18n_util_1.i18n; }
17564        if (stringSmartTextReplacer === void 0) { stringSmartTextReplacer = defaultStringSmartTextReplacer; }
17565        if (comment) {
17566            // Set up the replace function to use by the StringSmartTextReplacer function.
17567            var replaceWithSmartTextFunction = function (str) {
17568                if (str) {
17569                    str = generateSmartTextFromSimpleString(str, relatedCommentData, util);
17570                }
17571                return str;
17572            };
17573            // generate the comment with smart tags
17574            comment = stringSmartTextReplacer(comment, replaceWithSmartTextFunction);
17575        }
17576        return comment;
17577    }
17578    SmartTextUtil.generateSmartText = generateSmartText;
17579})(SmartTextUtil = exports.SmartTextUtil || (exports.SmartTextUtil = {}));
17580
17581
17582
17583/***/ }),
17584/* 128 */
17585/***/ (function(module, exports, __webpack_require__) {
17586
17587"use strict";
17588
17589//Http Headers
17590exports.HTTP_HEADER_ACCEPT_LANGUAGE = 'accept-language';
17591exports.HTTP_HEADER_SELECTED_LANGUAGE = 'ps-language';
17592
17593
17594
17595/***/ }),
17596/* 129 */
17597/***/ (function(module, exports, __webpack_require__) {
17598
17599"use strict";
17600
17601var simple_time_1 = __webpack_require__(95);
17602exports.SimpleTime = simple_time_1.SimpleTime;
17603var reporting_term_1 = __webpack_require__(100);
17604exports.ReportingTerm = reporting_term_1.ReportingTerm;
17605var reporting_term_wrapper_1 = __webpack_require__(101);
17606exports.ReportingTermWrapper = reporting_term_wrapper_1.ReportingTermWrapper;
17607var chat_thread_type_enum_1 = __webpack_require__(130);
17608exports.ChatThreadTypeEnum = chat_thread_type_enum_1.ChatThreadTypeEnum;
17609
17610
17611
17612/***/ }),
17613/* 130 */
17614/***/ (function(module, exports, __webpack_require__) {
17615
17616"use strict";
17617
17618(function (ChatThreadTypeEnum) {
17619    ChatThreadTypeEnum[ChatThreadTypeEnum["DEFAULT"] = 1] = "DEFAULT";
17620    ChatThreadTypeEnum[ChatThreadTypeEnum["STUDENT_TEACHER"] = 2] = "STUDENT_TEACHER";
17621    ChatThreadTypeEnum[ChatThreadTypeEnum["STUDENT_PARENT_TEACHER"] = 3] = "STUDENT_PARENT_TEACHER";
17622    ChatThreadTypeEnum[ChatThreadTypeEnum["TEACHER_PARENT"] = 4] = "TEACHER_PARENT";
17623})(exports.ChatThreadTypeEnum || (exports.ChatThreadTypeEnum = {}));
17624var ChatThreadTypeEnum = exports.ChatThreadTypeEnum;
17625
17626
17627
17628/***/ }),
17629/* 131 */
17630/***/ (function(module, exports, __webpack_require__) {
17631
17632"use strict";
17633
17634var validation_engine_1 = __webpack_require__(98);
17635exports.ValidationRulesEngine = validation_engine_1.ValidationRulesEngine;
17636
17637
17638
17639/***/ }),
17640/* 132 */
17641/***/ (function(module, exports, __webpack_require__) {
17642
17643"use strict";
17644
17645Object.defineProperty(exports, "__esModule", { value: true });
17646var notification_item_group_1 = __webpack_require__(65);
17647var rxjs_1 = __webpack_require__(19);
17648var rxjs_2 = __webpack_require__(19);
17649var activity_feed_notification_item_1 = __webpack_require__(67);
17650var pds_utils_1 = __webpack_require__(18);
17651var communication_notification_item_group_1 = __webpack_require__(133);
17652var assignment_notification_item_group_1 = __webpack_require__(102);
17653var NotificationIndicatorController = (function () {
17654    function NotificationIndicatorController(notificationService, notificationsGroupsToDisplay) {
17655        if (notificationsGroupsToDisplay === void 0) { notificationsGroupsToDisplay = 100; }
17656        var _this = this;
17657        this.notificationsGroupsToDisplay = notificationsGroupsToDisplay;
17658        this.notificationItemGroupStream = new rxjs_2.BehaviorSubject({
17659            notificationGroups: [],
17660            totalUnreadNotificationCount: 0,
17661            currentTabUnreadCount: 0,
17662            notificationTypeUnreadCountMap: {}
17663        });
17664        this.notificationGroupMap = {};
17665        this.lookUpKeyToNotificationGroupMap = {};
17666        this.notificationService = notificationService;
17667        this.currentNotificationType = activity_feed_notification_item_1.ActivityFeedNotificationItem.NOTIFICATION_TYPE;
17668        this.notificationService.getExistingNotifications().subscribe(function (notifications) {
17669            _this.notificationItemGroups = [];
17670            for (var _i = 0, notifications_1 = notifications; _i < notifications_1.length; _i++) {
17671                var notification = notifications_1[_i];
17672                _this.addNotification(notification, true);
17673            }
17674            _this.fireNotificationStream();
17675            _this.setupNotificationListener();
17676        });
17677    }
17678    NotificationIndicatorController.prototype.setCurrentNotificationType = function (notificationType) {
17679        this.currentNotificationType = notificationType;
17680        this.fireNotificationStream(false);
17681    };
17682    NotificationIndicatorController.prototype.setupNotificationListener = function () {
17683        var _this = this;
17684        this.notificationService.initializeNotificationStream().subscribe(function () {
17685            _this.notificationService.notificationStream.subscribe(function (notification) {
17686                _this.addNotification(notification);
17687            });
17688        });
17689    };
17690    NotificationIndicatorController.prototype.addNotification = function (notification, suppressUpdates) {
17691        if (suppressUpdates === void 0) { suppressUpdates = false; }
17692        var selectedNotificationItemGroup;
17693        selectedNotificationItemGroup = this.notificationItemGroups.find(function (notificationItemGroup) {
17694            return notificationItemGroup.aggregationKey === notification.getAggregationKey();
17695        });
17696        if (selectedNotificationItemGroup != null) {
17697            selectedNotificationItemGroup.addNotification(notification);
17698        }
17699        else {
17700            switch (notification.type) {
17701                case 'COMMUNICATION_NOTIFICATION':
17702                    selectedNotificationItemGroup = new communication_notification_item_group_1.CommunicationNotificationItemGroup(notification.type, notification.getAggregationKey(), notification.getUserType(), notification.currentUserUid);
17703                    break;
17704                case 'ASSIGNMENT_NOTIFICATION':
17705                    selectedNotificationItemGroup = new assignment_notification_item_group_1.AssignmentNotificationItemGroup(notification.type, notification.getAggregationKey(), notification.isMarkedReadOnClick, notification.subtype);
17706                    break;
17707                default:
17708                    selectedNotificationItemGroup = new notification_item_group_1.NotificationItemGroup(notification.type, notification.getAggregationKey(), notification.isMarkedReadOnClick);
17709                    break;
17710            }
17711            selectedNotificationItemGroup.addNotification(notification);
17712            this.notificationGroupMap[selectedNotificationItemGroup.id] = selectedNotificationItemGroup;
17713            this.lookUpKeyToNotificationGroupMap[selectedNotificationItemGroup.lookUpKey] = selectedNotificationItemGroup;
17714            this.notificationItemGroups.unshift(selectedNotificationItemGroup);
17715        }
17716        if (!suppressUpdates) {
17717            this.fireNotificationStream();
17718        }
17719    };
17720    NotificationIndicatorController.prototype.fireNotificationStream = function (updateCurrentNotificationType) {
17721        var _this = this;
17722        if (updateCurrentNotificationType === void 0) { updateCurrentNotificationType = true; }
17723        var unreadCounts = this.getNotificationTypeUnreadCountMap();
17724        var totalUnread = this.notificationItemGroups.reduce(function (prev, next) {
17725            return prev + next.unreadNotificationCount;
17726        }, 0);
17727        if (updateCurrentNotificationType && (unreadCounts[this.currentNotificationType] == null || unreadCounts[this.currentNotificationType] === 0)) {
17728            var firstServiceWithNotifications = this.notificationService.notificationServices.find(function (service) {
17729                return unreadCounts[service.type] > 0;
17730            });
17731            this.currentNotificationType = firstServiceWithNotifications != null ? firstServiceWithNotifications.type : this.currentNotificationType;
17732        }
17733        var filteredGroups = this.notificationItemGroups.filter(function (group) {
17734            return group.type === _this.currentNotificationType;
17735        });
17736        this.notificationItemGroupStream.next({
17737            notificationGroups: filteredGroups.slice(0, this.notificationsGroupsToDisplay),
17738            totalUnreadNotificationCount: totalUnread,
17739            currentTabUnreadCount: unreadCounts[this.currentNotificationType] || 0,
17740            notificationTypeUnreadCountMap: this.getNotificationTypeUnreadCountMap()
17741        });
17742    };
17743    NotificationIndicatorController.prototype.markGroupAsRead = function (group) {
17744        var _this = this;
17745        var controllerGroup = this.notificationGroupMap[group.id];
17746        if (controllerGroup == null) {
17747            throw 'bad notification mapping (read)';
17748        }
17749        this.notificationService.markAsRead(controllerGroup.getUnreadNotifications()).subscribe(function () {
17750            controllerGroup.markAsRead();
17751            _this.fireNotificationStream();
17752        });
17753    };
17754    NotificationIndicatorController.prototype.markAllAsSeen = function () {
17755        var _this = this;
17756        var items = [];
17757        for (var _i = 0, _a = this.notificationItemGroups || []; _i < _a.length; _i++) {
17758            var notificationGroup = _a[_i];
17759            if (!notificationGroup.isSeen && notificationGroup.type === this.currentNotificationType) {
17760                notificationGroup.markAsSeen();
17761                items.push.apply(items, notificationGroup.notifications);
17762            }
17763        }
17764        this.notificationService.markAsSeen(items).subscribe(function () {
17765            _this.fireNotificationStream();
17766        });
17767    };
17768    NotificationIndicatorController.prototype.markAllAsRead = function () {
17769        var _this = this;
17770        var items = [];
17771        for (var _i = 0, _a = this.notificationItemGroups || []; _i < _a.length; _i++) {
17772            var notificationGroup = _a[_i];
17773            if (!notificationGroup.isRead && notificationGroup.type === this.currentNotificationType) {
17774                items.push.apply(items, notificationGroup.getUnreadNotifications());
17775                notificationGroup.markAsRead();
17776            }
17777        }
17778        this.notificationService.markAsRead(items).subscribe(function () {
17779            _this.fireNotificationStream();
17780        });
17781    };
17782    NotificationIndicatorController.prototype.getNotificationTypeUnreadCountMap = function () {
17783        var notificationCountTypeMap = {};
17784        if (this.notificationItemGroups != null) {
17785            var groups = pds_utils_1.pdsUtils.groupBy(this.notificationItemGroups, function (group) { return group.type; });
17786            for (var _i = 0, _a = Object.keys(groups); _i < _a.length; _i++) {
17787                var notificationType = _a[_i];
17788                notificationCountTypeMap[notificationType] = groups[notificationType]
17789                    .reduce(function (prev, itemGroup) {
17790                    return prev + itemGroup.unreadNotificationCount;
17791                }, 0);
17792            }
17793        }
17794        return notificationCountTypeMap;
17795    };
17796    NotificationIndicatorController.prototype.markGroupReadByLookUpKey = function (lookUpKey, persistUpdate) {
17797        if (persistUpdate === void 0) { persistUpdate = false; }
17798        var group = this.lookUpKeyToNotificationGroupMap[lookUpKey];
17799        if (group != null && persistUpdate) {
17800            this.markGroupAsRead(group);
17801        }
17802        else if (group != null) {
17803            group.markAsRead();
17804            this.fireNotificationStream();
17805        }
17806    };
17807    NotificationIndicatorController.prototype.markReadByLookUpKeyAndFunction = function (lookUpKey, lookUpFunction, persistUpdate) {
17808        var _this = this;
17809        if (persistUpdate === void 0) { persistUpdate = false; }
17810        var group = this.lookUpKeyToNotificationGroupMap[lookUpKey];
17811        if (group == null) {
17812            return;
17813        }
17814        var itemsToMark = group.markReadWhere(lookUpFunction);
17815        var persistObs = rxjs_1.of(true);
17816        if (persistUpdate) {
17817            persistObs = this.notificationService.markAsRead(itemsToMark);
17818        }
17819        persistObs.subscribe(function () { return _this.fireNotificationStream(); });
17820    };
17821    return NotificationIndicatorController;
17822}());
17823exports.NotificationIndicatorController = NotificationIndicatorController;
17824
17825
17826
17827/***/ }),
17828/* 133 */
17829/***/ (function(module, exports, __webpack_require__) {
17830
17831"use strict";
17832
17833var __extends = (this && this.__extends) || (function () {
17834    var extendStatics = function (d, b) {
17835        extendStatics = Object.setPrototypeOf ||
17836            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17837            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17838        return extendStatics(d, b);
17839    }
17840    return function (d, b) {
17841        extendStatics(d, b);
17842        function __() { this.constructor = d; }
17843        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17844    };
17845})();
17846Object.defineProperty(exports, "__esModule", { value: true });
17847var common_utils_1 = __webpack_require__(40);
17848var multi_count_notification_item_group_1 = __webpack_require__(134);
17849var pds_i18n_1 = __webpack_require__(15);
17850var CommunicationNotificationItemGroup = (function (_super) {
17851    __extends(CommunicationNotificationItemGroup, _super);
17852    function CommunicationNotificationItemGroup(type, aggregationKey, userType, currentUserUid, isRead, isSeen) {
17853        if (isRead === void 0) { isRead = true; }
17854        if (isSeen === void 0) { isSeen = true; }
17855        var _this = _super.call(this, type, aggregationKey, false, isRead, isSeen) || this;
17856        _this.userType = userType;
17857        _this.currentUserUid = currentUserUid;
17858        _this.notifications = [];
17859        _this.sectionNames = [];
17860        _this.sectionMap = new Map();
17861        return _this;
17862    }
17863    Object.defineProperty(CommunicationNotificationItemGroup.prototype, "imageURL", {
17864        get: function () {
17865            if (!Array.isArray(this.notifications) || this.notifications.length === 0) {
17866                throw 'tried to get imageURL for group with no notifications';
17867            }
17868            var uid = this.notifications[0].getTopicOrOwnerUid();
17869            if (this.userType === 'TEACHER') {
17870                return "/images/student-" + uid;
17871            }
17872            else {
17873                return "/images/teacher-" + uid;
17874            }
17875        },
17876        enumerable: true,
17877        configurable: true
17878    });
17879    Object.defineProperty(CommunicationNotificationItemGroup.prototype, "countItems", {
17880        get: function () {
17881            var unread = this.getUnreadNotifications();
17882            if (this.userType === 'TEACHER') {
17883                var studentCount = unread.filter(function (notification) {
17884                    return notification.getThreadType() === common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER;
17885                }).length;
17886                var parentCount = unread.filter(function (notification) {
17887                    return notification.getThreadType() === common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT;
17888                }).length;
17889                return [
17890                    { iconName: 'notifications-student', count: studentCount, labelText: pds_i18n_1.pdsI18n.getText('pds|chat notifications|xx Unread Notifications From Student', { count: studentCount }) },
17891                    { iconName: 'notifications-parent', count: parentCount, labelText: pds_i18n_1.pdsI18n.getText('pds|chat notifications|xx Unread Notifications From Parent', { c
17891ount: parentCount }) }
17892                ];
17893            }
17894            else {
17895                return [
17896                    { iconName: null, count: unread.length, labelText: pds_i18n_1.pdsI18n.getText('pds|chat notifications|xx Unread Notifications From Teacher', { count: unread.length }) }
17897                ];
17898            }
17899        },
17900        enumerable: true,
17901        configurable: true
17902    });
17903    CommunicationNotificationItemGroup.prototype.addNotification = function (notification) {
17904        _super.prototype.addNotification.call(this, notification);
17905        console.log('--> debug | add communication notification');
17906        console.log(notification);
17907        var sections = notification.getSections();
17908        for (var _i = 0, sections_1 = sections; _i < sections_1.length; _i++) {
17909            var section = sections_1[_i];
17910            this.sectionMap.set(section.uid, section);
17911        }
17912        this.sectionNames = Array.from(this.sectionMap.values()).map(function (section) { return section.courseName; });
17913    };
17914    Object.defineProperty(CommunicationNotificationItemGroup.prototype, "messages", {
17915        get: function () {
17916            return this.getUnreadNotifications().map(function (notification) {
17917                return notification.message;
17918            });
17919        },
17920        enumerable: true,
17921        configurable: true
17922    });
17923    Object.defineProperty(CommunicationNotificationItemGroup.prototype, "sectionUids", {
17924        get: function () {
17925            return Array.from(this.sectionMap.keys());
17926        },
17927        enumerable: true,
17928        configurable: true
17929    });
17930    CommunicationNotificationItemGroup.prototype.getThreadContext = function () {
17931        var unreadNotifications = this.getUnreadNotifications();
17932        var hasStudentNotifications = unreadNotifications.some(function (notification) {
17933            return notification.getThreadType() === common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER;
17934        });
17935        var threadType = hasStudentNotifications ? common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER : common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT;
17936        var notification = unreadNotifications.find(function (notification) {
17937            return notification.getThreadType() === threadType;
17938        });
17939        if (notification === null) {
17940            throw 'thread type not available when it should be';
17941        }
17942        return { threadUid: notification.threadUid, threadType: threadType, topicUid: notification.getTopicUid() };
17943    };
17944    Object.defineProperty(CommunicationNotificationItemGroup.prototype, "lookUpKey", {
17945        get: function () {
17946            if (this.notifications.length === 0) {
17947                throw 'can not get look up key of empty group this should not have happened.';
17948            }
17949            return this.notifications[0].lookUpKey;
17950        },
17951        enumerable: true,
17952        configurable: true
17953    });
17954    return CommunicationNotificationItemGroup;
17955}(multi_count_notification_item_group_1.MultiCountNotificationItemGroup));
17956exports.CommunicationNotificationItemGroup = CommunicationNotificationItemGroup;
17957
17958
17959
17960/***/ }),
17961/* 134 */
17962/***/ (function(module, exports, __webpack_require__) {
17963
17964"use strict";
17965
17966var __extends = (this && this.__extends) || (function () {
17967    var extendStatics = function (d, b) {
17968        extendStatics = Object.setPrototypeOf ||
17969            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17970            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17971        return extendStatics(d, b);
17972    }
17973    return function (d, b) {
17974        extendStatics(d, b);
17975        function __() { this.constructor = d; }
17976        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17977    };
17978})();
17979Object.defineProperty(exports, "__esModule", { value: true });
17980var notification_item_group_1 = __webpack_require__(65);
17981var MultiCountNotificationItemGroup = (function (_super) {
17982    __extends(MultiCountNotificationItemGroup, _super);
17983    function MultiCountNotificationItemGroup() {
17984        return _super !== null && _super.apply(this, arguments) || this;
17985    }
17986    return MultiCountNotificationItemGroup;
17987}(notification_item_group_1.NotificationItemGroup));
17988exports.MultiCountNotificationItemGroup = MultiCountNotificationItemGroup;
17989
17990
17991
17992/***/ }),
17993/* 135 */
17994/***/ (function(module, exports, __webpack_require__) {
17995
17996"use strict";
17997
17998Object.defineProperty(exports, "__esModule", { value: true });
17999var pds_xss_1 = __webpack_require__(88);
18000var registeredComponents = new Map();
18001exports.pdsAccessibility = {
18002    announceViaScreenReader: function (text, id) {
18003        if (id === void 0) { id = 'default'; }
18004        if (!(text.trim() === '' || text == null)) {
18005            var sanitizedText = pds_xss_1.sanitizeHtmlString(text);
18006            var myElement = registeredComponents.get(id);
18007            if (myElement != null) {
18008                myElement.announceText(sanitizedText);
18009            }
18010        }
18011    },
18012    registerAnnounceTextComponent: function (component, id) {
18013        if (id) {
18014            registeredComponents.set(id, component);
18015        }
18016        else {
18017            registeredComponents.set('default', component);
18018        }
18019    },
18020    unregisterAnnounceTextComponent: function (id) {
18021        if (id === void 0) { id = 'default'; }
18022        if (registeredComponents.get(id) != null) {
18023            registeredComponents.delete(id);
18024        }
18025    },
18026    removeAnnounceTextComponentFromDefault: function () {
18027        if (registeredComponents.get('default') != null) {
18028            registeredComponents.delete('default');
18029        }
18030    },
18031    getListOfRegisteredComponent: function () {
18032        return registeredComponents;
18033    }
18034};
18035
18036
18037
18038/***/ }),
18039/* 136 */
18040/***/ (function(module, exports, __webpack_require__) {
18041
18042"use strict";
18043
18044Object.defineProperty(exports, "__esModule", { value: true });
18045var simple_parse_resolver_1 = __webpack_require__(104);
18046var hasValue = function (value) {
18047    if (value == null) {
18048        return false;
18049    }
18050    if (typeof value === 'number') {
18051        if (isNaN(value)) {
18052            return false;
18053        }
18054        return true;
18055    }
18056    if (typeof value === 'string') {
18057        return value.trim().length > 0;
18058    }
18059    if (value === true || value === false) {
18060        return true;
18061    }
18062    if (typeof value === 'function') {
18063        return true;
18064    }
18065    if (typeof value === 'object') {
18066        if ('length' in value) {
18067            return value.length > 0;
18068        }
18069        if (value instanceof HTMLElement) {
18070            return hasValue(value.value);
18071        }
18072        return true;
18073    }
18074    return false;
18075};
18076var naturalCompare = function (a, b) {
18077    if (this.key != null) {
18078        a = a[this.key];
18079        b = b[this.key];
18080    }
18081    var alphabet = this.alphabet;
18082    var ignoreCase = this.isIgnoreCase;
18083    var isAscending = this.isAscending;
18084    var result;
18085    var i;
18086    var codeA;
18087    var codeB = 1;
18088    var posA = 0;
18089    var posB = 0;
18090    var getCode = function (str, pos, code) {
18091        if (code) {
18092            for (i = pos; code = getCode(str, i), code < 76 && code > 65;) {
18093                ++i;
18094            }
18095            return parseInt(str.slice(pos - 1, i), 10);
18096        }
18097        code = alphabet && alphabet.indexOf(str.charAt(pos));
18098        return (hasValue(code) && code > -1) ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
18099            : code < 46 ? 65
18100                : code < 48 ? code - 1
18101                    : code < 58 ? code + 18
18102                        : code < 65 ? code - 11
18103                            : code < 91 ? code + 11
18104                                : code < 97 ? code - 37
18105                                    : code < 123 ? code + 5
18106                                        : code - 63;
18107    };
18108    var isPseudoNullA = false;
18109    var isPseudoNullB = false;
18110    if (this.emptyAsNull) {
18111        isPseudoNullA = (a != null && !hasValue(a));
18112        isPseudoNullB = (b != null && !hasValue(b));
18113    }
18114    if (a == null || b == null || isPseudoNullA || isPseudoNullB) {
18115        var nulls = this.nulls;
18116        if ((a === undefined && b === undefined) || (a === null && b === null)) {
18117            result = 0;
18118        }
18119        else if (a === undefined) {
18120            result = ((b === null || isPseudoNullB) ? -1 :
18121                nulls === 'first' ? -1 :
18122                    nulls === 'last' ? 1 :
18123                        nulls === 'desc' ? (isAscending ? 1 : -1) :
18124                            (isAscending ? -1 : 1));
18125        }
18126        else if (b === undefined) {
18127            result = ((a === null || isPseudoNullA) ? 1 :
18128                nulls === 'first' ? 1 :
18129                    nulls === 'last' ? -1 :
18130                        nulls === 'desc' ? (isAscending ? -1 : 1) :
18131                            (isAscending ? 1 : -1));
18132        }
18133        else if (isPseudoNullA && isPseudoNullB) {
18134            result = a.localeCompare(b);
18135        }
18136        else if (a === null || isPseudoNullA) {
18137            result = (b === null ? 1 :
18138                isPseudoNullB ? -1 :
18139                    nulls === 'first' ? -1 :
18140                        nulls === 'last' ? 1 :
18141                            nulls === 'desc' ? (isAscending ? 1 : -1) :
18142                                (isAscending ? -1 : 1));
18143        }
18144        else {
18145            result = (nulls === 'first' ? 1 :
18146                nulls === 'last' ? -1 :
18147                    nulls === 'desc' ? (isAscending ? -1 : 1) :
18148                        (isAscending ? 1 : -1));
18149        }
18150        return result;
18151    }
18152    if (a instanceof Date && b instanceof Date) {
18153        a = a.getTime();
18154        b = b.getTime();
18155    }
18156    else {
18157        if (typeof a === 'string') {
18158            var numA = parseFloat(a);
18159            if (!isNaN(numA)) {
18160                if (a === String(numA) && a.length === numA.toString().length) {
18161                    a = numA;
18162                }
18163            }
18164        }
18165        if (typeof b === 'string') {
18166            var numB = parseFloat(b);
18167            if (!isNaN(numB)) {
18168                if (b === String(numB) && b.length === numB.toString().length) {
18169                    b = numB;
18170                }
18171            }
18172        }
18173    }
18174    if (typeof a === 'number' && typeof b === 'number') {
18175        result = (a === b ? 0 : (a < b) ? -1 : 1);
18176        if (!isAscending) {
18177            result *= -1;
18178        }
18179        return result;
18180    }
18181    else {
18182        a += '';
18183        b += '';
18184        if (a !== b) {
18185            if (ignoreCase) {
18186                a = a.toLowerCase();
18187                b = b.toLowerCase();
18188            }
18189            for (; codeB;) {
18190                codeA = getCode(a, posA++);
18191                codeB = getCode(b, posB++);
18192                if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
18193                    codeA = getCode(a, posA, posA);
18194                    codeB = getCode(b, posB, posA = i);
18195                    posB = i;
18196                }
18197                if (codeA !== codeB) {
18198                    result = (codeA < codeB) ? -1 : 1;
18199                    if (!isAscending) {
18200                        result *= -1;
18201                    }
18202                    return result;
18203                }
18204            }
18205        }
18206        return 0;
18207    }
18208};
18209var PdsNaturalSort = (function () {
18210    function PdsNaturalSort() {
18211        this.CONFIG_SPLIT_REGEX = /^(\+{1,2}!{0,2}
18211|\-{1,2}!{0,2}|\!{1,2}[+-]{0,2})?([^!^+^-].*)$/;
18212        this.alphabet = null;
18213        this.emptyAsNull = false;
18214        this.isAscending = true;
18215        this.isIgnoreCase = false;
18216        this.key = null;
18217        this.nulls = 'asc';
18218        this.naturalCompare = naturalCompare.bind(this);
18219    }
18220    PdsNaturalSort.prototype.clearKey = function () {
18221        this.key = null;
18222    };
18223    PdsNaturalSort.prototype.setAlphabet = function (str) {
18224        this.alphabet = (hasValue(str) ? str : null);
18225    };
18226    PdsNaturalSort.prototype.setAscending = function (value) {
18227        this.isAscending = value;
18228    };
18229    PdsNaturalSort.prototype.setEmptyAsNull = function (value) {
18230        this.emptyAsNull = value;
18231    };
18232    PdsNaturalSort.prototype.setIgnoreCase = function (value) {
18233        this.isIgnoreCase = value;
18234    };
18235    PdsNaturalSort.prototype.setKey = function (value) {
18236        this.key = value;
18237        if (value == null) {
18238            console.warn('Invalid value for natural compare key: ', value);
18239        }
18240    };
18241    PdsNaturalSort.prototype.setNulls = function (value) {
18242        if (value == null || typeof value !== 'string') {
18243            value = 'asc';
18244        }
18245        value = value.toLowerCase();
18246        this.nulls = (value === 'desc' || value === 'first' || value === 'last' ? value : 'asc');
18247    };
18248    PdsNaturalSort.prototype.ascending = function () {
18249        this.isAscending = true;
18250    };
18251    PdsNaturalSort.prototype.descending = function () {
18252        this.isAscending = false;
18253    };
18254    PdsNaturalSort.prototype.ignoreCase = function () {
18255        this.isIgnoreCase = true;
18256    };
18257    PdsNaturalSort.prototype.nullsAsc = function () {
18258        this.nulls = 'asc';
18259    };
18260    PdsNaturalSort.prototype.nullsDesc = function () {
18261        this.nulls = 'desc';
18262    };
18263    PdsNaturalSort.prototype.nullsFirst = function () {
18264        this.nulls = 'first';
18265    };
18266    PdsNaturalSort.prototype.nullsLast = function () {
18267        this.nulls = 'last';
18268    };
18269    PdsNaturalSort.prototype.useCase = function () {
18270        this.isIgnoreCase = false;
18271    };
18272    PdsNaturalSort.prototype.reset = function () {
18273        this.alphabet = null;
18274        this.emptyAsNull = false;
18275        this.isAscending = true;
18276        this.isIgnoreCase = false;
18277        this.nulls = 'asc';
18278        this.clearKey();
18279    };
18280    PdsNaturalSort.prototype.naturalSort = function (arr, key) {
18281        var result;
18282        if (arr instanceof Array) {
18283            var hasObject_1 = false;
18284            var hasPrimitive_1 = false;
18285            arr.forEach(function (o) {
18286                if (o != null && typeof o === 'object') {
18287                    hasObject_1 = true;
18288                }
18289                else {
18290                    hasPrimitive_1 = true;
18291                }
18292            });
18293            if (hasObject_1 && !hasPrimitive_1) {
18294                if (key == null) {
18295                    throw 'Unable to sort an array of objects without a lookup key';
18296                }
18297                this.setKey(key);
18298                result = arr.sort(this.naturalCompare);
18299            }
18300            else if (!hasObject_1 && hasPrimitive_1) {
18301                this.key = null;
18302                result = arr.slice().sort(this.naturalCompare);
18303            }
18304            else if (!hasObject_1 && !hasPrimitive_1) {
18305                result = arr;
18306            }
18307            else {
18308                throw 'Unable to sort an array containing both primitives and objects.';
18309            }
18310        }
18311        else {
18312            result = arr;
18313        }
18314        return result;
18315    };
18316    PdsNaturalSort.prototype.sortObjectsAdvanced = function (items, fieldConfig, reverseSort) {
18317        var _this = this;
18318        if (reverseSort === void 0) { reverseSort = false; }
18319        var sortedArray = [];
18320        for (var i = 0; i < items.length; i++) {
18321            sortedArray[i] = items[i];
18322            if (typeof sortedArray[i] === 'undefined') {
18323                console.error('natural sort does not support undefined elements in the array.');
18324            }
18325        }
18326        var extractorConfigurations = [];
18327        for (var _i = 0, fieldConfig_1 = fieldConfig;
18327 _i < fieldConfig_1.length; _i++) {
18328            var eachConfigurationSetting = fieldConfig_1[_i];
18329            var extractionKey = eachConfigurationSetting.extractionKey;
18330            var extractor = void 0;
18331            if (typeof extractionKey === 'function') {
18332                extractor = extractionKey;
18333            }
18334            else if (typeof extractionKey === 'string') {
18335                var resolver = new simple_parse_resolver_1.SimpleParseResolver(extractionKey);
18336                extractor = resolver.resolve.bind(resolver);
18337            }
18338            var extractorConfiguration = {
18339                extractor: extractor,
18340                isReversed: false,
18341                nullsFirst: true
18342            };
18343            switch (eachConfigurationSetting.sortDirection) {
18344                case '+!':
18345                    extractorConfiguration.isReversed = reverseSort;
18346                    extractorConfiguration.nullsFirst = false;
18347                    break;
18348                case '!-':
18349                    extractorConfiguration.isReversed = !reverseSort;
18350                    extractorConfiguration.nullsFirst = false;
18351                    break;
18352                case '-':
18353                case '-!':
18354                    extractorConfiguration.isReversed = !reverseSort;
18355                    extractorConfiguration.nullsFirst = true;
18356                    break;
18357                case '++':
18358                case '!++':
18359                case '!!++':
18360                    extractorConfiguration.isReversed = false;
18361                    extractorConfiguration.nullsFirst = true;
18362                    break;
18363                case '!--':
18364                case '!!--':
18365                    extractorConfiguration.isReversed = true;
18366                    extractorConfiguration.nullsFirst = false;
18367                    break;
18368                case '--':
18369                case '--!':
18370                case '--!!':
18371                    extractorConfiguration.isReversed = true;
18372                    extractorConfiguration.nullsFirst = true;
18373                    break;
18374                case '++!':
18375                case '++!!':
18376                    extractorConfiguration.isReversed = false;
18377                    extractorConfiguration.nullsFirst = false;
18378                    break;
18379                case '!!+':
18380                    extractorConfiguration.isReversed = reverseSort;
18381                    extractorConfiguration.nullsFirst = (extractorConfiguration.isReversed === true) ? false : true;
18382                    break;
18383                case '+!!':
18384                    extractorConfiguration.isReversed = reverseSort;
18385                    extractorConfiguration.nullsFirst = (extractorConfiguration.isReversed === true) ? true : false;
18386                    break;
18387                case '!!-':
18388                    extractorConfiguration.isReversed = !reverseSort;
18389                    extractorConfiguration.nullsFirst = (extractorConfiguration.isReversed === true) ? false : true;
18390                    break;
18391                case '-!!':
18392                    extractorConfiguration.isReversed = !reverseSort;
18393                    extractorConfiguration.nullsFirst = (extractorConfiguration.isReversed === true) ? true : false;
18394                    break;
18395                case '!':
18396                case '+':
18397                case '!!':
18398                case '!+':
18399                default:
18400                    extractorConfiguration.isReversed = reverseSort;
18401                    extractorConfiguration.nullsFirst = true;
18402                    break;
18403            }
18404            extractorConfigurations.push(extractorConfiguration);
18405        }
18406        var comparator = function (a, b) {
18407            for (var _i = 0, extractorConfigurations_1 = extractorConfigurations; _i < extractorConfigurations_1.length; _i++) {
18408                var eachExtractorConfiguration = extractorConfigurations_1[_i];
18409                var dataInA = eachExtractorConfiguration.extractor(a);
18410                var dataInB = eachExtractorConfiguration.extractor(b);
18411                if (eachExtractorConfiguration.nullsFirst) {
18412                    _this.nullsFirst();
18413                }
18414                else {
18415                    _this.nullsLast();
18416                }
18417                var result = _this.naturalCompare(dataInA, dataInB);
18418                if (result !== 0) {
18419                    if (eachExtractorConfiguration.isReversed) {
18420                        return result === 1 ? -1 : 1;
18421                    }
18422                    else {
18423                        return result;
18424                    }
18425                }
18426            }
18427            return 0;
18428        };
18429        sortedArray.sort(comparator);
18430        return sortedArray;
18431    };
18432    PdsNaturalSort.prototype.sortPrimitives = function (items, reverseSort) {
18433        var _this = this;
18434        if (reverseSort === void 0) { reverseSort = false; }
18435        var sortedArray = [];
18436        for (var i = 0; i < items.length; i++) {
18437            sortedArray[i] = items[i];
18438            if (typeof sortedArray[i] === 'undefined') {
18439                console.error('natural sort does not support undefined elements in the array.');
18440            }
18441        }
18442        var comparator = function (a, b) {
18443            var result = _this.naturalCompare(a, b);
18444            if (result < 0) {
18445                var reversed = false;
18446                var r = reversed !== reverseSort ? 1 : -1;
18447                return r;
18448            }
18449            else if (result > 0) {
18450                var reversed = false;
18451                var r = reversed !== reverseSort ? -1 : 1;
18452                return r;
18453            }
18454            else {
18455                return 0;
18456            }
18457        };
18458        return sortedArray.sort(comparator);
18459    };
18460    PdsNaturalSort.prototype.sortObjects = function (items, fieldConfig, reverseSort) {
18461        if (reverseSort === void 0) { reverseSort = false; }
18462        if (typeof fieldConfig === 'string') {
18463            fieldConfig = [fieldConfig];
18464        }
18465        var sortedObjects;
18466        var enhancedConfigurations = [];
18467        for (var _i = 0, fieldConfig_2 = fieldConfig;
18467 _i < fieldConfig_2.length; _i++) {
18468            var eachConfigurationSetting = fieldConfig_2[_i];
18469            var sortDirectionAndExtractionKey = this.splitConfigurationSetting(eachConfigurationSetting);
18470            enhancedConfigurations.push(sortDirectionAndExtractionKey);
18471        }
18472        sortedObjects = this.sortObjectsAdvanced(items, enhancedConfigurations, reverseSort);
18473        return sortedObjects;
18474    };
18475    PdsNaturalSort.prototype.splitConfigurationSetting = function (configurationSetting) {
18476        var splitConfig = this.CONFIG_SPLIT_REGEX.exec(configurationSetting);
18477        var extractorConfig;
18478        if (splitConfig != null && splitConfig.length > 2) {
18479            extractorConfig = {
18480                sortDirection: splitConfig[1],
18481                extractionKey: splitConfig[2]
18482            };
18483        }
18484        return extractorConfig;
18485    };
18486    return PdsNaturalSort;
18487}());
18488exports.PdsNaturalSort = PdsNaturalSort;
18489
18490
18491
18492/***/ }),
18493/* 137 */
18494/***/ (function(module, exports, __webpack_require__) {
18495
18496"use strict";
18497
18498Object.defineProperty(exports, "__esModule", { value: true });
18499var pds_utils_1 = __webpack_require__(18);
18500var rxjs_1 = __webpack_require__(19);
18501var pds_date_widget_1 = __webpack_require__(138);
18502var pds_date_widget_dialog_1 = __webpack_require__(139);
18503var pds_app_nav_1 = __webpack_require__(140);
18504var pds_class_block_1 = __webpack_require__(141);
18505var pds_class_picker_1 = __webpack_require__(142);
18506var pds_dynamic_select_1 = __webpack_require__(143);
18507var pds_select_widget_1 = __webpack_require__(144);
18508var pds_text_widget_1 = __webpack_require__(145);
18509var pds_file_picker_widget_1 = __webpack_require__(146);
18510var pds_number_widget_1 = __webpack_require__(147);
18511var pds_numbered_slider_1 = __webpack_require__(148);
18512var pds_progress_bar_widget_1 = __webpack_require__(149);
18513var pds_reporting_term_selector_1 = __webpack_require__(150);
18514var pds_search_1 = __webpack_require__(151);
18515var pds_icon_1 = __webpack_require__(152);
18516var pds_help_menu_1 = __webpack_require__(153);
18517var pds_global_create_menu_1 = __webpack_require__(154);
18518var pds_loader_1 = __webpack_require__(155);
18519var pds_circular_progress_1 = __webpack_require__(156);
18520var pds_radio_button_widget_1 = __webpack_require__(157);
18521var pds_rich_text_editor_1 = __webpack_require__(158);
18522var pds_img_1 = __webpack_require__(160);
18523var pds_overlay_dropdown_1 = __webpack_require__(161);
18524var pds_announce_1 = __webpack_require__(162);
18525var pds_notification_indicator_1 = __webpack_require__(163);
18526var pds_activity_feed_notification_1 = __webpack_require__(164);
18527var pds_rich_text_display_1 = __webpack_require__(165);
18528var pds_dialog_1 = __webpack_require__(107);
18529var pds_time_widget_1 = __webpack_require__(166);
18530var pds_communication_notification_1 = __webpack_require__(167);
18531var pds_assignment_template_notification_1 = __webpack_require__(168);
18532var pds_assignment_submission_notification_1 = __webpack_require__(169);
18533var pds_assignment_return_notification_1 = __webpack_require__(170);
18534var pds_chat_quick_message_1 = __webpack_require__(171);
18535var pds_notification_badge_1 = __webpack_require__(172);
18536var pds_user_avatar_1 = __webpack_require__(173);
18537var pds_tooltip_1 = __webpack_require__(175);
18538var pds_error_page_1 = __webpack_require__(177);
18539var pds_copyright_clause_1 = __webpack_require__(178);
18540var pds_app_switcher_1 = __webpack_require__(179);
18541var pds_textarea_widget_1 = __webpack_require__(181);
18542var pds_checkbox_widget_1 = __webpack_require__(182);
18543var pds_user_menu_1 = __webpack_require__(183);
18544var pds_immersive_reader_1 = __webpack_require__(184);
18545function createFlattenedPolymerDefinition(token) {
18546    var definition = pds_utils_1.pdsUtils.createFlattenedClassInstance(token);
18547    delete definition.querySelector;
18548    delete definition.querySelectorAll;
18549    delete definition.dispatchEvent;
18550    delete definition.hasAttribute;
18551    delete definition.setAttribute;
18552    delete definition.appendChild;
18553    return definition;
18554}
18555exports.createFlattenedPolymerDefinition = createFlattenedPolymerDefinition;
18556var pdsWidgetDefinitions = {
18557    pdsCheckboxWidgetDefinition: createFlattenedPolymerDefinition(pds_checkbox_widget_1.PdsCheckboxWidget),
18558    pdsTextWidgetDefinition: createFlattenedPolymerDefinition(pds_text_widget_1.PdsTextWidget),
18559    pdsTextareaWidgetDefinition: createFlattenedPolymerDefinition(pds_textarea_widget_1.PdsTextareaWidget),
18560    pdsFilePickerWidgetDefinition: createFlattenedPolymerDefinition(pds_file_picker_widget_1.PdsFilePickerWidget),
18561    pdsSelectWidgetDefinition: createFlattenedPolymerDefinition(pds_select_widget_1.PdsSelectWidget),
18562    pdsNumberWidgetDefinition: createFlattenedPolymerDefinition(pds_number_widget_1.PdsNumberWidget),
18563    pdsDateWidgetDefinition: createFlattenedPolymerDefinition(pds_date_widget_1.PdsDateWidget),
18564    pdsTimeWidgetDefinition: createFlattenedPolymerDefinition(pds_time_widget_1.PdsTimeWidget),
18565    pdsDateWidgetDialogDefinition: createFlattenedPolymerDefinition(pds_date_widget_dialog_1.PdsDateWidgetDialog),
18566    pdsDynamicSelectDefinition: createFlattenedPolymerDefinition(pds_dynamic_select_1.PdsDynamicSelect),
18567    pdsNumberedSliderDefinition: createFlattenedPolymerDefinition(pds_numbered_slider_1.PdsNumberedSlider),
18568    pdsIconDefinition: createFlattenedPolymerDefinition(pds_icon_1.PdsIcon),
18569    pdsAppNav: createFlattenedPolymerDefinition(pds_app_nav_1.PdsAppNav),
18570    pdsHelpMenuDefinition: createFlattenedPolymerDefinition(pds_help_menu_1.PdsHelpMenu),
18571    pdsGlobalCreateMenuDefinition: createFlattenedPolymerDefinition(pds_global_create_menu_
185711.PdsGlobalCreateMenu),
18572    pdsClassBlock: createFlattenedPolymerDefinition(pds_class_block_1.PdsClassBlock),
18573    pdsClassPicker: createFlattenedPolymerDefinition(pds_class_picker_1.PdsClassPicker),
18574    pdsReportingTermSelector: createFlattenedPolymerDefinition(pds_reporting_term_selector_1.PdsReportingTermSelector),
18575    pdsSearch: createFlattenedPolymerDefinition(pds_search_1.PdsSearch),
18576    pdsRadioButtonWidgetDefinition: createFlattenedPolymerDefinition(pds_radio_button_widget_1.PdsRadioButtonWidget),
18577    pdsRichTextEditor: createFlattenedPolymerDefinition(pds_rich_text_editor_1.PdsRichTextEditor),
18578    pdsProgressBarWidgetDefinition: createFlattenedPolymerDefinition(pds_progress_bar_widget_1.PdsProgressBarWidget),
18579    pdsImgWidgetDefinition: createFlattenedPolymerDefinition(pds_img_1.PdsImg),
18580    pdsLoaderDefinition: createFlattenedPolymerDefinition(pds_loader_1.PdsLoader),
18581    pdsCircularProgressDefinition: createFlattenedPolymerDefinition(pds_circular_progress_1.PdsCircularProgress),
18582    pdsNotificationIndicator: createFlattenedPolymerDefinition(pds_notification_indicator_1.PdsNotificationIndicator),
18583    pdsOverlayDropdownDefinition: createFlattenedPolymerDefinition(pds_overlay_dropdown_1.PdsOverlayDropdown),
18584    pdsAnnounceDefinition: createFlattenedPolymerDefinition(pds_announce_1.PdsAnnounce),
18585    pdsRichTextDisplayDefinition: createFlattenedPolymerDefinition(pds_rich_text_display_1.PdsRichTextDisplay),
18586    pdsActivityFeedNotification: createFlattenedPolymerDefinition(pds_activity_feed_notification_1.PdsActivityFeedNotification),
18587    pdsDialogDefinition: createFlattenedPolymerDefinition(pds_dialog_1.PdsDialog),
18588    pdsCommunicationNotification: createFlattenedPolymerDefinition(pds_communication_notification_1.PdsCommunicationNotification),
18589    pdsAssignmentTemplateNotification: createFlattenedPolymerDefinition(pds_assignment_template_notification_1.PdsAssignmentTemplateNotification),
18590    pdsAssignmentSubmissionNotification: createFlattenedPolymerDefinition(pds_assignment_submission_notification_1.PdsAssignmentSubmissionNotification),
18591    pdsAssignmentReturnNotification: createFlattenedPolymerDefinition(pds_assignment_return_notification_1.PdsAssignmentReturnNotification),
18592    pdsChatQuickMessage: createFlattenedPolymerDefinition(pds_chat_quick_message_1.PdsCh
18592atQuickMessage),
18593    pdsNotificationBadge: createFlattenedPolymerDefinition(pds_notification_badge_1.PdsNotificationBadge),
18594    pdsUserAvatar: createFlattenedPolymerDefinition(pds_user_avatar_1.PdsUserAvatar),
18595    pdsTooltip: createFlattenedPolymerDefinition(pds_tooltip_1.PdsTooltip),
18596    pdsErrorPage: createFlattenedPolymerDefinition(pds_error_page_1.PdsErrorPage),
18597    pdsCopyrightClause: createFlattenedPolymerDefinition(pds_copyright_clause_1.PdsCopyrightClause),
18598    pdsAppSwitcher: createFlattenedPolymerDefinition(pds_app_switcher_1.PdsAppSwitcher),
18599    pdsUserMenuDefinition: createFlattenedPolymerDefinition(pds_user_menu_1.PdsUserMenu),
18600    pdsImmersiveReader: createFlattenedPolymerDefinition(pds_immersive_reader_1.PdsImmersiveReader)
18601};
18602exports.polymerUtils = {
18603    regComplete: new rxjs_1.AsyncSubject,
18604    registeredPolymerComponents: 0,
18605    pdsWidgetDefinitionCount: Object.keys(pdsWidgetDefinitions).length,
18606    registerPolymerComponent: function (definition) {
18607        if (!pdsWidgetDefinitions.hasOwnProperty(definition)) {
18608            console.error('"' + definition + '" was not found in list pdsWidgetDefinitions. polymer-utils.ts');
18609            return;
18610        }
18611        window.Polymer(pdsWidgetDefinitions[definition]);
18612        this.registeredPolymerComponents++;
18613        if (this.pdsWidgetDefinitionCount === this.registeredPolymerComponents) {
18614            this.regComplete.next();
18615            this.regComplete.complete();
18616        }
18617    },
18618    addPdsObjToPolymerComponent: function (pds) {
18619        for (var prop in pdsWidgetDefinitions) {
18620            if (prop !== 'pdsWidgetDefinitions') {
18621                pdsWidgetDefinitions[prop].pds = pds;
18622            }
18623        }
18624    },
18625    loadPolymerComponents: function (path) {
18626        var widgets = ['/widget-styles.html',
18627            '/pds-app-nav.html',
18628            '/pds-checkbox-widget.html',
18629            '/pds-class-block.html',
18630            '/pds-class-picker.html',
18631            '/pds-circular-progress.html',
18632            '/pds-date-widget.html',
18633            '/pds-time-widget.html',
18634            '/pds-date-widget-dialog.html',
18635            '/pds-dynamic-select.html',
18636            '/pds-icon.html',
18637            '/pds-global-create-menu.html',
18638            '/pds-help-menu.html',
18639            '/pds-number-widget.html',
18640            '/pds-numbered-slider.html',
18641            '/pds-progress-bar-widget.html',
18642            '/pds-reporting-term-selector.html',
18643            '/pds-search.html',
18644            '/pds-select-widget.html',
18645            '/pds-text-widget.html',
18646            '/pds-rich-text-editor.html',
18647            '/pds-img.html',
18648            '/pds-loader.html',
18649            '/pds-overlay-dropdown.html',
18650            '/pds-notification-indicator.html',
18651            '/pds-announce-text.html',
18652            '/pds-radio-button-widget.html',
18653            '/pds-rich-text-display.html',
18654            '/pds-activity-feed-notification.html',
18655            '/pds-dialog.html',
18656            '/pds-communication-notification.html',
18657            '/pds-assignment-template-notification.html',
18658            '/pds-assignment-submission-notification.html',
18659            '/pds-assignment-return-notification.html',
18660            '/pds-chat-quick-message.html',
18661            '/pds-user-menu.html',
18662            '/pds-notification-badge.html',
18663            '/pds-immersive-reader.html'];
18664        var i = 0;
18665        var loadNext = function () {
18666            if (i < widgets.length) {
18667                setTimeout(function () {
18668                    var element = document.createElement('link');
18669                    element.setAttribute('rel', 'import');
18670                    element.setAttribute('href', path + widgets[i]);
18671                    document.head.appendChild(element);
18672                    i++;
18673                    loadNext();
18674                }, 100);
18675            }
18676        };
18677        loadNext();
18678    },
18679    registerPdsCheckboxWidgetDefinition: function () {
18680        this.registerPolymerComponent('pdsCheckboxWidgetDefinition');
18681    },
18682    registerPdsSelectWidgetDefinition: function () {
18683        this.registerPolymerComponent('pdsSelectWidgetDefinition');
18684    },
18685    registerPdsTextWidgetDefinition: function () {
18686        this.registerPolymerComponent('pdsTextWidgetDefinition');
18687    },
18688    registerPdsTextareaWidgetDefinition: function () {
18689        this.registerPolymerComponent('pdsTextareaWidgetDefinition');
18690    },
18691    registerPdsFilePickerWidgetDefinition: function () {
18692        this.registerPolymerComponent('pdsFilePickerWidgetDefinition');
18693    },
18694    registerPdsNumberWidgetDefinition: function () {
18695        this.registerPolymerComponent('pdsNumberWidgetDefinition');
18696    },
18697    registerPdsDateWidgetDefinition: function () {
18698        this.registerPolymerComponent('pdsDateWidgetDefinition');
18699    },
18700    registerPdsTimeWidgetDefinition: function () {
18701        this.registerPolymerComponent('pdsTimeWidgetDefinition');
18702    },
18703    registerPdsDateWidgetDialogDefinition: function () {
18704        this.registerPolymerComponent('pdsDateWidgetDialogDefinition');
18705    },
18706    registerPdsDynamicSelectDefinition: function () {
18707        this.registerPolymerComponent('pdsDynamicSelectDefinition');
18708    },
18709    registerPdsNumberedSliderDefinition: function () {
18710        this.registerPolymerComponent('pdsNumberedSliderDefinition');
18711    },
18712    registerPdsIconDefinition: function () {
18713        this.registerPolymerComponent('pdsIconDefinition');
18714    },
18715    registerPdsAppNav: function () {
18716        this.registerPolymerComponent('pdsAppNav');
18717    },
18718    registerPdsHelpMenuDefinition: function () {
18719        this.registerPolymerComponent('pdsHelpMenuDefinition');
18720    },
18721    registerPdsGlobalCreateMenuDefinition: function () {
18722        this.registerPolymerComponent('pdsGlobalCreateMenuDefinition');
18723    },
18724    registerPdsClassBlock: function () {
18725        this.registerPolymerComponent('pdsClassBlock');
18726    },
18727    registerPdsClassPicker: function () {
18728        this.registerPolymerComponent('pdsClassPicker');
18729    },
18730    registerPdsReportingTermSelector: function () {
18731        this.registerPolymerComponent('pdsReportingTermSelector');
18732    },
18733    registerPdsSearch: function () {
18734        this.registerPolymerComponent('pdsSearch');
18735    },
18736    registerPdsRadioButtonWidgetDefinition: function () {
18737        this.registerPolymerComponent('pdsRadioButtonWidgetDefinition');
18738    },
18739    registerPdsRichTextEditor: function () {
18740        this.registerPolymerComponent('pdsRichTextEditor');
18741    },
18742    registerPdsProgressBarWidgetDefinition: function () {
18743        this.registerPolymerComponent('pdsProgressBarWidgetDefinition');
18744    },
18745    registerPdsImgWidgetDefinition: function () {
18746        this.registerPolymerComponent('pdsImgWidgetDefinition');
18747    },
18748    registerPdsLoaderDefinition: function () {
18749        this.registerPolymerComponent('pdsLoaderDefinition');
18750    },
18751    registerPdsCircularProgressDefinition: function () {
18752        this.registerPolymerComponent('pdsCircularProgressDefinition');
18753    },
18754    registerPdsNotificationIndicator: function () {
18755        this.registerPolymerComponent('pdsNotificationIndicator');
18756    },
18757    registerPdsOverlayDropdownDefinition: function () {
18758        this.registerPolymerComponent('pdsOverlayDropdownDefinition');
18759    },
18760    registerPdsAnnounceDefinition: function () {
18761        this.registerPolymerComponent('pdsAnnounceDefinition');
18762    },
18763    registerPdsRichTextDisplayDefinition: function () {
18764        this.registerPolymerComponent('pdsRichTextDisplayDefinition');
18765    },
18766    registerPdsActivityFeedNotification: function () {
18767        this.registerPolymerComponent('pdsActivityFeedNotification');
18768    },
18769    registerPdsDialogDefinition: function () {
18770        this.registerPolymerComponent('pdsDialogDefinition');
18771    },
18772    registerPdsCommunicationNotification: function () {
18773        this.registerPolymerComponent('pdsCommunicationNotification');
18774    },
18775    registerPdsAssignmentTemplateNotification: function () {
18776        this.registerPolymerComponent('pdsAssignmentTemplateNotification');
18777    },
18778    registerPdsAssignmentSubmissionNotification: function () {
18779        this.registerPolymerComponent('pdsAssignmentSubmissionNotification');
18780    },
18781    registerPdsAssignmentReturnNotification: function () {
18782        this.registerPolymerComponent('pdsAssignmentReturnNotification');
18783    },
18784    registerPdsChatQuickMessage: function () {
18785        this.registerPolymerComponent('pdsChatQuickMessage');
18786    },
18787    registerPdsNotificationBadge: function () {
18788        this.registerPolymerComponent('pdsNotificationBadge');
18789    },
18790    registerPdsUserAvatar: function () {
18791        this.registerPolymerComponent('pdsUserAvatar');
18792    },
18793    registerPdsTooltipDefinition: function () {
18794        this.registerPolymerComponent('pdsTooltip');
18795    },
18796    registerPdsErrorPage: function () {
18797        this.registerPolymerComponent('pdsErrorPage');
18798    },
18799    registerPdsCopyrightClause: function () {
18800        this.registerPolymerComponent('pdsCopyrightClause');
18801    },
18802    registerPdsAppSwitcher: function () {
18803        this.registerPolymerComponent('pdsAppSwitcher');
18804    },
18805    registerPdsUserMenuDefinition: function () {
18806        this.registerPolymerComponent('pdsUserMenuDefinition');
18807    },
18808    registerPdsImmersiveReaderDefinition: function () {
18809        this.registerPolymerComponent('pdsImmersiveReader');
18810    }
18811};
18812
18813
18814
18815/***/ }),
18816/* 138 */
18817/***/ (function(module, exports, __webpack_require__) {
18818
18819"use strict";
18820
18821var __extends = (this && this.__extends) || (function () {
18822    var extendStatics = function (d, b) {
18823        extendStatics = Object.setPrototypeOf ||
18824            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18825            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
18826        return extendStatics(d, b);
18827    }
18828    return function (d, b) {
18829        extendStatics(d, b);
18830        function __() { this.constructor = d; }
18831        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18832    };
18833})();
18834Object.defineProperty(exports, "__esModule", { value: true });
18835var pds_abstract_input_widget_1 = __webpack_require__(31);
18836var pds_i18n_1 = __webpack_require__(15);
18837var pds_validation_rules_engine_1 = __webpack_require__(26);
18838var pds_validation_1 = __webpack_require__(105);
18839var PdsDateWidget = (function (_super) {
18840    __extends(PdsDateWidget, _super);
18841    function PdsDateWidget() {
18842        var _this = _super !== null && _super.apply(this, arguments) || this;
18843        _this.is = 'pds-date-widget';
18844        _this.showDatePickerDialog = false;
18845        _this.properties = {
18846            name: String,
18847            dataLabelText: String,
18848            dataShowLabel: {
18849                type: String,
18850                value: null
18851            },
18852            dataBadgeText: {
18853                type: String,
18854                value: '',
18855                observer: 'setUpBadge'
18856            },
18857            dataHelperText: {
18858                type: String,
18859                value: null
18860            },
18861            dataFieldHelpText: String,
18862            dataPlaceholderText: String,
18863            dataTooltipText: String,
18864            dataUseAlternateColorScheme: {
18865                type: String,
18866                value: 'false'
18867            },
18868            dataIsreadonly: {
18869                type: String,
18870                value: 'false',
18871                observer: 'setReadonlyText'
18872            },
18873            dataIsfieldonly: {
18874                type: String,
18875                value: 'false'
18876            },
18877            dataHideUnelevatedBadge: {
18878                type: String,
18879                value: 'false',
18880                observer: 'setUpBadge'
18881            },
18882            dataDisableInvalidBadgeElevation: {
18883                type: String,
18884                value: 'false',
18885                observer: 'setUpBadge'
18886            },
18887            dataIsrequired: {
18888                type: String,
18889                value: 'false',
18890                observer: 'setUpBadge'
18891            },
18892            disabled: {
18893                type: String,
18894                value: 'false'
18895            },
18896            dataMaxdate: String,
18897            dataMindate: String,
18898            dataCustomvalidate: String,
18899            dataActionIcon: String
18900        };
18901        return _this;
18902    }
18903    PdsDateWidget.prototype.generateValidationRules = function () {
18904        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
18905        validationRules.isDate = true;
18906        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
18907        validationRules.setProperty('maxValue', this.dataMaxdate, Date);
18908        validationRules.setProperty('minValue', this.dataMindate, Date);
18909        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
18910        if ('dataCustomvalidate' in this) {
18911            this.validators.push({
18912                execute: pds_validation_1.pdsValidation.getCustomValidate(this.dataCustomvalidate),
18913                condition: {
18914                    element: this
18915                }
18916            });
18917        }
18918    };
18919    PdsDateWidget.prototype.setModelValue = function (modelValue, skip) {
18920        if (skip === void 0) { skip = false; }
18921        var ele = this.querySelector('input');
18922        if (ele != null && modelValue !== ele.modelValue) {
18923            ele.modelValue = modelValue;
18924            this.dialogValue = modelValue;
18925            if (skip !== true) {
18926                this.setValue(pds_i18n_1.pdsI18n.localizeDate(modelValue), true);
18927            }
18928            return true;
18929        }
18930        return false;
18931    };
18932    PdsDateWidget.prototype.setValue = function (value, skip) {
18933        if (skip === void 0) { skip = false; }
18934        if (value == null) {
18935            value = '';
18936        }
18937        var inputEl = this.querySelector('input');
18938        if (inputEl != null && value !== inputEl.value) {
18939            inputEl.value = value;
18940        }
18941        if (skip !== true) {
18942            this.setModelValue(pds_i18n_1.pdsI18n.deLocalizeDate(value), true);
18943        }
18944    };
18945    PdsDateWidget.prototype.dateChanged = function (e) {
18946        this.value = pds_i18n_1.pdsI18n.localizeDate(e.target.value);
18947        this.inputChange();
18948        this.validateWidget(true);
18949        this.closeDatePickerDialog();
18950        this.dispatchInputEvent(this.querySelector('input'));
18951    };
18952    PdsDateWidget.prototype.openDatePickerDialog = function (event) {
18953        if (event.clientX !== 0 && event.clientY !== 0) {
18954            this.showDatePickerDialog = true;
18955        }
18956    };
18957    PdsDateWidget.prototype.closeDatePickerDialog = function () {
18958        this.showDatePickerDialog = false;
18959    };
18960    return PdsDateWidget;
18961}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
18962exports.PdsDateWidget = PdsDateWidget;
18963
18964
18965
18966/***/ }),
18967/* 139 */
18968/***/ (function(module, exports, __webpack_require__) {
18969
18970"use strict";
18971
18972var __extends = (this && this.__extends) || (function () {
18973    var extendStatics = function (d, b) {
18974        extendStatics = Object.setPrototypeOf ||
18975            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18976            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
18977        return extendStatics(d, b);
18978    }
18979    return function (d, b) {
18980        extendStatics(d, b);
18981        function __() { this.constructor = d; }
18982        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18983    };
18984})();
18985Object.defineProperty(exports, "__esModule", { value: true });
18986var pds_widget_1 = __webpack_require__(7);
18987var pds_utils_1 = __webpack_require__(18);
18988var pds_i18n_1 = __webpack_require__(15);
18989var PdsDateWidgetDialog = (function (_super) {
18990    __extends(PdsDateWidgetDialog, _super);
18991    function PdsDateWidgetDialog() {
18992        var _this = _super !== null && _super.apply(this, arguments) || this;
18993        _this.is = 'pds-date-picker-dialog';
18994        _this.holdRefresh = false;
18995        _this.properties = {
18996            name: {
18997                type: String,
18998                value: 'pds-date-picker-dialog'
18999            },
19000            month: {
19001                type: String,
19002                observer: 'monthChange'
19003            },
19004            year: {
19005                type: String,
19006                observer: 'yearChange'
19007            },
19008            possibleYears: {
19009                type: Array
19010            },
19011            dataMaxdate: {
19012                type: String
19013            },
19014            dataMindate: {
19015                type: String
19016            },
19017            dataUseValidIndicator: {
19018                type: String,
19019                value: 'false'
19020            },
19021            dataReturnFocus: {
19022                type: String,
19023                value: ''
19024            }
19025        };
19026        return _this;
19027    }
19028    PdsDateWidgetDialog.prototype.setMonthLabels = function () {
19029        var monthLabels = [];
19030        pds_i18n_1.pdsI18n.locale.DATETIME_FORMATS.SHORTMONTH.forEach(function (month, index) {
19031            var textValueObj = {
19032                value: String(index),
19033                text: month
19034            };
19035            monthLabels.push(textValueObj);
19036        });
19037        this.monthLabels = monthLabels;
19038    };
19039    PdsDateWidgetDialog.prototype.ready = function () {
19040        _super.prototype.ready.call(this);
19041        this.setMonthLabels();
19042        this.dayLabels = pds_i18n_1.pdsI18n.locale.DATETIME_FORMATS.SHORTDAY;
19043        var today = new Date();
19044        today.setHours(0);
19045        today.setMinutes(0);
19046        today.setSeconds(0);
19047        today.setMilliseconds(0);
19048        this.todayTimeStamp = today.getTime();
19049        if (this.dataMaxdate != null) {
19050            this.maxDateTimeStamp = (new Date(this.dataMaxdate)).getTime();
19051        }
19052        if (this.dataMindate != null) {
19053            this.minDateTimeStamp = (new Date(this.dataMindate)).getTime();
19054        }
19055        var d;
19056        if (this.value != null) {
19057            d = this.value;
19058        }
19059        else {
19060            d = today;
19061        }
19062        this.holdRefresh = true;
19063        this.month = String(d.getMonth());
19064        this.holdRefresh = false;
19065        this.year = String(d.getFullYear());
19066        this.name = pds_utils_1.pdsUtils.getUniqueId(this.name);
19067    };
19068    PdsDateWidgetDialog.prototype.attached = function () {
19069        _super.prototype.attached.call(this);
19070        this.handleFocus();
19071    };
19072    PdsDateWidgetDialog.prototype.handleFocus = function () {
19073        var _this = this;
19074        var escKey = this.escKey;
19075        var tabKey = this.tabKey;
19076        this.datePickerDialog = this.querySelector('.date-picker-dialog');
19077        var firstElement = this.querySelector('#date-picker-close');
19078        if (this.datePickerDialog != null && firstElement != null) {
19079            firstElement.focus();
19080            this.datePickerFocusTrap = function (event) {
19081                var lastElement = _this.getLastDayNumElement(_this.datePickerDialog);
19082                if (event.keyCode === escKey) {
19083                    _this.closeDialog();
19084                }
19085                else if (event.keyCode === tabKey) {
19086                    if (!event.shiftKey && (event.target === lastElement)) {
19087                        firstElement.focus();
19088                        event.preventDefault();
19089                    }
19090                    else if (event.shiftKey && (event.target === firstElement)) {
19091                        lastElement.focus();
19092                        event.preventDefault();
19093                    }
19094                }
19095            };
19096            this.datePickerDialog.addEventListener('keydown', this.datePickerFocusTrap);
19097        }
19098    };
19099    PdsDateWidgetDialog.prototype.getLastDayNumElement = function (datePickerDialog) {
19100        var allButtons = datePickerDialog.querySelectorAll('button');
19101        var eachDayElement = new Array();
19102        Array.prototype.forEach.call((allButtons), function (eachButton) {
19103            if (!eachButton.classList.contains('pds-is-invisible')) {
19104                eachDayElement.push(eachButton);
19105            }
19106        });
19107        return eachDayElement[eachDayElement.length - 1];
19108    };
19109    PdsDateWidgetDialog.prototype.closeDialog = function (event) {
19110        var e = new Event('pds-remove-dialog');
19111        this.dispatchEvent(e);
19112    };
19113    PdsDateWidgetDialog.prototype.detached = function () {
19114        if (this.dataReturnFocus != null && this.dataReturnFocus.trim().length !== 0) {
19115            var returnFocusElement = document.querySelector(this.dataReturnFocus);
19116            if (returnFocusElement != null) {
19117                returnFocusElement.focus();
19118            }
19119        }
19120        if (this.datePickerDialog != null) {
19121            this.datePickerDialog.removeEventListener('keydown', this.datePickerFocusTrap);
19122        }
19123        delete this.datePickerDialog;
19124    };
19125    PdsDateWidgetDialog.prototype.getSelectedMonth = function (index) {
19126        return String(index) === this.month;
19127    };
19128    PdsDateWidgetDialog.prototype.getSelectedYear = function (yearValue) {
19129        return String(yearValue) === String(this.year);
19130    };
19131    PdsDateWidgetDialog.prototype.getSelectedDateClass = function (dateTimeStamp, value) {
19132        if (value != null && value.getTime() === dateTimeStamp) {
19133            return 'pds-selected-day';
19134        }
19135    };
19136    PdsDateWidgetDialog.prototype.getTodayClass = function (dateTimeStamp) {
19137        if (dateTimeStamp != null && dateTimeStamp === this.todayTimeStamp) {
19138            return 'pds-date-picker-today';
19139        }
19140    };
19141    PdsDateWidgetDialog.prototype.getIsWeekendClass = function (isWeekend) {
19142        if (isWeekend === true) {
19143            return 'pds-weekend-day';
19144        }
19145    };
19146    PdsDateWidgetDialog.prototype.getDisabledItemClass = function (dateTimeStamp) {
19147        if (this.isTimeStampDisabled(dateTimeStamp)) {
19148            return 'pds-disabled-day';
19149        }
19150    };
19151    PdsDateWidgetDialog.prototype.isTimeStampDisabled = function (dateTimeStamp) {
19152        if (dateTimeStamp != null) {
19153            if (this.maxDateTimeStamp != null && this.maxDateTimeStamp < dateTimeStamp) {
19154                return true;
19155            }
19156            if (this.minDateTimeStamp != null && this.minDateTimeStamp > dateTimeStamp) {
19157                return true;
19158            }
19159        }
19160        return false;
19161    };
19162    PdsDateWidgetDialog.prototype.selectDate = function (event) {
19163        var dateTimeAttr = event.target.getAttribute('data-date-time');
19164        var dateTimeStamp = new Date(parseInt(dateTimeAttr));
19165        if (this.isTimeStampDisabled(dateTimeStamp)) {
19166            return;
19167        }
19168        this.value = dateTimeStamp;
19169        var e = new Event('pds-date-change-event');
19170        this.dispatchEvent(e);
19171    };
19172    PdsDateWidgetDialog.prototype.monthChange = function () {
19173        if (this.month != null && this.holdRefresh !== true) {
19174            this.updateDays();
19175        }
19176    };
19177    PdsDateWidgetDialog.prototype.yearChange = function () {
19178        this.updateAvailableYears(this.year);
19179        this.updateDays();
19180    };
19181    PdsDateWidgetDialog.prototype.updateAvailableYears = function (year) {
19182        var newYears = [];
19183        for (var i = 0; i < 21; i++) {
19184            var val = String(year - 10 + i);
19185            newYears.push({ value: val, text: val });
19186        }
19187        this.possibleYears = newYears;
19188    };
19189    PdsDateWidgetDialog.prototype.previousMonth = function () {
19190        if (this.month === '0') {
19191            this.holdRefresh = true;
19192            this.month = '11';
19193            this.holdRefresh = false;
19194            this.year = String(parseInt(this.year) - 1);
19195        }
19196        else {
19197            this.month = String(parseInt(this.month) - 1);
19198        }
19199    };
19200    PdsDateWidgetDialog.prototype.nextMonth = function () {
19201        if (this.month === '11') {
19202            this.holdRefresh = true;
19203            this.month = '0';
19204            this.holdRefresh = false;
19205            this.yearIncrement = true;
19206            this.year = String(parseInt(this.year) + 1);
19207            this.yearIncrement = false;
19208        }
19209        else {
19210            this.month = String(parseInt(this.month) + 1);
19211        }
19212    };
19213    PdsDateWidgetDialog.prototype.setDate = function (dateTimeString) {
19214        this.value = new Date(dateTimeString);
19215        this.updateDays();
19216    };
19217    PdsDateWidgetDialog.prototype.updateDays = function () {
19218        var days = this.pds.utils.generateDays(parseInt(this.year), parseInt(this.month));
19219        days.forEach(function (calendarDay) {
19220            if (!calendarDay.hasOwnProperty('dayNum')) {
19221                calendarDay.dayNum = null;
19222            }
19223        });
19224        this.days = days;
19225    };
19226    PdsDateWidgetDialog.prototype.dashCaseToSr = function (dateAsString, arg) {
19227        if (dateAsString) {
19228            var date = pds_i18n_1.pdsI18n.formatDate(new Date(dateAsString.replace(/-/g, '/')), arg);
19229            if (date) {
19230                return date;
19231            }
19232        }
19233        return;
19234    };
19235    PdsDateWidgetDialog.prototype.messageKeysUpdated = function () {
19236        this.dayLabels = pds_i18n_1.pdsI18n.locale.DATETIME_FORMATS.SHORTDAY;
19237        this.setMonthLabels();
19238        _super.prototype.messageKeysUpdated.call(this);
19239    };
19240    return PdsDateWidgetDialog;
19241}(pds_widget_1.PdsWidget));
19242exports.PdsDateWidgetDialog = PdsDateWidgetDialog;
19243
19244
19245
19246/***/ }),
19247/* 140 */
19248/***/ (function(module, exports, __webpack_require__) {
19249
19250"use strict";
19251
19252var __extends = (this && this.__extends) || (function () {
19253    var extendStatics = function (d, b) {
19254        extendStatics = Object.setPrototypeOf ||
19255            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19256            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19257        return extendStatics(d, b);
19258    }
19259    return function (d, b) {
19260        extendStatics(d, b);
19261        function __() { this.constructor = d; }
19262        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19263    };
19264})();
19265Object.defineProperty(exports, "__esModule", { value: true });
19266var pds_widget_1 = __webpack_require__(7);
19267var PdsAppNav = (function (_super) {
19268    __extends(PdsAppNav, _super);
19269    function PdsAppNav() {
19270        var _this = _super !== null && _super.apply(this, arguments) || this;
19271        _this.is = 'pds-app-nav';
19272        _this.navigation = [];
19273        _this.tertiaryMenuOpen = false;
19274        _this.navOpen = false;
19275        _this.userMenuOpen = false;
19276        _this.secondaryIndicator = true;
19277        _this.primaryNavLinkWithChildrenId = '';
19278        _this.secondaryPositionClass = 'pds-hidden';
19279        _this.properties = {
19280            dataAppName: {
19281                type: String,
19282                value: 'global|Unified Classroom'
19283            }
19284        };
19285        _this.secondaryOpen = 'closed';
19286        return _this;
19287    }
19288    PdsAppNav.prototype.created = function () {
19289        var _this = this;
19290        this.handleWindowResize = function () {
19291            var windowWidth = window.innerWidth;
19292            if (_this.prevWindowWidth > 768 && windowWidth <= 768) {
19293                _this.closeAllMenus(null);
19294            }
19295            else if (_this.prevWindowWidth <= 768 && windowWidth > 768) {
19296                _this.closeAllMenus(null);
19297            }
19298            _this.prevWindowWidth = windowWidth;
19299        };
19300    };
19301    PdsAppNav.prototype.attached = function () {
19302        var _this = this;
19303        _super.prototype.attached.call(this);
19304        if (this.tertiaryMenuOpen == null) {
19305            this.tertiaryMenuOpen = false;
19306        }
19307        setTimeout(function () {
19308            _this.setHighlights();
19309        });
19310        this.prevWindowWidth = window.innerWidth;
19311        window.addEventListener('resize', this.handleWindowResize);
19312    };
19313    PdsAppNav.prototype.detached = function () {
19314        window.removeEventListener('resize', this.handleWindowResize);
19315    };
19316    PdsAppNav.prototype.getSecondaryPositionClass = function (secondaryPositionClass) {
19317        return secondaryPositionClass;
19318    };
19319    PdsAppNav.prototype.setSecondaryNavPosition = function (selectedNavElm) {
19320        var _this = this;
19321        this.secondaryPositionClass = 'pds-is-invisible';
19322        this.setSecondaryOpenState('hard');
19323        setTimeout(function () {
19324            var secondaryNav = _this.querySelector('.pds-nav-secondary');
19325            var primaryNav = _this.querySelector('.pds-nav-primary');
19326            var primaryNavList = _this.querySelector('.pds-primary-nav-list');
19327            if (secondaryNav != null && primaryNav != null && primaryNavList != null) {
19328                var primaryNavItemHeight = selectedNavElm.clientHeight;
19329                var primaryNavStyles = getComputedStyle(primaryNav);
19330                var primaryNavWidth = 0;
19331                if (primaryNavStyles.width != null && primaryNavStyles.borderRightWidth != null) {
19332                    primaryNavWidth = parseFloat(primaryNavStyles.width);
19333                }
19334                var collisionExtraMargin = 10;
19335                var appHeadHeight = 0;
19336                if (_this.offsetTop != null) {
19337                    appHeadHeight = _this.offsetTop;
19338                }
19339                var selectedNavNumber = Math.ceil((selectedNavElm.getBoundingClientRect().top - primaryNav.getBoundingClientRect().top + primaryNavList.scrollTop) / primaryNavItemHeight);
19340                var centerOfNavClicked = (selectedNavNumber * primaryNavItemHeight) + (primaryNavItemHeight / 2) - primaryNavList.scrollTop;
19341                var secondaryNavHeight = secondaryNav.clientHeight;
19342                var availableHeight = window.innerHeight - appHeadHeight;
19343                if (window.innerWidth < 769) {
19344                    secondaryNav.style.top = appHeadHeight + 'px';
19345                    _this.secondaryPositionClass = null;
19346                    _this.pds.utils.focus('.pds-nav-category > a', _this);
19347                }
19348                else if (secondaryNavHeight > availableHeight - collisionExtraMargin) {
19349                    secondaryNav.style.left = primaryNavWidth + 'px';
19350                    secondaryNav.style.top = appHeadHeight + 'px';
19351                    secondaryNav.style.height = 'calc(100% - ' + appHeadHeight + 'px)';
19352                    _this.secondaryPositionClass = null;
19353                }
19354                else if ((secondaryNavHeight / 2) > centerOfNavClicked) {
19355                    secondaryNav.style.left = primaryNavWidth + 'px';
19356                    secondaryNav.style.top = appHeadHeight + 'px';
19357                    _this.secondaryPositionClass = null;
19358                }
19359                else if (centerOfNavClicked + (secondaryNavHeight / 2) > availableHeight) {
19360                    secondaryNav.style.left = primaryNavWidth + 'px';
19361                    _this.secondaryPositionClass = 'pds-secondary-bottom';
19362                }
19363                else {
19364                    secondaryNav.style.left = primaryNavWidth + 'px';
19365                    secondaryNav.style.top = (centerOfNavClicked - (secondaryNavHeight / 2) + appHeadHeight) + 'px';
19366                    _this.secondaryPositionClass = null;
19367                }
19368                var overlay = _this.querySelector('.pds-nav-overlay');
19369                if (overlay != null) {
19370                    overlay.style.width = 'calc(100vw - ' + primaryNavWidth + 'px)';
19371                }
19372            }
19373        });
19374    };
19375    PdsAppNav.prototype.primaryClickHandler = function (event) {
19376        event.preventDefault();
19377        this.tertiaryMenuOpen = false;
19378        var target = event.target;
19379        if (!this.pds.utils.is(event.target, 'a')) {
19380            target = this.pds.utils.getClosest(target, 'a');
19381        }
19382        if (target == null) {
19383            target = event.srcElement;
19384        }
19385        var nav = target.dataNav;
19386        if (this.selectedNav != null) {
19387            if (this.selectedNav.id === nav.id && this.secondaryOpen !== 'closed') {
19388                this.closeSecondary(event);
19389                return;
19390            }
19391        }
19392        this.selectedNav = nav;
19393        if (nav.children != null && nav.children.length > 0) {
19394            this.setSecondaryNavPosition(target);
19395        }
19396        else {
19397            this.closeNav();
19398            this.setSecondaryOpenState('closed');
19399            if (this.selectedNav.onUserClick != null) {
19400                this.activeNav = this.selectedNav;
19401                this.activeSecondaryNav = null;
19402                this.activeTertiaryNav = null;
19403                this.selectedNav.onUserClick(this.selectedNav, event);
19404            }
19405            else {
19406                throw 'NavItems that do not have children must have the onUserClick function';
19407            }
19408            this.selectedNav = null;
19409        }
19410    };
19411    PdsAppNav.prototype.secondaryClickHandler = function (event) {
19412        event.preventDefault();
19413        var target = event.target;
19414        if (!this.pds.utils.is(target, 'a')) {
19415            target = this.pds.utils.getClosest(target, 'a');
19416        }
19417        var nav = target.dataNav;
19418        var parent = target.dataParent;
19419        this.selectedSecondaryNav = nav;
19420        if (nav.children != null && nav.children.length > 0) {
19421            this.openTertiary();
19422        }
19423        else {
19424            if (this.selectedSecondaryNav.onUserClick != null) {
19425                this.activeNav = this.selectedNav;
19426                this.activeSecondaryNav = this.selectedSecondaryNav;
19427                this.activeTertiaryNav = null;
19428                this.selectedSecondaryNav.onUserClick(this.selectedSecondaryNav, event);
19429            }
19430            else {
19431                throw "NavItem " + nav.id + " did not have onUserClick function defined.";
19432            }
19433            this.selectedNav = null;
19434            this.setSecondaryOpenState('closed');
19435            this.closeNav();
19436        }
19437    };
19438    PdsAppNav.prototype.tertiaryClickHandler = function (event) {
19439        event.preventDefault();
19440        var target = event.target;
19441        if (!this.pds.utils.is(target, 'a')) {
19442            target = this.pds.utils.getClosest(target, 'a');
19443        }
19444        var parent = target.dataParent;
19445        var selectedTertiaryNav = target.dataNav;
19446        if (this.selectedNav !== null && this.selectedNav.id !== parent.id) {
19447            this.selectedSecondaryNav = parent;
19448        }
19449        if (selectedTertiaryNav.onUserClick != null) {
19450            this.activeNav = this.selectedNav;
19451            this.activeSecondaryNav = this.selectedSecondaryNav;
19452            this.activeTertiaryNav = selectedTertiaryNav;
19453            selectedTertiaryNav.onUserClick(selectedTertiaryNav, event);
19454        }
19455        else {
19456            throw "NavItem " + selectedTertiaryNav.id + " did not have onUserClick function defined.";
19457        }
19458        this.selectedNav = null;
19459        this.tertiaryMenuOpen = false;
19460        this.setSecondaryOpenState('closed');
19461        this.closeNav();
19462    };
19463    PdsAppNav.prototype.userMenuClickHandler = function (event) {
19464        event.preventDefault();
19465        var target = event.target;
19466        if (!this.pds.utils.is(target, 'a')) {
19467            target = this.pds.utils.getClosest(target, 'a');
19468        }
19469        var nav = target.dataNav;
19470        this.toggleUserMenu();
19471        this.closeNav();
19472        if (nav.onUserClick != null) {
19473            nav.onUserClick(nav, event);
19474        }
19475        else {
19476            throw "NavItem " + nav.id + " did not have onUserClick function defined.";
19477        }
19478    };
19479    PdsAppNav.prototype.closeSecondary = function (event) {
19480        if (event != null) {
19481            event.preventDefault();
19482        }
19483        this.setSecondaryOpenState('closed');
19484        if (this.selectedNav != null) {
19485            this.pds.utils.focus('#' + this.selectedNav.id, this);
19486        }
19487        this.selectedNav = null;
19488    };
19489    PdsAppNav.prototype.closeTertiary = function (event) {
19490        var _this = this;
19491        if (event != null) {
19492            event.preventDefault();
19493        }
19494        this.tertiaryMenuOpen = false;
19495        this.selectedSecondaryNav = null;
19496        setTimeout(function () {
19497            _this.pds.utils.focus('.pds-nav-category > a', _this);
19498        });
19499    };
19500    PdsAppNav.prototype.closeAllMenus = function (event) {
19501        if (event != null) {
19502            event.preventDefault();
19503        }
19504        if (this.tertiaryMenuOpen) {
19505            this.closeTertiary(event);
19506        }
19507        if (this.secondaryOpen !== 'closed') {
19508            this.closeSecondary(event);
19509        }
19510        if (this.navOpen) {
19511            this.closeNav();
19512        }
19513    };
19514    PdsAppNav.prototype.toggleNav = function (event) {
19515        event.preventDefault();
19516        this.navOpen = !this.navOpen;
19517    };
19518    PdsAppNav.prototype.closeNav = function () {
19519        this.navOpen = false;
19520    };
19521    PdsAppNav.prototype.toggleUserMenu = function (event) {
19522        if (event != null) {
19523            event.preventDefault();
19524        }
19525        if (this.userNavigation.length > 0) {
19526            this.userMenuOpen = !this.userMenuOpen;
19527        }
19528    };
19529    PdsAppNav.prototype.hasSecondaryItem = function (currentNav) {
19530        if (currentNav.children != null && currentNav.children.length > 0 && this.secondaryIndicator) {
19531            return 'pds-has-secondary-item';
19532        }
19533    };
19534    PdsAppNav.prototype.isUsernameShort = function () {
19535        return (this.user.firstName.length + this.user.lastName.length <= 15) ? true : false;
19536    };
19537    PdsAppNav.prototype.getFirstName = function () {
19538        return (this.user.firstName.length > 15) ? (this.user.firstName.slice(0, 15) + '...') : this.user.firstName;
19539    };
19540    PdsAppNav.prototype.getLastName = function () {
19541        return (this.user.lastName.length > 15) ? (this.user.lastName.slice(0, 15) + '...') : this.user.lastName;
19542    };
19543    PdsAppNav.prototype.getUserInitialsForDisplay = function () {
19544        var userInitials = '';
19545        userInitials = this.user.firstName.substring(0, 1) + this.user.lastName.substring(0, 1);
19546        return userInitials;
19547    };
19548    PdsAppNav.prototype.hasChildren = function (item) {
19549        return item.children != null && item.children.length > 0;
19550    };
19551    PdsAppNav.prototype.hasUserProfilePicture = function () {
19552        return this.user != null && this.user.profilePicture != null;
19553    };
19554    PdsAppNav.prototype.clearCurrentState = function () {
19555        this.activeNav = null;
19556        this.activeSecondaryNav = null;
19557        this.activeTertiaryNav = null;
19558        this.selectedNav = null;
19559    };
19560    PdsAppNav.prototype.setSecondaryOpenState = function (secondaryOpen) {
19561        this.secondaryOpen = secondaryOpen;
19562    };
19563    PdsAppNav.prototype.openTertiary = function () {
19564        var _this = this;
19565        if (this.selectedSecondaryNav != null) {
19566            this.tertiaryMenuOpen = true;
19567            setTimeout(function () {
19568                _this.pds.utils.focus('.pds-nav-category > a', _this);
19569            });
19570        }
19571        else {
19572            throw 'A secondary nav must be selected to open tertiary menu';
19573        }
19574    };
19575    PdsAppNav.prototype.setHighlights = function (secondaryState) {
19576        var _this = this;
19577        if (secondaryState === void 0) { secondaryState = 'closed'; }
19578        this.activeNav = null;
19579        this.activeSecondaryNav = null;
19580        this.activeTertiaryNav = null;
19581        if (this.navigation != null) {
19582            this.navigation.find(function (navItem) {
19583                if (navItem.children != null && navItem.children.length > 0) {
19584                    return null != navItem.children.find(function (childItem) {
19585                        if (childItem.children != null && childItem.children.length > 0) {
19586                            childItem.children.find(function (grandchildItem) {
19587                                if (grandchildItem.isCurrentRoute != null && grandchildItem.isCurrentRoute(grandchildItem)) {
19588                                    _this.activeTertiaryNav = grandchildItem;
19589                                    _this.activeSecondaryNav = childItem;
19590                                    _this.activeNav = navItem;
19591                                    _this.setSecondaryOpenState(secondaryState);
19592                                    return true;
19593                                }
19594                                return false;
19595                            });
19596                        }
19597                        else {
19598                            if (childItem.isCurrentRoute != null && childItem.isCurrentRoute(childItem)) {
19599                                _this.activeSecondaryNav = childItem;
19600                                _this.activeNav = navItem;
19601                                _this.setSecondaryOpenState(secondaryState);
19602                                return true;
19603                            }
19604                            return false;
19605                        }
19606                        return false;
19607                    });
19608                }
19609                if (navItem.isCurrentRoute != null && navItem.isCurrentRoute(navItem)) {
19610                    _this.activeNav = navItem;
19611                    return true;
19612                }
19613                return false;
19614            });
19615        }
19616    };
19617    return PdsAppNav;
19618}(pds_widget_1.PdsWidget));
19619exports.PdsAppNav = PdsAppNav;
19620
19621
19622
19623/***/ }),
19624/* 141 */
19625/***/ (function(module, exports, __webpack_require__) {
19626
19627"use strict";
19628
19629var __extends = (this && this.__extends) || (function () {
19630    var extendStatics = function (d, b) {
19631        extendStatics = Object.setPrototypeOf ||
19632            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19633            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19634        return extendStatics(d, b);
19635    }
19636    return function (d, b) {
19637        extendStatics(d, b);
19638        function __() { this.constructor = d; }
19639        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19640    };
19641})();
19642Object.defineProperty(exports, "__esModule", { value: true });
19643var pds_widget_1 = __webpack_require__(7);
19644var pds_utils_1 = __webpack_require__(18);
19645var PdsClassBlock = (function (_super) {
19646    __extends(PdsClassBlock, _super);
19647    function PdsClassBlock() {
19648        var _this = _super !== null && _super.apply(this, arguments) || this;
19649        _this.is = 'pds-class-block';
19650        _this.showLinks = false;
19651        return _this;
19652    }
19653    PdsClassBlock.prototype.attached = function () {
19654        var _this = this;
19655        _super.prototype.attached.call(this);
19656        var classPickerElement = document.querySelector('pds-class-picker');
19657        if (classPickerElement != null) {
19658            classPickerElement.addEventListener('pdsCloseOptions', function (event) {
19659                if (_this !== event.srcElement) {
19660                    _this.showLinks = false;
19661                }
19662            });
19663            classPickerElement.addEventListener('click', function (event) {
19664                _this.showLinks = false;
19665            });
19666        }
19667    };
19668    PdsClassBlock.prototype.classChange = function (event) {
19669        event.preventDefault();
19670        event.stopPropagation();
19671        var target = event.target;
19672        if (!this.pds.utils.is(target, 'a')) {
19673            target = this.pds.utils.getClosest(target, 'a');
19674        }
19675        var newClass = target.dataSection;
19676        this.fire('pdsClassChange', newClass);
19677    };
19678    PdsClassBlock.prototype.clickOptions = function (event) {
19679        event.preventDefault();
19680        event.stopPropagation();
19681        this.showLinks = !this.showLinks;
19682        if (this.showLinks) {
19683            this.fire('pdsCloseOptions', null);
19684            this.showLinks = true;
19685        }
19686    };
19687    PdsClassBlock.prototype.clickOptionsLink = function (event) {
19688        event.preventDefault();
19689        event.stopPropagation();
19690        var target = event.target;
19691        if (!this.pds.utils.is(event.target, 'a')) {
19692            target = this.pds.utils.getClosest(target, 'a');
19693        }
19694        var link = target.dataLink;
19695        var newClass = target.dataSection;
19696        link.section = newClass;
19697        if (link.linkClicked != null) {
19698            link.linkClicked(link, event);
19699        }
19700        else {
19701            throw 'No onUserClick function found';
19702        }
19703        this.fire('pdsCloseClassPicker', null);
19704        this.showLinks = false;
19705    };
19706    PdsClassBlock.prototype.getAttendanceStatusIconName = function (status) {
19707        if (status == null) {
19708            return '';
19709        }
19710        switch (status.toUpperCase()) {
19711            case 'NA':
19712                return 'attendance-f';
19713            case 'GREEN':
19714                return 'checkmark-circle-f';
19715            case 'YELLOW':
19716                return 'attendance-f';
19717            case 'RED':
19718                return 'attendance-f';
19719            default:
19720                return '';
19721        }
19722    };
19723    PdsClassBlock.prototype.getSectionColorClass = function (sectionOrGroup) {
19724        return pds_utils_1.pdsUtils.getSectionColorForClass(sectionOrGroup);
19725    };
19726    PdsClassBlock.prototype.getLinkId = function (sectionOrGroup) {
19727        if (sectionOrGroup == null) {
19728            return 'no-section-error';
19729        }
19730        if (sectionOrGroup.uid != null) {
19731            return sectionOrGroup.uid;
19732        }
19733        else if (sectionOrGroup.groupName != null) {
19734            return sectionOrGroup.groupName.replace(/\s+/g, '-');
19735        }
19736        else {
19737            throw 'ClassPickerClass needs to either have a group name or a uid.';
19738        }
19739    };
19740    PdsClassBlock.prototype.getSchoolAbbreviation = function (section) {
19741        var schoolAbbreviation = '';
19742        if (section.schoolAbbreviation) {
19743            schoolAbbreviation = section.schoolAbbreviation.length <= 8 ? section.schoolAbbreviation : section.schoolAbbreviation.slice(0, 8);
19744        }
19745        else {
19746            schoolAbbreviation = section.schoolName.length <= 8 ? section.schoolName : section.schoolName.slice(0, 8);
19747        }
19748        return schoolAbbreviation;
19749    };
19750    return PdsClassBlock;
19751}(pds_widget_1.PdsWidget));
19752exports.PdsClassBlock = PdsClassBlock;
19753
19754
19755
19756/***/ }),
19757/* 142 */
19758/***/ (function(module, exports, __webpack_require__) {
19759
19760"use strict";
19761
19762var __extends = (this && this.__extends) || (function () {
19763    var extendStatics = function (d, b) {
19764        extendStatics = Object.setPrototypeOf ||
19765            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19766            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19767        return extendStatics(d, b);
19768    }
19769    return function (d, b) {
19770        extendStatics(d, b);
19771        function __() { this.constructor = d; }
19772        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19773    };
19774})();
19775Object.defineProperty(exports, "__esModule", { value: true });
19776var pds_i18n_1 = __webpack_require__(15);
19777var pds_utils_1 = __webpack_require__(18);
19778var pds_widget_1 = __webpack_require__(7);
19779var periodDayRegex = /^$|^PeriodAndDay$|^CustomPeriodDay$/;
19780var escKey = 27;
19781var tabKey = 9;
19782var PdsClassPicker = (function (_super) {
19783    __extends(PdsClassPicker, _super);
19784    function PdsClassPicker() {
19785        var _this = _super !== null && _super.apply(this, arguments) || this;
19786        _this.is = 'pds-class-picker';
19787        _this.properties = {
19788            isClassOnly: {
19789                type: Boolean,
19790                value: false
19791            },
19792            selectedStudent: {
19793                type: String,
19794                value: null
19795            },
19796            classSchedule: {
19797                type: String,
19798                observer: 'resetFocusOnClassSelector'
19799            },
19800            showGroups: {
19801                type: Boolean,
19802                observer: 'resetFocusOnClassSelector'
19803            }
19804        };
19805        return _this;
19806    }
19807    PdsClassPicker.prototype.ready = function () {
19808        _super.prototype.ready.call(this);
19809        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
19810        this.showClasses = true;
19811        this.possibleSchedulingTerms = [];
19812        this.possibleYears = [];
19813        this.studentMap = new Map();
19814        this.addEventListener('pdsClassChange', this.classChangeEvent);
19815        this.noClassesBlock = {
19816            groupName: 'Continue With Student',
19817            groupType: 'None',
19818            sectionUids: []
19819        };
19820        if (this.hasMultipleSchools === undefined) {
19821            this.hasMultipleSchools = false;
19822        }
19823    };
19824    PdsClassPicker.prototype.toggleClassSelector = function (event) {
19825        event.preventDefault();
19826        this.showClassSelector = !this.showClassSelector;
19827        if (this.showClassSelector) {
19828            this.pds.utils.markFocusableElement(this.querySelector('#class-selector-trigger-button'));
19829            this.backupData();
19830            this.fire('pdsClassPickerOpen', true);
19831            this.initialVisit = true;
19832            this.resetFocusOnClassSelector();
19833        }
19834        else {
19835            this.restoreData();
19836            var lastMarkedElement = this.pds.utils.getLastMarkedElement();
19837            if (lastMarkedElement != null) {
19838                lastMarkedElement.focus();
19839            }
19840            this.fire('pdsClassPickerClosed', {
19841                prevSelectedStudent: this.initiallySelectedData.selectedStudent,
19842                prevSelectedYear: this.initiallySelectedData.selectedYear,
19843                prevSelectedSchedulingTerm: this.initiallySelectedData.selectedSchedulingTerm
19844            });
19845            this.removeClassSelectorFocusProperties();
19846        }
19847    };
19848    PdsClassPicker.prototype.resetFocusOnClassSelector = function () {
19849        var _this = this;
19850        setTimeout(function () {
19851            if (_this.initialVisit) {
19852                _this.classSelector = _this.querySelector('.pds-class-selector');
19853                _this.firstElement = _this.querySelector('#class-selector-student-select');
19854                if (_this.firstElement == null) {
19855                    _this.firstElement = _this.querySelector('#class-selector-year-select');
19856                }
19857                if (_this.firstElement != null) {
19858                    _this.firstElement.focus();
19859                }
19860                _this.handleKeyBoardNavigationAndEscape();
19861                _this.initialVisit = false;
19862            }
19863            _this.lastElement = _this.getLastElementInClassPicker();
19864        });
19865    };
19866    PdsClassPicker.prototype.getLastElementInClassPicker = function () {
19867        var myListOfClassBlocks = this.querySelectorAll('.class-block-wrapper');
19868        var myListOfDisplayedClassBlocks = new Array();
19869        Array.prototype.forEach.call(myListOfClassBlocks, function (eachClassBlock) {
19870            if (eachClassBlock.style.display !== 'none') {
19871                myListOfDisplayedClassBlocks.push(eachClassBlock);
19872            }
19873        });
19874        if (myListOfDisplayedClassBlocks.length > 0) {
19875            var myClassBlockWrapper = myListOfDisplayedClassBlocks.pop();
19876            if (myClassBlockWrapper != null) {
19877                var myListOfClassBlocks_1 = myClassBlockWrapper.querySelectorAll('pds-class-block');
19878                var myLastClassBlock = myListOfClassBlocks_1[myListOfClassBlocks_1.length - 1];
19879                if (myLastClassBlock != null) {
19880                    var myAttendenceIcon = myLastClassBlock.querySelector('.pds-attendance-link');
19881                    var myOptionsIcon = myLastClassBlock.querySelector('.class-block-options');
19882                    if (myAttendenceIcon == null && myOptionsIcon == null) {
19883                        return myLastClassBlock.querySelector('a');
19884                    }
19885                    else {
19886                        return (myAttendenceIcon == null ? myOptionsIcon : myAttendenceIcon);
19887                    }
19888                }
19889            }
19890        }
19891        return this.querySelector('.pds-message-info');
19892    };
19893    PdsClassPicker.prototype.handleKeyBoardNavigationAndEscape = function () {
19894        var _this = this;
19895        if (this.classSelector != null) {
19896            this.kebyoardNavigationAndEscapeListener = function (event) {
19897                if (event.keyCode === escKey) {
19898                    _this.handleClassSelectorClose(event);
19899                }
19900                if (event.keyCode === tabKey) {
19901                    if (!event.shiftKey && (event.target === _this.lastElement)) {
19902                        _this.firstElement.focus();
19903                        event.preventDefault();
19904                    }
19905                    else if (event.shiftKey && (event.target === _this.firstElement)) {
19906                        _this.lastElement.focus();
19907                        event.preventDefault();
19908                    }
19909                }
19910            };
19911            this.classSelector.addEventListener('keydown', this.kebyoardNavigationAndEscapeListener);
19912        }
19913    };
19914    PdsClassPicker.prototype.handleClassSelectorClose = function (event) {
19915        event.stopImmediatePropagation();
19916        this.showClassSelector = !this.showClassSelector;
19917        this.restoreData();
19918        this.pds.utils.getLastMarkedElement().focus();
19919        this.fire('pdsClassPickerClosed', {
19920            prevSelectedStudent: this.initiallySelectedData.selectedStudent,
19921            prevSelectedYear: this.initiallySelectedData.selectedYear,
19922            prevSelectedSchedulingTerm: this.initiallySelectedData.selectedSchedulingTerm
19923        });
19924        this.removeClassSelectorFocusProperties();
19925    };
19926    PdsClassPicker.prototype.removeClassSelectorFocusProperties = function () {
19927        this.classSelector.removeEventListener('keydown', this.kebyoardNavigationAndEscapeListener);
19928        delete this.initialVisit;
19929        delete this.classSelector;
19930        delete this.firstElement;
19931        delete this.lastElement;
19932    };
19933    PdsClassPicker.prototype.backupData = function () {
19934        this.initiallySelectedData = {
19935            selectedStudent: this.selectedStudent,
19936            selectedYear: this.selectedYear,
19937            selectedSchedulingTerm: this.selectedSchedulingTerm,
19938            showClasses: this.showClasses,
19939            showGroups: this.showGroups
19940        };
19941    };
19942    PdsClassPicker.prototype.restoreData = function () {
19943        this.selectedStudent = this.initiallySelectedData.selectedStudent;
19944        this.selectedYear = this.initiallySelectedData.selectedYear;
19945        this.selectedSchedulingTerm = this.initiallySelectedData.selectedSchedulingTerm;
19946        this.showClasses = this.initiallySelectedData.showClasses;
19947        this.showGroups = this.initiallySelectedData.showGroups;
19948    };
19949    PdsClassPicker.prototype.selectClasses = function (event) {
19950        event.preventDefault();
19951        this.showClasses = true;
19952        this.showGroups = false;
19953    };
19954    PdsClassPicker.prototype.selectGroups = function (event) {
19955        event.preventDefault();
19956        this.showClasses = false;
19957        this.showGroups = true;
19958    };
19959    PdsClassPicker.prototype.selectedClassDisplay = function (selectedClass) {
19960        if (selectedClass == null || selectedClass === this.noClassesBlock) {
19961            return 'No Class Selected';
19962        }
19963        var classAsGroup = selectedClass;
19964        var classAsSection = selectedClass;
19965        if (classAsSection.schedulingTerm != null) {
19966            if (classAsSection.primaryDisplay != null) {
19967                return "" + (classAsSection.secondaryDisplay != null ? classAsSection.secondaryDisplay + ' ' : '') + classAsSection.primaryDisplay;
19968            }
19969            else {
19970                return "" + (classAsSection.periodDay != null ? classAsSection.periodDay + ' ' : '') + classAsSection.courseName;
19971            }
19972        }
19973        else {
19974            if (classAsGroup.sectionUids != null) {
19975                return pds_i18n_1.pdsI18n.getText('pds|class picker|xx - xx Classes', {
19976                    arg0: classAsGroup.groupName,
19977                    arg1: classAsGroup.sectionUids.length
19978                });
19979            }
19980            else {
19981                return "" + classAsGroup.groupName;
19982            }
19983        }
19984    };
19985    PdsClassPicker.prototype.classChangeEvent = function (event) {
19986        var newClass = event.detail;
19987        this.selectedClass = newClass;
19988        this.showClassSelector = false;
19989    };
19990    PdsClassPicker.prototype.yearChangeEvent = function (event) {
19991        this.fire('pdsYearChange', this.selectedYear);
19992    };
19993    PdsClassPicker.prototype.schedulingTermChangeEvent = function (event) {
19994        this.fire('pdsSchedulingTermChange', this.selectedSchedulingTerm);
19995    };
19996    PdsClassPicker.prototype.studentChangeEvent = function (event) {
19997        this.fire('pdsStudentChange', this.selectedStudent);
19998    };
19999    PdsClassPicker.prototype.classScheduleEmptyCheck = function (classSchedule) {
20000        return classSchedule == null || classSchedule.sections == null || classSchedule.sections.length === 0;
20001    };
20002    PdsClassPicker.prototype.classGroupingCheck = function (classGrouping) {
20003        return classGrouping != null && classGrouping.length > 0;
20004    };
20005    PdsClassPicker.prototype.getPossibleYears = function (years) {
20006        this.possibleYears.length = 0;
20007        for (var _i = 0, years_1 = years; _i < years_1.length; _i++) {
20008            var year = years_1[_i];
20009            this.possibleYears.push({
20010                text: year,
20011                value: year
20012            });
20013        }
20014        return this.possibleYears;
20015    };
20016    PdsClassPicker.prototype.getPossibleSchedulingTerms = function (schedulingTerms, hasMultipleSchools) {
20017        var newPossibleSchedulingTerms = new Array();
20018        for (var _i = 0, schedulingTerms_1 = schedulingTerms; _i < schedulingTerms_1.length; _i++) {
20019            var term = schedulingTerms_1[_i];
20020            var schoolAbbreviation = '';
20021            if (hasMultipleSchools && term.schoolAbbreviation) {
20022                schoolAbbreviation = term.schoolAbbreviation.length <= 8 ? term.schoolAbbreviation : term.schoolAbbreviation.slice(0, 8);
20023                newPossibleSchedulingTerms.push({
20024                    text: term.name + ' (' + schoolAbbreviation + ')',
20025                    value: term.name + ',' + term.schoolAbbreviation
20026                });
20027            }
20028            else {
20029                newPossibleSchedulingTerms.push({
20030                    text: term.name,
20031                    value: term.name + ',' + term.schoolAbbreviation
20032                });
20033            }
20034        }
20035        this.possibleSchedulingTerms = newPossibleSchedulingTerms;
20036        return this.possibleSchedulingTerms;
20037    };
20038    PdsClassPicker.prototype.getStudentOptions = function (studentOptions) {
20039        var options = [];
20040        var optionsWithSections = [];
20041        var optionsWithoutSections = [];
20042        this.updateStudentMap();
20043        for (var _i = 0, studentOptions_1 = studentOptions; _i < studentOptions_1.length; _i++) {
20044            var student = studentOptions_1[_i];
20045            if (student.sectionUids && student.sectionUids.length > 0) {
20046                optionsWithSections.push({
20047                    value: student.uid,
20048                    text: student.firstName + " " + student.lastName
20049                });
20050            }
20051            else {
20052                optionsWithoutSections.push({
20053                    value: student.uid,
20054                    text: student.firstName + " " + student.lastName
20055                });
20056            }
20057        }
20058        options = optionsWithSections.concat(optionsWithoutSections);
20059        if (this.selectedStudent == null || this.selectedStudent.length === 0) {
20060            this.selectedStudent = options[0].value;
20061        }
20062        return options;
20063    };
20064    PdsClassPicker.prototype.getSectionColorClass = function (sectionOrGroup) {
20065        return pds_utils_1.pdsUtils.getSectionColorForClass(sectionOrGroup);
20066    };
20067    PdsClassPicker.prototype.hasAllSectionsGroup = function (classSchedule, isClassOnly) {
20068        if (classSchedule) {
20069            return isClassOnly && classSchedule.allClasses != null;
20070        }
20071        else {
20072            return false;
20073        }
20074    };
20075    PdsClassPicker.prototype.getInfoMessage = function (selectedStudent) {
20076        if (this.studentOptions != null && this.studentOptions.length > 0) {
20077            var student = this.studentMap.get(selectedStudent);
20078            return (student != null ? student.firstName : 'The selected student ') + " has no classes scheduled during the current term.";
20079        }
20080        else {
20081            return 'There are no classes in your schedule during the selected year.';
20082        }
20083    };
20084    PdsClassPicker.prototype.getSecondaryTextForClassBlock = function (section) {
20085        if (section === this.noClassesBlock) {
20086            return 'No Scheduled Classes';
20087        }
20088        var sectionAsClass = section;
20089        if (sectionAsClass.secondaryDisplay != null && sectionAsClass.classDisplayPreference != null) {
20090            var prefix = periodDayRegex.test(sectionAsClass.classDisplayPreference) ? 'Period ' : '';
20091            return prefix + sectionAsClass.secondaryDisplay;
20092        }
20093        return sectionAsClass.periodDay != null ? 'Period ' + sectionAsClass.periodDay : '';
20094    };
20095    PdsClassPicker.prototype.getPrimaryTextForClassBlock = function (section) {
20096        var sectionAsClass = section;
20097        if (sectionAsClass.primaryDisplay != null) {
20098            return sectionAsClass.primaryDisplay;
20099        }
20100        return sectionAsClass.courseName;
20101    };
20102    PdsClassPicker.prototype.getPrimarySubTextForClassBlock = function (section) {
20103        var sectionAsClass = section;
20104        if (sectionAsClass != null && sectionAsClass.teachers != null && sectionAsClass.teachers.length > 0) {
20105            var leadTeacher = sectionAsClass.teachers.find(function (value) { return value.isLeadTeacher === true; });
20106            if (leadTeacher != null) {
20107                return leadTeacher.firstName + ' ' + leadTeacher.lastName;
20108            }
20109        }
20110    };
20111    PdsClassPicker.prototype.getSelectedStudentName = function (uid) {
20112        this.updateStudentMap();
20113        if (this.studentMap.has(uid)) {
20114            var student = this.studentMap.get(uid);
20115            return student.firstName + " " + student.lastName;
20116        }
20117        return '';
20118    };
20119    PdsClassPicker.prototype.currentStudentHasPhoto = function (uid) {
20120        this.updateStudentMap();
20121        if (this.studentMap.has(uid)) {
20122            var student = this.studentMap.get(uid);
20123            return student.hasPhoto;
20124        }
20125        return false;
20126    };
20127    PdsClassPicker.prototype.updateStudentMap = function () {
20128        var _this = this;
20129        this.studentMap.clear();
20130        if (this.studentOptions != null && this.studentOptions.length > 0) {
20131            this.studentOptions.forEach(function (student) {
20132                _this.studentMap.set(student.uid, student);
20133            });
20134        }
20135    };
20136    return PdsClassPicker;
20137}(pds_widget_1.PdsWidget));
20138exports.PdsClassPicker = PdsClassPicker;
20139
20140
20141
20142/***/ }),
20143/* 143 */
20144/***/ (function(module, exports, __webpack_require__) {
20145
20146"use strict";
20147
20148Object.defineProperty(exports, "__esModule", { value: true });
20149var PdsDynamicSelect = (function () {
20150    function PdsDynamicSelect() {
20151        this.is = 'pds-dynamic-select';
20152        this.extends = 'select';
20153        this.properties = {
20154            dynamicOptions: {
20155                observer: 'optionsUpdated'
20156            },
20157            defaultValue: {},
20158            scopeClass: String
20159        };
20160        this.dynamicOptions = [];
20161        this.defaultUsed = false;
20162    }
20163    PdsDynamicSelect.prototype.optionsUpdated = function () {
20164        var testValue;
20165        if (this.defaultUsed) {
20166            testValue = this.value;
20167        }
20168        else {
20169            testValue = this.defaultValue;
20170            this.defaultUsed = true;
20171        }
20172        if (testValue == null) {
20173            testValue = this.value;
20174        }
20175        this.innerHTML = '';
20176        if (!(this.dynamicOptions instanceof Array)) {
20177            return;
20178        }
20179        this.addOptionsToContainer(this, this.dynamicOptions, testValue);
20180    };
20181    PdsDynamicSelect.prototype.addOptionsToContainer = function (container, selectOptions, testValue, selectedOptionFound) {
20182        if (selectedOptionFound === void 0) { selectedOptionFound = false; }
20183        for (var i = 0; i < selectOptions.length; i++) {
20184            var option = selectOptions[i];
20185            var optionEle = void 0;
20186            if (Array.isArray(option.value)) {
20187                optionEle = document.createElement('optgroup');
20188                optionEle.label = option.text;
20189                selectedOptionFound = this.addOptionsToContainer(optionEle, option.value, testValue, selectedOptionFound);
20190            }
20191            else {
20192                optionEle = document.createElement('option');
20193                optionEle.value = option.value;
20194                optionEle.innerText = option.text;
20195                if (option.disabled === true) {
20196                    optionEle.setAttribute('disabled', '');
20197                }
20198            }
20199            if (this.scopeClass != null) {
20200                optionEle.classList.add(this.scopeClass);
20201            }
20202            if (!selectedOptionFound && option.value === testValue) {
20203                optionEle.setAttribute('selected', '');
20204                selectedOptionFound = true;
20205            }
20206            container.appendChild(optionEle);
20207        }
20208        return selectedOptionFound;
20209    };
20210    return PdsDynamicSelect;
20211}());
20212exports.PdsDynamicSelect = PdsDynamicSelect;
20213
20214
20215
20216/***/ }),
20217/* 144 */
20218/***/ (function(module, exports, __webpack_require__) {
20219
20220"use strict";
20221
20222var __extends = (this && this.__extends) || (function () {
20223    var extendStatics = function (d, b) {
20224        extendStatics = Object.setPrototypeOf ||
20225            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20226            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20227        return extendStatics(d, b);
20228    }
20229    return function (d, b) {
20230        extendStatics(d, b);
20231        function __() { this.constructor = d; }
20232        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20233    };
20234})();
20235Object.defineProperty(exports, "__esModule", { value: true });
20236var pds_abstract_input_widget_1 = __webpack_require__(31);
20237var pds_validation_rules_engine_1 = __webpack_require__(26);
20238var pds_logger_1 = __webpack_require__(41);
20239var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('input-widgets'), 'pds-select-widget.ts');
20240var PdsSelectWidget = (function (_super) {
20241    __extends(PdsSelectWidget, _super);
20242    function PdsSelectWidget() {
20243        var _this = _super !== null && _super.apply(this, arguments) || this;
20244        _this.is = 'pds-select-widget';
20245        _this.properties = {
20246            name: String,
20247            dataLabelText: String,
20248            dataShowLabel: {
20249                type: String,
20250                value: null
20251            },
20252            dataBadgeText: {
20253                type: String,
20254                value: '',
20255                observer: 'setUpBadge'
20256            },
20257            dataHelperText: {
20258                type: String,
20259                value: null
20260            },
20261            dataTooltipText: String,
20262            dataUseAlternateColorScheme: {
20263                type: String,
20264                value: 'false'
20265            },
20266            dataIsreadonly: {
20267                type: String,
20268                value: 'false',
20269                observer: 'setReadonlyText'
20270            },
20271            dataIsfieldonly: {
20272                type: String,
20273                value: 'false'
20274            },
20275            dataHideUnelevatedBadge: {
20276                type: String,
20277                value: 'false',
20278                observer: 'setUpBadge'
20279            },
20280            dataDisableInvalidBadgeElevation: {
20281                type: String,
20282                value: 'false',
20283                observer: 'setUpBadge'
20284            },
20285            dataIsrequired: {
20286                type: String,
20287                value: 'false',
20288                observer: 'setUpBadge'
20289            },
20290            dataUseValidIndicator: {
20291                type: String,
20292                value: 'false'
20293            },
20294            dataCustomvalidate: String,
20295            disabled: {
20296                type: String,
20297                value: 'false'
20298            },
20299            options: {
20300                type: Array,
20301                observer: 'validateOptionsDeferred'
20302            }
20303        };
20304        _this.isGrouped = false;
20305        return _this;
20306    }
20307    PdsSelectWidget.prototype.generateValidationRules = function () {
20308        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
20309        validationRules.isText = true;
20310        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
20311        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
20312        if ('dataCustomvalidate' in this) {
20313            this.validators.push({
20314                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
20315                condition: {
20316                    element: this
20317                }
20318            });
20319        }
20320    };
20321    PdsSelectWidget.prototype.inputSelector = function () {
20322        return this.querySelector('select');
20323    };
20324    PdsSelectWidget.prototype.redrawOptions = function () {
20325        log("Redrawing the options for " + this.name + ".");
20326        this.redraw('options');
20327        this.setValue(this.modelValue, true);
20328    };
20329    PdsSelectWidget.prototype.setModelValue = function (modelValue, skip) {
20330        if (skip === void 0) { skip = false; }
20331        var select = this.inputSelector();
20332        if (select != null && modelValue !== select.modelValue) {
20333            select.modelValue = modelValue;
20334            log("Setting " + this.name + "'s model value from '" + select.modelValue + "' to '" + modelValue + "'.");
20335            if (skip !== true) {
20336                this.setValue(modelValue, true);
20337            }
20338            return true;
20339        }
20340        return false;
20341    };
20342    PdsSelectWidget.prototype.setReadonlyText = function () {
20343        var _this = this;
20344        var readOnlyEle = this.querySelector('.pds-readonly-data');
20345        if (readOnlyEle && this.dataIsreadonly != null && this.options) {
20346            if (this.dataIsreadonly !== 'true') {
20347                readOnlyEle.innerText = '';
20348                return;
20349            }
20350            var selectedOption = void 0;
20351            if (this.isGrouped) {
20352                var groupedOptions = this.options;
20353                selectedOption = groupedOptions.reduce(function (foundOption, optionGroup) {
20354                    return foundOption || optionGroup.value.find(function (o) { return o.value === _this.value; });
20355                }, undefined);
20356            }
20357            else {
20358                var flatOptions = this.options;
20359                selectedOption = flatOptions.find(function (o) { return o.value === _this.value; });
20360            }
20361            if (selectedOption) {
20362                readOnlyEle.innerText = selectedOption.text;
20363                log("Setting " + this.name + "'s readonly only text to '" + selectedOption.text + "' from the value '" + this.value + "'.");
20364            }
20365            else {
20366                log("No option in " + this.name + " was found corresponding to the value '" + this.value + "' when setting read only text.");
20367                readOnlyEle.innerText = '';
20368            }
20369        }
20370    };
20371    PdsSelectWidget.prototype.setValue = function (value, skip) {
20372        if (skip === void 0) { skip = false; }
20373        var modelValue = value;
20374        if (value == null) {
20375            value = '';
20376        }
20377        var select = this.inputSelector();
20378        if (select != null && value !== select.value) {
20379            var oldValue = select.value;
20380            select.value = value;
20381            log("Setting " + this.name + "'s value from '" + oldValue + "' to '" + select.value + "'.");
20382        }
20383        if (skip !== true) {
20384            this.setModelValue(modelValue, true);
20385        }
20386    };
20387    PdsSelectWidget.prototype.validateOptionsDeferred = function (oldValue, newValue) {
20388        var _this = this;
20389        if (oldValue == null && newValue == null) {
20390            return;
20391        }
20392        this.isGrouped = this.options != null && this.options.length > 0 && Array.isArray(this.options[0].value);
20393        setTimeout(function () {
20394            _this.validateOptions();
20395        });
20396    };
20397    PdsSelectWidget.prototype.validateOptions = function () {
20398        this.setReadonlyText();
20399        var duplicateText = this.getDuplicateProperties(this.options, 'text');
20400        var duplicateValues = this.getDuplicateProperties(this.options, 'value');
20401        if (!this.disableWarningMessageDuplicateOption && duplicateText && duplicateText.length) {
20402            var displayText = duplicateText
20403                .map(function (value) { return "'" + value + "'"; })
20404                .join(', ');
20405            console.warn("Duplicate option text (" + displayText + ") was found in " + this.name + "'s option list.");
20406        }
20407        if (!this.disableWarningMessageDuplicateOption && duplicateValues && duplicateValues.length) {
20408            var displayValues = duplicateValues
20409                .map(function (text) { return "'" + text + "'"; })
20410                .join(', ');
20411            console.warn("Duplicate option values (" + displayValues + ") were found in " + this.name + "'s option list.");
20412        }
20413        return {
20414            duplicateText: duplicateText,
20415            duplicateValues: duplicateValues
20416        };
20417    };
20418    PdsSelectWidget.prototype.getDuplicateProperties = function (items, property) {
20419        if (!(items instanceof Array)) {
20420            return [];
20421        }
20422        var item = items[0], otherItems = items.slice(1);
20423        if (otherItems.length === 0) {
20424            return [];
20425        }
20426        var nonMatches = otherItems.filter(function (otherItem) { return otherItem[property] !== item[property]; });
20427        var thisDuplicate = nonMatches.length !== otherItems.length ? [item[property]] : [];
20428        var duplicateProperties = this.getDuplicateProperties(nonMatches, property);
20429        return thisDuplicate.concat(duplicateProperties);
20430    };
20431    return PdsSelectWidget;
20432}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
20433exports.PdsSelectWidget = PdsSelectWidget;
20434
20435
20436
20437/***/ }),
20438/* 145 */
20439/***/ (function(module, exports, __webpack_require__) {
20440
20441"use strict";
20442
20443var __extends = (this && this.__extends) || (function () {
20444    var extendStatics = function (d, b) {
20445        extendStatics = Object.setPrototypeOf ||
20446            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20447            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20448        return extendStatics(d, b);
20449    }
20450    return function (d, b) {
20451        extendStatics(d, b);
20452        function __() { this.constructor = d; }
20453        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20454    };
20455})();
20456Object.defineProperty(exports, "__esModule", { value: true });
20457var pds_abstract_input_widget_1 = __webpack_require__(31);
20458var pds_validation_rules_engine_1 = __webpack_require__(26);
20459var PdsTextWidget = (function (_super) {
20460    __extends(PdsTextWidget, _super);
20461    function PdsTextWidget() {
20462        var _this = _super !== null && _super.apply(this, arguments) || this;
20463        _this.is = 'pds-text-widget';
20464        _this.properties = {
20465            name: String,
20466            dataLabelText: String,
20467            dataShowLabel: {
20468                type: String,
20469                value: null
20470            },
20471            dataIsEmail: {
20472                type: String,
20473                value: 'false'
20474            },
20475            dataBadgeText: {
20476                type: String,
20477                value: '',
20478                observer: 'setUpBadge'
20479            },
20480            dataHelperText: {
20481                type: String,
20482                value: null
20483            },
20484            dataFieldHelpText: String,
20485            dataPlaceholderText: String,
20486            dataTooltipText: {
20487                type: String,
20488                value: null
20489            },
20490            dataShowPasswordRules: {
20491                type: String,
20492                value: 'false'
20493            },
20494            dataUseAlternateColorScheme: {
20495                type: String,
20496                value: 'false'
20497            },
20498            dataIsreadonly: {
20499                type: String,
20500                value: 'false',
20501                observer: 'setReadonlyText'
20502            },
20503            dataIsfieldonly: {
20504                type: String,
20505                value: 'false'
20506            },
20507            dataHideUnelevatedBadge: {
20508                type: String,
20509                value: 'false',
20510                observer: 'setUpBadge'
20511            },
20512            dataDisableInvalidBadgeElevation: {
20513                type: String,
20514                value: 'false',
20515                observer: 'setUpBadge'
20516            },
20517            dataRegexErrorText: String,
20518            dataInverseRegexErrorText: String,
20519            dataInputType: {
20520                type: String,
20521                value: 'text'
20522            },
20523            dataIsrequired: {
20524                type: String,
20525                value: 'false',
20526                observer: 'setUpBadge'
20527            },
20528            disabled: {
20529                type: String,
20530                value: 'false'
20531            },
20532            dataUseValidIndicator: {
20533                type: String,
20534                value: 'false'
20535            },
20536            dataMinlength: String,
20537            dataMaxlength: String,
20538            dataExcludechars: String,
20539            dataRegex: String,
20540            dataRegexmodifiers: String,
20541            dataInverseRegex: String,
20542            dataInverseRegexmodifiers: String,
20543            dataCustomvalidate: String,
20544            dataAdditionalInputAttributes: Object,
20545            dataAdditionalErrorAttributes: Object,
20546            dataActionIcon: String,
20547            dataShowPasswordLink: {
20548                type: Boolean,
20549                value: false
20550            }
20551        };
20552        return _this;
20553    }
20554    PdsTextWidget.prototype.generateValidationRules = function () {
20555        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
20556        validationRules.isText = true;
20557        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
20558        validationRules.setProperty('maxLength', this.dataMaxlength, Number);
20559        validationRules.setProperty('minLength', this.dataMinlength, Number);
20560        validationRules.setProperty('excludeChars', this.dataExcludechars, String);
20561        validationRules.setProperty('isEmail', this.dataIsEmail, Boolean);
20562        if (this.dataRegex != null &&
20563            this.dataRegex.length > 0 &&
20564            this.dataRegexErrorText != null &&
20565            this.dataRegexErrorText.length > 0) {
20566            try {
20567                validationRules.regex = {
20568                    pattern: this.dataRegex != null ? new RegExp(this.dataRegex, this.dataRegexmodifiers) : new RegExp(this.dataRegex),
20569                    errorMessage: this.dataRegexErrorText
20570                };
20571            }
20572            catch (err) {
20573            }
20574        }
20575        if (this.dataInverseRegex != null &&
20576            this.dataInverseRegex.length > 0 &&
20577            this.dataInverseRegexErrorText != null &&
20578            this.dataInverseRegexErrorText.length > 0) {
20579            try {
20580                validationRules.inverseRegex = {
20581                    pattern: this.dataInverseRegex != null
20582                        ? new RegExp(this.dataInverseRegex, this.dataInverseRegexmodifiers)
20583                        : new RegExp(this.dataInverseRegex),
20584                    errorMessage: this.dataInverseRegexErrorText
20585                };
20586            }
20587            catch (err) {
20588            }
20589        }
20590        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
20591        if ('dataCustomvalidate' in this) {
20592            this.validators.push({
20593                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
20594                condition: {
20595                    element: this
20596                }
20597            });
20598        }
20599    };
20600    PdsTextWidget.prototype.setModelValue = function (modelValue, skip) {
20601        var ele = this.querySelector('input');
20602        if (ele != null && modelValue !== ele.modelValue) {
20603            ele.modelValue = modelValue;
20604            if (skip !== true) {
20605                this.setValue(modelValue, true);
20606            }
20607            return true;
20608        }
20609        return false;
20610    };
20611    PdsTextWidget.prototype.setValue = function (value, skip) {
20612        if (skip === void 0) { skip = false; }
20613        if (value == null) {
20614            value = '';
20615        }
20616        var inputEl = this.querySelector('input');
20617        if (inputEl != null && value !== inputEl.value) {
20618            inputEl.value = value;
20619        }
20620        if (skip !== true) {
20621            this.setModelValue(value, true);
20622        }
20623    };
20624    PdsTextWidget.prototype.setAdditionalInputAttributes = function () {
20625        if (this.dataAdditionalInputAttributes != null) {
20626            var inputElement = this.querySelector('input');
20627            for (var key in this.dataAdditionalInputAttributes) {
20628                if (this.dataAdditionalInputAttributes.hasOwnProperty(key)) {
20629                    inputElement.setAttribute(key, this.dataAdditionalInputAttributes[key]);
20630                }
20631            }
20632        }
20633    };
20634    PdsTextWidget.prototype.setAdditionalErrorAttributes = function () {
20635        if (this.dataAdditionalErrorAttributes != null) {
20636            var errorElement = this.querySelector('.pds-validation');
20637            for (var key in this.dataAdditionalErrorAttributes) {
20638                if (this.dataAdditionalErrorAttributes.hasOwnProperty(key)) {
20639                    errorElement.setAttribute(key, this.dataAdditionalErrorAttributes[key]);
20640                }
20641            }
20642        }
20643    };
20644    PdsTextWidget.prototype.changeInputToText = function () {
20645        this.dataInputType = 'text';
20646    };
20647    PdsTextWidget.prototype.changeInputToPassword = function () {
20648        this.dataInputType = 'password';
20649    };
20650    PdsTextWidget.prototype.showFieldHelp = function (dataFieldHelpText) {
20651        return (_super.prototype.showFieldHelp.call(this, dataFieldHelpText) || (this.dataShowPasswordRules === 'true') && this.dataShowPasswordRules.length > 0);
20652    };
20653    PdsTextWidget.prototype.showTooltipText = function (tooltipText) {
20654        return this.dataTooltipText != null && this.dataTooltipText.length > 0;
20655    };
20656    return PdsTextWidget;
20657}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
20658exports.PdsTextWidget = PdsTextWidget;
20659
20660
20661
20662/***/ }),
20663/* 146 */
20664/***/ (function(module, exports, __webpack_require__) {
20665
20666"use strict";
20667
20668var __extends = (this && this.__extends) || (function () {
20669    var extendStatics = function (d, b) {
20670        extendStatics = Object.setPrototypeOf ||
20671            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20672            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20673        return extendStatics(d, b);
20674    }
20675    return function (d, b) {
20676        extendStatics(d, b);
20677        function __() { this.constructor = d; }
20678        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20679    };
20680})();
20681Object.defineProperty(exports, "__esModule", { value: true });
20682var pds_abstract_input_widget_1 = __webpack_require__(31);
20683var pds_validation_rules_engine_1 = __webpack_require__(26);
20684var pds_logger_1 = __webpack_require__(41);
20685var pds_i18n_1 = __webpack_require__(15);
20686var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('input-widgets'), 'pds-file-picker-widget.ts');
20687var PdsFilePickerWidget = (function (_super) {
20688    __extends(PdsFilePickerWidget, _super);
20689    function PdsFilePickerWidget() {
20690        var _this = _super !== null && _super.apply(this, arguments) || this;
20691        _this.is = 'pds-file-picker-widget';
20692        _this.properties = {
20693            name: String,
20694            dataLabelText: String,
20695            dataButtonText: {
20696                type: String,
20697                value: pds_i18n_1.pdsI18n.getText('pds|file picker widget|Choose...')
20698            },
20699            dataShowLabel: {
20700                type: String,
20701                value: null
20702            },
20703            dataShowSelectedFile: {
20704                type: String,
20705                value: 'true'
20706            },
20707            dataBadgeText: {
20708                type: String,
20709                value: '',
20710                observer: 'setUpBadge'
20711            },
20712            dataHelperText: {
20713                type: String,
20714                value: null
20715            },
20716            dataFieldHelpText: String,
20717            dataTooltipText: String,
20718            dataUseAlternateColorScheme: {
20719                type: String,
20720                value: 'false'
20721            },
20722            dataIsfieldonly: {
20723                type: String,
20724                value: 'false'
20725            },
20726            dataHideUnelevatedBadge: {
20727                type: String,
20728                value: 'false',
20729                observer: 'setUpBadge'
20730            },
20731            dataDisableInvalidBadgeElevation: {
20732                type: String,
20733                value: 'false',
20734                observer: 'setUpBadge'
20735            },
20736            dataIsrequired: {
20737                type: String,
20738                value: 'false',
20739                observer: 'setUpBadge'
20740            },
20741            dataCustomvalidate: String,
20742            accept: {
20743                type: String,
20744                value: null
20745            },
20746            multiple: {
20747                type: String,
20748                value: 'false'
20749            },
20750            disabled: {
20751                type: String,
20752                value: 'false'
20753            }
20754        };
20755        _this.fileString = null;
20756        return _this;
20757    }
20758    Object.defineProperty(PdsFilePickerWidget.prototype, "files", {
20759        get: function () {
20760            return this.querySelector('input').files;
20761        },
20762        set: function (value) {
20763            this.querySelector('input').files = value;
20764        },
20765        enumerable: true,
20766        configurable: true
20767    });
20768    Object.defineProperty(PdsFilePickerWidget.prototype, "value", {
20769        get: function () {
20770            log('getting value: ' + this.fileString);
20771            return this.fileString;
20772        },
20773        set: function (value) {
20774            log('setting value: ' + value);
20775            this.fileString = value;
20776        },
20777        enumerable: true,
20778        configurable: true
20779    });
20780    Object.defineProperty(PdsFilePickerWidget.prototype, "modelValue", {
20781        get: function () {
20782            log('getting model value');
20783            if (!this.isModelValueDefined) {
20784                return;
20785            }
20786            var result = this.querySelector('input');
20787            if (result != null && result.files != null) {
20788                log(result.files);
20789                return result.files;
20790            }
20791        },
20792        set: function (value) {
20793            log('setting model value');
20794            log(value);
20795            var modelValueChanged = this.setModelValue(value);
20796            if (modelValueChanged) {
20797                this.validateWidget();
20798                if (this.isValid && this.myErrorField != null) {
20799                    this.showErrorMessage(false);
20800                }
20801            }
20802        },
20803        enumerable: true,
20804        configurable: true
20805    });
20806    PdsFilePickerWidget.prototype.attached = function () {
20807        _super.prototype.attached.call(this);
20808        this.isModelValueDefined = false;
20809    };
20810    PdsFilePickerWidget.prototype.ready = function () {
20811        _super.prototype.ready.call(this);
20812        this.updateFileString();
20813    };
20814    PdsFilePickerWidget.prototype.chooseFile = function () {
20815        log('chooseFile() called');
20816        this.querySelector('input').click();
20817    };
20818    PdsFilePickerWidget.prototype.inputChange = function () {
20819        log('input change');
20820        this.updateFileString();
20821        this.isModelValueDefined = true;
20822        _super.prototype.inputChange.call(this);
20823    };
20824    PdsFilePickerWidget.prototype.generateValidationRules = function () {
20825        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
20826        validationRules.isText = true;
20827        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
20828        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
20829        if ('dataCustomvalidate' in this) {
20830            this.validators.push({
20831                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
20832                condition: {
20833                    element: this
20834                }
20835            });
20836        }
20837    };
20838    PdsFilePickerWidget.prototype.updateFileString = function () {
20839        log('updating file string');
20840        this.fileString = this.getFileString();
20841    };
20842    PdsFilePickerWidget.prototype.getFileString = function () {
20843        var fileInput = this.querySelector('input');
20844        if (fileInput.files != null && fileInput.files.length > 0) {
20845            var fileNames = [];
20846            for (var i = 0; i < fileInput.files.length; i++) {
20847                fileNames.push(fileInput.files[i].name);
20848            }
20849            return fileNames.join(', ');
20850        }
20851        else {
20852            return null;
20853        }
20854    };
20855    PdsFilePickerWidget.prototype.setValue = function (value, skip) {
20856        if (skip === void 0) { skip = false; }
20857        this.value = value;
20858    };
20859    PdsFilePickerWidget.prototype.setModelValue = function (modelValue, skip) {
20860        var ele = this.querySelector('input');
20861        if (ele != null && modelValue !== ele.files) {
20862            if (modelValue != null) {
20863                ele.files = modelValue;
20864                this.isModelValueDefined = true;
20865            }
20866            else {
20867                this.isModelValueDefined = false;
20868                ele.value = null;
20869            }
20870            if (skip !== true) {
20871                this.setValue(this.getFileString(), true);
20872            }
20873            return true;
20874        }
20875        return false;
20876    };
20877    PdsFilePickerWidget.prototype.getMultipleAttribute = function (multiple) {
20878        return this.multiple === 'true' || this.multiple === 'multiple' ? 'multiple' : null;
20879    };
20880    return PdsFilePickerWidget;
20881}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
20882exports.PdsFilePickerWidget = PdsFilePickerWidget;
20883
20884
20885
20886/***/ }),
20887/* 147 */
20888/***/ (function(module, exports, __webpack_require__) {
20889
20890"use strict";
20891
20892var __extends = (this && this.__extends) || (function () {
20893    var extendStatics = function (d, b) {
20894        extendStatics = Object.setPrototypeOf ||
20895            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20896            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20897        return extendStatics(d, b);
20898    }
20899    return function (d, b) {
20900        extendStatics(d, b);
20901        function __() { this.constructor = d; }
20902        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20903    };
20904})();
20905Object.defineProperty(exports, "__esModule", { value: true });
20906var pds_abstract_input_widget_1 = __webpack_require__(31);
20907var pds_validation_rules_engine_1 = __webpack_require__(26);
20908var pds_i18n_1 = __webpack_require__(15);
20909var isIntegerRegex = /^([-]?[0-9]*)?$/;
20910var PdsNumberWidget = (function (_super) {
20911    __extends(PdsNumberWidget, _super);
20912    function PdsNumberWidget() {
20913        var _this = _super !== null && _super.apply(this, arguments) || this;
20914        _this.is = 'pds-number-widget';
20915        _this.properties = {
20916            name: String,
20917            dataLabelText: String,
20918            dataShowLabel: {
20919                type: String,
20920                value: null
20921            },
20922            dataBadgeText: {
20923                type: String,
20924                value: '',
20925                observer: 'setUpBadge'
20926            },
20927            dataHelperText: {
20928                type: String,
20929                value: null
20930            },
20931            dataFieldHelpText: String,
20932            dataPlaceholderText: String,
20933            dataTooltipText: String,
20934            dataUseAlternateColorScheme: {
20935                type: String,
20936                value: 'false'
20937            },
20938            dataRegexErrorText: String,
20939            dataIsreadonly: {
20940                type: String,
20941                value: 'false',
20942                observer: 'setReadonlyText'
20943            },
20944            dataIsfieldonly: {
20945                type: String,
20946                value: 'false'
20947            },
20948            dataHideUnelevatedBadge: {
20949                type: String,
20950                value: 'false',
20951                observer: 'setUpBadge'
20952            },
20953            dataDisableInvalidBadgeElevation: {
20954                type: String,
20955                value: 'false',
20956                observer: 'setUpBadge'
20957            },
20958            dataIsrequired: {
20959                type: String,
20960                value: 'false',
20961                observer: 'setUpBadge'
20962            },
20963            disabled: {
20964                type: String,
20965                value: 'false'
20966            },
20967            dataUseValidIndicator: {
20968                type: String,
20969                value: 'false'
20970            },
20971            dataIsinteger: String,
20972            dataMinlength: String,
20973            dataMaxlength: String,
20974            dataMaxvalue: String,
20975            dataMinvalue: String,
20976            dataMaxdecimals: String,
20977            dataMinvalue_exclusive: String,
20978            dataMaxvalue_exclusive: String,
20979            dataCustomvalidate: String,
20980            dataActionIcon: String
20981        };
20982        return _this;
20983    }
20984    PdsNumberWidget.prototype.generateValidationRules = function () {
20985        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
20986        validationRules.isNumber = true;
20987        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
20988        validationRules.setProperty('isInteger', this.dataIsinteger, Boolean);
20989        validationRules.setProperty('minLength', this.dataMinlength, Number);
20990        validationRules.setProperty('maxLength', this.dataMaxlength, Number);
20991        validationRules.setProperty('minValue', this.dataMinvalue, Number);
20992        validationRules.setProperty('maxValue', this.dataMaxvalue, Number);
20993        validationRules.setProperty('minValueExclusive', this.dataMinvalue_exclusive, Number);
20994        validationRules.setProperty('maxValueExclusive', this.dataMaxvalue_exclusive, Number);
20995        validationRules.setProperty('maxDecimals', this.dataMaxdecimals, Number);
20996        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
20997        if (this.hasOwnProperty('dataCustomvalidate')) {
20998            this.validators.push({
20999                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
21000                condition: {
21001                    element: this
21002                }
21003            });
21004        }
21005    };
21006    PdsNumberWidget.prototype.setModelValue = function (modelValue, skip) {
21007        var ele = this.querySelector('input');
21008        if (ele != null && modelValue !== ele.modelValue) {
21009            ele.modelValue = modelValue;
21010            if (skip !== true) {
21011                this.setValue(pds_i18n_1.pdsI18n.localizeNumber(modelValue), true);
21012            }
21013            return true;
21014        }
21015        return false;
21016    };
21017    PdsNumberWidget.prototype.setValue = function (value, skip) {
21018        if (skip === void 0) { skip = false; }
21019        if (value == null) {
21020            value = '';
21021        }
21022        var inputEl = this.querySelector('input');
21023        if (inputEl != null && value !== inputEl.value) {
21024            inputEl.value = value;
21025        }
21026        if (skip !== true) {
21027            this.setModelValue(pds_i18n_1.pdsI18n.deLocalizeNumber(value), true);
21028        }
21029    };
21030    return PdsNumberWidget;
21031}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
21032exports.PdsNumberWidget = PdsNumberWidget;
21033
21034
21035
21036/***/ }),
21037/* 148 */
21038/***/ (function(module, exports, __webpack_require__) {
21039
21040"use strict";
21041
21042var __extends = (this && this.__extends) || (function () {
21043    var extendStatics = function (d, b) {
21044        extendStatics = Object.setPrototypeOf ||
21045            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21046            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21047        return extendStatics(d, b);
21048    }
21049    return function (d, b) {
21050        extendStatics(d, b);
21051        function __() { this.constructor = d; }
21052        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21053    };
21054})();
21055Object.defineProperty(exports, "__esModule", { value: true });
21056var pds_widget_1 = __webpack_require__(7);
21057var PdsNumberedSlider = (function (_super) {
21058    __extends(PdsNumberedSlider, _super);
21059    function PdsNumberedSlider() {
21060        var _this = _super !== null && _super.apply(this, arguments) || this;
21061        _this.is = 'pds-numbered-slider';
21062        _this.properties = {
21063            min: Number,
21064            max: {
21065                type: Number,
21066                observer: 'maxChanged'
21067            },
21068            value: {
21069                type: Number,
21070                observer: 'valueChanged'
21071            },
21072            name: String
21073        };
21074        _this.updateNumber = function () {
21075            var input = this.querySelector('input');
21076            var i = 0;
21077            var currentPage = parseInt(input.value);
21078            var dotLabel = this.querySelector('span.pds-dot-label');
21079            var dotBackground = this.querySelector('span.pds-dot-background');
21080            var max = parseInt(this.max);
21081            var min = parseInt(this.min);
21082            var totalPages = max - min;
21083            var offset = 34 * (currentPage - min) / totalPages;
21084            var position = 100 * (currentPage - min) / totalPages;
21085            var positionStyle = 'calc(' + position + '% - ' + offset + 'px)';
21086            dotBackground.style.left = positionStyle;
21087            dotLabel.style.left = positionStyle;
21088            dotLabel.innerText = currentPage;
21089        };
21090        return _this;
21091    }
21092    Object.defineProperty(PdsNumberedSlider.prototype, "modelValue", {
21093        get: function () {
21094            return this.value;
21095        },
21096        set: function (value) {
21097            if (typeof value === 'string') {
21098                value = parseInt(String(value));
21099            }
21100            this.value = value;
21101            this.querySelector('input').value = value;
21102        },
21103        enumerable: true,
21104        configurable: true
21105    });
21106    PdsNumberedSlider.prototype.valueChanged = function (value) {
21107        this.querySelector('input').value = this.value;
21108        this.updateNumber();
21109    };
21110    PdsNumberedSlider.prototype.maxChanged = function (max) {
21111        this.querySelector('input').setAttribute('max', this.max);
21112        this.updateNumber();
21113    };
21114    PdsNumberedSlider.prototype.attributeChanged = function (name, type) {
21115        if (this.properties.hasOwnProperty(name)) {
21116            this.querySelector('input').setAttribute(name, this[name]);
21117        }
21118    };
21119    PdsNumberedSlider.prototype.ready = function () {
21120        _super.prototype.ready.call(this);
21121        var input = this.querySelector('input');
21122        input.setAttribute('min', this.getAttribute('min'));
21123        input.setAttribute('max', this.getAttribute('max'));
21124        input.setAttribute('value', this.value || this.getAttribute('value'));
21125        var updateValueAndDispatchModelValueChange = function (event) {
21126            this.value = parseInt(event.target.value);
21127            var e = new Event('modelValueChange', { bubbles: true });
21128            this.dispatchEvent(e);
21129        };
21130        input.addEventListener('mouseup', updateValueAndDispatchModelValueChange.bind(this));
21131        input.addEventListener('touchend', updateValueAndDispatchModelValueChange.bind(this));
21132        input.addEventListener('keyup', updateValueAndDispatchModelValueChange.bind(this));
21133        input.addEventListener('input', this.updateNumber.bind(this));
21134        input.addEventListener('change', this.updateNumber.bind(this));
21135    };
21136    return PdsNumberedSlider;
21137}(pds_widget_1.PdsWidget));
21138exports.PdsNumberedSlider = PdsNumberedSlider;
21139
21140
21141
21142/***/ }),
21143/* 149 */
21144/***/ (function(module, exports, __webpack_require__) {
21145
21146"use strict";
21147
21148var __extends = (this && this.__extends) || (function () {
21149    var extendStatics = function (d, b) {
21150        extendStatics = Object.setPrototypeOf ||
21151            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21152            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21153        return extendStatics(d, b);
21154    }
21155    return function (d, b) {
21156        extendStatics(d, b);
21157        function __() { this.constructor = d; }
21158        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21159    };
21160})();
21161Object.defineProperty(exports, "__esModule", { value: true });
21162var pds_widget_1 = __webpack_require__(7);
21163var isIntegerRegex = /^([-]?[0-9]*)?$/;
21164var PdsProgressBarWidget = (function (_super) {
21165    __extends(PdsProgressBarWidget, _super);
21166    function PdsProgressBarWidget() {
21167        var _this = _super !== null && _super.apply(this, arguments) || this;
21168        _this.is = 'pds-progress-bar-widget';
21169        _this.properties = {
21170            width: {
21171                type: Number,
21172                value: 0,
21173                notify: true,
21174                reflectToAttribute: true
21175            },
21176            dataShowText: {
21177                type: String,
21178                value: 'true'
21179            }
21180        };
21181        return _this;
21182    }
21183    PdsProgressBarWidget.prototype.validateWidget = function () {
21184        return true;
21185    };
21186    return PdsProgressBarWidget;
21187}(pds_widget_1.PdsWidget));
21188exports.PdsProgressBarWidget = PdsProgressBarWidget;
21189
21190
21191
21192/***/ }),
21193/* 150 */
21194/***/ (function(module, exports, __webpack_require__) {
21195
21196"use strict";
21197
21198var __extends = (this && this.__extends) || (function () {
21199    var extendStatics = function (d, b) {
21200        extendStatics = Object.setPrototypeOf ||
21201            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21202            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21203        return extendStatics(d, b);
21204    }
21205    return function (d, b) {
21206        extendStatics(d, b);
21207        function __() { this.constructor = d; }
21208        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21209    };
21210})();
21211Object.defineProperty(exports, "__esModule", { value: true });
21212var pds_widget_1 = __webpack_require__(7);
21213var PdsReportingTermSelector = (function (_super) {
21214    __extends(PdsReportingTermSelector, _super);
21215    function PdsReportingTermSelector() {
21216        var _this = _super !== null && _super.apply(this, arguments) || this;
21217        _this.is = 'pds-reporting-term-selector';
21218        _this.properties = {
21219            reportingTerms: {
21220                value: null,
21221                type: Array,
21222                observer: 'setPossibleReportingTerms'
21223            }
21224        };
21225        return _this;
21226    }
21227    PdsReportingTermSelector.prototype.ready = function () {
21228        _super.prototype.ready.call(this);
21229        if (this.possibleReportingTerms == null) {
21230            this.possibleReportingTerms = [];
21231        }
21232    };
21233    PdsReportingTermSelector.prototype.reportingTermChange = function (event) {
21234        event.preventDefault();
21235        this.fire('reporting-term-change', this.selectedReportingTerm);
21236    };
21237    PdsReportingTermSelector.prototype.setPossibleReportingTerms = function () {
21238        if (this.reportingTerms == null) {
21239            return;
21240        }
21241        var different = this.possibleReportingTerms == null || this.possibleReportingTerms.length !== this.reportingTerms.length;
21242        var newReportingTerms = [];
21243        for (var x = 0; x < this.reportingTerms.length; x++) {
21244            if (!different && this.possibleReportingTerms[x].value !== this.reportingTerms[x]) {
21245                different = true;
21246            }
21247            newReportingTerms.push({
21248                text: this.reportingTerms[x],
21249                value: this.reportingTerms[x]
21250            });
21251        }
21252        if (different) {
21253            this.possibleReportingTerms = newReportingTerms;
21254        }
21255    };
21256    return PdsReportingTermSelector;
21257}(pds_widget_1.PdsWidget));
21258exports.PdsReportingTermSelector = PdsReportingTermSelector;
21259
21260
21261
21262/***/ }),
21263/* 151 */
21264/***/ (function(module, exports, __webpack_require__) {
21265
21266"use strict";
21267
21268var __extends = (this && this.__extends) || (function () {
21269    var extendStatics = function (d, b) {
21270        extendStatics = Object.setPrototypeOf ||
21271            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21272            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21273        return extendStatics(d, b);
21274    }
21275    return function (d, b) {
21276        extendStatics(d, b);
21277        function __() { this.constructor = d; }
21278        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21279    };
21280})();
21281Object.defineProperty(exports, "__esModule", { value: true });
21282var common_utils_1 = __webpack_require__(40);
21283var rxjs_1 = __webpack_require__(19);
21284var operators_1 = __webpack_require__(17);
21285var pds_widget_1 = __webpack_require__(7);
21286var chat_thread_service_1 = __webpack_require__(92);
21287var PdsSearch = (function (_super) {
21288    __extends(PdsSearch, _super);
21289    function PdsSearch() {
21290        var _this = _super !== null && _super.apply(this, arguments) || this;
21291        _this.is = 'pds-search';
21292        _this.isFocused = false;
21293        _this.properties = {
21294            dataHasFavorites: {
21295                type: String,
21296                value: 'false'
21297            }
21298        };
21299        _this._chatThreadService = new chat_thread_service_1.ChatThreadService();
21300        return _this;
21301    }
21302    Object.defineProperty(PdsSearch.prototype, "favorites", {
21303        get: function () {
21304            return this._favorites;
21305        },
21306        set: function (value) {
21307            this._favorites = value;
21308            this.generateFavoritesMap();
21309        },
21310        enumerable: true,
21311        configurable: true
21312    });
21313    PdsSearch.prototype.attached = function () {
21314        var _this = this;
21315        _super.prototype.attached.call(this);
21316        document.body.addEventListener('click', function () {
21317            _this.searchQuery = '';
21318            _this.isFocused = false;
21319        });
21320        this.querySelector('input').addEventListener('focus', function () {
21321            _this.isFocused = true;
21322        });
21323    };
21324    PdsSearch.prototype.ready = function () {
21325        _super.prototype.ready.call(this);
21326        this.favorites = {
21327            links: [],
21328            students: [],
21329            assignments: []
21330        };
21331        this.favoriteMap = {};
21332        this.isFocused = false;
21333        this.navItems = [];
21334        this.navigationSearchError = false;
21335        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
21336        this.searchQuery = '';
21337        this.students = [];
21338        this.studentSearchError = false;
21339    };
21340    PdsSearch.prototype.iconClickHandler = function (event) {
21341        event.preventDefault();
21342        event.stopPropagation();
21343        this.querySelector('input').focus();
21344    };
21345    PdsSearch.prototype.inputChange = function (event) {
21346        this.searchQuery = event.target.value;
21347        this.debounce('pdsInputChangeFire', function () {
21348            this.fire('pdsInputChange', this.searchQuery.trim());
21349        }, 250);
21350    };
21351    PdsSearch.prototype.getInputClass = function (searchQuery) {
21352        return searchQuery != null && searchQuery.trim().length > 0 ? 'expanded' : '';
21353    };
21354    PdsSearch.prototype.isSearchQueryOverLimit = function (searchQuery) {
21355        return searchQuery != null && searchQuery.trim().length > 1;
21356    };
21357    PdsSearch.prototype.showNoResultsMessage = function (students, navItems, studentSearchError, navigationSearchError) {
21358        if (students instanceof Array && navItems instanceof Array) {
21359            return (students.length + navItems.length === 0) && !(studentSearchError || navigationSearchError);
21360        }
21361        return false;
21362    };
21363    PdsSearch.prototype.showResultsSection = function (results, resultsSectionError) {
21364        return results.length > 0 || resultsSectionError;
21365    };
21366    PdsSearch.prototype.useGenericNavItemIcon = function (navItem) {
21367        return navItem.iconName == null;
21368    };
21369    PdsSearch.prototype.studentClickHandler = function (event) {
21370        event.preventDefault();
21371        event.stopPropagation();
21372        var target = event.target;
21373        if (!this.pds.utils.is(target, 'a')) {
21374            target = this.pds.utils.getClosest(target, 'a');
21375        }
21376        var student = target.dataStudent;
21377        this.fire('pdsStudentClick', student);
21378        this.searchQuery = '';
21379        this.isFocused = false;
21380    };
21381    PdsSearch.prototype.navItemClickHandler = function (event) {
21382        event.preventDefault();
21383        event.stopPropagation();
21384        var navItem = event.model.navItem;
21385        if (navItem.onUserClick) {
21386            navItem.onUserClick(navItem, event);
21387        }
21388        else {
21389            console.error('nav item clicked with no click event');
21390        }
21391        this.searchQuery = '';
21392        this.isFocused = false;
21393    };
21394    PdsSearch.prototype.getTooltipForNavItem = function (navItem, redrawTrigger) {
21395        if (navItem.context.parentLinkName != null) {
21396            return this.pds.i18n.getText(navItem.name) + " (" + this.pds.i18n.getText(navItem.context.parentLinkName) + ")";
21397        }
21398        return "" + this.pds.i18n.getText(navItem.name);
21399    };
21400    PdsSearch.prototype.generateFavoritesMap = function () {
21401        this.favoriteMap = {};
21402        for (var _i = 0, _a = this._favorites.links; _i < _a.length; _i++) {
21403            var link = _a[_i];
21404            if (link.context == null) {
21405                throw 'pds-search nav link has no context';
21406            }
21407            this.favoriteMap[link.context.uid] = true;
21408        }
21409        for (var _b = 0, _c = this._favorites.students; _b < _c.length; _b++) {
21410            var student = _c[_b];
21411            this.favoriteMap[student.uid] = true;
21412        }
21413        this.resetFavorites();
21414    };
21415    PdsSearch.prototype.getFavoriteClass = function (valueWithUid, favorites) {
21416        return this.favoriteMap[valueWithUid.uid] != null ? 'pds-search-favorite' : '';
21417    };
21418    PdsSearch.prototype.showFavorites = function (searchQuery, isFocused, favorites) {
21419        var hasFavorites = this.dataHasFavorites === 'true' && this.favorites != null && (this.favorites.assignments != null && this.favorites.assignments.length > 0
21420            || this.favorites.students != null && this.favorites.students.length > 0
21421            || this.favorites.links != null && this.favorites.links.length > 0);
21422        return !this.isSearchQueryOverLimit(searchQuery) && isFocused && hasFavorites;
21423    };
21424    PdsSearch.prototype.toggleFavoriteLink = function (event) {
21425        event.preventDefault();
21426        event.stopPropagation();
21427        var navItem = event.model.navItem;
21428        if (this.favoriteMap[navItem.context.uid] != null) {
21429            delete this.favoriteMap[navItem.context.uid];
21430            this.favorites.links = this.favorites.links.filter(function (link) {
21431                return link.context.uid !== navItem.context.uid;
21432            });
21433            this.fire('pdsSearchRemoveFavorite', {
21434                index: 'links',
21435                uid: navItem.context.uid
21436            });
21437        }
21438        else {
21439            this.favoriteMap[navItem.context.uid] = true;
21440            this.favorites.links.push(navItem);
21441            this.fire('pdsSearchAddFavorite', {
21442                index: 'links',
21443                uid: navItem.context.uid
21444            });
21445        }
21446        this.resetFavorites();
21447    };
21448    PdsSearch.prototype.toggleFavoriteStudent = function (event) {
21449        event.preventDefault();
21450        event.stopPropagation();
21451        var student = event.model.student;
21452        if (this.favoriteMap[student.uid] != null) {
21453            delete this.favoriteMap[student.uid];
21454            this.favorites.students = this.favorites.students.filter(function (_student) {
21455                return student.uid !== _student.uid;
21456            });
21457            this.fire('pdsSearchRemoveFavorite', {
21458                index: 'students',
21459                uid: student.uid
21460            });
21461        }
21462        else {
21463            this.favoriteMap[student.uid] = true;
21464            this.favorites.students.push(student);
21465            this.fire('pdsSearchAddFavorite', {
21466                index: 'students',
21467                uid: student.uid
21468            });
21469        }
21470        this.resetFavorites();
21471    };
21472    PdsSearch.prototype.resetFavorites = function () {
21473        this._favorites = {
21474            links: Array.from(this._favorites.links),
21475            students: Array.from(this._favorites.students),
21476            assignments: Array.from(this._favorites.assignments)
21477        };
21478    };
21479    PdsSearch.prototype.handleChatNavigationEvent = function (event) {
21480        event.preventDefault();
21481        var chatThread = event.detail;
21482        var notificationEvent = {
21483            type: 'COMMUNICATION_NOTIFICATION',
21484            shouldNavigate: true,
21485            topicUid: chatThread.topicUid,
21486            threadOwnerUid: chatThread.ownerUid,
21487            threadType: chatThread.threadType
21488        };
21489        this.fire('pdsNotificationClick', notificationEvent);
21490    };
21491    PdsSearch.prototype.emitClickEvent = function (event) {
21492        var _this = this;
21493        event.preventDefault();
21494        event.stopPropagation();
21495        if (this.currentUserUid == null) {
21496            return;
21497        }
21498        this.chatTopic = event.model.student;
21499        this.sectionUids = this.chatTopic.sectionEnrollments.map(function (se) { return se.sectionUid; });
21500        var thread = {
21501            name: this.chatTopic.firstName + ' ' + this.chatTopic.lastName,
21502            threadType: common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER,
21503            ownerUid: this.currentUserUid,
21504            ownerUserType: 'TEACHER',
21505            topicUid: this.chatTopic.uid,
21506            participants: [{ userUid: this.chatTopic.uid, userType: 'STUDENT' }, { userUid: this.currentUserUid, userType: 'TEACHER' }]
21507        };
21508        this._chatThreadService.fetchTopicThread(this.pds.preferences.host, thread)
21509            .subscribe(function (chatThread) {
21510            _this.quickMessageDialogThreadRI = chatThread;
21511            _this.isQuickMessageDialogOpen = true;
21512            setTimeout(function () {
21513                _this.querySelector('pds-chat-quick-message').addEventListener('pdsRemoveDialog', function () {
21514                    _this.isQuickMessageDialogOpen = false;
21515                });
21516            });
21517        });
21518    };
21519    PdsSearch.prototype.getTopicUserName = function () {
21520        return this.chatTopic.firstName + ' ' + this.chatTopic.lastName;
21521    };
21522    PdsSearch.prototype.handleChatTabChange = function (event) {
21523        var _this = this;
21524        var threadObs;
21525        var thread = {
21526            name: this.quickMessageDialogThreadRI.name,
21527            ownerUid: this.quickMessageDialogThreadRI.ownerUid,
21528            ownerUserType: this.quickMessageDialogThreadRI.ownerUserType,
21529            topicUid: this.quickMessageDialogThreadRI.topicUid
21530        };
21531        if (event.detail === 'STUDENT_TAB') {
21532            threadObs = rxjs_1.of([{ userUid: this.quickMessageDialogThreadRI.topicUid, userType: 'STUDENT' }, { userUid: this.quickMessageDialogThreadRI.ownerUid, userType: 'TEACHER' }]).pipe(operators_1.mergeMap(function (participants) {
21533                thread.participants = participants;
21534                thread.threadType = common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER;
21535                return _this._chatThreadService.fetchTopicThread(_this.pds.preferences.host, thread);
21536            }));
21537        }
21538        else {
21539            threadObs = this._chatThreadService.fetchParentParticipants(this.pds.preferences.host, this.quickMessageDialogThreadRI.topicUid).pipe(operators_1.mergeMap(function (participants) {
21540                participants.push({ userUid: _this.quickMessageDialogThreadRI.ownerUid, userType: 'TEACHER' });
21541                thread.participants = participants;
21542                thread.threadType = common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT;
21543                return _this._chatThreadService.fetchTopicThread(_this.pds.preferences.host, thread);
21544            }));
21545        }
21546        threadObs
21547            .subscribe(function (chatThread) {
21548            _this.quickMessageDialogThreadRI = chatThread;
21549            setTimeout(function () {
21550                var containerEl = _this.querySelector('.pds-chat-message-container');
21551                containerEl.scrollTop = containerEl.scrollHeight;
21552            });
21553        }, function (err) {
21554            console.warn(err);
21555        });
21556    };
21557    return PdsSearch;
21558}(pds_widget_1.PdsWidget));
21559exports.PdsSearch = PdsSearch;
21560
21561
21562
21563/***/ }),
21564/* 152 */
21565/***/ (function(module, exports, __webpack_require__) {
21566
21567"use strict";
21568
21569var __extends = (this && this.__extends) || (function () {
21570    var extendStatics = function (d, b) {
21571        extendStatics = Object.setPrototypeOf ||
21572            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21573            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21574        return extendStatics(d, b);
21575    }
21576    return function (d, b) {
21577        extendStatics(d, b);
21578        function __() { this.constructor = d; }
21579        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21580    };
21581})();
21582Object.defineProperty(exports, "__esModule", { value: true });
21583var pds_widget_1 = __webpack_require__(7);
21584var xlinkns = 'http://www.w3.org/1999/xlink';
21585var deprecatedNameMap = {
21586    'edit': 'pencil',
21587    'star-f': 'star',
21588    'star-s': 'star',
21589    'ask-question': 'hand',
21590    'attachment-f': 'paperclip',
21591    'audio': 'speaker',
21592    'bookmark-add': 'bookmark-plus',
21593    'bookmark-delete': 'bookmark-minus',
21594    'calculator-f': 'calculator',
21595    'calendar-f': 'calendar',
21596    'calendar-s': 'calendar',
21597    'calendar2': 'calendar',
21598    'calendar-events': 'calendar-star',
21599    'calendar-day': 'calendar-day-1',
21600    'camera-f': 'camera',
21601    'checkmark-circle': 'checkmark-alt',
21602    'checkmark-square': 'checkmark-alt2',
21603    'dashboard-s': 'dashboard',
21604    'dashboard-f': 'dashboard',
21605    'attendance-f': 'desk',
21606    'download-s': 'download',
21607    'erase': 'backspace',
21608    'filter-remove': 'filter-x',
21609    'grading': 'calculator-file',
21610    'more': 'ellipsis',
21611    'options-f': 'ellipsis',
21612    'pen-f': 'pencil-note',
21613    'logout': 'signout',
21614    'standards': 'target',
21615    'trash-s': 'trash',
21616    'caret-down-square': 'caret-square-down',
21617    'pointer-up': 'chevron-up',
21618    'pointer-up-2': 'chevron-up',
21619    'pointer-right': 'chevron-right',
21620    'pointer-down': 'chevron-down',
21621    'pointer-down-2': 'chevron-down',
21622    'pointer-up-left': 'chevron-left',
21623    'pointer-left-circle-s': 'chevron-left',
21624    'pointer-left': 'chevron-left',
21625    'pointer-right-circle-s': 'chevron-right',
21626    'drop-down-arrow': 'chevron-down',
21627    'arrow-to-bottom': 'arrow-down-line',
21628    'arrow-to-top': 'arrow-up-line',
21629    'join': 'arrows-inward',
21630    'split': 'arrows-outward',
21631    'arrow-horizontal': 'arrows-horizontal',
21632    'arrow-vertical': 'arrows-vertical',
21633    'expand': 'arrows-expand',
21634    'arrow-collapse': 'arrows-collapse',
21635    'arrow-expand': 'arrows-expand',
21636    'collapse': 'arrows-collapse',
21637    'move': 'arrows-move',
21638    'left-right-arrows-f': 'arrows-left-right',
21639    'arrows-up-down': 'arrows-down-up',
21640    'arrow-split': 'arrows-split',
21641    'disaggregate': 'arrows-apart',
21642    'arrow-circle-down': 'behavior-circle-down',
21643    'arrow-circle-up': 'behavior-circle-up',
21644    'behavior-badge-1': 'behavior-sun',
21645    'behavior-badge-2': 'behavior-cup',
21646    'behavior-badge-3': 'behavior-gift',
21647    'behavior-badge-4': 'behavior-ribbon',
21648    'behavior-badge-5': 'behavior-crown',
21649    'behavior-badge-6': 'behavior-heart',
21650    'behavior-badge-7': 'behavior-checkmark',
21651    'behavior-badge-8': 'behavior-thumbs-up',
21652    'behavior-badge-9': 'behavior-star',
21653    'behavior-badge-10': 'behavior-smile',
21654    'behavior-collaborate': 'behavior-thought-bubble',
21655    'behavior-collaborative	': 'behavior-thought-bubble',
21656    'behavior-helpful': 'behavior-hands',
21657    'behavior-kind': 'behavior-hand-heart',
21658    'behavior-hardworking': 'behavior-hammer',
21659    'behavior-hardwork': 'behavior-hammer',
21660    'behavior-turned-that-around': 'behavior-arrow-reverse',
21661    'behavior-turn-that-around': 'behavior-arrow-reverse',
21662    'comments': 'message-bubble',
21663    'communication-s': 'message-bubbles',
21664    'message-bubbles-f': 'message-bubbles',
21665    'discussion': 'message-bubbles-stack',
21666    'message-fail': 'message-bubble-fail',
21667    'checkmark-circle-f': 'checkmark-alt',
21668    'checkmark-circle-s': 'checkmark-alt',
21669    'circle-alert-s': 'exclamation',
21670    'circle-2': 'circle',
21671    'circle-subtract': 'minus-alt',
21672    'close-s': 'x-alt',
21673    'disable': 'backslash',
21674    'circle-slash': 'slash-alt',
21675    'help-f': 'help',
21676    'help-s': 'help',
21677    'question-o': 'help',
21678    'question-circle-s': 'help',
21679    'plus-f': 'plus-alt',
21680    'non-editable': 'pencil-ban',
21681    'non editable': 'pencil-ban',
21682    'plus-s': 'plus-alt',
21683    'color-levels-1': 'color-grid',
21684    'color-levels-2': 'color-grid-greyscale',
21685    'assessment-preview': 'clipboard-magnifing-glass',
21686    'assessment-results': 'clipboard-checkmark',
21687    'assessment': 'clipboard',
21688    'assignment-add': 'page-plus',
21689    'assignment-f': 'page',
21690    'bubble-sheet': 'page-dots-pencil',
21691    'draft': 'document-pencil',
21692    'evaluation': 'clipboard-checkmark-empty',
21693    'key-type-assessment': 'clipboard-key',
21694    'note-pad-f': 'note',
21695    'plan': 'clipboard-folder',
21696    'publish': 'document-checkmark',
21697    'report': 'document-list',
21698    'roster': 'document-people',
21699    'scan-compatible': 'page-dots-checkmark',
21700    'mail-group': 'envelopes',
21701    'message': 'envelope',
21702    'unread': 'envelope-notification',
21703    'settings-s': 'gear',
21704    'settings-f': 'gear',
21705    'settings-bottom-f': 'gear',
21706    'process': 'gears',
21707    'unprocess': 'gears-x',
21708    'bullet-list': 'list',
21709    'list-view': 'list',
21710    'app-switcher': 'tiles-9',
21711    'score-inspector': 'number-pad',
21712    'locker': 'pad-lock',
21713    'unlock': 'lock-open',
21714    'security': 'lock',
21715    'zoom': 'zoom-in',
21716    'fast-forward': 'media-fast-forward',
21717    'fast-rewind': 'media-rewind',
21718    'listen': 'media-listen',
21719    'media-controls-pause': 'media-pause',
21720    'media-controls-play': 'media-play',
21721    'rewind': 'media-rewind',
21722    'skip-backwards': 'media-skip-backward',
21723    'skip-forward': 'media-skip-forward',
21724    'stop': 'media-stop',
21725    'video-f': 'media-video',
21726    'close-circle-f': 'x-alt',
21727    'close-circle-s': 'x-alt',
21728    'complete': 'proctoring-complete',
21729    'class': 'computer-layout',
21730    'admin-school': 'school-gear',
21731    'admin-system': 'user-gear',
21732    'dropped-student-f': 'user-desk-minus',
21733    'empty-student': 'user-desk',
21734    'notifications-student': 'user-desk',
21735    'group-add': 'users-group-plus',
21736    'group': 'users-group',
21737    'meeting': 'users-message-bubbles',
21738    'members': 'users',
21739    'person-card-s': 'user-card',
21740    'student-added': 'user-desk-plus',
21741    'student-f': 'user-desk',
21742    'student-group-private': 'users-desks',
21743    'student-group-published': 'users-desks-checkmark',
21744    'teacher': 'user-board',
21745    'user-add': 'user-plus',
21746    'notifications-parent': 'user-shadow',
21747    'user-f': 'user',
21748    'user-s': 'user',
21749    'user-remove': 'user-x',
21750    'onenote': 'MS-onenote',
21751    'Google': 'google',
21752    'excel': 'xls',
21753    'alert-balance-f': 'dollar-sign',
21754    'alert-birthday-s': 'cake',
21755    'alert-discipline-s': 'scale',
21756    'alert-medical': 'medical',
21757    'alert-other-s': 'exclamation',
21758    'alert-parent-s': 'user-shadow',
21759    'alert': 'bell',
21760    'announcement': 'megaphone',
21761    'bar-graph-f': 'chart-alt',
21762    'book-f': 'book',
21763    'chart-kpi': 'chart-upward',
21764    'clock-add': 'clock-plus',
21765    'clock-late': 'clock-alt',
21766    'clock-s': 'clock',
21767    'external-link': 'external',
21768    'generic': 'stack',
21769    'generic-f': 'stack',
21770    'global-f': 'globe',
21771    'global-s': 'globe',
21772    'view': 'eye',
21773    'hide': 'eye-slash',
21774    'play': 'controller',
21775    'products': 'box',
21776    'repository': 'box-alt',
21777    'rocket-f': 'rocket',
21778    'rubric': 'tiles-8',
21779    'shop': 'basket'
21780};
21781var PdsIcon = (function (_super) {
21782    __extends(PdsIcon, _super);
21783    function PdsIcon() {
21784        var _this = _super !== null && _super.apply(this, arguments) || this;
21785        _this.is = 'pds-icon';
21786        _this.properties = {
21787            name: {
21788                type: String,
21789                observer: '_nameObserver'
21790            }
21791        };
21792        return _this;
21793    }
21794    PdsIcon.prototype._nameObserver = function () {
21795        var name = this.name;
21796        if (deprecatedNameMap.hasOwnProperty(name)) {
21797            name = deprecatedNameMap[name];
21798        }
21799        var elements = this.querySelectorAll('use');
21800        if (elements != null && elements.length === 2) {
21801            elements[0].setAttributeNS(xlinkns, 'xlink:href', '#' + name);
21802            elements[1].setAttributeNS(xlinkns, 'xlink:href', this.pds.svgSpritePath + '#' + name);
21803        }
21804    };
21805    return PdsIcon;
21806}(pds_widget_1.PdsWidget));
21807exports.PdsIcon = PdsIcon;
21808
21809
21810
21811/***/ }),
21812/* 153 */
21813/***/ (function(module, exports, __webpack_require__) {
21814
21815"use strict";
21816
21817var __extends = (this && this.__extends) || (function () {
21818    var extendStatics = function (d, b) {
21819        extendStatics = Object.setPrototypeOf ||
21820            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21821            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21822        return extendStatics(d, b);
21823    }
21824    return function (d, b) {
21825        extendStatics(d, b);
21826        function __() { this.constructor = d; }
21827        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21828    };
21829})();
21830Object.defineProperty(exports, "__esModule", { value: true });
21831var pds_widget_1 = __webpack_require__(7);
21832var help_link_service_1 = __webpack_require__(106);
21833var PdsHelpMenu = (function (_super) {
21834    __extends(PdsHelpMenu, _super);
21835    function PdsHelpMenu() {
21836        var _this = _super !== null && _super.apply(this, arguments) || this;
21837        _this.is = 'pds-help-menu';
21838        _this.hasError = false;
21839        return _this;
21840    }
21841    PdsHelpMenu.prototype.attached = function () {
21842        var _this = this;
21843        _super.prototype.attached.call(this);
21844        this.helpLinkService = new help_link_service_1.HelpLinkService();
21845        this.isHelpMenuShowing = false;
21846        setTimeout(function () {
21847            _this.initializeHelpLinks();
21848        });
21849    };
21850    PdsHelpMenu.prototype.initializeHelpLinks = function () {
21851        var _this = this;
21852        this.helpLinkService.getNavLinks(this.userDistrictUID, this.userType, ['HELP'], this.pds.preferences.host).subscribe(function (response) {
21853            var helpLinks = JSON.parse(response.data);
21854            var userHelpLinks = [];
21855            var userHelp = {
21856                userType: _this.userType,
21857                helpLinks: userHelpLinks
21858            };
21859            for (var _i = 0, helpLinks_1 = helpLinks; _i < helpLinks_1.length; _i++) {
21860                var helpLink = helpLinks_1[_i];
21861                var helpInfo = {
21862                    url: helpLink.url,
21863                    title: helpLink.name
21864                };
21865                userHelpLinks.push(helpInfo);
21866            }
21867            userHelp.helpLinks = userHelpLinks;
21868            _this.userHelp = userHelp;
21869        }, function (error) {
21870            _this.hasError = true;
21871        });
21872    };
21873    PdsHelpMenu.prototype.toggleHelpMenuDisplay = function (event) {
21874        if (event) {
21875            event.preventDefault();
21876            event.stopImmediatePropagation();
21877        }
21878        this.isHelpMenuShowing = !this.isHelpMenuShowing;
21879    };
21880    PdsHelpMenu.prototype.hideHelpMenuDisplay = function () {
21881        var _this = this;
21882        setTimeout(function () {
21883            _this.isHelpMenuShowing = false;
21884        });
21885    };
21886    return PdsHelpMenu;
21887}(pds_widget_1.PdsWidget));
21888exports.PdsHelpMenu = PdsHelpMenu;
21889
21890
21891
21892/***/ }),
21893/* 154 */
21894/***/ (function(module, exports, __webpack_require__) {
21895
21896"use strict";
21897
21898var __extends = (this && this.__extends) || (function () {
21899    var extendStatics = function (d, b) {
21900        extendStatics = Object.setPrototypeOf ||
21901            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21902            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21903        return extendStatics(d, b);
21904    }
21905    return function (d, b) {
21906        extendStatics(d, b);
21907        function __() { this.constructor = d; }
21908        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21909    };
21910})();
21911Object.defineProperty(exports, "__esModule", { value: true });
21912var pds_widget_1 = __webpack_require__(7);
21913var PdsGlobalCreateMenu = (function (_super) {
21914    __extends(PdsGlobalCreateMenu, _super);
21915    function PdsGlobalCreateMenu() {
21916        var _this = _super !== null && _super.apply(this, arguments) || this;
21917        _this.is = 'pds-global-create-menu';
21918        _this.isGlobalCreateMenuInSetupMode = false;
21919        _this.isGlobalCreateMenuShowing = false;
21920        return _this;
21921    }
21922    PdsGlobalCreateMenu.prototype.ready = function () {
21923        _super.prototype.ready.call(this);
21924        this.isGlobalCreateMenuInSetupMode = false;
21925        this.isGlobalCreateMenuShowing = false;
21926    };
21927    PdsGlobalCreateMenu.prototype.attached = function () {
21928        var _this = this;
21929        _super.prototype.attached.call(this);
21930        this.clickedOutsideDropDown = function (event) {
21931            if (_this.isGlobalCreateMenuShowing) {
21932                var dropdown = _this.querySelector('.pds-global-create-menu-drop-down');
21933                var menuIcon = _this.querySelector('#global-create-menu-link');
21934                if (dropdown != null && !dropdown.contains(event.target) && !menuIcon.contains(event.target)) {
21935                    _this.hideGlobalCreateMenu();
21936                }
21937            }
21938        };
21939    };
21940    PdsGlobalCreateMenu.prototype.getAriaLabelForMenuItem = function (redrawTrigger, isGlobalCreateMenuInSetupMode, menuItem, menuHeader) {
21941        var menuHeaderName = menuHeader ? menuHeader.name : '';
21942        if (isGlobalCreateMenuInSetupMode) {
21943            return this.translate(redrawTrigger, 'pds|global create menu widget|Set xx xx to default action', menuHeaderName, menuItem.name);
21944        }
21945        else {
21946            return this.translate(redrawTrigger, 'pds|global create menu widget|Navigate to xx xx', menuHeaderName, menuItem.name);
21947        }
21948    };
21949    PdsGlobalCreateMenu.prototype.getAriaLabelForPlusButton = function (redrawTrigger, isGlobalCreateMenuShowing, menuItems, defaultMenuItem) {
21950        if (defaultMenuItem == null) {
21951            return this.translate(redrawTrigger, 'pds|global create menu widget|View global create menu default action setup');
21952        }
21953        else {
21954            var defaultmenuHeader = void 0;
21955            if (defaultMenuItem.context != null) {
21956                for (var _i = 0, menuItems_1 = menuItems; _i < menuItems_1.length; _i++) {
21957                    var menuHeader = menuItems_1[_i];
21958                    if (menuHeader.children != null) {
21959                        for (var _a = 0, _b = menuHeader.children; _a < _b.length; _a++) {
21960                            var menuItem = _b[_a];
21961                            if (menuItem.context != null && menuItem.context.uid === defaultMenuItem.context.uid) {
21962                                defaultmenuHeader = menuHeader;
21963                            }
21964                        }
21965                    }
21966                }
21967            }
21968            return this.getAriaLabelForMenuItem(redrawTrigger, false, defaultMenuItem, defaultmenuHeader);
21969        }
21970    };
21971    PdsGlobalCreateMenu.prototype.getAriaLabelForCaretButton = function (redrawTrigger, isGlobalCreateMenuShowing, defaultMenuItem) {
21972        if (isGlobalCreateMenuShowing) {
21973            return this.translate(redrawTrigger, 'pds|global create menu widget|Close global create menu');
21974        }
21975        else {
21976            if (defaultMenuItem == null) {
21977                return this.translate(redrawTrigger, 'pds|global create menu widget|View global create menu default action setup');
21978            }
21979            else {
21980                return this.translate(redrawTrigger, 'pds|global create menu widget|Open global create menu');
21981            }
21982        }
21983    };
21984    PdsGlobalCreateMenu.prototype.getIconName = function (menuItem) {
21985        if (menuItem.iconName == null || menuItem.iconName === '') {
21986            return 'generic-f';
21987        }
21988        else {
21989            return menuItem.iconName;
21990        }
21991    };
21992    PdsGlobalCreateMenu.prototype.isDefault = function (menuItem, defaultMenuItem) {
21993        if (defaultMenuItem == null) {
21994            return false;
21995        }
21996        else {
21997            return menuItem.id === defaultMenuItem.id;
21998        }
21999    };
22000    PdsGlobalCreateMenu.prototype.toggleGlobalCreateMenuDisplay = function (event) {
22001        event.preventDefault();
22002        event.stopImmediatePropagation();
22003        if (this.isGlobalCreateMenuShowing) {
22004            this.hideGlobalCreateMenu();
22005        }
22006        else {
22007            this.showGlobalCreateMenu();
22008        }
22009    };
22010    PdsGlobalCreateMenu.prototype.toggleGlobalCreateMenuSetupMode = function (event) {
22011        this.isGlobalCreateMenuInSetupMode = !this.isGlobalCreateMenuInSetupMode;
22012    };
22013    PdsGlobalCreateMenu.prototype.clickMenuItem = function (event) {
22014        if (this.isGlobalCreateMenuInSetupMode) {
22015            this.setDefault(event);
22016        }
22017        else {
22018            this.navigateToMenuItem(event);
22019        }
22020    };
22021    PdsGlobalCreateMenu.prototype.navigateToMenuItem = function (event) {
22022        if (this.beforeNavigateFunction != null) {
22023            this.beforeNavigateFunction(event);
22024        }
22025        event.preventDefault();
22026        event.stopImmediatePropagation();
22027        var menuItem;
22028        if (event && event.model) {
22029            menuItem = event.model.menuItem;
22030        }
22031        else {
22032            menuItem = this.defaultMenuItem;
22033        }
22034        if (menuItem == null) {
22035            if (this.isGlobalCreateMenuShowing) {
22036                this.isGlobalCreateMenuInSetupMode = true;
22037            }
22038            else {
22039                this.showGlobalCreateMenu();
22040            }
22041        }
22042        else if (menuItem.onUserClick) {
22043            menuItem.onUserClick(menuItem, event);
22044            if (this.isGlobalCreateMenuShowing) {
22045                this.hideGlobalCreateMenu();
22046            }
22047        }
22048        else {
22049            console.error('menu item clicked with no click event');
22050        }
22051    };
22052    PdsGlobalCreateMenu.prototype.setDefault = function (event) {
22053        event.preventDefault();
22054        event.stopImmediatePropagation();
22055        this.defaultMenuItem = event.model.menuItem;
22056        this.fire('pdsDefaultSet', event.model.menuItem);
22057    };
22058    PdsGlobalCreateMenu.prototype.hideGlobalCreateMenu = function () {
22059        this.isGlobalCreateMenuShowing = false;
22060        window.removeEventListener('click', this.clickedOutsideDropDown);
22061    };
22062    PdsGlobalCreateMenu.prototype.showGlobalCreateMenu = function () {
22063        this.isGlobalCreateMenuShowing = true;
22064        this.isGlobalCreateMenuInSetupMode = this.defaultMenuItem == null;
22065        window.addEventListener('click', this.clickedOutsideDropDown, true);
22066    };
22067    return PdsGlobalCreateMenu;
22068}(pds_widget_1.PdsWidget));
22069exports.PdsGlobalCreateMenu = PdsGlobalCreateMenu;
22070
22071
22072
22073/***/ }),
22074/* 155 */
22075/***/ (function(module, exports, __webpack_require__) {
22076
22077"use strict";
22078
22079var __extends = (this && this.__extends) || (function () {
22080    var extendStatics = function (d, b) {
22081        extendStatics = Object.setPrototypeOf ||
22082            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22083            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22084        return extendStatics(d, b);
22085    }
22086    return function (d, b) {
22087        extendStatics(d, b);
22088        function __() { this.constructor = d; }
22089        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22090    };
22091})();
22092Object.defineProperty(exports, "__esModule", { value: true });
22093var pds_widget_1 = __webpack_require__(7);
22094var xlinkns = 'http://www.w3.org/1999/xlink';
22095var PdsLoader = (function (_super) {
22096    __extends(PdsLoader, _super);
22097    function PdsLoader() {
22098        var _this = _super !== null && _super.apply(this, arguments) || this;
22099        _this.is = 'pds-loader';
22100        _this.properties = {
22101            dataSize: {
22102                type: String,
22103                value: 'medium'
22104            },
22105            dataAnnounceText: {
22106                type: String,
22107                value: ''
22108            },
22109            dataCompleteLoading: {
22110                type: String,
22111                value: ''
22112            }
22113        };
22114        return _this;
22115    }
22116    PdsLoader.prototype.attached = function () {
22117        if (this.dataAnnounceText.trim() !== '') {
22118            this.pds.accessibility.announceViaScreenReader(this.dataAnnounceText);
22119        }
22120    };
22121    PdsLoader.prototype.detached = function () {
22122        if (this.dataCompleteLoading.trim() !== '') {
22123            this.pds.accessibility.announceViaScreenReader(this.dataCompleteLoading);
22124        }
22125    };
22126    PdsLoader.prototype.getLoaderClassName = function (size) {
22127        switch (size) {
22128            case 'small':
22129                return 'pds-loader-sm';
22130            case 'large':
22131                return 'pds-loader-lg';
22132            case 'medium':
22133            default:
22134                return 'pds-loader';
22135        }
22136    };
22137    return PdsLoader;
22138}(pds_widget_1.PdsWidget));
22139exports.PdsLoader = PdsLoader;
22140
22141
22142
22143/***/ }),
22144/* 156 */
22145/***/ (function(module, exports, __webpack_require__) {
22146
22147"use strict";
22148
22149var __extends = (this && this.__extends) || (function () {
22150    var extendStatics = function (d, b) {
22151        extendStatics = Object.setPrototypeOf ||
22152            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22153            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22154        return extendStatics(d, b);
22155    }
22156    return function (d, b) {
22157        extendStatics(d, b);
22158        function __() { this.constructor = d; }
22159        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22160    };
22161})();
22162Object.defineProperty(exports, "__esModule", { value: true });
22163var pds_widget_1 = __webpack_require__(7);
22164var pds_i18n_1 = __webpack_require__(15);
22165var PdsCircularProgress = (function (_super) {
22166    __extends(PdsCircularProgress, _super);
22167    function PdsCircularProgress() {
22168        var _this = _super !== null && _super.apply(this, arguments) || this;
22169        _this.is = 'pds-circular-progress';
22170        _this.properties = {
22171            dataValue: {
22172                type: Number,
22173                value: 0
22174            },
22175            dataMax: {
22176                type: Number,
22177                value: 0
22178            },
22179            dataPercent: {
22180                type: Number,
22181                value: null
22182            },
22183            dataColor: {
22184                type: String,
22185                value: 'pds-default-color'
22186            },
22187            dataSize: {
22188                type: String,
22189                value: 'pds-default-size'
22190            },
22191            bgcolor: {
22192                type: String,
22193                value: 'white'
22194            }
22195        };
22196        return _this;
22197    }
22198    PdsCircularProgress.prototype.getColorClass = function () {
22199        if (this.dataColor == null) {
22200            return 'pds-default-color';
22201        }
22202        if (!this.dataColor.startsWith('pds-')) {
22203            this.dataColor = 'pds-' + this.dataColor;
22204        }
22205        if (this.dataColor === 'pds-default-color' || this.dataColor === 'pds-green' ||
22206            this.dataColor === 'pds-orange' || this.dataColor === 'pds-red' || this.dataColor === 'pds-blue') {
22207            return this.dataColor;
22208        }
22209        else {
22210            return 'pds-default-color';
22211        }
22212    };
22213    PdsCircularProgress.prototype.getSizeClass = function () {
22214        if (this.dataSize == null) {
22215            return 'pds-default-size';
22216        }
22217        if (!this.dataSize.startsWith('pds-')) {
22218            this.dataSize = 'pds-' + this.dataSize;
22219        }
22220        if (this.dataSize === 'pds-default-size' || this.dataSize === 'pds-small' || this.dataSize === 'pds-medium') {
22221            return this.dataSize;
22222        }
22223        return 'pds-default-size';
22224    };
22225    PdsCircularProgress.prototype.isLogicalZero = function (testVal) {
22226        return (isNaN(testVal) || testVal == null || testVal <= 0);
22227    };
22228    PdsCircularProgress.prototype.isComplete = function () {
22229        if (this.dataPercent) {
22230            return (this.dataPercent >= 100);
22231        }
22232        if (this.isLogicalZero(this.dataMax) || this.isLogicalZero(this.dataValue)) {
22233            return false;
22234        }
22235        if (this.dataValue >= this.dataMax) {
22236            return true;
22237        }
22238        return false;
22239    };
22240    PdsCircularProgress.prototype.getCompleteMessage = function () {
22241        if (this.dataPercent != null) {
22242            return pds_i18n_1.pdsI18n.getText('pds|circular progress|xx% Complete', { percent: this.dataPercent });
22243        }
22244        var value = 0;
22245        var max = 0;
22246        if (this.dataValue != null && this.dataValue > 0) {
22247            value = this.dataValue;
22248        }
22249        if (this.dataMax != null && this.dataMax > 0) {
22250            max = this.dataMax;
22251        }
22252        return pds_i18n_1.pdsI18n.getText('pds|circular progress|xx of xx', { value: value, max: max });
22253    };
22254    PdsCircularProgress.prototype.getSafePercent = function () {
22255        if (this.dataPercent) {
22256            if (this.dataPercent < 0) {
22257                this.dataPercent = 0;
22258            }
22259            if (this.dataPercent > 100) {
22260                this.dataPercent = 100;
22261            }
22262            return Math.round(this.dataPercent);
22263        }
22264        if (this.isLogicalZero(this.dataMax) || this.isLogicalZero(this.dataValue)) {
22265            return 0;
22266        }
22267        if (this.dataValue >= this.dataMax) {
22268            return 100;
22269        }
22270        return Math.round(this.dataValue / this.dataMax * 100);
22271    };
22272    return PdsCircularProgress;
22273}(pds_widget_1.PdsWidget));
22274exports.PdsCircularProgress = PdsCircularProgress;
22275
22276
22277
22278/***/ }),
22279/* 157 */
22280/***/ (function(module, exports, __webpack_require__) {
22281
22282"use strict";
22283
22284var __extends = (this && this.__extends) || (function () {
22285    var extendStatics = function (d, b) {
22286        extendStatics = Object.setPrototypeOf ||
22287            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22288            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22289        return extendStatics(d, b);
22290    }
22291    return function (d, b) {
22292        extendStatics(d, b);
22293        function __() { this.constructor = d; }
22294        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22295    };
22296})();
22297Object.defineProperty(exports, "__esModule", { value: true });
22298var pds_abstract_input_widget_1 = __webpack_require__(31);
22299var pds_validation_rules_engine_1 = __webpack_require__(26);
22300var pds_logger_1 = __webpack_require__(41);
22301var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('input-widgets'), 'pds-radio-button-widget.ts');
22302var PdsRadioButtonWidget = (function (_super) {
22303    __extends(PdsRadioButtonWidget, _super);
22304    function PdsRadioButtonWidget() {
22305        var _this = _super !== null && _super.apply(this, arguments) || this;
22306        _this.is = 'pds-radio-button-widget';
22307        _this.options = null;
22308        _this.properties = {
22309            name: String,
22310            dataLabelText: String,
22311            dataShowLabel: {
22312                type: String,
22313                value: null
22314            },
22315            dataBadgeText: {
22316                type: String,
22317                value: '',
22318                observer: 'setUpBadge'
22319            },
22320            dataHelperText: {
22321                type: String,
22322                value: null
22323            },
22324            dataTooltipText: String,
22325            dataUseAlternateColorScheme: {
22326                type: String,
22327                value: 'false'
22328            },
22329            disabled: {
22330                type: String,
22331                observer: 'updateDisabled',
22332                value: 'false'
22333            },
22334            dataIsfieldonly: {
22335                type: String,
22336                value: 'false'
22337            },
22338            dataHideUnelevatedBadge: {
22339                type: String,
22340                value: 'false',
22341                observer: 'setUpBadge'
22342            },
22343            dataDisableInvalidBadgeElevation: {
22344                type: String,
22345                value: 'false',
22346                observer: 'setUpBadge'
22347            },
22348            dataIsrequired: {
22349                type: String,
22350                value: 'false',
22351                observer: 'setUpBadge'
22352            },
22353            dataUseValidIndicator: {
22354                type: String,
22355                value: 'false'
22356            },
22357            dataCustomvalidate: String,
22358            dataShowClear: {
22359                type: String,
22360                value: 'false'
22361            },
22362            options: {
22363                type: Array,
22364                observer: 'renderInputs'
22365            }
22366        };
22367        _this._modelValue = undefined;
22368        return _this;
22369    }
22370    PdsRadioButtonWidget.prototype.generateValidationRules = function () {
22371        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
22372        validationRules.isText = true;
22373        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
22374        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
22375        if ('dataCustomvalidate' in this) {
22376            this.validators.push({
22377                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
22378                condition: {
22379                    element: this
22380                }
22381            });
22382        }
22383    };
22384    PdsRadioButtonWidget.prototype.inputSelector = function () {
22385        var input = this.querySelector('input:checked');
22386        return {
22387            value: input && input.value || '',
22388            modelValue: this._modelValue
22389        };
22390    };
22391    PdsRadioButtonWidget.prototype.redrawOptions = function () {
22392        log("Redrawing the options for " + this.name + ".");
22393        this.redraw('options');
22394        this.setValue(this.modelValue, true);
22395    };
22396    PdsRadioButtonWidget.prototype.setModelValue = function (modelValue, skip) {
22397        if (skip === void 0) { skip = false; }
22398        if (modelValue !== this._modelValue) {
22399            log("Setting " + this.name + "'s model value from '" + this._modelValue + "' to '" + modelValue + "'.");
22400            this._modelValue = modelValue;
22401            if (skip !== true) {
22402                this.setValue(modelValue, true);
22403            }
22404            return true;
22405        }
22406        return false;
22407    };
22408    PdsRadioButtonWidget.prototype.setValue = function (value, skip) {
22409        if (skip === void 0) { skip = false; }
22410        if (value == null) {
22411            value = '';
22412        }
22413        var radioInputElements = this.querySelectorAll('input');
22414        if (radioInputElements != null) {
22415            for (var i = 0; i < radioInputElements.length; i++) {
22416                radioInputElements[i].checked = (radioInputElements[i].value === value);
22417            }
22418        }
22419        if (skip !== true) {
22420            this.setModelValue(value, true);
22421        }
22422    };
22423    PdsRadioButtonWidget.prototype.clearRadioButton = function () {
22424        this.setModelValue('');
22425        this.inputChange();
22426    };
22427    PdsRadioButtonWidget.prototype.renderInputs = function () {
22428        var _this = this;
22429        var container = this.querySelector('ul');
22430        container.innerHTML = '';
22431        var optionIndex = 0;
22432        if (this.options != null) {
22433            for (var _i = 0, _a = this.options; _i < _a.length; _i++) {
22434                var option = _a[_i];
22435                var liEl = createElement('li');
22436                var labelEl = createElement('label');
22437                var inputEl = createElement('input');
22438                var divEl = createElement('div');
22439                var pEl = createElement('p');
22440                labelEl.setAttribute('for', this.name + "-option-" + optionIndex);
22441                inputEl.setAttribute('id', this.name + "-option-" + optionIndex);
22442                inputEl.setAttribute('type', 'radio');
22443                inputEl.setAttribute('name', this.name);
22444                inputEl.setAttribute('value', option.value);
22445                inputEl.addEventListener('blur', function (event) {
22446                    _this.focusLost(event);
22447                });
22448                inputEl.addEventListener('change', function (event) {
22449                    _this.inputChange();
22450                });
22451                inputEl.required = (this.dataIsrequired === 'true');
22452                inputEl.disabled = (this.isDisabled() === 'disabled');
22453                inputEl.checked = (this._modelValue === option.value);
22454                divEl.classList.add('pds-label-text');
22455                divEl.textContent = option.text;
22456                pEl.classList.add('pds-help-text');
22457                pEl.textContent = option.helperText || null;
22458                container.appendChild(liEl);
22459                liEl.appendChild(labelEl);
22460                liEl.appendChild(pEl);
22461                labelEl.appendChild(inputEl);
22462                labelEl.appendChild(divEl);
22463                optionIndex++;
22464            }
22465        }
22466    };
22467    PdsRadioButtonWidget.prototype.updateDisabled = function () {
22468        var radioInputElements = this.querySelectorAll('input');
22469        if (radioInputElements != null) {
22470            for (var i = 0; i < radioInputElements.length; i++) {
22471                radioInputElements[i].disabled = (this.isDisabled() === 'disabled');
22472            }
22473        }
22474    };
22475    PdsRadioButtonWidget.prototype.inputChange = function () {
22476        this.errorPresentWhenBlurOccurred = true;
22477        _super.prototype.inputChange.call(this);
22478    };
22479    PdsRadioButtonWidget.prototype.validateWidget = function (showValidationResult) {
22480        if (showValidationResult === void 0) { showValidationResult = false; }
22481        return _super.prototype.validateWidget.call(this, true);
22482    };
22483    return PdsRadioButtonWidget;
22484}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
22485exports.PdsRadioButtonWidget = PdsRadioButtonWidget;
22486function createElement(tagName) {
22487    var element = document.createElement(tagName);
22488    element.classList.add('pds-radio-button-widget');
22489    return element;
22490}
22491
22492
22493
22494/***/ }),
22495/* 158 */
22496/***/ (function(module, exports, __webpack_require__) {
22497
22498"use strict";
22499
22500var __extends = (this && this.__extends) || (function () {
22501    var extendStatics = function (d, b) {
22502        extendStatics = Object.setPrototypeOf ||
22503            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22504            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22505        return extendStatics(d, b);
22506    }
22507    return function (d, b) {
22508        extendStatics(d, b);
22509        function __() { this.constructor = d; }
22510        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22511    };
22512})();
22513Object.defineProperty(exports, "__esModule", { value: true });
22514var pds_abstract_input_widget_1 = __webpack_require__(31);
22515var rich_text_editor_configurations_1 = __webpack_require__(159);
22516var pds_validation_rules_engine_1 = __webpack_require__(26);
22517var pds_utils_1 = __webpack_require__(18);
22518var pds_i18n_1 = __webpack_require__(15);
22519var pds_logger_1 = __webpack_require__(41);
22520var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('input-widgets'), 'pds-rich-text-editor.ts');
22521function handleCKEditorDialogDefinitionEvent(evt) {
22522    if (evt != null && evt.data != null && evt.data.name === 'link' && evt.data.definition != null) {
22523        var info = evt.data.definition.getContents('info');
22524        var protocol = info != null ? info.get('protocol') : null;
22525        if (protocol != null && protocol.items != null) {
22526            protocol.items = protocol.items.filter(function (item) {
22527                return item && item[1] !== '';
22528            });
22529        }
22530        var informationTab = evt.data.definition.getContents('target');
22531        var targetField = informationTab != null ? informationTab.get('linkTargetType') : null;
22532        if (targetField != null) {
22533            targetField.default = '_blank';
22534        }
22535    }
22536}
22537exports.handleCKEditorDialogDefinitionEvent = handleCKEditorDialogDefinitionEvent;
22538if (typeof CKEDITOR !== 'undefined' && CKEDITOR != null) {
22539    CKEDITOR.on('dialogDefinition', handleCKEditorDialogDefinitionEvent);
22540    var ckeSetLangFunction_1 = CKEDITOR.plugins.setLang;
22541    CKEDITOR.plugins.setLang = function (a, b, c) {
22542        pds_i18n_1.pdsI18n.updateCKEditorMessageKeys(c, 'CKEDITOR.plugins.get(\'wordcount\').langEntries.en');
22543        ckeSetLangFunction_1.apply(CKEDITOR.plugins, arguments);
22544    };
22545}
22546var PdsRichTextEditor = (function (_super) {
22547    __extends(PdsRichTextEditor, _super);
22548    function PdsRichTextEditor() {
22549        var _this = _super !== null && _super.apply(this, arguments) || this;
22550        _this.is = 'pds-rich-text-editor';
22551        _this.properties = {
22552            dataLabelText: String,
22553            dataShowLabel: {
22554                type: String,
22555                value: null
22556            },
22557            name: {
22558                type: String,
22559                value: ''
22560            },
22561            dataBadgeText: {
22562                type: String,
22563                value: '',
22564                observer: 'setUpBadge'
22565            },
22566            dataHideUnelevatedBadge: {
22567                type: String,
22568                value: 'false',
22569                observer: 'setUpBadge'
22570            },
22571            dataDisableInvalidBadgeElevation: {
22572                type: String,
22573                value: 'false',
22574                observer: 'setUpBadge'
22575            },
22576            dataIsrequired: {
22577                type: String,
22578                value: 'false',
22579                observer: 'setUpBadge'
22580            },
22581            dataMaxlength: {
22582                type: String,
22583                value: '500',
22584                observer: 'reinitializeEditor'
22585            },
22586            dataIsreadonly: String,
22587            dataNoToolbar: {
22588                type: String,
22589                value: 'false'
22590            },
22591            dataIsAdvanced: {
22592                type: String,
22593                value: 'false',
22594                observer: 'reinitializeEditor'
22595            },
22596            dataCollapsibleToolbar: {
22597                type: String,
22598                value: 'false'
22599            },
22600            dataHelperText: {
22601                type: String,
22602                value: null
22603            },
22604            dataTooltipText: String,
22605            dataUseAlternateColorScheme: {
22606                type: String,
22607                value: 'false'
22608            },
22609            dataToolbarStartupExpanded: {
22610                type: String,
22611                value: 'true'
22612            },
22613            dataHideBottombar: {
22614                type: String,
22615                value: 'false'
22616            },
22617            dataEnableInfoNotification: {
22618                type: String,
22619                value: 'false'
22620            },
22621            dataShowCharcount: {
22622                type: String,
22623                value: 'true'
22624            },
22625            dataAutoFocus: {
22626                type: String,
22627                value: 'false'
22628            },
22629            dataAutoParagraph: {
22630                type: String,
22631                value: 'true'
22632            },
22633            dataShowSource: {
22634                type: String,
22635                value: 'false'
22636            },
22637            dataPlainTextOnly: {
22638                type: String,
22639                value: 'false'
22640            }
22641        };
22642        return _this;
22643    }
22644    PdsRichTextEditor.prototype.reinitializeEditor = function () {
22645        log('reinitializeEditor() called');
22646        if (this.isAttached === true) {
22647            this.initializeEditor(this.dataIsAdvanced, this.dataNoToolbar, this.dataCollapsibleToolbar, this.dataToolbarStartupExpanded, this.dataHideBottombar, this.dataEnableInfoNotification, this.dataShowCharcount, this.dataAutoFocus, this.dataShowSource, this.dataAutoParagraph);
22648            this.setUpBadge();
22649        }
22650    };
22651    PdsRichTextEditor.prototype.generateValidationRules = function () {
22652        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
22653        validationRules.isRequired = (this.dataIsrequired === 'true');
22654        validationRules.isText = true;
22655        validationRules.setProperty('maxLength', this.dataMaxlength, Number);
22656        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
22657        if (this.hasOwnProperty('dataCustomvalidate')) {
22658            this.validators.push({
22659                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
22660                condition: {
22661                    element: this
22662                }
22663            });
22664        }
22665    };
22666    PdsRichTextEditor.prototype.showBadge = function (dataBadgeText) {
22667        return (dataBadgeText != null && dataBadgeText.length > 0);
22668    };
22669    PdsRichTextEditor.prototype.getConfiguration = function (options) {
22670        log('getConfiguration() called');
22671        var configuration = rich_text_editor_configurations_1.RichTextEditorConfiguration.getConfiguration(options);
22672        configuration.wordcount.maxCharCount = this.dataMaxlength;
22673        return configuration;
22674    };
22675    PdsRichTextEditor.prototype.attached = function () {
22676        log('attached() called');
22677        _super.prototype.attached.call(this);
22678        this.isAttached = true;
22679        this.initializeEditor(this.dataIsAdvanced, this.dataNoToolbar, this.dataCollapsibleToolbar, this.dataToolbarStartupExpanded, this.dataHideBottombar, this.dataEnableInfoNotification, this.dataShowCharcount, this.dataAutoFocus, this.dataShowSource, this.dataAutoParagraph);
22680    };
22681    PdsRichTextEditor.prototype.detached = function () {
22682        this.isAttached = false;
22683    };
22684    PdsRichTextEditor.prototype.onEditorChange = function () {
22685        log('onEditorChange() called');
22686        if (this.ignoreEditorChange) {
22687            this.ignoreEditorChange = true;
22688        }
22689        else {
22690            this.inputChange();
22691            this.validateWidget(true);
22692            this.dispatchInputEvent(this.querySelector("#" + this.name + "-rich-text-editor"));
22693        }
22694    };
22695    PdsRichTextEditor.prototype.initializeEditor = function (dataIsAdvanced, dataNoToolbar, dataCollapsibleToolbar, dataToolbarStartupExpanded, dataHideBottombar, dataEnableInfoNotification, dataShowCharcount, dataAutoFocus, dataShowSource, dataAutoParagraph) {
22696        var _this = this;
22697        if (this.isAttached) {
22698            var isOkayToProceed = this.areStrings(Array.from(arguments));
22699            if (isOkayToProceed) {
22700                var enableInfoNotification_1 = (dataEnableInfoNotification === 'true');
22701                var options = {
22702                    isReadOnly: (this.dataIsreadonly === 'true'),
22703                    showToolbar: (dataNoToolbar !== 'true'),
22704                    collapsibleToolbar: (dataCollapsibleToolbar === 'true'),
22705                    toolbarStartupExpanded: (dataToolbarStartupExpanded === 'true'),
22706                    showBottomBar: (dataHideBottombar !== 'true'),
22707                    showCharCount: (dataShowCharcount === 'true') && (dataHideBottombar !== 'true'),
22708                    useAdvancedMode: (dataIsAdvanced === 'true'),
22709                    startupFocus: (dataAutoFocus === 'true'),
22710                    showSource: (dataShowSource === 'true'),
22711                    autoParagraph: (dataAutoParagraph === 'true')
22712                };
22713                var configuration = this.getConfiguration(options);
22714                if (this.editor != null) {
22715                    var data = this.modelValue;
22716                    this.editor.focusManager.blur(true);
22717                    this.editor.destroy(true);
22718                    this.editor = CKEDITOR.replace(this.name + '-rich-text-editor', configuration);
22719                    this.editor.setData(data);
22720                }
22721                else {
22722                    this.editor = CKEDITOR.replace(this.name + '-rich-text-editor', configuration);
22723                    this.editor.setData(this.initValue);
22724                    delete this.initValue;
22725                }
22726                this.editor.on('mode', function () {
22727                    if (_this.editor.mode === 'source') {
22728                        var editable = _this.editor.editable();
22729                        editable.attachListener(editable, 'blur', function () {
22730                            _this.focusLost(new Event('blur'));
22731                        });
22732                        editable.attachListener(editable, 'input', function () {
22733                            _this.onEditorChange();
22734                        });
22735                    }
22736                });
22737                this.editor.on('change', function () {
22738                    _this.onEditorChange();
22739                });
22740                this.editor.on('instanceReady', function () {
22741                    _this.ignoreEditorChange = false;
22742                });
22743                this.editor.on('blur', function () {
22744                    _this.focusLost(new Event('blur'));
22745                });
22746                this.editor.on('focus', function () {
22747                    _this.dispatchEvent(new Event('focus'));
22748                });
22749                this.editor.on('langLoaded', function () {
22750                    log('ck editor lang loaded');
22751                    pds_i18n_1.pdsI18n.updateCKEditorMessageKeys(CKEDITOR.lang.en, 'CKEDITOR.lang.en');
22752                });
22753                this.editor.on('notificationShow', function (evt) {
22754                    if (!enableInfoNotification_1 && evt.data.notification.type === 'info') {
22755                        evt.cancel();
22756                    }
22757                });
22758                this.editor.on('notificationUpdate', function (evt) {
22759                    if (!enableInfoNotification_1 && evt.data.notification.type === 'info') {
22760                        evt.cancel();
22761                    }
22762                });
22763            }
22764        }
22765    };
22766    Object.defineProperty(PdsRichTextEditor.prototype, "value", {
22767        get: function () {
22768            if (this.editor != null) {
22769                return (this.dataPlainTextOnly === 'true') ? pds_utils_1.pdsUtils.stripHtml(this.editor.getData()) : this.editor.getData();
22770            }
22771        },
22772        enumerable: true,
22773        configurable: true
22774    });
22775    Object.defineProperty(PdsRichTextEditor.prototype, "modelValue", {
22776        get: function () {
22777            if (this.editor != null) {
22778                return (this.dataPlainTextOnly === 'true') ? pds_utils_1.pdsUtils.stripHtml(this.editor.getData()) : this.editor.getData();
22779            }
22780            else {
22781                return this.initValue;
22782            }
22783        },
22784        set: function (value) {
22785            log('set modelValue called. value: ' + value);
22786            if (this.editor == null) {
22787                this.initValue = value;
22788            }
22789            this.ignoreEditorChange = true;
22790            var modelValueChanged = this.setModelValue(value);
22791            if (modelValueChanged) {
22792                this.validateWidget();
22793            }
22794        },
22795        enumerable: true,
22796        configurable: true
22797    });
22798    PdsRichTextEditor.prototype.setValue = function (value, skip) {
22799        if (skip === void 0) { skip = false; }
22800        log('setValue called. value: ' + value + ' skip: ' + skip);
22801        if (value == null) {
22802            value = '';
22803        }
22804        if (this.editor != null && value !== ((this.dataPlainTextOnly === 'true') ? pds_utils_1.pdsUtils.stripHtml(this.editor.getData()) : this.editor.getData())) {
22805            this.editor.setData(value);
22806        }
22807        if (skip !== true) {
22808            this.setModelValue(value, true);
22809        }
22810    };
22811    PdsRichTextEditor.prototype.setModelValue = function (modelValue, skip) {
22812        var _this = this;
22813        log('setModelValue called. modelValue: ' + modelValue + ' skip: ' + skip);
22814        if (this.editor != null && modelValue !== ((this.dataPlainTextOnly === 'true') ? pds_utils_1.pdsUtils.stripHtml(this.editor.getData()) : this.editor.getData())) {
22815            try {
22816                this.editor.setData(modelValue, {
22817                    callback: function () {
22818                        _this.ignoreEditorChange = false;
22819                    }
22820                });
22821            }
22822            catch (e) {
22823                this.ignoreEditorChange = false;
22824            }
22825            if (skip !== true) {
22826                this.setValue(modelValue, true);
22827            }
22828            return true;
22829        }
22830        else {
22831            this.ignoreEditorChange = false;
22832        }
22833        return false;
22834    };
22835    PdsRichTextEditor.prototype.areStrings = function (values) {
22836        for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
22837            var value = values_1[_i];
22838            if (typeof value !== 'string') {
22839                return false;
22840            }
22841        }
22842        return true;
22843    };
22844    return PdsRichTextEditor;
22845}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
22846exports.PdsRichTextEditor = PdsRichTextEditor;
22847
22848
22849
22850/***/ }),
22851/* 159 */
22852/***/ (function(module, exports, __webpack_require__) {
22853
22854"use strict";
22855
22856Object.defineProperty(exports, "__esModule", { value: true });
22857var pds_local_storage_1 = __webpack_require__(45);
22858var RichTextEditorConfiguration = (function () {
22859    function RichTextEditorConfiguration() {
22860    }
22861    RichTextEditorConfiguration.getConfiguration = function (options) {
22862        if (options === void 0) { options = {
22863            isReadOnly: false,
22864            showToolbar: true,
22865            collapsibleToolbar: false,
22866            toolbarStartupExpanded: true,
22867            showBottomBar: true,
22868            showCharCount: true,
22869            useAdvancedMode: false,
22870            startupFocus: false,
22871            autoParagraph: false,
22872            showSource: false
22873        }; }
22874        var configuration = {
22875            toolbar: [{ name: 'emptyToolbar', items: [] }],
22876            customConfig: '',
22877            extraPlugins: 'justify,font,colorbutton,autoembed,embedsemantic,image2,wordcount',
22878            removePlugins: 'image',
22879            wordcount: {
22880                showParagraphs: false,
22881                showWordCount: false,
22882                showCharCount: false,
22883                countHTML: false,
22884                maxCharCount: -1
22885            },
22886            bodyClass: 'article-editor',
22887            format_tags: 'p;h1;h2;h3;pre',
22888            removeDialogTabs: 'image:advanced;link:advanced',
22889            readOnly: false,
22890            allowedContent: false,
22891            stylesSet: undefined,
22892            startupFocus: false,
22893            disableNativeSpellChecker: false,
22894            linkShowTargetTab: false,
22895            fontSize_defaultLabel: '16',
22896            autoParagraph: true,
22897            language: 'en'
22898        };
22899        configuration.autoParagraph = options.autoParagraph;
22900        if (!options.showBottomBar) {
22901            configuration.removePlugins += ',elementspath';
22902            configuration.resize_enabled = false;
22903        }
22904        if (options.startupFocus) {
22905            configuration.startupFocus = true;
22906        }
22907        if (options.isReadOnly) {
22908            configuration.readOnly = true;
22909            configuration.allowedContent = true;
22910        }
22911        else {
22912            if (options.showCharCount) {
22913                configuration.wordcount.showCharCount = true;
22914                configuration.wordcount.countHTML = true;
22915            }
22916            if (options.showToolbar) {
22917                configuration.toolbarCanCollapse = options.collapsibleToolbar;
22918                configuration.toolbarStartupExpanded = options.toolbarStartupExpanded;
22919                var externalLinkSource = {
22920                    name: 'externallinks',
22921                    items: ['Source']
22922                };
22923                if (options.useAdvancedMode) {
22924                    configuration.toolbar = [
22925                        { name: 'clipboard', items: ['Undo', 'Redo'] },
22926                        { name: 'styles', items: ['Styles', 'Format'] },
22927                        { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat'] },
22928                        { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote'] },
22929                        { name: 'links', items: ['Link', 'Unlink'] },
22930                        { name: 'insert', items: ['Image', 'EmbedSemantic', 'Table'] },
22931                        { name: 'tools', items: ['Maximize'] }
22932                    ];
22933                    if (pds_local_storage_1.pdsLocalStorage.getPersistedBoolean('debug') || options.showSource) {
22934                        configuration.toolbar.push(externalLinkSource);
22935                    }
22936                    configuration.stylesSet = [
22937                        { name: 'Marker', element: 'span', attributes: { 'class': 'marker' } },
22938                        { name: 'Cited Work', element: 'cite' },
22939                        { name: 'Inline Quotation', element: 'q' },
22940                        { name: 'Special Container', element: 'div', styles: { padding: '5px 10px', background: '#eee', border: '1px solid #ccc' } },
22941                        { name: 'Compact table', element: 'table', attributes: { cellpadding: '5', cellspacing: '0', border: '1', bordercolor: '#ccc' }, styles: { 'border-collapse': 'collapse' } },
22942                        { name: 'Borderless Table', element: 'table', styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
22943                        { name: 'Square Bulleted List', element: 'ul', styles: { 'list-style-type': 'square' } },
22944                        { name: 'Illustration', type: 'widget', widget: 'image', attributes: { 'class': 'image-illustration' } },
22945                        { name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' } },
22946                        { name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' } },
22947                        { name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' } },
22948                        { name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' } },
22949                        { name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' } }
22950                    ];
22951                }
22952                else {
22953                    var externalLinks = ['Link', 'Unlink', '-', 'Image', 'PasteFromWord'];
22954                    if (pds_local_storage_1.pdsLocalStorage.getPersistedBoolean('debug') || options.showSource) {
22955                        externalLinks.push('Source');
22956                    }
22957                    configuration.toolbar = [
22958                        { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline'] },
22959                        { name: 'font', items: ['TextColor', 'BGColor', 'FontSize'] },
22960                        { name: 'formatting', items: ['JustifyLeft', 'JustifyCenter'] },
22961                        { name: 'paragraphstyles', items: ['BulletedList', 'NumberedList', 'Table'] },
22962                        { name: 'externallinks', items: externalLinks }
22963                    ];
22964                }
22965            }
22966        }
22967        if (options.showSource && typeof CKEDITOR !== 'undefined' && CKEDITOR != null) {
22968            configuration.allowedContent = {
22969                $1: {
22970                    elements: CKEDITOR.dtd,
22971                    attributes: true,
22972                    styles: true,
22973                    classes: true
22974                }
22975            };
22976            configuration.disallowedContent = 'script; *[on*]';
22977        }
22978        return configuration;
22979    };
22980    return RichTextEditorConfiguration;
22981}());
22982exports.RichTextEditorConfiguration = RichTextEditorConfiguration;
22983
22984
22985
22986/***/ }),
22987/* 160 */
22988/***/ (function(module, exports, __webpack_require__) {
22989
22990"use strict";
22991
22992var __extends = (this && this.__extends) || (function () {
22993    var extendStatics = function (d, b) {
22994        extendStatics = Object.setPrototypeOf ||
22995            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22996            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22997        return extendStatics(d, b);
22998    }
22999    return function (d, b) {
23000        extendStatics(d, b);
23001        function __() { this.constructor = d; }
23002        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23003    };
23004})();
23005Object.defineProperty(exports, "__esModule", { value: true });
23006var pds_widget_1 = __webpack_require__(7);
23007var PdsImg = (function (_super) {
23008    __extends(PdsImg, _super);
23009    function PdsImg() {
23010        var _this = _super !== null && _super.apply(this, arguments) || this;
23011        _this.is = 'pds-img';
23012        _this.properties = {
23013            src: String,
23014            fallbackIconName: String,
23015            useImage: {
23016                type: Boolean,
23017                value: true
23018            },
23019            alt: String,
23020            width: Number,
23021            height: Number
23022        };
23023        return _this;
23024    }
23025    PdsImg.prototype.ready = function () {
23026        _super.prototype.ready.call(this);
23027        this.useImage = true;
23028        this.alt = 'PowerSchool image';
23029    };
23030    PdsImg.prototype.onImageError = function () {
23031        this.useImage = false;
23032    };
23033    PdsImg.prototype.attached = function () {
23034        var _this = this;
23035        _super.prototype.attached.call(this);
23036        setTimeout(function () {
23037            if (_this.fallbackIconName == null || _this.fallbackIconName.length === 0) {
23038                throw 'Must configure a fallBackIconName';
23039            }
23040            if (_this.useImage && _this.src == null) {
23041                throw 'Use Image is set to true, but no image source was specified.';
23042            }
23043        });
23044    };
23045    return PdsImg;
23046}(pds_widget_1.PdsWidget));
23047exports.PdsImg = PdsImg;
23048
23049
23050
23051/***/ }),
23052/* 161 */
23053/***/ (function(module, exports, __webpack_require__) {
23054
23055"use strict";
23056
23057var __extends = (this && this.__extends) || (function () {
23058    var extendStatics = function (d, b) {
23059        extendStatics = Object.setPrototypeOf ||
23060            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23061            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23062        return extendStatics(d, b);
23063    }
23064    return function (d, b) {
23065        extendStatics(d, b);
23066        function __() { this.constructor = d; }
23067        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23068    };
23069})();
23070Object.defineProperty(exports, "__esModule", { value: true });
23071var pds_widget_1 = __webpack_require__(7);
23072var PdsOverlayDropdown = (function (_super) {
23073    __extends(PdsOverlayDropdown, _super);
23074    function PdsOverlayDropdown() {
23075        var _this = _super !== null && _super.apply(this, arguments) || this;
23076        _this.is = 'pds-overlay-dropdown';
23077        _this.siblingClicked = false;
23078        _this.queuedEmit = false;
23079        return _this;
23080    }
23081    PdsOverlayDropdown.prototype.ready = function () {
23082        var _this = this;
23083        _super.prototype.ready.call(this);
23084        this.isReady = false;
23085        this.queuedEmit = false;
23086        this.onBodyClick = function (event) {
23087            if (_this.ready) {
23088                _this.emitEscape();
23089            }
23090        };
23091        this.onKeyDown = function (event) {
23092            if (event.keyCode === 27) {
23093                _this.emitEscape();
23094            }
23095        };
23096        this.siblingClick = function (ev) {
23097            _this.siblingClicked = true;
23098        };
23099    };
23100    PdsOverlayDropdown.prototype.attached = function () {
23101        var _this = this;
23102        _super.prototype.attached.call(this);
23103        setTimeout(function () {
23104            _this.listeningSibling = _this.nextElementSibling;
23105            _this.listeningSibling.addEventListener('click', _this.siblingClick, true);
23106            window.addEventListener('keydown', _this.onKeyDown);
23107            window.document.body.addEventListener('click', _this.onBodyClick, true);
23108            setTimeout(function () {
23109                _this.isReady = true;
23110            }, 0);
23111        });
23112    };
23113    PdsOverlayDropdown.prototype.detached = function () {
23114        if (this.listeningSibling != null) {
23115            this.listeningSibling.removeEventListener('click', this.siblingClick, true);
23116        }
23117        window.removeEventListener('keydown', this.onKeyDown);
23118        window.document.body.removeEventListener('click', this.onBodyClick, true);
23119    };
23120    PdsOverlayDropdown.prototype.emitEscape = function () {
23121        var _this = this;
23122        if (!this.queuedEmit) {
23123            setTimeout(function () {
23124                if (_this.siblingClicked === false) {
23125                    _this.fire('escape', true);
23126                }
23127                else {
23128                    _this.siblingClicked = false;
23129                }
23130                _this.queuedEmit = false;
23131            });
23132            this.queuedEmit = true;
23133        }
23134    };
23135    return PdsOverlayDropdown;
23136}(pds_widget_1.PdsWidget));
23137exports.PdsOverlayDropdown = PdsOverlayDropdown;
23138
23139
23140
23141/***/ }),
23142/* 162 */
23143/***/ (function(module, exports, __webpack_require__) {
23144
23145"use strict";
23146
23147var __extends = (this && this.__extends) || (function () {
23148    var extendStatics = function (d, b) {
23149        extendStatics = Object.setPrototypeOf ||
23150            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23151            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23152        return extendStatics(d, b);
23153    }
23154    return function (d, b) {
23155        extendStatics(d, b);
23156        function __() { this.constructor = d; }
23157        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23158    };
23159})();
23160Object.defineProperty(exports, "__esModule", { value: true });
23161var pds_widget_1 = __webpack_require__(7);
23162var PdsAnnounce = (function (_super) {
23163    __extends(PdsAnnounce, _super);
23164    function PdsAnnounce() {
23165        var _this = _super !== null && _super.apply(this, arguments) || this;
23166        _this.id = 'default';
23167        _this.properties = {
23168            id: {
23169                type: String
23170            }
23171        };
23172        return _this;
23173    }
23174    PdsAnnounce.prototype.ready = function () {
23175        _super.prototype.ready.call(this);
23176        this.pds.accessibility.registerAnnounceTextComponent(this);
23177    };
23178    PdsAnnounce.prototype.attributeChanged = function (name, type) {
23179        if (name === 'id') {
23180            this.pds.accessibility.removeAnnounceTextComponentFromDefault();
23181            this.pds.accessibility.registerAnnounceTextComponent(this, this.id);
23182        }
23183    };
23184    PdsAnnounce.prototype.detached = function () {
23185        if (this.id) {
23186            this.pds.accessibility.unregisterAnnounceTextComponent(this.id);
23187        }
23188        else {
23189            this.pds.accessibility.unregisterAnnounceTextComponent();
23190        }
23191    };
23192    PdsAnnounce.prototype.announceText = function (text) {
23193        var element = this.querySelector('.pds-announce-text-content');
23194        if (element != null) {
23195            var paragraph = document.createElement('p');
23196            paragraph.textContent = text;
23197            var node_1 = element.appendChild(paragraph);
23198            setTimeout(function () {
23199                node_1.remove();
23200            }, 60000);
23201        }
23202    };
23203    PdsAnnounce.prototype.messageKeysUpdated = function () {
23204    };
23205    return PdsAnnounce;
23206}(pds_widget_1.PdsWidget));
23207exports.PdsAnnounce = PdsAnnounce;
23208
23209
23210
23211/***/ }),
23212/* 163 */
23213/***/ (function(module, exports, __webpack_require__) {
23214
23215"use strict";
23216
23217var __extends = (this && this.__extends) || (function () {
23218    var extendStatics = function (d, b) {
23219        extendStatics = Object.setPrototypeOf ||
23220            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23221            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23222        return extendStatics(d, b);
23223    }
23224    return function (d, b) {
23225        extendStatics(d, b);
23226        function __() { this.constructor = d; }
23227        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23228    };
23229})();
23230var __assign = (this && this.__assign) || function () {
23231    __assign = Object.assign || function(t) {
23232        for (var s, i = 1, n = arguments.length; i < n; i++) {
23233            s = arguments[i];
23234            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
23235                t[p] = s[p];
23236        }
23237        return t;
23238    };
23239    return __assign.apply(this, arguments);
23240};
23241Object.defineProperty(exports, "__esModule", { value: true });
23242var activity_feed_notification_item_1 = __webpack_require__(67);
23243var assignment_notification_item_group_1 = __webpack_require__(102);
23244var assignment_template_notification_item_1 = __webpack_require__(90);
23245var communication_notification_item_1 = __webpack_require__(91);
23246var notification_item_group_1 = __webpack_require__(65);
23247var pds_widget_1 = __webpack_require__(7);
23248var PdsNotificationIndicator = (function (_super) {
23249    __extends(PdsNotificationIndicator, _super);
23250    function PdsNotificationIndicator() {
23251        var _this = _super !== null && _super.apply(this, arguments) || this;
23252        _this.is = 'pds-notification-indicator';
23253        _this.properties = {
23254            dataDisableViewAllButton: {
23255                type: String,
23256                value: 'false'
23257            },
23258            dataEnableChatTab: {
23259                type: String,
23260                value: 'false'
23261            },
23262            dataEnableAssignmentsTab: {
23263                type: String,
23264                value: 'false'
23265            }
23266        };
23267        _this.subscriptions = [];
23268        return _this;
23269    }
23270    Object.defineProperty(PdsNotificationIndicator.prototype, "notificationIndicatorController", {
23271        get: function () {
23272            return this.controller;
23273        },
23274        set: function (controller) {
23275            var _this = this;
23276            this.controller = controller;
23277            this.notificationItemGroupSubscription = this.controller.notificationItemGroupStream.subscribe(function (notificationGroupUpdate) {
23278                _this.notificationGroups = notificationGroupUpdate.notificationGroups.slice().sort(notification_item_group_1.NotificationItemGroup.compare);
23279                _this.totalUnreadNotificationCount = notificationGroupUpdate.totalUnreadNotificationCount;
23280                _this.currentTabUnreadCount = notificationGroupUpdate.currentTabUnreadCount;
23281                _this.unreadNotificationCounts = notificationGroupUpdate.notificationTypeUnreadCountMap;
23282                _this.currentNotificationType = _this.controller.currentNotificationType;
23283                _this.redrawTrigger = !_this.redrawTrigger;
23284            });
23285        },
23286        enumerable: true,
23287        configurable: true
23288    });
23289    PdsNotificationIndicator.prototype.showTabs = function () {
23290        return this.dataEnableChatTab === 'true' || this.dataEnableAssignmentsTab === 'true';
23291    };
23292    PdsNotificationIndicator.prototype.ready = function () {
23293        _super.prototype.ready.call(this);
23294        this.isNotificationDisplayShowing = false;
23295        this.unreadNotificationCounts = {};
23296    };
23297    PdsNotificationIndicator.prototype.detached = function () {
23298        if (this.notificationItemGroupSubscription != null) {
23299            this.notificationItemGroupSubscription.unsubscribe();
23300        }
23301    };
23302    PdsNotificationIndicator.prototype.messageKeysUpdated = function () { };
23303    PdsNotificationIndicator.prototype.toggleNotificationDisplay = function (event) {
23304        if (event != null) {
23305            event.stopPropagation();
23306            event.preventDefault();
23307        }
23308        if (this.isNotificationDisplayShowing) {
23309            this.closeNotificationDisplay();
23310        }
23311        else {
23312            this.openNotificationDisplay();
23313        }
23314    };
23315    PdsNotificationIndicator.prototype.closeNotificationDisplay = function () {
23316        var _this = this;
23317        setTimeout(function () {
23318            _this.isNotificationDisplayShowing = false;
23319        });
23320    };
23321    PdsNotificationIndicator.prototype.markAllRead = function (event) {
23322        if (event != null) {
23323            event.stopPropagation();
23324            event.preventDefault();
23325        }
23326        this.controller.markAllAsRead();
23327    };
23328    PdsNotificationIndicator.prototype.markAsRead = function (group) {
23329        this.controller.markGroupAsRead(group);
23330    };
23331    PdsNotificationIndicator.prototype.openNotificationDisplay = function () {
23332        this.isNotificationDisplayShowing = true;
23333    };
23334    PdsNotificationIndicator.prototype.emitClickEvent = function (event) {
23335        event.preventDefault();
23336        var itemGroup = event.model.notificationGroup;
23337        this._fireNotificationClickEvent(itemGroup);
23338    };
23339    PdsNotificationIndicator.prototype.handleAssignmentSubmissionClick = function (event) {
23340        event.preventDefault();
23341        var itemGroup = event.model.notificationGroup;
23342        this._fireNotificationClickEvent(itemGroup, { sectionUids: itemGroup.getSectionUids() });
23343    };
23344    PdsNotificationIndicator.prototype.emitViewAllEvent = function (event) {
23345        this.fire('pdsNotificationViewAll', null);
23346        this.markAllRead();
23347        this.isNotificationDisplayShowing = false;
23348    };
23349    PdsNotificationIndicator.prototype.setCurrentNotificationType = function (event) {
23350        event.preventDefault();
23351        event.stopPropagation();
23352        this.controller.setCurrentNotificationType(event.currentTarget.dataset.notificationType);
23353        this.currentNotificationType = this.controller.currentNotificationType;
23354    };
23355    PdsNotificationIndicator.prototype.isTabBadgeActive = function (unreadNotificationCounts, notificationType) {
23356        var count = this.unreadNotificationCounts[notificationType];
23357        return count != null && count > 0;
23358    };
23359    PdsNotificationIndicator.prototype.getUnreadCountForTab = function (unreadNotificationCounts, notificationType) {
23360        return this.unreadNotificationCounts[notificationType] || 0;
23361    };
23362    PdsNotificationIndicator.prototype.handleMessageSentEvent = function (event) {
23363        var itemGroup = event.model.notificationGroup;
23364        var threadInfo = itemGroup.getThreadContext();
23365        this.notificationIndicatorController.markReadByLookUpKeyAndFunction(itemGroup.lookUpKey, communication_notification_item_1.CommunicationNotificationItem.getIsPartOfThread(threadInfo.threadUid), true);
23366        this._fireNotificationClickEvent(itemGroup, {
23367            shouldMarkRead: true,
23368            shouldNavigate: false,
23369            threadType: threadInfo.threadType
23370        }, false);
23371    };
23372    PdsNotificationIndicator.prototype.handleChatNavigationEvent = function (event) {
23373        event.preventDefault();
23374        var chatThread = event.detail;
23375        var notificationEvent = {
23376            type: 'COMMUNICATION_NOTIFICATION',
23377            shouldNavigate: true,
23378            topicUid: chatThread.topicUid,
23379            threadOwnerUid: chatThread.ownerUid,
23380            threadType: chatThread.threadType
23381        };
23382        this.fire('pdsNotificationClick', notificationEvent);
23383    };
23384    PdsNotificationIndicator.prototype.getNotificationGroups = function (notificationGroups, redrawTrigger) {
23385        return this.notificationGroups || [];
23386    };
23387    PdsNotificationIndicator.prototype.getAccessibilityTextForTab = function (redrawTrigger, notificationType) {
23388        var count = this.getUnreadCountForTab(this.unreadNotificationCounts, notificationType);
23389        switch (notificationType) {
23390            case communication_notification_item_1.CommunicationNotificationItem.NOTIFICATION_TYPE:
23391                return this.pds.i18n.getText('pds|notifications|View xx Message Notifications', { count: count });
23392            case assignment_template_notification_item_1.AssignmentTemplateNotificationItem.NOTIFICATION_TYPE:
23393                return this.pds.i18n.getText('pds|notifications|View xx Assignment Notifications', { count: count });
23394            case activity_feed_notification_item_1.ActivityFeedNotificationItem.NOTIFICATION_TYPE:
23395            default:
23396                return this.pds.i18n.getText('pds|notifications|View xx Activity Feed Notifications', { count: count });
23397        }
23398    };
23399    PdsNotificationIndicator.prototype.getClearAllButtonText = function (redrawTrigger, notificationType) {
23400        switch (notificationType) {
23401            case assignment_template_notification_item_1.AssignmentTemplateNotificationItem.NOTIFICATION_TYPE:
23402                return this.pds.i18n.getText('pds|notification widget|Clear Assignment Notifications');
23403            default:
23404                return this.pds.i18n.getText('pds|notification widget|Clear All');
23405        }
23406    };
23407    PdsNotificationIndicator.prototype._fireNotificationClickEvent = function (itemGroup, extraContext, shouldCloseNotificationDisplay) {
23408        if (extraContext === void 0) { extraContext = {}; }
23409        if (shouldCloseNotificationDisplay === void 0) { shouldCloseNotificationDisplay = true; }
23410        var notificationEvent = __assign({}, JSON.parse(itemGroup.aggregationKey), extraContext);
23411        if (itemGroup.type === 'COMMUNICATION_NOTIFICATION' && itemGroup.getUnreadNotifications().length !== 0) {
23412            var threadContext = itemGroup.getThreadContext();
23413            notificationEvent = __assign({}, notificationEvent, { threadType: threadContext.threadType });
23414        }
23415        if (itemGroup.isMarkedReadOnClick) {
23416            this.markAsRead(itemGroup);
23417        }
23418        notificationEvent.type = (itemGroup instanceof assignment_notification_item_group_1.AssignmentNotificationItemGroup) ? itemGroup.subtype : itemGroup.type;
23419        this.fire('pdsNotificationClick', notificationEvent);
23420        this.isNotificationDisplayShowing = !shouldCloseNotificationDisplay;
23421    };
23422    return PdsNotificationIndicator;
23423}(pds_widget_1.PdsWidget));
23424exports.PdsNotificationIndicator = PdsNotificationIndicator;
23425
23426
23427
23428/***/ }),
23429/* 164 */
23430/***/ (function(module, exports, __webpack_require__) {
23431
23432"use strict";
23433
23434var __extends = (this && this.__extends) || (function () {
23435    var extendStatics = function (d, b) {
23436        extendStatics = Object.setPrototypeOf ||
23437            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23438            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23439        return extendStatics(d, b);
23440    }
23441    return function (d, b) {
23442        extendStatics(d, b);
23443        function __() { this.constructor = d; }
23444        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23445    };
23446})();
23447Object.defineProperty(exports, "__esModule", { value: true });
23448var pds_widget_1 = __webpack_require__(7);
23449var PdsActivityFeedNotification = (function (_super) {
23450    __extends(PdsActivityFeedNotification, _super);
23451    function PdsActivityFeedNotification() {
23452        var _this = _super !== null && _super.apply(this, arguments) || this;
23453        _this.is = 'pds-activity-feed-notification';
23454        return _this;
23455    }
23456    PdsActivityFeedNotification.prototype.ready = function () {
23457        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
23458    };
23459    PdsActivityFeedNotification.prototype.messageKeysUpdated = function () { };
23460    return PdsActivityFeedNotification;
23461}(pds_widget_1.PdsWidget));
23462exports.PdsActivityFeedNotification = PdsActivityFeedNotification;
23463
23464
23465
23466/***/ }),
23467/* 165 */
23468/***/ (function(module, exports, __webpack_require__) {
23469
23470"use strict";
23471
23472var __extends = (this && this.__extends) || (function () {
23473    var extendStatics = function (d, b) {
23474        extendStatics = Object.setPrototypeOf ||
23475            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23476            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23477        return extendStatics(d, b);
23478    }
23479    return function (d, b) {
23480        extendStatics(d, b);
23481        function __() { this.constructor = d; }
23482        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23483    };
23484})();
23485Object.defineProperty(exports, "__esModule", { value: true });
23486var pds_widget_1 = __webpack_require__(7);
23487var pds_xss_1 = __webpack_require__(88);
23488var PdsRichTextDisplay = (function (_super) {
23489    __extends(PdsRichTextDisplay, _super);
23490    function PdsRichTextDisplay() {
23491        var _this = _super !== null && _super.apply(this, arguments) || this;
23492        _this.is = 'pds-rich-text-display';
23493        _this.properties = {
23494            html: {
23495                type: String,
23496                observer: 'htmlChanged'
23497            },
23498            linkOpensNewTab: {
23499                type: String,
23500                value: 'true',
23501                observer: 'setLinkOpensNewTab'
23502            }
23503        };
23504        return _this;
23505    }
23506    PdsRichTextDisplay.prototype.messageKeysUpdated = function () {
23507    };
23508    PdsRichTextDisplay.prototype.htmlChanged = function (value) {
23509        var el = this.querySelector('.pds-rich-text-display-content');
23510        if (el) {
23511            var html = '';
23512            if (value != null && value.length > 0) {
23513                html = pds_xss_1.sanitizeHtmlString(value);
23514                if (this.linkOpensNewTab) {
23515                    html = this.updateLinks(html);
23516                }
23517            }
23518            el.innerHTML = html;
23519        }
23520    };
23521    PdsRichTextDisplay.prototype.setLinkOpensNewTab = function (value) {
23522        this.linkOpensNewTab = (value === 'true' || value === true);
23523    };
23524    PdsRichTextDisplay.prototype.updateLinks = function (html) {
23525        var dom = document.createElement('div');
23526        dom.innerHTML = html;
23527        var links = dom.querySelectorAll('a');
23528        for (var i = 0; i < links.length; i++) {
23529            var link = links[i];
23530            if (link != null) {
23531                var target = link.getAttribute('target');
23532                if (target == null || target === '_self' || target === '_parent' || target === '_top' || target === '_blank') {
23533                    link.setAttribute('target', 'portalExternalLink');
23534                }
23535            }
23536        }
23537        return dom.innerHTML;
23538    };
23539    return PdsRichTextDisplay;
23540}(pds_widget_1.PdsWidget));
23541exports.PdsRichTextDisplay = PdsRichTextDisplay;
23542
23543
23544
23545/***/ }),
23546/* 166 */
23547/***/ (function(module, exports, __webpack_require__) {
23548
23549"use strict";
23550
23551var __extends = (this && this.__extends) || (function () {
23552    var extendStatics = function (d, b) {
23553        extendStatics = Object.setPrototypeOf ||
23554            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23555            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23556        return extendStatics(d, b);
23557    }
23558    return function (d, b) {
23559        extendStatics(d, b);
23560        function __() { this.constructor = d; }
23561        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23562    };
23563})();
23564Object.defineProperty(exports, "__esModule", { value: true });
23565var pds_abstract_input_widget_1 = __webpack_require__(31);
23566var pds_validation_rules_engine_1 = __webpack_require__(26);
23567var pds_i18n_1 = __webpack_require__(15);
23568var common_utils_1 = __webpack_require__(40);
23569var isIntegerRegex = /^([-]?[0-9]*)?$/;
23570var PdsTimeWidget = (function (_super) {
23571    __extends(PdsTimeWidget, _super);
23572    function PdsTimeWidget() {
23573        var _this = _super !== null && _super.apply(this, arguments) || this;
23574        _this.is = 'pds-time-widget';
23575        _this.properties = {
23576            name: String,
23577            dataLabelText: String,
23578            dataShowLabel: {
23579                type: String,
23580                value: null
23581            },
23582            dataBadgeText: {
23583                type: String,
23584                value: '',
23585                observer: 'setUpBadge'
23586            },
23587            dataHelperText: {
23588                type: String,
23589                value: null
23590            },
23591            dataFieldHelpText: String,
23592            dataPlaceholderText: String,
23593            dataTooltipText: String,
23594            dataUseAlternateColorScheme: {
23595                type: String,
23596                value: 'false'
23597            },
23598            dataIsreadonly: {
23599                type: String,
23600                value: 'false',
23601                observer: 'setReadonlyText'
23602            },
23603            dataIsfieldonly: {
23604                type: String,
23605                value: 'false'
23606            },
23607            dataHideUnelevatedBadge: {
23608                type: String,
23609                value: 'false',
23610                observer: 'setUpBadge'
23611            },
23612            dataDisableInvalidBadgeElevation: {
23613                type: String,
23614                value: 'false',
23615                observer: 'setUpBadge'
23616            },
23617            dataIsrequired: {
23618                type: String,
23619                value: 'false',
23620                observer: 'setUpBadge'
23621            },
23622            disabled: {
23623                type: String,
23624                value: 'false'
23625            },
23626            dataUseValidIndicator: {
23627                type: String,
23628                value: 'false'
23629            },
23630            dataMaxtime: String,
23631            dataMintime: String,
23632            dataCustomvalidate: String,
23633            dataActionIcon: String
23634        };
23635        return _this;
23636    }
23637    PdsTimeWidget.prototype.generateValidationRules = function () {
23638        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
23639        validationRules.isTime = true;
23640        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
23641        validationRules.setProperty('minValue', this.dataMintime, common_utils_1.SimpleTime);
23642        validationRules.setProperty('maxValue', this.dataMaxtime, common_utils_1.SimpleTime);
23643        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
23644        if (this.hasOwnProperty('dataCustomvalidate')) {
23645            this.validators.push({
23646                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
23647                condition: {
23648                    element: this
23649                }
23650            });
23651        }
23652    };
23653    PdsTimeWidget.prototype.setModelValue = function (modelValue, skip) {
23654        var ele = this.querySelector('input');
23655        if (ele != null && modelValue !== ele.modelValue) {
23656            ele.modelValue = modelValue;
23657            if (skip !== true) {
23658                this.setValue(pds_i18n_1.pdsI18n.localizeTime(modelValue), true);
23659            }
23660            return true;
23661        }
23662        return false;
23663    };
23664    PdsTimeWidget.prototype.setValue = function (value, skip) {
23665        if (skip === void 0) { skip = false; }
23666        if (value == null) {
23667            value = '';
23668        }
23669        var inputEl = this.querySelector('input');
23670        if (inputEl != null && value !== inputEl.value) {
23671            inputEl.value = value;
23672        }
23673        if (skip !== true) {
23674            this.setModelValue(pds_i18n_1.pdsI18n.deLocalizeTime(value), true);
23675        }
23676    };
23677    return PdsTimeWidget;
23678}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
23679exports.PdsTimeWidget = PdsTimeWidget;
23680
23681
23682
23683/***/ }),
23684/* 167 */
23685/***/ (function(module, exports, __webpack_require__) {
23686
23687"use strict";
23688
23689var __extends = (this && this.__extends) || (function () {
23690    var extendStatics = function (d, b) {
23691        extendStatics = Object.setPrototypeOf ||
23692            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23693            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23694        return extendStatics(d, b);
23695    }
23696    return function (d, b) {
23697        extendStatics(d, b);
23698        function __() { this.constructor = d; }
23699        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23700    };
23701})();
23702Object.defineProperty(exports, "__esModule", { value: true });
23703var common_utils_1 = __webpack_require__(40);
23704var operators_1 = __webpack_require__(17);
23705var rxjs_1 = __webpack_require__(19);
23706var pds_http_utils_1 = __webpack_require__(44);
23707var pds_widget_1 = __webpack_require__(7);
23708var chat_thread_service_1 = __webpack_require__(92);
23709var PdsCommunicationNotification = (function (_super) {
23710    __extends(PdsCommunicationNotification, _super);
23711    function PdsCommunicationNotification() {
23712        var _this = _super !== null && _super.apply(this, arguments) || this;
23713        _this.is = 'pds-communication-notification';
23714        _this.chatThreadService = new chat_thread_service_1.ChatThreadService();
23715        return _this;
23716    }
23717    PdsCommunicationNotification.prototype.ready = function () {
23718        _super.prototype.ready.call(this);
23719        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
23720        this.isQuickMessageDialogOpen = false;
23721    };
23722    PdsCommunicationNotification.prototype.messageKeysUpdated = function () { };
23723    PdsCommunicationNotification.prototype.emitClickEvent = function (event) {
23724        var _this = this;
23725        event.preventDefault();
23726        var threadInfo = this.notificationGroup.getThreadContext();
23727        pds_http_utils_1.pdsHttpUtils.get(this.pds.preferences.host + "/communication/v1/thread/" + threadInfo.threadUid, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({}))
23728            .subscribe(function (response) {
23729            _this.quickMessageDialogThreadRI = JSON.parse(response.data);
23730            _this.isQuickMessageDialogOpen = true;
23731            setTimeout(function () {
23732                _this.querySelector('pds-chat-quick-message').addEventListener('pdsRemoveDialog', function () {
23733                    _this.isQuickMessageDialogOpen = false;
23734                });
23735            });
23736        });
23737    };
23738    PdsCommunicationNotification.prototype.getMessages = function (notificationGroup) {
23739        return notificationGroup.messages;
23740    };
23741    PdsCommunicationNotification.prototype.handleChatTabChange = function (event) {
23742        var _this = this;
23743        var threadObs;
23744        var thread = {
23745            uid: '',
23746            name: this.quickMessageDialogThreadRI.name,
23747            ownerUid: this.quickMessageDialogThreadRI.ownerUid,
23748            ownerUserType: this.quickMessageDialogThreadRI.ownerUserType,
23749            topicUid: this.quickMessageDialogThreadRI.topicUid
23750        };
23751        if (event.detail === 'STUDENT_TAB') {
23752            threadObs = rxjs_1.of([{ userUid: this.quickMessageDialogThreadRI.topicUid, userType: 'STUDENT' }, { userUid: this.quickMessageDialogThreadRI.ownerUid, userType: 'TEACHER' }]).pipe(operators_1.mergeMap(function (participants) {
23753                thread.participants = participants;
23754                thread.threadType = common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER;
23755                return _this.chatThreadService.fetchTopicThread(_this.pds.preferences.host, thread);
23756            }));
23757        }
23758        else {
23759            threadObs = this.chatThreadService.fetchParentParticipants(this.pds.preferences.host, this.quickMessageDialogThreadRI.topicUid).pipe(operators_1.mergeMap(function (participants) {
23760                thread.participants = participants;
23761                thread.threadType = common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT;
23762                return _this.chatThreadService.fetchTopicThread(_this.pds.preferences.host, thread);
23763            }));
23764        }
23765        threadObs
23766            .subscribe(function (chatThread) {
23767            _this.quickMessageDialogThreadRI = chatThread;
23768            setTimeout(function () {
23769                var containerEl = _this.querySelector('.pds-chat-message-container');
23770                containerEl.scrollTop = containerEl.scrollHeight;
23771            });
23772        });
23773    };
23774    return PdsCommunicationNotification;
23775}(pds_widget_1.PdsWidget));
23776exports.PdsCommunicationNotification = PdsCommunicationNotification;
23777
23778
23779
23780/***/ }),
23781/* 168 */
23782/***/ (function(module, exports, __webpack_require__) {
23783
23784"use strict";
23785
23786var __extends = (this && this.__extends) || (function () {
23787    var extendStatics = function (d, b) {
23788        extendStatics = Object.setPrototypeOf ||
23789            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23790            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23791        return extendStatics(d, b);
23792    }
23793    return function (d, b) {
23794        extendStatics(d, b);
23795        function __() { this.constructor = d; }
23796        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23797    };
23798})();
23799Object.defineProperty(exports, "__esModule", { value: true });
23800var pds_widget_1 = __webpack_require__(7);
23801var PdsAssignmentTemplateNotification = (function (_super) {
23802    __extends(PdsAssignmentTemplateNotification, _super);
23803    function PdsAssignmentTemplateNotification() {
23804        var _this = _super !== null && _super.apply(this, arguments) || this;
23805        _this.is = 'pds-assignment-template-notification';
23806        return _this;
23807    }
23808    PdsAssignmentTemplateNotification.prototype.ready = function () {
23809        _super.prototype.ready.call(this);
23810        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
23811    };
23812    PdsAssignmentTemplateNotification.prototype.messageKeysUpdated = function () { };
23813    return PdsAssignmentTemplateNotification;
23814}(pds_widget_1.PdsWidget));
23815exports.PdsAssignmentTemplateNotification = PdsAssignmentTemplateNotification;
23816
23817
23818
23819/***/ }),
23820/* 169 */
23821/***/ (function(module, exports, __webpack_require__) {
23822
23823"use strict";
23824
23825var __extends = (this && this.__extends) || (function () {
23826    var extendStatics = function (d, b) {
23827        extendStatics = Object.setPrototypeOf ||
23828            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23829            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23830        return extendStatics(d, b);
23831    }
23832    return function (d, b) {
23833        extendStatics(d, b);
23834        function __() { this.constructor = d; }
23835        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23836    };
23837})();
23838Object.defineProperty(exports, "__esModule", { value: true });
23839var pds_widget_1 = __webpack_require__(7);
23840var PdsAssignmentSubmissionNotification = (function (_super) {
23841    __extends(PdsAssignmentSubmissionNotification, _super);
23842    function PdsAssignmentSubmissionNotification() {
23843        var _this = _super !== null && _super.apply(this, arguments) || this;
23844        _this.is = 'pds-assignment-submission-notification';
23845        return _this;
23846    }
23847    PdsAssignmentSubmissionNotification.prototype.ready = function () {
23848        _super.prototype.ready.call(this);
23849        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
23850    };
23851    PdsAssignmentSubmissionNotification.prototype.messageKeysUpdated = function () { };
23852    return PdsAssignmentSubmissionNotification;
23853}(pds_widget_1.PdsWidget));
23854exports.PdsAssignmentSubmissionNotification = PdsAssignmentSubmissionNotification;
23855
23856
23857
23858/***/ }),
23859/* 170 */
23860/***/ (function(module, exports, __webpack_require__) {
23861
23862"use strict";
23863
23864var __extends = (this && this.__extends) || (function () {
23865    var extendStatics = function (d, b) {
23866        extendStatics = Object.setPrototypeOf ||
23867            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23868            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23869        return extendStatics(d, b);
23870    }
23871    return function (d, b) {
23872        extendStatics(d, b);
23873        function __() { this.constructor = d; }
23874        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23875    };
23876})();
23877Object.defineProperty(exports, "__esModule", { value: true });
23878var pds_widget_1 = __webpack_require__(7);
23879var PdsAssignmentReturnNotification = (function (_super) {
23880    __extends(PdsAssignmentReturnNotification, _super);
23881    function PdsAssignmentReturnNotification() {
23882        var _this = _super !== null && _super.apply(this, arguments) || this;
23883        _this.is = 'pds-assignment-return-notification';
23884        return _this;
23885    }
23886    PdsAssignmentReturnNotification.prototype.ready = function () {
23887        _super.prototype.ready.call(this);
23888        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
23889    };
23890    PdsAssignmentReturnNotification.prototype.messageKeysUpdated = function () { };
23891    return PdsAssignmentReturnNotification;
23892}(pds_widget_1.PdsWidget));
23893exports.PdsAssignmentReturnNotification = PdsAssignmentReturnNotification;
23894
23895
23896
23897/***/ }),
23898/* 171 */
23899/***/ (function(module, exports, __webpack_require__) {
23900
23901"use strict";
23902
23903var __extends = (this && this.__extends) || (function () {
23904    var extendStatics = function (d, b) {
23905        extendStatics = Object.setPrototypeOf ||
23906            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23907            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23908        return extendStatics(d, b);
23909    }
23910    return function (d, b) {
23911        extendStatics(d, b);
23912        function __() { this.constructor = d; }
23913        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23914    };
23915})();
23916Object.defineProperty(exports, "__esModule", { value: true });
23917var pds_dialog_1 = __webpack_require__(107);
23918var common_utils_1 = __webpack_require__(40);
23919var pds_i18n_1 = __webpack_require__(15);
23920var pds_http_utils_1 = __webpack_require__(44);
23921var PdsChatQuickMessage = (function (_super) {
23922    __extends(PdsChatQuickMessage, _super);
23923    function PdsChatQuickMessage() {
23924        var _this = _super !== null && _super.apply(this, arguments) || this;
23925        _this.is = 'pds-chat-quick-message';
23926        return _this;
23927    }
23928    PdsChatQuickMessage.prototype.ready = function () {
23929        _super.prototype.ready.call(this);
23930        this.getS3MediaPath = this.pds.preferences.getS3MediaPath;
23931        if (this.currentUserType === 'TEACHER' && this.chatThread.threadType === common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT) {
23932            this.currentTab = 'PARENT_TAB';
23933        }
23934        else {
23935            this.currentTab = 'STUDENT_TAB';
23936        }
23937    };
23938    PdsChatQuickMessage.prototype.attached = function () {
23939        var _this = this;
23940        _super.prototype.attached.call(this);
23941        setTimeout(function () {
23942            var containerEl = _this.querySelector('.pds-chat-message-container');
23943            containerEl.scrollTop = containerEl.scrollHeight;
23944        });
23945    };
23946    PdsChatQuickMessage.prototype.computeClass = function (msgGroup) {
23947        return this.isCurrentUser(msgGroup.participant.userUid) ? 'pds-quick-message-group pds-chat-message-group-right' : 'pds-quick-message-group';
23948    };
23949    PdsChatQuickMessage.prototype.getModalHeader = function (chatThread, userType, userName) {
23950        if (chatThread == null || userType == null) {
23951            return '';
23952        }
23953        switch (userType) {
23954            case 'TEACHER':
23955                return this._getModalHeaderForTeacher(chatThread, userName);
23956            case 'STUDENT':
23957            case 'PARENT':
23958                return this._getModalHeaderForStudentOrParent(chatThread);
23959            default:
23960                console.error("ChatThread does not handle userType " + userType + " yet.");
23961                return '';
23962        }
23963    };
23964    PdsChatQuickMessage.prototype.getMessageGroups = function (messages) {
23965        if (messages == null || messages.length === 0) {
23966            return [];
23967        }
23968        var participantKeyValues = this.chatThread.participants
23969            .map(function (participant) {
23970            var _a;
23971            return _a = {}, _a[participant.userUid] = participant, _a;
23972        });
23973        var participantMap = Object.assign.apply(Object, [{}].concat(participantKeyValues));
23974        var currentParticipantUid = messages[0].senderUid;
23975        var messageGroups = [];
23976        var currentMessageGroup = { participant: participantMap[currentParticipantUid], messages: [] };
23977        messageGroups.push(currentMessageGroup);
23978        for (var _i = 0, messages_1 = messages; _i < messages_1.length; _i++) {
23979            var message = messages_1[_i];
23980            if (message.senderUid !== currentParticipantUid) {
23981                currentParticipantUid = message.senderUid;
23982                currentMessageGroup = { participant: participantMap[message.senderUid], messages: [message] };
23983                messageGroups.push(currentMessageGroup);
23984            }
23985            else {
23986                currentMessageGroup.messages.push(message);
23987            }
23988        }
23989        return messageGroups;
23990    };
23991    PdsChatQuickMessage.prototype.getLastMessageTime = function (messageGroup) {
23992        var message = messageGroup.messages[messageGroup.messages.length - 1];
23993        return pds_i18n_1.pdsI18n.formatDate(new Date(message.sentAt), 'DATE_TIME_PRETTY');
23994    };
23995    PdsChatQuickMessage.prototype.getParticipantName = function (participant) {
23996        if (participant.userType === 'TEACHER' && participant.title != null) {
23997            return participant.title + " " + participant.lastName;
23998        }
23999        return participant.firstName + " " + participant.lastName;
24000    };
24001    PdsChatQuickMessage.prototype.getParticipantImagePath = function (participant) {
24002        return "/image/" + participant.userType.toLowerCase() + "-" + participant.userUid;
24003    };
24004    PdsChatQuickMessage.prototype.handleNavigateClick = function (event) {
24005        event.preventDefault();
24006        this.fire('pds-quick-chat-navigation', this.chatThread);
24007        this.closeDialog();
24008    };
24009    PdsChatQuickMessage.prototype.isCurrentUser = function (userUid) {
24010        return this.currentUserUid === userUid;
24011    };
24012    PdsChatQuickMessage.prototype.sendMessage = function (event) {
24013        var _this = this;
24014        event.preventDefault();
24015        var message = {
24016            operation: 'CREATE',
24017            threadUid: this.chatThread.uid,
24018            senderUid: this.currentUserUid,
24019            associatedSectionUids: this.sectionUids,
24020            senderUserType: this.currentUserType,
24021            body: this.inputValue,
24022            clientKey: this.chatThread.uid + ":" + (new Date()).getTime().toString()
24023        };
24024        pds_http_utils_1.pdsHttpUtils.post(this.pds.preferences.host + "/communication/v1/queue", message, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({}))
24025            .subscribe(function () {
24026            _this.fire('pds-quick-message-sent', true);
24027            _this.closeDialog();
24028        });
24029    };
24030    PdsChatQuickMessage.prototype.setCurrentTab = function (event) {
24031        event.preventDefault();
24032        event.stopPropagation();
24033        this.currentTab = event.currentTarget.dataset.threadType;
24034        this.fire('pds-quick-chat-tab-change', this.currentTab);
24035    };
24036    PdsChatQuickMessage.prototype._getModalHeaderForTeacher = function (chatThread, userName) {
24037        switch (chatThread.threadType) {
24038            case common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT:
24039                return pds_i18n_1.pdsI18n.getText("pds|quick chat|Send xx s Parents/Guardians a Message", { studentName: userName });
24040            case common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER:
24041                return pds_i18n_1.pdsI18n.getText("pds|quick chat|Send xx a Message", { recipientName: userName });
24042            default:
24043                console.error("ChatThread Type " + chatThread.threadType + " not handled yet in pds-chat-quick-message");
24044                return pds_i18n_1.pdsI18n.getText("pds|quick chat|Send a Message");
24045        }
24046    };
24047    PdsChatQuickMessage.prototype._getModalHeaderForStudentOrParent = function (chatThread) {
24048        var teacherParticipant = chatThread.participants.find(function (participant) {
24049            return participant.userType === 'TEACHER';
24050        });
24051        if (!teacherParticipant) {
24052            throw 'ChatThread does not have a teacher participant';
24053        }
24054        var teacherName;
24055        if (teacherParticipant.title) {
24056            teacherName = teacherParticipant.title + " " + teacherParticipant.lastName;
24057        }
24058        else {
24059            teacherName = teacherParticipant.firstName + " " + teacherParticipant.lastName;
24060        }
24061        switch (chatThread.threadType) {
24062            case common_utils_1.ChatThreadTypeEnum.TEACHER_PARENT:
24063            case common_utils_1.ChatThreadTypeEnum.STUDENT_TEACHER:
24064                return pds_i18n_1.pdsI18n.getText("pds|quick chat|Send xx a Message", { recipientName: teacherName });
24065            default:
24066                console.error("ChatThread Type " + chatThread.threadType + " not handled yet in pds-chat-quick-message");
24067                return pds_i18n_1.pdsI18n.getText("pds|quick chat|Send a Message");
24068        }
24069    };
24070    return PdsChatQuickMessage;
24071}(pds_dialog_1.PdsDialog));
24072exports.PdsChatQuickMessage = PdsChatQuickMessage;
24073
24074
24075
24076/***/ }),
24077/* 172 */
24078/***/ (function(module, exports, __webpack_require__) {
24079
24080"use strict";
24081
24082var __extends = (this && this.__extends) || (function () {
24083    var extendStatics = function (d, b) {
24084        extendStatics = Object.setPrototypeOf ||
24085            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24086            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24087        return extendStatics(d, b);
24088    }
24089    return function (d, b) {
24090        extendStatics(d, b);
24091        function __() { this.constructor = d; }
24092        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24093    };
24094})();
24095Object.defineProperty(exports, "__esModule", { value: true });
24096var pds_widget_1 = __webpack_require__(7);
24097var PdsNotificationBadge = (function (_super) {
24098    __extends(PdsNotificationBadge, _super);
24099    function PdsNotificationBadge() {
24100        var _this = _super !== null && _super.apply(this, arguments) || this;
24101        _this.id = '';
24102        _this.properties = {
24103            badge: {
24104                type: Object,
24105                value: {
24106                    badgeCount: 0,
24107                    showCount: true
24108                }
24109            },
24110            dataNotificationCount: {
24111                type: Number,
24112                value: null,
24113                observer: 'updateBadgeObject'
24114            },
24115            dataShowCount: {
24116                type: String,
24117                value: 'true',
24118                observer: 'updateBadgeObject'
24119            },
24120            id: {
24121                type: String,
24122                value: ''
24123            },
24124            dataSetContainerAutomatically: {
24125                type: String,
24126                value: 'true'
24127            },
24128            dataIsBadgeElevated: {
24129                type: String,
24130                value: 'false'
24131            }
24132        };
24133        return _this;
24134    }
24135    PdsNotificationBadge.prototype.attached = function () {
24136        _super.prototype.attached.call(this);
24137        if (this.dataSetContainerAutomatically === 'true' && this.parentElement != null) {
24138            this.parentElement.classList.add('pds-notification-badge-container');
24139        }
24140    };
24141    PdsNotificationBadge.prototype.updateBadgeObject = function () {
24142        this.badge = {
24143            showCount: this.dataShowCount === 'true',
24144            badgeCount: this.dataNotificationCount || 0
24145        };
24146    };
24147    return PdsNotificationBadge;
24148}(pds_widget_1.PdsWidget));
24149exports.PdsNotificationBadge = PdsNotificationBadge;
24150
24151
24152
24153/***/ }),
24154/* 173 */
24155/***/ (function(module, exports, __webpack_require__) {
24156
24157"use strict";
24158
24159var __extends = (this && this.__extends) || (function () {
24160    var extendStatics = function (d, b) {
24161        extendStatics = Object.setPrototypeOf ||
24162            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24163            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24164        return extendStatics(d, b);
24165    }
24166    return function (d, b) {
24167        extendStatics(d, b);
24168        function __() { this.constructor = d; }
24169        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24170    };
24171})();
24172Object.defineProperty(exports, "__esModule", { value: true });
24173var pds_widget_1 = __webpack_require__(7);
24174var image_controller_1 = __webpack_require__(174);
24175var HORIZONTAL_ORIENTATION_CLASS_NAME = 'user-avatar-horizontal-orientation';
24176var VERTICAL_ORIENTATION_CLASS_NAME = 'user-avatar-vertical-orientation';
24177var EVEN_ORIENTATION_CLASS_NAME = 'user-avatar-even';
24178var GRADIENT_SPECIFICATIONS_CLASS_NAMES = [
24179    'avatar-gradient-one',
24180    'avatar-gradient-two',
24181    'avatar-gradient-three',
24182    'avatar-gradient-four',
24183    'avatar-gradient-five',
24184    'avatar-gradient-six',
24185    'avatar-gradient-seven',
24186    'avatar-gradient-eight'
24187];
24188var PdsUserAvatar = (function (_super) {
24189    __extends(PdsUserAvatar, _super);
24190    function PdsUserAvatar() {
24191        var _this = _super !== null && _super.apply(this, arguments) || this;
24192        _this.properties = {
24193            avatar: {
24194                type: Object,
24195                observer: '_onObjectChange'
24196            }
24197        };
24198        return _this;
24199    }
24200    PdsUserAvatar.prototype._onObjectChange = function () {
24201        var _this = this;
24202        if (!this.avatar.useImage) {
24203            this.gradientConfig = GRADIENT_SPECIFICATIONS_CLASS_NAMES[Math.floor(Math.random() * GRADIENT_SPECIFICATIONS_CLASS_NAMES.length)];
24204            this.classList.add(this.gradientConfig);
24205        }
24206        else {
24207            this.imageController = new image_controller_1.ImageController(this.avatar);
24208            this.imageController.getImageOrientation(function (imageOrientation) {
24209                switch (imageOrientation) {
24210                    case 'HORIZONTAL':
24211                        _this.querySelector('img').classList.add(HORIZONTAL_ORIENTATION_CLASS_NAME);
24212                        break;
24213                    case 'VERTICAL':
24214                        _this.querySelector('img').classList.add(VERTICAL_ORIENTATION_CLASS_NAME);
24215                        break;
24216                    case 'EVEN':
24217                        _this.querySelector('img').classList.add(EVEN_ORIENTATION_CLASS_NAME);
24218                        break;
24219                    default:
24220                }
24221            });
24222        }
24223    };
24224    return PdsUserAvatar;
24225}(pds_widget_1.PdsWidget));
24226exports.PdsUserAvatar = PdsUserAvatar;
24227
24228
24229
24230/***/ }),
24231/* 174 */
24232/***/ (function(module, exports, __webpack_require__) {
24233
24234"use strict";
24235
24236Object.defineProperty(exports, "__esModule", { value: true });
24237var ImageController = (function () {
24238    function ImageController(img) {
24239        this.image = img;
24240    }
24241    ImageController.prototype.getImage = function () {
24242        return this.image;
24243    };
24244    ImageController.prototype.setImage = function (img) {
24245        this.image = img;
24246    };
24247    ImageController.prototype.getImageOrientation = function (imageOrientationCallback) {
24248        this.loadImage(function (img) {
24249            var imageOrientation = (img.width > img.height) ? 'HORIZONTAL' : (img.width < img.height) ? 'VERTICAL' : 'EVEN';
24250            imageOrientationCallback(imageOrientation);
24251        });
24252    };
24253    ImageController.prototype.loadImage = function (imageOnLoadCallback) {
24254        var img = new Image();
24255        img.src = this.image.src;
24256        img.onload = function () {
24257            imageOnLoadCallback(img);
24258        };
24259    };
24260    return ImageController;
24261}());
24262exports.ImageController = ImageController;
24263
24264
24265
24266/***/ }),
24267/* 175 */
24268/***/ (function(module, exports, __webpack_require__) {
24269
24270"use strict";
24271
24272var __extends = (this && this.__extends) || (function () {
24273    var extendStatics = function (d, b) {
24274        extendStatics = Object.setPrototypeOf ||
24275            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24276            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24277        return extendStatics(d, b);
24278    }
24279    return function (d, b) {
24280        extendStatics(d, b);
24281        function __() { this.constructor = d; }
24282        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24283    };
24284})();
24285Object.defineProperty(exports, "__esModule", { value: true });
24286var pds_widget_1 = __webpack_require__(7);
24287var poppable_element_factory_1 = __webpack_require__(68);
24288var pds_utils_1 = __webpack_require__(18);
24289var PdsTooltip = (function (_super) {
24290    __extends(PdsTooltip, _super);
24291    function PdsTooltip() {
24292        var _this = _super !== null && _super.apply(this, arguments) || this;
24293        _this.is = 'pds-tooltip';
24294        _this.properties = {
24295            defaultDirection: {
24296                type: Object,
24297                value: 'bottom-start'
24298            },
24299            triggerAction: {
24300                type: String,
24301                value: 'mouseenter focus'
24302            },
24303            customTheme: {
24304                type: String,
24305                value: 'tooltip'
24306            },
24307            showHideDuration: {
24308                type: Object,
24309                value: [500, 0]
24310            }
24311        };
24312        return _this;
24313    }
24314    PdsTooltip.prototype.created = function () {
24315        this.hasBeenAttached = false;
24316    };
24317    PdsTooltip.prototype.ready = function () {
24318        _super.prototype.ready.call(this);
24319        this.classList.add('pds-is-hidden');
24320    };
24321    PdsTooltip.prototype.attached = function () {
24322        var _this = this;
24323        setTimeout(function () {
24324            _super.prototype.attached.call(_this);
24325            if (!_this.hasBeenAttached) {
24326                _this.hasBeenAttached = true;
24327                _this.tooltipTrigger = _this.pds.utils.getClosest(_this, '.pds-tooltip-trigger');
24328                if (_this.tooltipTrigger == null) {
24329                    console.error('No tooltip trigger detected.  An element with .pds-tooltip-trigger must be an ancestor of the pds-tooltip.');
24330                    return;
24331                }
24332                var tooltipConfig = poppable_element_factory_1.PoppableElementFactory.generateTooltipConfig(_this.defaultDirection, _this.triggerAction, _this, _this.customTheme, _this.showHideDuration);
24333                if (_this.classList) {
24334                    _this.classList.remove('pds-is-hidden');
24335                }
24336                _this.tooltipInstance = poppable_element_factory_1.PoppableElementFactory.generatePoppableElement(_this.tooltipTrigger, tooltipConfig, _this.is);
24337            }
24338            else {
24339                _this.turnOnTooltipTriggerListener();
24340            }
24341        });
24342    };
24343    PdsTooltip.prototype.detached = function () {
24344        this.turnOffTooltipTriggerListener();
24345    };
24346    PdsTooltip.prototype.turnOnTooltipTriggerListener = function () {
24347        var _this = this;
24348        if (this.tooltipTriggerObserver == null) {
24349            this.tooltipTriggerObserver = new MutationObserver(function (mutationsList, observer) {
24350                if (_this.tooltipTrigger != null && !document.contains(_this.tooltipTrigger)) {
24351                    pds_utils_1.pdsUtils.remove(_this.tooltipInstance.popper);
24352                }
24353            });
24354        }
24355        this.tooltipTriggerObserver.observe(document, { childList: true, subtree: true });
24356    };
24357    PdsTooltip.prototype.turnOffTooltipTriggerListener = function () {
24358        if (this.tooltipTriggerObserver != null) {
24359            this.tooltipTriggerObserver.disconnect();
24360        }
24361    };
24362    return PdsTooltip;
24363}(pds_widget_1.PdsWidget));
24364exports.PdsTooltip = PdsTooltip;
24365
24366
24367
24368/***/ }),
24369/* 176 */
24370/***/ (function(module, exports, __webpack_require__) {
24371
24372"use strict";
24373
24374Object.defineProperty(exports, "__esModule", { value: true });
24375var PopperConfiguration = (function () {
24376    function PopperConfiguration() {
24377    }
24378    PopperConfiguration.getPopperConfiguration = function (options) {
24379        if (options === void 0) { options = {
24380            showArrow: false,
24381            defaultPlacement: 'bottom-start',
24382            trigger: 'mouseenter focus'
24383        }; }
24384        var configuration = {
24385            arrow: options.showArrow,
24386            placement: options.defaultPlacement,
24387            trigger: options.trigger,
24388            performance: true
24389        };
24390        PopperConfiguration.enhanceBasePopperConfigurationOption(configuration, options);
24391        return configuration;
24392    };
24393    PopperConfiguration.enhanceBasePopperConfigurationOption = function (configuration, options) {
24394        if (options.beforeShownCallback != null) {
24395            var propName = 'onShow';
24396            configuration[propName] = options.beforeShownCallback;
24397        }
24398        if (options.onShownCallback != null) {
24399            var propName = 'onShown';
24400            configuration[propName] = options.onShownCallback;
24401        }
24402        if (options.transitionDuration != null) {
24403            var propName = 'duration';
24404            configuration[propName] = options.transitionDuration;
24405        }
24406        if (options.onHiddenCallback != null) {
24407            var propName = 'onHidden';
24408            configuration[propName] = options.onHiddenCallback;
24409        }
24410        if (options.stickToReference != null) {
24411            var propName = 'sticky';
24412            configuration[propName] = options.stickToReference;
24413        }
24414        if (options.zIndex != null) {
24415            var propName = 'zIndex';
24416            configuration[propName] = options.zIndex;
24417        }
24418        if (options.appendTo != null) {
24419            var propName = 'appendTo';
24420            configuration[propName] = options.appendTo;
24421        }
24422        if (options.onDisplayAnimation != null) {
24423            var propName = 'animation';
24424            configuration[propName] = options.onDisplayAnimation;
24425        }
24426        if (options.arrowSizeTransform != null) {
24427            var propName = 'arrowTransform';
24428            configuration[propName] = options.arrowSizeTransform;
24429        }
24430        if (options.allowHTMLTitle != null) {
24431            var propName = 'allowTitleHTML';
24432            configuration[propName] = options.allowHTMLTitle;
24433        }
24434        if (options.hasDynamicTitle != null) {
24435            var propName = 'dynamicTitle';
24436            configuration[propName] = options.hasDynamicTitle;
24437        }
24438        if (options.customStyleClassName != null) {
24439            var propName = 'theme';
24440            configuration[propName] = options.customStyleClassName;
24441        }
24442        if (options.htmlReference != null) {
24443            var propName = 'html';
24444            configuration[propName] = options.htmlReference;
24445        }
24446        if (options.popperJsOptions != null) {
24447            var propName = 'popperOptions';
24448            configuration[propName] = options.popperJsOptions;
24449        }
24450        if (options.interactive != null) {
24451            var propName = 'interactive';
24452            configuration[propName] = options.interactive;
24453        }
24454    };
24455    return PopperConfiguration;
24456}());
24457exports.PopperConfiguration = PopperConfiguration;
24458
24459
24460
24461/***/ }),
24462/* 177 */
24463/***/ (function(module, exports, __webpack_require__) {
24464
24465"use strict";
24466
24467var __extends = (this && this.__extends) || (function () {
24468    var extendStatics = function (d, b) {
24469        extendStatics = Object.setPrototypeOf ||
24470            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24471            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24472        return extendStatics(d, b);
24473    }
24474    return function (d, b) {
24475        extendStatics(d, b);
24476        function __() { this.constructor = d; }
24477        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24478    };
24479})();
24480Object.defineProperty(exports, "__esModule", { value: true });
24481var pds_widget_1 = __webpack_require__(7);
24482var PdsErrorPage = (function (_super) {
24483    __extends(PdsErrorPage, _super);
24484    function PdsErrorPage() {
24485        var _this = _super !== null && _super.apply(this, arguments) || this;
24486        _this.is = 'pds-error-page';
24487        _this.useImagePath = false;
24488        _this.properties = {
24489            alternateImage: {
24490                type: Object,
24491                value: null
24492            }
24493        };
24494        return _this;
24495    }
24496    PdsErrorPage.prototype.attached = function () {
24497        var _this = this;
24498        setTimeout(function () {
24499            _this.imagePath = "./img/error-assets/" + _this.error.statusCode + ".png";
24500        });
24501    };
24502    PdsErrorPage.prototype.invokePrimaryAction = function () {
24503        if (this.homePageRedirectCallback != null) {
24504            this.homePageRedirectCallback();
24505        }
24506    };
24507    PdsErrorPage.prototype.invokeSecondaryAction = function () {
24508        if (this.letUsKnowCallback != null) {
24509            this.letUsKnowCallback();
24510        }
24511    };
24512    return PdsErrorPage;
24513}(pds_widget_1.PdsWidget));
24514exports.PdsErrorPage = PdsErrorPage;
24515
24516
24517
24518/***/ }),
24519/* 178 */
24520/***/ (function(module, exports, __webpack_require__) {
24521
24522"use strict";
24523
24524var __extends = (this && this.__extends) || (function () {
24525    var extendStatics = function (d, b) {
24526        extendStatics = Object.setPrototypeOf ||
24527            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24528            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24529        return extendStatics(d, b);
24530    }
24531    return function (d, b) {
24532        extendStatics(d, b);
24533        function __() { this.constructor = d; }
24534        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24535    };
24536})();
24537Object.defineProperty(exports, "__esModule", { value: true });
24538var pds_widget_1 = __webpack_require__(7);
24539var PdsCopyrightClause = (function (_super) {
24540    __extends(PdsCopyrightClause, _super);
24541    function PdsCopyrightClause() {
24542        var _this = _super !== null && _super.apply(this, arguments) || this;
24543        _this.is = 'pds-copyright-clause';
24544        return _this;
24545    }
24546    return PdsCopyrightClause;
24547}(pds_widget_1.PdsWidget));
24548exports.PdsCopyrightClause = PdsCopyrightClause;
24549
24550
24551
24552/***/ }),
24553/* 179 */
24554/***/ (function(module, exports, __webpack_require__) {
24555
24556"use strict";
24557
24558var __extends = (this && this.__extends) || (function () {
24559    var extendStatics = function (d, b) {
24560        extendStatics = Object.setPrototypeOf ||
24561            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24562            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24563        return extendStatics(d, b);
24564    }
24565    return function (d, b) {
24566        extendStatics(d, b);
24567        function __() { this.constructor = d; }
24568        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24569    };
24570})();
24571Object.defineProperty(exports, "__esModule", { value: true });
24572var pds_widget_1 = __webpack_require__(7);
24573var poppable_element_factory_1 = __webpack_require__(68);
24574var popover_accessibility_controller_factory_1 = __webpack_require__(93);
24575var pds_i18n_1 = __webpack_require__(15);
24576var pds_utils_1 = __webpack_require__(18);
24577var rxjs_1 = __webpack_require__(19);
24578var pds_logger_1 = __webpack_require__(41);
24579var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('app-switcher'), 'pds-app-switcher.ts');
24580var hasAddedMessageListener = false;
24581function addMessageListener() {
24582    if (!hasAddedMessageListener) {
24583        window.addEventListener('message', function (event) {
24584            var appSwitchers = document.querySelectorAll('pds-app-switcher');
24585            for (var i = 0; i < appSwitchers.length; i++) {
24586                appSwitchers[i].handleMessageEvent(event);
24587            }
24588        });
24589        hasAddedMessageListener = true;
24590    }
24591}
24592var PdsAppSwitcher = (function (_super) {
24593    __extends(PdsAppSwitcher, _super);
24594    function PdsAppSwitcher() {
24595        var _this = _super !== null && _super.apply(this, arguments) || this;
24596        _this.is = 'pds-app-switcher';
24597        _this.properties = {
24598            scopeClass: {
24599                type: String,
24600                value: ''
24601            },
24602            state: {
24603                type: String,
24604                value: 'CLOSED'
24605            },
24606            dataHasIcon: {
24607                type: String,
24608                value: 'true'
24609            },
24610            apps: {
24611                value: null,
24612                observer: 'updateVisibility'
24613            },
24614            motuGuid: {
24615                type: String,
24616                value: null,
24617                observer: 'motuGuidChanged'
24618            }
24619        };
24620        return _this;
24621    }
24622    PdsAppSwitcher.prototype.created = function () {
24623        log('app switcher created');
24624        this.motuGuidObservable = new rxjs_1.BehaviorSubject(null);
24625        this.iframeSwitch = localStorage.getItem('pds-app-switcher-iframe-switch');
24626        switch (this.iframeSwitch) {
24627            case 'attach-apps-manually':
24628                break;
24629            case 'pds-site':
24630                this.iframeSrc = 'app-switcher-support-files/fetch-app-switcher-data.html';
24631                break;
24632            case 'local':
24633                this.iframeSrc = 'http://localhost:9090/fetch-app-switcher-data.html';
24634                break;
24635            case 'test':
24636                this.iframeSrc = 'https://cdn.assets.peopleadmin.com/pds/fetch-app-switcher-data.html';
24637                break;
24638            case 'stage':
24639                this.iframeSrc = 'https://cdn.assets.peopleadmin.com/pds/fetch-app-switcher-data.html';
24640                break;
24641            case 'production-ca':
24642                this.iframeSrc = 'https://cdn.assets.peopleadmin.com/pds/fetch-app-switcher-data.html';
24643                break;
24644            case 'production':
24645            default:
24646                this.iframeSrc = 'https://cdn.assets.peopleadmin.com/pds/fetch-app-switcher-data.html';
24647                break;
24648        }
24649        addMessageListener();
24650    };
24651    PdsAppSwitcher.prototype.ready = function () {
24652        _super.prototype.ready.call(this);
24653        if (this.iframeSrc != null) {
24654            this.attachIFrame();
24655        }
24656        this.style.display = 'none';
24657    };
24658    PdsAppSwitcher.prototype.attached = function () {
24659        var _this = this;
24660        log('app switcher attached');
24661        setTimeout(function () {
24662            log('app switcher delayed attached');
24663            _super.prototype.attached.call(_this);
24664            _this.popoverAccessibilityController = popover_accessibility_controller_factory_1.PopoverAccessibilityControllerFactory.getPopoverAccessibilityControllerInstance();
24665            _this.popoverTrigger = _this.querySelector('#pds-app-switcher');
24666            _this.popoverContentElement = _this.querySelector('#a
24666pp-switcher-popover');
24667            _this.popoverAccessibilityController.setPanelTrigger(_this.popoverTrigger);
24668            _this.popoverAccessibilityController.setPopoverInstance(_this);
24669            _this.popoverAccessibilityController.setPanelContainer(_this.popoverContentElement);
24670            _this.popoverAccessibilityController.addRequiredAccessibilityLabelsToChildTabbableElements();
24671            _this.createAppSwitcherPanel();
24672        });
24673    };
24674    PdsAppSwitcher.prototype.motuGuidChanged = function (motuGuid) {
24675        log('moduGuid changed to: ' + motuGuid);
24676        this.motuGuidObservable.next(motuGuid);
24677    };
24678    PdsAppSwitcher.prototype.attachIFrame = function () {
24679        if (this.iframeSrc == null) {
24680            log('not attaching iFrame');
24681            return;
24682        }
24683        log('attaching the iFrame');
24684        pds_utils_1.pdsUtils.remove(this.querySelector('iframe'));
24685        var myIFrame = document.createElement('iframe');
24686        myIFrame.setAttribute('src', this.iframeSrc);
24687        myIFrame.style.display = 'none';
24688        this.querySelector('.pds-app-switcher-contents').appendChild(myIFrame);
24689    };
24690    PdsAppSwitcher.prototype.handleMessageEvent = function (event) {
24691        var _this = this;
24692        log('PdsAppSwitcher.handleMessageEvent');
24693        log(event);
24694        var myIFrame = this.querySelector('iframe');
24695        if (event.data != null && event.data.from === 'fetch-app-switcher-data') {
24696            switch (event.data.task) {
24697                case 'request-inputs':
24698                    if (this.motuGuidSubscription == null) {
24699                        this.motuGuidSubscription = this.motuGuidObservable.subscribe(function (motuGuid) {
24700                            if (motuGuid == null) {
24701                                return;
24702                            }
24703                            myIFrame.contentWindow.postMessage({
24704                                from: 'pds-app-switcher',
24705                                task: 'fetch-data',
24706                                iframeSwitch: _this.iframeSwitch,
24707                                motuGuid: motuGuid,
24708                                loggerStatus: pds_logger_1.pdsLogger.loggerStatus['app-switcher']
24709                            }, '*');
24710                        });
24711                    }
24712                    else {
24713                        this.motuGuidObservable.next(this.motuGuidObservable.value);
24714                    }
24715                    break;
24716                case 'assign-apps':
24717                    log('assigning apps');
24718                    this.apps = this.convertApps(event.data.apps);
24719                    break;
24720                default:
24721                    console.error('Received a task: "' + event.data.task + '" from the iframe that is not not supported.');
24722            }
24723        }
24724    };
24725    PdsAppSwitcher.prototype.toggleAppSwitcher = function () {
24726        setTimeout(function () {
24727            var appSwitcherPopover = document.getElementById('app-switcher-popover');
24728            if (appSwitcherPopover) {
24729                appSwitcherPopover.classList.remove('hide-element');
24730            }
24731        }, 100);
24732        this.state = (this.state === 'OPEN') ? 'CLOSED' : 'OPEN';
24733    };
24734    PdsAppSwitcher.prototype.createAppSwitcherPanel = function () {
24735        var _this = this;
24736        var popoverConfig = poppable_element_factory_1.PoppableElementFactory.generatePopoverConfig(false, 'bottom-start', 6000, 'popover pds-app-switcher', this.popoverContentElement, function (instance) { _this.onAppSwitcherHidden(instance); }, function (instance) { _this.onAppSwitcherShown(instance); });
24737        this.appSwitcherPopoverInstance = poppable_element_factory_1.PoppableElementFactory.generatePoppableElement(this.popoverTrigger, popoverConfig, this.is);
24738        log('popover menu instance created');
24739        this.updateVisibility();
24740    };
24741    PdsAppSwitcher.prototype.onAppSwitcherHidden = function (popoverEngineInstance) {
24742        this.hidePanel();
24743        this.popoverAccessibilityController.deregisterEventListenerOnPanel
24743('keydown');
24744    };
24745    PdsAppSwitcher.prototype.onAppSwitcherShown = function (popoverEngineInstance) {
24746        this.popoverContentElement = popoverEngineInstance.popper;
24747        this.popoverAccessibilityController.setPanelContainer(this.popoverContentElement);
24748        this.popoverContentElement.setAttribute('aria-label', pds_i18n_1.pdsI18n.getText('pds|popover|Backwards From First Element'));
24749        this.popoverAccessibilityController.registerEventListenerOnPanel('keydown');
24750    };
24751    PdsAppSwitcher.prototype.hidePanel = function () {
24752        this.state = 'CLOSED';
24753        if (this.appSwitcherPopoverInstance != null) {
24754            this.appSwitcherPopoverInstance.hide();
24755        }
24756    };
24757    PdsAppSwitcher.prototype.updateVisibility = function () {
24758        this.style.display = this.apps == null || this.apps.length < 2 || this.appSwitcherPopoverInstance == null ? 'none' : '';
24759        log('visibility set to: "' + this.style.display + '"');
24760    };
24761    PdsAppSwitcher.prototype.convertApps = function (appRIs) {
24762        log('converting apps');
24763        var apps = [];
24764        if (appRIs != null) {
24765            for (var _i = 0, appRIs_1 = appRIs; _i < appRIs_1.length; _i++) {
24766                var appRI = appRIs_1[_i];
24767                apps.push({
24768                    id: appRI.ProductId,
24769                    name: appRI.ProductName,
24770                    initials: appRI.initials,
24771                    url: appRI.ProductUrl,
24772                    colorCategoryNumber: appRI.colorCategoryNumber,
24773                    productIcon: appRI.ProductIcon || undefined
24774                });
24775            }
24776        }
24777        return apps;
24778    };
24779    return PdsAppSwitcher;
24780}(pds_widget_1.PdsWidget));
24781exports.PdsAppSwitcher = PdsAppSwitcher;
24782
24783
24784
24785/***/ }),
24786/* 180 */
24787/***/ (function(module, exports, __webpack_require__) {
24788
24789"use strict";
24790
24791Object.defineProperty(exports, "__esModule", { value: true });
24792var pds_utils_1 = __webpack_require__(18);
24793var pds_i18n_1 = __webpack_require__(15);
24794var PopoverAccessibilityController = (function () {
24795    function PopoverAccessibilityController() {
24796        var _this = this;
24797        this.panelContainerTabInterceptFunction = function (event) {
24798            var allTabbableElementsInPopover = pds_utils_1.pdsUtils.getAllTabbableElements(_this.panelContainerElement);
24799            if (event.keyCode === 9) {
24800                if (!event.shiftKey && event.target === allTabbableElementsInPopover[allTabbableElementsInPopover.length - 1]) {
24801                    event.preventDefault();
24802                    _this.hidePanel();
24803                    if (_this.currentPopoverTriggerElement != null) {
24804                        _this.currentPopoverTriggerElement.focus();
24805                    }
24806                }
24807                else if (event.shiftKey && (event.target === _this.panelContainerElement || event.target === allTabbableElementsInPopover[0])) {
24808                    event.preventDefault();
24809                    _this.hidePanel();
24810                    if (_this.currentPopoverTriggerElement != null) {
24811                        _this.currentPopoverTriggerElement.focus();
24812                    }
24813                }
24814            }
24815        };
24816    }
24817    PopoverAccessibilityController.prototype.setPanelTrigger = function (trigger) {
24818        this.currentPopoverTriggerElement = trigger;
24819    };
24820    PopoverAccessibilityController.prototype.setPanelContainer = function (container) {
24821        this.panelContainerElement = container;
24822    };
24823    PopoverAccessibilityController.prototype.registerEventListenerOnPanel = function (eventType) {
24824        if (this.panelContainerElement != null) {
24825            this.panelContainerElement.addEventListener(eventType, this.panelContainerTabInterceptFunction);
24826        }
24827    };
24828    PopoverAccessibilityController.prototype.deregisterEventListenerOnPanel = function (eventType) {
24829        if (this.panelContainerElement != null) {
24830            this.panelContainerElement.removeEventListener(eventType, this.panelContainerTabInterceptFunction);
24831        }
24832    };
24833    PopoverAccessibilityController.prototype.setPopoverInstance = function (popover) {
24834        this.popover = popover;
24835    };
24836    PopoverAccessibilityController.prototype.addRequiredAccessibilityLabelsToChildTabbableElements = function () {
24837        var allTabableElementsInPopover = [];
24838        if (this.panelContainerElement != null) {
24839            allTabableElementsInPopover = Array.prototype.slice.call(pds_utils_1.pdsUtils.getAllTabbableElements(this.panelContainerElement));
24840        }
24841        if (allTabableElementsInPopover.length >= 2) {
24842            var firstTabableElement = allTabableElementsInPopover[0];
24843            firstTabableElement.setAttribute('aria-label', firstTabableElement.innerText + '. ' + pds_i18n_1.pdsI18n.getText('pds|popover|Backwards From First Element'));
24844            var lastTabableElement = allTabableElementsInPopover[allTabableElementsInPopover.length - 1];
24845            lastTabableElement.setAttribute('aria-label', lastTabableElement.innerText + '. ' + pds_i18n_1.pdsI18n.getText('pds|popover|Forwards From Last Element'));
24846        }
24847        else if (allTabableElementsInPopover.length === 1) {
24848            var firstTabableElement = allTabableElementsInPopover[0];
24849            firstTabableElement.setAttribute('aria-label', firstTabableElement.innerText + '. ' + pds_i18n_1.pdsI18n.getText('pds|popover|Navigating From Single Element'));
24850        }
24851    };
24852    PopoverAccessibilityController.prototype.hidePanel = function () {
24853        if (this.popover != null) {
24854            this.popover.hidePanel();
24855        }
24856    };
24857    return PopoverAccessibilityController;
24858}());
24859exports.PopoverAccessibilityController = PopoverAccessibilityController;
24860
24861
24862
24863/***/ }),
24864/* 181 */
24865/***/ (function(module, exports, __webpack_require__) {
24866
24867"use strict";
24868
24869var __extends = (this && this.__extends) || (function () {
24870    var extendStatics = function (d, b) {
24871        extendStatics = Object.setPrototypeOf ||
24872            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24873            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24874        return extendStatics(d, b);
24875    }
24876    return function (d, b) {
24877        extendStatics(d, b);
24878        function __() { this.constructor = d; }
24879        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24880    };
24881})();
24882Object.defineProperty(exports, "__esModule", { value: true });
24883var pds_abstract_input_widget_1 = __webpack_require__(31);
24884var pds_validation_rules_engine_1 = __webpack_require__(26);
24885var PdsTextareaWidget = (function (_super) {
24886    __extends(PdsTextareaWidget, _super);
24887    function PdsTextareaWidget() {
24888        var _this = _super !== null && _super.apply(this, arguments) || this;
24889        _this.is = 'pds-textarea-widget';
24890        _this.currentCharCount = 0;
24891        _this.properties = {
24892            name: String,
24893            dataLabelText: String,
24894            dataShowLabel: {
24895                type: String,
24896                value: null
24897            },
24898            dataBadgeText: {
24899                type: String,
24900                value: '',
24901                observer: 'setUpBadge'
24902            },
24903            dataHelperText: {
24904                type: String,
24905                value: null
24906            },
24907            dataFieldHelpText: String,
24908            dataPlaceholderText: String,
24909            dataTooltipText: String,
24910            dataUseAlternateColorScheme: {
24911                type: String,
24912                value: 'false'
24913            },
24914            dataIsreadonly: {
24915                type: String,
24916                value: 'false',
24917                observer: 'setReadonlyText'
24918            },
24919            dataIsfieldonly: {
24920                type: String,
24921                value: 'false'
24922            },
24923            dataHideUnelevatedBadge: {
24924                type: String,
24925                value: 'false',
24926                observer: 'setUpBadge'
24927            },
24928            dataDisableInvalidBadgeElevation: {
24929                type: String,
24930                value: 'false',
24931                observer: 'setUpBadge'
24932            },
24933            dataRegexErrorText: String,
24934            dataInverseRegexErrorText: String,
24935            dataIsrequired: {
24936                type: String,
24937                value: 'false',
24938                observer: 'setUpBadge'
24939            },
24940            disabled: {
24941                type: String,
24942                value: 'false'
24943            },
24944            dataUseValidIndicator: {
24945                type: String,
24946                value: 'false'
24947            },
24948            dataMinlength: String,
24949            dataMaxlength: {
24950                type: String,
24951                value: null,
24952                observer: 'setDefaultShowCharCounter'
24953            },
24954            dataExcludechars: String,
24955            dataRegex: String,
24956            dataRegexmodifiers: String,
24957            dataInverseRegex: String,
24958            dataInverseRegexmodifiers: String,
24959            dataCustomvalidate: String,
24960            dataActionIcon: String,
24961            dataShowCharCounter: {
24962                type: String,
24963                value: null
24964            }
24965        };
24966        return _this;
24967    }
24968    PdsTextareaWidget.prototype.ready = function () {
24969        _super.prototype.ready.call(this);
24970        this.currentCharCount = this.value.length;
24971    };
24972    PdsTextareaWidget.prototype.setDefaultShowCharCounter = function (newValue, oldValue) {
24973        if (newValue == null && oldValue == null) {
24974            return;
24975        }
24976        if (this.dataShowCharCounter == null) {
24977            var maxLength = Number(this.dataMaxlength);
24978            if (!isNaN(maxLength) && maxLength > 0) {
24979                this.dataShowCharCounter = 'true';
24980            }
24981        }
24982    };
24983    PdsTextareaWidget.prototype.generateValidationRules = function () {
24984        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
24985        validationRules.isText = true;
24986        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
24987        validationRules.setProperty('maxLength', this.dataMaxlength, Number);
24988        validationRules.setProperty('minLength', this.dataMinlength, Number);
24989        validationRules.setProperty('excludeChars', this.dataExcludechars, String);
24990        if (this.dataRegex != null &&
24991            this.dataRegex.length > 0 &&
24992            this.dataRegexErrorText != null &&
24993            this.dataRegexErrorText.length > 0) {
24994            try {
24995                validationRules.regex = {
24996                    pattern: this.dataRegex != null ? new RegExp(this.dataRegex, this.dataRegexmodifiers) : new RegExp(this.dataRegex),
24997                    errorMessage: this.dataRegexErrorText
24998                };
24999            }
25000            catch (err) {
25001            }
25002        }
25003        if (this.dataInverseRegex != null &&
25004            this.dataInverseRegex.length > 0 &&
25005            this.dataInverseRegexErrorText != null &&
25006            this.dataInverseRegexErrorText.length > 0) {
25007            try {
25008                validationRules.inverseRegex = {
25009                    pattern: this.dataInverseRegex != null
25010                        ? new RegExp(this.dataInverseRegex, this.dataInverseRegexmodifiers)
25011                        : new RegExp(this.dataInverseRegex),
25012                    errorMessage: this.dataInverseRegexErrorText
25013                };
25014            }
25015            catch (err) {
25016            }
25017        }
25018        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
25019        if ('dataCustomvalidate' in this) {
25020            this.validators.push({
25021                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
25022                condition: {
25023                    element: this
25024                }
25025            });
25026        }
25027    };
25028    PdsTextareaWidget.prototype.setModelValue = function (modelValue, skip) {
25029        var ele = this.inputSelector();
25030        if (ele != null && modelValue !== ele.modelValue) {
25031            ele.modelValue = modelValue;
25032            if (skip !== true) {
25033                this.setValue(modelValue, true);
25034            }
25035            return true;
25036        }
25037        return false;
25038    };
25039    PdsTextareaWidget.prototype.setValue = function (value, skip) {
25040        if (skip === void 0) { skip = false; }
25041        if (value == null) {
25042            value = '';
25043        }
25044        var inputEl = this.inputSelector();
25045        if (inputEl != null && value !== inputEl.value) {
25046            inputEl.value = value;
25047        }
25048        if (skip !== true) {
25049            this.setModelValue(value, true);
25050        }
25051        this.currentCharCount = this.value.length;
25052    };
25053    PdsTextareaWidget.prototype.inputSelector = function () {
25054        return this.querySelector('textarea');
25055    };
25056    PdsTextareaWidget.prototype.getCharactersRemaining = function (currentCharCount, maxLenght) {
25057        var difference = Number(this.dataMaxlength) - this.currentCharCount;
25058        if (isNaN(difference) || difference < 0) {
25059            return 0;
25060        }
25061        return difference;
25062    };
25063    return PdsTextareaWidget;
25064}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
25065exports.PdsTextareaWidget = PdsTextareaWidget;
25066
25067
25068
25069/***/ }),
25070/* 182 */
25071/***/ (function(module, exports, __webpack_require__) {
25072
25073"use strict";
25074
25075var __extends = (this && this.__extends) || (function () {
25076    var extendStatics = function (d, b) {
25077        extendStatics = Object.setPrototypeOf ||
25078            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25079            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
25080        return extendStatics(d, b);
25081    }
25082    return function (d, b) {
25083        extendStatics(d, b);
25084        function __() { this.constructor = d; }
25085        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25086    };
25087})();
25088Object.defineProperty(exports, "__esModule", { value: true });
25089var pds_abstract_input_widget_1 = __webpack_require__(31);
25090var pds_validation_rules_engine_1 = __webpack_require__(26);
25091var pds_logger_1 = __webpack_require__(41);
25092var log = pds_logger_1.pdsLogger.prependLogger(pds_logger_1.pdsLogger.requiresLogger('input-widgets'), 'pds-checkbox-widget.ts');
25093var PdsCheckboxWidget = (function (_super) {
25094    __extends(PdsCheckboxWidget, _super);
25095    function PdsCheckboxWidget() {
25096        var _this = _super !== null && _super.apply(this, arguments) || this;
25097        _this.is = 'pds-checkbox-widget';
25098        _this.properties = {
25099            name: String,
25100            dataLabelText: String,
25101            dataShowLabel: {
25102                type: String,
25103                value: null
25104            },
25105            dataBadgeText: {
25106                type: String,
25107                value: '',
25108                observer: 'setUpBadge'
25109            },
25110            dataHelperText: {
25111                type: String,
25112                value: null
25113            },
25114            dataFieldHelpText: String,
25115            dataTooltipText: String,
25116            dataUseAlternateColorScheme: {
25117                type: String,
25118                value: 'false'
25119            },
25120            dataIsfieldonly: {
25121                type: String,
25122                value: 'false'
25123            },
25124            dataHideUnelevatedBadge: {
25125                type: String,
25126                value: 'false',
25127                observer: 'setUpBadge'
25128            },
25129            dataDisableInvalidBadgeElevation: {
25130                type: String,
25131                value: 'false',
25132                observer: 'setUpBadge'
25133            },
25134            disabled: {
25135                type: String,
25136                value: 'false',
25137                observer: 'updateDisabled'
25138            },
25139            dataIsrequired: {
25140                type: String,
25141                value: 'false',
25142                observer: 'setUpBadge'
25143            },
25144            dataUseValidIndicator: {
25145                type: String,
25146                value: 'false'
25147            },
25148            dataCustomvalidate: {
25149                type: String
25150            },
25151            options: {
25152                type: Array,
25153                value: null,
25154                observer: 'renderInputs'
25155            }
25156        };
25157        return _this;
25158    }
25159    Object.defineProperty(PdsCheckboxWidget.prototype, "value", {
25160        get: function () {
25161            var values = [];
25162            var result = this.querySelectorAll('input:checked');
25163            for (var i = 0; i < result.length; i++) {
25164                values.push(result[i].getAttribute('value'));
25165            }
25166            if (values.length === 0) {
25167                return '';
25168            }
25169            return JSON.stringify(values);
25170        },
25171        set: function (value) {
25172            this.setValue(value);
25173            this.setReadonlyText();
25174        },
25175        enumerable: true,
25176        configurable: true
25177    });
25178    Object.defineProperty(PdsCheckboxWidget.prototype, "modelValue", {
25179        get: function () {
25180            return this._modelValue;
25181        },
25182        set: function (value) {
25183            var modelValueChanged = this.setModelValue(value);
25184            if (modelValueChanged) {
25185                this.validateWidget();
25186                if (this.isValid && this.myErrorField != null) {
25187                    this.showErrorMessage(false);
25188                }
25189            }
25190            this.setReadonlyText();
25191        },
25192        enumerable: true,
25193        configurable: true
25194    });
25195    PdsCheckboxWidget.prototype.generateValidationRules = function () {
25196        var validationRules = pds_validation_rules_engine_1.pdsValidationRulesEngine.getBasicValidationRules();
25197        validationRules.isText = true;
25198        validationRules.setProperty('isRequired', this.dataIsrequired, Boolean);
25199        this.validators = pds_validation_rules_engine_1.pdsValidationRulesEngine.getValidatorsForRules(validationRules);
25200        if ('dataCustomvalidate' in this) {
25201            this.validators.push({
25202                execute: this.pds.validation.getCustomValidate(this.dataCustomvalidate),
25203                condition: {
25204                    element: this
25205                }
25206            });
25207        }
25208    };
25209    PdsCheckboxWidget.prototype.redrawOptions = function () {
25210        log("Redrawing the options for " + this.name + ".");
25211        this.redraw('options');
25212        this.setValue(JSON.stringify(this.modelValue), true);
25213    };
25214    PdsCheckboxWidget.prototype.setModelValue = function (modelValue, skip) {
25215        if (modelValue !== this._modelValue) {
25216            if (modelValue instanceof Array) {
25217                this._modelValue = modelValue.slice();
25218                if (skip !== true) {
25219                    this.setValue(JSON.stringify(modelValue), true);
25220                }
25221            }
25222            else {
25223                delete this._modelValue;
25224                if (skip !== true) {
25225                    this.setValue('');
25226                }
25227            }
25228            return true;
25229        }
25230        return false;
25231    };
25232    PdsCheckboxWidget.prototype.setValue = function (value, skip) {
25233        if (skip === void 0) { skip = false; }
25234        var values;
25235        if (value != null) {
25236            try {
25237                values = JSON.parse(value);
25238            }
25239            catch (_a) { }
25240        }
25241        var inputEls = this.querySelectorAll('input');
25242        for (var i = 0; i < inputEls.length; i++) {
25243            var input = inputEls[i];
25244            input.checked = values != null && values.indexOf(input.value) >= 0;
25245        }
25246        if (skip !== true) {
25247            this.setModelValue(values, true);
25248        }
25249    };
25250    PdsCheckboxWidget.prototype.updateDisabled = function () {
25251        var checkboxes = this.querySelectorAll('input');
25252        for (var i = 0; i < checkboxes.length; i++) {
25253            checkboxes[i].disabled = this.isDisabled() === 'disabled';
25254        }
25255    };
25256    PdsCheckboxWidget.prototype.renderInputs = function () {
25257        var _this = this;
25258        var container = this.querySelector('ul');
25259        container.innerHTML = '';
25260        if (this.options != null) {
25261            var checkboxIndex = 0;
25262            for (var _i = 0, _a = this.options; _i < _a.length; _i++) {
25263                var option = _a[_i];
25264                var liEl = createElement('li');
25265                var labelEl = createElement('label');
25266                var inputEl = createElement('input');
25267                var labelTextEl = createElement('div');
25268                var helpTextEl = createElement('p');
25269                labelEl.setAttribute('for', this.name + "-option-" + checkboxIndex);
25270                inputEl.setAttribute('id', this.name + "-option-" + checkboxIndex);
25271                inputEl.setAttribute('type', 'checkbox');
25272                inputEl.setAttribute('name', this.name);
25273                inputEl.setAttribute('value', option.value);
25274                inputEl.addEventListener('change', function () {
25275                    _this.inputChange();
25276                });
25277                inputEl.disabled = this.isDisabled() === 'disabled';
25278                labelTextEl.classList.add('pds-label-text');
25279                labelTextEl.textContent = option.text;
25280                helpTextEl.classList.add('pds-help-text');
25281                if (option.helperText == null || option.helperText.length === 0) {
25282                    helpTextEl.classList.add('pds-is-hidden');
25283                }
25284                helpTextEl.textContent = option.helperText || null;
25285                container.appendChild(liEl);
25286                liEl.appendChild(labelEl);
25287                liEl.appendChild(helpTextEl);
25288                labelEl.appendChild(inputEl);
25289                labelEl.appendChild(labelTextEl);
25290                if (option.badgeText) {
25291                    var fieldBadgeEl = createElement('span');
25292                    fieldBadgeEl.classList.add('pds-field-badge');
25293                    fieldBadgeEl.textContent = option.badgeText;
25294                    labelTextEl.appendChild(document.createTextNode(' '));
25295                    labelTextEl.appendChild(fieldBadgeEl);
25296                }
25297                if (option.tooltipText) {
25298                    var fieldHelpEl = createElement('span');
25299                    var fieldTooltipEl = createElement('pds-tooltip');
25300                    fieldTooltipEl.textContent = option.tooltipText;
25301                    fieldHelpEl.classList.add('pds-field-help');
25302                    fieldHelpEl.classList.add('pds-tooltip-trigger');
25303                    fieldHelpEl.appendChild(fieldTooltipEl);
25304                    labelTextEl.appendChild(document.createTextNode(' '));
25305                    labelTextEl.appendChild(fieldHelpEl);
25306                }
25307                checkboxIndex++;
25308            }
25309            this.setValue(JSON.stringify(this._modelValue), true);
25310        }
25311    };
25312    PdsCheckboxWidget.prototype.inputChange = function () {
25313        this.errorPresentWhenBlurOccurred = true;
25314        _super.prototype.inputChange.call(this);
25315    };
25316    PdsCheckboxWidget.prototype.validateWidget = function (showValidationResult) {
25317        if (showValidationResult === void 0) { showValidationResult = false; }
25318        return _super.prototype.validateWidget.call(this, true);
25319    };
25320    return PdsCheckboxWidget;
25321}(pds_abstract_input_widget_1.PdsAbstractInputWidget));
25322exports.PdsCheckboxWidget = PdsCheckboxWidget;
25323function createElement(tagName) {
25324    var element = document.createElement(tagName);
25325    element.classList.add('pds-checkbox-widget');
25326    return element;
25327}
25328
25329
25330
25331/***/ }),
25332/* 183 */
25333/***/ (function(module, exports, __webpack_require__) {
25334
25335"use strict";
25336
25337var __extends = (this && this.__extends) || (function () {
25338    var extendStatics = function (d, b) {
25339        extendStatics = Object.setPrototypeOf ||
25340            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25341            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
25342        return extendStatics(d, b);
25343    }
25344    return function (d, b) {
25345        extendStatics(d, b);
25346        function __() { this.constructor = d; }
25347        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25348    };
25349})();
25350Object.defineProperty(exports, "__esModule", { value: true });
25351var pds_widget_1 = __webpack_require__(7);
25352var poppable_element_factory_1 = __webpack_require__(68);
25353var popover_accessibility_controller_factory_1 = __webpack_require__(93);
25354var pds_i18n_1 = __webpack_require__(15);
25355var PdsUserMenu = (function (_super) {
25356    __extends(PdsUserMenu, _super);
25357    function PdsUserMenu() {
25358        var _this = _super !== null && _super.apply(this, arguments) || this;
25359        _this.is = 'pds-user-menu';
25360        _this.userMenuOpen = false;
25361        _this.properties = {
25362            scopeClass: {
25363                type: String,
25364                value: ''
25365            },
25366            state: {
25367                type: String,
25368                value: 'CLOSED'
25369            },
25370            user: {
25371                value: null
25372            },
25373            name: {
25374                value: null,
25375                type: String
25376            }
25377        };
25378        return _this;
25379    }
25380    PdsUserMenu.prototype.attached = function () {
25381        var _this = this;
25382        _super.prototype.attached.call(this);
25383        this.popoverCreated = false;
25384        this.createPopoverMenu();
25385        setTimeout(function () {
25386            _this.verifyNamePresent();
25387        });
25388    };
25389    PdsUserMenu.prototype.createPopoverMenu = function () {
25390        var _this = this;
25391        if (!this.popoverCreated &&
25392            this.user != null &&
25393            this.querySelector('#' + this.name + '-user-menu-popover') != null) {
25394            this.popoverAccessibilityController = popover_accessibility_controller_factory_1.PopoverAccessibilityControllerFactory.getPopoverAccessibilityControllerInstance();
25395            this.popoverTrigger = this.querySelector('#' + this.name + '-user-menu-trigger');
25396            this.popoverContentElement = this.querySelector('#' + this.name + '-user-menu-popover');
25397            this.popoverAccessibilityController.setPanelTrigger(this.popoverTrigger);
25398            this.popoverAccessibilityController.setPopoverInstance(this);
25399            this.popoverAccessibilityController.setPanelContainer(this.popoverContentElement);
25400            this.popoverAccessibilityController.addRequiredAccessibilityLabelsToChildTabbableElements();
25401            this.createUserMenuPanel();
25402            this.popoverCreated = true;
25403        }
25404        else {
25405            this.querySelector('.user-menu-main').addEventListener('dom-change', function (event) {
25406                _this.createPopoverMenu();
25407            });
25408        }
25409    };
25410    PdsUserMenu.prototype.toggleUserMenu = function () {
25411        setTimeout(function () {
25412            var userMenuPopover = document.querySelector('div.hide-element');
25413            if (userMenuPopover) {
25414                userMenuPopover.classList.remove('hide-element');
25415            }
25416        }, 100);
25417        this.state = (this.state === 'OPEN') ? 'CLOSED' : 'OPEN';
25418    };
25419    PdsUserMenu.prototype.getButtonAriaLabel = function (state) {
25420        return pds_i18n_1.pdsI18n.getText(this.state === 'OPEN' ? 'pds|app switcher|Close user menu' : 'pds|app switcher|Open user menu');
25421    };
25422    PdsUserMenu.prototype.createUserMenuPanel = function () {
25423        var _this = this;
25424        var popoverConfig = poppable_element_factory_1.PoppableElementFactory.generatePopoverConfig(false, 'bottom-end', 7000, 'popover user-menu', this.popoverContentElement, function (instance) { _this.onUserMenuHidden(instance); }, function (instance) { _this.onUserMenuShown(instance); });
25425        this.userMenuPopoverInstance = poppable_element_factory_1.PoppableElementFactory.generatePoppableElement(this.popoverTrigger, popoverConfig, this.is);
25426        if (this.userMenuPopoverInstance != null &&
25427            this.userMenuPopoverInstance.popper != null &&
25428            this.userMenuPopoverInstance.popper.firstChild != null) {
25429            this.userMenuPopoverInstance.popper.classList.add('pds-user-menu');
25430            this.userMenuPopoverInstance.popper.firstChild.classList.add('pds-user-menu');
25431        }
25432    };
25433    PdsUserMenu.prototype.onUserMenuHidden = function (popoverEngineInstance) {
25434        this.hidePanel();
25435        this.popoverAccessibilityController.deregisterEventListenerOnPanel
25435('keydown');
25436    };
25437    PdsUserMenu.prototype.onUserMenuShown = function (popoverEngineInstance) {
25438        this.popoverContentElement = popoverEngineInstance.popper;
25439        this.popoverAccessibilityController.setPanelContainer(this.popoverContentElement);
25440        this.popoverContentElement.setAttribute('aria-label', pds_i18n_1.pdsI18n.getText('pds|popover|Backwards From First Element'));
25441        this.popoverAccessibilityController.registerEventListenerOnPanel('keydown');
25442    };
25443    PdsUserMenu.prototype.hidePanel = function () {
25444        this.state = 'CLOSED';
25445        if (this.userMenuPopoverInstance != null) {
25446            this.userMenuPopoverInstance.hide();
25447        }
25448    };
25449    PdsUserMenu.prototype.getUserInitialsForDisplay = function () {
25450        var userInitials = '';
25451        if (this.user != null) {
25452            if (this.user.firstName != null) {
25453                userInitials += this.user.firstName.slice(0, 1);
25454            }
25455            if (this.user.lastName != null) {
25456                userInitials += this.user.lastName.slice(0, 1);
25457            }
25458        }
25459        return userInitials;
25460    };
25461    PdsUserMenu.prototype.hasUserProfilePicture = function () {
25462        return this.user != null && this.user.profilePicture != null;
25463    };
25464    PdsUserMenu.prototype.userMenuClickHandler = function (event) {
25465        event.preventDefault();
25466        var target = event.target;
25467        if (!this.pds.utils.is(target, 'a')) {
25468            target = this.pds.utils.getClosest(target, 'a');
25469        }
25470        var nav = target.dataNav;
25471        this.hidePanel();
25472        if (nav.onUserClick != null) {
25473            nav.onUserClick(nav, event);
25474        }
25475        else {
25476            throw "NavItem " + nav.id + " did not have onUserClick function defined.";
25477        }
25478    };
25479    return PdsUserMenu;
25480}(pds_widget_1.PdsWidget));
25481exports.PdsUserMenu = PdsUserMenu;
25482
25483
25484
25485/***/ }),
25486/* 184 */
25487/***/ (function(module, exports, __webpack_require__) {
25488
25489"use strict";
25490
25491var __extends = (this && this.__extends) || (function () {
25492    var extendStatics = function (d, b) {
25493        extendStatics = Object.setPrototypeOf ||
25494            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25495            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
25496        return extendStatics(d, b);
25497    }
25498    return function (d, b) {
25499        extendStatics(d, b);
25500        function __() { this.constructor = d; }
25501        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
25502    };
25503})();
25504Object.defineProperty(exports, "__esModule", { value: true });
25505var pds_widget_1 = __webpack_require__(7);
25506var pds_utils_1 = __webpack_require__(18);
25507var immersive_reader_service_1 = __webpack_require__(108);
25508var PdsImmersiveReader = (function (_super) {
25509    __extends(PdsImmersiveReader, _super);
25510    function PdsImmersiveReader() {
25511        var _this = _super !== null && _super.apply(this, arguments) || this;
25512        _this.is = 'pds-immersive-reader';
25513        _this.showButton = false;
25514        _this.showIcon = true;
25515        _this.showText = true;
25516        _this.showTooltip = true;
25517        _this.properties = {
25518            id: {
25519                type: String
25520            },
25521            dataTitle: {
25522                type: String
25523            },
25524            dataTitleSelector: {
25525                type: String
25526            },
25527            dataContent: {
25528                type: String
25529            },
25530            dataContentArray: {
25531                type: Array
25532            },
25533            dataContentSelector: {
25534                type: String
25535            },
25536            dataContentLanguage: {
25537                type: String
25538            },
25539            dataContentSeparator: {
25540                type: String
25541            },
25542            dataUiLanguage: {
25543                type: String
25544            },
25545            dataShowButton: {
25546                type: String,
25547                value: 'false'
25548            },
25549            dataShowIcon: {
25550                type: String,
25551                value: 'true'
25552            },
25553            dataShowText: {
25554                type: String,
25555                value: 'true'
25556            },
25557            dataShowTooltip: {
25558                type: String,
25559                value: 'true'
25560            },
25561            tooltipDirection: {
25562                type: Object
25563            }
25564        };
25565        return _this;
25566    }
25567    Object.defineProperty(PdsImmersiveReader.prototype, "dataShowButton", {
25568        set: function (value) {
25569            this.showButton = pds_utils_1.pdsUtils.getStringBooleanValue(value);
25570        },
25571        enumerable: true,
25572        configurable: true
25573    });
25574    Object.defineProperty(PdsImmersiveReader.prototype, "dataShowIcon", {
25575        set: function (value) {
25576            this.showIcon = pds_utils_1.pdsUtils.getStringBooleanValue(value);
25577        },
25578        enumerable: true,
25579        configurable: true
25580    });
25581    Object.defineProperty(PdsImmersiveReader.prototype, "dataShowText", {
25582        set: function (value) {
25583            this.showText = pds_utils_1.pdsUtils.getStringBooleanValue(value);
25584        },
25585        enumerable: true,
25586        configurable: true
25587    });
25588    Object.defineProperty(PdsImmersiveReader.prototype, "dataShowTooltip", {
25589        set: function (value) {
25590            this.showTooltip = pds_utils_1.pdsUtils.getStringBooleanValue(value);
25591        },
25592        enumerable: true,
25593        configurable: true
25594    });
25595    PdsImmersiveReader.prototype.attached = function () {
25596        _super.prototype.attached.call(this);
25597        if (!this.showText && !this.showIcon) {
25598            console.warn('Both the text and icon have been hidden for an immersive reader element, so it cannot be seen.');
25599        }
25600    };
25601    PdsImmersiveReader.prototype.created = function () {
25602        this.immersiveReaderService = new immersive_reader_service_1.ImmersiveReaderService();
25603    };
25604    PdsImmersiveReader.prototype.startImmersiveReader = function () {
25605        var _this = this;
25606        var config = {
25607            content: this.dataContent,
25608            contentArray: this.dataContentArray,
25609            contentLanguage: this.dataContentLanguage,
25610            contentSelector: this.dataContentSelector,
25611            contentSeparator: this.dataContentSeparator,
25612            title: this.dataTitle,
25613            titleSelector: this.dataTitleSelector,
25614            uiLanguage: this.dataUiLanguage
25615        };
25616        this.immersiveReaderService.start(config).subscribe(function () {
25617            _this.emitOpen();
25618            var messageHandler = function (e) {
25619                if (e.data === 'ImmersiveReader-Exit') {
25620                    _this.emitClose();
25621                    window.removeEventListener('message', messageHandler);
25622                }
25623            };
25624            window.addEventListener('message', messageHandler);
25625        });
25626    };
25627    PdsImmersiveReader.prototype.emitClose = function () {
25628        this.dispatchEvent(new Event('close'));
25629    };
25630    PdsImmersiveReader.prototype.emitOpen = function () {
25631        this.dispatchEvent(new Event('open'));
25632    };
25633    return PdsImmersiveReader;
25634}(pds_widget_1.PdsWidget));
25635exports.PdsImmersiveReader = PdsImmersiveReader;
25636
25637
25638
25639/***/ }),
25640/* 185 */
25641/***/ (function(module, exports, __webpack_require__) {
25642
25643/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
25644
25645!function (e, t) {
25646  "object" == ( false ? undefined : _typeof(exports)) && "object" == ( false ? undefined : _typeof(module)) ? module.exports = t() :  true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),
25647				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
25648				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
25649				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
25650}(window, function () {
25651  return function (e) {
25652    var t = {};
25653
25654    function n(r) {
25655      if (t[r]) return t[r].exports;
25656      var a = t[r] = {
25657        i: r,
25658        l: !1,
25659        exports: {}
25660      };
25661      return e[r].call(a.exports, a, a.exports, n), a.l = !0, a.exports;
25662    }
25663
25664    return n.m = e, n.c = t, n.d = function (e, t, r) {
25665      n.o(e, t) || Object.defineProperty(e, t, {
25666        enumerable: !0,
25667        get: r
25668      });
25669    }, n.r = function (e) {
25670      "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
25671        value: "Module"
25672      }), Object.defineProperty(e, "__esModule", {
25673        value: !0
25674      });
25675    }, n.t = function (e, t) {
25676      if (1 & t && (e = n(e)), 8 & t) return e;
25677      if (4 & t && "object" == _typeof(e) && e && e.__esModule) return e;
25678      var r = Object.create(null);
25679      if (n.r(r), Object.defineProperty(r, "default", {
25680        enumerable: !0,
25681        value: e
25682      }), 2 & t && "string" != typeof e) for (var a in e) {
25683        n.d(r, a, function (t) {
25684          return e[t];
25685        }.bind(null, a));
25686      }
25687      return r;
25688    }, n.n = function (e) {
25689      var t = e && e.__esModule ? function () {
25690        return e.default;
25691      } : function () {
25692        return e;
25693      };
25694      return n.d(t, "a", t), t;
25695    }, n.o = function (e, t) {
25696      return Object.prototype.hasOwnProperty.call(e, t);
25697    }, n.p = "", n(n.s = 0);
25698  }([function (e, t, n) {
25699    "use strict";
25700
25701    Object.defineProperty(t, "__esModule", {
25702      value: !0
25703    });
25704    var r = n(1);
25705    t.renderButtons = r.renderButtons;
25706    var a = n(2);
25707    t.launchAsync = a.launchAsync, window.addEventListener("load", function () {
25708      r.renderButtons();
25709    });
25710  }, function (e, t, n) {
25711    "use strict";
25712
25713    Object.defineProperty(t, "__esModule", {
25714      value: !0
25715    });
25716    var r = "data-icon-px-size",
25717        a = "data-button-style",
25718        i = "data-locale",
25719        o = "https://contentstorage.onenote.office.net/onenoteltir/permanent-static-resources/immersive-reader-icon.svg",
25720        s = {
25721      af: "Indompelende leser",
25722      am: "በህያው ስሜት ፈጣሪ ዕይታ አንባቢ",
25723      ar: "القارئ الشامل",
25724      as: "ইমাৰচিভ ৰিডাৰ",
25725      az: "İmmersiv Oxuyucu",
25726      be: "Імерсіўны чытальнік",
25727      bg: "Концентриран четец",
25728      bn: "মনোগ্রাহী পাঠক",
25729      "bn-bd": "ইমার্সিভ পাঠক",
25730      bs: "Koncentrirani čitalac",
25731      ca: "Lector immersiu",
25732      cs: "Asistivní čtečka",
25733      "cy-gb": "Darllenydd Ymdrwythol",
25734      da: "Forenklet læser",
25735      de: "Plastischer Reader",
25736      el: "Προηγμένο πρόγραμμα ανάγνωσης",
25737      en: "Immersive Reader",
25738      es: "Lector inmersivo",
25739      et: "Süvaluger",
25740      eu: "Irakurgailu murgiltzailea",
25741      fa: "خواننده همه‌جانبه",
25742      fi: "Syventävä lukuohjelma",
25743      fil: "Immersive Reader",
25744      fr: "Lecteur immersif",
25745      "ga-ie": "Léitheoir tumthach",
25746      gd: "An leughadair ùr-nòsach",
25747      gl: "Lector avanzado",
25748      gu: "ઇમર્સિવ રીડર",
25749      ha: "Mai karatu Mai barbazawa",
25750      he: "תצוגת קריאה מודרנית",
25751      hi: "इमर्सिव रीडर",
25752      hr: "Stopljeni čitač",
25753      hu: "Modern olvasó",
25754      hy: "Խորասուզված ընթերցիչ",
25755      id: "Pembaca Imersif",
25756      ig: "Ọgụụ Kenzipụtara",
25757      is: "Aðgengilegt lestrarumhverfi",
25758      it: "Strumento di lettura immersiva",
25759      ja: "イマーシブ リーダー",
25760      ka: "იმერსიული წამკითხველი",
25761      kk: "Иммерсивті оқу құралы",
25762      km: "កម្មវិធីអានពណ៌រំលេចនៅលើអេក្រង់",
25763      kn: "ಇಮ್ಮರ್ಸಿವ್ ಓದುಗ",
25764      ko: "몰입형 리더",
25765      kok: "तंद्री लागिल्लो वाचक",
25766      "ku-arab": "خوێنەری پڕ",
25767      ky: "Курчаган Окугуч",
25768      lb: "Immersive Reader",
25769      lo: "ຕົວອ່ານອິມເມີສີບ",
25770      lt: "Įtraukianti skaitytuvė",
25771      lv: "Tīrskata lasītājs",
25772      mi: "Pūpānui Rumaki",
25773      mk: "Сеопфатен читач",
25774      ml: "ഇമ്മേഴ്‌സീവ് റീഡർ",
25775      mn: "Идэвхтэй уншигч",
25776      mr: "इमर्सिव्ह वाचक",
25777      ms: "Pembaca Imersif",
25778      mt: "Qarrej Immersiv",
25779      ne: "इमेर्सिभ रिडर",
25780      nl: "Insluitende lezer",
25781      "nn-no": "Engasjerande lesar",
25782      no: "Engasjerende leser",
25783      nso: "Go Bala ka Mongwalo o Mokoto",
25784      or: "ଇମରସିଭ୍ ରିଡର୍",
25785      pa: "ਇਮਰਸਿਵ ਰੀਡਰ",
25786      "pa-arab": "گھیرن آلا مطالعہ کار",
25787      pl: "Czytnik immersyjny",
25788      prs: "خواننده نمایش",
25789      pt: "Leitura Avançada",
25790      quc: "Nim ucholajil sik'inel uwach",
25791      quz: "Wankisqa Ñawiq",
25792      ro: "Immersive Reader",
25793      ru: "Иммерсивное средство чтения",
25794      rw: "Insakazasoma",
25795      sd: "امرسو ريڊر",
25796      si: "ගිලෙන සුළු කියවනය",
25797      sk: "Imerzná čítačka",
25798      sl: "Potopni bralnik",
25799      sq: "Lexuesi kredhës",
25800      "sr-cyrl-ba": "Концентрисани читалац",
25801      "sr-cyrl-rs": "Концентрисани читалац",
25802      "sr-latn-rs": "Koncentrisani čitalac",
25803      sv: "Avancerad läsare",
25804      sw: "Kisomaji cha Kuzamisha",
25805      ta: "அற்புதமான ரீடர்",
25806      te: "మంత్రముగ్ధులను చేసే పఠన సాధనం",
25807      "tg-cyrl-tj": "Хонандаи фарогир",
25808      th: "โปรแกรมช่วยอ่าน",
25809      ti: "ኣንባቢ ሕሉው ስምዒት ፈጣሪ",
25810      tk: "Giňişleýin okaýjy",
25811      tn: "Sebadi sa Imesife",
25812      tr: "Tam Ekran Okuyucu",
25813      tt: "Чолгап алучы уку чарасы",
25814      "ug-cn": "چۆكمە ئوقۇغۇچ",
25815      uk: "Занурення в текст",
25816      ur: "امرسیو مطالعہ کار",
25817      uz: "Immersiv mutolaa vositasi",
25818      vi: "Trình đọc Chân thực",
25819      wo: "Jàngukaay bu Rafet",
25820      xh: "Isifundi Esikhulu",
25821      yo: "Ìwò Alámùtán",
25822      zh: "沉浸式阅读器",
25823      "zh-hant": "沈浸式閱讀程式",
25824      zu: "Isifundi Sokuzizwisa"
25825    };
25826
25827    function u(e) {
25828      var t = document.createElement("img");
25829      t.src = o;
25830      var n = e.getAttribute(r) || "20";
25831      t.style.height = t.style.width = n + "px", t.style.verticalAlign = "middle", t.style.marginTop = "-2px";
25832      var a = e.getAttribute(i) || "en";
25833      t.alt = c(a), e.appendChild(t);
25834    }
25835
25836    function d(e) {
25837      var t = document.createElement("span");
25838      t.style.marginLeft = "8px", e.appendChild(t);
25839    }
25840
25841    function l(e) {
25842      var t = document.createElement("span"),
25843          n = e.getAttribute(i) || "en";
25844      t.textContent = c(n), e.appendChild(t);
25845    }
25846
25847    function c(e) {
25848      return e = e.toLowerCase(), s[e] ? s[e] : "zh-hk" === e || "zh-mo" === e || "zh-tw" === e ? s["zh-hant"] : (e = e.substring(0, e.lastIndexOf("-")), s[e] ? s[e] : (e = e.substring(0, e.lastIndexOf("-")), s[e] ? s[e] : s.en));
25849    }
25850
25851    t.renderButtons = function (e) {
25852      var t = document.createElement("style");
25853      t.innerHTML = ".immersive-reader-button{cursor:pointer;display:inline-block;padding:5px;} .immersive-reader-button:hover{background:rgba(0,0,0,.05);border-radius:2px", document.head.appendChild(t);
25854      var n = [].slice.call(document.getElementsByClassName("immersive-reader-button"));
25855      e && e.elements && (n = e.elements);
25856
25857      for (var r = 0, o = n; r < o.length; r++) {
25858        var s = o[r];
25859        s.setAttribute("type", "button"), s.setAttribute("role", "button");
25860        var m = s.getAttribute(i) || "en";
25861
25862        switch (s.setAttribute("aria-label", c(m)), s.getAttribute(a) || "icon") {
25863          case "icon":
25864            u(s);
25865            break;
25866
25867          case "text":
25868            l(s);
25869            break;
25870
25871          case "iconAndText":
25872            u(s), d(s), l(s);
25873        }
25874      }
25875    };
25876  }, function (e, t, n) {
25877    "use strict";
25878
25879    var r = this && this.__assign || function () {
25880      return (r = Object.assign || function (e) {
25881        for (var t, n = 1, r = arguments.length; n < r; n++) {
25882          for (var a in t = arguments[n]) {
25883            Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
25884          }
25885        }
25886
25887        return e;
25888      }).apply(this, arguments);
25889    };
25890
25891    Object.defineProperty(t, "__esModule", {
25892      value: !0
25893    });
25894    var a = n(3);
25895
25896    t.launchAsync = function (e, t, n, i) {
25897      return new Promise(function (o, s) {
25898        if (e) {
25899          if (n) {
25900            if (n.chunks) {
25901              if (n.chunks.length) {
25902                var u = Date.now();
25903                (i = r({
25904                  uiZIndex: 1e3,
25905                  timeout: 15e3,
25906                  useWebview: !1
25907                }, i)).uiZIndex && "number" == typeof i.uiZIndex || (i.uiZIndex = 1e3);
25908                var d = null,
25909                    l = document.createElement("div"),
25910                    c = i.useWebview ? document.createElement("webview") : document.createElement("iframe"),
25911                    m = document.createElement("style");
25912                m.innerHTML = "body{height:100%;overflow:hidden;}";
25913
25914                var f = function f() {
25915                  d && (window.clearTimeout(d), d = null);
25916                },
25917                    p = function p() {
25918                  document.body.contains(l) && document.body.removeChild(l), f(), m.parentNode && m.parentNode.removeChild(m);
25919                };
25920
25921                p();
25922
25923                var v = function v(r) {
25924                  if (r && r.data) if ("ImmersiveReader-Exit" === r.data) p(), window.removeEventListener("message", v);else if ("ImmersiveReader-ReadyForContent" === r.data) {
25925                    var i = {
25926                      cogSvcsAccessToken: e,
25927                      cogSvcsSubdomain: t,
25928                      request: n,
25929                      launchToPostMessageSentDurationInMs: Date.now() - u
25930                    };
25931                    c.contentWindow.postMessage(JSON.stringify({
25932                      messageType: "Content",
25933                      messageValue: i
25934                    }), "*");
25935                  } else "ImmersiveReader-LaunchSuccessful" === r.data ? (f(), o(l)) : "ImmersiveReader-TokenExpired" === r.data ? (f(), s({
25936                    code: a.ErrorCode.TokenExpired,
25937                    message: "The access token supplied is expired."
25938                  })) : "ImmersiveReader-Throttled" === r.data && (f(), s({
25939                    code: a.ErrorCode.Throttled,
25940                    message: "You have exceeded your quota."
25941                  }));
25942                };
25943
25944                window.addEventListener("message", v), d = window.setTimeout(function () {
25945                  s({
25946                    code: a.ErrorCode.Timeout,
25947                    message: "Page failed to load after timeout (" + i.timeout + " ms)"
25948                  });
25949                }, i.timeout), c.setAttribute("allowfullscreen", ""), c.style.cssText = "position: static; width: 100vw; height: 100vh; left: 0; top: 0; border-width: 0", i.useWebview && c.addEventListener("loadstop", function () {
25950                  c.contentWindow.postMessage(JSON.stringify({
25951                    messageType: "WebviewHost"
25952                  }), "*");
25953                });
25954                var h = "https://learningtools.onenote.com/learningtoolsapp/cognitive/reader?exitCallback=ImmersiveReader-Exit";
25955                i.uiLang && (h += "&omkt=" + i.uiLang), c.src = h, l.style.cssText = "position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; border-width: 0; -webkit-perspective: 1px; z-index: " + i.uiZIndex + "; background: white; overflow: hidden", l.appendChild(c), document.body.appendChild(l), document.head.appendChild(m);
25956              } else s({
25957                code: a.ErrorCode.BadArgument,
25958                message: "Chunks must not be empty"
25959              });
25960            } else s({
25961              code: a.ErrorCode.BadArgument,
25962              message: "Chunks must not be null"
25963            });
25964          } else s({
25965            code: a.ErrorCode.BadArgument,
25966            message: "Content must not be null"
25967          });
25968        } else s({
25969          code: a.ErrorCode.BadArgument,
25970          message: "Token must not be null"
25971        });
25972      });
25973    };
25974  }, function (e, t, n) {
25975    "use strict";
25976
25977    Object.defineProperty(t, "__esModule", {
25978      value: !0
25979    }), function (e) {
25980      e.BadArgument = "BadArgument", e.Timeout = "Timeout", e.TokenExpired = "TokenExpired", e.Throttled = "Throttled";
25981    }(t.ErrorCode || (t.ErrorCode = {}));
25982  }]);
25983});
25984/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(186)(module)))
25985
25986/***/ }),
25987/* 186 */
25988/***/ (function(module, exports) {
25989
25990module.exports = function(module) {
25991	if (!module.webpackPolyfill) {
25992		module.deprecate = function() {};
25993		module.paths = [];
25994		// module.parent = undefined by default
25995		if (!module.children) module.children = [];
25996		Object.defineProperty(module, "loaded", {
25997			enumerable: true,
25998			get: function() {
25999				return module.l;
26000			}
26001		});
26002		Object.defineProperty(module, "id", {
26003			enumerable: true,
26004			get: function() {
26005				return module.i;
26006			}
26007		});
26008		module.webpackPolyfill = 1;
26009	}
26010	return module;
26011};
26012
26013
26014/***/ }),
26015/* 187 */
26016/***/ (function(module, exports, __webpack_require__) {
26017
26018"use strict";
26019
26020var __extends = (this && this.__extends) || (function () {
26021    var extendStatics = function (d, b) {
26022        extendStatics = Object.setPrototypeOf ||
26023            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26024            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26025        return extendStatics(d, b);
26026    }
26027    return function (d, b) {
26028        extendStatics(d, b);
26029        function __() { this.constructor = d; }
26030        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26031    };
26032})();
26033Object.defineProperty(exports, "__esModule", { value: true });
26034var notification_service_1 = __webpack_require__(60);
26035var rxjs_1 = __webpack_require__(19);
26036var activity_feed_notification_item_1 = __webpack_require__(67);
26037var pds_utils_1 = __webpack_require__(18);
26038var pds_http_utils_1 = __webpack_require__(44);
26039var operators_1 = __webpack_require__(17);
26040var operators_2 = __webpack_require__(17);
26041var operators_3 = __webpack_require__(17);
26042var operators_4 = __webpack_require__(17);
26043var ActivityFeedNotificationService = (function (_super) {
26044    __extends(ActivityFeedNotificationService, _super);
26045    function ActivityFeedNotificationService(setup, client) {
26046        var _this = _super.call(this, setup) || this;
26047        _this.client = client;
26048        _this.type = activity_feed_notification_item_1.ActivityFeedNotificationItem.NOTIFICATION_TYPE;
26049        _this.clientFeeds = [];
26050        _this.clientFeedNameMap = {};
26051        _this.sectionToStudentsMap = new Map();
26052        _this.seenActivitiesMap = {};
26053        _this.config = setup;
26054        _this.context = setup.context;
26055        if (_this.context == null) {
26056            throw 'Activity Feed Notification Service requires context';
26057        }
26058        if (_this.context.sectionMap == null) {
26059            _this.context.sectionMap = Object.assign.apply(Object, [{}].concat(_this.context.sections.map(function (section) {
26060                var _a;
26061                return _a = {}, _a[section.uid] = section, _a;
26062            })));
26063        }
26064        if (_this.context.students != null && _this.context.studentMap == null) {
26065            _this.context.studentMap = Object.assign.apply(Object, [{}].concat(_this.context.students.map(function (student) {
26066                var _a;
26067                return _a = {}, _a[student.uid] = student, _a;
26068            })));
26069            if (_this.context.studentClassScheduleMap != null) {
26070                for (var _i = 0, _a = _this.context.students; _i < _a.length; _i++) {
26071                    var student = _a[_i];
26072                    var classSchedule = _this.context.studentClassScheduleMap.get(student.uid);
26073                    if (classSchedule != null) {
26074                        for (var _b = 0, _c = classSchedule.sections; _b < _c.length; _b++) {
26075                            var section = _c[_b];
26076                            if (_this.sectionToStudentsMap.has(section.uid)) {
26077                                _this.sectionToStudentsMap.get(section.uid).push(student);
26078                            }
26079                            else {
26080                                _this.sectionToStudentsMap.set(section.uid, [student]);
26081                            }
26082                        }
26083                    }
26084                }
26085            }
26086        }
26087        else if (_this.context.studentMap == null) {
26088            _this.context.studentMap = {};
26089        }
26090        _this.clientFeedsInitialized = rxjs_1.forkJoin(_this.config.getStream.feedGroups.map(function (groupName) {
26091            var payload = {
26092                feedUid: _this.config.getStream.feedIdentifier,
26093                feedGroup: groupName
26094            };
26095            var path = (_this.config.path == null) ? '/communication/v1/token' : _this.config.path;
26096            var url = _this.config.domain != null ? _this.config.domain + path : path;
26097            return pds_http_utils_1.pdsHttpUtils.post(url, payload, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_2.map(function (response) {
26098                var data = JSON.parse(response.data);
26099                var feedName = _this.context.userType + "-" + _this.config.getStream.feedIdentifier;
26100                var gsFeed = _this.client.feed(groupName, feedName, data.token);
26101                _this.clientFeedNameMap[feedName] = gsFeed;
26102                _this.clientFeeds.push(gsFeed);
26103            }));
26104        })).pipe(operators_3.publishLast(), operators_4.refCount());
26105        return _this;
26106    }
26107    ActivityFeedNotificationService.prototype.initializeNotificationStream = function () {
26108        var _this = this;
26109        var filterCallback = function (update) {
26110            if (update.newActivity == null || update.newActivity.id == null || update.newActivity.origin == null) {
26111                return false;
26112            }
26113            var activityIdentifier = update.newActivity.origin + update.newActivity.id;
26114            var isValid = update.newActivity.sender_uid !== _this.context.currentUserUid &&
26115                _this.seenActivitiesMap[activityIdentifier] !== true;
26116            if (!isValid) {
26117                return false;
26118            }
26119            _this.seenActivitiesMap[activityIdentifier] = true;
26120            return true;
26121        };
26122        return this.clientFeedsInitialized.pipe(operators_2.map(function () {
26123            var observables = _this.clientFeeds.map(function (feed) {
26124                return _this.realTimeUpdates(feed).pipe(operators_2.map(function (update) {
26125                    update.feedName = feed.id;
26126                    return update;
26127                }));
26128            });
26129            _this.mergedClientFeeds = rxjs_1.merge.apply(void 0, observables).pipe(operators_1.filter(filterCallback), operators_2.map(function (update) {
26130                var notificationContext = _this.getNotificationContext(update.newActivity, update.feedName);
26131                return new activity_feed_notification_item_1.ActivityFeedNotificationItem(false, false, notificationContext);
26132            }));
26133            _this.notificationStream = _this.mergedClientFeeds;
26134            return true;
26135        }));
26136    };
26137    ActivityFeedNotificationService.prototype.getRecentNotifications = function (limit) {
26138        var _this = this;
26139        return this.clientFeedsInitialized.pipe(operators_2.mergeMap(function () {
26140            var obs = [];
26141            var _loop_1 = function (feed) {
26142                var promise = feed.get({ limit: limit });
26143                obs.push(rxjs_1.from(promise).pipe(operators_2.map(function (result) {
26144                    result.feedName = feed.id;
26145                    return result;
26146                })));
26147            };
26148            for (var _i = 0, _a = _this.clientFeeds; _i < _a.length; _i++) {
26149                var feed = _a[_i];
26150                _loop_1(feed);
26151            }
26152            return rxjs_1.forkJoin(obs).pipe(operators_2.map(function (streamResults) {
26153                var ret = [];
26154                for (var _i = 0, streamResults_1 = streamResults; _i < streamResults_1.length; _i++) {
26155                    var feedData = streamResults_1[_i];
26156                    ret.push.apply(ret, _this.processRecentFeedData(feedData));
26157                }
26158                return ret;
26159            }));
26160        }));
26161    };
26162    ActivityFeedNotificationService.prototype.realTimeUpdates = function (clientFeed) {
26163        return rxjs_1.Observable.create(function (observer) {
26164            var subscription = clientFeed.subscribe(function (data) {
26165                if (data.new && data.new.length > 0) {
26166                    for (var _i = 0, _a = data.new; _i < _a.length; _i++) {
26167                        var newActivity = _a[_i];
26168                        observer.next({
26169                            newActivity: newActivity
26170                        });
26171                    }
26172                }
26173            });
26174        });
26175    };
26176    ActivityFeedNotificationService.prototype.markAsRead = function (items) {
26177        return this.updateFeedActivities(items, 'read');
26178    };
26179    ActivityFeedNotificationService.prototype.markAsSeen = function (items) {
26180        return this.updateFeedActivities(items, 'seen');
26181    };
26182    ActivityFeedNotificationService.prototype.updateFeedActivities = function (items, action) {
26183        var groups = pds_utils_1.pdsUtils.groupBy(items, function (item) { return item.feedName; });
26184        var observables = [rxjs_1.of(undefined)];
26185        for (var _i = 0, _a = Object.keys(groups); _i < _a.length; _i++) {
26186            var feedName = _a[_i];
26187            var gsFeed = this.clientFeedNameMap[feedName];
26188            if (gsFeed == null) {
26189                throw 'bad feed name';
26190            }
26191            var ids = groups[feedName].map(function (item) { return item.id; });
26192            while (ids.length > 0) {
26193                var idBatch = ids.splice(0, 45);
26194                if (action === 'seen') {
26195                    observables.push(rxjs_1.from(gsFeed.get({ limit: 5, mark_seen: idBatch })));
26196                }
26197                else {
26198                    observables.push(rxjs_1.from(gsFeed.get({ limit: 5, mark_read: idBatch })));
26199                }
26200            }
26201        }
26202        return rxjs_1.forkJoin(observables).pipe(operators_2.map(function () {
26203            return;
26204        }));
26205    };
26206    ActivityFeedNotificationService.prototype.feedOriginToSection = function (origin) {
26207        var sectionUid = this.extractOriginUid(origin);
26208        return this.context.sectionMap[sectionUid];
26209    };
26210    ActivityFeedNotificationService.prototype.extractOriginUid = function (origin) {
26211        return (origin == null) ? '' : origin.slice(22);
26212    };
26213    ActivityFeedNotificationService.prototype.sectionUidToStudents = function (sectionUid) {
26214        switch (this.context.userType) {
26215            case 'STUDENT':
26216                return [];
26217            case 'PARENT':
26218                return this.sectionToStudentsMap.get(sectionUid) || [];
26219            case 'TEACHER':
26220                return [];
26221            default:
26222                throw 'Unsupported User type';
26223        }
26224    };
26225    ActivityFeedNotificationService.prototype.getNotificationContext = function (activity, feedName) {
26226        var section = this.feedOriginToSection(activity.origin);
26227        var students = this.sectionUidToStudents(section.uid);
26228        return {
26229            section: section,
26230            students: students,
26231            feedName: feedName.split(':')[1],
26232            activityId: (activity.id == null) ? '' : activity.id,
26233            activitySenderName: activity.sender_name,
26234            postedAt: new Date(activity.time + 'Z'),
26235            senderUid: activity.sender_uid,
26236            userType: this.context.userType
26237        };
26238    };
26239    ActivityFeedNotificationService.prototype.processRecentFeedData = function (feedData) {
26240        var ret = [];
26241        for (var _i = 0, _a = feedData.results; _i < _a.length; _i++) {
26242            var notificationRI = _a[_i];
26243            if (!notificationRI.is_read) {
26244                for (var _b = 0, _c = notificationRI.activities; _b < _c.length; _b++) {
26245                    var activity = _c[_b];
26246                    if (activity.to != null && activity.sender_uid !== this.context.currentUserUid) {
26247                        for (var _d = 0, _e = activity.to; _d < _e.length; _d++) {
26248                            var origin = _e[_d];
26249                            if (this.context.sectionMap[this.extractOriginUid(origin)] != null) {
26250                                activity.origin = origin;
26251                                var notificationContext = this.getNotificationContext(activity, feedData.feedName);
26252                                ret.push(new activity_feed_notification_item_1.ActivityFeedNotificationItem(notificationRI.is_seen, notificationRI.is_read, notificationContext));
26253                            }
26254                        }
26255                    }
26256                }
26257            }
26258        }
26259        return ret;
26260    };
26261    return ActivityFeedNotificationService;
26262}(notification_service_1.NotificationService));
26263exports.ActivityFeedNotificationService = ActivityFeedNotificationService;
26264
26265
26266
26267/***/ }),
26268/* 188 */
26269/***/ (function(module, exports, __webpack_require__) {
26270
26271"use strict";
26272
26273Object.defineProperty(exports, "__esModule", { value: true });
26274var rxjs_1 = __webpack_require__(19);
26275var pds_utils_1 = __webpack_require__(18);
26276var operators_1 = __webpack_require__(17);
26277var AggregatedNotificationService = (function () {
26278    function AggregatedNotificationService(notificationServices) {
26279        this.notificationServiceTypeMap = {};
26280        this.notificationServices = notificationServices;
26281        for (var _i = 0, _a = this.notificationServices; _i < _a.length; _i++) {
26282            var service = _a[_i];
26283            this.notificationServiceTypeMap[service.type] = service;
26284        }
26285    }
26286    AggregatedNotificationService.prototype.getExistingNotifications = function () {
26287        var serviceObservables = [];
26288        for (var _i = 0, _a = this.notificationServices; _i < _a.length; _i++) {
26289            var notificationService = _a[_i];
26290            serviceObservables.push(notificationService.getRecentNotifications(200));
26291        }
26292        return rxjs_1.forkJoin.apply(void 0, serviceObservables).pipe(operators_1.map(function (items) {
26293            var _a;
26294            return (_a = Array.prototype).concat.apply(_a, items);
26295        }));
26296    };
26297    AggregatedNotificationService.prototype.initializeNotificationStream = function () {
26298        var _this = this;
26299        var streamObservables = [];
26300        for (var _i = 0, _a = this.notificationServices; _i < _a.length; _i++) {
26301            var notificationService = _a[_i];
26302            streamObservables.push(notificationService.initializeNotificationStream());
26303        }
26304        return rxjs_1.forkJoin.apply(void 0, streamObservables).pipe(operators_1.map(function () {
26305            var notificationStreams = [];
26306            for (var _i = 0, _a = _this.notificationServices; _i < _a.length; _i++) {
26307                var notificationService = _a[_i];
26308                var obs = notificationService.notificationStream;
26309                notificationStreams.push(obs);
26310            }
26311            _this.notificationStream = rxjs_1.merge.apply(void 0, notificationStreams);
26312        }));
26313    };
26314    AggregatedNotificationService.prototype.markAsSeen = function (items) {
26315        var groups = pds_utils_1.pdsUtils.groupBy(items, function (item) { return item.type; });
26316        var observables = [rxjs_1.of(undefined)];
26317        for (var _i = 0, _a = Object.keys(groups); _i < _a.length; _i++) {
26318            var groupName = _a[_i];
26319            var service = this.notificationServiceTypeMap[groupName];
26320            if (service == null) {
26321                throw 'unmapped service (seen)';
26322            }
26323            observables.push(service.markAsSeen(groups[groupName]));
26324        }
26325        return rxjs_1.forkJoin(observables).pipe(operators_1.map(function () {
26326            return;
26327        }));
26328    };
26329    AggregatedNotificationService.prototype.markAsRead = function (items) {
26330        var groups = pds_utils_1.pdsUtils.groupBy(items, function (item) { return item.subtype || item.type; });
26331        var observables = [rxjs_1.of(undefined)];
26332        for (var _i = 0, _a = Object.keys(groups); _i < _a.length; _i++) {
26333            var groupName = _a[_i];
26334            var service = this.notificationServiceTypeMap[groupName];
26335            if (service == null) {
26336                throw 'unmapped service (read)';
26337            }
26338            observables.push(service.markAsRead(groups[groupName]));
26339        }
26340        return rxjs_1.forkJoin(observables).pipe(operators_1.map(function () {
26341            return;
26342        }));
26343    };
26344    return AggregatedNotificationService;
26345}());
26346exports.AggregatedNotificationService = AggregatedNotificationService;
26347
26348
26349
26350/***/ }),
26351/* 189 */
26352/***/ (function(module, exports, __webpack_require__) {
26353
26354"use strict";
26355
26356var __extends = (this && this.__extends) || (function () {
26357    var extendStatics = function (d, b) {
26358        extendStatics = Object.setPrototypeOf ||
26359            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26360            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26361        return extendStatics(d, b);
26362    }
26363    return function (d, b) {
26364        extendStatics(d, b);
26365        function __() { this.constructor = d; }
26366        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26367    };
26368})();
26369Object.defineProperty(exports, "__esModule", { value: true });
26370var operators_1 = __webpack_require__(17);
26371var rxjs_1 = __webpack_require__(19);
26372var asgmt_submission_notification_item_1 = __webpack_require__(89);
26373var pds_http_utils_1 = __webpack_require__(44);
26374var get_stream_feed_service_1 = __webpack_require__(69);
26375var notification_service_1 = __webpack_require__(60);
26376var AsgmtSubmissionNotificationService = (function (_super) {
26377    __extends(AsgmtSubmissionNotificationService, _super);
26378    function AsgmtSubmissionNotificationService(setup, getStreamClient) {
26379        var _this = _super.call(this, setup) || this;
26380        _this.notificationStream = new rxjs_1.Subject();
26381        _this.type = asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem.NOTIFICATION_SUBTYPE;
26382        _this.userNameMap = {};
26383        _this.config = setup;
26384        _this.context = setup.context;
26385        var payload = {
26386            feedUid: _this.context.currentUserUid,
26387            feedGroup: _this.config.feedGroup
26388        };
26389        var path = (_this.config.communicationPath == null) ? '/communication/v1/token' : _this.config.communicationPath;
26390        var url = _this.config.domain != null ? _this.config.domain + path : path;
26391        _this.feedInitialized = pds_http_utils_1.pdsHttpUtils.post(url, payload, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_1.map(function (response) {
26392            var data = JSON.parse(response.data);
26393            _this.getStreamFeed = new get_stream_feed_service_1.GetStreamFeedService(getStreamClient, _this.config.feedGroup, "" + _this.config.feedPrefix + _this.context.currentUserUid, data.token, true);
26394        }), operators_1.publishLast(), operators_1.refCount());
26395        return _this;
26396    }
26397    AsgmtSubmissionNotificationService.prototype.markAsRead = function (items) {
26398        return this.getStreamFeed.markNotificationsRead(items.map(function (item) {
26399            return item.getstreamGroupId;
26400        }));
26401    };
26402    AsgmtSubmissionNotificationService.prototype.markAsSeen = function (items) {
26403        return rxjs_1.of({});
26404    };
26405    AsgmtSubmissionNotificationService.prototype.initializeNotificationStream = function () {
26406        var _this = this;
26407        var filterCallback = function (update) {
26408            return update.newActivity != null;
26409        };
26410        return this.feedInitialized.pipe(operators_1.map(function () {
26411            _this.notificationStream = _this.getStreamFeed.realTimeUpdates().pipe(operators_1.filter(filterCallback), operators_1.map(function (update) {
26412                var section = _this.context.sectionMap[update.newActivity.sectionUid];
26413                var context = {
26414                    activity: update.newActivity,
26415                    userType: _this.context.userType,
26416                    currentUserUid: _this.context.currentUserUid,
26417                    getStreamGroupId: update.newActivity.group,
26418                    sectionName: _this.getDisplaySectionNane(section)
26419                };
26420                return new asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem(false, false, context);
26421            }));
26422            return true;
26423        }));
26424    };
26425    AsgmtSubmissionNotificationService.prototype.getRecentNotifications = function (limit) {
26426        var _this = this;
26427        var filterCallBack = function (notification) {
26428            return (notification.activities != null && notification.activities.length > 0) ? !notification.is_read && Object.keys(_this.context.sectionMap).indexOf(notification.activities[0].sectionUid) >= 0 : false;
26429        };
26430        return this.feedInitialized.pipe(operators_1.mergeMap(function () {
26431            return _this.getStreamFeed.getNotifications(limit);
26432        }), operators_1.map(function (notifications) {
26433            return notifications.filter(filterCallBack).map(function (notificationRI) {
26434                var activity = notificationRI.activities[0];
26435                var section = _this.context.sectionMap[activity.sectionUid];
26436                var context = {
26437                    activity: activity,
26438                    userType: _this.context.userType,
26439                    currentUserUid: _this.context.currentUserUid,
26440                    getStreamGroupId: notificationRI.group,
26441                    sectionName: _this.getDisplaySectionNane(section)
26442                };
26443                return new asgmt_submission_notification_item_1.AsgmtSubmissionNotificationItem(notificationRI.is_seen, notificationRI.is_read, context);
26444            });
26445        }));
26446    };
26447    AsgmtSubmissionNotificationService.prototype.getDisplaySectionNane = function (section) {
26448        if (section == null) {
26449            return '';
26450        }
26451        if (section.secondaryDisplay == null) {
26452            return section.primaryDisplay == null ? '' : section.primaryDisplay;
26453        }
26454        return section.secondaryDisplay + ' ' + section.primaryDisplay;
26455    };
26456    return AsgmtSubmissionNotificationService;
26457}(notification_service_1.NotificationService));
26458exports.AsgmtSubmissionNotificationService = AsgmtSubmissionNotificationService;
26459
26460
26461
26462/***/ }),
26463/* 190 */
26464/***/ (function(module, exports, __webpack_require__) {
26465
26466"use strict";
26467
26468var __extends = (this && this.__extends) || (function () {
26469    var extendStatics = function (d, b) {
26470        extendStatics = Object.setPrototypeOf ||
26471            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26472            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26473        return extendStatics(d, b);
26474    }
26475    return function (d, b) {
26476        extendStatics(d, b);
26477        function __() { this.constructor = d; }
26478        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26479    };
26480})();
26481Object.defineProperty(exports, "__esModule", { value: true });
26482var operators_1 = __webpack_require__(17);
26483var rxjs_1 = __webpack_require__(19);
26484var asgmt_return_notification_item_1 = __webpack_require__(103);
26485var pds_http_utils_1 = __webpack_require__(44);
26486var get_stream_feed_service_1 = __webpack_require__(69);
26487var notification_service_1 = __webpack_require__(60);
26488var AsgmtReturnNotificationService = (function (_super) {
26489    __extends(AsgmtReturnNotificationService, _super);
26490    function AsgmtReturnNotificationService(setup, getStreamClient) {
26491        var _this = _super.call(this, setup) || this;
26492        _this.notificationStream = new rxjs_1.Subject();
26493        _this.type = asgmt_return_notification_item_1.AsgmtReturnNotificationItem.NOTIFICATION_SUBTYPE;
26494        _this.userNameMap = {};
26495        _this.config = setup;
26496        _this.context = setup.context;
26497        var payload = {
26498            feedUid: _this.context.currentUserUid,
26499            feedGroup: _this.config.feedGroup
26500        };
26501        var path = (_this.config.communicationPath == null) ? '/communication/v1/token' : _this.config.communicationPath;
26502        var url = _this.config.domain != null ? _this.config.domain + path : path;
26503        _this.feedInitialized = pds_http_utils_1.pdsHttpUtils.post(url, payload, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_1.map(function (response) {
26504            var data = JSON.parse(response.data);
26505            _this.getStreamFeed = new get_stream_feed_service_1.GetStreamFeedService(getStreamClient, _this.config.feedGroup, "" + _this.config.feedPrefix + _this.context.currentUserUid, data.token, true);
26506        }), operators_1.publishLast(), operators_1.refCount());
26507        return _this;
26508    }
26509    AsgmtReturnNotificationService.prototype.markAsRead = function (items) {
26510        return this.getStreamFeed.markNotificationsRead(items.map(function (item) {
26511            return item.getstreamGroupId;
26512        }));
26513    };
26514    AsgmtReturnNotificationService.prototype.markAsSeen = function (items) {
26515        return rxjs_1.of({});
26516    };
26517    AsgmtReturnNotificationService.prototype.initializeNotificationStream = function () {
26518        var _this = this;
26519        var filterCallback = function (update) {
26520            return update.newActivity != null;
26521        };
26522        return this.feedInitialized.pipe(operators_1.map(function () {
26523            var context;
26524            _this.notificationStream = _this.getStreamFeed.realTimeUpdates().pipe(operators_1.filter(filterCallback), operators_1.map(function (update) {
26525                if (update.newActivity != null && update.newActivity.group != null) {
26526                    var section = _this.context.sectionMap[update.newActivity.sectionUid];
26527                    context = {
26528                        activity: update.newActivity,
26529                        userType: _this.context.userType,
26530                        currentUserUid: _this.context.currentUserUid,
26531                        getStreamGroupId: update.newActivity.group,
26532                        sectionName: _this.getDisplaySectionName(section)
26533                    };
26534                }
26535                return new asgmt_return_notification_item_1.AsgmtReturnNotificationItem(false, false, context);
26536            }));
26537            return true;
26538        }));
26539    };
26540    AsgmtReturnNotificationService.prototype.getRecentNotifications = function (limit) {
26541        var _this = this;
26542        var filterCallBack = function (notification) {
26543            return (notification.activities != null && notification.activities.length > 0) ? !notification.is_read && Object.keys(_this.context.sectionMap).indexOf(notification.activities[0].sectionUid) >= 0 : false;
26544        };
26545        return this.feedInitialized.pipe(operators_1.mergeMap(function () {
26546            return _this.getStreamFeed.getNotifications(limit);
26547        }), operators_1.map(function (notifications) {
26548            var context;
26549            return notifications.filter(filterCallBack).map(function (notificationRI) {
26550                var activity = notificationRI.activities[0];
26551                var section = _this.context.sectionMap[activity.sectionUid];
26552                if (notificationRI.group != null) {
26553                    context = {
26554                        activity: activity,
26555                        userType: _this.context.userType,
26556                        currentUserUid: _this.context.currentUserUid,
26557                        getStreamGroupId: notificationRI.group,
26558                        sectionName: _this.getDisplaySectionName(section)
26559                    };
26560                }
26561                return new asgmt_return_notification_item_1.AsgmtReturnNotificationItem(notificationRI.is_seen, notificationRI.is_read, context);
26562            });
26563        }));
26564    };
26565    AsgmtReturnNotificationService.prototype.getDisplaySectionName = function (section) {
26566        if (section == null) {
26567            return '';
26568        }
26569        if (section.secondaryDisplay == null) {
26570            return section.primaryDisplay == null ? '' : section.primaryDisplay;
26571        }
26572        return section.secondaryDisplay + ' ' + section.primaryDisplay;
26573    };
26574    return AsgmtReturnNotificationService;
26575}(notification_service_1.NotificationService));
26576exports.AsgmtReturnNotificationService = AsgmtReturnNotificationService;
26577
26578
26579
26580/***/ }),
26581/* 191 */
26582/***/ (function(module, exports, __webpack_require__) {
26583
26584"use strict";
26585
26586var __extends = (this && this.__extends) || (function () {
26587    var extendStatics = function (d, b) {
26588        extendStatics = Object.setPrototypeOf ||
26589            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26590            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26591        return extendStatics(d, b);
26592    }
26593    return function (d, b) {
26594        extendStatics(d, b);
26595        function __() { this.constructor = d; }
26596        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26597    };
26598})();
26599Object.defineProperty(exports, "__esModule", { value: true });
26600var rxjs_1 = __webpack_require__(19);
26601var operators_1 = __webpack_require__(17);
26602var assignment_template_notification_item_1 = __webpack_require__(90);
26603var notification_service_1 = __webpack_require__(60);
26604var AssignmentTemplateNotificationService = (function (_super) {
26605    __extends(AssignmentTemplateNotificationService, _super);
26606    function AssignmentTemplateNotificationService(setup) {
26607        var _this = _super.call(this, setup) || this;
26608        _this.notificationStream = new rxjs_1.Subject();
26609        _this.type = assignment_template_notification_item_1.AssignmentTemplateNotificationItem.NOTIFICATION_SUBTYPE;
26610        _this.config = setup;
26611        return _this;
26612    }
26613    AssignmentTemplateNotificationService.prototype.markAsRead = function (items) {
26614        return rxjs_1.of({});
26615    };
26616    AssignmentTemplateNotificationService.prototype.markAsSeen = function (items) {
26617        return rxjs_1.of({});
26618    };
26619    AssignmentTemplateNotificationService.prototype.initializeNotificationStream = function () {
26620        return rxjs_1.of({});
26621    };
26622    AssignmentTemplateNotificationService.prototype.getRecentNotifications = function (limit) {
26623        return this.config.getNotifications.pipe(operators_1.map(function (notificationRIs) {
26624            return notificationRIs.map(function (ri) {
26625                return new assignment_template_notification_item_1.AssignmentTemplateNotificationItem({
26626                    postedAt: ri.postedAt,
26627                    assignmentTemplateUid: ri.assignmentTemplateUid,
26628                    assignmentName: ri.assignmentName,
26629                    sectionUid: ri.sectionUid,
26630                    sectionName: ri.sectionName,
26631                    hasBeenAssigned: ri.hasBeenAssigned
26632                });
26633            });
26634        }));
26635    };
26636    return AssignmentTemplateNotificationService;
26637}(notification_service_1.NotificationService));
26638exports.AssignmentTemplateNotificationService = AssignmentTemplateNotificationService;
26639
26640
26641
26642/***/ }),
26643/* 192 */
26644/***/ (function(module, exports, __webpack_require__) {
26645
26646"use strict";
26647
26648var __extends = (this && this.__extends) || (function () {
26649    var extendStatics = function (d, b) {
26650        extendStatics = Object.setPrototypeOf ||
26651            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26652            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
26653        return extendStatics(d, b);
26654    }
26655    return function (d, b) {
26656        extendStatics(d, b);
26657        function __() { this.constructor = d; }
26658        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26659    };
26660})();
26661Object.defineProperty(exports, "__esModule", { value: true });
26662var rxjs_1 = __webpack_require__(19);
26663var rxjs_2 = __webpack_require__(19);
26664var communication_notification_item_1 = __webpack_require__(91);
26665var notification_service_1 = __webpack_require__(60);
26666var pds_http_utils_1 = __webpack_require__(44);
26667var get_stream_feed_service_1 = __webpack_require__(69);
26668var operators_1 = __webpack_require__(17);
26669var operators_2 = __webpack_require__(17);
26670var operators_3 = __webpack_require__(17);
26671var operators_4 = __webpack_require__(17);
26672var operators_5 = __webpack_require__(17);
26673var operators_6 = __webpack_require__(17);
26674var CommunicationNotificationService = (function (_super) {
26675    __extends(CommunicationNotificationService, _super);
26676    function CommunicationNotificationService(setup, getStreamClient) {
26677        var _this = _super.call(this, setup) || this;
26678        _this.notificationStream = new rxjs_1.Subject();
26679        _this.type = communication_notification_item_1.CommunicationNotificationItem.NOTIFICATION_TYPE;
26680        _this.userNameMap = {};
26681        _this.config = setup;
26682        _this.context = setup.context;
26683        var payload = {
26684            feedUid: _this.context.currentUserUid,
26685            feedGroup: _this.config.feedGroup
26686        };
26687        if (setup.getStreamFeed != null) {
26688            _this.getStreamFeed = setup.getStreamFeed;
26689            _this.feedInitialized = rxjs_2.of(null).pipe(operators_4.publishLast(), operators_6.refCount());
26690        }
26691        else {
26692            var path = (_this.config.communicationPath == null) ? '/communication/v1/token' : _this.config.communicationPath;
26693            var url = _this.config.domain != null ? _this.config.domain + path : path;
26694            _this.feedInitialized = pds_http_utils_1.pdsHttpUtils.post(url, payload, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_2.map(function (response) {
26695                var data = JSON.parse(response.data);
26696                _this.getStreamFeed = new get_stream_feed_service_1.GetStreamFeedService(getStreamClient, _this.config.feedGroup, "" + _this.config.feedPrefix + _this.context.currentUserUid, data.token, true);
26697            }), operators_4.publishLast(), operators_6.refCount());
26698        }
26699        return _this;
26700    }
26701    CommunicationNotificationService.prototype.markAsRead = function (items) {
26702        return this.getStreamFeed.markNotificationsRead(items.map(function (item) {
26703            return item.getstreamGroupId;
26704        }));
26705    };
26706    CommunicationNotificationService.prototype.markAsSeen = function (items) {
26707        return rxjs_2.of({});
26708    };
26709    CommunicationNotificationService.prototype.initializeNotificationStream = function () {
26710        var _this = this;
26711        return this.feedInitialized
26712            .pipe(operators_2.map(function () {
26713            _this.notificationStream = _this.getStreamFeed.realTimeUpdates()
26714                .pipe(operators_2.map(function (update) {
26715                if (update.newActivity != null && update.newActivity.operation.indexOf('CREATE') !== -1
26716                    && update.newActivity.message.senderUid !== _this.context.currentUserUid) {
26717                    return [update.newActivity];
26718                }
26719                return undefined;
26720            }))
26721                .pipe(operators_5.filter(function (activities) { return !!activities; }))
26722                .pipe(operators_1.mergeMap(function (activities) {
26723                return _this.updateUserMapForNotifications(activities).pipe(operators_3.mapTo(activities));
26724            }))
26725                .pipe(operators_2.map(function (activities) {
26726                var activity = activities[0];
26727                if (activity != null && activity.group != null) {
26728                    var senderInfo = (_this.context.userType === 'TEACHER') ? _this.userNameMap[activity.topicUid] : _this.userNameMap[activity.threadOwnerUid];
26729                    var context = {
26730                        activity: activity,
26731                        senderInfo: senderInfo,
26732                        userType: _this.context.userType,
26733                        currentUserUid: _this.context.currentUserUid,
26734                        getStreamGroupId: activity.group
26735                    };
26736                    return new communication_notification_item_1.CommunicationNotificationItem(false, false, context);
26737                }
26738                return undefined;
26739            }))
26740                .pipe(operators_5.filter(function (item) { return !!item; }));
26741            return true;
26742        }));
26743    };
26744    CommunicationNotificationService.prototype.getRecentNotifications = function (limit) {
26745        var _this = this;
26746        var filterCallBack = function (notification) {
26747            var activity = notification.activities[0];
26748            return activity.operation.indexOf('CREATE') !== -1
26749                && activity.message.senderUid !== _this.context.currentUserUid
26750                && !notification.is_read
26751                && notification.group != null;
26752        };
26753        return this.feedInitialized
26754            .pipe(operators_1.mergeMap(function () { return _this.getStreamFeed.getNotifications(limit); }))
26755            .pipe(operators_1.mergeMap(function (notifications) {
26756            var activities = notifications.map(function (notification) {
26757                return notification.activities[0];
26758            });
26759            return _this.updateUserMapForNotifications(activities).pipe(operators_3.mapTo(notifications));
26760        }))
26761            .pipe(operators_2.map(function (notifications) {
26762            return notifications.filter(filterCallBack).map(function (notificationRI) {
26763                var activity = notificationRI.activities[0];
26764                var senderInfo = (_this.context.userType === 'TEACHER') ? _this.userNameMap[activity.topicUid] : _this.userNameMap[activity.threadOwnerUid];
26765                var context = {
26766                    activity: activity,
26767                    senderInfo: senderInfo,
26768                    userType: _this.context.userType,
26769                    currentUserUid: _this.context.currentUserUid,
26770                    getStreamGroupId: notificationRI.group
26771                };
26772                return new communication_notification_item_1.CommunicationNotificationItem(notificationRI.is_seen, notificationRI.is_read, context);
26773            });
26774        }));
26775    };
26776    CommunicationNotificationService.prototype.updateUserMapForNotifications = function (activities) {
26777        var _this = this;
26778        console.log('--> debug | update user map for notifications');
26779        console.log(activities);
26780        var userInfoQuery = this.getNewUserInfoFromNotifications(activities);
26781        console.log(userInfoQuery);
26782        if (userInfoQuery.length === 0) {
26783            return rxjs_2.of();
26784        }
26785        var path = (this.config.navigationPath == null) ? '/navigation/v1/user_names' : this.config.navigationPath;
26786        var url = this.config.domain != null ? this.config.domain + path : path;
26787        return pds_http_utils_1.pdsHttpUtils.post(url, userInfoQuery, {}, pds_http_utils_1.pdsHttpUtils.addUCAuthHeader({})).pipe(operators_2.map(function (response) {
26788            var data = JSON.parse(response.data);
26789            for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
26790                var datum = data_1[_i];
26791                _this.userNameMap[datum.userUid] = datum;
26792            }
26793        }));
26794    };
26795    CommunicationNotificationService.prototype.getNewUserInfoFromNotifications = function (activities) {
26796        var userQueries = [];
26797        var seenUsers = new Set();
26798        for (var _i = 0, activities_1 = activities; _i < activities_1.length; _i++) {
26799            var activity = activities_1[_i];
26800            switch (this.context.userType) {
26801                case 'TEACHER':
26802                    if (!seenUsers.has(activity.topicUid)) {
26803                        userQueries.push({
26804                            userUid: activity.topicUid,
26805                            userType: 'STUDENT',
26806                            sectionUids: activity.message.associatedSectionUids
26807                        });
26808                        seenUsers.add(activity.topicUid);
26809                    }
26810                    break;
26811                default:
26812                    if (!seenUsers.has(activity.threadOwnerUid)) {
26813                        userQueries.push({
26814                            userUid: activity.threadOwnerUid,
26815                            userType: 'TEACHER',
26816                            sectionUids: activity.message.associatedSectionUids
26817                        });
26818                        seenUsers.add(activity.threadOwnerUid);
26819                    }
26820            }
26821        }
26822        return userQueries;
26823    };
26824    return CommunicationNotificationService;
26825}(notification_service_1.NotificationService));
26826exports.CommunicationNotificationService = CommunicationNotificationService;
26827
26828
26829
26830/***/ }),
26831/* 193 */
26832/***/ (function(module, exports, __webpack_require__) {
26833
26834"use strict";
26835
26836Object.defineProperty(exports, "__esModule", { value: true });
26837exports.MessageHistory = {
26838    MESSAGES_TO_KEEP: 5,
26839    messageHistory: [],
26840    lastMessage: null,
26841    add: function (message) {
26842        this.lastMessage = message;
26843        this.messageHistory.unshift(message);
26844        if (this.messageHistory.length > this.MESSAGES_TO_KEEP) {
26845            this.messageHistory.pop();
26846        }
26847    },
26848    getLastMessageString: function () {
26849        return this.lastMessage ? this.lastMessage.message : '';
26850    },
26851    clickOnLastMessageLink: function (linkId) {
26852        if (this.lastMessage && this.lastMessage.hasLinks) {
26853            for (var _i = 0, _a = this.lastMessage.tokens; _i < _a.length; _i++) {
26854                var token = _a[_i];
26855                if (token.isLinkItem && token.linkItem && token.linkItem.id === linkId) {
26856                    token.linkItem.callback(token.linkItem);
26857                }
26858            }
26859        }
26860    },
26861    isLastMessageSuccess: function () {
26862        return this.lastMessage ? this.lastMessage.isTypeSuccess : false;
26863    },
26864    isLastMessageInfo: function () {
26865        return this.lastMessage ? this.lastMessage.isTypeInfo : false;
26866    },
26867    isLastMessageWarning: function () {
26868        return this.lastMessage ? this.lastMessage.isTypeWarning : false;
26869    },
26870    isLastMessageError: function () {
26871        return this.lastMessage ? this.lastMessage.isTypeError : false;
26872    },
26873    clear: function () {
26874        this.messageHistory = [];
26875        this.lastMessage = null;
26876    }
26877};
26878
26879
26880
26881/***/ })
26882/******/ ]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.