UNPKG

191 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common'), require('@angular/router'), require('@ionic/core'), require('rxjs'), require('rxjs/operators'), require('@ionic/core/loader')) :
3 typeof define === 'function' && define.amd ? define('@ionic/angular', ['exports', '@angular/core', '@angular/forms', '@angular/common', '@angular/router', '@ionic/core', 'rxjs', 'rxjs/operators', '@ionic/core/loader'], factory) :
4 (global = global || self, factory((global.ionic = global.ionic || {}, global.ionic.angular = {}), global.ng.core, global.ng.forms, global.ng.common, global.ng.router, global.core$1, global.rxjs, global.rxjs.operators, global.loader));
5}(this, (function (exports, core, forms, common, router, core$1, rxjs, operators, loader) { 'use strict';
6
7 /*! *****************************************************************************
8 Copyright (c) Microsoft Corporation.
9
10 Permission to use, copy, modify, and/or distribute this software for any
11 purpose with or without fee is hereby granted.
12
13 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 PERFORMANCE OF THIS SOFTWARE.
20 ***************************************************************************** */
21 /* global Reflect, Promise */
22
23 var extendStatics = function(d, b) {
24 extendStatics = Object.setPrototypeOf ||
25 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 return extendStatics(d, b);
28 };
29
30 function __extends(d, b) {
31 extendStatics(d, b);
32 function __() { this.constructor = d; }
33 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34 }
35
36 var __assign = function() {
37 __assign = Object.assign || function __assign(t) {
38 for (var s, i = 1, n = arguments.length; i < n; i++) {
39 s = arguments[i];
40 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41 }
42 return t;
43 };
44 return __assign.apply(this, arguments);
45 };
46
47 function __rest(s, e) {
48 var t = {};
49 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50 t[p] = s[p];
51 if (s != null && typeof Object.getOwnPropertySymbols === "function")
52 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54 t[p[i]] = s[p[i]];
55 }
56 return t;
57 }
58
59 function __decorate(decorators, target, key, desc) {
60 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62 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;
63 return c > 3 && r && Object.defineProperty(target, key, r), r;
64 }
65
66 function __param(paramIndex, decorator) {
67 return function (target, key) { decorator(target, key, paramIndex); }
68 }
69
70 function __metadata(metadataKey, metadataValue) {
71 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72 }
73
74 function __awaiter(thisArg, _arguments, P, generator) {
75 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76 return new (P || (P = Promise))(function (resolve, reject) {
77 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80 step((generator = generator.apply(thisArg, _arguments || [])).next());
81 });
82 }
83
84 function __generator(thisArg, body) {
85 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87 function verb(n) { return function (v) { return step([n, v]); }; }
88 function step(op) {
89 if (f) throw new TypeError("Generator is already executing.");
90 while (_) try {
91 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;
92 if (y = 0, t) op = [op[0] & 2, t.value];
93 switch (op[0]) {
94 case 0: case 1: t = op; break;
95 case 4: _.label++; return { value: op[1], done: false };
96 case 5: _.label++; y = op[1]; op = [0]; continue;
97 case 7: op = _.ops.pop(); _.trys.pop(); continue;
98 default:
99 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103 if (t[2]) _.ops.pop();
104 _.trys.pop(); continue;
105 }
106 op = body.call(thisArg, _);
107 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109 }
110 }
111
112 function __createBinding(o, m, k, k2) {
113 if (k2 === undefined) k2 = k;
114 o[k2] = m[k];
115 }
116
117 function __exportStar(m, exports) {
118 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
119 }
120
121 function __values(o) {
122 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
123 if (m) return m.call(o);
124 if (o && typeof o.length === "number") return {
125 next: function () {
126 if (o && i >= o.length) o = void 0;
127 return { value: o && o[i++], done: !o };
128 }
129 };
130 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
131 }
132
133 function __read(o, n) {
134 var m = typeof Symbol === "function" && o[Symbol.iterator];
135 if (!m) return o;
136 var i = m.call(o), r, ar = [], e;
137 try {
138 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
139 }
140 catch (error) { e = { error: error }; }
141 finally {
142 try {
143 if (r && !r.done && (m = i["return"])) m.call(i);
144 }
145 finally { if (e) throw e.error; }
146 }
147 return ar;
148 }
149
150 function __spread() {
151 for (var ar = [], i = 0; i < arguments.length; i++)
152 ar = ar.concat(__read(arguments[i]));
153 return ar;
154 }
155
156 function __spreadArrays() {
157 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
158 for (var r = Array(s), k = 0, i = 0; i < il; i++)
159 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
160 r[k] = a[j];
161 return r;
162 };
163
164 function __await(v) {
165 return this instanceof __await ? (this.v = v, this) : new __await(v);
166 }
167
168 function __asyncGenerator(thisArg, _arguments, generator) {
169 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
170 var g = generator.apply(thisArg, _arguments || []), i, q = [];
171 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
172 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); }); }; }
173 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
174 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
175 function fulfill(value) { resume("next", value); }
176 function reject(value) { resume("throw", value); }
177 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
178 }
179
180 function __asyncDelegator(o) {
181 var i, p;
182 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
183 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; }
184 }
185
186 function __asyncValues(o) {
187 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
188 var m = o[Symbol.asyncIterator], i;
189 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);
190 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); }); }; }
191 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
192 }
193
194 function __makeTemplateObject(cooked, raw) {
195 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
196 return cooked;
197 };
198
199 function __importStar(mod) {
200 if (mod && mod.__esModule) return mod;
201 var result = {};
202 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
203 result.default = mod;
204 return result;
205 }
206
207 function __importDefault(mod) {
208 return (mod && mod.__esModule) ? mod : { default: mod };
209 }
210
211 function __classPrivateFieldGet(receiver, privateMap) {
212 if (!privateMap.has(receiver)) {
213 throw new TypeError("attempted to get private field on non-instance");
214 }
215 return privateMap.get(receiver);
216 }
217
218 function __classPrivateFieldSet(receiver, privateMap, value) {
219 if (!privateMap.has(receiver)) {
220 throw new TypeError("attempted to set private field on non-instance");
221 }
222 privateMap.set(receiver, value);
223 return value;
224 }
225
226 var raf = function (h) {
227 if (typeof __zone_symbol__requestAnimationFrame === 'function') {
228 return __zone_symbol__requestAnimationFrame(h);
229 }
230 if (typeof requestAnimationFrame === 'function') {
231 return requestAnimationFrame(h);
232 }
233 return setTimeout(h);
234 };
235
236 var ValueAccessor = /** @class */ (function () {
237 function ValueAccessor(injector, el) {
238 this.injector = injector;
239 this.el = el;
240 this.onChange = function () { };
241 this.onTouched = function () { };
242 }
243 ValueAccessor.prototype.writeValue = function (value) {
244 /**
245 * TODO for Ionic 6:
246 * Change `value == null ? '' : value;`
247 * to `value`. This was a fix for IE9, but IE9
248 * is no longer supported; however, this change
249 * is potentially a breaking change
250 */
251 this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
252 setIonicClasses(this.el);
253 };
254 ValueAccessor.prototype.handleChangeEvent = function (el, value) {
255 if (el === this.el.nativeElement) {
256 if (value !== this.lastValue) {
257 this.lastValue = value;
258 this.onChange(value);
259 }
260 setIonicClasses(this.el);
261 }
262 };
263 ValueAccessor.prototype._handleBlurEvent = function (el) {
264 if (el === this.el.nativeElement) {
265 this.onTouched();
266 setIonicClasses(this.el);
267 }
268 };
269 ValueAccessor.prototype.registerOnChange = function (fn) {
270 this.onChange = fn;
271 };
272 ValueAccessor.prototype.registerOnTouched = function (fn) {
273 this.onTouched = fn;
274 };
275 ValueAccessor.prototype.setDisabledState = function (isDisabled) {
276 this.el.nativeElement.disabled = isDisabled;
277 };
278 ValueAccessor.prototype.ngOnDestroy = function () {
279 if (this.statusChanges) {
280 this.statusChanges.unsubscribe();
281 }
282 };
283 ValueAccessor.prototype.ngAfterViewInit = function () {
284 var _this = this;
285 var ngControl;
286 try {
287 ngControl = this.injector.get(forms.NgControl);
288 }
289 catch ( /* No FormControl or ngModel binding */_a) { /* No FormControl or ngModel binding */ }
290 if (!ngControl) {
291 return;
292 }
293 // Listen for changes in validity, disabled, or pending states
294 if (ngControl.statusChanges) {
295 this.statusChanges = ngControl.statusChanges.subscribe(function () { return setIonicClasses(_this.el); });
296 }
297 /**
298 * TODO Remove this in favor of https://github.com/angular/angular/issues/10887
299 * whenever it is implemented. Currently, Ionic's form status classes
300 * do not react to changes when developers manually call
301 * Angular form control methods such as markAsTouched.
302 * This results in Ionic's form status classes being out
303 * of sync with the ng form status classes.
304 * This patches the methods to manually sync
305 * the classes until this feature is implemented in Angular.
306 */
307 var formControl = ngControl.control;
308 if (formControl) {
309 var methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
310 methodsToPatch.forEach(function (method) {
311 if (formControl[method]) {
312 var oldFn_1 = formControl[method].bind(formControl);
313 formControl[method] = function () {
314 var params = [];
315 for (var _i = 0; _i < arguments.length; _i++) {
316 params[_i] = arguments[_i];
317 }
318 oldFn_1.apply(void 0, __spread(params));
319 setIonicClasses(_this.el);
320 };
321 }
322 });
323 }
324 };
325 __decorate([
326 core.HostListener('ionBlur', ['$event.target'])
327 ], ValueAccessor.prototype, "_handleBlurEvent", null);
328 return ValueAccessor;
329 }());
330 var setIonicClasses = function (element) {
331 raf(function () {
332 var input = element.nativeElement;
333 var classes = getClasses(input);
334 setClasses(input, classes);
335 var item = input.closest('ion-item');
336 if (item) {
337 setClasses(item, classes);
338 }
339 });
340 };
341 var getClasses = function (element) {
342 var classList = element.classList;
343 var classes = [];
344 for (var i = 0; i < classList.length; i++) {
345 var item = classList.item(i);
346 if (item !== null && startsWith(item, 'ng-')) {
347 classes.push("ion-" + item.substr(3));
348 }
349 }
350 return classes;
351 };
352 var ɵ0 = getClasses;
353 var setClasses = function (element, classes) {
354 var classList = element.classList;
355 [
356 'ion-valid',
357 'ion-invalid',
358 'ion-touched',
359 'ion-untouched',
360 'ion-dirty',
361 'ion-pristine'
362 ].forEach(function (c) { return classList.remove(c); });
363 classes.forEach(function (c) { return classList.add(c); });
364 };
365 var ɵ1 = setClasses;
366 var startsWith = function (input, search) {
367 return input.substr(0, search.length) === search;
368 };
369 var ɵ2 = startsWith;
370
371 var BooleanValueAccessor = /** @class */ (function (_super) {
372 __extends(BooleanValueAccessor, _super);
373 function BooleanValueAccessor(injector, el) {
374 return _super.call(this, injector, el) || this;
375 }
376 BooleanValueAccessor_1 = BooleanValueAccessor;
377 BooleanValueAccessor.prototype.writeValue = function (value) {
378 this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
379 setIonicClasses(this.el);
380 };
381 BooleanValueAccessor.prototype._handleIonChange = function (el) {
382 this.handleChangeEvent(el, el.checked);
383 };
384 var BooleanValueAccessor_1;
385 BooleanValueAccessor.ctorParameters = function () { return [
386 { type: core.Injector },
387 { type: core.ElementRef }
388 ]; };
389 __decorate([
390 core.HostListener('ionChange', ['$event.target'])
391 ], BooleanValueAccessor.prototype, "_handleIonChange", null);
392 BooleanValueAccessor = BooleanValueAccessor_1 = __decorate([
393 core.Directive({
394 /* tslint:disable-next-line:directive-selector */
395 selector: 'ion-checkbox,ion-toggle',
396 providers: [
397 {
398 provide: forms.NG_VALUE_ACCESSOR,
399 useExisting: BooleanValueAccessor_1,
400 multi: true
401 }
402 ]
403 })
404 ], BooleanValueAccessor);
405 return BooleanValueAccessor;
406 }(ValueAccessor));
407
408 var NumericValueAccessor = /** @class */ (function (_super) {
409 __extends(NumericValueAccessor, _super);
410 function NumericValueAccessor(injector, el) {
411 return _super.call(this, injector, el) || this;
412 }
413 NumericValueAccessor_1 = NumericValueAccessor;
414 NumericValueAccessor.prototype._handleIonChange = function (el) {
415 this.handleChangeEvent(el, el.value);
416 };
417 NumericValueAccessor.prototype.registerOnChange = function (fn) {
418 _super.prototype.registerOnChange.call(this, function (value) {
419 fn(value === '' ? null : parseFloat(value));
420 });
421 };
422 var NumericValueAccessor_1;
423 NumericValueAccessor.ctorParameters = function () { return [
424 { type: core.Injector },
425 { type: core.ElementRef }
426 ]; };
427 __decorate([
428 core.HostListener('ionChange', ['$event.target'])
429 ], NumericValueAccessor.prototype, "_handleIonChange", null);
430 NumericValueAccessor = NumericValueAccessor_1 = __decorate([
431 core.Directive({
432 /* tslint:disable-next-line:directive-selector */
433 selector: 'ion-input[type=number]',
434 providers: [
435 {
436 provide: forms.NG_VALUE_ACCESSOR,
437 useExisting: NumericValueAccessor_1,
438 multi: true
439 }
440 ]
441 })
442 ], NumericValueAccessor);
443 return NumericValueAccessor;
444 }(ValueAccessor));
445
446 var RadioValueAccessor = /** @class */ (function (_super) {
447 __extends(RadioValueAccessor, _super);
448 function RadioValueAccessor(injector, el) {
449 return _super.call(this, injector, el) || this;
450 }
451 RadioValueAccessor_1 = RadioValueAccessor;
452 RadioValueAccessor.prototype._handleIonSelect = function (el) {
453 this.handleChangeEvent(el, el.checked);
454 };
455 var RadioValueAccessor_1;
456 RadioValueAccessor.ctorParameters = function () { return [
457 { type: core.Injector },
458 { type: core.ElementRef }
459 ]; };
460 __decorate([
461 core.HostListener('ionSelect', ['$event.target'])
462 ], RadioValueAccessor.prototype, "_handleIonSelect", null);
463 RadioValueAccessor = RadioValueAccessor_1 = __decorate([
464 core.Directive({
465 /* tslint:disable-next-line:directive-selector */
466 selector: 'ion-radio',
467 providers: [
468 {
469 provide: forms.NG_VALUE_ACCESSOR,
470 useExisting: RadioValueAccessor_1,
471 multi: true
472 }
473 ]
474 })
475 ], RadioValueAccessor);
476 return RadioValueAccessor;
477 }(ValueAccessor));
478
479 var SelectValueAccessor = /** @class */ (function (_super) {
480 __extends(SelectValueAccessor, _super);
481 function SelectValueAccessor(injector, el) {
482 return _super.call(this, injector, el) || this;
483 }
484 SelectValueAccessor_1 = SelectValueAccessor;
485 SelectValueAccessor.prototype._handleChangeEvent = function (el) {
486 this.handleChangeEvent(el, el.value);
487 };
488 var SelectValueAccessor_1;
489 SelectValueAccessor.ctorParameters = function () { return [
490 { type: core.Injector },
491 { type: core.ElementRef }
492 ]; };
493 __decorate([
494 core.HostListener('ionChange', ['$event.target'])
495 ], SelectValueAccessor.prototype, "_handleChangeEvent", null);
496 SelectValueAccessor = SelectValueAccessor_1 = __decorate([
497 core.Directive({
498 /* tslint:disable-next-line:directive-selector */
499 selector: 'ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime',
500 providers: [
501 {
502 provide: forms.NG_VALUE_ACCESSOR,
503 useExisting: SelectValueAccessor_1,
504 multi: true
505 }
506 ]
507 })
508 ], SelectValueAccessor);
509 return SelectValueAccessor;
510 }(ValueAccessor));
511
512 var TextValueAccessor = /** @class */ (function (_super) {
513 __extends(TextValueAccessor, _super);
514 function TextValueAccessor(injector, el) {
515 return _super.call(this, injector, el) || this;
516 }
517 TextValueAccessor_1 = TextValueAccessor;
518 TextValueAccessor.prototype._handleInputEvent = function (el) {
519 this.handleChangeEvent(el, el.value);
520 };
521 var TextValueAccessor_1;
522 TextValueAccessor.ctorParameters = function () { return [
523 { type: core.Injector },
524 { type: core.ElementRef }
525 ]; };
526 __decorate([
527 core.HostListener('ionChange', ['$event.target'])
528 ], TextValueAccessor.prototype, "_handleInputEvent", null);
529 TextValueAccessor = TextValueAccessor_1 = __decorate([
530 core.Directive({
531 /* tslint:disable-next-line:directive-selector */
532 selector: 'ion-input:not([type=number]),ion-textarea,ion-searchbar',
533 providers: [
534 {
535 provide: forms.NG_VALUE_ACCESSOR,
536 useExisting: TextValueAccessor_1,
537 multi: true
538 }
539 ]
540 })
541 ], TextValueAccessor);
542 return TextValueAccessor;
543 }(ValueAccessor));
544
545 var Platform = /** @class */ (function () {
546 function Platform(doc, zone) {
547 var _this = this;
548 this.doc = doc;
549 /**
550 * @hidden
551 */
552 this.backButton = new rxjs.Subject();
553 /**
554 * The keyboardDidShow event emits when the
555 * on-screen keyboard is presented.
556 */
557 this.keyboardDidShow = new rxjs.Subject();
558 /**
559 * The keyboardDidHide event emits when the
560 * on-screen keyboard is hidden.
561 */
562 this.keyboardDidHide = new rxjs.Subject();
563 /**
564 * The pause event emits when the native platform puts the application
565 * into the background, typically when the user switches to a different
566 * application. This event would emit when a Cordova app is put into
567 * the background, however, it would not fire on a standard web browser.
568 */
569 this.pause = new rxjs.Subject();
570 /**
571 * The resume event emits when the native platform pulls the application
572 * out from the background. This event would emit when a Cordova app comes
573 * out from the background, however, it would not fire on a standard web browser.
574 */
575 this.resume = new rxjs.Subject();
576 /**
577 * The resize event emits when the browser window has changed dimensions. This
578 * could be from a browser window being physically resized, or from a device
579 * changing orientation.
580 */
581 this.resize = new rxjs.Subject();
582 zone.run(function () {
583 _this.win = doc.defaultView;
584 _this.backButton.subscribeWithPriority = function (priority, callback) {
585 return this.subscribe(function (ev) {
586 return ev.register(priority, function (processNextHandler) { return zone.run(function () { return callback(processNextHandler); }); });
587 });
588 };
589 proxyEvent(_this.pause, doc, 'pause');
590 proxyEvent(_this.resume, doc, 'resume');
591 proxyEvent(_this.backButton, doc, 'ionBackButton');
592 proxyEvent(_this.resize, _this.win, 'resize');
593 proxyEvent(_this.keyboardDidShow, _this.win, 'ionKeyboardDidShow');
594 proxyEvent(_this.keyboardDidHide, _this.win, 'ionKeyboardDidHide');
595 var readyResolve;
596 _this._readyPromise = new Promise(function (res) { readyResolve = res; });
597 if (_this.win && _this.win['cordova']) {
598 doc.addEventListener('deviceready', function () {
599 readyResolve('cordova');
600 }, { once: true });
601 }
602 else {
603 readyResolve('dom');
604 }
605 });
606 }
607 /**
608 * @returns returns true/false based on platform.
609 * @description
610 * Depending on the platform the user is on, `is(platformName)` will
611 * return `true` or `false`. Note that the same app can return `true`
612 * for more than one platform name. For example, an app running from
613 * an iPad would return `true` for the platform names: `mobile`,
614 * `ios`, `ipad`, and `tablet`. Additionally, if the app was running
615 * from Cordova then `cordova` would be true, and if it was running
616 * from a web browser on the iPad then `mobileweb` would be `true`.
617 *
618 * ```
619 * import { Platform } from 'ionic-angular';
620 *
621 * @Component({...})
622 * export MyPage {
623 * constructor(public platform: Platform) {
624 * if (this.platform.is('ios')) {
625 * // This will only print when on iOS
626 * console.log('I am an iOS device!');
627 * }
628 * }
629 * }
630 * ```
631 *
632 * | Platform Name | Description |
633 * |-----------------|------------------------------------|
634 * | android | on a device running Android. |
635 * | cordova | on a device running Cordova. |
636 * | ios | on a device running iOS. |
637 * | ipad | on an iPad device. |
638 * | iphone | on an iPhone device. |
639 * | phablet | on a phablet device. |
640 * | tablet | on a tablet device. |
641 * | electron | in Electron on a desktop device. |
642 * | pwa | as a PWA app. |
643 * | mobile | on a mobile device. |
644 * | mobileweb | on a mobile device in a browser. |
645 * | desktop | on a desktop device. |
646 * | hybrid | is a cordova or capacitor app. |
647 *
648 */
649 Platform.prototype.is = function (platformName) {
650 return core$1.isPlatform(this.win, platformName);
651 };
652 /**
653 * @returns the array of platforms
654 * @description
655 * Depending on what device you are on, `platforms` can return multiple values.
656 * Each possible value is a hierarchy of platforms. For example, on an iPhone,
657 * it would return `mobile`, `ios`, and `iphone`.
658 *
659 * ```
660 * import { Platform } from 'ionic-angular';
661 *
662 * @Component({...})
663 * export MyPage {
664 * constructor(public platform: Platform) {
665 * // This will print an array of the current platforms
666 * console.log(this.platform.platforms());
667 * }
668 * }
669 * ```
670 */
671 Platform.prototype.platforms = function () {
672 return core$1.getPlatforms(this.win);
673 };
674 /**
675 * Returns a promise when the platform is ready and native functionality
676 * can be called. If the app is running from within a web browser, then
677 * the promise will resolve when the DOM is ready. When the app is running
678 * from an application engine such as Cordova, then the promise will
679 * resolve when Cordova triggers the `deviceready` event.
680 *
681 * The resolved value is the `readySource`, which states which platform
682 * ready was used. For example, when Cordova is ready, the resolved ready
683 * source is `cordova`. The default ready source value will be `dom`. The
684 * `readySource` is useful if different logic should run depending on the
685 * platform the app is running from. For example, only Cordova can execute
686 * the status bar plugin, so the web should not run status bar plugin logic.
687 *
688 * ```
689 * import { Component } from '@angular/core';
690 * import { Platform } from 'ionic-angular';
691 *
692 * @Component({...})
693 * export MyApp {
694 * constructor(public platform: Platform) {
695 * this.platform.ready().then((readySource) => {
696 * console.log('Platform ready from', readySource);
697 * // Platform now ready, execute any required native code
698 * });
699 * }
700 * }
701 * ```
702 */
703 Platform.prototype.ready = function () {
704 return this._readyPromise;
705 };
706 Object.defineProperty(Platform.prototype, "isRTL", {
707 /**
708 * Returns if this app is using right-to-left language direction or not.
709 * We recommend the app's `index.html` file already has the correct `dir`
710 * attribute value set, such as `<html dir="ltr">` or `<html dir="rtl">`.
711 * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir)
712 */
713 get: function () {
714 return this.doc.dir === 'rtl';
715 },
716 enumerable: true,
717 configurable: true
718 });
719 /**
720 * Get the query string parameter
721 */
722 Platform.prototype.getQueryParam = function (key) {
723 return readQueryParam(this.win.location.href, key);
724 };
725 /**
726 * Returns `true` if the app is in landscape mode.
727 */
728 Platform.prototype.isLandscape = function () {
729 return !this.isPortrait();
730 };
731 /**
732 * Returns `true` if the app is in portait mode.
733 */
734 Platform.prototype.isPortrait = function () {
735 return this.win.matchMedia && this.win.matchMedia('(orientation: portrait)').matches;
736 };
737 Platform.prototype.testUserAgent = function (expression) {
738 var nav = this.win.navigator;
739 return !!(nav && nav.userAgent && nav.userAgent.indexOf(expression) >= 0);
740 };
741 /**
742 * Get the current url.
743 */
744 Platform.prototype.url = function () {
745 return this.win.location.href;
746 };
747 /**
748 * Gets the width of the platform's viewport using `window.innerWidth`.
749 */
750 Platform.prototype.width = function () {
751 return this.win.innerWidth;
752 };
753 /**
754 * Gets the height of the platform's viewport using `window.innerHeight`.
755 */
756 Platform.prototype.height = function () {
757 return this.win.innerHeight;
758 };
759 Platform.ctorParameters = function () { return [
760 { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
761 { type: core.NgZone }
762 ]; };
763 Platform.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(core.ɵɵinject(common.DOCUMENT), core.ɵɵinject(core.NgZone)); }, token: Platform, providedIn: "root" });
764 Platform = __decorate([
765 core.Injectable({
766 providedIn: 'root',
767 }),
768 __param(0, core.Inject(common.DOCUMENT))
769 ], Platform);
770 return Platform;
771 }());
772 var readQueryParam = function (url, key) {
773 key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
774 var regex = new RegExp('[\\?&]' + key + '=([^&#]*)');
775 var results = regex.exec(url);
776 return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
777 };
778 var ɵ0$1 = readQueryParam;
779 var proxyEvent = function (emitter, el, eventName) {
780 if (el) {
781 el.addEventListener(eventName, function (ev) {
782 // ?? cordova might emit "null" events
783 emitter.next(ev != null ? ev.detail : undefined);
784 });
785 }
786 };
787 var ɵ1$1 = proxyEvent;
788
789 var NavController = /** @class */ (function () {
790 function NavController(platform, location, serializer, router$1) {
791 var _this = this;
792 this.location = location;
793 this.serializer = serializer;
794 this.router = router$1;
795 this.direction = DEFAULT_DIRECTION;
796 this.animated = DEFAULT_ANIMATED;
797 this.guessDirection = 'forward';
798 this.lastNavId = -1;
799 // Subscribe to router events to detect direction
800 if (router$1) {
801 router$1.events.subscribe(function (ev) {
802 if (ev instanceof router.NavigationStart) {
803 var id = (ev.restoredState) ? ev.restoredState.navigationId : ev.id;
804 _this.guessDirection = id < _this.lastNavId ? 'back' : 'forward';
805 _this.guessAnimation = !ev.restoredState ? _this.guessDirection : undefined;
806 _this.lastNavId = _this.guessDirection === 'forward' ? ev.id : id;
807 }
808 });
809 }
810 // Subscribe to backButton events
811 platform.backButton.subscribeWithPriority(0, function (processNextHandler) {
812 _this.pop();
813 processNextHandler();
814 });
815 }
816 /**
817 * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
818 * it's equivalent to calling `this.router.navigateByUrl()`, but it's explicit about the **direction** of the transition.
819 *
820 * Going **forward** means that a new page is going to be pushed to the stack of the outlet (ion-router-outlet),
821 * and that it will show a "forward" animation by default.
822 *
823 * Navigating forward can also be triggered in a declarative manner by using the `[routerDirection]` directive:
824 *
825 * ```html
826 * <a routerLink="/path/to/page" routerDirection="forward">Link</a>
827 * ```
828 */
829 NavController.prototype.navigateForward = function (url, options) {
830 if (options === void 0) { options = {}; }
831 this.setDirection('forward', options.animated, options.animationDirection, options.animation);
832 return this.navigate(url, options);
833 };
834 /**
835 * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
836 * it's equivalent to calling:
837 *
838 * ```ts
839 * this.navController.setDirection('back');
840 * this.router.navigateByUrl(path);
841 * ```
842 *
843 * Going **back** means that all the pages in the stack until the navigated page is found will be popped,
844 * and that it will show a "back" animation by default.
845 *
846 * Navigating back can also be triggered in a declarative manner by using the `[routerDirection]` directive:
847 *
848 * ```html
849 * <a routerLink="/path/to/page" routerDirection="back">Link</a>
850 * ```
851 */
852 NavController.prototype.navigateBack = function (url, options) {
853 if (options === void 0) { options = {}; }
854 this.setDirection('back', options.animated, options.animationDirection, options.animation);
855 return this.navigate(url, options);
856 };
857 /**
858 * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
859 * it's equivalent to calling:
860 *
861 * ```ts
862 * this.navController.setDirection('root');
863 * this.router.navigateByUrl(path);
864 * ```
865 *
866 * Going **root** means that all existing pages in the stack will be removed,
867 * and the navigated page will become the single page in the stack.
868 *
869 * Navigating root can also be triggered in a declarative manner by using the `[routerDirection]` directive:
870 *
871 * ```html
872 * <a routerLink="/path/to/page" routerDirection="root">Link</a>
873 * ```
874 */
875 NavController.prototype.navigateRoot = function (url, options) {
876 if (options === void 0) { options = {}; }
877 this.setDirection('root', options.animated, options.animationDirection, options.animation);
878 return this.navigate(url, options);
879 };
880 /**
881 * Same as [Location](https://angular.io/api/common/Location)'s back() method.
882 * It will use the standard `window.history.back()` under the hood, but featuring a `back` animation
883 * by default.
884 */
885 NavController.prototype.back = function (options) {
886 if (options === void 0) { options = { animated: true, animationDirection: 'back' }; }
887 this.setDirection('back', options.animated, options.animationDirection, options.animation);
888 return this.location.back();
889 };
890 /**
891 * This methods goes back in the context of Ionic's stack navigation.
892 *
893 * It recursively finds the top active `ion-router-outlet` and calls `pop()`.
894 * This is the recommended way to go back when you are using `ion-router-outlet`.
895 */
896 NavController.prototype.pop = function () {
897 return __awaiter(this, void 0, void 0, function () {
898 var outlet;
899 return __generator(this, function (_a) {
900 switch (_a.label) {
901 case 0:
902 outlet = this.topOutlet;
903 _a.label = 1;
904 case 1:
905 if (!outlet) return [3 /*break*/, 3];
906 return [4 /*yield*/, outlet.pop()];
907 case 2:
908 if (_a.sent()) {
909 return [3 /*break*/, 3];
910 }
911 else {
912 outlet = outlet.parentOutlet;
913 }
914 return [3 /*break*/, 1];
915 case 3: return [2 /*return*/];
916 }
917 });
918 });
919 };
920 /**
921 * This methods specifies the direction of the next navigation performed by the Angular router.
922 *
923 * `setDirection()` does not trigger any transition, it just sets some flags to be consumed by `ion-router-outlet`.
924 *
925 * It's recommended to use `navigateForward()`, `navigateBack()` and `navigateRoot()` instead of `setDirection()`.
926 */
927 NavController.prototype.setDirection = function (direction, animated, animationDirection, animationBuilder) {
928 this.direction = direction;
929 this.animated = getAnimation(direction, animated, animationDirection);
930 this.animationBuilder = animationBuilder;
931 };
932 /**
933 * @internal
934 */
935 NavController.prototype.setTopOutlet = function (outlet) {
936 this.topOutlet = outlet;
937 };
938 /**
939 * @internal
940 */
941 NavController.prototype.consumeTransition = function () {
942 var direction = 'root';
943 var animation;
944 var animationBuilder = this.animationBuilder;
945 if (this.direction === 'auto') {
946 direction = this.guessDirection;
947 animation = this.guessAnimation;
948 }
949 else {
950 animation = this.animated;
951 direction = this.direction;
952 }
953 this.direction = DEFAULT_DIRECTION;
954 this.animated = DEFAULT_ANIMATED;
955 this.animationBuilder = undefined;
956 return {
957 direction: direction,
958 animation: animation,
959 animationBuilder: animationBuilder
960 };
961 };
962 NavController.prototype.navigate = function (url, options) {
963 if (Array.isArray(url)) {
964 return this.router.navigate(url, options);
965 }
966 else {
967 /**
968 * navigateByUrl ignores any properties that
969 * would change the url, so things like queryParams
970 * would be ignored unless we create a url tree
971 * More Info: https://github.com/angular/angular/issues/18798
972 */
973 var urlTree = this.serializer.parse(url.toString());
974 if (options.queryParams !== undefined) {
975 urlTree.queryParams = __assign({}, options.queryParams);
976 }
977 if (options.fragment !== undefined) {
978 urlTree.fragment = options.fragment;
979 }
980 /**
981 * `navigateByUrl` will still apply `NavigationExtras` properties
982 * that do not modify the url, such as `replaceUrl` which is why
983 * `options` is passed in here.
984 */
985 return this.router.navigateByUrl(urlTree, options);
986 }
987 };
988 NavController.ctorParameters = function () { return [
989 { type: Platform },
990 { type: common.Location },
991 { type: router.UrlSerializer },
992 { type: router.Router, decorators: [{ type: core.Optional }] }
993 ]; };
994 NavController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function NavController_Factory() { return new NavController(core.ɵɵinject(Platform), core.ɵɵinject(common.Location), core.ɵɵinject(router.UrlSerializer), core.ɵɵinject(router.Router, 8)); }, token: NavController, providedIn: "root" });
995 NavController = __decorate([
996 core.Injectable({
997 providedIn: 'root',
998 }),
999 __param(3, core.Optional())
1000 ], NavController);
1001 return NavController;
1002 }());
1003 var getAnimation = function (direction, animated, animationDirection) {
1004 if (animated === false) {
1005 return undefined;
1006 }
1007 if (animationDirection !== undefined) {
1008 return animationDirection;
1009 }
1010 if (direction === 'forward' || direction === 'back') {
1011 return direction;
1012 }
1013 else if (direction === 'root' && animated === true) {
1014 return 'forward';
1015 }
1016 return undefined;
1017 };
1018 var ɵ0$2 = getAnimation;
1019 var DEFAULT_DIRECTION = 'auto';
1020 var DEFAULT_ANIMATED = undefined;
1021
1022 /* eslint-disable */
1023 var proxyInputs = function (Cmp, inputs) {
1024 var Prototype = Cmp.prototype;
1025 inputs.forEach(function (item) {
1026 Object.defineProperty(Prototype, item, {
1027 get: function () {
1028 return this.el[item];
1029 },
1030 set: function (val) {
1031 var _this = this;
1032 this.z.runOutsideAngular(function () { return (_this.el[item] = val); });
1033 }
1034 });
1035 });
1036 };
1037 var proxyMethods = function (Cmp, methods) {
1038 var Prototype = Cmp.prototype;
1039 methods.forEach(function (methodName) {
1040 Prototype[methodName] = function () {
1041 var _this = this;
1042 var args = arguments;
1043 return this.z.runOutsideAngular(function () {
1044 return _this.el[methodName].apply(_this.el, args);
1045 });
1046 };
1047 });
1048 };
1049 var proxyOutputs = function (instance, el, events) {
1050 events.forEach(function (eventName) { return instance[eventName] = rxjs.fromEvent(el, eventName); });
1051 };
1052 function ProxyCmp(opts) {
1053 var decorator = function (cls) {
1054 if (opts.inputs) {
1055 proxyInputs(cls, opts.inputs);
1056 }
1057 if (opts.methods) {
1058 proxyMethods(cls, opts.methods);
1059 }
1060 return cls;
1061 };
1062 return decorator;
1063 }
1064
1065 var IonApp = /** @class */ (function () {
1066 function IonApp(c, r, z) {
1067 this.z = z;
1068 c.detach();
1069 this.el = r.nativeElement;
1070 }
1071 IonApp.ctorParameters = function () { return [
1072 { type: core.ChangeDetectorRef },
1073 { type: core.ElementRef },
1074 { type: core.NgZone }
1075 ]; };
1076 IonApp = __decorate([
1077 core.Component({ selector: "ion-app", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1078 ], IonApp);
1079 return IonApp;
1080 }());
1081 var IonAvatar = /** @class */ (function () {
1082 function IonAvatar(c, r, z) {
1083 this.z = z;
1084 c.detach();
1085 this.el = r.nativeElement;
1086 }
1087 IonAvatar.ctorParameters = function () { return [
1088 { type: core.ChangeDetectorRef },
1089 { type: core.ElementRef },
1090 { type: core.NgZone }
1091 ]; };
1092 IonAvatar = __decorate([
1093 core.Component({ selector: "ion-avatar", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1094 ], IonAvatar);
1095 return IonAvatar;
1096 }());
1097 var IonBackButton = /** @class */ (function () {
1098 function IonBackButton(c, r, z) {
1099 this.z = z;
1100 c.detach();
1101 this.el = r.nativeElement;
1102 }
1103 IonBackButton.ctorParameters = function () { return [
1104 { type: core.ChangeDetectorRef },
1105 { type: core.ElementRef },
1106 { type: core.NgZone }
1107 ]; };
1108 IonBackButton = __decorate([
1109 ProxyCmp({ inputs: ["color", "defaultHref", "disabled", "icon", "mode", "routerAnimation", "text", "type"] }),
1110 core.Component({ selector: "ion-back-button", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "defaultHref", "disabled", "icon", "mode", "routerAnimation", "text", "type"] })
1111 ], IonBackButton);
1112 return IonBackButton;
1113 }());
1114 var IonBackdrop = /** @class */ (function () {
1115 function IonBackdrop(c, r, z) {
1116 this.z = z;
1117 c.detach();
1118 this.el = r.nativeElement;
1119 proxyOutputs(this, this.el, ["ionBackdropTap"]);
1120 }
1121 IonBackdrop.ctorParameters = function () { return [
1122 { type: core.ChangeDetectorRef },
1123 { type: core.ElementRef },
1124 { type: core.NgZone }
1125 ]; };
1126 IonBackdrop = __decorate([
1127 ProxyCmp({ inputs: ["stopPropagation", "tappable", "visible"] }),
1128 core.Component({ selector: "ion-backdrop", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["stopPropagation", "tappable", "visible"] })
1129 ], IonBackdrop);
1130 return IonBackdrop;
1131 }());
1132 var IonBadge = /** @class */ (function () {
1133 function IonBadge(c, r, z) {
1134 this.z = z;
1135 c.detach();
1136 this.el = r.nativeElement;
1137 }
1138 IonBadge.ctorParameters = function () { return [
1139 { type: core.ChangeDetectorRef },
1140 { type: core.ElementRef },
1141 { type: core.NgZone }
1142 ]; };
1143 IonBadge = __decorate([
1144 ProxyCmp({ inputs: ["color", "mode"] }),
1145 core.Component({ selector: "ion-badge", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1146 ], IonBadge);
1147 return IonBadge;
1148 }());
1149 var IonButton = /** @class */ (function () {
1150 function IonButton(c, r, z) {
1151 this.z = z;
1152 c.detach();
1153 this.el = r.nativeElement;
1154 proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
1155 }
1156 IonButton.ctorParameters = function () { return [
1157 { type: core.ChangeDetectorRef },
1158 { type: core.ElementRef },
1159 { type: core.NgZone }
1160 ]; };
1161 IonButton = __decorate([
1162 ProxyCmp({ inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }),
1163 core.Component({ selector: "ion-button", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] })
1164 ], IonButton);
1165 return IonButton;
1166 }());
1167 var IonButtons = /** @class */ (function () {
1168 function IonButtons(c, r, z) {
1169 this.z = z;
1170 c.detach();
1171 this.el = r.nativeElement;
1172 }
1173 IonButtons.ctorParameters = function () { return [
1174 { type: core.ChangeDetectorRef },
1175 { type: core.ElementRef },
1176 { type: core.NgZone }
1177 ]; };
1178 IonButtons = __decorate([
1179 ProxyCmp({ inputs: ["collapse"] }),
1180 core.Component({ selector: "ion-buttons", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["collapse"] })
1181 ], IonButtons);
1182 return IonButtons;
1183 }());
1184 var IonCard = /** @class */ (function () {
1185 function IonCard(c, r, z) {
1186 this.z = z;
1187 c.detach();
1188 this.el = r.nativeElement;
1189 }
1190 IonCard.ctorParameters = function () { return [
1191 { type: core.ChangeDetectorRef },
1192 { type: core.ElementRef },
1193 { type: core.NgZone }
1194 ]; };
1195 IonCard = __decorate([
1196 ProxyCmp({ inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }),
1197 core.Component({ selector: "ion-card", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["button", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] })
1198 ], IonCard);
1199 return IonCard;
1200 }());
1201 var IonCardContent = /** @class */ (function () {
1202 function IonCardContent(c, r, z) {
1203 this.z = z;
1204 c.detach();
1205 this.el = r.nativeElement;
1206 }
1207 IonCardContent.ctorParameters = function () { return [
1208 { type: core.ChangeDetectorRef },
1209 { type: core.ElementRef },
1210 { type: core.NgZone }
1211 ]; };
1212 IonCardContent = __decorate([
1213 ProxyCmp({ inputs: ["mode"] }),
1214 core.Component({ selector: "ion-card-content", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["mode"] })
1215 ], IonCardContent);
1216 return IonCardContent;
1217 }());
1218 var IonCardHeader = /** @class */ (function () {
1219 function IonCardHeader(c, r, z) {
1220 this.z = z;
1221 c.detach();
1222 this.el = r.nativeElement;
1223 }
1224 IonCardHeader.ctorParameters = function () { return [
1225 { type: core.ChangeDetectorRef },
1226 { type: core.ElementRef },
1227 { type: core.NgZone }
1228 ]; };
1229 IonCardHeader = __decorate([
1230 ProxyCmp({ inputs: ["color", "mode", "translucent"] }),
1231 core.Component({ selector: "ion-card-header", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "translucent"] })
1232 ], IonCardHeader);
1233 return IonCardHeader;
1234 }());
1235 var IonCardSubtitle = /** @class */ (function () {
1236 function IonCardSubtitle(c, r, z) {
1237 this.z = z;
1238 c.detach();
1239 this.el = r.nativeElement;
1240 }
1241 IonCardSubtitle.ctorParameters = function () { return [
1242 { type: core.ChangeDetectorRef },
1243 { type: core.ElementRef },
1244 { type: core.NgZone }
1245 ]; };
1246 IonCardSubtitle = __decorate([
1247 ProxyCmp({ inputs: ["color", "mode"] }),
1248 core.Component({ selector: "ion-card-subtitle", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1249 ], IonCardSubtitle);
1250 return IonCardSubtitle;
1251 }());
1252 var IonCardTitle = /** @class */ (function () {
1253 function IonCardTitle(c, r, z) {
1254 this.z = z;
1255 c.detach();
1256 this.el = r.nativeElement;
1257 }
1258 IonCardTitle.ctorParameters = function () { return [
1259 { type: core.ChangeDetectorRef },
1260 { type: core.ElementRef },
1261 { type: core.NgZone }
1262 ]; };
1263 IonCardTitle = __decorate([
1264 ProxyCmp({ inputs: ["color", "mode"] }),
1265 core.Component({ selector: "ion-card-title", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1266 ], IonCardTitle);
1267 return IonCardTitle;
1268 }());
1269 var IonCheckbox = /** @class */ (function () {
1270 function IonCheckbox(c, r, z) {
1271 this.z = z;
1272 c.detach();
1273 this.el = r.nativeElement;
1274 proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
1275 }
1276 IonCheckbox.ctorParameters = function () { return [
1277 { type: core.ChangeDetectorRef },
1278 { type: core.ElementRef },
1279 { type: core.NgZone }
1280 ]; };
1281 IonCheckbox = __decorate([
1282 ProxyCmp({ inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] }),
1283 core.Component({ selector: "ion-checkbox", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["checked", "color", "disabled", "indeterminate", "mode", "name", "value"] })
1284 ], IonCheckbox);
1285 return IonCheckbox;
1286 }());
1287 var IonChip = /** @class */ (function () {
1288 function IonChip(c, r, z) {
1289 this.z = z;
1290 c.detach();
1291 this.el = r.nativeElement;
1292 }
1293 IonChip.ctorParameters = function () { return [
1294 { type: core.ChangeDetectorRef },
1295 { type: core.ElementRef },
1296 { type: core.NgZone }
1297 ]; };
1298 IonChip = __decorate([
1299 ProxyCmp({ inputs: ["color", "mode", "outline"] }),
1300 core.Component({ selector: "ion-chip", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "outline"] })
1301 ], IonChip);
1302 return IonChip;
1303 }());
1304 var IonCol = /** @class */ (function () {
1305 function IonCol(c, r, z) {
1306 this.z = z;
1307 c.detach();
1308 this.el = r.nativeElement;
1309 }
1310 IonCol.ctorParameters = function () { return [
1311 { type: core.ChangeDetectorRef },
1312 { type: core.ElementRef },
1313 { type: core.NgZone }
1314 ]; };
1315 IonCol = __decorate([
1316 ProxyCmp({ inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }),
1317 core.Component({ selector: "ion-col", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] })
1318 ], IonCol);
1319 return IonCol;
1320 }());
1321 var IonContent = /** @class */ (function () {
1322 function IonContent(c, r, z) {
1323 this.z = z;
1324 c.detach();
1325 this.el = r.nativeElement;
1326 proxyOutputs(this, this.el, ["ionScrollStart", "ionScroll", "ionScrollEnd"]);
1327 }
1328 IonContent.ctorParameters = function () { return [
1329 { type: core.ChangeDetectorRef },
1330 { type: core.ElementRef },
1331 { type: core.NgZone }
1332 ]; };
1333 IonContent = __decorate([
1334 ProxyCmp({ inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"], "methods": ["getScrollElement", "scrollToTop", "scrollToBottom", "scrollByPoint", "scrollToPoint"] }),
1335 core.Component({ selector: "ion-content", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] })
1336 ], IonContent);
1337 return IonContent;
1338 }());
1339 var IonDatetime = /** @class */ (function () {
1340 function IonDatetime(c, r, z) {
1341 this.z = z;
1342 c.detach();
1343 this.el = r.nativeElement;
1344 proxyOutputs(this, this.el, ["ionCancel", "ionChange", "ionFocus", "ionBlur"]);
1345 }
1346 IonDatetime.ctorParameters = function () { return [
1347 { type: core.ChangeDetectorRef },
1348 { type: core.ElementRef },
1349 { type: core.NgZone }
1350 ]; };
1351 IonDatetime = __decorate([
1352 ProxyCmp({ inputs: ["cancelText", "dayNames", "dayShortNames", "dayValues", "disabled", "displayFormat", "displayTimezone", "doneText", "hourValues", "max", "min", "minuteValues", "mode", "monthNames", "monthShortNames", "monthValues", "name", "pickerFormat", "pickerOptions", "placeholder", "readonly", "value", "yearValues"], "methods": ["open"] }),
1353 core.Component({ selector: "ion-datetime", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["cancelText", "dayNames", "dayShortNames", "dayValues", "disabled", "displayFormat", "displayTimezone", "doneText", "hourValues", "max", "min", "minuteValues", "mode", "monthNames", "monthShortNames", "monthValues", "name", "pickerFormat", "pickerOptions", "placeholder", "readonly", "value", "yearValues"] })
1354 ], IonDatetime);
1355 return IonDatetime;
1356 }());
1357 var IonFab = /** @class */ (function () {
1358 function IonFab(c, r, z) {
1359 this.z = z;
1360 c.detach();
1361 this.el = r.nativeElement;
1362 }
1363 IonFab.ctorParameters = function () { return [
1364 { type: core.ChangeDetectorRef },
1365 { type: core.ElementRef },
1366 { type: core.NgZone }
1367 ]; };
1368 IonFab = __decorate([
1369 ProxyCmp({ inputs: ["activated", "edge", "horizontal", "vertical"], "methods": ["close"] }),
1370 core.Component({ selector: "ion-fab", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["activated", "edge", "horizontal", "vertical"] })
1371 ], IonFab);
1372 return IonFab;
1373 }());
1374 var IonFabButton = /** @class */ (function () {
1375 function IonFabButton(c, r, z) {
1376 this.z = z;
1377 c.detach();
1378 this.el = r.nativeElement;
1379 proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
1380 }
1381 IonFabButton.ctorParameters = function () { return [
1382 { type: core.ChangeDetectorRef },
1383 { type: core.ElementRef },
1384 { type: core.NgZone }
1385 ]; };
1386 IonFabButton = __decorate([
1387 ProxyCmp({ inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] }),
1388 core.Component({ selector: "ion-fab-button", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] })
1389 ], IonFabButton);
1390 return IonFabButton;
1391 }());
1392 var IonFabList = /** @class */ (function () {
1393 function IonFabList(c, r, z) {
1394 this.z = z;
1395 c.detach();
1396 this.el = r.nativeElement;
1397 }
1398 IonFabList.ctorParameters = function () { return [
1399 { type: core.ChangeDetectorRef },
1400 { type: core.ElementRef },
1401 { type: core.NgZone }
1402 ]; };
1403 IonFabList = __decorate([
1404 ProxyCmp({ inputs: ["activated", "side"] }),
1405 core.Component({ selector: "ion-fab-list", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["activated", "side"] })
1406 ], IonFabList);
1407 return IonFabList;
1408 }());
1409 var IonFooter = /** @class */ (function () {
1410 function IonFooter(c, r, z) {
1411 this.z = z;
1412 c.detach();
1413 this.el = r.nativeElement;
1414 }
1415 IonFooter.ctorParameters = function () { return [
1416 { type: core.ChangeDetectorRef },
1417 { type: core.ElementRef },
1418 { type: core.NgZone }
1419 ]; };
1420 IonFooter = __decorate([
1421 ProxyCmp({ inputs: ["mode", "translucent"] }),
1422 core.Component({ selector: "ion-footer", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["mode", "translucent"] })
1423 ], IonFooter);
1424 return IonFooter;
1425 }());
1426 var IonGrid = /** @class */ (function () {
1427 function IonGrid(c, r, z) {
1428 this.z = z;
1429 c.detach();
1430 this.el = r.nativeElement;
1431 }
1432 IonGrid.ctorParameters = function () { return [
1433 { type: core.ChangeDetectorRef },
1434 { type: core.ElementRef },
1435 { type: core.NgZone }
1436 ]; };
1437 IonGrid = __decorate([
1438 ProxyCmp({ inputs: ["fixed"] }),
1439 core.Component({ selector: "ion-grid", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["fixed"] })
1440 ], IonGrid);
1441 return IonGrid;
1442 }());
1443 var IonHeader = /** @class */ (function () {
1444 function IonHeader(c, r, z) {
1445 this.z = z;
1446 c.detach();
1447 this.el = r.nativeElement;
1448 }
1449 IonHeader.ctorParameters = function () { return [
1450 { type: core.ChangeDetectorRef },
1451 { type: core.ElementRef },
1452 { type: core.NgZone }
1453 ]; };
1454 IonHeader = __decorate([
1455 ProxyCmp({ inputs: ["collapse", "mode", "translucent"] }),
1456 core.Component({ selector: "ion-header", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["collapse", "mode", "translucent"] })
1457 ], IonHeader);
1458 return IonHeader;
1459 }());
1460 var IonIcon = /** @class */ (function () {
1461 function IonIcon(c, r, z) {
1462 this.z = z;
1463 c.detach();
1464 this.el = r.nativeElement;
1465 }
1466 IonIcon.ctorParameters = function () { return [
1467 { type: core.ChangeDetectorRef },
1468 { type: core.ElementRef },
1469 { type: core.NgZone }
1470 ]; };
1471 IonIcon = __decorate([
1472 ProxyCmp({ inputs: ["ariaLabel", "color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "size", "src"] }),
1473 core.Component({ selector: "ion-icon", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["ariaLabel", "color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "size", "src"] })
1474 ], IonIcon);
1475 return IonIcon;
1476 }());
1477 var IonImg = /** @class */ (function () {
1478 function IonImg(c, r, z) {
1479 this.z = z;
1480 c.detach();
1481 this.el = r.nativeElement;
1482 proxyOutputs(this, this.el, ["ionImgWillLoad", "ionImgDidLoad", "ionError"]);
1483 }
1484 IonImg.ctorParameters = function () { return [
1485 { type: core.ChangeDetectorRef },
1486 { type: core.ElementRef },
1487 { type: core.NgZone }
1488 ]; };
1489 IonImg = __decorate([
1490 ProxyCmp({ inputs: ["alt", "src"] }),
1491 core.Component({ selector: "ion-img", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["alt", "src"] })
1492 ], IonImg);
1493 return IonImg;
1494 }());
1495 var IonInfiniteScroll = /** @class */ (function () {
1496 function IonInfiniteScroll(c, r, z) {
1497 this.z = z;
1498 c.detach();
1499 this.el = r.nativeElement;
1500 proxyOutputs(this, this.el, ["ionInfinite"]);
1501 }
1502 IonInfiniteScroll.ctorParameters = function () { return [
1503 { type: core.ChangeDetectorRef },
1504 { type: core.ElementRef },
1505 { type: core.NgZone }
1506 ]; };
1507 IonInfiniteScroll = __decorate([
1508 ProxyCmp({ inputs: ["disabled", "position", "threshold"], "methods": ["complete"] }),
1509 core.Component({ selector: "ion-infinite-scroll", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "position", "threshold"] })
1510 ], IonInfiniteScroll);
1511 return IonInfiniteScroll;
1512 }());
1513 var IonInfiniteScrollContent = /** @class */ (function () {
1514 function IonInfiniteScrollContent(c, r, z) {
1515 this.z = z;
1516 c.detach();
1517 this.el = r.nativeElement;
1518 }
1519 IonInfiniteScrollContent.ctorParameters = function () { return [
1520 { type: core.ChangeDetectorRef },
1521 { type: core.ElementRef },
1522 { type: core.NgZone }
1523 ]; };
1524 IonInfiniteScrollContent = __decorate([
1525 ProxyCmp({ inputs: ["loadingSpinner", "loadingText"] }),
1526 core.Component({ selector: "ion-infinite-scroll-content", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["loadingSpinner", "loadingText"] })
1527 ], IonInfiniteScrollContent);
1528 return IonInfiniteScrollContent;
1529 }());
1530 var IonInput = /** @class */ (function () {
1531 function IonInput(c, r, z) {
1532 this.z = z;
1533 c.detach();
1534 this.el = r.nativeElement;
1535 proxyOutputs(this, this.el, ["ionInput", "ionChange", "ionBlur", "ionFocus"]);
1536 }
1537 IonInput.ctorParameters = function () { return [
1538 { type: core.ChangeDetectorRef },
1539 { type: core.ElementRef },
1540 { type: core.NgZone }
1541 ]; };
1542 IonInput = __decorate([
1543 ProxyCmp({ inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"], "methods": ["setFocus", "getInputElement"] }),
1544 core.Component({ selector: "ion-input", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] })
1545 ], IonInput);
1546 return IonInput;
1547 }());
1548 var IonItem = /** @class */ (function () {
1549 function IonItem(c, r, z) {
1550 this.z = z;
1551 c.detach();
1552 this.el = r.nativeElement;
1553 }
1554 IonItem.ctorParameters = function () { return [
1555 { type: core.ChangeDetectorRef },
1556 { type: core.ElementRef },
1557 { type: core.NgZone }
1558 ]; };
1559 IonItem = __decorate([
1560 ProxyCmp({ inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }),
1561 core.Component({ selector: "ion-item", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] })
1562 ], IonItem);
1563 return IonItem;
1564 }());
1565 var IonItemDivider = /** @class */ (function () {
1566 function IonItemDivider(c, r, z) {
1567 this.z = z;
1568 c.detach();
1569 this.el = r.nativeElement;
1570 }
1571 IonItemDivider.ctorParameters = function () { return [
1572 { type: core.ChangeDetectorRef },
1573 { type: core.ElementRef },
1574 { type: core.NgZone }
1575 ]; };
1576 IonItemDivider = __decorate([
1577 ProxyCmp({ inputs: ["color", "mode", "sticky"] }),
1578 core.Component({ selector: "ion-item-divider", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "sticky"] })
1579 ], IonItemDivider);
1580 return IonItemDivider;
1581 }());
1582 var IonItemGroup = /** @class */ (function () {
1583 function IonItemGroup(c, r, z) {
1584 this.z = z;
1585 c.detach();
1586 this.el = r.nativeElement;
1587 }
1588 IonItemGroup.ctorParameters = function () { return [
1589 { type: core.ChangeDetectorRef },
1590 { type: core.ElementRef },
1591 { type: core.NgZone }
1592 ]; };
1593 IonItemGroup = __decorate([
1594 core.Component({ selector: "ion-item-group", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1595 ], IonItemGroup);
1596 return IonItemGroup;
1597 }());
1598 var IonItemOption = /** @class */ (function () {
1599 function IonItemOption(c, r, z) {
1600 this.z = z;
1601 c.detach();
1602 this.el = r.nativeElement;
1603 }
1604 IonItemOption.ctorParameters = function () { return [
1605 { type: core.ChangeDetectorRef },
1606 { type: core.ElementRef },
1607 { type: core.NgZone }
1608 ]; };
1609 IonItemOption = __decorate([
1610 ProxyCmp({ inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"] }),
1611 core.Component({ selector: "ion-item-option", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "download", "expandable", "href", "mode", "rel", "target", "type"] })
1612 ], IonItemOption);
1613 return IonItemOption;
1614 }());
1615 var IonItemOptions = /** @class */ (function () {
1616 function IonItemOptions(c, r, z) {
1617 this.z = z;
1618 c.detach();
1619 this.el = r.nativeElement;
1620 proxyOutputs(this, this.el, ["ionSwipe"]);
1621 }
1622 IonItemOptions.ctorParameters = function () { return [
1623 { type: core.ChangeDetectorRef },
1624 { type: core.ElementRef },
1625 { type: core.NgZone }
1626 ]; };
1627 IonItemOptions = __decorate([
1628 ProxyCmp({ inputs: ["side"] }),
1629 core.Component({ selector: "ion-item-options", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["side"] })
1630 ], IonItemOptions);
1631 return IonItemOptions;
1632 }());
1633 var IonItemSliding = /** @class */ (function () {
1634 function IonItemSliding(c, r, z) {
1635 this.z = z;
1636 c.detach();
1637 this.el = r.nativeElement;
1638 proxyOutputs(this, this.el, ["ionDrag"]);
1639 }
1640 IonItemSliding.ctorParameters = function () { return [
1641 { type: core.ChangeDetectorRef },
1642 { type: core.ElementRef },
1643 { type: core.NgZone }
1644 ]; };
1645 IonItemSliding = __decorate([
1646 ProxyCmp({ inputs: ["disabled"], "methods": ["getOpenAmount", "getSlidingRatio", "open", "close", "closeOpened"] }),
1647 core.Component({ selector: "ion-item-sliding", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled"] })
1648 ], IonItemSliding);
1649 return IonItemSliding;
1650 }());
1651 var IonLabel = /** @class */ (function () {
1652 function IonLabel(c, r, z) {
1653 this.z = z;
1654 c.detach();
1655 this.el = r.nativeElement;
1656 }
1657 IonLabel.ctorParameters = function () { return [
1658 { type: core.ChangeDetectorRef },
1659 { type: core.ElementRef },
1660 { type: core.NgZone }
1661 ]; };
1662 IonLabel = __decorate([
1663 ProxyCmp({ inputs: ["color", "mode", "position"] }),
1664 core.Component({ selector: "ion-label", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "position"] })
1665 ], IonLabel);
1666 return IonLabel;
1667 }());
1668 var IonList = /** @class */ (function () {
1669 function IonList(c, r, z) {
1670 this.z = z;
1671 c.detach();
1672 this.el = r.nativeElement;
1673 }
1674 IonList.ctorParameters = function () { return [
1675 { type: core.ChangeDetectorRef },
1676 { type: core.ElementRef },
1677 { type: core.NgZone }
1678 ]; };
1679 IonList = __decorate([
1680 ProxyCmp({ inputs: ["inset", "lines", "mode"], "methods": ["closeSlidingItems"] }),
1681 core.Component({ selector: "ion-list", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["inset", "lines", "mode"] })
1682 ], IonList);
1683 return IonList;
1684 }());
1685 var IonListHeader = /** @class */ (function () {
1686 function IonListHeader(c, r, z) {
1687 this.z = z;
1688 c.detach();
1689 this.el = r.nativeElement;
1690 }
1691 IonListHeader.ctorParameters = function () { return [
1692 { type: core.ChangeDetectorRef },
1693 { type: core.ElementRef },
1694 { type: core.NgZone }
1695 ]; };
1696 IonListHeader = __decorate([
1697 ProxyCmp({ inputs: ["color", "lines", "mode"] }),
1698 core.Component({ selector: "ion-list-header", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "lines", "mode"] })
1699 ], IonListHeader);
1700 return IonListHeader;
1701 }());
1702 var IonMenu = /** @class */ (function () {
1703 function IonMenu(c, r, z) {
1704 this.z = z;
1705 c.detach();
1706 this.el = r.nativeElement;
1707 proxyOutputs(this, this.el, ["ionWillOpen", "ionWillClose", "ionDidOpen", "ionDidClose"]);
1708 }
1709 IonMenu.ctorParameters = function () { return [
1710 { type: core.ChangeDetectorRef },
1711 { type: core.ElementRef },
1712 { type: core.NgZone }
1713 ]; };
1714 IonMenu = __decorate([
1715 ProxyCmp({ inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"], "methods": ["isOpen", "isActive", "open", "close", "toggle", "setOpen"] }),
1716 core.Component({ selector: "ion-menu", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["contentId", "disabled", "maxEdgeStart", "menuId", "side", "swipeGesture", "type"] })
1717 ], IonMenu);
1718 return IonMenu;
1719 }());
1720 var IonMenuButton = /** @class */ (function () {
1721 function IonMenuButton(c, r, z) {
1722 this.z = z;
1723 c.detach();
1724 this.el = r.nativeElement;
1725 }
1726 IonMenuButton.ctorParameters = function () { return [
1727 { type: core.ChangeDetectorRef },
1728 { type: core.ElementRef },
1729 { type: core.NgZone }
1730 ]; };
1731 IonMenuButton = __decorate([
1732 ProxyCmp({ inputs: ["autoHide", "color", "disabled", "menu", "mode", "type"] }),
1733 core.Component({ selector: "ion-menu-button", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["autoHide", "color", "disabled", "menu", "mode", "type"] })
1734 ], IonMenuButton);
1735 return IonMenuButton;
1736 }());
1737 var IonMenuToggle = /** @class */ (function () {
1738 function IonMenuToggle(c, r, z) {
1739 this.z = z;
1740 c.detach();
1741 this.el = r.nativeElement;
1742 }
1743 IonMenuToggle.ctorParameters = function () { return [
1744 { type: core.ChangeDetectorRef },
1745 { type: core.ElementRef },
1746 { type: core.NgZone }
1747 ]; };
1748 IonMenuToggle = __decorate([
1749 ProxyCmp({ inputs: ["autoHide", "menu"] }),
1750 core.Component({ selector: "ion-menu-toggle", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["autoHide", "menu"] })
1751 ], IonMenuToggle);
1752 return IonMenuToggle;
1753 }());
1754 var IonNav = /** @class */ (function () {
1755 function IonNav(c, r, z) {
1756 this.z = z;
1757 c.detach();
1758 this.el = r.nativeElement;
1759 proxyOutputs(this, this.el, ["ionNavWillChange", "ionNavDidChange"]);
1760 }
1761 IonNav.ctorParameters = function () { return [
1762 { type: core.ChangeDetectorRef },
1763 { type: core.ElementRef },
1764 { type: core.NgZone }
1765 ]; };
1766 IonNav = __decorate([
1767 ProxyCmp({ inputs: ["animated", "animation", "root", "rootParams", "swipeGesture"], "methods": ["push", "insert", "insertPages", "pop", "popTo", "popToRoot", "removeIndex", "setRoot", "setPages", "getActive", "getByIndex", "canGoBack", "getPrevious"] }),
1768 core.Component({ selector: "ion-nav", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated", "animation", "root", "rootParams", "swipeGesture"] })
1769 ], IonNav);
1770 return IonNav;
1771 }());
1772 var IonNavLink = /** @class */ (function () {
1773 function IonNavLink(c, r, z) {
1774 this.z = z;
1775 c.detach();
1776 this.el = r.nativeElement;
1777 }
1778 IonNavLink.ctorParameters = function () { return [
1779 { type: core.ChangeDetectorRef },
1780 { type: core.ElementRef },
1781 { type: core.NgZone }
1782 ]; };
1783 IonNavLink = __decorate([
1784 ProxyCmp({ inputs: ["component", "componentProps", "routerAnimation", "routerDirection"] }),
1785 core.Component({ selector: "ion-nav-link", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["component", "componentProps", "routerAnimation", "routerDirection"] })
1786 ], IonNavLink);
1787 return IonNavLink;
1788 }());
1789 var IonNote = /** @class */ (function () {
1790 function IonNote(c, r, z) {
1791 this.z = z;
1792 c.detach();
1793 this.el = r.nativeElement;
1794 }
1795 IonNote.ctorParameters = function () { return [
1796 { type: core.ChangeDetectorRef },
1797 { type: core.ElementRef },
1798 { type: core.NgZone }
1799 ]; };
1800 IonNote = __decorate([
1801 ProxyCmp({ inputs: ["color", "mode"] }),
1802 core.Component({ selector: "ion-note", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
1803 ], IonNote);
1804 return IonNote;
1805 }());
1806 var IonProgressBar = /** @class */ (function () {
1807 function IonProgressBar(c, r, z) {
1808 this.z = z;
1809 c.detach();
1810 this.el = r.nativeElement;
1811 }
1812 IonProgressBar.ctorParameters = function () { return [
1813 { type: core.ChangeDetectorRef },
1814 { type: core.ElementRef },
1815 { type: core.NgZone }
1816 ]; };
1817 IonProgressBar = __decorate([
1818 ProxyCmp({ inputs: ["buffer", "color", "mode", "reversed", "type", "value"] }),
1819 core.Component({ selector: "ion-progress-bar", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["buffer", "color", "mode", "reversed", "type", "value"] })
1820 ], IonProgressBar);
1821 return IonProgressBar;
1822 }());
1823 var IonRadio = /** @class */ (function () {
1824 function IonRadio(c, r, z) {
1825 this.z = z;
1826 c.detach();
1827 this.el = r.nativeElement;
1828 proxyOutputs(this, this.el, ["ionFocus", "ionBlur"]);
1829 }
1830 IonRadio.ctorParameters = function () { return [
1831 { type: core.ChangeDetectorRef },
1832 { type: core.ElementRef },
1833 { type: core.NgZone }
1834 ]; };
1835 IonRadio = __decorate([
1836 ProxyCmp({ inputs: ["color", "disabled", "mode", "name", "value"] }),
1837 core.Component({ selector: "ion-radio", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "mode", "name", "value"] })
1838 ], IonRadio);
1839 return IonRadio;
1840 }());
1841 var IonRadioGroup = /** @class */ (function () {
1842 function IonRadioGroup(c, r, z) {
1843 this.z = z;
1844 c.detach();
1845 this.el = r.nativeElement;
1846 proxyOutputs(this, this.el, ["ionChange"]);
1847 }
1848 IonRadioGroup.ctorParameters = function () { return [
1849 { type: core.ChangeDetectorRef },
1850 { type: core.ElementRef },
1851 { type: core.NgZone }
1852 ]; };
1853 IonRadioGroup = __decorate([
1854 ProxyCmp({ inputs: ["allowEmptySelection", "name", "value"] }),
1855 core.Component({ selector: "ion-radio-group", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["allowEmptySelection", "name", "value"] })
1856 ], IonRadioGroup);
1857 return IonRadioGroup;
1858 }());
1859 var IonRange = /** @class */ (function () {
1860 function IonRange(c, r, z) {
1861 this.z = z;
1862 c.detach();
1863 this.el = r.nativeElement;
1864 proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
1865 }
1866 IonRange.ctorParameters = function () { return [
1867 { type: core.ChangeDetectorRef },
1868 { type: core.ElementRef },
1869 { type: core.NgZone }
1870 ]; };
1871 IonRange = __decorate([
1872 ProxyCmp({ inputs: ["color", "debounce", "disabled", "dualKnobs", "max", "min", "mode", "name", "pin", "snaps", "step", "ticks", "value"] }),
1873 core.Component({ selector: "ion-range", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "debounce", "disabled", "dualKnobs", "max", "min", "mode", "name", "pin", "snaps", "step", "ticks", "value"] })
1874 ], IonRange);
1875 return IonRange;
1876 }());
1877 var IonRefresher = /** @class */ (function () {
1878 function IonRefresher(c, r, z) {
1879 this.z = z;
1880 c.detach();
1881 this.el = r.nativeElement;
1882 proxyOutputs(this, this.el, ["ionRefresh", "ionPull", "ionStart"]);
1883 }
1884 IonRefresher.ctorParameters = function () { return [
1885 { type: core.ChangeDetectorRef },
1886 { type: core.ElementRef },
1887 { type: core.NgZone }
1888 ]; };
1889 IonRefresher = __decorate([
1890 ProxyCmp({ inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"], "methods": ["complete", "cancel", "getProgress"] }),
1891 core.Component({ selector: "ion-refresher", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] })
1892 ], IonRefresher);
1893 return IonRefresher;
1894 }());
1895 var IonRefresherContent = /** @class */ (function () {
1896 function IonRefresherContent(c, r, z) {
1897 this.z = z;
1898 c.detach();
1899 this.el = r.nativeElement;
1900 }
1901 IonRefresherContent.ctorParameters = function () { return [
1902 { type: core.ChangeDetectorRef },
1903 { type: core.ElementRef },
1904 { type: core.NgZone }
1905 ]; };
1906 IonRefresherContent = __decorate([
1907 ProxyCmp({ inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }),
1908 core.Component({ selector: "ion-refresher-content", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] })
1909 ], IonRefresherContent);
1910 return IonRefresherContent;
1911 }());
1912 var IonReorder = /** @class */ (function () {
1913 function IonReorder(c, r, z) {
1914 this.z = z;
1915 c.detach();
1916 this.el = r.nativeElement;
1917 }
1918 IonReorder.ctorParameters = function () { return [
1919 { type: core.ChangeDetectorRef },
1920 { type: core.ElementRef },
1921 { type: core.NgZone }
1922 ]; };
1923 IonReorder = __decorate([
1924 core.Component({ selector: "ion-reorder", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1925 ], IonReorder);
1926 return IonReorder;
1927 }());
1928 var IonReorderGroup = /** @class */ (function () {
1929 function IonReorderGroup(c, r, z) {
1930 this.z = z;
1931 c.detach();
1932 this.el = r.nativeElement;
1933 proxyOutputs(this, this.el, ["ionItemReorder"]);
1934 }
1935 IonReorderGroup.ctorParameters = function () { return [
1936 { type: core.ChangeDetectorRef },
1937 { type: core.ElementRef },
1938 { type: core.NgZone }
1939 ]; };
1940 IonReorderGroup = __decorate([
1941 ProxyCmp({ inputs: ["disabled"], "methods": ["complete"] }),
1942 core.Component({ selector: "ion-reorder-group", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled"] })
1943 ], IonReorderGroup);
1944 return IonReorderGroup;
1945 }());
1946 var IonRippleEffect = /** @class */ (function () {
1947 function IonRippleEffect(c, r, z) {
1948 this.z = z;
1949 c.detach();
1950 this.el = r.nativeElement;
1951 }
1952 IonRippleEffect.ctorParameters = function () { return [
1953 { type: core.ChangeDetectorRef },
1954 { type: core.ElementRef },
1955 { type: core.NgZone }
1956 ]; };
1957 IonRippleEffect = __decorate([
1958 ProxyCmp({ inputs: ["type"], "methods": ["addRipple"] }),
1959 core.Component({ selector: "ion-ripple-effect", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["type"] })
1960 ], IonRippleEffect);
1961 return IonRippleEffect;
1962 }());
1963 var IonRow = /** @class */ (function () {
1964 function IonRow(c, r, z) {
1965 this.z = z;
1966 c.detach();
1967 this.el = r.nativeElement;
1968 }
1969 IonRow.ctorParameters = function () { return [
1970 { type: core.ChangeDetectorRef },
1971 { type: core.ElementRef },
1972 { type: core.NgZone }
1973 ]; };
1974 IonRow = __decorate([
1975 core.Component({ selector: "ion-row", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
1976 ], IonRow);
1977 return IonRow;
1978 }());
1979 var IonSearchbar = /** @class */ (function () {
1980 function IonSearchbar(c, r, z) {
1981 this.z = z;
1982 c.detach();
1983 this.el = r.nativeElement;
1984 proxyOutputs(this, this.el, ["ionInput", "ionChange", "ionCancel", "ionClear", "ionBlur", "ionFocus"]);
1985 }
1986 IonSearchbar.ctorParameters = function () { return [
1987 { type: core.ChangeDetectorRef },
1988 { type: core.ElementRef },
1989 { type: core.NgZone }
1990 ]; };
1991 IonSearchbar = __decorate([
1992 ProxyCmp({ inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "spellcheck", "type", "value"], "methods": ["setFocus", "getInputElement"] }),
1993 core.Component({ selector: "ion-searchbar", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "spellcheck", "type", "value"] })
1994 ], IonSearchbar);
1995 return IonSearchbar;
1996 }());
1997 var IonSegment = /** @class */ (function () {
1998 function IonSegment(c, r, z) {
1999 this.z = z;
2000 c.detach();
2001 this.el = r.nativeElement;
2002 proxyOutputs(this, this.el, ["ionChange"]);
2003 }
2004 IonSegment.ctorParameters = function () { return [
2005 { type: core.ChangeDetectorRef },
2006 { type: core.ElementRef },
2007 { type: core.NgZone }
2008 ]; };
2009 IonSegment = __decorate([
2010 ProxyCmp({ inputs: ["color", "disabled", "mode", "scrollable", "value"] }),
2011 core.Component({ selector: "ion-segment", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "disabled", "mode", "scrollable", "value"] })
2012 ], IonSegment);
2013 return IonSegment;
2014 }());
2015 var IonSegmentButton = /** @class */ (function () {
2016 function IonSegmentButton(c, r, z) {
2017 this.z = z;
2018 c.detach();
2019 this.el = r.nativeElement;
2020 }
2021 IonSegmentButton.ctorParameters = function () { return [
2022 { type: core.ChangeDetectorRef },
2023 { type: core.ElementRef },
2024 { type: core.NgZone }
2025 ]; };
2026 IonSegmentButton = __decorate([
2027 ProxyCmp({ inputs: ["disabled", "layout", "mode", "type", "value"] }),
2028 core.Component({ selector: "ion-segment-button", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "layout", "mode", "type", "value"] })
2029 ], IonSegmentButton);
2030 return IonSegmentButton;
2031 }());
2032 var IonSelect = /** @class */ (function () {
2033 function IonSelect(c, r, z) {
2034 this.z = z;
2035 c.detach();
2036 this.el = r.nativeElement;
2037 proxyOutputs(this, this.el, ["ionChange", "ionCancel", "ionFocus", "ionBlur"]);
2038 }
2039 IonSelect.ctorParameters = function () { return [
2040 { type: core.ChangeDetectorRef },
2041 { type: core.ElementRef },
2042 { type: core.NgZone }
2043 ]; };
2044 IonSelect = __decorate([
2045 ProxyCmp({ inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"], "methods": ["open"] }),
2046 core.Component({ selector: "ion-select", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"] })
2047 ], IonSelect);
2048 return IonSelect;
2049 }());
2050 var IonSelectOption = /** @class */ (function () {
2051 function IonSelectOption(c, r, z) {
2052 this.z = z;
2053 c.detach();
2054 this.el = r.nativeElement;
2055 }
2056 IonSelectOption.ctorParameters = function () { return [
2057 { type: core.ChangeDetectorRef },
2058 { type: core.ElementRef },
2059 { type: core.NgZone }
2060 ]; };
2061 IonSelectOption = __decorate([
2062 ProxyCmp({ inputs: ["disabled", "value"] }),
2063 core.Component({ selector: "ion-select-option", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "value"] })
2064 ], IonSelectOption);
2065 return IonSelectOption;
2066 }());
2067 var IonSkeletonText = /** @class */ (function () {
2068 function IonSkeletonText(c, r, z) {
2069 this.z = z;
2070 c.detach();
2071 this.el = r.nativeElement;
2072 }
2073 IonSkeletonText.ctorParameters = function () { return [
2074 { type: core.ChangeDetectorRef },
2075 { type: core.ElementRef },
2076 { type: core.NgZone }
2077 ]; };
2078 IonSkeletonText = __decorate([
2079 ProxyCmp({ inputs: ["animated"] }),
2080 core.Component({ selector: "ion-skeleton-text", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated"] })
2081 ], IonSkeletonText);
2082 return IonSkeletonText;
2083 }());
2084 var IonSlide = /** @class */ (function () {
2085 function IonSlide(c, r, z) {
2086 this.z = z;
2087 c.detach();
2088 this.el = r.nativeElement;
2089 }
2090 IonSlide.ctorParameters = function () { return [
2091 { type: core.ChangeDetectorRef },
2092 { type: core.ElementRef },
2093 { type: core.NgZone }
2094 ]; };
2095 IonSlide = __decorate([
2096 core.Component({ selector: "ion-slide", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
2097 ], IonSlide);
2098 return IonSlide;
2099 }());
2100 var IonSlides = /** @class */ (function () {
2101 function IonSlides(c, r, z) {
2102 this.z = z;
2103 c.detach();
2104 this.el = r.nativeElement;
2105 proxyOutputs(this, this.el, ["ionSlidesDidLoad", "ionSlideTap", "ionSlideDoubleTap", "ionSlideWillChange", "ionSlideDidChange", "ionSlideNextStart", "ionSlidePrevStart", "ionSlideNextEnd", "ionSlidePrevEnd", "ionSlideTransitionStart", "ionSlideTransitionEnd", "ionSlideDrag", "ionSlideReachStart", "ionSlideReachEnd", "ionSlideTouchStart", "ionSlideTouchEnd"]);
2106 }
2107 IonSlides.ctorParameters = function () { return [
2108 { type: core.ChangeDetectorRef },
2109 { type: core.ElementRef },
2110 { type: core.NgZone }
2111 ]; };
2112 IonSlides = __decorate([
2113 ProxyCmp({ inputs: ["mode", "options", "pager", "scrollbar"], "methods": ["update", "updateAutoHeight", "slideTo", "slideNext", "slidePrev", "getActiveIndex", "getPreviousIndex", "length", "isEnd", "isBeginning", "startAutoplay", "stopAutoplay", "lockSwipeToNext", "lockSwipeToPrev", "lockSwipes", "getSwiper"] }),
2114 core.Component({ selector: "ion-slides", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["mode", "options", "pager", "scrollbar"] })
2115 ], IonSlides);
2116 return IonSlides;
2117 }());
2118 var IonSpinner = /** @class */ (function () {
2119 function IonSpinner(c, r, z) {
2120 this.z = z;
2121 c.detach();
2122 this.el = r.nativeElement;
2123 }
2124 IonSpinner.ctorParameters = function () { return [
2125 { type: core.ChangeDetectorRef },
2126 { type: core.ElementRef },
2127 { type: core.NgZone }
2128 ]; };
2129 IonSpinner = __decorate([
2130 ProxyCmp({ inputs: ["color", "duration", "name", "paused"] }),
2131 core.Component({ selector: "ion-spinner", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "duration", "name", "paused"] })
2132 ], IonSpinner);
2133 return IonSpinner;
2134 }());
2135 var IonSplitPane = /** @class */ (function () {
2136 function IonSplitPane(c, r, z) {
2137 this.z = z;
2138 c.detach();
2139 this.el = r.nativeElement;
2140 proxyOutputs(this, this.el, ["ionSplitPaneVisible"]);
2141 }
2142 IonSplitPane.ctorParameters = function () { return [
2143 { type: core.ChangeDetectorRef },
2144 { type: core.ElementRef },
2145 { type: core.NgZone }
2146 ]; };
2147 IonSplitPane = __decorate([
2148 ProxyCmp({ inputs: ["contentId", "disabled", "when"] }),
2149 core.Component({ selector: "ion-split-pane", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["contentId", "disabled", "when"] })
2150 ], IonSplitPane);
2151 return IonSplitPane;
2152 }());
2153 var IonTabBar = /** @class */ (function () {
2154 function IonTabBar(c, r, z) {
2155 this.z = z;
2156 c.detach();
2157 this.el = r.nativeElement;
2158 }
2159 IonTabBar.ctorParameters = function () { return [
2160 { type: core.ChangeDetectorRef },
2161 { type: core.ElementRef },
2162 { type: core.NgZone }
2163 ]; };
2164 IonTabBar = __decorate([
2165 ProxyCmp({ inputs: ["color", "mode", "selectedTab", "translucent"] }),
2166 core.Component({ selector: "ion-tab-bar", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode", "selectedTab", "translucent"] })
2167 ], IonTabBar);
2168 return IonTabBar;
2169 }());
2170 var IonTabButton = /** @class */ (function () {
2171 function IonTabButton(c, r, z) {
2172 this.z = z;
2173 c.detach();
2174 this.el = r.nativeElement;
2175 }
2176 IonTabButton.ctorParameters = function () { return [
2177 { type: core.ChangeDetectorRef },
2178 { type: core.ElementRef },
2179 { type: core.NgZone }
2180 ]; };
2181 IonTabButton = __decorate([
2182 ProxyCmp({ inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] }),
2183 core.Component({ selector: "ion-tab-button", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] })
2184 ], IonTabButton);
2185 return IonTabButton;
2186 }());
2187 var IonText = /** @class */ (function () {
2188 function IonText(c, r, z) {
2189 this.z = z;
2190 c.detach();
2191 this.el = r.nativeElement;
2192 }
2193 IonText.ctorParameters = function () { return [
2194 { type: core.ChangeDetectorRef },
2195 { type: core.ElementRef },
2196 { type: core.NgZone }
2197 ]; };
2198 IonText = __decorate([
2199 ProxyCmp({ inputs: ["color", "mode"] }),
2200 core.Component({ selector: "ion-text", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
2201 ], IonText);
2202 return IonText;
2203 }());
2204 var IonTextarea = /** @class */ (function () {
2205 function IonTextarea(c, r, z) {
2206 this.z = z;
2207 c.detach();
2208 this.el = r.nativeElement;
2209 proxyOutputs(this, this.el, ["ionChange", "ionInput", "ionBlur", "ionFocus"]);
2210 }
2211 IonTextarea.ctorParameters = function () { return [
2212 { type: core.ChangeDetectorRef },
2213 { type: core.ElementRef },
2214 { type: core.NgZone }
2215 ]; };
2216 IonTextarea = __decorate([
2217 ProxyCmp({ inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "value", "wrap"], "methods": ["setFocus", "getInputElement"] }),
2218 core.Component({ selector: "ion-textarea", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "debounce", "disabled", "enterkeyhint", "inputmode", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "spellcheck", "value", "wrap"] })
2219 ], IonTextarea);
2220 return IonTextarea;
2221 }());
2222 var IonThumbnail = /** @class */ (function () {
2223 function IonThumbnail(c, r, z) {
2224 this.z = z;
2225 c.detach();
2226 this.el = r.nativeElement;
2227 }
2228 IonThumbnail.ctorParameters = function () { return [
2229 { type: core.ChangeDetectorRef },
2230 { type: core.ElementRef },
2231 { type: core.NgZone }
2232 ]; };
2233 IonThumbnail = __decorate([
2234 core.Component({ selector: "ion-thumbnail", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>" })
2235 ], IonThumbnail);
2236 return IonThumbnail;
2237 }());
2238 var IonTitle = /** @class */ (function () {
2239 function IonTitle(c, r, z) {
2240 this.z = z;
2241 c.detach();
2242 this.el = r.nativeElement;
2243 }
2244 IonTitle.ctorParameters = function () { return [
2245 { type: core.ChangeDetectorRef },
2246 { type: core.ElementRef },
2247 { type: core.NgZone }
2248 ]; };
2249 IonTitle = __decorate([
2250 ProxyCmp({ inputs: ["color", "size"] }),
2251 core.Component({ selector: "ion-title", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "size"] })
2252 ], IonTitle);
2253 return IonTitle;
2254 }());
2255 var IonToggle = /** @class */ (function () {
2256 function IonToggle(c, r, z) {
2257 this.z = z;
2258 c.detach();
2259 this.el = r.nativeElement;
2260 proxyOutputs(this, this.el, ["ionChange", "ionFocus", "ionBlur"]);
2261 }
2262 IonToggle.ctorParameters = function () { return [
2263 { type: core.ChangeDetectorRef },
2264 { type: core.ElementRef },
2265 { type: core.NgZone }
2266 ]; };
2267 IonToggle = __decorate([
2268 ProxyCmp({ inputs: ["checked", "color", "disabled", "mode", "name", "value"] }),
2269 core.Component({ selector: "ion-toggle", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["checked", "color", "disabled", "mode", "name", "value"] })
2270 ], IonToggle);
2271 return IonToggle;
2272 }());
2273 var IonToolbar = /** @class */ (function () {
2274 function IonToolbar(c, r, z) {
2275 this.z = z;
2276 c.detach();
2277 this.el = r.nativeElement;
2278 }
2279 IonToolbar.ctorParameters = function () { return [
2280 { type: core.ChangeDetectorRef },
2281 { type: core.ElementRef },
2282 { type: core.NgZone }
2283 ]; };
2284 IonToolbar = __decorate([
2285 ProxyCmp({ inputs: ["color", "mode"] }),
2286 core.Component({ selector: "ion-toolbar", changeDetection: core.ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["color", "mode"] })
2287 ], IonToolbar);
2288 return IonToolbar;
2289 }());
2290
2291 var Config = /** @class */ (function () {
2292 function Config() {
2293 }
2294 Config.prototype.get = function (key, fallback) {
2295 var c = getConfig();
2296 if (c) {
2297 return c.get(key, fallback);
2298 }
2299 return null;
2300 };
2301 Config.prototype.getBoolean = function (key, fallback) {
2302 var c = getConfig();
2303 if (c) {
2304 return c.getBoolean(key, fallback);
2305 }
2306 return false;
2307 };
2308 Config.prototype.getNumber = function (key, fallback) {
2309 var c = getConfig();
2310 if (c) {
2311 return c.getNumber(key, fallback);
2312 }
2313 return 0;
2314 };
2315 Config.prototype.set = function (key, value) {
2316 console.warn("[DEPRECATION][Config]: The Config.set() method is deprecated and will be removed in Ionic Framework 6.0. Please see https://ionicframework.com/docs/angular/config for alternatives.");
2317 var c = getConfig();
2318 if (c) {
2319 c.set(key, value);
2320 }
2321 };
2322 Config.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function Config_Factory() { return new Config(); }, token: Config, providedIn: "root" });
2323 Config = __decorate([
2324 core.Injectable({
2325 providedIn: 'root'
2326 })
2327 ], Config);
2328 return Config;
2329 }());
2330 var ConfigToken = new core.InjectionToken('USERCONFIG');
2331 var getConfig = function () {
2332 if (typeof window !== 'undefined') {
2333 var Ionic = window.Ionic;
2334 if (Ionic && Ionic.config) {
2335 return Ionic.config;
2336 }
2337 }
2338 return null;
2339 };
2340 var ɵ0$3 = getConfig;
2341
2342 /**
2343 * @description
2344 * NavParams are an object that exists on a page and can contain data for that particular view.
2345 * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
2346 * option with a simple `get` method.
2347 *
2348 * @usage
2349 * ```ts
2350 * import { NavParams } from '@ionic/angular';
2351 *
2352 * export class MyClass{
2353 *
2354 * constructor(navParams: NavParams){
2355 * // userParams is an object we have in our nav-parameters
2356 * navParams.get('userParams');
2357 * }
2358 *
2359 * }
2360 * ```
2361 */
2362 var NavParams = /** @class */ (function () {
2363 function NavParams(data) {
2364 if (data === void 0) { data = {}; }
2365 this.data = data;
2366 }
2367 /**
2368 * Get the value of a nav-parameter for the current view
2369 *
2370 * ```ts
2371 * import { NavParams } from 'ionic-angular';
2372 *
2373 * export class MyClass{
2374 * constructor(public navParams: NavParams){
2375 * // userParams is an object we have in our nav-parameters
2376 * this.navParams.get('userParams');
2377 * }
2378 * }
2379 * ```
2380 *
2381 * @param param Which param you want to look up
2382 */
2383 NavParams.prototype.get = function (param) {
2384 return this.data[param];
2385 };
2386 return NavParams;
2387 }());
2388
2389 var AngularDelegate = /** @class */ (function () {
2390 function AngularDelegate(zone, appRef) {
2391 this.zone = zone;
2392 this.appRef = appRef;
2393 }
2394 AngularDelegate.prototype.create = function (resolver, injector, location) {
2395 return new AngularFrameworkDelegate(resolver, injector, location, this.appRef, this.zone);
2396 };
2397 AngularDelegate.ctorParameters = function () { return [
2398 { type: core.NgZone },
2399 { type: core.ApplicationRef }
2400 ]; };
2401 AngularDelegate = __decorate([
2402 core.Injectable()
2403 ], AngularDelegate);
2404 return AngularDelegate;
2405 }());
2406 var AngularFrameworkDelegate = /** @class */ (function () {
2407 function AngularFrameworkDelegate(resolver, injector, location, appRef, zone) {
2408 this.resolver = resolver;
2409 this.injector = injector;
2410 this.location = location;
2411 this.appRef = appRef;
2412 this.zone = zone;
2413 this.elRefMap = new WeakMap();
2414 this.elEventsMap = new WeakMap();
2415 }
2416 AngularFrameworkDelegate.prototype.attachViewToDom = function (container, component, params, cssClasses) {
2417 var _this = this;
2418 return this.zone.run(function () {
2419 return new Promise(function (resolve) {
2420 var el = attachView(_this.zone, _this.resolver, _this.injector, _this.location, _this.appRef, _this.elRefMap, _this.elEventsMap, container, component, params, cssClasses);
2421 resolve(el);
2422 });
2423 });
2424 };
2425 AngularFrameworkDelegate.prototype.removeViewFromDom = function (_container, component) {
2426 var _this = this;
2427 return this.zone.run(function () {
2428 return new Promise(function (resolve) {
2429 var componentRef = _this.elRefMap.get(component);
2430 if (componentRef) {
2431 componentRef.destroy();
2432 _this.elRefMap.delete(component);
2433 var unbindEvents = _this.elEventsMap.get(component);
2434 if (unbindEvents) {
2435 unbindEvents();
2436 _this.elEventsMap.delete(component);
2437 }
2438 }
2439 resolve();
2440 });
2441 });
2442 };
2443 return AngularFrameworkDelegate;
2444 }());
2445 var attachView = function (zone, resolver, injector, location, appRef, elRefMap, elEventsMap, container, component, params, cssClasses) {
2446 var e_1, _a;
2447 var factory = resolver.resolveComponentFactory(component);
2448 var childInjector = core.Injector.create({
2449 providers: getProviders(params),
2450 parent: injector
2451 });
2452 var componentRef = (location)
2453 ? location.createComponent(factory, location.length, childInjector)
2454 : factory.create(childInjector);
2455 var instance = componentRef.instance;
2456 var hostElement = componentRef.location.nativeElement;
2457 if (params) {
2458 Object.assign(instance, params);
2459 }
2460 if (cssClasses) {
2461 try {
2462 for (var cssClasses_1 = __values(cssClasses), cssClasses_1_1 = cssClasses_1.next(); !cssClasses_1_1.done; cssClasses_1_1 = cssClasses_1.next()) {
2463 var clazz = cssClasses_1_1.value;
2464 hostElement.classList.add(clazz);
2465 }
2466 }
2467 catch (e_1_1) { e_1 = { error: e_1_1 }; }
2468 finally {
2469 try {
2470 if (cssClasses_1_1 && !cssClasses_1_1.done && (_a = cssClasses_1.return)) _a.call(cssClasses_1);
2471 }
2472 finally { if (e_1) throw e_1.error; }
2473 }
2474 }
2475 var unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
2476 container.appendChild(hostElement);
2477 if (!location) {
2478 appRef.attachView(componentRef.hostView);
2479 }
2480 componentRef.changeDetectorRef.reattach();
2481 elRefMap.set(hostElement, componentRef);
2482 elEventsMap.set(hostElement, unbindEvents);
2483 return hostElement;
2484 };
2485 var LIFECYCLES = [
2486 core$1.LIFECYCLE_WILL_ENTER,
2487 core$1.LIFECYCLE_DID_ENTER,
2488 core$1.LIFECYCLE_WILL_LEAVE,
2489 core$1.LIFECYCLE_DID_LEAVE,
2490 core$1.LIFECYCLE_WILL_UNLOAD
2491 ];
2492 var bindLifecycleEvents = function (zone, instance, element) {
2493 return zone.run(function () {
2494 var unregisters = LIFECYCLES
2495 .filter(function (eventName) { return typeof instance[eventName] === 'function'; })
2496 .map(function (eventName) {
2497 var handler = function (ev) { return instance[eventName](ev.detail); };
2498 element.addEventListener(eventName, handler);
2499 return function () { return element.removeEventListener(eventName, handler); };
2500 });
2501 return function () { return unregisters.forEach(function (fn) { return fn(); }); };
2502 });
2503 };
2504 var NavParamsToken = new core.InjectionToken('NavParamsToken');
2505 var getProviders = function (params) {
2506 return [
2507 {
2508 provide: NavParamsToken, useValue: params
2509 },
2510 {
2511 provide: NavParams, useFactory: provideNavParamsInjectable, deps: [NavParamsToken]
2512 }
2513 ];
2514 };
2515 var ɵ0$4 = getProviders;
2516 var provideNavParamsInjectable = function (params) {
2517 return new NavParams(params);
2518 };
2519 var ɵ1$2 = provideNavParamsInjectable;
2520
2521 var insertView = function (views, view, direction) {
2522 if (direction === 'root') {
2523 return setRoot(views, view);
2524 }
2525 else if (direction === 'forward') {
2526 return setForward(views, view);
2527 }
2528 else {
2529 return setBack(views, view);
2530 }
2531 };
2532 var setRoot = function (views, view) {
2533 views = views.filter(function (v) { return v.stackId !== view.stackId; });
2534 views.push(view);
2535 return views;
2536 };
2537 var ɵ0$5 = setRoot;
2538 var setForward = function (views, view) {
2539 var index = views.indexOf(view);
2540 if (index >= 0) {
2541 views = views.filter(function (v) { return v.stackId !== view.stackId || v.id <= view.id; });
2542 }
2543 else {
2544 views.push(view);
2545 }
2546 return views;
2547 };
2548 var ɵ1$3 = setForward;
2549 var setBack = function (views, view) {
2550 var index = views.indexOf(view);
2551 if (index >= 0) {
2552 return views.filter(function (v) { return v.stackId !== view.stackId || v.id <= view.id; });
2553 }
2554 else {
2555 return setRoot(views, view);
2556 }
2557 };
2558 var ɵ2$1 = setBack;
2559 var getUrl = function (router, activatedRoute) {
2560 var urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });
2561 return router.serializeUrl(urlTree);
2562 };
2563 var isTabSwitch = function (enteringView, leavingView) {
2564 if (!leavingView) {
2565 return true;
2566 }
2567 return enteringView.stackId !== leavingView.stackId;
2568 };
2569 var computeStackId = function (prefixUrl, url) {
2570 if (!prefixUrl) {
2571 return undefined;
2572 }
2573 var segments = toSegments(url);
2574 for (var i = 0; i < segments.length; i++) {
2575 if (i >= prefixUrl.length) {
2576 return segments[i];
2577 }
2578 if (segments[i] !== prefixUrl[i]) {
2579 return undefined;
2580 }
2581 }
2582 return undefined;
2583 };
2584 var toSegments = function (path) {
2585 return path
2586 .split('/')
2587 .map(function (s) { return s.trim(); })
2588 .filter(function (s) { return s !== ''; });
2589 };
2590 var destroyView = function (view) {
2591 if (view) {
2592 // TODO lifecycle event
2593 view.ref.destroy();
2594 view.unlistenEvents();
2595 }
2596 };
2597
2598 var StackController = /** @class */ (function () {
2599 function StackController(tabsPrefix, containerEl, router, navCtrl, zone, location) {
2600 this.containerEl = containerEl;
2601 this.router = router;
2602 this.navCtrl = navCtrl;
2603 this.zone = zone;
2604 this.location = location;
2605 this.views = [];
2606 this.skipTransition = false;
2607 this.nextId = 0;
2608 this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;
2609 }
2610 StackController.prototype.createView = function (ref, activatedRoute) {
2611 var url = getUrl(this.router, activatedRoute);
2612 var element = (ref && ref.location && ref.location.nativeElement);
2613 var unlistenEvents = bindLifecycleEvents(this.zone, ref.instance, element);
2614 return {
2615 id: this.nextId++,
2616 stackId: computeStackId(this.tabsPrefix, url),
2617 unlistenEvents: unlistenEvents,
2618 element: element,
2619 ref: ref,
2620 url: url,
2621 };
2622 };
2623 StackController.prototype.getExistingView = function (activatedRoute) {
2624 var activatedUrlKey = getUrl(this.router, activatedRoute);
2625 var view = this.views.find(function (vw) { return vw.url === activatedUrlKey; });
2626 if (view) {
2627 view.ref.changeDetectorRef.reattach();
2628 }
2629 return view;
2630 };
2631 StackController.prototype.setActive = function (enteringView) {
2632 var _this = this;
2633 var consumeResult = this.navCtrl.consumeTransition();
2634 var direction = consumeResult.direction, animation = consumeResult.animation, animationBuilder = consumeResult.animationBuilder;
2635 var leavingView = this.activeView;
2636 var tabSwitch = isTabSwitch(enteringView, leavingView);
2637 if (tabSwitch) {
2638 direction = 'back';
2639 animation = undefined;
2640 }
2641 var viewsSnapshot = this.views.slice();
2642 var currentNavigation;
2643 var router = this.router;
2644 // Angular >= 7.2.0
2645 if (router.getCurrentNavigation) {
2646 currentNavigation = router.getCurrentNavigation();
2647 // Angular < 7.2.0
2648 }
2649 else if (router.navigations &&
2650 router.navigations.value) {
2651 currentNavigation = router.navigations.value;
2652 }
2653 /**
2654 * If the navigation action
2655 * sets `replaceUrl: true`
2656 * then we need to make sure
2657 * we remove the last item
2658 * from our views stack
2659 */
2660 if (currentNavigation &&
2661 currentNavigation.extras &&
2662 currentNavigation.extras.replaceUrl) {
2663 if (this.views.length > 0) {
2664 this.views.splice(-1, 1);
2665 }
2666 }
2667 var reused = this.views.includes(enteringView);
2668 var views = this.insertView(enteringView, direction);
2669 // Trigger change detection before transition starts
2670 // This will call ngOnInit() the first time too, just after the view
2671 // was attached to the dom, but BEFORE the transition starts
2672 if (!reused) {
2673 enteringView.ref.changeDetectorRef.detectChanges();
2674 }
2675 /**
2676 * If we are going back from a page that
2677 * was presented using a custom animation
2678 * we should default to using that
2679 * unless the developer explicitly
2680 * provided another animation.
2681 */
2682 var customAnimation = enteringView.animationBuilder;
2683 if (animationBuilder === undefined &&
2684 direction === 'back' &&
2685 !tabSwitch &&
2686 customAnimation !== undefined) {
2687 animationBuilder = customAnimation;
2688 }
2689 /**
2690 * Save any custom animation so that navigating
2691 * back will use this custom animation by default.
2692 */
2693 if (leavingView) {
2694 leavingView.animationBuilder = animationBuilder;
2695 }
2696 // Wait until previous transitions finish
2697 return this.zone.runOutsideAngular(function () {
2698 return _this.wait(function () {
2699 // disconnect leaving page from change detection to
2700 // reduce jank during the page transition
2701 if (leavingView) {
2702 leavingView.ref.changeDetectorRef.detach();
2703 }
2704 // In case the enteringView is the same as the leavingPage we need to reattach()
2705 enteringView.ref.changeDetectorRef.reattach();
2706 return _this.transition(enteringView, leavingView, animation, _this.canGoBack(1), false, animationBuilder)
2707 .then(function () { return cleanupAsync(enteringView, views, viewsSnapshot, _this.location); })
2708 .then(function () { return ({
2709 enteringView: enteringView,
2710 direction: direction,
2711 animation: animation,
2712 tabSwitch: tabSwitch
2713 }); });
2714 });
2715 });
2716 };
2717 StackController.prototype.canGoBack = function (deep, stackId) {
2718 if (stackId === void 0) { stackId = this.getActiveStackId(); }
2719 return this.getStack(stackId).length > deep;
2720 };
2721 StackController.prototype.pop = function (deep, stackId) {
2722 var _this = this;
2723 if (stackId === void 0) { stackId = this.getActiveStackId(); }
2724 return this.zone.run(function () {
2725 var views = _this.getStack(stackId);
2726 if (views.length <= deep) {
2727 return Promise.resolve(false);
2728 }
2729 var view = views[views.length - deep - 1];
2730 var url = view.url;
2731 var viewSavedData = view.savedData;
2732 if (viewSavedData) {
2733 var primaryOutlet = viewSavedData.get('primary');
2734 if (primaryOutlet &&
2735 primaryOutlet.route &&
2736 primaryOutlet.route._routerState &&
2737 primaryOutlet.route._routerState.snapshot &&
2738 primaryOutlet.route._routerState.snapshot.url) {
2739 url = primaryOutlet.route._routerState.snapshot.url;
2740 }
2741 }
2742 var animationBuilder = _this.navCtrl.consumeTransition().animationBuilder;
2743 return _this.navCtrl.navigateBack(url, __assign({}, view.savedExtras, { animation: animationBuilder })).then(function () { return true; });
2744 });
2745 };
2746 StackController.prototype.startBackTransition = function () {
2747 var _this = this;
2748 var leavingView = this.activeView;
2749 if (leavingView) {
2750 var views = this.getStack(leavingView.stackId);
2751 var enteringView_1 = views[views.length - 2];
2752 var customAnimation_1 = enteringView_1.animationBuilder;
2753 return this.wait(function () {
2754 return _this.transition(enteringView_1, // entering view
2755 leavingView, // leaving view
2756 'back', _this.canGoBack(2), true, customAnimation_1);
2757 });
2758 }
2759 return Promise.resolve();
2760 };
2761 StackController.prototype.endBackTransition = function (shouldComplete) {
2762 if (shouldComplete) {
2763 this.skipTransition = true;
2764 this.pop(1);
2765 }
2766 else if (this.activeView) {
2767 cleanup(this.activeView, this.views, this.views, this.location);
2768 }
2769 };
2770 StackController.prototype.getLastUrl = function (stackId) {
2771 var views = this.getStack(stackId);
2772 return views.length > 0 ? views[views.length - 1] : undefined;
2773 };
2774 /**
2775 * @internal
2776 */
2777 StackController.prototype.getRootUrl = function (stackId) {
2778 var views = this.getStack(stackId);
2779 return views.length > 0 ? views[0] : undefined;
2780 };
2781 StackController.prototype.getActiveStackId = function () {
2782 return this.activeView ? this.activeView.stackId : undefined;
2783 };
2784 StackController.prototype.destroy = function () {
2785 this.containerEl = undefined;
2786 this.views.forEach(destroyView);
2787 this.activeView = undefined;
2788 this.views = [];
2789 };
2790 StackController.prototype.getStack = function (stackId) {
2791 return this.views.filter(function (v) { return v.stackId === stackId; });
2792 };
2793 StackController.prototype.insertView = function (enteringView, direction) {
2794 this.activeView = enteringView;
2795 this.views = insertView(this.views, enteringView, direction);
2796 return this.views.slice();
2797 };
2798 StackController.prototype.transition = function (enteringView, leavingView, direction, showGoBack, progressAnimation, animationBuilder) {
2799 if (this.skipTransition) {
2800 this.skipTransition = false;
2801 return Promise.resolve(false);
2802 }
2803 if (leavingView === enteringView) {
2804 return Promise.resolve(false);
2805 }
2806 var enteringEl = enteringView ? enteringView.element : undefined;
2807 var leavingEl = leavingView ? leavingView.element : undefined;
2808 var containerEl = this.containerEl;
2809 if (enteringEl && enteringEl !== leavingEl) {
2810 enteringEl.classList.add('ion-page');
2811 enteringEl.classList.add('ion-page-invisible');
2812 if (enteringEl.parentElement !== containerEl) {
2813 containerEl.appendChild(enteringEl);
2814 }
2815 if (containerEl.commit) {
2816 return containerEl.commit(enteringEl, leavingEl, {
2817 deepWait: true,
2818 duration: direction === undefined ? 0 : undefined,
2819 direction: direction,
2820 showGoBack: showGoBack,
2821 progressAnimation: progressAnimation,
2822 animationBuilder: animationBuilder
2823 });
2824 }
2825 }
2826 return Promise.resolve(false);
2827 };
2828 StackController.prototype.wait = function (task) {
2829 return __awaiter(this, void 0, void 0, function () {
2830 var promise;
2831 return __generator(this, function (_a) {
2832 switch (_a.label) {
2833 case 0:
2834 if (!(this.runningTask !== undefined)) return [3 /*break*/, 2];
2835 return [4 /*yield*/, this.runningTask];
2836 case 1:
2837 _a.sent();
2838 this.runningTask = undefined;
2839 _a.label = 2;
2840 case 2:
2841 promise = this.runningTask = task();
2842 return [2 /*return*/, promise];
2843 }
2844 });
2845 });
2846 };
2847 return StackController;
2848 }());
2849 var cleanupAsync = function (activeRoute, views, viewsSnapshot, location) {
2850 if (typeof requestAnimationFrame === 'function') {
2851 return new Promise(function (resolve) {
2852 requestAnimationFrame(function () {
2853 cleanup(activeRoute, views, viewsSnapshot, location);
2854 resolve();
2855 });
2856 });
2857 }
2858 return Promise.resolve();
2859 };
2860 var ɵ0$6 = cleanupAsync;
2861 var cleanup = function (activeRoute, views, viewsSnapshot, location) {
2862 viewsSnapshot
2863 .filter(function (view) { return !views.includes(view); })
2864 .forEach(destroyView);
2865 views.forEach(function (view) {
2866 /**
2867 * In the event that a user navigated multiple
2868 * times in rapid succession, we want to make sure
2869 * we don't pre-emptively detach a view while
2870 * it is in mid-transition.
2871 *
2872 * In this instance we also do not care about query
2873 * params or fragments as it will be the same view regardless
2874 */
2875 var locationWithoutParams = location.path().split('?')[0];
2876 var locationWithoutFragment = locationWithoutParams.split('#')[0];
2877 if (view !== activeRoute && view.url !== locationWithoutFragment) {
2878 var element = view.element;
2879 element.setAttribute('aria-hidden', 'true');
2880 element.classList.add('ion-page-hidden');
2881 view.ref.changeDetectorRef.detach();
2882 }
2883 });
2884 };
2885 var ɵ1$4 = cleanup;
2886
2887 var IonRouterOutlet = /** @class */ (function () {
2888 function IonRouterOutlet(parentContexts, location, resolver, name, tabs, config, navCtrl, commonLocation, elementRef, router$1, zone, activatedRoute, parentOutlet) {
2889 this.parentContexts = parentContexts;
2890 this.location = location;
2891 this.resolver = resolver;
2892 this.config = config;
2893 this.navCtrl = navCtrl;
2894 this.parentOutlet = parentOutlet;
2895 this.activated = null;
2896 this.activatedView = null;
2897 this._activatedRoute = null;
2898 // Maintain map of activated route proxies for each component instance
2899 this.proxyMap = new WeakMap();
2900 // Keep the latest activated route in a subject for the proxy routes to switch map to
2901 this.currentActivatedRoute$ = new rxjs.BehaviorSubject(null);
2902 this.stackEvents = new core.EventEmitter();
2903 this.activateEvents = new core.EventEmitter();
2904 this.deactivateEvents = new core.EventEmitter();
2905 this.nativeEl = elementRef.nativeElement;
2906 this.name = name || router.PRIMARY_OUTLET;
2907 this.tabsPrefix = tabs === 'true' ? getUrl(router$1, activatedRoute) : undefined;
2908 this.stackCtrl = new StackController(this.tabsPrefix, this.nativeEl, router$1, navCtrl, zone, commonLocation);
2909 parentContexts.onChildOutletCreated(this.name, this);
2910 }
2911 Object.defineProperty(IonRouterOutlet.prototype, "animation", {
2912 set: function (animation) {
2913 this.nativeEl.animation = animation;
2914 },
2915 enumerable: true,
2916 configurable: true
2917 });
2918 Object.defineProperty(IonRouterOutlet.prototype, "animated", {
2919 set: function (animated) {
2920 this.nativeEl.animated = animated;
2921 },
2922 enumerable: true,
2923 configurable: true
2924 });
2925 Object.defineProperty(IonRouterOutlet.prototype, "swipeGesture", {
2926 set: function (swipe) {
2927 var _this = this;
2928 this._swipeGesture = swipe;
2929 this.nativeEl.swipeHandler = swipe ? {
2930 canStart: function () { return _this.stackCtrl.canGoBack(1); },
2931 onStart: function () { return _this.stackCtrl.startBackTransition(); },
2932 onEnd: function (shouldContinue) { return _this.stackCtrl.endBackTransition(shouldContinue); }
2933 } : undefined;
2934 },
2935 enumerable: true,
2936 configurable: true
2937 });
2938 IonRouterOutlet.prototype.ngOnDestroy = function () {
2939 this.stackCtrl.destroy();
2940 };
2941 IonRouterOutlet.prototype.getContext = function () {
2942 return this.parentContexts.getContext(this.name);
2943 };
2944 IonRouterOutlet.prototype.ngOnInit = function () {
2945 var _this = this;
2946 if (!this.activated) {
2947 // If the outlet was not instantiated at the time the route got activated we need to populate
2948 // the outlet when it is initialized (ie inside a NgIf)
2949 var context = this.getContext();
2950 if (context && context.route) {
2951 this.activateWith(context.route, context.resolver || null);
2952 }
2953 }
2954 if (this.nativeEl.componentOnReady) {
2955 this.nativeEl.componentOnReady().then(function () {
2956 if (_this._swipeGesture === undefined) {
2957 _this.swipeGesture = _this.config.getBoolean('swipeBackEnabled', _this.nativeEl.mode === 'ios');
2958 }
2959 });
2960 }
2961 };
2962 Object.defineProperty(IonRouterOutlet.prototype, "isActivated", {
2963 get: function () {
2964 return !!this.activated;
2965 },
2966 enumerable: true,
2967 configurable: true
2968 });
2969 Object.defineProperty(IonRouterOutlet.prototype, "component", {
2970 get: function () {
2971 if (!this.activated) {
2972 throw new Error('Outlet is not activated');
2973 }
2974 return this.activated.instance;
2975 },
2976 enumerable: true,
2977 configurable: true
2978 });
2979 Object.defineProperty(IonRouterOutlet.prototype, "activatedRoute", {
2980 get: function () {
2981 if (!this.activated) {
2982 throw new Error('Outlet is not activated');
2983 }
2984 return this._activatedRoute;
2985 },
2986 enumerable: true,
2987 configurable: true
2988 });
2989 Object.defineProperty(IonRouterOutlet.prototype, "activatedRouteData", {
2990 get: function () {
2991 if (this._activatedRoute) {
2992 return this._activatedRoute.snapshot.data;
2993 }
2994 return {};
2995 },
2996 enumerable: true,
2997 configurable: true
2998 });
2999 /**
3000 * Called when the `RouteReuseStrategy` instructs to detach the subtree
3001 */
3002 IonRouterOutlet.prototype.detach = function () {
3003 throw new Error('incompatible reuse strategy');
3004 };
3005 /**
3006 * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
3007 */
3008 IonRouterOutlet.prototype.attach = function (_ref, _activatedRoute) {
3009 throw new Error('incompatible reuse strategy');
3010 };
3011 IonRouterOutlet.prototype.deactivate = function () {
3012 if (this.activated) {
3013 if (this.activatedView) {
3014 this.activatedView.savedData = new Map(this.getContext().children['contexts']);
3015 /**
3016 * Ensure we are saving the NavigationExtras
3017 * data otherwise it will be lost
3018 */
3019 this.activatedView.savedExtras = {};
3020 var context = this.getContext();
3021 if (context.route) {
3022 var contextSnapshot = context.route.snapshot;
3023 this.activatedView.savedExtras.queryParams = contextSnapshot.queryParams;
3024 this.activatedView.savedExtras.fragment = contextSnapshot.fragment;
3025 }
3026 }
3027 var c = this.component;
3028 this.activatedView = null;
3029 this.activated = null;
3030 this._activatedRoute = null;
3031 this.deactivateEvents.emit(c);
3032 }
3033 };
3034 IonRouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {
3035 var _this = this;
3036 if (this.isActivated) {
3037 throw new Error('Cannot activate an already activated outlet');
3038 }
3039 this._activatedRoute = activatedRoute;
3040 var cmpRef;
3041 var enteringView = this.stackCtrl.getExistingView(activatedRoute);
3042 if (enteringView) {
3043 cmpRef = this.activated = enteringView.ref;
3044 var saved = enteringView.savedData;
3045 if (saved) {
3046 // self-restore
3047 var context = this.getContext();
3048 context.children['contexts'] = saved;
3049 }
3050 // Updated activated route proxy for this component
3051 this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);
3052 }
3053 else {
3054 var snapshot = activatedRoute._futureSnapshot;
3055 var component = snapshot.routeConfig.component;
3056 resolver = resolver || this.resolver;
3057 var factory = resolver.resolveComponentFactory(component);
3058 var childContexts = this.parentContexts.getOrCreateContext(this.name).children;
3059 // We create an activated route proxy object that will maintain future updates for this component
3060 // over its lifecycle in the stack.
3061 var component$ = new rxjs.BehaviorSubject(null);
3062 var activatedRouteProxy = this.createActivatedRouteProxy(component$, activatedRoute);
3063 var injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
3064 cmpRef = this.activated = this.location.createComponent(factory, this.location.length, injector);
3065 // Once the component is created we can push it to our local subject supplied to the proxy
3066 component$.next(cmpRef.instance);
3067 // Calling `markForCheck` to make sure we will run the change detection when the
3068 // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
3069 enteringView = this.stackCtrl.createView(this.activated, activatedRoute);
3070 // Store references to the proxy by component
3071 this.proxyMap.set(cmpRef.instance, activatedRouteProxy);
3072 this.currentActivatedRoute$.next({ component: cmpRef.instance, activatedRoute: activatedRoute });
3073 }
3074 this.activatedView = enteringView;
3075 this.stackCtrl.setActive(enteringView).then(function (data) {
3076 _this.navCtrl.setTopOutlet(_this);
3077 _this.activateEvents.emit(cmpRef.instance);
3078 _this.stackEvents.emit(data);
3079 });
3080 };
3081 /**
3082 * Returns `true` if there are pages in the stack to go back.
3083 */
3084 IonRouterOutlet.prototype.canGoBack = function (deep, stackId) {
3085 if (deep === void 0) { deep = 1; }
3086 return this.stackCtrl.canGoBack(deep, stackId);
3087 };
3088 /**
3089 * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.
3090 */
3091 IonRouterOutlet.prototype.pop = function (deep, stackId) {
3092 if (deep === void 0) { deep = 1; }
3093 return this.stackCtrl.pop(deep, stackId);
3094 };
3095 /**
3096 * Returns the URL of the active page of each stack.
3097 */
3098 IonRouterOutlet.prototype.getLastUrl = function (stackId) {
3099 var active = this.stackCtrl.getLastUrl(stackId);
3100 return active ? active.url : undefined;
3101 };
3102 /**
3103 * Returns the RouteView of the active page of each stack.
3104 * @internal
3105 */
3106 IonRouterOutlet.prototype.getLastRouteView = function (stackId) {
3107 return this.stackCtrl.getLastUrl(stackId);
3108 };
3109 /**
3110 * Returns the root view in the tab stack.
3111 * @internal
3112 */
3113 IonRouterOutlet.prototype.getRootView = function (stackId) {
3114 return this.stackCtrl.getRootUrl(stackId);
3115 };
3116 /**
3117 * Returns the active stack ID. In the context of ion-tabs, it means the active tab.
3118 */
3119 IonRouterOutlet.prototype.getActiveStackId = function () {
3120 return this.stackCtrl.getActiveStackId();
3121 };
3122 /**
3123 * Since the activated route can change over the life time of a component in an ion router outlet, we create
3124 * a proxy so that we can update the values over time as a user navigates back to components already in the stack.
3125 */
3126 IonRouterOutlet.prototype.createActivatedRouteProxy = function (component$, activatedRoute) {
3127 var proxy = new router.ActivatedRoute();
3128 proxy._futureSnapshot = activatedRoute._futureSnapshot;
3129 proxy._routerState = activatedRoute._routerState;
3130 proxy.snapshot = activatedRoute.snapshot;
3131 proxy.outlet = activatedRoute.outlet;
3132 proxy.component = activatedRoute.component;
3133 // Setup wrappers for the observables so consumers don't have to worry about switching to new observables as the state updates
3134 proxy._paramMap = this.proxyObservable(component$, 'paramMap');
3135 proxy._queryParamMap = this.proxyObservable(component$, 'queryParamMap');
3136 proxy.url = this.proxyObservable(component$, 'url');
3137 proxy.params = this.proxyObservable(component$, 'params');
3138 proxy.queryParams = this.proxyObservable(component$, 'queryParams');
3139 proxy.fragment = this.proxyObservable(component$, 'fragment');
3140 proxy.data = this.proxyObservable(component$, 'data');
3141 return proxy;
3142 };
3143 /**
3144 * Create a wrapped observable that will switch to the latest activated route matched by the given component
3145 */
3146 IonRouterOutlet.prototype.proxyObservable = function (component$, path) {
3147 var _this = this;
3148 return component$.pipe(
3149 // First wait until the component instance is pushed
3150 operators.filter(function (component) { return !!component; }), operators.switchMap(function (component) {
3151 return _this.currentActivatedRoute$.pipe(operators.filter(function (current) { return current !== null && current.component === component; }), operators.switchMap(function (current) { return current && current.activatedRoute[path]; }), operators.distinctUntilChanged());
3152 }));
3153 };
3154 /**
3155 * Updates the activated route proxy for the given component to the new incoming router state
3156 */
3157 IonRouterOutlet.prototype.updateActivatedRouteProxy = function (component, activatedRoute) {
3158 var proxy = this.proxyMap.get(component);
3159 if (!proxy) {
3160 throw new Error("Could not find activated route proxy for view");
3161 }
3162 proxy._futureSnapshot = activatedRoute._futureSnapshot;
3163 proxy._routerState = activatedRoute._routerState;
3164 proxy.snapshot = activatedRoute.snapshot;
3165 proxy.outlet = activatedRoute.outlet;
3166 proxy.component = activatedRoute.component;
3167 this.currentActivatedRoute$.next({ component: component, activatedRoute: activatedRoute });
3168 };
3169 IonRouterOutlet.ctorParameters = function () { return [
3170 { type: router.ChildrenOutletContexts },
3171 { type: core.ViewContainerRef },
3172 { type: core.ComponentFactoryResolver },
3173 { type: String, decorators: [{ type: core.Attribute, args: ['name',] }] },
3174 { type: String, decorators: [{ type: core.Optional }, { type: core.Attribute, args: ['tabs',] }] },
3175 { type: Config },
3176 { type: NavController },
3177 { type: common.Location },
3178 { type: core.ElementRef },
3179 { type: router.Router },
3180 { type: core.NgZone },
3181 { type: router.ActivatedRoute },
3182 { type: IonRouterOutlet, decorators: [{ type: core.SkipSelf }, { type: core.Optional }] }
3183 ]; };
3184 __decorate([
3185 core.Output()
3186 ], IonRouterOutlet.prototype, "stackEvents", void 0);
3187 __decorate([
3188 core.Output('activate')
3189 ], IonRouterOutlet.prototype, "activateEvents", void 0);
3190 __decorate([
3191 core.Output('deactivate')
3192 ], IonRouterOutlet.prototype, "deactivateEvents", void 0);
3193 IonRouterOutlet = __decorate([
3194 core.Directive({
3195 selector: 'ion-router-outlet',
3196 exportAs: 'outlet',
3197 inputs: ['animated', 'animation', 'swipeGesture']
3198 }),
3199 __param(3, core.Attribute('name')),
3200 __param(4, core.Optional()), __param(4, core.Attribute('tabs')),
3201 __param(12, core.SkipSelf()), __param(12, core.Optional())
3202 ], IonRouterOutlet);
3203 return IonRouterOutlet;
3204 }());
3205 var OutletInjector = /** @class */ (function () {
3206 function OutletInjector(route, childContexts, parent) {
3207 this.route = route;
3208 this.childContexts = childContexts;
3209 this.parent = parent;
3210 }
3211 OutletInjector.prototype.get = function (token, notFoundValue) {
3212 if (token === router.ActivatedRoute) {
3213 return this.route;
3214 }
3215 if (token === router.ChildrenOutletContexts) {
3216 return this.childContexts;
3217 }
3218 // tslint:disable-next-line
3219 return this.parent.get(token, notFoundValue);
3220 };
3221 return OutletInjector;
3222 }());
3223
3224 var IonTabs = /** @class */ (function () {
3225 function IonTabs(navCtrl) {
3226 this.navCtrl = navCtrl;
3227 this.ionTabsWillChange = new core.EventEmitter();
3228 this.ionTabsDidChange = new core.EventEmitter();
3229 }
3230 /**
3231 * @internal
3232 */
3233 IonTabs.prototype.onPageSelected = function (detail) {
3234 var stackId = detail.enteringView.stackId;
3235 if (detail.tabSwitch && stackId !== undefined) {
3236 if (this.tabBar) {
3237 this.tabBar.selectedTab = stackId;
3238 }
3239 this.ionTabsWillChange.emit({ tab: stackId });
3240 this.ionTabsDidChange.emit({ tab: stackId });
3241 }
3242 };
3243 /**
3244 * When a tab button is clicked, there are several scenarios:
3245 * 1. If the selected tab is currently active (the tab button has been clicked
3246 * again), then it should go to the root view for that tab.
3247 *
3248 * a. Get the saved root view from the router outlet. If the saved root view
3249 * matches the tabRootUrl, set the route view to this view including the
3250 * navigation extras.
3251 * b. If the saved root view from the router outlet does
3252 * not match, navigate to the tabRootUrl. No navigation extras are
3253 * included.
3254 *
3255 * 2. If the current tab tab is not currently selected, get the last route
3256 * view from the router outlet.
3257 *
3258 * a. If the last route view exists, navigate to that view including any
3259 * navigation extras
3260 * b. If the last route view doesn't exist, then navigate
3261 * to the default tabRootUrl
3262 */
3263 IonTabs.prototype.select = function (tab) {
3264 var alreadySelected = this.outlet.getActiveStackId() === tab;
3265 var tabRootUrl = this.outlet.tabsPrefix + "/" + tab;
3266 if (alreadySelected) {
3267 var activeStackId = this.outlet.getActiveStackId();
3268 var activeView = this.outlet.getLastRouteView(activeStackId);
3269 // If on root tab, do not navigate to root tab again
3270 if (activeView.url === tabRootUrl) {
3271 return;
3272 }
3273 var rootView = this.outlet.getRootView(tab);
3274 var navigationExtras = rootView && tabRootUrl === rootView.url && rootView.savedExtras;
3275 return this.navCtrl.navigateRoot(tabRootUrl, __assign({}, (navigationExtras), { animated: true, animationDirection: 'back' }));
3276 }
3277 else {
3278 var lastRoute = this.outlet.getLastRouteView(tab);
3279 /**
3280 * If there is a lastRoute, goto that, otherwise goto the fallback url of the
3281 * selected tab
3282 */
3283 var url = lastRoute && lastRoute.url || tabRootUrl;
3284 var navigationExtras = lastRoute && lastRoute.savedExtras;
3285 return this.navCtrl.navigateRoot(url, __assign({}, (navigationExtras), { animated: true, animationDirection: 'back' }));
3286 }
3287 };
3288 IonTabs.prototype.getSelected = function () {
3289 return this.outlet.getActiveStackId();
3290 };
3291 IonTabs.ctorParameters = function () { return [
3292 { type: NavController }
3293 ]; };
3294 __decorate([
3295 core.ViewChild('outlet', { read: IonRouterOutlet, static: false })
3296 ], IonTabs.prototype, "outlet", void 0);
3297 __decorate([
3298 core.ContentChild(IonTabBar, { static: false })
3299 ], IonTabs.prototype, "tabBar", void 0);
3300 __decorate([
3301 core.Output()
3302 ], IonTabs.prototype, "ionTabsWillChange", void 0);
3303 __decorate([
3304 core.Output()
3305 ], IonTabs.prototype, "ionTabsDidChange", void 0);
3306 __decorate([
3307 core.HostListener('ionTabButtonClick', ['$event.detail.tab'])
3308 ], IonTabs.prototype, "select", null);
3309 IonTabs = __decorate([
3310 core.Component({
3311 selector: 'ion-tabs',
3312 template: "\n <ng-content select=\"[slot=top]\"></ng-content>\n <div class=\"tabs-inner\">\n <ion-router-outlet #outlet tabs=\"true\" (stackEvents)=\"onPageSelected($event)\"></ion-router-outlet>\n </div>\n <ng-content></ng-content>",
3313 styles: ["\n :host {\n display: flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n flex-direction: column;\n\n width: 100%;\n height: 100%;\n\n contain: layout size style;\n z-index: $z-index-page-container;\n }\n .tabs-inner {\n position: relative;\n\n flex: 1;\n\n contain: layout size style;\n }"]
3314 })
3315 ], IonTabs);
3316 return IonTabs;
3317 }());
3318
3319 var IonBackButtonDelegate = /** @class */ (function () {
3320 function IonBackButtonDelegate(routerOutlet, navCtrl, config) {
3321 this.routerOutlet = routerOutlet;
3322 this.navCtrl = navCtrl;
3323 this.config = config;
3324 }
3325 /**
3326 * @internal
3327 */
3328 IonBackButtonDelegate.prototype.onClick = function (ev) {
3329 var defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');
3330 if (this.routerOutlet && this.routerOutlet.canGoBack()) {
3331 this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);
3332 this.routerOutlet.pop();
3333 ev.preventDefault();
3334 }
3335 else if (defaultHref != null) {
3336 this.navCtrl.navigateBack(defaultHref, { animation: this.routerAnimation });
3337 ev.preventDefault();
3338 }
3339 };
3340 IonBackButtonDelegate.ctorParameters = function () { return [
3341 { type: IonRouterOutlet, decorators: [{ type: core.Optional }] },
3342 { type: NavController },
3343 { type: Config }
3344 ]; };
3345 __decorate([
3346 core.HostListener('click', ['$event'])
3347 ], IonBackButtonDelegate.prototype, "onClick", null);
3348 IonBackButtonDelegate = __decorate([
3349 core.Directive({
3350 selector: 'ion-back-button',
3351 inputs: ['defaultHref', 'routerAnimation'],
3352 }),
3353 __param(0, core.Optional())
3354 ], IonBackButtonDelegate);
3355 return IonBackButtonDelegate;
3356 }());
3357
3358 var NavDelegate = /** @class */ (function () {
3359 function NavDelegate(ref, resolver, injector, angularDelegate, location) {
3360 this.el = ref.nativeElement;
3361 ref.nativeElement.delegate = angularDelegate.create(resolver, injector, location);
3362 proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);
3363 }
3364 NavDelegate.ctorParameters = function () { return [
3365 { type: core.ElementRef },
3366 { type: core.ComponentFactoryResolver },
3367 { type: core.Injector },
3368 { type: AngularDelegate },
3369 { type: core.ViewContainerRef }
3370 ]; };
3371 NavDelegate = __decorate([
3372 ProxyCmp({
3373 inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
3374 methods: ['push', 'insert', 'insertPages', 'pop', 'popTo', 'popToRoot', 'removeIndex', 'setRoot', 'setPages', 'getActive', 'getByIndex', 'canGoBack', 'getPrevious']
3375 }),
3376 core.Directive({
3377 selector: 'ion-nav'
3378 })
3379 ], NavDelegate);
3380 return NavDelegate;
3381 }());
3382
3383 var RouterLinkDelegate = /** @class */ (function () {
3384 function RouterLinkDelegate(locationStrategy, navCtrl, elementRef, router, routerLink) {
3385 this.locationStrategy = locationStrategy;
3386 this.navCtrl = navCtrl;
3387 this.elementRef = elementRef;
3388 this.router = router;
3389 this.routerLink = routerLink;
3390 this.routerDirection = 'forward';
3391 }
3392 RouterLinkDelegate.prototype.ngOnInit = function () {
3393 this.updateTargetUrlAndHref();
3394 };
3395 RouterLinkDelegate.prototype.ngOnChanges = function () {
3396 this.updateTargetUrlAndHref();
3397 };
3398 RouterLinkDelegate.prototype.ngOnDestroy = function () {
3399 if (this.subscription) {
3400 this.subscription.unsubscribe();
3401 }
3402 };
3403 RouterLinkDelegate.prototype.updateTargetUrlAndHref = function () {
3404 if (this.routerLink) {
3405 var href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));
3406 this.elementRef.nativeElement.href = href;
3407 }
3408 };
3409 /**
3410 * @internal
3411 */
3412 RouterLinkDelegate.prototype.onClick = function (ev) {
3413 this.navCtrl.setDirection(this.routerDirection, undefined, undefined, this.routerAnimation);
3414 ev.preventDefault();
3415 };
3416 RouterLinkDelegate.ctorParameters = function () { return [
3417 { type: common.LocationStrategy },
3418 { type: NavController },
3419 { type: core.ElementRef },
3420 { type: router.Router },
3421 { type: router.RouterLink, decorators: [{ type: core.Optional }] }
3422 ]; };
3423 __decorate([
3424 core.HostListener('click', ['$event'])
3425 ], RouterLinkDelegate.prototype, "onClick", null);
3426 RouterLinkDelegate = __decorate([
3427 core.Directive({
3428 selector: '[routerLink]',
3429 inputs: ['routerDirection', 'routerAnimation']
3430 }),
3431 __param(4, core.Optional())
3432 ], RouterLinkDelegate);
3433 return RouterLinkDelegate;
3434 }());
3435
3436 /**
3437 * @hidden
3438 */
3439 var VirtualFooter = /** @class */ (function () {
3440 function VirtualFooter(templateRef) {
3441 this.templateRef = templateRef;
3442 }
3443 VirtualFooter.ctorParameters = function () { return [
3444 { type: core.TemplateRef }
3445 ]; };
3446 VirtualFooter = __decorate([
3447 core.Directive({ selector: '[virtualFooter]' })
3448 ], VirtualFooter);
3449 return VirtualFooter;
3450 }());
3451
3452 /**
3453 * @hidden
3454 */
3455 var VirtualHeader = /** @class */ (function () {
3456 function VirtualHeader(templateRef) {
3457 this.templateRef = templateRef;
3458 }
3459 VirtualHeader.ctorParameters = function () { return [
3460 { type: core.TemplateRef }
3461 ]; };
3462 VirtualHeader = __decorate([
3463 core.Directive({ selector: '[virtualHeader]' })
3464 ], VirtualHeader);
3465 return VirtualHeader;
3466 }());
3467
3468 /**
3469 * @hidden
3470 */
3471 var VirtualItem = /** @class */ (function () {
3472 function VirtualItem(templateRef, viewContainer) {
3473 this.templateRef = templateRef;
3474 this.viewContainer = viewContainer;
3475 }
3476 VirtualItem.ctorParameters = function () { return [
3477 { type: core.TemplateRef },
3478 { type: core.ViewContainerRef }
3479 ]; };
3480 VirtualItem = __decorate([
3481 core.Directive({ selector: '[virtualItem]' })
3482 ], VirtualItem);
3483 return VirtualItem;
3484 }());
3485
3486 var IonVirtualScroll = /** @class */ (function () {
3487 function IonVirtualScroll(z, iterableDiffers, elementRef) {
3488 this.z = z;
3489 this.iterableDiffers = iterableDiffers;
3490 this.refMap = new WeakMap();
3491 this.el = elementRef.nativeElement;
3492 this.el.nodeRender = this.nodeRender.bind(this);
3493 }
3494 IonVirtualScroll.prototype.ngOnChanges = function (changes) {
3495 if (this.trackBy && 'items' in changes) {
3496 // React on virtualScroll changes only once all inputs have been initialized
3497 var value = changes['items'].currentValue;
3498 if (this.differ === undefined && value != null) {
3499 try {
3500 this.differ = this.iterableDiffers.find(value).create(this.trackBy);
3501 }
3502 catch (e) {
3503 throw new Error("Cannot find a differ supporting object '" + value + "'. VirtualScroll only supports binding to Iterables such as Arrays.");
3504 }
3505 }
3506 }
3507 };
3508 IonVirtualScroll.prototype.ngDoCheck = function () {
3509 // and if there actually are changes
3510 var changes = this.differ !== undefined && this.items ? this.differ.diff(this.items) : null;
3511 if (changes === null) {
3512 return;
3513 }
3514 // TODO: optimize
3515 this.checkRange(0);
3516 };
3517 IonVirtualScroll.prototype.nodeRender = function (el, cell, index) {
3518 var _this = this;
3519 return this.z.run(function () {
3520 var node;
3521 if (!el) {
3522 node = _this.itmTmp.viewContainer.createEmbeddedView(_this.getComponent(cell.type), { $implicit: cell.value, index: index }, index);
3523 el = getElement(node);
3524 _this.refMap.set(el, node);
3525 }
3526 else {
3527 node = _this.refMap.get(el);
3528 var ctx = node.context;
3529 ctx.$implicit = cell.value;
3530 ctx.index = cell.index;
3531 }
3532 // run sync change detections
3533 node.detectChanges();
3534 return el;
3535 });
3536 };
3537 IonVirtualScroll.prototype.getComponent = function (type) {
3538 switch (type) {
3539 case 'item': return this.itmTmp.templateRef;
3540 case 'header': return this.hdrTmp.templateRef;
3541 case 'footer': return this.ftrTmp.templateRef;
3542 }
3543 throw new Error('template for virtual item was not provided');
3544 };
3545 IonVirtualScroll.ctorParameters = function () { return [
3546 { type: core.NgZone },
3547 { type: core.IterableDiffers },
3548 { type: core.ElementRef }
3549 ]; };
3550 __decorate([
3551 core.ContentChild(VirtualItem, { static: false })
3552 ], IonVirtualScroll.prototype, "itmTmp", void 0);
3553 __decorate([
3554 core.ContentChild(VirtualHeader, { static: false })
3555 ], IonVirtualScroll.prototype, "hdrTmp", void 0);
3556 __decorate([
3557 core.ContentChild(VirtualFooter, { static: false })
3558 ], IonVirtualScroll.prototype, "ftrTmp", void 0);
3559 IonVirtualScroll = __decorate([
3560 ProxyCmp({
3561 inputs: ['approxItemHeight', 'approxHeaderHeight', 'approxFooterHeight', 'headerFn', 'footerFn', 'items', 'itemHeight', 'headerHeight', 'footerHeight'],
3562 methods: ['checkEnd', 'checkRange', 'positionForItem']
3563 }),
3564 core.Component({
3565 selector: 'ion-virtual-scroll',
3566 template: '<ng-content></ng-content>',
3567 changeDetection: core.ChangeDetectionStrategy.OnPush,
3568 inputs: [
3569 'approxItemHeight',
3570 'approxHeaderHeight',
3571 'approxFooterHeight',
3572 'headerFn',
3573 'footerFn',
3574 'items',
3575 'itemHeight',
3576 'headerHeight',
3577 'footerHeight',
3578 'trackBy'
3579 ]
3580 })
3581 ], IonVirtualScroll);
3582 return IonVirtualScroll;
3583 }());
3584 var getElement = function (view) {
3585 var rootNodes = view.rootNodes;
3586 for (var i = 0; i < rootNodes.length; i++) {
3587 if (rootNodes[i].nodeType === 1) {
3588 return rootNodes[i];
3589 }
3590 }
3591 throw new Error('virtual element was not created');
3592 };
3593 var ɵ0$7 = getElement;
3594
3595 var OverlayBaseController = /** @class */ (function () {
3596 function OverlayBaseController(ctrl) {
3597 this.ctrl = ctrl;
3598 }
3599 /**
3600 * Creates a new overlay
3601 */
3602 OverlayBaseController.prototype.create = function (opts) {
3603 // TODO: next major release opts is not optional
3604 return this.ctrl.create((opts || {}));
3605 };
3606 /**
3607 * When `id` is not provided, it dismisses the top overlay.
3608 */
3609 OverlayBaseController.prototype.dismiss = function (data, role, id) {
3610 return this.ctrl.dismiss(data, role, id);
3611 };
3612 /**
3613 * Returns the top overlay.
3614 */
3615 OverlayBaseController.prototype.getTop = function () {
3616 return this.ctrl.getTop();
3617 };
3618 return OverlayBaseController;
3619 }());
3620
3621 var ActionSheetController = /** @class */ (function (_super) {
3622 __extends(ActionSheetController, _super);
3623 function ActionSheetController() {
3624 return _super.call(this, core$1.actionSheetController) || this;
3625 }
3626 ActionSheetController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ActionSheetController_Factory() { return new ActionSheetController(); }, token: ActionSheetController, providedIn: "root" });
3627 ActionSheetController = __decorate([
3628 core.Injectable({
3629 providedIn: 'root',
3630 })
3631 ], ActionSheetController);
3632 return ActionSheetController;
3633 }(OverlayBaseController));
3634
3635 var AlertController = /** @class */ (function (_super) {
3636 __extends(AlertController, _super);
3637 function AlertController() {
3638 return _super.call(this, core$1.alertController) || this;
3639 }
3640 AlertController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AlertController_Factory() { return new AlertController(); }, token: AlertController, providedIn: "root" });
3641 AlertController = __decorate([
3642 core.Injectable({
3643 providedIn: 'root',
3644 })
3645 ], AlertController);
3646 return AlertController;
3647 }(OverlayBaseController));
3648
3649 var LoadingController = /** @class */ (function (_super) {
3650 __extends(LoadingController, _super);
3651 function LoadingController() {
3652 return _super.call(this, core$1.loadingController) || this;
3653 }
3654 LoadingController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LoadingController_Factory() { return new LoadingController(); }, token: LoadingController, providedIn: "root" });
3655 LoadingController = __decorate([
3656 core.Injectable({
3657 providedIn: 'root',
3658 })
3659 ], LoadingController);
3660 return LoadingController;
3661 }(OverlayBaseController));
3662
3663 var MenuController = /** @class */ (function () {
3664 function MenuController() {
3665 }
3666 /**
3667 * Programmatically open the Menu.
3668 * @param [menuId] Optionally get the menu by its id, or side.
3669 * @return returns a promise when the menu is fully opened
3670 */
3671 MenuController.prototype.open = function (menuId) {
3672 return core$1.menuController.open(menuId);
3673 };
3674 /**
3675 * Programmatically close the Menu. If no `menuId` is given as the first
3676 * argument then it'll close any menu which is open. If a `menuId`
3677 * is given then it'll close that exact menu.
3678 * @param [menuId] Optionally get the menu by its id, or side.
3679 * @return returns a promise when the menu is fully closed
3680 */
3681 MenuController.prototype.close = function (menuId) {
3682 return core$1.menuController.close(menuId);
3683 };
3684 /**
3685 * Toggle the menu. If it's closed, it will open, and if opened, it
3686 * will close.
3687 * @param [menuId] Optionally get the menu by its id, or side.
3688 * @return returns a promise when the menu has been toggled
3689 */
3690 MenuController.prototype.toggle = function (menuId) {
3691 return core$1.menuController.toggle(menuId);
3692 };
3693 /**
3694 * Used to enable or disable a menu. For example, there could be multiple
3695 * left menus, but only one of them should be able to be opened at the same
3696 * time. If there are multiple menus on the same side, then enabling one menu
3697 * will also automatically disable all the others that are on the same side.
3698 * @param [menuId] Optionally get the menu by its id, or side.
3699 * @return Returns the instance of the menu, which is useful for chaining.
3700 */
3701 MenuController.prototype.enable = function (shouldEnable, menuId) {
3702 return core$1.menuController.enable(shouldEnable, menuId);
3703 };
3704 /**
3705 * Used to enable or disable the ability to swipe open the menu.
3706 * @param shouldEnable True if it should be swipe-able, false if not.
3707 * @param [menuId] Optionally get the menu by its id, or side.
3708 * @return Returns the instance of the menu, which is useful for chaining.
3709 */
3710 MenuController.prototype.swipeGesture = function (shouldEnable, menuId) {
3711 return core$1.menuController.swipeGesture(shouldEnable, menuId);
3712 };
3713 /**
3714 * @param [menuId] Optionally get the menu by its id, or side.
3715 * @return Returns true if the specified menu is currently open, otherwise false.
3716 * If the menuId is not specified, it returns true if ANY menu is currenly open.
3717 */
3718 MenuController.prototype.isOpen = function (menuId) {
3719 return core$1.menuController.isOpen(menuId);
3720 };
3721 /**
3722 * @param [menuId] Optionally get the menu by its id, or side.
3723 * @return Returns true if the menu is currently enabled, otherwise false.
3724 */
3725 MenuController.prototype.isEnabled = function (menuId) {
3726 return core$1.menuController.isEnabled(menuId);
3727 };
3728 /**
3729 * Used to get a menu instance. If a `menuId` is not provided then it'll
3730 * return the first menu found. If a `menuId` is `left` or `right`, then
3731 * it'll return the enabled menu on that side. Otherwise, if a `menuId` is
3732 * provided, then it'll try to find the menu using the menu's `id`
3733 * property. If a menu is not found then it'll return `null`.
3734 * @param [menuId] Optionally get the menu by its id, or side.
3735 * @return Returns the instance of the menu if found, otherwise `null`.
3736 */
3737 MenuController.prototype.get = function (menuId) {
3738 return core$1.menuController.get(menuId);
3739 };
3740 /**
3741 * @return Returns the instance of the menu already opened, otherwise `null`.
3742 */
3743 MenuController.prototype.getOpen = function () {
3744 return core$1.menuController.getOpen();
3745 };
3746 /**
3747 * @return Returns an array of all menu instances.
3748 */
3749 MenuController.prototype.getMenus = function () {
3750 return core$1.menuController.getMenus();
3751 };
3752 MenuController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MenuController_Factory() { return new MenuController(); }, token: MenuController, providedIn: "root" });
3753 MenuController = __decorate([
3754 core.Injectable({
3755 providedIn: 'root',
3756 })
3757 ], MenuController);
3758 return MenuController;
3759 }());
3760
3761 var PickerController = /** @class */ (function (_super) {
3762 __extends(PickerController, _super);
3763 function PickerController() {
3764 return _super.call(this, core$1.pickerController) || this;
3765 }
3766 PickerController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PickerController_Factory() { return new PickerController(); }, token: PickerController, providedIn: "root" });
3767 PickerController = __decorate([
3768 core.Injectable({
3769 providedIn: 'root',
3770 })
3771 ], PickerController);
3772 return PickerController;
3773 }(OverlayBaseController));
3774
3775 var ModalController = /** @class */ (function (_super) {
3776 __extends(ModalController, _super);
3777 function ModalController(angularDelegate, resolver, injector) {
3778 var _this = _super.call(this, core$1.modalController) || this;
3779 _this.angularDelegate = angularDelegate;
3780 _this.resolver = resolver;
3781 _this.injector = injector;
3782 return _this;
3783 }
3784 ModalController.prototype.create = function (opts) {
3785 return _super.prototype.create.call(this, __assign({}, opts, { delegate: this.angularDelegate.create(this.resolver, this.injector) }));
3786 };
3787 ModalController.ctorParameters = function () { return [
3788 { type: AngularDelegate },
3789 { type: core.ComponentFactoryResolver },
3790 { type: core.Injector }
3791 ]; };
3792 ModalController = __decorate([
3793 core.Injectable()
3794 ], ModalController);
3795 return ModalController;
3796 }(OverlayBaseController));
3797
3798 var PopoverController = /** @class */ (function (_super) {
3799 __extends(PopoverController, _super);
3800 function PopoverController(angularDelegate, resolver, injector) {
3801 var _this = _super.call(this, core$1.popoverController) || this;
3802 _this.angularDelegate = angularDelegate;
3803 _this.resolver = resolver;
3804 _this.injector = injector;
3805 return _this;
3806 }
3807 PopoverController.prototype.create = function (opts) {
3808 return _super.prototype.create.call(this, __assign({}, opts, { delegate: this.angularDelegate.create(this.resolver, this.injector) }));
3809 };
3810 PopoverController.ctorParameters = function () { return [
3811 { type: AngularDelegate },
3812 { type: core.ComponentFactoryResolver },
3813 { type: core.Injector }
3814 ]; };
3815 PopoverController = __decorate([
3816 core.Injectable()
3817 ], PopoverController);
3818 return PopoverController;
3819 }(OverlayBaseController));
3820
3821 var ToastController = /** @class */ (function (_super) {
3822 __extends(ToastController, _super);
3823 function ToastController() {
3824 return _super.call(this, core$1.toastController) || this;
3825 }
3826 ToastController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ToastController_Factory() { return new ToastController(); }, token: ToastController, providedIn: "root" });
3827 ToastController = __decorate([
3828 core.Injectable({
3829 providedIn: 'root',
3830 })
3831 ], ToastController);
3832 return ToastController;
3833 }(OverlayBaseController));
3834
3835 var DomController = /** @class */ (function () {
3836 function DomController() {
3837 }
3838 /**
3839 * Schedules a task to run during the READ phase of the next frame.
3840 * This task should only read the DOM, but never modify it.
3841 */
3842 DomController.prototype.read = function (cb) {
3843 getQueue().read(cb);
3844 };
3845 /**
3846 * Schedules a task to run during the WRITE phase of the next frame.
3847 * This task should write the DOM, but never READ it.
3848 */
3849 DomController.prototype.write = function (cb) {
3850 getQueue().write(cb);
3851 };
3852 DomController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DomController_Factory() { return new DomController(); }, token: DomController, providedIn: "root" });
3853 DomController = __decorate([
3854 core.Injectable({
3855 providedIn: 'root',
3856 })
3857 ], DomController);
3858 return DomController;
3859 }());
3860 var getQueue = function () {
3861 var win = typeof window !== 'undefined' ? window : null;
3862 if (win != null) {
3863 var Ionic = win.Ionic;
3864 if (Ionic && Ionic.queue) {
3865 return Ionic.queue;
3866 }
3867 return {
3868 read: function (cb) { return win.requestAnimationFrame(cb); },
3869 write: function (cb) { return win.requestAnimationFrame(cb); }
3870 };
3871 }
3872 return {
3873 read: function (cb) { return cb(); },
3874 write: function (cb) { return cb(); }
3875 };
3876 };
3877 var ɵ0$8 = getQueue;
3878
3879 var AnimationController = /** @class */ (function () {
3880 function AnimationController() {
3881 }
3882 /**
3883 * Create a new animation
3884 */
3885 AnimationController.prototype.create = function (animationId) {
3886 return core$1.createAnimation(animationId);
3887 };
3888 /**
3889 * EXPERIMENTAL
3890 *
3891 * Given a progression and a cubic bezier function,
3892 * this utility returns the time value(s) at which the
3893 * cubic bezier reaches the given time progression.
3894 *
3895 * If the cubic bezier never reaches the progression
3896 * the result will be an empty array.
3897 *
3898 * This is most useful for switching between easing curves
3899 * when doing a gesture animation (i.e. going from linear easing
3900 * during a drag, to another easing when `progressEnd` is called)
3901 */
3902 AnimationController.prototype.easingTime = function (p0, p1, p2, p3, progression) {
3903 return core$1.getTimeGivenProgression(p0, p1, p2, p3, progression);
3904 };
3905 AnimationController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AnimationController_Factory() { return new AnimationController(); }, token: AnimationController, providedIn: "root" });
3906 AnimationController = __decorate([
3907 core.Injectable({
3908 providedIn: 'root',
3909 })
3910 ], AnimationController);
3911 return AnimationController;
3912 }());
3913
3914 var GestureController = /** @class */ (function () {
3915 function GestureController(zone) {
3916 this.zone = zone;
3917 }
3918 /**
3919 * Create a new gesture
3920 */
3921 GestureController.prototype.create = function (opts, runInsideAngularZone) {
3922 var _this = this;
3923 if (runInsideAngularZone === void 0) { runInsideAngularZone = false; }
3924 if (runInsideAngularZone) {
3925 Object.getOwnPropertyNames(opts).forEach(function (key) {
3926 if (typeof opts[key] === 'function') {
3927 var fn_1 = opts[key];
3928 opts[key] = function () {
3929 var props = [];
3930 for (var _i = 0; _i < arguments.length; _i++) {
3931 props[_i] = arguments[_i];
3932 }
3933 return _this.zone.run(function () { return fn_1.apply(void 0, __spread(props)); });
3934 };
3935 }
3936 });
3937 }
3938 return core$1.createGesture(opts);
3939 };
3940 GestureController.ctorParameters = function () { return [
3941 { type: core.NgZone }
3942 ]; };
3943 GestureController.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function GestureController_Factory() { return new GestureController(core.ɵɵinject(core.NgZone)); }, token: GestureController, providedIn: "root" });
3944 GestureController = __decorate([
3945 core.Injectable({
3946 providedIn: 'root',
3947 })
3948 ], GestureController);
3949 return GestureController;
3950 }());
3951
3952 var IonicRouteStrategy = /** @class */ (function () {
3953 function IonicRouteStrategy() {
3954 }
3955 IonicRouteStrategy.prototype.shouldDetach = function (_route) {
3956 return false;
3957 };
3958 IonicRouteStrategy.prototype.shouldAttach = function (_route) {
3959 return false;
3960 };
3961 IonicRouteStrategy.prototype.store = function (_route, _detachedTree) {
3962 return;
3963 };
3964 IonicRouteStrategy.prototype.retrieve = function (_route) {
3965 return null;
3966 };
3967 IonicRouteStrategy.prototype.shouldReuseRoute = function (future, curr) {
3968 var e_1, _a;
3969 if (future.routeConfig !== curr.routeConfig) {
3970 return false;
3971 }
3972 // checking router params
3973 var futureParams = future.params;
3974 var currentParams = curr.params;
3975 var keysA = Object.keys(futureParams);
3976 var keysB = Object.keys(currentParams);
3977 if (keysA.length !== keysB.length) {
3978 return false;
3979 }
3980 try {
3981 // Test for A's keys different from B.
3982 for (var keysA_1 = __values(keysA), keysA_1_1 = keysA_1.next(); !keysA_1_1.done; keysA_1_1 = keysA_1.next()) {
3983 var key = keysA_1_1.value;
3984 if (currentParams[key] !== futureParams[key]) {
3985 return false;
3986 }
3987 }
3988 }
3989 catch (e_1_1) { e_1 = { error: e_1_1 }; }
3990 finally {
3991 try {
3992 if (keysA_1_1 && !keysA_1_1.done && (_a = keysA_1.return)) _a.call(keysA_1);
3993 }
3994 finally { if (e_1) throw e_1.error; }
3995 }
3996 return true;
3997 };
3998 return IonicRouteStrategy;
3999 }());
4000
4001 var didInitialize = false;
4002 var appInitialize = function (config, doc, zone) {
4003 return function () {
4004 var win = doc.defaultView;
4005 if (win && typeof window !== 'undefined') {
4006 if (didInitialize) {
4007 console.warn('Ionic Angular was already initialized. Make sure IonicModule.forRoot() is just called once.');
4008 }
4009 didInitialize = true;
4010 var Ionic = win.Ionic = win.Ionic || {};
4011 Ionic.config = __assign({}, config, { _zoneGate: function (h) { return zone.run(h); } });
4012 var aelFn_1 = '__zone_symbol__addEventListener' in doc.body
4013 ? '__zone_symbol__addEventListener'
4014 : 'addEventListener';
4015 return loader.applyPolyfills().then(function () {
4016 return loader.defineCustomElements(win, {
4017 exclude: ['ion-tabs', 'ion-tab'],
4018 syncQueue: true,
4019 raf: raf,
4020 jmp: function (h) { return zone.runOutsideAngular(h); },
4021 ael: function (elm, eventName, cb, opts) {
4022 elm[aelFn_1](eventName, cb, opts);
4023 },
4024 rel: function (elm, eventName, cb, opts) {
4025 elm.removeEventListener(eventName, cb, opts);
4026 }
4027 });
4028 });
4029 }
4030 };
4031 };
4032
4033 var DECLARATIONS = [
4034 // proxies
4035 IonApp,
4036 IonAvatar,
4037 IonBackButton,
4038 IonBackdrop,
4039 IonBadge,
4040 IonButton,
4041 IonButtons,
4042 IonCard,
4043 IonCardContent,
4044 IonCardHeader,
4045 IonCardSubtitle,
4046 IonCardTitle,
4047 IonCheckbox,
4048 IonChip,
4049 IonCol,
4050 IonContent,
4051 IonDatetime,
4052 IonFab,
4053 IonFabButton,
4054 IonFabList,
4055 IonFooter,
4056 IonGrid,
4057 IonHeader,
4058 IonIcon,
4059 IonImg,
4060 IonInfiniteScroll,
4061 IonInfiniteScrollContent,
4062 IonInput,
4063 IonItem,
4064 IonItemDivider,
4065 IonItemGroup,
4066 IonItemOption,
4067 IonItemOptions,
4068 IonItemSliding,
4069 IonLabel,
4070 IonList,
4071 IonListHeader,
4072 IonMenu,
4073 IonMenuButton,
4074 IonMenuToggle,
4075 IonNav,
4076 IonNavLink,
4077 IonNote,
4078 IonProgressBar,
4079 IonRadio,
4080 IonRadioGroup,
4081 IonRange,
4082 IonRefresher,
4083 IonRefresherContent,
4084 IonReorder,
4085 IonReorderGroup,
4086 IonRippleEffect,
4087 IonRow,
4088 IonSearchbar,
4089 IonSegment,
4090 IonSegmentButton,
4091 IonSelect,
4092 IonSelectOption,
4093 IonSkeletonText,
4094 IonSlide,
4095 IonSlides,
4096 IonSpinner,
4097 IonSplitPane,
4098 IonTabBar,
4099 IonTabButton,
4100 IonText,
4101 IonTextarea,
4102 IonThumbnail,
4103 IonToggle,
4104 IonToolbar,
4105 IonTitle,
4106 IonTabs,
4107 // ngModel accessors
4108 BooleanValueAccessor,
4109 NumericValueAccessor,
4110 RadioValueAccessor,
4111 SelectValueAccessor,
4112 TextValueAccessor,
4113 // navigation
4114 IonRouterOutlet,
4115 IonBackButtonDelegate,
4116 NavDelegate,
4117 RouterLinkDelegate,
4118 // virtual scroll
4119 VirtualFooter,
4120 VirtualHeader,
4121 VirtualItem,
4122 IonVirtualScroll
4123 ];
4124 var IonicModule = /** @class */ (function () {
4125 function IonicModule() {
4126 }
4127 IonicModule_1 = IonicModule;
4128 IonicModule.forRoot = function (config) {
4129 return {
4130 ngModule: IonicModule_1,
4131 providers: [
4132 {
4133 provide: ConfigToken,
4134 useValue: config
4135 },
4136 {
4137 provide: core.APP_INITIALIZER,
4138 useFactory: appInitialize,
4139 multi: true,
4140 deps: [
4141 ConfigToken,
4142 common.DOCUMENT,
4143 core.NgZone
4144 ]
4145 }
4146 ]
4147 };
4148 };
4149 var IonicModule_1;
4150 IonicModule = IonicModule_1 = __decorate([
4151 core.NgModule({
4152 declarations: DECLARATIONS,
4153 exports: DECLARATIONS,
4154 providers: [AngularDelegate, ModalController, PopoverController],
4155 imports: [common.CommonModule]
4156 })
4157 ], IonicModule);
4158 return IonicModule;
4159 }());
4160
4161 Object.defineProperty(exports, 'IonicSafeString', {
4162 enumerable: true,
4163 get: function () {
4164 return core$1.IonicSafeString;
4165 }
4166 });
4167 Object.defineProperty(exports, 'createAnimation', {
4168 enumerable: true,
4169 get: function () {
4170 return core$1.createAnimation;
4171 }
4172 });
4173 Object.defineProperty(exports, 'getPlatforms', {
4174 enumerable: true,
4175 get: function () {
4176 return core$1.getPlatforms;
4177 }
4178 });
4179 Object.defineProperty(exports, 'iosTransitionAnimation', {
4180 enumerable: true,
4181 get: function () {
4182 return core$1.iosTransitionAnimation;
4183 }
4184 });
4185 Object.defineProperty(exports, 'isPlatform', {
4186 enumerable: true,
4187 get: function () {
4188 return core$1.isPlatform;
4189 }
4190 });
4191 Object.defineProperty(exports, 'mdTransitionAnimation', {
4192 enumerable: true,
4193 get: function () {
4194 return core$1.mdTransitionAnimation;
4195 }
4196 });
4197 exports.ActionSheetController = ActionSheetController;
4198 exports.AlertController = AlertController;
4199 exports.AngularDelegate = AngularDelegate;
4200 exports.AnimationController = AnimationController;
4201 exports.BooleanValueAccessor = BooleanValueAccessor;
4202 exports.Config = Config;
4203 exports.DomController = DomController;
4204 exports.GestureController = GestureController;
4205 exports.IonApp = IonApp;
4206 exports.IonAvatar = IonAvatar;
4207 exports.IonBackButton = IonBackButton;
4208 exports.IonBackButtonDelegate = IonBackButtonDelegate;
4209 exports.IonBackdrop = IonBackdrop;
4210 exports.IonBadge = IonBadge;
4211 exports.IonButton = IonButton;
4212 exports.IonButtons = IonButtons;
4213 exports.IonCard = IonCard;
4214 exports.IonCardContent = IonCardContent;
4215 exports.IonCardHeader = IonCardHeader;
4216 exports.IonCardSubtitle = IonCardSubtitle;
4217 exports.IonCardTitle = IonCardTitle;
4218 exports.IonCheckbox = IonCheckbox;
4219 exports.IonChip = IonChip;
4220 exports.IonCol = IonCol;
4221 exports.IonContent = IonContent;
4222 exports.IonDatetime = IonDatetime;
4223 exports.IonFab = IonFab;
4224 exports.IonFabButton = IonFabButton;
4225 exports.IonFabList = IonFabList;
4226 exports.IonFooter = IonFooter;
4227 exports.IonGrid = IonGrid;
4228 exports.IonHeader = IonHeader;
4229 exports.IonIcon = IonIcon;
4230 exports.IonImg = IonImg;
4231 exports.IonInfiniteScroll = IonInfiniteScroll;
4232 exports.IonInfiniteScrollContent = IonInfiniteScrollContent;
4233 exports.IonInput = IonInput;
4234 exports.IonItem = IonItem;
4235 exports.IonItemDivider = IonItemDivider;
4236 exports.IonItemGroup = IonItemGroup;
4237 exports.IonItemOption = IonItemOption;
4238 exports.IonItemOptions = IonItemOptions;
4239 exports.IonItemSliding = IonItemSliding;
4240 exports.IonLabel = IonLabel;
4241 exports.IonList = IonList;
4242 exports.IonListHeader = IonListHeader;
4243 exports.IonMenu = IonMenu;
4244 exports.IonMenuButton = IonMenuButton;
4245 exports.IonMenuToggle = IonMenuToggle;
4246 exports.IonNav = IonNav;
4247 exports.IonNavLink = IonNavLink;
4248 exports.IonNote = IonNote;
4249 exports.IonProgressBar = IonProgressBar;
4250 exports.IonRadio = IonRadio;
4251 exports.IonRadioGroup = IonRadioGroup;
4252 exports.IonRange = IonRange;
4253 exports.IonRefresher = IonRefresher;
4254 exports.IonRefresherContent = IonRefresherContent;
4255 exports.IonReorder = IonReorder;
4256 exports.IonReorderGroup = IonReorderGroup;
4257 exports.IonRippleEffect = IonRippleEffect;
4258 exports.IonRouterOutlet = IonRouterOutlet;
4259 exports.IonRow = IonRow;
4260 exports.IonSearchbar = IonSearchbar;
4261 exports.IonSegment = IonSegment;
4262 exports.IonSegmentButton = IonSegmentButton;
4263 exports.IonSelect = IonSelect;
4264 exports.IonSelectOption = IonSelectOption;
4265 exports.IonSkeletonText = IonSkeletonText;
4266 exports.IonSlide = IonSlide;
4267 exports.IonSlides = IonSlides;
4268 exports.IonSpinner = IonSpinner;
4269 exports.IonSplitPane = IonSplitPane;
4270 exports.IonTabBar = IonTabBar;
4271 exports.IonTabButton = IonTabButton;
4272 exports.IonTabs = IonTabs;
4273 exports.IonText = IonText;
4274 exports.IonTextarea = IonTextarea;
4275 exports.IonThumbnail = IonThumbnail;
4276 exports.IonTitle = IonTitle;
4277 exports.IonToggle = IonToggle;
4278 exports.IonToolbar = IonToolbar;
4279 exports.IonVirtualScroll = IonVirtualScroll;
4280 exports.IonicModule = IonicModule;
4281 exports.IonicRouteStrategy = IonicRouteStrategy;
4282 exports.LoadingController = LoadingController;
4283 exports.MenuController = MenuController;
4284 exports.ModalController = ModalController;
4285 exports.NavController = NavController;
4286 exports.NavDelegate = NavDelegate;
4287 exports.NavParams = NavParams;
4288 exports.NumericValueAccessor = NumericValueAccessor;
4289 exports.PickerController = PickerController;
4290 exports.Platform = Platform;
4291 exports.PopoverController = PopoverController;
4292 exports.RadioValueAccessor = RadioValueAccessor;
4293 exports.RouterLinkDelegate = RouterLinkDelegate;
4294 exports.SelectValueAccessor = SelectValueAccessor;
4295 exports.TextValueAccessor = TextValueAccessor;
4296 exports.ToastController = ToastController;
4297 exports.VirtualFooter = VirtualFooter;
4298 exports.VirtualHeader = VirtualHeader;
4299 exports.VirtualItem = VirtualItem;
4300 exports.ɵa = ConfigToken;
4301 exports.ɵb = ValueAccessor;
4302 exports.ɵc = ProxyCmp;
4303 exports.ɵe = OverlayBaseController;
4304 exports.ɵf = appInitialize;
4305
4306 Object.defineProperty(exports, '__esModule', { value: true });
4307
4308})));
4309//# sourceMappingURL=ionic-angular.umd.js.map