UNPKG

@fivethree/core

Version:
15 lines (13 loc) 147 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("@ionic/angular"),require("@angular/router"),require("rxjs"),require("@angular/platform-browser"),require("rxjs/operators"),require("@angular/forms"),require("@fivethree/ngx-rxjs-animations")):"function"==typeof define&&define.amd?define("@fivethree/core",["exports","@angular/core","@angular/animations","@angular/common","@ionic/angular","@angular/router","rxjs","@angular/platform-browser","rxjs/operators","@angular/forms","@fivethree/ngx-rxjs-animations"],e):e(((t=t||self).fivethree=t.fivethree||{},t.fivethree.core={}),t.ng.core,t.ng.animations,t.ng.common,t["ionic-angular"],t.ng.router,t.rxjs,t.ng.platformBrowser,t.rxjs.operators,t.ng.forms,t["ngx-rxjs-animations"])}(this,(function(t,e,i,n,o,r,s,a,l,p,c){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */function h(t,e,i,n){return new(i||(i=Promise))((function(o,r){function s(t){try{l(n.next(t))}catch(t){r(t)}}function a(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){t.done?o(t.value):new i((function(e){e(t.value)})).then(s,a)}l((n=n.apply(t,e||[])).next())}))}function u(t,e){var i,n,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}catch(t){r=[6,t],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}}function f(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,o,r=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return s}var d=function(){function t(){this._badge=0,this.state="normal",this.off=!1,this.animationDisabled=!1,this.transitionDone=new e.EventEmitter,this.indicatorState="scale",this.badgeState="scale"}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){this._name?this.transform(t):this._name=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"badge",{get:function(){return this._badge},set:function(t){this.transformIndicator(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dot",{get:function(){return this._dot},set:function(t){this._dot=t,t&&(this.indicatorState="normal")},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.transform=function(t){this.temp=t,this.state="rotate"},t.prototype.transformIndicator=function(t){this.dot?this._badge=t:0===t?(this._badge=t,this.badgeState="scale"):"scale"===this.badgeState?(this.badgeState="normal",this._badge=t):(this.tempValue=t,this.badgeState="scale")},t.prototype.rotateAnimDone=function(t){"normal"===t.fromState&&"rotate"===t.toState&&(this._name=this.temp,this.state="normal"),"rotate"===t.fromState&&"normal"===t.toState&&this.transitionDone.emit(this._name)},t.prototype.incrementDone=function(t){"normal"===t.fromState&&"scale"===t.toState&&(this.tempValue>0?(this.badgeState="normal",this._badge=this.tempValue):this._badge=this.tempValue)},t.decorators=[{type:e.Component,args:[{selector:"fiv-icon",template:'<ion-icon [slot]="slot" class="icon" [@rotateAnim]="state" (@rotateAnim.done)="rotateAnimDone($event)" [name]="_name"\n [color]="color"></ion-icon>\n<span [@scaleAnim]="indicatorState" *ngIf="dot" class="indicator-dot"></span>\n<span class="off-background" *ngIf="off"></span>\n<span class="off" *ngIf="off"></span>\n<span *ngIf="smallIcon && badge == 0 && !dot" class="indicator-small-icon">\n <ion-icon [color]="color" slot="icon-only" [name]="smallIcon"></ion-icon>\n</span>\n<span *ngIf="badge > 0 && !dot" [@scaleAnim]="badgeState" (@scaleAnim.done)="incrementDone($event)"\n class="indicator-badge">\n <span *ngIf="badge <= 9">{{badge}}</span>\n <span *ngIf="badge > 9">9+</span>\n</span>',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[i.trigger("rotateAnim",[i.transition("normal => rotate",[i.animate("125ms ease-out")]),i.transition("rotate => normal",[i.animate("125ms ease-in")]),i.state("rotate",i.style({opacity:"0",transform:"scale(0) rotateZ(45deg)"})),i.state("normal",i.style({opacity:"1",transform:"scale(1) rotateZ(0deg)"}))]),i.trigger("scaleAnim",[i.transition("void => normal",[i.style({opacity:"0",transform:"scale(0)"}),i.animate("125ms ease-out",i.style({opacity:"1",transform:"scale(1)"}))]),i.transition("normal => scale",[i.animate("125ms ease-out")]),i.transition("scale => normal",[i.animate("125ms ease-in")]),i.state("scale",i.style({opacity:"0",transform:"scale(0)"})),i.state("normal",i.style({opacity:"1",transform:"scale(1)"}))])],styles:[":host{--fiv-padding-end:0;--fiv-padding-start:0;--fiv-position-top:-2px;--fiv-position-right:-6px;--fiv-icon-height:28px;--fiv-icon-width:28px;--fiv-small-icon-height:18px;--fiv-small-icon-width:18px;--fiv-small-icon-font-size:0.8em;--fiv-badge-height:18px;--fiv-badge-width:18px;--fiv-badge-font-size:0.6em;--fiv-dot-height:18px;--fiv-dot-width:18px;position:relative;display:inline-block}.icon{margin:0;font-size:1.8em;color:var(--fiv-icon-color,var(--ion-color-dark));padding-right:var(--fiv-padding-end);padding-left:var(--fiv-padding-start);height:var(--fiv-icon-height);width:var(--fiv-icon-width)}.indicator-badge{position:absolute;top:var(--fiv-position-top);right:var(--fiv-position-right);height:var(--fiv-badge-height);width:var(--fiv-badge-width);background-color:var(--fiv-badge-background-color,var(--ion-color-primary));color:var(--fiv-badge-color,var(--ion-color-light));border-radius:14px;z-index:13}.indicator-badge *{position:absolute;transform:translateX(-50%) translateY(-50%);left:50%;top:50%;font-size:var(--fiv-badge-font-size)}.indicator-dot{position:absolute;top:var(--fiv-position-top);right:var(--fiv-position-right);height:var(--fiv-dot-height);width:var(--fiv-dot-width);background-color:var(--fiv-dot-background-color,var(--ion-color-primary));border-radius:100%;z-index:11}.indicator-small-icon{position:absolute;top:var(--fiv-position-top);right:var(--fiv-position-right);height:var(--fiv-small-icon-height);width:var(--fiv-small-icon-width);background-color:var(--fiv-small-icon-background-color,var(--ion-color-primary));color:var(--fiv-small-icon-color,var(--ion-color-light));border-radius:14px;z-index:13}.indicator-small-icon *{position:absolute;transform:translateX(-50%) translateY(-50%);left:50%;top:50%;font-size:var(--fiv-small-icon-font-size)}.off{width:120%;height:2px;background:var(--fiv-off-color,var(--fiv-icon-color,var(--ion-color-dark)));position:absolute;left:0;transform:rotateZ(45deg) translateY(10px) translateX(6px)}.off-background{width:120%;height:2px;background:#000;position:absolute;background-color:var(--fiv-off-background-color,var(--ion-color-light));left:2px;transform:rotateZ(45deg) translateY(10px) translateX(6px)}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={color:[{type:e.Input}],slot:[{type:e.Input}],smallIcon:[{type:e.Input}],off:[{type:e.Input}],animationDisabled:[{type:e.Input},{type:e.HostBinding,args:["@.disabled"]}],transitionDone:[{type:e.Output}],name:[{type:e.Input}],badge:[{type:e.Input}],dot:[{type:e.Input}]},t}();var m=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[d],imports:[n.CommonModule,o.IonicModule],exports:[d]}]}],t}(),g=function(){function t(){}return t.decorators=[{type:e.Directive,args:[{selector:"[fivAppBarFab]",exportAs:"fivAppBarFab"}]}],t.propDecorators={fivAppBarFab:[{type:e.Input}]},t}();var v=function(){function t(){this.cutoutVisible=!0}return t.decorators=[{type:e.Component,args:[{selector:"fiv-app-bar",template:'<div class="appbar"\n [ngClass]="{\'cutout\': cutoutVisible, \'left\': fivFab.fivAppBarFab === \'left\', \'right\': fivFab.fivAppBarFab === \'right\'}">\n <div class="appbar-rect left">\n <div class="tabs">\n <ng-content select="[left]"></ng-content>\n </div>\n </div>\n <ng-content select="fiv-fab"></ng-content>\n <svg viewBox="0 0 100 50" width="100" height="50" xmlns="http://www.w3.org/2000/svg"><path d="M100 0v50H0V0c.543 27.153 22.72 49 50 49S99.457 27.153 99.99 0h.01z" fill="red" fill-rule="evenodd"/></svg>\n <div class="rect-filler"></div>\n <div class="appbar-rect right">\n <div class="tabs">\n <ng-content select="[right]"></ng-content>\n </div>\n </div>\n</div>',styles:[":host{display:block;position:relative;--fiv-radius:72px;--fiv-appbar-fab-size:56px;--fiv-appbar-height:56px;width:100%;--fiv-border-radius:6px;--fiv-appbar-background-color:var(--ion-color-light);--fiv-side-width:12px;--fiv-fab-icon-color:var(--ion-color-light)}svg{height:calc(var(--fiv-radius)/ 2);width:var(--fiv-radius);left:calc(50% - (var(--fiv-radius)/ 2));position:absolute;bottom:calc(env(safe-area-inset-bottom) + var(--fiv-appbar-height) - var(--fiv-radius)/ 2 - var(--fiv-border-radius))}svg path{fill:var(--fiv-appbar-background-color)}.appbar{width:100%;position:absolute;bottom:0;left:0;height:calc(var(--fiv-appbar-height) + env(safe-area-inset-bottom));background:rgba(0,0,0,0);z-index:5000}.appbar .appbar-rect{overflow:hidden;position:absolute;width:calc(50% - (var(--fiv-radius)/ 2));height:calc(var(--fiv-appbar-height) + env(safe-area-inset-bottom));bottom:0;box-shadow:3px -4px 5px 0 rgba(0,0,0,.1)}.appbar .appbar-rect.left{left:0;background:var(--fiv-appbar-background-color);border-top-right-radius:var(--fiv-border-radius)}.appbar .appbar-rect.right{right:0;background:var(--fiv-appbar-background-color);border-top-left-radius:var(--fiv-border-radius)}.appbar ::ng-deep fiv-fab{position:absolute;left:calc(50% - .5 * var(--fiv-fab-size));top:calc(-.5 * var(--fiv-appbar-fab-size) + var(--fiv-border-radius));display:block;--fiv-fab-size:var(--fiv-appbar-fab-size);z-index:14}.appbar ::ng-deep fiv-fab fiv-icon{--fiv-icon-color:var(--fiv-fab-icon-color)}.appbar .rect-filler{width:var(--fiv-radius);height:calc(env(safe-area-inset-bottom) + var(--fiv-appbar-height) - var(--fiv-radius)/ 2 - var(--fiv-border-radius));position:absolute;overflow:hidden;bottom:0;left:calc(50% - (var(--fiv-radius)/ 2));background:var(--fiv-appbar-background-color)}.appbar:not(.cutout) .appbar-rect.left{border-top-right-radius:0}.appbar:not(.cutout) .appbar-rect.right{border-top-left-radius:0}.appbar.left .appbar-rect.left{width:var(--fiv-side-width)}.appbar.left .appbar-rect.right{width:calc(100% - var(--fiv-radius) - var(--fiv-side-width))}.appbar.left .rect-filler,.appbar.left svg{left:var(--fiv-side-width)}.appbar.left ::ng-deep fiv-fab{transform:translateX(0);left:calc(var(--fiv-side-width) + var(--fiv-radius)/ 2 - var(--fiv-appbar-fab-size)/ 2);position:absolute}.appbar.right .appbar-rect.left{width:calc(100% - var(--fiv-radius) - var(--fiv-side-width))}.appbar.right .appbar-rect.right{width:var(--fiv-side-width)}.appbar.right .rect-filler,.appbar.right svg{left:calc(100% - var(--fiv-radius) - var(--fiv-side-width))}.appbar.right ::ng-deep fiv-fab{transform:translateX(0);left:calc(100% - var(--fiv-side-width) - var(--fiv-radius)/ 2 - var(--fiv-appbar-fab-size)/ 2)}.tabs{display:flex;width:100%;height:100%;position:relative}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={titleMode:[{type:e.Input}],fivFab:[{type:e.ContentChild,args:[g,{static:!1}]}]},t}();var y=function(){function t(t,e,i,n){this.appBar=t,this.ionTabs=e,this.router=i,this.el=n,this.type="unbounded"}return Object.defineProperty(t.prototype,"active",{get:function(){return this.router.url.endsWith(this.href)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classes",{get:function(){return"label-"+this.appBar.titleMode},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.onClick=function(){this.ionTabs.select(this.tab)},t.decorators=[{type:e.Component,args:[{selector:"fiv-app-bar-tab",template:'<ng-template>\n <ng-content></ng-content>\n</ng-template>\n\n<div (click)="onClick()" class="tab ion-activatable" [ngClass]="{\'active\': active}">\n <ng-content select="fiv-icon"></ng-content>\n <ng-content *ngIf="appBar.titleMode === \'show\' || (active && appBar.titleMode === \'active-only\')" select="ion-label">\n </ng-content>\n <ion-ripple-effect [type]="type"></ion-ripple-effect>\n</div>',styles:[":host{width:50%;height:100%;display:inline-block;position:relative}:host .tab{width:100%;height:100%;display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;overflow:visible}:host .tab.active{--fiv-icon-color:var(--fiv-icon-activ-color, var(--ion-color-primary))}:host .tab.active ::ng-deep ion-label{color:var(--ion-color-primary)}:host(.label-hide) ::ng-deep ion-label{display:none}:host(.label-active-only) .tab:not(.active) ::ng-deep ion-label{display:none}"]}]}],t.ctorParameters=function(){return[{type:v,decorators:[{type:e.Host}]},{type:o.IonTabs,decorators:[{type:e.Host}]},{type:r.Router},{type:e.ElementRef}]},t.propDecorators={tab:[{type:e.Input}],href:[{type:e.Input}],type:[{type:e.Input}],classes:[{type:e.HostBinding,args:["class"]}]},t}();var b=function(){function t(){this.loading=!1,this.isComplete=!1,this.loadChange=new s.BehaviorSubject(this.loading),this.completeChange=new s.BehaviorSubject(this.isComplete)}return t.prototype.load=function(){this.loading=!0,this.loadChange.next(this.loading)},t.prototype.unload=function(){this.loading=!1,this.loadChange.next(this.loading),this.isComplete=!1},t.prototype.toggleSpinner=function(){this.loading=!this.loading},t.prototype.complete=function(){this.isComplete=!0,this.completeChange.next(this.isComplete)},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var w=function(){function t(t,i){this.loadingService=t,this.builder=i,this.loading=!1,this.global=!1,this.isComplete=!1,this.progress=0,this.verticalAlign="top",this.fivComplete=new e.EventEmitter,this.fivDoneShrinking=new e.EventEmitter,this.fivRefresh=new e.EventEmitter,this.animating=!1}return t.prototype.ngOnInit=function(){var t=this;this.global&&this.loadingService.completeChange.subscribe((function(e){e&&t.complete(null)}))},t.prototype.ngOnDestroy=function(){this.global&&this.loadingService.completeChange.unsubscribe()},t.prototype.toggleSpinner=function(){this.loading=!this.loading},t.prototype.load=function(){this.loading=!0,this.fivRefresh.emit(this)},t.prototype.unload=function(){this.loading=!1,this.isComplete&&(this.isComplete=!1)},t.prototype.complete=function(t){this.param=t,this.isComplete=!0,this.fillIn(850)},t.prototype.fillAnimationComplete=function(t){t&&(this.fivComplete.emit(this.param),this.isComplete=!1,this.param=null,this.global?this.loadingService.unload():this.unload())},t.prototype.setProgress=function(t){this.progress=t<0?0:t>100?100:t},t.prototype.fillIn=function(t){var e=this;this.progress=0;var n=this.builder.build([i.style({width:this.progress+"%"}),i.animate(t,i.style({width:"100%"}))]).create(this.linear.nativeElement),o=s.timer(0,t/100).subscribe((function(){if(e.progress<=0)return o.unsubscribe();e.progress++}));n.play(),n.onDone((function(){e.animating&&(e.fillAnimationComplete(!0),e.stopProgressAnimation())})),this.stopProgressAnimation(),this.animating=!0,this._progressPlayer=n},t.prototype.shrinkIn=function(t){var e=this;this.progress=100;var n=this.builder.build([i.style({width:this.progress+"%"}),i.animate(t,i.style({width:0}))]).create(this.linear.nativeElement),o=s.timer(0,t/100).subscribe((function(){if(e.progress<=0)return o.unsubscribe();e.progress--}));n.play(),n.onDone((function(){e.animating&&(e.fivDoneShrinking.emit(!0),e.stopProgressAnimation())})),this.stopProgressAnimation(),this.animating=!0,this._progressPlayer=n},t.prototype.stopProgressAnimation=function(){this._progressPlayer&&(this._progressPlayer.destroy(),this._progressPlayer=null,this.animating=!1)},t.decorators=[{type:e.Component,args:[{selector:"fiv-loading-progress-bar",template:'<div [@progressAnim] *ngIf="(!global && loading) || (global && loadingService.loading)" class="slider" [ngClass]="{\'top\':verticalAlign == \'top\',\'bottom\': verticalAlign == \'bottom\'}" >\n <div class="line"></div>\n <div *ngIf="!isComplete" class="subline inc"></div>\n \x3c!-- <div *ngIf="isComplete" [@fillAnim] (@fillAnim.done)="fillAnimationComplete(isComplete)" class="subline fill"></div> --\x3e\n <div *ngIf="!isComplete" class="subline dec"></div>\n</div>\n<div #linear [@progressAnimLinear] class="progress" [ngClass]="{\'top\':verticalAlign == \'top\',\'bottom\': verticalAlign == \'bottom\'}" ></div>\n',animations:[i.trigger("progressAnim",[i.transition("void => *",[i.style({height:"0px"}),i.animate("250ms ease-out")]),i.transition("* => void",[i.animate("299ms ease-in",i.style({height:"0px"}))])]),i.trigger("progressAnimLinear",[i.transition("void => *",[i.style({height:"0px"}),i.animate("65ms ease-out")]),i.transition("* => void",[i.animate("299ms ease-in",i.style({height:"0px"}))])]),i.trigger("fillAnim",[i.transition("void => *",[i.style({width:"0px"}),i.animate("850ms ease-out",i.style({width:"100%"}))])])],styles:[":host{--background-progress-bar:var(--ion-color-primary);--background-progress:var(--ion-color-primary-shade);--color-spin-0:var(--background-progress);--color-spin-25:var(--background-progress);--color-spin-50:var(--background-progress);--color-spin-75:var(--background-progress);--color-spin-100:var(--background-progress)}.slider{position:absolute;width:100%;height:5px;overflow-x:hidden;z-index:5000}.progress{position:absolute;height:5px;width:0;overflow-x:hidden;z-index:5000;background:var(--background-progress-bar);transition:240ms}.line{position:absolute;opacity:.4;width:240%;height:5px;-webkit-animation:5.6s ease-in-out infinite colorspin;animation:5.6s ease-in-out infinite colorspin}.subline{position:absolute;height:5px;background:inherit}.inc{-webkit-animation:1.6s infinite increase,5.6s ease-in-out infinite colorspin;animation:1.6s infinite increase,5.6s ease-in-out infinite colorspin}.dec{-webkit-animation:1.6s .4s infinite decrease,5.6s ease-in-out infinite colorspin;animation:1.6s .4s infinite decrease,5.6s ease-in-out infinite colorspin}.fill{left:0;width:100%;-webkit-animation:5.6s ease-in-out infinite colorspin;animation:5.6s ease-in-out infinite colorspin}@-webkit-keyframes increase{from{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes increase{from{left:-5%;width:5%}to{left:130%;width:100%}}@-webkit-keyframes decrease{from{left:-80%;width:80%}to{left:110%;width:10%}}@keyframes decrease{from{left:-80%;width:80%}to{left:110%;width:10%}}@-webkit-keyframes colorspin{0%{background-color:var(--color-spin-0)}25%{background-color:var(--color-spin-25)}50%{background-color:var(--color-spin-50)}75%{background-color:var(--color-spin-75)}100%{background-color:var(--color-spin-100)}}@keyframes colorspin{0%{background-color:var(--color-spin-0)}25%{background-color:var(--color-spin-25)}50%{background-color:var(--color-spin-50)}75%{background-color:var(--color-spin-75)}100%{background-color:var(--color-spin-100)}}.top{top:0;left:0}.bottom{bottom:0;left:0}"]}]}],t.ctorParameters=function(){return[{type:b},{type:i.AnimationBuilder}]},t.propDecorators={loading:[{type:e.Input}],global:[{type:e.Input}],isComplete:[{type:e.Input}],verticalAlign:[{type:e.Input}],fivComplete:[{type:e.Output}],fivDoneShrinking:[{type:e.Output}],fivRefresh:[{type:e.Output}],bar:[{type:e.ViewChild,args:["bar",{static:!1}]}],linear:[{type:e.ViewChild,args:["linear",{static:!1}]}]},t}();var k=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[w],imports:[n.CommonModule],exports:[w],providers:[b]}]}],t}(),I=function(){function t(t){this.sanitizer=t,this.vertical=!0,this.horizontal=!0}return Object.defineProperty(t.prototype,"myStyle",{get:function(){var t="position: absolute; "+(this.vertical&&this.horizontal?"top: 50%; left: 50%; transform: translateY(-50%) translateX(-50%);":this.vertical?"top: 50%; transform: translateY(-50%);":"left: 50%; transform: translateX(-50%);");return this.sanitizer.bypassSecurityTrustStyle(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fivCenter",{set:function(t){t&&(this.vertical=t.vertical,this.horizontal=t.horizontal)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.decorators=[{type:e.Directive,args:[{selector:"[fivCenter]"}]}],t.ctorParameters=function(){return[{type:a.DomSanitizer}]},t.propDecorators={myStyle:[{type:e.HostBinding,args:["style"]}],fivCenter:[{type:e.Input}]},t}();var C=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[I],imports:[n.CommonModule],exports:[I]}]}],t}(),x=100,E=function(){function t(t,i,n,o,r){this._document=t,this._elementRef=i,this.change=n,this.builder=o,this.sanitizer=r,this._diameter=x,this._strokeWidth=10,this._value=0,this.fivProgress=new e.EventEmitter,this.fivComplete=new e.EventEmitter,this.mode="indeterminate",this.circleRadius=45,this._color="var(--fiv-spin-color)"}return Object.defineProperty(t.prototype,"class",{get:function(){return this.mode+" fiv-spinner fiv-progress-spinner fiv-progress-spinner-indeterminate-animation"},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"viewBox",{get:function(){var t=2*this.circleRadius+this.strokeWidth;return"0 0 "+t+" "+t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strokeCircumference",{get:function(){return 2*Math.PI*this.circleRadius},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strokeDashOffset",{get:function(){return"determinate"===this.mode?this.strokeCircumference*(100-this._value)/100:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"circleStrokeWidth",{get:function(){return this.strokeWidth/this.diameter*100},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"diameter",{get:function(){return this._diameter},set:function(e){this._diameter=e,t.diameters.has(this._diameter)||this._attachStyleNode()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strokeWidth",{get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=t},enumerable:!0,configurable:!0}),t.prototype._attachStyleNode=function(){var e=t.styleTag;e||(e=this._document.createElement("style"),this._document.head.appendChild(e),t.styleTag=e),e&&e.sheet&&e.sheet.insertRule(this._getAnimationText(),0),t.diameters.add(this.diameter)},t.prototype._getAnimationText=function(){return"\n @keyframes fiv-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n ".replace(/START_VALUE/g,""+.95*this.strokeCircumference).replace(/END_VALUE/g,""+.2*this.strokeCircumference).replace(/DIAMETER/g,""+this.diameter)},t.prototype.completeIn=function(t){var e=this;this.mode="determinate",this.change.detectChanges();var n=this.builder.build([i.style({"stroke-dasharray":180,"stroke-dashoffset":90,transformOrigin:"center",stroke:"var(--fiv-spin-color)"}),i.animate(t+"ms ease-out",i.style({"stroke-dasharray":315,"stroke-dashoffset":0,transformOrigin:"center",stroke:"var(--fiv-spin-color)",opacity:0}))]).create(this.determinateCircle.nativeElement);n.play(),n.onDone((function(){e.fivComplete.emit(e),e._value=0}));var o=s.interval(t/100),r=s.timer(t+t/50);o.pipe(l.takeUntil(r)).subscribe((function(t){e.fivProgress.emit(t)}))},t.prototype.setValue=function(t){this.mode="determinate",this._value=t,this.change.detectChanges()},t.prototype.spin=function(){this.mode="indeterminate",this.change.detectChanges()},t.prototype.stop=function(){this._value=0,this.change.detectChanges()},t.prototype.setMode=function(t){this.mode=t,this.change.detectChanges()},t.diameters=new Set([x]),t.styleTag=null,t.decorators=[{type:e.Component,args:[{selector:"fiv-spinner",template:'<svg [style.width.px]="diameter" [style.height.px]="diameter" [attr.viewBox]="viewBox"\n preserveAspectRatio="xMidYMid meet" focusable="false" [ngSwitch]="mode == \'indeterminate\'">\n <circle [attr.stroke]="_color" *ngSwitchCase="true" cx="50%" cy="50%" [attr.r]="circleRadius"\n [style.animation-name]="\'fiv-progress-spinner-stroke-rotate-\' + diameter"\n [style.stroke-dashoffset.px]="strokeDashOffset" [style.stroke-dasharray.px]="strokeCircumference"\n [style.stroke-width.%]="circleStrokeWidth"></circle>\n\n <circle [attr.stroke]="_color" class="determinate-circle" #determinateCircle *ngSwitchCase="false" cx="50%" cy="50%"\n [attr.r]="circleRadius" [style.stroke-dashoffset.px]="strokeDashOffset"\n [style.stroke-dasharray.px]="strokeCircumference" [style.stroke-width.%]="circleStrokeWidth"></circle>\n</svg>',host:{"[style.width.px]":"diameter","[style.height.px]":"diameter"},changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["fiv-spinner{display:block;position:relative}fiv-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}fiv-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}fiv-spinner.fiv-progress-spinner-indeterminate-animation.determinate circle{transition-property:stroke;-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}fiv-spinner.fiv-progress-spinner-indeterminate-animation.indeterminate{-webkit-animation:2s linear infinite fiv-progress-spinner-linear-rotate;animation:2s linear infinite fiv-progress-spinner-linear-rotate}fiv-spinner.fiv-progress-spinner-indeterminate-animation.indeterminate circle{transition-property:stroke;-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes fiv-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes fiv-progress-spinner-linear-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes fiv-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.6061718819px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677646px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.6061718819px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677646px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.6061718819px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677646px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.6061718819px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677646px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes fiv-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.6061718819px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677646px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.6061718819px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677646px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.6061718819px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677646px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.6061718819px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677646px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677646px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.6061718819px;transform:rotateX(180deg) rotate(341.5deg)}}"]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n.DOCUMENT]}]},{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:i.AnimationBuilder},{type:a.DomSanitizer}]},t.propDecorators={fivProgress:[{type:e.Output}],fivComplete:[{type:e.Output}],determinateCircle:[{type:e.ViewChild,args:["determinateCircle",{static:!1}]}],mode:[{type:e.Input}],circleRadius:[{type:e.Input}],class:[{type:e.HostBinding,args:["class"]}],value:[{type:e.Input}],diameter:[{type:e.Input}],strokeWidth:[{type:e.Input}]},t}();var P=function(){function t(t,i,n){this.renderer=t,this.platform=i,this.content=n,this.vertical="none",this.horizontal="none",this.mode="normal",this.spinColor="primary",this.disabled=!1,this.visible=!0,this.pulse=!1,this.animationDisabled=!1,this._scroll=!1,this.fivComplete=new e.EventEmitter,this.fivRefresh=new e.EventEmitter,this.fivHidden=new e.EventEmitter,this.fivShow=new e.EventEmitter,this.fivTransition=new e.EventEmitter,this.loading=!1,this.extended=!1,this.iconState="normal",this.currentDeltaY=0,this.$onDestroy=new s.Subject}return Object.defineProperty(t.prototype,"scroll",{get:function(){return this._scroll},set:function(t){this._scroll=t,this.$onDestroy.next(),this.ngOnInit()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;if(this.content&&this.scroll){this.content.scrollEvents=!0;var e=this.content.ionScroll.pipe(l.map((function(t){return t.detail.deltaY})),l.pairwise(),l.map((function(t){var e=f(t,2),i=e[0];return e[1]<i?"Up":"Down"})),l.distinctUntilChanged(),l.takeUntil(this.content.ionScrollEnd),l.repeat()),i=e.pipe(l.filter((function(t){return"Up"===t}))),n=e.pipe(l.filter((function(t){return"Down"===t})));i.pipe(l.tap((function(){return t.labelComp?t.extended=!0:t.visible=!0})),l.takeUntil(this.$onDestroy)).subscribe(),n.pipe(l.tap((function(){return t.labelComp?t.extended=!1:t.visible=!1})),l.takeUntil(this.$onDestroy)).subscribe()}},t.prototype.ngOnDestroy=function(){this.$onDestroy.next()},t.prototype.ngAfterContentInit=function(){this.extended=!!this.labelComp},t.prototype.load=function(){this.loading=!0,this.fivRefresh.emit(this)},t.prototype.unload=function(){this.bar&&this.bar.unload(),this.loading=!1},t.prototype.complete=function(){this.loading&&(this.spinner?this.spinner.completeIn(1e3):this.bar&&this.bar.complete())},t.prototype.fillAnimationDone=function(){this.fivComplete.emit(this),this.unload()},t.prototype.rotate=function(t){this.renderer.setStyle(this.spinner._elementRef.nativeElement,"transform","rotateZ("+t/200*360+"deg)")},t.prototype.fabAnimDone=function(t){"void"===t.fromState&&this.fivShow.emit(this),"void"===t.toState&&this.fivHidden.emit(this)},t.decorators=[{type:e.Component,args:[{selector:"fiv-fab",template:'<ion-fab *ngIf="visible" [@.disabled]="animationDisabled" (@fabAnim.done)="fabAnimDone($event)" [@fabAnim]="horizontal"\n [ngClass]="[mode,horizontal,vertical]" [slot]="slot">\n <fiv-spinner *ngIf="!extended && loading" (fivProgress)="rotate($event)" #spinner (fivComplete)="fillAnimationDone()"\n class="spinner" [circleRadius]="30" [diameter]="68" [strokeWidth]="4" [mode]="\'indeterminate\'">\n </fiv-spinner>\n\n <ion-button [ngClass]="{\'pulse\': pulse, \'small\':!labelComp || !extended}" [color]="color" [disabled]="disabled">\n <fiv-loading-progress-bar *ngIf="extended" [loading]="loading" (fivComplete)="fillAnimationDone()" #bar>\n </fiv-loading-progress-bar>\n <ng-content select="fiv-icon"></ng-content>\n <ng-content select="ion-icon"></ng-content>\n <div [@labelAnim] *ngIf="labelComp && extended">\n <ng-content select="ion-label"></ng-content>\n </div>\n </ion-button>\n</ion-fab>',animations:[i.trigger("fabAnim",[i.transition("void => center",[i.style({transform:"translateX(-50%) scale(0) "}),i.animate("250ms ease",i.style({transform:"translateX(-50%) scale(1)"}))]),i.transition("center => void",[i.style({transform:"translateX(-50%) scale(1) "}),i.animate("250ms ease",i.style({transform:" translateX(-50%) scale(0)"}))]),i.transition("void => *",[i.style({transform:"scale(0)"}),i.animate("250ms ease",i.style({transform:"scale(1)"}))]),i.transition("* => void",[i.style({transform:"scale(1)"}),i.animate("250ms ease",i.style({transform:"scale(0)"}))])]),i.trigger("labelAnim",[i.transition("void => *",[i.style({width:"0",opacity:0}),i.animate("140ms",i.style({width:"*",opacity:1}))]),i.transition("* => void",[i.style({width:"*",opacity:1}),i.animate("120ms",i.style({width:0,opacity:0}))])])],styles:[":host{--fiv-fab-size:56px;--fiv-spinner-size:calc(var(--fiv-fab-size) + 12px);--fiv-fab-bottom:calc(10px + env(safe-area-inset-bottom));--fiv-fab-top:calc(10px + env(safe-area-inset-top));--background-fab-progress-bar:var(--ion-color-primary);--background-fab-progress:var(--ion-color-primary-shade);position:inherit}fiv-loading-progress-bar{--background-progress-bar:var(--background-fab-progress-bar);--background-progress:var(--background-fab-progress)}:host(.button-disabled){pointer-events:none}::ng-deep ng-deep fiv-icon.ios{--fiv-icon-height:24px;--fiv-icon-width:24px}::ng-deep fiv-icon:not(.ios){--fiv-icon-height:25px;--fiv-icon-width:25px}ion-button{--border-radius:calc(var(--fiv-fab-size) / 2);height:var(--fiv-fab-size);min-width:var(--fiv-fab-size);-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:0;margin-inline-end:0;margin:0}ion-fab.top{top:var(--fiv-fab-top)}ion-fab.top.edge{top:calc(var(--fiv-fab-top) - 38px)}ion-fab.middle{top:calc(50% - var(--fiv-spinner-size))}ion-fab.bottom.edge{bottom:calc(var(--fiv-fab-bottom) - 38px)}ion-fab.bottom{bottom:var(--fiv-fab-bottom)}ion-fab.center{left:50%;transform:translateX(-50%)}ion-fab.start{left:10px}ion-fab.end{right:calc(10px + var(--ion-safe-area-right,0px))}.pulse{-webkit-animation:1.2s infinite shadow-pulse;animation:1.2s infinite shadow-pulse}fiv-spinner{position:absolute;left:calc((var(--fiv-spinner-size) - var(--fiv-fab-size))/ -2);top:calc((var(--fiv-spinner-size) - var(--fiv-fab-size))/ -2)}@-webkit-keyframes shadow-pulse{0%{border-radius:calc(var(--fiv-spinner-size)/ 2);box-shadow:0 0 0 0 rgba(0,0,0,.2)}100%{border-radius:calc(var(--fiv-spinner-size)/ 2);box-shadow:0 0 0 28px transparent}}@keyframes shadow-pulse{0%{border-radius:calc(var(--fiv-spinner-size)/ 2);box-shadow:0 0 0 0 rgba(0,0,0,.2)}100%{border-radius:calc(var(--fiv-spinner-size)/ 2);box-shadow:0 0 0 28px transparent}}"]}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:o.Platform},{type:o.IonContent,decorators:[{type:e.Optional}]}]},t.propDecorators={vertical:[{type:e.Input}],horizontal:[{type:e.Input}],mode:[{type:e.Input}],slot:[{type:e.Input}],spinColor:[{type:e.Input}],color:[{type:e.Input}],disabled:[{type:e.Input}],visible:[{type:e.Input}],pulse:[{type:e.Input}],animationDisabled:[{type:e.Input}],scroll:[{type:e.Input}],feature:[{type:e.Input}],fivComplete:[{type:e.Output}],fivRefresh:[{type:e.Output}],fivHidden:[{type:e.Output}],fivShow:[{type:e.Output}],fivTransition:[{type:e.Output}],spinner:[{type:e.ViewChild,args:["spinner",{static:!1}]}],bar:[{type:e.ViewChild,args:["bar",{static:!1}]}],labelComp:[{type:e.ContentChild,args:[o.IonLabel,{static:!1}]}]},t}();var O={HIDDEN:0,NORMAL:1,EXTENDED:2};O[O.HIDDEN]="HIDDEN",O[O.NORMAL]="NORMAL",O[O.EXTENDED]="EXTENDED";var S=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[E],imports:[n.CommonModule],exports:[E]}]}],t}(),D=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[P],imports:[n.CommonModule,C,m,S,o.IonicModule,k],exports:[P],providers:[]}]}],t}(),A=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[v,y,g],imports:[n.CommonModule,m,D,o.IonicModule],exports:[v,y,g],providers:[]}]}],t}();var _=function(){function t(t,e,i){this.router=t,this.navCtrl=e,this.platform=i,this.history=[]}return t.prototype.loadRouting=function(t){var e=this;this.config=t,this.handleAndroidBackButton(),this.router.events.pipe(l.filter((function(t){return t instanceof r.NavigationEnd}))).subscribe((function(t){var i=t.urlAfterRedirects;(i===e.getPreviousUrl(e.config.root)&&(e.pop(),e.pop()),e.history.push(i),e.config&&e.config.clearOn)&&(e.config.clearOn.some((function(t){return t===i}))&&e.clearHistory(i))}))},t.prototype.registerNavigateable=function(t){T(t)&&this.history.push(t)},t.prototype.handleAndroidBackButton=function(){var t=this;this.platform.backButton.pipe(l.filter((function(){return!T(t.getCurrentUrl())}))).subscribe((function(e){t.goBack()})),this.platform.backButton.pipe(l.filter((function(){return T(t.getCurrentUrl())}))).subscribe((function(e){e.register(99999,(function(){t.goBack("/")}))}))},t.prototype.getHistory=function(){return this.history},t.prototype.getPreviousUrl=function(t){return void 0===t&&(t="/"),this.history.length>=2?this.history[this.history.length-2]:t},t.prototype.pop=function(){return this.history.pop()},t.prototype.clearHistory=function(t){var e=this;this.history=this.history.filter((function(t){return e.config.clearOn.some((function(e){return e===t}))})),t!==this.config.root&&this.history.push(t),this.history=this.history.reverse().filter((function(t,e,i){return i.indexOf(t)===e})).reverse(),this.history[0]!==this.config.root&&(this.history=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}([this.config.root],this.history))},t.prototype.getCurrentUrl=function(){return this.history[this.history.length-1]},t.prototype.goBack=function(t){if(void 0===t&&(t="/"),this.getHistory().length<=1)return navigator.app?navigator.app.exitApp():this.navCtrl.navigateBack(t);var e=this.getCurrentUrl();if("string"!=typeof e&&T(e))return e.dismiss(),this.pop();var i=this.getPreviousUrl(t);return"string"==typeof i?this.navCtrl.navigateBack(i):T(i)?this.navCtrl.navigateBack(this.getLatestUrl(t)):void 0},t.prototype.getLatestUrl=function(t){var e=this.history.filter((function(t){return!("string"!=typeof t)})),i=e[e.length-1];return e.length>0&&i&&"string"==typeof i?i:t},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:r.Router},{type:o.NavController},{type:o.Platform}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(r.Router),e.ɵɵinject(o.NavController),e.ɵɵinject(o.Platform))},token:t,providedIn:"root"}),t}();function T(t){return!!t&&void 0!==t.dismiss}var R=function(){function t(t){this.routingState=t,this.icon="arrow-back",this.defaultHref="/"}return t.prototype.buttonClick=function(){this.routingState.goBack(this.defaultHref)},t.decorators=[{type:e.Component,args:[{selector:"fiv-back-button",template:'<ion-button (click)="buttonClick()">\n <fiv-icon slot="icon-only" [color]="color" [name]="icon"></fiv-icon>\n</ion-button>',styles:[":host{display:block;padding-top:.2em}"]}]}],t.ctorParameters=function(){return[{type:_}]},t.propDecorators={icon:[{type:e.Input}],color:[{type:e.Input}],defaultHref:[{type:e.Input}]},t}();var M=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[R],imports:[n.CommonModule,m,o.IonicModule],exports:[R],providers:[]}]}],t}(),V={Bottom:0,Docked:1,Top:2};V[V.Bottom]="Bottom",V[V.Docked]="Docked",V[V.Top]="Top";var F=function(){function t(t){this.sanitizer=t,this.rounded=!0,this.handle=!0,this.float=!0,this.fivClick=new e.EventEmitter,this.states=V,this.shouldBounce=!0,this.panning=!1}return Object.defineProperty(t.prototype,"isRounded",{get:function(){switch(this.currentState){case V.Top:return!1;case V.Docked:return this.rounded;case V.Bottom:return this.rounded&&!this.float}return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styles",{get:function(){if(!this.float||this.currentState!==V.Bottom)return this.sanitizer.bypassSecurityTrustStyle("box-shadow: 0 4px 16px rgba(0, 0, 0, .12);\n border-top: 1px solid var(--ion-color-light);")},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){this.content.scrollEvents=!0},t.prototype.updateState=function(t){this.currentState=t},t.prototype.click=function(){this.fivClick.emit()},t.decorators=[{type:e.Component,args:[{selector:"fiv-bottom-sheet-content",template:'<div class="bsc-wrapper">\n <span (click)="click()" *ngIf="currentState !== states.Top && handle"\n [fivCenter]="{vertical: false, horizontal: true}" class="handle"></span>\n <div [ngClass]="{\'margin\': handle}" class="content">\n <ion-content [scrollY]="currentState === 2 && shouldBounce && !panning">\n <ng-content>\n\n </ng-content>\n </ion-content>\n\n </div>\n</div>',styles:[":host{display:block;width:100%;height:100%;--fiv-border-radius:12px;--fiv-padding:20px;padding-top:var(--fiv-padding);--fiv-background:var(--ion-background-color);--fiv-handle-background:var(--ion-color-light-shade);background:var(--fiv-background)}.bsc-wrapper{width:100%;height:100%}:host.rounded{border-top-left-radius:var(--fiv-border-radius);border-top-right-radius:var(--fiv-border-radius)}.handle{display:block;background:var(--fiv-handle-background);border-radius:12px;top:8px;width:32px;height:8px;position:absolute}.content{height:100%}"]}]}],t.ctorParameters=function(){return[{type:a.DomSanitizer}]},t.propDecorators={rounded:[{type:e.Input}],handle:[{type:e.Input}],float:[{type:e.Input}],fivClick:[{type:e.Output}],content:[{type:e.ViewChild,args:[o.IonContent,{static:!0}]}],isRounded:[{type:e.HostBinding,args:["class.rounded"]}],styles:[{type:e.HostBinding,args:["style"]}]},t}();var z=function(){function t(t,i,n,o){this._element=t,this._renderer=i,this._domCtrl=n,this._platform=o,this.dockedHeight=80,this.shouldBounce=!0,this.distanceTop=56,this.transition="0.25s",this.state=V.Bottom,this.bounceThreshold=40,this.panThreshold=20,this.panEnabled=!0,this.stateChange=new e.EventEmitter,this.fivOpen=new e.EventEmitter,this.fivDocked=new e.EventEmitter,this.fivClose=new e.EventEmitter,this.fivProgress=new e.EventEmitter,this.scrollTop=0,this.$onDestroy=new s.Subject}return t.prototype.ngOnDestroy=function(){this.$onDestroy.next()},t.prototype.ngAfterViewInit=function(){var t=this;this._setDrawerState(this.state),this.content.shouldBounce=this.shouldBounce;var e=s.fromEvent(this._element.nativeElement,"touchmove",{passive:!0}),i=s.merge(s.fromEvent(this._element.nativeElement,"touchend",{passive:!0}),s.fromEvent(this._element.nativeElement,"touchcancel",{passive:!0}));s.from(this.content.content.getScrollElement());this.content.content.ionScroll.pipe(l.tap((function(e){return t.scrollTop=e.detail.scrollTop})),l.takeUntil(this.$onDestroy)).subscribe(),this.content.content.ionScrollEnd.pipe(l.filter((function(e){return 0===t.scrollTop&&t.state===V.Top})),l.tap((function(){return t.content.content.scrollByPoint(0,1,0)})),l.takeUntil(this.$onDestroy)).subscribe();var n=e.pipe(l.filter((function(){return 0===t.scrollTop}))).pipe(l.take(1),l.tap((function(e){return t._handlePanStart(e)}))).pipe(l.filter((function(){return t.panEnabled})),l.flatMap((function(){return e})),l.map((function(e){return t.calculatePanEvent(e)}))),o=n.pipe(l.filter((function(e){return Math.abs(e.distance)>t.panThreshold})),l.map((function(e){return t._handlePan(e)})),l.takeUntil(i),l.repeat(),l.takeUntil(this.$onDestroy));n.pipe(l.filter((function(e){return Math.abs(e.distance)<=t.panThreshold&&t.content.panning})),l.map((function(e){return t._handlePan(e)})),l.takeUntil(i),l.repeat(),l.takeUntil(this.$onDestroy)).subscribe();o.pipe(l.first(),l.tap((function(){return t.content.panning=!0})),l.repeatWhen((function(){return i})),l.takeUntil(this.$onDestroy)).subscribe(),o.pipe(l.flatMap((function(){return i})),l.first(),l.withLatestFrom(n),l.tap((function(){return t.content.content.scrollByPoint(0,1,0)})),l.tap((function(){return t.content.panning=!1})),l.map((function(t){return t[1]})),l.repeat(),l.takeUntil(this.$onDestroy)).subscribe((function(e){return t._handlePanEnd(e)}))},t.prototype.ngOnChanges=function(t){t.state&&(this._setDrawerState(t.state.currentValue),this.updateContent(t.state.currentValue))},t.prototype.updateContent=function(t){this.content&&this.content.updateState(t)},t.prototype._setDrawerState=function(t){switch(this._renderer.setStyle(this._element.nativeElement,"transition",this.transition),t){case V.Bottom:this.content.content.scrollToTop(0),this._setTranslateY(this._platform.height());break;case V.Docked:this.content.content.scrollToTop(0),this._setTranslateY(this._platform.height()-this.dockedHeight);break;default:this._setTranslateY(this.distanceTop)}},t.prototype._handlePanStart=function(t){this._startPositionTop=this.getCurrentTop(),this._startPositionOffset=t.touches[0].pageY},t.prototype.getCurrentTop=function(){return this._element.nativeElement.getBoundingClientRect().top},t.prototype._handlePanEnd=function(t){if(this.shouldBounce)switch(this._renderer.setStyle(this._element.nativeElement,"transition",this.transition),this.state){case V.Docked:this._handleDockedPanEnd(t);break;case V.Top:this._handleTopPanEnd(t);break;default:this._handleBottomPanEnd(t)}this.stateChange.emit(this.state)},t.prototype._handleTopPanEnd=function(t){t.distance>this.bounceThreshold?this.state!==V.Docked&&(this.state=V.Docked,this.fivDocked.emit(this)):this._setTranslateY(this.distanceTop)},t.prototype._handleDockedPanEnd=function(t){var e=Math.abs(t.distance);e>this.bounceThreshold&&t.distance<0?this.state!==V.Top&&(this.state=V.Top,this.fivOpen.emit()):e>this.bounceThreshold&&t.distance>0?this.state!==V.Bottom&&this.close():this._setTranslateY(this._platform.height()-this.dockedHeight)},t.prototype._handleBottomPanEnd=function(t){-t.distance>this.bounceThreshold?this.state!==V.Docked&&(this.state=V.Docked,this.fivDocked.emit()):this._setTranslateY("100vh")},t.prototype.calculatePanEvent=function(t){return{currentOffset:t.touches[0].pageY,startOffset:this._startPositionOffset,startTop:this._startPositionTop,currentTop:this.getCurrentTop(),distance:t.touch