@coolon/angular-ui-powerups 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +13 -13
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +2 -2
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +2 -2
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +3 -3
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +3 -3
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/switch-case/switch-case.component.js +2 -2
- package/esm2015/lib/components/switch-case/switch-case.component.js.map +1 -1
- package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +3 -3
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +2 -2
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
- package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +3 -3
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +2 -2
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +2 -2
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +3 -3
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +3 -3
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/switch-case/switch-case.component.js +2 -2
- package/esm5/lib/components/switch-case/switch-case.component.js.map +1 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +3 -3
- package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +2 -2
- package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +3 -3
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +14 -14
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +14 -14
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +1 -1
- package/package.json +2 -2
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function w(t,e){function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var x=function(){return(x=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function O(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function T(t,e){return function(n,i){e(n,i,t)}}function E(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function F(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function U(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function _(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function j(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_(arguments[e]));return t}var N=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new p.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return w(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){p.assert.notNil(this.pectinCommand),this.pectinCommand instanceof p.UnaryCommand?this._commandParameterProvided||p.lang.illegalState("UnaryCommands require the command parameter to be specified."):this._commandParameterProvided&&p.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;p.Dsl.disposeWith(this).when.valueOf(this._commandEnabled).changes((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}),{initialValue:"triggerChange"})},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof p.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},O([n.Input(),E("design:type",Object),E("design:paramtypes",[Object])],e.prototype,"pectinCommand",null),O([n.Input(),E("design:type",Object),E("design:paramtypes",[Object])],e.prototype,"commandParameter",null),O([n.HostListener("click",["$event"]),E("design:type",Function),E("design:paramtypes",[Event]),E("design:returntype",void 0)],e.prototype,"notifyClick",null),e=O([n.Directive({selector:"[pectinCommand]"}),T(0,n.Inject(n.ElementRef)),E("design:paramtypes",[n.ElementRef])],e)}(p.GarbageCollector),V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e=O([n.Directive()],e)}(p.GarbageCollector),k=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return w(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?p.Dsl.disposeWith(this).when.valueOf(this.pectinFocusBinding.focusContext.focused).changes((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()}),{initialValue:"triggerChange"}):p.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(p.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):p.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},O([n.Input(),E("design:type",Object)],i.prototype,"pectinFocusBinding",void 0),O([n.Input(),E("design:type",HTMLElement)],i.prototype,"focusBindingTarget",void 0),O([n.HostListener("focusin"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],i.prototype,"onFocusIn",null),O([n.HostListener("focusout"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],i.prototype,"onFocusOut",null),i=O([n.Directive({selector:"[pectinFocusBinding]"}),T(0,n.Inject(n.ElementRef)),T(1,n.Inject(n.NgZone)),T(2,n.Inject(e.DOCUMENT)),E("design:paramtypes",[n.ElementRef,n.NgZone,Object])],i)}(V),L=function(){function t(){}return t=O([n.NgModule({declarations:[N,k],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule],exports:[N,k]})],t)}(),B=function(t){function e(){var e=t.call(this)||this;e.delegatingFormValueModel=e.registerDisposable(new p.DelegatingFormValueModel),e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return w(e,t),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.delegatingFormValueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.delegatingFormValueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),O([n.Input(),E("design:type",String)],e.prototype,"label",void 0),O([n.Input(),E("design:type",String)],e.prototype,"floatLabel",void 0),O([n.Input(),E("design:type",String)],e.prototype,"hint",void 0),O([n.Input(),E("design:type",String)],e.prototype,"placeholder",void 0),O([n.Input("command.focus"),E("design:type",p.Command)],e.prototype,"focusCommand",void 0),O([n.Input("command.blur"),E("design:type",p.Command)],e.prototype,"blurCommand",void 0),O([n.Input("command.enter"),E("design:type",p.Command)],e.prototype,"enterCommand",void 0),O([n.Input("command.escape"),E("design:type",p.Command)],e.prototype,"escapeCommand",void 0),O([n.Input("command.click"),E("design:type",p.Command)],e.prototype,"clickCommand",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"focus",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"blur",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"enterKey",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"escapeKey",void 0),O([n.HostListener("click"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"notifyClick",null),O([n.HostListener("focusin"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"notifyFocusIn",null),O([n.HostListener("focusout"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"notifyFocusOut",null),e=O([n.Component({template:""}),E("design:paramtypes",[])],e)}(V),H=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.UseDelegate({useExisting:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),e=O([n.Component({selector:"aup-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}),E("design:paramtypes",[])],e)}(B),q=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.UseDelegate({useExisting:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),e=O([n.Component({selector:"aup-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}),E("design:paramtypes",[])],e)}(B),z=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return w(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.UseDelegate({useExisting:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),O([n.Input(),p.UseDelegate(),E("design:type",p.ListModel)],e.prototype,"optionsModel",void 0),O([n.Input(),p.StoreInListModel("optionsModel"),E("design:type",Array)],e.prototype,"options",void 0),O([n.Input(),E("design:type",Object)],e.prototype,"optionLabel",void 0),O([n.Input(),E("design:type",Boolean)],e.prototype,"allowNil",void 0),O([n.ContentChild("optionTemplate"),E("design:type",n.TemplateRef)],e.prototype,"optionTemplateRef",void 0),O([n.ContentChild("nilOptionTemplate"),E("design:type",n.TemplateRef)],e.prototype,"nilOptionTemplateRef",void 0),O([n.Input(),E("design:type",Function)],e.prototype,"optionLabelFormat",void 0),e=O([n.Component({selector:"aup-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngIf="allowNil">{{placeholder}}</mat-option>\n <mat-option *ngFor="let option of optionsModel.value; let i = index" [value]="option">\n <ng-container *ngIf="!optionTemplateRef">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf="optionTemplateRef"\n [ngTemplateOutlet]="optionTemplateRef"\n [ngTemplateOutletContext]="{ $implicit: option, index: i }"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}),E("design:paramtypes",[])],e)}(B),G=function(t){function e(){var e=t.call(this)||this,n=p.Dsl.disposeWith(e),i=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.clearCommand=p.Command.create((function(){e.valueModel.value=null})),e.clearCommand.disableWhile(i.stringValue(e.valueModel).isBlank()),e}return w(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.UseDelegate({useExisting:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),O([n.Input(),p.UseDelegate({defaultValue:!1}),E("design:type",p.ValueModel)],e.prototype,"enableClearModel",void 0),O([n.Input(),p.StoreInValueModel("enableClearModel"),E("design:type",Boolean)],e.prototype,"enableClear",void 0),e=O([n.Component({selector:"aup-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf="enableClear" [pectinCommand]="clearCommand">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}"]}),E("design:paramtypes",[])],e)}(B),W=function(){function t(){}return t=O([n.Component({selector:"aup-noop",template:"",styles:[":host{display:block}"]}),E("design:paramtypes",[])],t)}(),K=function(){function t(){}return t.prototype.ngOnInit=function(){},t=O([n.Component({selector:"aup-scroll-container",template:'<div class="container">\n <ng-content></ng-content>\n</div>\n',styles:[":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]}),E("design:paramtypes",[])],t)}(),X=function(){function t(t){this.templateRef=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),t}(),Y=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!1,n}var i;return w(e,t),i=e,e.prototype.matches=function(t){return this.aupSwitchCaseWhen===t},e.ctorParameters=function(){return[{type:n.TemplateRef}]},O([n.Input(),E("design:type",Object)],e.prototype,"aupSwitchCaseWhen",void 0),e=i=O([n.Directive({selector:"[aupSwitchCaseWhen]",providers:[{provide:X,useExisting:i}]}),E("design:paramtypes",[n.TemplateRef])],e)}(X),Z=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!0,n}var i;return w(e,t),i=e,e.prototype.matches=function(t){return!1},e.ctorParameters=function(){return[{type:n.TemplateRef}]},e=i=O([n.Directive({selector:"[aupSwitchCaseDefault]",providers:[{provide:X,useExisting:i}]}),E("design:paramtypes",[n.TemplateRef])],e)}(X),J=function(t){function e(e){var n=t.call(this)||this;return n.cdr=e,n.selectedIndex=0,n}return w(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterContentInit=function(){var t=this,e=this.switchCaseOptions.changes.subscribe((function(e){return t.updateSelection()}));this.onDispose((function(){return e.unsubscribe()}));var n=p.Dsl.disposeWith(this);n.chain;n.when.valueOf(this.switchModel).changes((function(){return t.updateSelection()}),{initialValue:"triggerChange"}),this.cdr.detectChanges()},e.prototype.updateSelection=function(){var t=this,e=[];this.switchCaseOptions.forEach((function(n,i){n.matches(t.switchModel.value)&&e.push(i)})),e.length>1&&console.warn("found "+e.length+" matching case values, displaying the first."),0===e.length&&(this.switchCaseOptions.forEach((function(t,n){e.push(n)})),e.length>1&&console.warn("found "+e.length+" default case values, displaying the first.")),e.length>0?this.selectedIndex=e[0]:(console.warn("found no matching or default case values."),this.selectedIndex=-1)},e.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},O([n.Input(),p.UseDelegate(),E("design:type",p.ValueModel)],e.prototype,"switchModel",void 0),O([n.Input(),p.StoreInValueModel("switchModel"),E("design:type",Object)],e.prototype,"switch",void 0),O([n.ContentChildren(X),E("design:type",n.QueryList)],e.prototype,"switchCaseOptions",void 0),e=O([n.Component({selector:"aup-switch-case",template:'<mat-tab-group class="content-wrapper" no-tab-header full-height-tabs [selectedIndex]="selectedIndex">\n <mat-tab *ngFor="let option of switchCaseOptions">\n <ng-template [ngTemplateOutlet]="option.templateRef"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]}),E("design:paramtypes",[n.ChangeDetectorRef])],e)}(V),Q=function(){function t(){}return t=O([n.NgModule({declarations:[H,G,q,z,K,W,B,J,Y,Z],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,L,l.MatIconModule,u.MatButtonModule],exports:[H,G,q,z,K,W,J,Y,Z]})],t)}(),$=new n.InjectionToken("InteractionActivityData"),tt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new p.DelegatingValueModel).withDefault(!1),e}return w(e,t),e.prototype.initialise=function(t,e){g.assert.isNil(this._activityContext),this._activityContext=e,this._interactionContext=t},Object.defineProperty(e.prototype,"interactionContext",{get:function(){return g.assert.isTruthy(this.isInitialised()),this._interactionContext},enumerable:!0,configurable:!0}),e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e.prototype.isInitialised=function(){return!!this._activityContext},e}(p.GarbageCollector),et=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return w(e,t),e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[$]}]}]},e=O([n.Component({selector:"aup-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}),T(0,n.Inject($)),E("design:paramtypes",[Object])],e)}(tt),nt=function(t){function e(e){var n=t.call(this)||this;return n.config=e,p.assert.notNil(e),n}return w(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[$]}]}]},e=O([n.Component({selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}),T(0,n.Inject($)),E("design:paramtypes",[Object])],e)}(tt),it=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,p.assert.notNil(e),n}return w(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[$]}]}]},e=O([n.Component({selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}),T(0,n.Inject($)),E("design:paramtypes",[Object])],e)}(tt),ot=function(){function t(){}return t.prototype.startActivity=function(t,e){return this.createAndLaunchActivity(t,e,!1)},t.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},t.prototype.alert=function(t){return this.createAndLaunchActivity(et,t,!1)},t.prototype.confirmOrReject=function(t){return this.createAndLaunchActivity(it,t,!0)},t.prototype.confirmThen=function(t,e,n){return this.createAndLaunchActivity(nt,{confirm:t,activityType:e,data:n},!0)},t}(),rt=function(){function t(t,e,n){this.activityClass=t,this.activityData=e,this.onComplete=n,this._complete=!1,this.deferredResult=p.Deferred.defer()}return t.prototype.isActivityRealised=function(){return!!this._activity},t.prototype.isComplete=function(){return this._complete},Object.defineProperty(t.prototype,"activity",{get:function(){return p.assert.isTruthy(this.isActivityRealised()),this._activity},enumerable:!0,configurable:!0}),t.prototype.notifyActivityCreated=function(t,e){p.assert.isNil(this._activity),this._activity=t;var n=this;this._activity.initialise(e,{onDone:function(t){n.finishActivity((function(e){return e.resolve(t)}))},onCancel:function(t){n.finishActivity((function(e){return e.reject(t)}))}})},t.prototype.finishActivity=function(t){p.assert.isFalsey(this.isComplete()),t(this.deferredResult),this._complete=!0,this.onComplete(this)},t.prototype.cancel=function(){this.activity.cancel()},Object.defineProperty(t.prototype,"activityResult",{get:function(){return this.deferredResult.promise},enumerable:!0,configurable:!0}),t}(),at=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityRef",{get:function(){return this._activityRef},set:function(t){this.activityRef&&!this.activityRef.isComplete()&&g.lang.illegalState("changing activity before previous one has completed"),this._activityRef=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:$,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityRef.notifyActivityCreated(this.activityComponentRef.instance,this.nestedInteractionContext)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},O([n.Input(),E("design:type",Object)],t.prototype,"nestedInteractionContext",void 0),O([n.Input(),E("design:type",rt),E("design:paramtypes",[rt])],t.prototype,"activityRef",null),t=O([n.Component({selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}),E("design:paramtypes",[n.ComponentFactoryResolver,n.ViewContainerRef,n.Injector])],t)}(),st=function(t){function e(){var e=t.call(this)||this;return e.dynamicHeight=!1,e.activityTabs=[],e.garbage=new p.GarbageCollector,e}return w(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=p.Dsl.disposeWith(this);e.chain;e.observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},e.prototype.initialise=function(t,e){p.assert.isFalsey(this.isInitialised()),p.assert.notNil(t),p.assert.notNil(e),this._identifier=t,this.interactionServiceApi=e},Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!0,configurable:!0}),e.prototype.isInitialised=function(){return!!this.identifier},e.prototype.isActive=function(){return this.getActiveActivityCount()>0},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.dispose=function(){p.assert.isFalsey(this.isActive()),this.garbage.dispose()},e.prototype.getActiveActivityRef=function(){return this.isActive()||g.lang.illegalState("no activity in progress"),M.findLast(this.activityTabs,(function(t){return!t.isComplete()}))},e.prototype.cancelActiveActivity=function(){return F(this,void 0,void 0,(function(){return U(this,(function(t){return this.getActiveActivityRef().cancel(),this.isCleaningUp()?[2,this.waitForInteractionContextCleanupToFinish()]:[2,!this.isActive()]}))}))},e.prototype.createAndLaunchActivity=function(t,e,n){var i=this;p.assert.isTruthy(this.isInitialised());var o=new rt(t,e,(function(){i.getActiveActivityCount()>0?i.triggerTabSynchronisation():i.finishAndStartCleanup()}));return this.launchActivity(o),1===this.activityTabs.length&&this.interactionServiceApi.notifyActive(this),o.activityResult},e.prototype.getActiveActivityCount=function(){return this.activityTabs.filter((function(t){return!t.isComplete()})).length},e.prototype.isCleaningUp=function(){return!!this._deferredCleanUp},e.prototype.waitForInteractionContextCleanupToFinish=function(){return F(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!this._deferredCleanUp||this._deferredCleanUp]}))}))},e.prototype.finishAndStartCleanup=function(){var t=this;if(!this._deferredCleanUp){var e=this.interactionServiceApi.notifyFinished(this);this._deferredCleanUp=e.finally((function(){t._deferredCleanUp=null}))}},e.prototype.launchActivity=function(t){var e=this.activityTabs.filter((function(t){return!t.isComplete()}));this.activityTabs=e.concat(t),this.tabs.selectedIndex=this.activityTabs.length},e.prototype.activityIndex=function(t,e){return t},e.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.activityTabs=this.activityTabs.filter((function(t){return!t.isComplete()}))},e.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.getActiveActivityCount()-1;return this.tabs.selectedIndex=e,t===e},e.prototype.getSelectedOutlet=function(){return this.activityOutlets.toArray()[this.tabs.selectedIndex]},e.prototype.triggerTabSynchronisation=function(){var t=this;this.syncSelectedTabTimeout&&clearTimeout(this.syncSelectedTabTimeout),this.syncSelectedTabTimeout=setTimeout((function(){t.syncSelectedTabTimeout=null,t.synchroniseSelectedTabIndex()}),75)},O([n.Input(),E("design:type",Object)],e.prototype,"dynamicHeight",void 0),O([n.ViewChild("tabs",{static:!0}),E("design:type",s.MatTabGroup)],e.prototype,"tabs",void 0),O([n.ViewChildren(at),E("design:type",n.QueryList)],e.prototype,"activityOutlets",void 0),O([p.Trace(),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"dispose",null),e=O([n.Component({selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs; trackBy: activityIndex" >\n <aup-activity-outlet [nestedInteractionContext]="this" [activityRef]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}),E("design:paramtypes",[])],e)}(ot),ct=function(){function t(t,e,n){this.activeInteractionContextIds=t,this.activeModalContext=e,this.createExclusiveInteractionContext=n}return t.prototype.isActive=function(){return this.getActiveInteractionContextIds().length>0},t.prototype.isModalActive=function(){return!!this.activeModalContext.value},t.prototype.isComponentInteracting=function(t){return t.interactionContext&&t.interactionContext.isActive()},t.prototype.getActiveInteractionContextIds=function(){return this.activeInteractionContextIds.value},t.prototype.cancelCurrentModalInteraction=function(){return this.activeModalContext.value.cancelActiveActivity()},t.prototype.cancelComponentInteraction=function(t){return t.interactionContext.cancelActiveActivity()},t}(),ut=function(){},lt=0;t.ɵz=function(){function t(t){this.modelInteractionContextFactory=t,this.garbage=new p.GarbageCollector,this._navigationInProgress=(new p.DelegatingValueModel).withDefault(!1);var n=p.Dsl.disposeWith(this.garbage),i=n.chain,o=n.valueOf;n.before,n.when,n.after,n.observe,n.switchOn;this.exclusiveInteractionRegistry=new e.ContextRegistry,this.modalInteractionRegistry=new e.ContextRegistry,this.inPlaceInteractionRegistry=new e.ContextRegistry,this.modalInteractionRegistry.disableWhen(o.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy()),this.inPlaceInteractionRegistry.disableWhen(o.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active,this.inPlaceInteractionRegistry.active).areTruthy()),this.active=o.any(this.inPlaceInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy(),this.activeInteractionContextIds=i(this.inPlaceInteractionRegistry.interactionContextIds).concat(this.modalInteractionRegistry.interactionContextIds),this.activeModalContext=i(this.modalInteractionRegistry.interactionContexts).first(),this.inModalInteraction=i(this.activeModalContext).isNotNil()}var e;return e=t,t.prototype.isActive=function(){return this.active.value},t.prototype.createModalInteractionContextFor=function(t){return this.createModalInteractionContextDisposedWith(t)},t.prototype.createModalInteractionContextDisposedWith=function(t){return this.modelInteractionContextFactory.createInteractionContext("modal",new e.ApiAdapter(this.placeRouter,this.modalInteractionRegistry))},t.prototype.registerInplaceInteractionContext=function(t){t.initialise("ip"+ ++lt,new e.ApiAdapter(this.placeRouter,this.inPlaceInteractionRegistry))},t.prototype.registerPlaceRouter=function(t){var n=this;g.assert.isFalsey(this.placeRouter),this.placeRouter=t,this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);var i=this;return new ct(this.activeInteractionContextIds,this.activeModalContext,(function(){return i.modelInteractionContextFactory.createInteractionContext("exclusive",new e.ApiAdapter(n.placeRouter,n.exclusiveInteractionRegistry))}))},t.ctorParameters=function(){return[{type:ut}]},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(ut))},token:t,providedIn:"root"}),t=e=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[ut])],t)}(),function(t){var e=function(t){function e(){var e=t.call(this)||this;e._interactions=new p.MutableListModel,e._disabledDelegate=(new p.DelegatingValueModel).withDefault(!1);var n=p.Dsl.disposeWith(e),i=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.active=i(e._interactions).isNotEmpty(),e.interactionContextIds=i(e._interactions).pluck("identifier"),e}return w(e,t),Object.defineProperty(e.prototype,"interactionContexts",{get:function(){return this._interactions.readonly},enumerable:!0,configurable:!0}),e.prototype.start=function(t){this._interactions.push(t)},e.prototype.finish=function(t){this._interactions.remove(t)},e.prototype.isActive=function(){return this.active.value},e.prototype.disableWhen=function(t){this._disabledDelegate.setDelegate(t)},e}(p.GarbageCollector);t.ContextRegistry=e;var n=function(){function t(t,e){this.placeRouter=t,this.contextRegistry=e}return t.prototype.notifyActive=function(t){return g.assert.isTruthy(t.identifier),this.contextRegistry.start(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t.prototype.isNavigationInProgress=function(){return this.placeRouter.navigationInProgress.value},t.prototype.notifyFinished=function(t){return this.contextRegistry.finish(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t}();t.ApiAdapter=n}(t.ɵz||(t.ɵz={}));var pt=function(e){function i(t){var n=e.call(this)||this;return n.interactionService=t,n}return w(i,e),i.prototype.ngAfterViewInit=function(){this.interactionService.registerInplaceInteractionContext(this)},i.prototype.initialise=function(t,e){this.activityContainerComponent.initialise(t,e)},Object.defineProperty(i.prototype,"identifier",{get:function(){return this.activityContainerComponent.identifier},enumerable:!0,configurable:!0}),i.prototype.alert=function(t){return this.activityContainerComponent.alert(t)},i.prototype.cancelActiveActivity=function(){return this.activityContainerComponent.cancelActiveActivity()},i.prototype.confirm=function(t){return this.activityContainerComponent.confirm(t)},i.prototype.confirmOrReject=function(t){return this.activityContainerComponent.confirmOrReject(t)},i.prototype.confirmThen=function(t,e,n){return this.activityContainerComponent.confirmThen(t,e)},i.prototype.isActive=function(){return this.activityContainerComponent.isActive()},i.prototype.startActivity=function(t,e){return this.activityContainerComponent.startActivity(t,e)},i.ctorParameters=function(){return[{type:t.ɵz}]},O([n.ViewChild("activityContainer",{static:!0}),E("design:type",st)],i.prototype,"activityContainerComponent",void 0),i=O([n.Component({selector:"aup-in-place-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}),E("design:paramtypes",[t.ɵz])],i)}(V),dt=function(){function i(){}return i=O([n.NgModule({imports:[e.CommonModule,u.MatButtonModule,f.MatDialogModule,s.MatTabsModule,d.PortalModule,h.RouterModule],declarations:[st,it,nt,et,at,pt],exports:[st,at,pt],entryComponents:[st,it,nt,et],providers:[t.ɵz]})],i)}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=g.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i,o){return F(this,void 0,void 0,(function(){var i;return U(this,(function(o){return this.isMissingFrom(e)&&!n.lastVisitIncluded(e.placeDefinition)?(i=n.getMostRecentVisitFor(e.placeDefinition),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},t}(),function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return w(e,t),e.prototype.isEmptyValue=function(t){return M.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return w(e,t),e.prototype.isEmptyValue=function(t){return M.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=n;var i=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return w(e,t),e.prototype.isEmptyValue=function(t){return M.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!M.isEqual(t,e)},e}(t);t.ArrayParameter=i}(t.ParameterDefinition||(t.ParameterDefinition={}));var ft,ht=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=g.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?M.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!M.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(p.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(p.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.get(n.name).split(",").map((function(t){return t.trim()}));e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=t.get(n.name);n.isRouteId&&M.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[Object]),E("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[Object]),E("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),gt=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){var e=t.call(this)||this;return e.visitModel=new p.MutableValueModel,e._inVisitUpdate=new p.Guard,e}var i;return w(e,t),i=e,e.prototype.initialiseVisit=function(t,e){var n=this;p.assert.isNil(this.visitModel.value);var i=p.Dsl.disposeWith(this).when;this.visitModel.value=t,p.DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name+".visitModel"),this.placeDefinition.getVisitParameterDefs().forEach((function(t){return n.installBinding(t)})),i.valueOf(this.visitModel).changes((function(t,n){e(t,n)}),{unless:this._inVisitUpdate})},e.prototype.updateVisit=function(t){var e=this;p.assert.isTruthy(this.isInitialised()),p.assert.notNil(t),this._inVisitUpdate.whileTrue((function(){e.visitModel.value=t}))},e.prototype.isInitialised=function(){return!!this.visitModel.value},e.prototype.installBinding=function(t){var e=this[t.propertyName];p.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName),this.registerDisposable(new p.Binding(this.visitModel,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return n.replace(t,e)}})).writeRight()},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return i.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),e.prototype.onPlaceReady=function(){},O([I.Memoize(),E("design:type",ht),E("design:paramtypes",[])],e.prototype,"placeDefinition",null),e=i=O([n.Directive(),E("design:paramtypes",[])],e)}(V),(ft=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return p.lang.constructorChain(t).includes(ft)},ft.getRouteParameters=function(t){return g.Klass.get(t).getMetadataList(gt)},ft.getDefinition=function(t){return Reflect.getMetadata("PLACE_DEFINITION_OPTIONS",t)},ft.injectDefinition=function(t,e){Reflect.defineMetadata("PLACE_DEFINITION_OPTIONS",e,t)};var yt,mt,vt=function(){function t(t,e,n){this.component=t,this.navigationSession=e,this.isPrimaryComponent=n}return Object.defineProperty(t.prototype,"routerInteractionAdapter",{get:function(){return this.navigationSession.interactionServiceAdapter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"urlService",{get:function(){return this.navigationSession.urlService},enumerable:!0,configurable:!0}),t.prototype.canDeactivate=function(t,e){return F(this,void 0,void 0,(function(){return U(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return F(this,void 0,void 0,(function(){var t,n;return U(this,(function(i){switch(i.label){case 0:return this.navigationSession.isPopState?this.isPrimaryComponent&&this.routerInteractionAdapter.isModalActive()?(t=this.urlService.getActiveInteractionIdsFromUrl(e.url),n=this.routerInteractionAdapter.getActiveInteractionContextIds(),y.isEqual(n,t)?[3,2]:[4,this.routerInteractionAdapter.cancelCurrentModalInteraction()]):[3,3]:[3,5];case 1:return i.sent(),[2,!1];case 2:return[3,5];case 3:return this.routerInteractionAdapter.isComponentInteracting(this.component)?[4,this.routerInteractionAdapter.cancelComponentInteraction(this.component)]:[3,5];case 4:return i.sent(),[2,!1];case 5:if(this.isNotJustAChangeInRouteId(e)){if(this.component.canDeactivate)return[2,this.component.canDeactivate(this.navigationSession.canDeactivateInteractionContext)];if(this.routerInteractionAdapter.isComponentInteracting(this.component))return console.warn("Route changed while component has active interaction, cancelling navigation"),[2,!1]}return[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}(),bt=function(t){function e(e,n){var i=t.call(this)||this;return i.context=e,i.startingUrl=n,i.debugPropertyKeys=[],i._visits=new Map,i.componentDeactivationHandlers=new Map,i._interactionContext=i.context.routerInteractionAdapter.createExclusiveInteractionContext(),i.onDispose((function(){i._interactionContext&&i._interactionContext.dispose()})),i}return w(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlService",{get:function(){return this.context.urlService},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactionServiceAdapter",{get:function(){return this.context.routerInteractionAdapter},enumerable:!0,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},Object.defineProperty(e.prototype,"canDeactivateInteractionContext",{get:function(){return this._interactionContext},enumerable:!0,configurable:!0}),e.prototype.notifyActive=function(){},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){this.canDeactivateInteractionContext&&this.canDeactivateInteractionContext.isActive()&&this.cancelCanDeactivateInteraction(t)},e.prototype.onPopState=function(t){return this.illegalTransition(t)},e.prototype.onRouterCancelled=function(t){return this.illegalTransition(t)},e.prototype.onRouterError=function(t){return this.illegalTransition(t)},e.prototype.onRouterEnd=function(t){return this.illegalTransition(t)},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return p.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.urlService.getCurrentRouterUrl()},e.prototype.resetBrowserLocation=function(t,e){void 0===e&&(e={replaceCurrent:!1}),this.urlService.resetBrowserLocation(t,e)},e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(t,e){p.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),console.log("replacing "+this.urlService.getCurrentLocationUrlSnapshot().url+" with "+t),this.urlService.resetBrowserLocation(t,{replaceCurrent:!0}),console.log("pushing "+e+" back onto the history."),this.urlService.resetBrowserLocation(e,{replaceCurrent:!1})},e.prototype.ignore=function(t,e){e=e?" -> "+e:"",p.Logger.get(this).info("Ignoring router event"+e+": "+t.constructor.name+" -> "+t.url+" :: "+this.toString())},e.prototype.toString=function(){return this.constructor.name+"("+this.debugState()+")"},e.prototype.debugState=function(t){var e=this;return(t||this.debugPropertyKeys).map((function(t){return t+": "+e[t]})).join(", ")},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){var i,o;return U(this,(function(r){return(i=this.componentDeactivationHandlers.get(t))||(o=0===this.componentDeactivationHandlers.size,i=new vt(t,this,o),this.componentDeactivationHandlers.set(t,i)),[2,i.canDeactivate(e,n).then((function(t){return t})).catch((function(t){throw t}))]}))}))},e.prototype.cancelCanDeactivateInteraction=function(t){p.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachCanDeactivateInteractionContext();p.Logger.get(this).info("cancelling current navigation activity.."),e.cancelActiveActivity().then((function(){e.dispose()})),this.handleCanDeactivateCancelledEventScenario(t)},e.prototype.reinstateUrlAfterAngularChangedItOnCancellation=function(t){this.resetBrowserLocation(t,{replaceCurrent:!0})},e.prototype.detachCanDeactivateInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},e}(p.GarbageCollector),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.handleCanDeactivateCancelledEventScenario=function(t){g.lang.illegalState("onCanDeactivateInteractionCancelled not supported for event clean up states")},e}(bt),It=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.locationChangeTriggerUrl=i,o.isPopState=!1,o.firstCancelHandled=!1,o.popStateHandled=!1,o.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],o}return w(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.locationChangeTriggerUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!1]}))}))},e}(Ct),Rt=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.isPopState=!0,i.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],i.finished=p.Deferred.defer(),i}return w(e,t),e.prototype.onPopState=function(t){this.gotPopState=!0},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){},e.prototype.finishUp=function(){this.context.finishRoutingSession(),this.finished.resolve(!0)},e.prototype.onRouterEnd=function(t){this.gotPopState&&this.finishUp()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){p.lang.illegalState("onCanDeactivateInteractionCancelled not supported for activity context synchronisation since we should never leave a place")},Object.defineProperty(e.prototype,"finishedPromise",{get:function(){return this.finished.promise},enumerable:!0,configurable:!0}),e}(bt),Pt=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.wasTriggeredByPopState=i,o.isPopState=!1,o}return w(e,t),e.prototype.notifyActive=function(){var t=this;setTimeout((function(){t.syncInteractionIdsWithRouter()}))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.syncInteractionIdsWithRouter=function(){var t=this.interactionServiceAdapter.getActiveInteractionContextIds(),e=this.urlService.getCurrentLocationUrlSnapshot().getInteractionIds();if(M.isEqual(t,e))this.context.finishRoutingSession();else if(t.length>e.length){var n=t.length>e.length&&e.length<1;this.addActivityContextToRoute(t,n)}else this.removeActivityContextFromRoute(t)},e.prototype.addActivityContextToRoute=function(t,e){var n=this,i=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);this.context.navigateByUrl(i,{replaceUrl:!e}).then((function(e){n.urlService.getCurrentLocationUrlSnapshot().hasInteractionIds(t)||g.lang.illegalState("Expected url to be "+i.url+" but was "+n.urlService.getCurrentLocationUrl())}))},e.prototype.removeActivityContextFromRoute=function(t){var e=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);if(t.length<1)if(this.wasTriggeredByPopState);else{var n=new Rt(this.context,this.urlService.getCurrentRouterUrl());this.context.transitionTo(n),this.urlService.back()}else this.context.navigateByUrl(e,{replaceUrl:!this.wasTriggeredByPopState})},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){g.lang.methodNotSupported()},e}(bt),St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e}return w(e,t),e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.routerInteractionAdapter.isActive()?this.context.transitionTo(new Pt(this.context,this.startingUrl,!1)):this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new It(this.context,this.startingUrl,t))},e}(bt),At=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.poppedHistoryUrl=i,o.isPopState=!0,o.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],o}return w(e,t),e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(){t.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation.call(this,this.poppedHistoryUrl,this.startingUrl)},e}(bt),Mt=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return w(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.transitionTo(new Pt(this.context,this.poppedHistoryUrl,!1))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.illegalTransition("Leaving interaction after pop-state should't block so should never see a back button click")},e}(At),Dt=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.clickedLinkUrl=i,o.isPopState=!1,o.clickedLinkMatchedBackButtonUrl=!1,o.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","firstCancelEventUrl","clickedLinkMatchedBackButtonUrl","popStateEventUrl"],o}return w(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.firstCancelEventUrl?!this.clickedLinkMatchedBackButtonUrl&&this.popStateEventUrl&&this.finaliseRouting():(this.firstCancelEventUrl=t.url,this.clickedLinkMatchedBackButtonUrl=t.url===this.clickedLinkUrl,this.ignore(t))},e.prototype.onRouterEnd=function(t){this.clickedLinkMatchedBackButtonUrl?this.finaliseRouting():this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.finaliseRouting=function(){return this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!1]}))}))},e}(Ct),wt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl","urlAfterRedirects"],e}return w(e,t),e.prototype.onRouterCancelled=function(t){},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.urlAfterRedirects=t.urlAfterRedirects,this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new Dt(this.context,this.startingUrl,t))},e}(bt);yt=t.NavigationContext||(t.NavigationContext={}),mt=function(t,e,n,i,o){this.urlService=t,this.routerInteractionAdapter=e,this.navigateByUrl=n,this.transitionTo=i,this.finishRoutingSession=o},yt.Impl=mt;var xt,Ot,Tt,Et=function(t){function e(e,n,i,o){var r=t.call(this,e,n)||this;return r.locationChangeTriggerUrl=i,r.poppedHistoryUrl=o,r.isPopState=!1,r.firstCancelHandled=!1,r.popStateHandled=!1,r.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],r}return w(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(this.firstCancelHandled){if(this.popStateHandled){var e=t.url;return this.repairBrowserHistoryAndUrlAfterGuardCancellation(e,this.parentPageUrl),this.resetBrowserLocation(this.startingUrl,{replaceCurrent:!1}),this.context.finishRoutingSession()}}else this.firstCancelHandled=!0,this.parentPageUrl=t.url,this.ignore(t)},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateHandled=!0,this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!1]}))}))},e}(Ct),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new Et(this.context,this.startingUrl,t,this.poppedHistoryUrl))},e}(At);t.ɵbc=function(){function t(){this._archive=new Map,this.placeHistoryDepth=4}var e;return e=t,t.prototype.notifyNavigationStarted=function(){this._activeVisits&&(this.archive(this._activeVisits.visits),this._previousVisits=this._activeVisits)},t.prototype.notifyNavigationFinished=function(t){this._activeVisits=new e.VisitRecord(t)},t.prototype.updateVisit=function(t){p.assert.isTruthy(this._activeVisits),this._activeVisits.update(t)},t.prototype.lastVisitIncluded=function(t){var e;return!!(null===(e=this._previousVisits)||void 0===e?void 0:e.getVisitFor(t))},t.prototype.getMostRecentVisitFor=function(t){return M.first(this.getHistory(t))},t.prototype.getHistory=function(t){var e=this._archive.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._archive.set(t,e)},t.prototype.archive=function(t){var e=this;t.forEach((function(t){var n=e.getHistory(t.placeDefinition),i=M.first(n);i&&!t.hasChangedFrom(i)||(n.unshift(t),e.setHistory(t.placeDefinition,n.slice(0,e.placeHistoryDepth)))}))},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=e=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[])],t)}(),xt=t.ɵbc||(t.ɵbc={}),Ot=function(){function t(t){this.visits=t}return t.prototype.update=function(t){this.visits=this.visits.filter((function(e){return e.placeDefinition!==t.placeDefinition})).concat(t)},t.prototype.getVisitFor=function(t){return this.visits.find((function(e){return e.placeDefinition===t}))},t}(),xt.VisitRecord=Ot,t.UrlSnapshot=function(){function t(t,e){this.urlSerializer=t,this.url=e,this.urlTree=t.parse(e)}return t.prototype.updateVisitSegments=function(e){var n=this.urlSerializer.parse(this.url),i=j(this.getPrimarySegments(n)),o=this.getSegmentsFor(e),r=i.findIndex((function(t){return t.path===o[0].path}));return i.splice.apply(i,j([r,o.length],o)),n.root.children.primary.segments=i,new t(this.urlSerializer,n.toString())},t.prototype.getPrimarySegments=function(t){return this.urlTree.root.children.primary.segments},t.prototype.getSegmentsFor=function(t){return t.placeDefinition.hasRouteId()?[new h.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new h.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new h.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.includesPathOf=function(t){return this.getPrimarySegments(this.urlTree).find((function(e){return e.path===t.path}))},t.prototype.getInteractionIds=function(){var e=this.urlTree.queryParams[t.INTERACTION_QUERY_PARAM];return e?t.parseInteractionIds(e):[]},t.prototype.hasInteractions=function(){return this.getInteractionIds().length>0},t.prototype.hasInteractionIds=function(t){return M.isEqual(this.getInteractionIds(),t)},t.prototype.updateInteractionIds=function(e){if(0===e.length)return this.removeInteractionIds();var n=this.urlSerializer.parse(this.url);return n.queryParams[t.INTERACTION_QUERY_PARAM]=t.createPathIdFor(e),new t(this.urlSerializer,n.toString())},t.prototype.removeInteractionIds=function(){var e=this.urlSerializer.parse(this.url);return e.queryParams&&e.queryParams[t.INTERACTION_QUERY_PARAM]&&(e.queryParams={}),new t(this.urlSerializer,e.toString())},t.prototype.toString=function(){return"UrlSnapshot("+this.url+")"},t}(),(Tt=t.UrlSnapshot||(t.UrlSnapshot={})).INTERACTION_QUERY_PARAM="aup-interactions",Tt.INTERACTION_ID_SEPARATOR="--",Tt.parseInteractionIds=function(t){return t.split(Tt.INTERACTION_ID_SEPARATOR)},Tt.createPathIdFor=function(t){return t.join(Tt.INTERACTION_ID_SEPARATOR)};var Ut=function(){function i(t,e,n){this.angularRouter=t,this.angularLocation=e,this.urlSerializer=n}return i.prototype.parseUrl=function(e){return new t.UrlSnapshot(this.urlSerializer,e)},i.prototype.createUrlSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return e.forEach((function(e){i.push(t.parseUrl(""+e.placeDefinition.path).updateVisitSegments(e).url)})),this.parseUrl(i.join(""))},i.prototype.getCurrentRouterUrl=function(){return this.angularRouter.routerState?this.angularRouter.routerState.snapshot.url:null},i.prototype.getCurrentLocationUrl=function(){return this.angularLocation.path()},i.prototype.getCurrentLocationUrlSnapshot=function(){return this.parseUrl(this.getCurrentLocationUrl())},i.prototype.getCurrentRouterSnapshot=function(){return this.parseUrl(this.getCurrentRouterUrl())},i.prototype.getActiveInteractionIdsFromUrl=function(t){return this.parseUrl(t).getInteractionIds()},i.prototype.hasActiveInteractions=function(t){return this.getActiveInteractionIdsFromUrl(t).length>0},i.prototype.resetBrowserLocation=function(t,e){e.replaceCurrent?this.angularLocation.replaceState(t):this.angularLocation.go(t)},i.prototype.back=function(){this.angularLocation.back()},i.ctorParameters=function(){return[{type:h.Router},{type:e.Location},{type:h.UrlSerializer}]},i.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(h.Router),n.ɵɵinject(e.Location),n.ɵɵinject(h.UrlSerializer))},token:i,providedIn:"root"}),i=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[h.Router,e.Location,h.UrlSerializer])],i)}(),_t=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!y.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,x(x({},this.visitParameters),((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)i.includes(t.name)&&(o[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(o[t.name]=r)}})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=y.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!y.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t.prototype.toDebugString=function(){var t=this;return Object.keys(this.visitParameters).map((function(e){return e+"="+t.visitParameters[e]})).join(",")},t}(),jt=function(i){function o(e,n,o,r,a){var s=i.call(this)||this;s.angularRouter=e,s.angularLocation=n,s.interactionService=o,s.urlService=r,s.placeHistory=a,s.navigationSessionModel=new p.MutableValueModel,s._activeVisits=new p.MutableListModel,s.sessionFinishedJobs=[],s.routerInteractionAdapter=o.registerPlaceRouter(s),s.navigationContext=new t.NavigationContext.Impl(s.urlService,s.routerInteractionAdapter,(function(t,e){return s.navigateByUrl(t,e)}),(function(t){s.transitionTo(t)}),(function(t){s.routingSessionFinished(t)}));var c=p.Dsl.disposeWith(s),u=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;s.navigationInProgress=u(s.navigationSessionModel).isNotNil();var l=u(s.interactionService.active).map((function(t){return t?"IdleDuringInteraction":"Idle"}));return s.navigationSessionName=u(s.navigationSessionModel).pluck("name").otherwise(l),p.DebugContext.tag(s._activeVisits,"PlaceRouter.activeVisits"),s.activeVisitsByPlaceDefinition=u(s._activeVisits).indexBy("placeDefinition"),e.events.subscribe((function(t){t instanceof h.NavigationStart&&("popstate"===t.navigationTrigger?s.onPopState(t):s.onRouterStarted(t)),t instanceof h.NavigationEnd&&s.onRouterEnd(t),t instanceof h.NavigationError&&s.onRouterError(t),t instanceof h.NavigationCancel&&s.onRouterCancelled(t)})),n.onUrlChange((function(t){return s.onUrlChanged(t)})),s}return w(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this.navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"currentSession",{get:function(){return this.navigationSessionModel.value},enumerable:!0,configurable:!0}),o.prototype.onPopState=function(t){if(p.assert.isTruthy("popstate"===t.navigationTrigger),this.currentSession)this.currentSession.onPopState(t);else{var e=t.url,n=this.urlService.getCurrentRouterUrl(),i=this.interactionService.isActive()?new Mt(this.navigationContext,n,e):new Ft(this.navigationContext,n,e);this.transitionTo(i)}},o.prototype.onRouterStarted=function(t){p.assert.isFalsey("popstate"===t.navigationTrigger);this.interactionService.isActive();this.currentSession?this.currentSession.onRouterStarted(t):this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()))},o.prototype.onUrlChanged=function(t){this.currentSession?this.currentSession.onUrlChange(t):console.log("FYI: url changed without a navigation session in progress")},o.prototype.onRouterCancelled=function(t){this.currentSession.onRouterCancelled(t)},o.prototype.onRouterError=function(t){this.currentSession.onRouterError(t)},o.prototype.onRouterEnd=function(t){this.currentSession.onRouterEnd(t)},o.prototype.navigate=function(t,e){var n=this;return this.doNavigation(t,(function(i){return F(n,void 0,void 0,(function(){var n;return U(this,(function(i){switch(i.label){case 0:return n=j([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.angularRouter.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))}))},o.prototype.doNavigation=function(t,e){return F(this,void 0,void 0,(function(){var n;return U(this,(function(i){switch(i.label){case 0:this.navigationInProgress.value&&p.lang.illegalState("Navigation already in progress"),(n=this.createNavigationSession(this.urlService.getCurrentRouterUrl())).storeVisit(t),this.transitionTo(n),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,e(this.angularRouter)];case 2:return i.sent(),[3,4];case 3:return!this.angularRouter.getCurrentNavigation()&&this.currentSession&&this.currentSession.onRouterEnd(new h.NavigationEnd(-1,"","")),[7];case 4:return[2]}}))}))},o.prototype.navigateByUrl=function(t,e){return this.angularRouter.navigateByUrl(t.urlTree,e)},Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.pushVisitChangesToRoute=function(t,e){return F(this,void 0,void 0,(function(){var n=this;return U(this,(function(i){return this.placeHistory.updateVisit(e),e.hasRoutingChangedFrom(t)?[2,this.doNavigation(e,(function(t){var i=n.urlService.parseUrl(n.angularRouter.routerState.snapshot.url).updateVisitSegments(e);return n.navigateByUrl(i)}))]:[2]}))}))},o.prototype.createNavigationSession=function(t){return this.interactionService.isActive()?new St(this.navigationContext,t):new wt(this.navigationContext,t)},o.prototype.transitionTo=function(t){var e=this.navigationSessionModel.value;e||this.placeHistory.notifyNavigationStarted(),p.assert.isTruthy(t!==e),p.Logger.get(this).info("### Router State Transition: "+(e?e.toString():"null")+" -> "+t.toString()),this.navigationSessionModel.value=t,e&&e.dispose(),t.notifyActive()},o.prototype.routingSessionFinished=function(t){t&&t.length>0&&(p.assert.isTruthy(this.navigationInProgress.value),this.placeHistory.notifyNavigationFinished(t),this._activeVisits.value=t);var e=this.currentSession;e.dispose(),this.navigationSessionModel.value=null,console.log("### Router Session Finished (was "+e.toString()+")"),this.sessionFinishedJobs.forEach((function(t){return t()})),this.sessionFinishedJobs=[]},o.prototype.runAfterRoutingSessionFinishes=function(t){p.assert.isTruthy(this.navigationInProgress),this.sessionFinishedJobs.push(t)},o.prototype.syncInteractionContextIdsWithRouter=function(){var t=this;if(this.navigationSession){this.navigationSession;return new Promise((function(e,n){t.runAfterRoutingSessionFinishes((function(){t.runAfterRoutingSessionFinishes(e);var n=new Pt(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(n)}))}))}return new Promise((function(e,n){t.runAfterRoutingSessionFinishes(e);var i=new Pt(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(i)}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.ctorParameters=function(){return[{type:h.Router},{type:e.Location},{type:t.ɵz},{type:Ut},{type:t.ɵbc}]},o.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(h.Router),n.ɵɵinject(e.Location),n.ɵɵinject(t.ɵz),n.ɵɵinject(Ut),n.ɵɵinject(t.ɵbc))},token:o,providedIn:"root"}),O([p.Trace(),E("design:type",Function),E("design:paramtypes",[_t,_t]),E("design:returntype",Promise)],o.prototype,"pushVisitChangesToRoute",null),o=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[h.Router,e.Location,t.ɵz,Ut,t.ɵbc])],o)}(p.GarbageCollector),Nt=new n.InjectionToken("AUP_PLACE_CONFIG"),Vt=P.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),kt=[P.query(":enter, :leave",Vt,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(-100%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(100%)"}))],{optional:!0})])],Lt=[P.query(":enter, :leave",Vt,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(100%)",minHeight:"1px"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function Bt(t){return P.trigger("routeAnimations",[P.transition(":increment",Lt,{params:{duration:t}}),P.transition(":decrement",kt,{params:{duration:t}})])}var Ht,qt=Bt("0.3s"),zt=function(t){function e(e,i,o,r){var a=t.call(this)||this;a.router=e,a.placeRouter=i,a.placeConfig=o,a.placeChanged=new n.EventEmitter,a.outletActivated=new p.MutableValueModel(!1),a._activatedRouteModel=new p.MutableValueModel,a._activePlaceModel=new p.MutableValueModel,a.initialPlaceIndex=null,a._isPushingVisitToRoute=new p.MutableValueModel(!1);var s=p.Dsl.disposeWith(a),c=s.chain,u=(s.valueOf,s.before,s.when);s.after,s.observe,s.switchOn;a.parentOutletModel=new p.MutableValueModel(r);var l=c(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),d=c(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=c(a.customPlaceAnimationOrderModel).otherwise(l).reduce((function(t){var e=0;return d.value&&(e=t.indexOf(d.value),y.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),y.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:d}),a._activePlaceDefinition=c(a._activePlaceModel).pluck("placeDefinition"),a.routerVisitModel=a._activePlaceDefinition.findIn(c(i.activeVisitsByPlaceDefinition)),a.navigationInProgress=c(a.placeRouter.navigationInProgress),u.valueOf(a.navigationInProgress).becomesFalsey((function(){a.checkStateAndInitialise()})),u.valueOf(a.outletActivated).becomesTruthy((function(){a.checkStateAndInitialise()})),c(a._activePlaceModel).postponeWhile(a.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),a}return w(e,t),e.prototype.ngOnInit=function(){},e.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),e.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlaceModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),e.prototype.onOutletActivated=function(t,e){this._activatedRouteModel.value=t.activatedRoute,this._activePlaceModel.value=e,this.outletActivated.value=!0,this.checkStateAndInitialise()},e.prototype.onOutletDeactivated=function(){this.outletActivated.value=!1,this._activePlaceModel.value=null,this._activatedRouteModel.value=null},e.prototype.checkStateAndInitialise=function(){var t=this.routerVisitModel.value,e=this.activePlaceModel.value;t&&e&&!e.isInitialised()&&(t.placeDefinition!==e.placeDefinition&&p.lang.illegalState("wrong visit!!!"),this.initialisePlace(t,e))},e.prototype.initialisePlace=function(t,e){var n=this,i=new p.MutableValueModel(t);p.DebugContext.tag(i,"PlaceOutletComponent["+e.constructor.name+")].visitModel"),e.initialiseVisit(t,(function(t,e){n.pushVisitChangeToRoute(e,t)})),this.animateModel.value||this.animationDone();var o=p.Dsl.disposeWith(e),r=o.when,a=(o.chain,o.valueOf);r.valueOf(this.routerVisitModel).changes((function(t){e.updateVisit(t)}),{unless:a.any(this._isPushingVisitToRoute,this.routerVisitModel.isNil()).areTruthy()})},e.prototype.pushVisitChangeToRoute=function(t,e){var n=this;this._isPushingVisitToRoute.value=!0,this.placeRouter.pushVisitChangesToRoute(t,e).finally((function(){n._isPushingVisitToRoute.value=!1}))},e.prototype.animationStarted=function(){},e.prototype.animationDone=function(){this._activePlaceModel.value&&this._activePlaceModel.value.onPlaceReady()},e.ctorParameters=function(){return[{type:h.Router},{type:jt},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Nt]}]},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},O([n.Input(),p.StoreInValueModel("animateModel"),E("design:type",Boolean)],e.prototype,"animate",void 0),O([n.Input(),p.UseDelegate({defaultValue:!0}),E("design:type",p.ValueModel)],e.prototype,"animateModel",void 0),O([n.Input("placeAnimationOrderModel"),p.UseDelegate(),E("design:type",p.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),O([n.Input("placeAnimationOrder"),p.StoreInListModel("customPlaceAnimationOrderModel"),E("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"placeChanged",void 0),O([n.ViewChild("routeOutlet",{static:!0}),E("design:type",h.RouterOutlet)],e.prototype,"routerOut",void 0),e=O([n.Component({selector:"aup-place-outlet",template:'<ng-container *ngIf="animateModel.value">\n <div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n >\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf="!animateModel.value">\n <div class="router-outlet-container">\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n',animations:[qt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}),T(2,n.Optional()),T(2,n.Inject(Nt)),T(3,n.SkipSelf()),T(3,n.Optional()),E("design:paramtypes",[h.Router,jt,Object,e])],e)}(V),Gt=function(e){function i(n){var i=e.call(this)||this;i._activePlaceComponent=new p.DelegatingValueModel;var o=p.Dsl.disposeWith(i),r=o.chain,a=(o.valueOf,o.before,o.when);o.after,o.observe,o.switchOn;return i.placeDefinitions=r(i.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),i.commandFactory=p.Command.createFactory((function(t){i.placeOutlet.navigate(new _t(t))})),a.valueOf(i.placeOutletModel).changes((function(t){setTimeout((function(){return i._activePlaceComponent.setDelegate(t?t.activePlaceModel:null)}))})),i.activePlaceDefinition=r(i._activePlaceComponent).pluck("placeDefinition"),i}return w(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.ctorParameters=function(){return[{type:jt}]},O([n.Input(),p.StoreInListModel("placesModel"),E("design:type",Array)],i.prototype,"places",void 0),O([n.Input(),p.UseDelegate(),E("design:type",p.ListModel)],i.prototype,"placesModel",void 0),O([n.Input(),p.StoreInValueModel("placeOutletModel"),E("design:type",zt)],i.prototype,"placeOutlet",void 0),O([n.Input(),p.UseDelegate(),E("design:type",p.ValueModel)],i.prototype,"placeOutletModel",void 0),O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[ht]),E("design:returntype",Object)],i.prototype,"getNav",null),i=O([n.Component({template:""}),E("design:paramtypes",[jt])],i)}(V),Wt=function(){function t(){}return t.prototype.ngOnInit=function(){},O([n.Input(),p.UseDelegate(),E("design:type",p.ValueModel)],t.prototype,"busyModel",void 0),O([n.Input(),p.StoreInValueModel("busyModel"),E("design:type",Boolean)],t.prototype,"busy",void 0),t=O([n.Component({selector:"aup-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}),E("design:paramtypes",[])],t)}(),Kt=function(){function t(){}return t.prototype.ngOnInit=function(){},t=O([n.Component({selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}),E("design:paramtypes",[])],t)}(),Xt=function(t){function e(e){var n=t.call(this,e)||this;return n.expanded=!0,n}return w(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.ctorParameters=function(){return[{type:jt}]},O([n.HostBinding("class.expanded"),E("design:type",Object)],e.prototype,"expanded",void 0),e=O([n.Component({selector:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}),E("design:paramtypes",[jt])],e)}(Gt),Yt=function(t){function e(e){return t.call(this,e)||this}return w(e,t),e.ctorParameters=function(){return[{type:jt}]},e=O([n.Component({selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}),E("design:paramtypes",[jt])],e)}(Gt),Zt=function(){function t(){}return t=O([n.NgModule({imports:[e.CommonModule,c.BrowserAnimationsModule,m.MatProgressSpinnerModule,h.RouterModule,s.MatTabsModule,v.MatListModule,b.MatTooltipModule,l.MatIconModule,L],declarations:[Kt,Wt,zt,Yt,Xt,Gt],entryComponents:[Wt],exports:[Wt,zt,Kt,Yt,Xt,Gt],providers:[]})],t)}(),Jt=function(){function t(){}return t=O([n.NgModule({declarations:[],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,L,Q,Zt,dt],exports:[dt,Zt,L,Q,W]})],t)}(),Qt=P.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),$t=P.trigger("slideDownOnEnter",[P.transition(":enter",[Qt,P.animate("{{duration}}")],{params:{duration:"100ms"}}),P.transition(":leave",[P.animate("{{duration}}",Qt)],{params:{duration:"100ms"}})]),te=P.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),ee=P.trigger("slideRightOnEnter",[P.transition(":enter",[te,P.animate("{{duration}}")],{params:{duration:"100ms"}}),P.transition(":leave",[P.animate("{{duration}}",te)],{params:{duration:"100ms"}})]),ne=function(t,e){this.width=t,this.height=e},ie=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return w(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new ie(t.clientX-this.left,t.clientY-this.top):new ie(t.x-this.left,t.y-this.top)},e}(ne),(Ht=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Ht(e.top,e.left,e.width,e.height)};var oe=function(e){function i(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new p.ValueHolder(new t.Bounds(0,0,0,0)),o}return w(i,e),i.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new S((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(i.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),i.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(i.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),i.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},i.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},i=O([n.Directive(),E("design:paramtypes",[n.ElementRef,n.NgZone])],i)}(V),re=function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.identifier=e,r.api=n,r.dialogService=i,r.config=o,r.garbage=new p.GarbageCollector,g.assert.notNil(i),r}return w(e,t),e.prototype.cancelActiveActivity=function(){return this.activityContainer.cancelActiveActivity()},e.prototype.dispose=function(){this.isActive()&&p.lang.illegalState("Dispose called while active."),this.garbage.dispose()},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.isActive=function(){return!!this.activityContainer&&this.activityContainer.isActive()},e.prototype.createAndLaunchActivity=function(t,e,n){var i=this;g.assert.isNil(this._currentActivityRef);var o=x(x({},this.config),{disableClose:n,panelClass:"dialog-interaction-context"}),r=this.dialogService.open(st,o),a=this.activityContainer=r.componentInstance;this.activityContainer.initialise(this.identifier,this.api);var s=this.activityContainer.startActivity(t,e);return s.finally((function(){return r.close()})),r.afterClosed().subscribe((function(t){a.isActive()&&a.cancelActiveActivity(),i.activityContainer=null})),r.updateSize(),r.afterOpened().subscribe((function(t){r.updateSize()})),s},e}(ot),ae=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),se=function(t){function e(e,n,i){var o=t.call(this)||this;return o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,g.assert.notNil(e),o}return w(e,t),e.prototype.createInteractionContext=function(t,e){var n=x(x({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig),this.dialogServiceDefaults);return new re(t,e,this.dialogService,n)},e.ctorParameters=function(){return[{type:f.MatDialog},{type:f.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[ae]}]},{type:f.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[f.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(f.MatDialog),n.ɵɵinject(ae,8),n.ɵɵinject(f.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e=O([n.Injectable({providedIn:"root"}),T(1,n.Optional()),T(1,n.Inject(ae)),T(2,n.Optional()),T(2,n.Inject(f.MAT_DIALOG_DEFAULT_OPTIONS)),E("design:paramtypes",[f.MatDialog,f.MatDialogConfig,f.MatDialogConfig])],e)}(ut);var ce,ue,le,pe,de=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new fe(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),O([C.Memoize(),E("design:type",Array),E("design:paramtypes",[])],t.prototype,"keys",null),t}(),fe=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}(),he=function(){function t(){}return t.prototype.canActivate=function(t,e){return F(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!0]}))}))},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[])],t)}(),ge=function(){function t(t,e,n,i,o){this.navigationSession=t,this.activatedRoute=e,this.router=n,this.placeHistory=i,this.injector=o}return t.prototype.sanitise=function(t){return F(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return U(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},O([p.Trace(),E("design:type",Function),E("design:paramtypes",[_t]),E("design:returntype",Promise)],t.prototype,"sanitise",null),t}(),ye=function(){function e(t,e,n,i,o,r){this.router=t,this.urlService=e,this.placeRouter=n,this.placeHistory=i,this.interactionService=o,this.injector=r}return e.prototype.canActivate=function(t,e){return F(this,void 0,void 0,(function(){var n=this;return U(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return F(n,void 0,void 0,(function(){var n,o=this;return U(this,(function(r){switch(r.label){case 0:return[4,this.cleanInteractionState(t,e,(function(){return F(o,void 0,void 0,(function(){var n,o,r,a,s;return U(this,(function(c){switch(c.label){case 0:return n=new de(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationSession,a=r.getVisitFor(i)||new _t(i,o),[4,new ge(r,t,this.router,this.placeHistory,this.injector).sanitise(a.mergeRouteParameters(o))];case 1:return s=c.sent(),r.storeVisit(s),a.hasRoutingChangedFrom(s)?[2,this.urlService.parseUrl(e.url).updateVisitSegments(s)]:[2,!0]}}))}))}))];case 1:return n=r.sent(),[2,this.handleGuardResult(n)]}}))}))}))]}))}))},e.prototype.canDeactivate=function(t,e,n,i){return F(this,void 0,void 0,(function(){var e,o,r;return U(this,(function(a){switch(a.label){case 0:return e=this.urlService.parseUrl(n.url),o=this.urlService.parseUrl(i.url),[4,this.placeRouter.navigationSession.canDeactivatePlace(t,e,o)];case 1:return r=a.sent(),[2,this.handleGuardResult(r)]}}))}))},e.prototype.handleGuardResult=function(e){return e instanceof t.UrlSnapshot?e.urlTree:e},e.prototype.authorisePlaceThen=function(e,n,i){return F(this,void 0,void 0,(function(){var o,r,a;return U(this,(function(s){switch(s.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.isAuthorised(e,n)]:[3,2]:[3,4];case 1:return a=s.sent(),[3,3];case 2:a=!0,s.label=3;case 3:return!0===(r=a)?[2,i(o)]:(console.log("not authorised result",r),[2,r]);case 4:return[2,p.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return F(this,void 0,void 0,(function(){var n;return U(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof A.Observable?n.toPromise():n]}))}))},e.prototype.cleanInteractionState=function(t,e,n){return F(this,void 0,void 0,(function(){var t;return U(this,(function(i){return t=this.urlService.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractions()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();function me(t,e,n,i,o){var r={backingModel:n,binding:null},a=i+"("+t.constructor.name+"."+e.toString()+")";p.DebugContext.get(r.backingModel).tag(a),p.Logger.get(r.backingModel).tag(a),Object.defineProperty(t,e,{get:function(){return r.backingModel},set:function(t){r.binding&&r.binding.dispose(),t&&(r.binding=new p.Binding(r.backingModel,t),o(t)?r.binding.writeRight():(o(r.backingModel)||console.warn("Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden"),r.binding.writeLeft()))}})}ce=t.Formatter||(t.Formatter={}),ue=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),le=function(){function t(){}return t.prototype.format=function(t){return M.isNumber(t)&&!M.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return M.isNaN(e)?null:e},t}(),pe=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),ce.STRING=new ue,ce.NUMBER=new le,ce.BOOLEAN=new pe,t.ACTIVITY_DATA=$,t.AUP_PLACE_CONFIG=Nt,t.AbstractInputComponent=B,t.AbstractInteractionContext=ot,t.AbstractPlaceNavigationComponent=Gt,t.AbstractPopStateNavigation=At,t.Activity=tt,t.ActivityContainerComponent=st,t.ActivityOutletComponent=at,t.ActivityRef=rt,t.AlertDialogComponent=et,t.AngularUiPowerupsModule=Jt,t.BusyOverlayComponent=Wt,t.CommandDirective=N,t.ComponentsModule=Q,t.ConfirmThenDialogComponent=nt,t.ConfirmationDialogComponent=it,t.ConsolidatedParameterMap=de,t.DEFINITION_META_DATA_KEY="PLACE_DEFINITION_OPTIONS",t.DIALOG_INTERACTION_SERVICE_DEFAULTS=ae,t.DialogInteractionContext=re,t.DialogInteractionContextFactory=se,t.Dimension=ne,t.DirectivesModule=L,t.DisposableComponent=V,t.EmptyStateComponent=Kt,t.EventCleanUpSession=Ct,t.FocusBindingDirective=k,t.InPlaceInteractionContextComponent=pt,t.InteractionModule=dt,t.InteractionService=t.ɵz,t.InteractionServiceRoutingAdapter=ct,t.LEFT_RIGHT_PLACE_ANIMATION=qt,t.ListPlaceNavComponent=Xt,t.ModalInteractionContextFactory=ut,t.Navigating=wt,t.NavigatingDuringInteraction=St,t.NavigationSession=bt,t.NoopAuthGuard=he,t.NoopComponent=W,t.NumberInputComponent=H,t.PasswordInputComponent=q,t.Place=function(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new ht(n,e.path,!!y.isNil(e.authenticate)||e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):p.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}},t.PlaceComponentDeactivationHandler=vt,t.PlaceDefinition=ht,t.PlaceGuard=ye,t.PlaceHistory=t.ɵbc,t.PlaceModule=Zt,t.PlaceOutletComponent=zt,t.PlaceRouter=jt,t.Point=ie,t.PopStateDuringInteractionNavigation=Mt,t.PopStateNavigation=Ft,t.ROUTE_PARAMETER_LIST_KEY=gt,t.RemoveLastInteractionFromUrlNavigationSession=Rt,t.ResizeAwareComponent=oe,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);g.Klass.get(i).addToOwnMetadataList(gt,r),me(i,o,new p.MutableValueModel,"@RouteId",(function(t){return t.query().isNil()}))}},t.ScrollContainerComponent=K,t.SelectInputComponent=z,t.StringInputComponent=G,t.SwitchCaseComponent=J,t.SwitchCaseDefaultDirective=Z,t.SwitchCaseOption=X,t.SwitchCaseWhenDirective=Y,t.SynchroniseInteractionContextIdsWithRoute=Pt,t.TabbedPlaceNavigationComponent=Yt,t.UrlService=Ut,t.Visit=_t,t.VisitParameter=function(e){var n=g.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));g.Klass.get(i).addToOwnMetadataList(gt,r),me(i,o,new p.MutableValueModel,"@VisitParameter",(function(t){return t.query().isNil()}))}},t.VisitParameterList=function(e){var n=g.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));g.Klass.get(i).addToOwnMetadataList(gt,r),me(i,o,new p.MutableListModel,"@VisitParameterList",(function(t){return t.query().isEmpty()}))}},t.VisitSanitiser=ge,t.WaitUntilLeavingInteractionTransitionCancelled=It,t.WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish=Dt,t.WaitUntilPopStateDuringCanDeactivateInteractionFinishes=Et,t.leftRightPlaceAnimation=Bt,t.slideDownOnEnterAnimation=$t,t.slideRightOnEnterAnimation=ee,t.ɵa=L,t.ɵb=N,t.ɵba=ut,t.ɵbb=Ut,t.ɵbd=Yt,t.ɵbe=Gt,t.ɵbf=Xt,t.ɵbg=dt,t.ɵbh=st,t.ɵbi=ot,t.ɵbj=at,t.ɵbk=it,t.ɵbl=$,t.ɵbm=tt,t.ɵbo=nt,t.ɵbp=et,t.ɵbr=pt,t.ɵc=k,t.ɵd=V,t.ɵe=Q,t.ɵf=H,t.ɵg=B,t.ɵh=G,t.ɵi=q,t.ɵj=z,t.ɵk=K,t.ɵl=W,t.ɵm=X,t.ɵn=Y,t.ɵo=Z,t.ɵp=J,t.ɵq=Zt,t.ɵr=Kt,t.ɵs=Wt,t.ɵt=zt,t.ɵu=Bt,t.ɵv=qt,t.ɵw=Nt,t.ɵy=jt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
+
var w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function x(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var D=function(){return(D=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function O(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function T(t,e){return function(n,i){e(n,i,t)}}function E(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function F(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function _(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function j(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function U(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(j(arguments[e]));return t}var N=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new p.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return x(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){p.assert.notNil(this.pectinCommand),this.pectinCommand instanceof p.UnaryCommand?this._commandParameterProvided||p.lang.illegalState("UnaryCommands require the command parameter to be specified."):this._commandParameterProvided&&p.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;p.Dsl.disposeWith(this).when.valueOf(this._commandEnabled).changes((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}),{initialValue:"triggerChange"})},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof p.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},O([n.Input(),E("design:type",Object),E("design:paramtypes",[Object])],e.prototype,"pectinCommand",null),O([n.Input(),E("design:type",Object),E("design:paramtypes",[Object])],e.prototype,"commandParameter",null),O([n.HostListener("click",["$event"]),E("design:type",Function),E("design:paramtypes",[Event]),E("design:returntype",void 0)],e.prototype,"notifyClick",null),e=O([n.Directive({selector:"[pectinCommand]"}),T(0,n.Inject(n.ElementRef)),E("design:paramtypes",[n.ElementRef])],e)}(p.GarbageCollector),V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e=O([n.Directive()],e)}(p.GarbageCollector),k=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return x(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?p.Dsl.disposeWith(this).when.valueOf(this.pectinFocusBinding.focusContext.focused).changes((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()}),{initialValue:"triggerChange"}):p.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(p.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):p.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},O([n.Input(),E("design:type",Object)],i.prototype,"pectinFocusBinding",void 0),O([n.Input(),E("design:type",HTMLElement)],i.prototype,"focusBindingTarget",void 0),O([n.HostListener("focusin"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],i.prototype,"onFocusIn",null),O([n.HostListener("focusout"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],i.prototype,"onFocusOut",null),i=O([n.Directive({selector:"[pectinFocusBinding]"}),T(0,n.Inject(n.ElementRef)),T(1,n.Inject(n.NgZone)),T(2,n.Inject(e.DOCUMENT)),E("design:paramtypes",[n.ElementRef,n.NgZone,Object])],i)}(V),L=function(){function t(){}return t=O([n.NgModule({declarations:[N,k],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule],exports:[N,k]})],t)}(),B=function(t){function e(){var e=t.call(this)||this;e.delegatingFormValueModel=e.registerDisposable(new p.DelegatingFormValueModel),e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return x(e,t),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.delegatingFormValueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.delegatingFormValueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),O([n.Input(),E("design:type",String)],e.prototype,"label",void 0),O([n.Input(),E("design:type",String)],e.prototype,"floatLabel",void 0),O([n.Input(),E("design:type",String)],e.prototype,"hint",void 0),O([n.Input(),E("design:type",String)],e.prototype,"placeholder",void 0),O([n.Input("command.focus"),E("design:type",p.Command)],e.prototype,"focusCommand",void 0),O([n.Input("command.blur"),E("design:type",p.Command)],e.prototype,"blurCommand",void 0),O([n.Input("command.enter"),E("design:type",p.Command)],e.prototype,"enterCommand",void 0),O([n.Input("command.escape"),E("design:type",p.Command)],e.prototype,"escapeCommand",void 0),O([n.Input("command.click"),E("design:type",p.Command)],e.prototype,"clickCommand",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"focus",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"blur",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"enterKey",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"escapeKey",void 0),O([n.HostListener("click"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"notifyClick",null),O([n.HostListener("focusin"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"notifyFocusIn",null),O([n.HostListener("focusout"),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"notifyFocusOut",null),e=O([n.Component({template:""}),E("design:paramtypes",[])],e)}(V),H=function(t){function e(){return t.call(this)||this}return x(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.TrackExternal({delegateTo:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),e=O([n.Component({selector:"aup-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}),E("design:paramtypes",[])],e)}(B),q=function(t){function e(){return t.call(this)||this}return x(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.TrackExternal({delegateTo:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),e=O([n.Component({selector:"aup-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}),E("design:paramtypes",[])],e)}(B),z=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return x(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.TrackExternal({delegateTo:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),O([n.Input(),p.TrackExternal(),E("design:type",p.ListModel)],e.prototype,"optionsModel",void 0),O([n.Input(),p.StoreInListModel("optionsModel"),E("design:type",Array)],e.prototype,"options",void 0),O([n.Input(),E("design:type",Object)],e.prototype,"optionLabel",void 0),O([n.Input(),E("design:type",Boolean)],e.prototype,"allowNil",void 0),O([n.ContentChild("optionTemplate"),E("design:type",n.TemplateRef)],e.prototype,"optionTemplateRef",void 0),O([n.ContentChild("nilOptionTemplate"),E("design:type",n.TemplateRef)],e.prototype,"nilOptionTemplateRef",void 0),O([n.Input(),E("design:type",Function)],e.prototype,"optionLabelFormat",void 0),e=O([n.Component({selector:"aup-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngIf="allowNil">{{placeholder}}</mat-option>\n <mat-option *ngFor="let option of optionsModel.value; let i = index" [value]="option">\n <ng-container *ngIf="!optionTemplateRef">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf="optionTemplateRef"\n [ngTemplateOutlet]="optionTemplateRef"\n [ngTemplateOutletContext]="{ $implicit: option, index: i }"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}),E("design:paramtypes",[])],e)}(B),G=function(t){function e(){var e=t.call(this)||this,n=p.Dsl.disposeWith(e),i=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.clearCommand=p.Command.create((function(){e.valueModel.value=null})),e.clearCommand.disableWhile(i.stringValue(e.valueModel).isBlank()),e}return x(e,t),e.prototype.ngOnInit=function(){},O([n.Input(),p.TrackExternal({delegateTo:"delegatingFormValueModel"}),E("design:type",Object)],e.prototype,"valueModel",void 0),O([n.Input(),p.TrackExternal({defaultValue:!1}),E("design:type",p.ValueModel)],e.prototype,"enableClearModel",void 0),O([n.Input(),p.StoreInValueModel("enableClearModel"),E("design:type",Boolean)],e.prototype,"enableClear",void 0),e=O([n.Component({selector:"aup-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf="enableClear" [pectinCommand]="clearCommand">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}"]}),E("design:paramtypes",[])],e)}(B),W=function(){function t(){}return t=O([n.Component({selector:"aup-noop",template:"",styles:[":host{display:block}"]}),E("design:paramtypes",[])],t)}(),K=function(){function t(){}return t.prototype.ngOnInit=function(){},t=O([n.Component({selector:"aup-scroll-container",template:'<div class="container">\n <ng-content></ng-content>\n</div>\n',styles:[":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]}),E("design:paramtypes",[])],t)}(),X=function(){function t(t){this.templateRef=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),t}(),Y=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!1,n}var i;return x(e,t),i=e,e.prototype.matches=function(t){return this.aupSwitchCaseWhen===t},e.ctorParameters=function(){return[{type:n.TemplateRef}]},O([n.Input(),E("design:type",Object)],e.prototype,"aupSwitchCaseWhen",void 0),e=i=O([n.Directive({selector:"[aupSwitchCaseWhen]",providers:[{provide:X,useExisting:i}]}),E("design:paramtypes",[n.TemplateRef])],e)}(X),Z=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!0,n}var i;return x(e,t),i=e,e.prototype.matches=function(t){return!1},e.ctorParameters=function(){return[{type:n.TemplateRef}]},e=i=O([n.Directive({selector:"[aupSwitchCaseDefault]",providers:[{provide:X,useExisting:i}]}),E("design:paramtypes",[n.TemplateRef])],e)}(X),J=function(t){function e(e){var n=t.call(this)||this;return n.cdr=e,n.selectedIndex=0,n}return x(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterContentInit=function(){var t=this,e=this.switchCaseOptions.changes.subscribe((function(e){return t.updateSelection()}));this.onDispose((function(){return e.unsubscribe()}));var n=p.Dsl.disposeWith(this);n.chain;n.when.valueOf(this.switchModel).changes((function(){return t.updateSelection()}),{initialValue:"triggerChange"}),this.cdr.detectChanges()},e.prototype.updateSelection=function(){var t=this,e=[];this.switchCaseOptions.forEach((function(n,i){n.matches(t.switchModel.value)&&e.push(i)})),e.length>1&&console.warn("found "+e.length+" matching case values, displaying the first."),0===e.length&&(this.switchCaseOptions.forEach((function(t,n){e.push(n)})),e.length>1&&console.warn("found "+e.length+" default case values, displaying the first.")),e.length>0?this.selectedIndex=e[0]:(console.warn("found no matching or default case values."),this.selectedIndex=-1)},e.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},O([n.Input(),p.TrackExternal(),E("design:type",p.ValueModel)],e.prototype,"switchModel",void 0),O([n.Input(),p.StoreInValueModel("switchModel"),E("design:type",Object)],e.prototype,"switch",void 0),O([n.ContentChildren(X),E("design:type",n.QueryList)],e.prototype,"switchCaseOptions",void 0),e=O([n.Component({selector:"aup-switch-case",template:'<mat-tab-group class="content-wrapper" no-tab-header full-height-tabs [selectedIndex]="selectedIndex">\n <mat-tab *ngFor="let option of switchCaseOptions">\n <ng-template [ngTemplateOutlet]="option.templateRef"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]}),E("design:paramtypes",[n.ChangeDetectorRef])],e)}(V),Q=function(){function t(){}return t=O([n.NgModule({declarations:[H,G,q,z,K,W,B,J,Y,Z],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,L,l.MatIconModule,u.MatButtonModule],exports:[H,G,q,z,K,W,J,Y,Z]})],t)}(),$=new n.InjectionToken("InteractionActivityData"),tt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new p.DelegatingValueModel).withDefault(!1),e}return x(e,t),e.prototype.initialise=function(t,e){g.assert.isNil(this._activityContext),this._activityContext=e,this._interactionContext=t},Object.defineProperty(e.prototype,"interactionContext",{get:function(){return g.assert.isTruthy(this.isInitialised()),this._interactionContext},enumerable:!0,configurable:!0}),e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e.prototype.isInitialised=function(){return!!this._activityContext},e}(p.GarbageCollector),et=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return x(e,t),e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[$]}]}]},e=O([n.Component({selector:"aup-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}),T(0,n.Inject($)),E("design:paramtypes",[Object])],e)}(tt),nt=function(t){function e(e){var n=t.call(this)||this;return n.config=e,p.assert.notNil(e),n}return x(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[$]}]}]},e=O([n.Component({selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}),T(0,n.Inject($)),E("design:paramtypes",[Object])],e)}(tt),it=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,p.assert.notNil(e),n}return x(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[$]}]}]},e=O([n.Component({selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]}),T(0,n.Inject($)),E("design:paramtypes",[Object])],e)}(tt),ot=function(){function t(){}return t.prototype.startActivity=function(t,e){return this.createAndLaunchActivity(t,e,!1)},t.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},t.prototype.alert=function(t){return this.createAndLaunchActivity(et,t,!1)},t.prototype.confirmOrReject=function(t){return this.createAndLaunchActivity(it,t,!0)},t.prototype.confirmThen=function(t,e,n){return this.createAndLaunchActivity(nt,{confirm:t,activityType:e,data:n},!0)},t}(),rt=function(){function t(t,e,n){this.activityClass=t,this.activityData=e,this.onComplete=n,this._complete=!1,this.deferredResult=p.Deferred.defer()}return t.prototype.isActivityRealised=function(){return!!this._activity},t.prototype.isComplete=function(){return this._complete},Object.defineProperty(t.prototype,"activity",{get:function(){return p.assert.isTruthy(this.isActivityRealised()),this._activity},enumerable:!0,configurable:!0}),t.prototype.notifyActivityCreated=function(t,e){p.assert.isNil(this._activity),this._activity=t;var n=this;this._activity.initialise(e,{onDone:function(t){n.finishActivity((function(e){return e.resolve(t)}))},onCancel:function(t){n.finishActivity((function(e){return e.reject(t)}))}})},t.prototype.finishActivity=function(t){p.assert.isFalsey(this.isComplete()),t(this.deferredResult),this._complete=!0,this.onComplete(this)},t.prototype.cancel=function(){this.activity.cancel()},Object.defineProperty(t.prototype,"activityResult",{get:function(){return this.deferredResult.promise},enumerable:!0,configurable:!0}),t}(),at=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityRef",{get:function(){return this._activityRef},set:function(t){this.activityRef&&!this.activityRef.isComplete()&&g.lang.illegalState("changing activity before previous one has completed"),this._activityRef=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:$,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityRef.notifyActivityCreated(this.activityComponentRef.instance,this.nestedInteractionContext)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},O([n.Input(),E("design:type",Object)],t.prototype,"nestedInteractionContext",void 0),O([n.Input(),E("design:type",rt),E("design:paramtypes",[rt])],t.prototype,"activityRef",null),t=O([n.Component({selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}),E("design:paramtypes",[n.ComponentFactoryResolver,n.ViewContainerRef,n.Injector])],t)}(),st=function(t){function e(){var e=t.call(this)||this;return e.dynamicHeight=!1,e.activityTabs=[],e.garbage=new p.GarbageCollector,e}return x(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=p.Dsl.disposeWith(this);e.chain;e.observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},e.prototype.initialise=function(t,e){p.assert.isFalsey(this.isInitialised()),p.assert.notNil(t),p.assert.notNil(e),this._identifier=t,this.interactionServiceApi=e},Object.defineProperty(e.prototype,"identifier",{get:function(){return this._identifier},enumerable:!0,configurable:!0}),e.prototype.isInitialised=function(){return!!this.identifier},e.prototype.isActive=function(){return this.getActiveActivityCount()>0},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.dispose=function(){p.assert.isFalsey(this.isActive()),this.garbage.dispose()},e.prototype.getActiveActivityRef=function(){return this.isActive()||g.lang.illegalState("no activity in progress"),M.findLast(this.activityTabs,(function(t){return!t.isComplete()}))},e.prototype.cancelActiveActivity=function(){return F(this,void 0,void 0,(function(){return _(this,(function(t){return this.getActiveActivityRef().cancel(),this.isCleaningUp()?[2,this.waitForInteractionContextCleanupToFinish()]:[2,!this.isActive()]}))}))},e.prototype.createAndLaunchActivity=function(t,e,n){var i=this;p.assert.isTruthy(this.isInitialised());var o=new rt(t,e,(function(){i.getActiveActivityCount()>0?i.triggerTabSynchronisation():i.finishAndStartCleanup()}));return this.launchActivity(o),1===this.activityTabs.length&&this.interactionServiceApi.notifyActive(this),o.activityResult},e.prototype.getActiveActivityCount=function(){return this.activityTabs.filter((function(t){return!t.isComplete()})).length},e.prototype.isCleaningUp=function(){return!!this._deferredCleanUp},e.prototype.waitForInteractionContextCleanupToFinish=function(){return F(this,void 0,void 0,(function(){return _(this,(function(t){return[2,!this._deferredCleanUp||this._deferredCleanUp]}))}))},e.prototype.finishAndStartCleanup=function(){var t=this;if(!this._deferredCleanUp){var e=this.interactionServiceApi.notifyFinished(this);this._deferredCleanUp=e.finally((function(){t._deferredCleanUp=null}))}},e.prototype.launchActivity=function(t){var e=this.activityTabs.filter((function(t){return!t.isComplete()}));this.activityTabs=e.concat(t),this.tabs.selectedIndex=this.activityTabs.length},e.prototype.activityIndex=function(t,e){return t},e.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.activityTabs=this.activityTabs.filter((function(t){return!t.isComplete()}))},e.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.getActiveActivityCount()-1;return this.tabs.selectedIndex=e,t===e},e.prototype.getSelectedOutlet=function(){return this.activityOutlets.toArray()[this.tabs.selectedIndex]},e.prototype.triggerTabSynchronisation=function(){var t=this;this.syncSelectedTabTimeout&&clearTimeout(this.syncSelectedTabTimeout),this.syncSelectedTabTimeout=setTimeout((function(){t.syncSelectedTabTimeout=null,t.synchroniseSelectedTabIndex()}),75)},O([n.Input(),E("design:type",Object)],e.prototype,"dynamicHeight",void 0),O([n.ViewChild("tabs",{static:!0}),E("design:type",s.MatTabGroup)],e.prototype,"tabs",void 0),O([n.ViewChildren(at),E("design:type",n.QueryList)],e.prototype,"activityOutlets",void 0),O([p.Trace(),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",void 0)],e.prototype,"dispose",null),e=O([n.Component({selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs; trackBy: activityIndex" >\n <aup-activity-outlet [nestedInteractionContext]="this" [activityRef]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}),E("design:paramtypes",[])],e)}(ot),ct=function(){function t(t,e,n){this.activeInteractionContextIds=t,this.activeModalContext=e,this.createExclusiveInteractionContext=n}return t.prototype.isActive=function(){return this.getActiveInteractionContextIds().length>0},t.prototype.isModalActive=function(){return!!this.activeModalContext.value},t.prototype.isComponentInteracting=function(t){return t.interactionContext&&t.interactionContext.isActive()},t.prototype.getActiveInteractionContextIds=function(){return this.activeInteractionContextIds.value},t.prototype.cancelCurrentModalInteraction=function(){return this.activeModalContext.value.cancelActiveActivity()},t.prototype.cancelComponentInteraction=function(t){return t.interactionContext.cancelActiveActivity()},t}(),ut=function(){},lt=0;t.ɵz=function(){function t(t){this.modelInteractionContextFactory=t,this.garbage=new p.GarbageCollector,this._navigationInProgress=(new p.DelegatingValueModel).withDefault(!1);var n=p.Dsl.disposeWith(this.garbage),i=n.chain,o=n.valueOf;n.before,n.when,n.after,n.observe,n.switchOn;this.exclusiveInteractionRegistry=new e.ContextRegistry,this.modalInteractionRegistry=new e.ContextRegistry,this.inPlaceInteractionRegistry=new e.ContextRegistry,this.modalInteractionRegistry.disableWhen(o.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy()),this.inPlaceInteractionRegistry.disableWhen(o.any(this.exclusiveInteractionRegistry.active,this.modalInteractionRegistry.active,this.inPlaceInteractionRegistry.active).areTruthy()),this.active=o.any(this.inPlaceInteractionRegistry.active,this.modalInteractionRegistry.active).areTruthy(),this.activeInteractionContextIds=i(this.inPlaceInteractionRegistry.interactionContextIds).concat(this.modalInteractionRegistry.interactionContextIds),this.activeModalContext=i(this.modalInteractionRegistry.interactionContexts).first(),this.inModalInteraction=i(this.activeModalContext).isNotNil()}var e;return e=t,t.prototype.isActive=function(){return this.active.value},t.prototype.createModalInteractionContextFor=function(t){return this.createModalInteractionContextDisposedWith(t)},t.prototype.createModalInteractionContextDisposedWith=function(t){return this.modelInteractionContextFactory.createInteractionContext("modal",new e.ApiAdapter(this.placeRouter,this.modalInteractionRegistry))},t.prototype.registerInplaceInteractionContext=function(t){t.initialise("ip"+ ++lt,new e.ApiAdapter(this.placeRouter,this.inPlaceInteractionRegistry))},t.prototype.registerPlaceRouter=function(t){var n=this;g.assert.isFalsey(this.placeRouter),this.placeRouter=t,this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);var i=this;return new ct(this.activeInteractionContextIds,this.activeModalContext,(function(){return i.modelInteractionContextFactory.createInteractionContext("exclusive",new e.ApiAdapter(n.placeRouter,n.exclusiveInteractionRegistry))}))},t.ctorParameters=function(){return[{type:ut}]},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(ut))},token:t,providedIn:"root"}),t=e=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[ut])],t)}(),function(t){var e=function(t){function e(){var e=t.call(this)||this;e._interactions=new p.MutableListModel,e._disabledDelegate=(new p.DelegatingValueModel).withDefault(!1);var n=p.Dsl.disposeWith(e),i=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.active=i(e._interactions).isNotEmpty(),e.interactionContextIds=i(e._interactions).pluck("identifier"),e}return x(e,t),Object.defineProperty(e.prototype,"interactionContexts",{get:function(){return this._interactions.readonly},enumerable:!0,configurable:!0}),e.prototype.start=function(t){this._interactions.push(t)},e.prototype.finish=function(t){this._interactions.remove(t)},e.prototype.isActive=function(){return this.active.value},e.prototype.disableWhen=function(t){this._disabledDelegate.setDelegate(t)},e}(p.GarbageCollector);t.ContextRegistry=e;var n=function(){function t(t,e){this.placeRouter=t,this.contextRegistry=e}return t.prototype.notifyActive=function(t){return g.assert.isTruthy(t.identifier),this.contextRegistry.start(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t.prototype.isNavigationInProgress=function(){return this.placeRouter.navigationInProgress.value},t.prototype.notifyFinished=function(t){return this.contextRegistry.finish(t),this.isNavigationInProgress()?Promise.resolve():this.placeRouter.syncInteractionContextIdsWithRouter()},t}();t.ApiAdapter=n}(t.ɵz||(t.ɵz={}));var pt=function(e){function i(t){var n=e.call(this)||this;return n.interactionService=t,n}return x(i,e),i.prototype.ngAfterViewInit=function(){this.interactionService.registerInplaceInteractionContext(this)},i.prototype.initialise=function(t,e){this.activityContainerComponent.initialise(t,e)},Object.defineProperty(i.prototype,"identifier",{get:function(){return this.activityContainerComponent.identifier},enumerable:!0,configurable:!0}),i.prototype.alert=function(t){return this.activityContainerComponent.alert(t)},i.prototype.cancelActiveActivity=function(){return this.activityContainerComponent.cancelActiveActivity()},i.prototype.confirm=function(t){return this.activityContainerComponent.confirm(t)},i.prototype.confirmOrReject=function(t){return this.activityContainerComponent.confirmOrReject(t)},i.prototype.confirmThen=function(t,e,n){return this.activityContainerComponent.confirmThen(t,e)},i.prototype.isActive=function(){return this.activityContainerComponent.isActive()},i.prototype.startActivity=function(t,e){return this.activityContainerComponent.startActivity(t,e)},i.ctorParameters=function(){return[{type:t.ɵz}]},O([n.ViewChild("activityContainer",{static:!0}),E("design:type",st)],i.prototype,"activityContainerComponent",void 0),i=O([n.Component({selector:"aup-in-place-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}),E("design:paramtypes",[t.ɵz])],i)}(V),dt=function(){function i(){}return i=O([n.NgModule({imports:[e.CommonModule,u.MatButtonModule,f.MatDialogModule,s.MatTabsModule,d.PortalModule,h.RouterModule],declarations:[st,it,nt,et,at,pt],exports:[st,at,pt],entryComponents:[st,it,nt,et],providers:[t.ɵz]})],i)}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=g.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i,o){return F(this,void 0,void 0,(function(){var i;return _(this,(function(o){return this.isMissingFrom(e)&&!n.lastVisitIncluded(e.placeDefinition)?(i=n.getMostRecentVisitFor(e.placeDefinition),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},t}(),function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return x(e,t),e.prototype.isEmptyValue=function(t){return M.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return x(e,t),e.prototype.isEmptyValue=function(t){return M.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=n;var i=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return x(e,t),e.prototype.isEmptyValue=function(t){return M.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!M.isEqual(t,e)},e}(t);t.ArrayParameter=i}(t.ParameterDefinition||(t.ParameterDefinition={}));var ft,ht=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=g.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?M.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!M.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(p.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(p.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.get(n.name).split(",").map((function(t){return t.trim()}));e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=t.get(n.name);n.isRouteId&&M.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[]),E("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[Object]),E("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[Object]),E("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),gt=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){var e=t.call(this)||this;return e.visitModel=new p.MutableValueModel,e._inVisitUpdate=new p.Guard,e}var i;return x(e,t),i=e,e.prototype.initialiseVisit=function(t,e){var n=this;p.assert.isNil(this.visitModel.value);var i=p.Dsl.disposeWith(this).when;this.visitModel.value=t,p.DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name+".visitModel"),this.placeDefinition.getVisitParameterDefs().forEach((function(t){return n.installBinding(t)})),i.valueOf(this.visitModel).changes((function(t,n){e(t,n)}),{unless:this._inVisitUpdate})},e.prototype.updateVisit=function(t){var e=this;p.assert.isTruthy(this.isInitialised()),p.assert.notNil(t),this._inVisitUpdate.whileTrue((function(){e.visitModel.value=t}))},e.prototype.isInitialised=function(){return!!this.visitModel.value},e.prototype.installBinding=function(t){var e=this[t.propertyName];p.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName),this.registerDisposable(new p.Binding(this.visitModel,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return n.replace(t,e)}})).writeRight()},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return i.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),e.prototype.onPlaceReady=function(){},O([I.Memoize(),E("design:type",ht),E("design:paramtypes",[])],e.prototype,"placeDefinition",null),e=i=O([n.Directive(),E("design:paramtypes",[])],e)}(V),(ft=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return p.lang.constructorChain(t).includes(ft)},ft.getRouteParameters=function(t){return g.Klass.get(t).getMetadataList(gt)},ft.getDefinition=function(t){return Reflect.getMetadata("PLACE_DEFINITION_OPTIONS",t)},ft.injectDefinition=function(t,e){Reflect.defineMetadata("PLACE_DEFINITION_OPTIONS",e,t)};var yt,mt,vt=function(){function t(t,e,n){this.component=t,this.navigationSession=e,this.isPrimaryComponent=n}return Object.defineProperty(t.prototype,"routerInteractionAdapter",{get:function(){return this.navigationSession.interactionServiceAdapter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"urlService",{get:function(){return this.navigationSession.urlService},enumerable:!0,configurable:!0}),t.prototype.canDeactivate=function(t,e){return F(this,void 0,void 0,(function(){return _(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return F(this,void 0,void 0,(function(){var t,n;return _(this,(function(i){switch(i.label){case 0:return this.navigationSession.isPopState?this.isPrimaryComponent&&this.routerInteractionAdapter.isModalActive()?(t=this.urlService.getActiveInteractionIdsFromUrl(e.url),n=this.routerInteractionAdapter.getActiveInteractionContextIds(),y.isEqual(n,t)?[3,2]:[4,this.routerInteractionAdapter.cancelCurrentModalInteraction()]):[3,3]:[3,5];case 1:return i.sent(),[2,!1];case 2:return[3,5];case 3:return this.routerInteractionAdapter.isComponentInteracting(this.component)?[4,this.routerInteractionAdapter.cancelComponentInteraction(this.component)]:[3,5];case 4:return i.sent(),[2,!1];case 5:if(this.isNotJustAChangeInRouteId(e)){if(this.component.canDeactivate)return[2,this.component.canDeactivate(this.navigationSession.canDeactivateInteractionContext)];if(this.routerInteractionAdapter.isComponentInteracting(this.component))return console.warn("Route changed while component has active interaction, cancelling navigation"),[2,!1]}return[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}(),bt=function(t){function e(e,n){var i=t.call(this)||this;return i.context=e,i.startingUrl=n,i.debugPropertyKeys=[],i._visits=new Map,i.componentDeactivationHandlers=new Map,i._interactionContext=i.context.routerInteractionAdapter.createExclusiveInteractionContext(),i.onDispose((function(){i._interactionContext&&i._interactionContext.dispose()})),i}return x(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlService",{get:function(){return this.context.urlService},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactionServiceAdapter",{get:function(){return this.context.routerInteractionAdapter},enumerable:!0,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},Object.defineProperty(e.prototype,"canDeactivateInteractionContext",{get:function(){return this._interactionContext},enumerable:!0,configurable:!0}),e.prototype.notifyActive=function(){},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){this.canDeactivateInteractionContext&&this.canDeactivateInteractionContext.isActive()&&this.cancelCanDeactivateInteraction(t)},e.prototype.onPopState=function(t){return this.illegalTransition(t)},e.prototype.onRouterCancelled=function(t){return this.illegalTransition(t)},e.prototype.onRouterError=function(t){return this.illegalTransition(t)},e.prototype.onRouterEnd=function(t){return this.illegalTransition(t)},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return p.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.urlService.getCurrentRouterUrl()},e.prototype.resetBrowserLocation=function(t,e){void 0===e&&(e={replaceCurrent:!1}),this.urlService.resetBrowserLocation(t,e)},e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(t,e){p.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),console.log("replacing "+this.urlService.getCurrentLocationUrlSnapshot().url+" with "+t),this.urlService.resetBrowserLocation(t,{replaceCurrent:!0}),console.log("pushing "+e+" back onto the history."),this.urlService.resetBrowserLocation(e,{replaceCurrent:!1})},e.prototype.ignore=function(t,e){e=e?" -> "+e:"",p.Logger.get(this).info("Ignoring router event"+e+": "+t.constructor.name+" -> "+t.url+" :: "+this.toString())},e.prototype.toString=function(){return this.constructor.name+"("+this.debugState()+")"},e.prototype.debugState=function(t){var e=this;return(t||this.debugPropertyKeys).map((function(t){return t+": "+e[t]})).join(", ")},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){var i,o;return _(this,(function(r){return(i=this.componentDeactivationHandlers.get(t))||(o=0===this.componentDeactivationHandlers.size,i=new vt(t,this,o),this.componentDeactivationHandlers.set(t,i)),[2,i.canDeactivate(e,n).then((function(t){return t})).catch((function(t){throw t}))]}))}))},e.prototype.cancelCanDeactivateInteraction=function(t){p.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachCanDeactivateInteractionContext();p.Logger.get(this).info("cancelling current navigation activity.."),e.cancelActiveActivity().then((function(){e.dispose()})),this.handleCanDeactivateCancelledEventScenario(t)},e.prototype.reinstateUrlAfterAngularChangedItOnCancellation=function(t){this.resetBrowserLocation(t,{replaceCurrent:!0})},e.prototype.detachCanDeactivateInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},e}(p.GarbageCollector),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.handleCanDeactivateCancelledEventScenario=function(t){g.lang.illegalState("onCanDeactivateInteractionCancelled not supported for event clean up states")},e}(bt),It=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.locationChangeTriggerUrl=i,o.isPopState=!1,o.firstCancelHandled=!1,o.popStateHandled=!1,o.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],o}return x(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.locationChangeTriggerUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){return _(this,(function(t){return[2,!1]}))}))},e}(Ct),Rt=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.isPopState=!0,i.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],i.finished=p.Deferred.defer(),i}return x(e,t),e.prototype.onPopState=function(t){this.gotPopState=!0},e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.ignore(t)},e.prototype.onUrlChange=function(t){},e.prototype.finishUp=function(){this.context.finishRoutingSession(),this.finished.resolve(!0)},e.prototype.onRouterEnd=function(t){this.gotPopState&&this.finishUp()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){p.lang.illegalState("onCanDeactivateInteractionCancelled not supported for activity context synchronisation since we should never leave a place")},Object.defineProperty(e.prototype,"finishedPromise",{get:function(){return this.finished.promise},enumerable:!0,configurable:!0}),e}(bt),Pt=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.wasTriggeredByPopState=i,o.isPopState=!1,o}return x(e,t),e.prototype.notifyActive=function(){var t=this;setTimeout((function(){t.syncInteractionIdsWithRouter()}))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.syncInteractionIdsWithRouter=function(){var t=this.interactionServiceAdapter.getActiveInteractionContextIds(),e=this.urlService.getCurrentLocationUrlSnapshot().getInteractionIds();if(M.isEqual(t,e))this.context.finishRoutingSession();else if(t.length>e.length){var n=t.length>e.length&&e.length<1;this.addActivityContextToRoute(t,n)}else this.removeActivityContextFromRoute(t)},e.prototype.addActivityContextToRoute=function(t,e){var n=this,i=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);this.context.navigateByUrl(i,{replaceUrl:!e}).then((function(e){n.urlService.getCurrentLocationUrlSnapshot().hasInteractionIds(t)||g.lang.illegalState("Expected url to be "+i.url+" but was "+n.urlService.getCurrentLocationUrl())}))},e.prototype.removeActivityContextFromRoute=function(t){var e=this.urlService.getCurrentRouterSnapshot().updateInteractionIds(t);if(t.length<1)if(this.wasTriggeredByPopState);else{var n=new Rt(this.context,this.urlService.getCurrentRouterUrl());this.context.transitionTo(n),this.urlService.back()}else this.context.navigateByUrl(e,{replaceUrl:!this.wasTriggeredByPopState})},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){g.lang.methodNotSupported()},e}(bt),St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e}return x(e,t),e.prototype.onRouterCancelled=function(t){this.context.finishRoutingSession()},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.routerInteractionAdapter.isActive()?this.context.transitionTo(new Pt(this.context,this.startingUrl,!1)):this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new It(this.context,this.startingUrl,t))},e}(bt),At=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.poppedHistoryUrl=i,o.isPopState=!0,o.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],o}return x(e,t),e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(){t.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation.call(this,this.poppedHistoryUrl,this.startingUrl)},e}(bt),Mt=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return x(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.transitionTo(new Pt(this.context,this.poppedHistoryUrl,!1))},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession()},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.illegalTransition("Leaving interaction after pop-state should't block so should never see a back button click")},e}(At),wt=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.clickedLinkUrl=i,o.isPopState=!1,o.clickedLinkMatchedBackButtonUrl=!1,o.debugPropertyKeys=["idle","startingUrl","clickedLinkUrl","firstCancelEventUrl","clickedLinkMatchedBackButtonUrl","popStateEventUrl"],o}return x(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){this.firstCancelEventUrl?!this.clickedLinkMatchedBackButtonUrl&&this.popStateEventUrl&&this.finaliseRouting():(this.firstCancelEventUrl=t.url,this.clickedLinkMatchedBackButtonUrl=t.url===this.clickedLinkUrl,this.ignore(t))},e.prototype.onRouterEnd=function(t){this.clickedLinkMatchedBackButtonUrl?this.finaliseRouting():this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.finaliseRouting=function(){return this.repairBrowserHistoryAndUrlAfterGuardCancellation(this.clickedLinkUrl,this.startingUrl),this.context.finishRoutingSession()},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){return _(this,(function(t){return[2,!1]}))}))},e}(Ct),xt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl","urlAfterRedirects"],e}return x(e,t),e.prototype.onRouterCancelled=function(t){},e.prototype.onRouterError=function(t){this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.urlAfterRedirects=t.urlAfterRedirects,this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new wt(this.context,this.startingUrl,t))},e}(bt);yt=t.NavigationContext||(t.NavigationContext={}),mt=function(t,e,n,i,o){this.urlService=t,this.routerInteractionAdapter=e,this.navigateByUrl=n,this.transitionTo=i,this.finishRoutingSession=o},yt.Impl=mt;var Dt,Ot,Tt,Et=function(t){function e(e,n,i,o){var r=t.call(this,e,n)||this;return r.locationChangeTriggerUrl=i,r.poppedHistoryUrl=o,r.isPopState=!1,r.firstCancelHandled=!1,r.popStateHandled=!1,r.debugPropertyKeys=["idle","startingUrl","poppedHistoryUrl","locationChangeTriggerUrl","popStateEventUrl","firstCancelHandled","popStateHandled"],r}return x(e,t),e.prototype.onRouterStarted=function(t){this.ignore(t)},e.prototype.onRouterCancelled=function(t){if(this.firstCancelHandled){if(this.popStateHandled){var e=t.url;return this.repairBrowserHistoryAndUrlAfterGuardCancellation(e,this.parentPageUrl),this.resetBrowserLocation(this.startingUrl,{replaceCurrent:!1}),this.context.finishRoutingSession()}}else this.firstCancelHandled=!0,this.parentPageUrl=t.url,this.ignore(t)},e.prototype.onRouterEnd=function(t){this.ignore(t)},e.prototype.onRouterError=function(t){this.ignore(t)},e.prototype.onPopState=function(t){this.popStateHandled=!0,this.popStateEventUrl=t.url,this.ignore(t)},e.prototype.canDeactivatePlace=function(t,e,n){return F(this,void 0,void 0,(function(){return _(this,(function(t){return[2,!1]}))}))},e}(Ct),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.finishRoutingSession()},e.prototype.onRouterEnd=function(t){this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new Et(this.context,this.startingUrl,t,this.poppedHistoryUrl))},e}(At);t.ɵbc=function(){function t(){this._archive=new Map,this.placeHistoryDepth=4}var e;return e=t,t.prototype.notifyNavigationStarted=function(){this._activeVisits&&(this.archive(this._activeVisits.visits),this._previousVisits=this._activeVisits)},t.prototype.notifyNavigationFinished=function(t){this._activeVisits=new e.VisitRecord(t)},t.prototype.updateVisit=function(t){p.assert.isTruthy(this._activeVisits),this._activeVisits.update(t)},t.prototype.lastVisitIncluded=function(t){var e;return!!(null===(e=this._previousVisits)||void 0===e?void 0:e.getVisitFor(t))},t.prototype.getMostRecentVisitFor=function(t){return M.first(this.getHistory(t))},t.prototype.getHistory=function(t){var e=this._archive.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._archive.set(t,e)},t.prototype.archive=function(t){var e=this;t.forEach((function(t){var n=e.getHistory(t.placeDefinition),i=M.first(n);i&&!t.hasChangedFrom(i)||(n.unshift(t),e.setHistory(t.placeDefinition,n.slice(0,e.placeHistoryDepth)))}))},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=e=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[])],t)}(),Dt=t.ɵbc||(t.ɵbc={}),Ot=function(){function t(t){this.visits=t}return t.prototype.update=function(t){this.visits=this.visits.filter((function(e){return e.placeDefinition!==t.placeDefinition})).concat(t)},t.prototype.getVisitFor=function(t){return this.visits.find((function(e){return e.placeDefinition===t}))},t}(),Dt.VisitRecord=Ot,t.UrlSnapshot=function(){function t(t,e){this.urlSerializer=t,this.url=e,this.urlTree=t.parse(e)}return t.prototype.updateVisitSegments=function(e){var n=this.urlSerializer.parse(this.url),i=U(this.getPrimarySegments(n)),o=this.getSegmentsFor(e),r=i.findIndex((function(t){return t.path===o[0].path}));return i.splice.apply(i,U([r,o.length],o)),n.root.children.primary.segments=i,new t(this.urlSerializer,n.toString())},t.prototype.getPrimarySegments=function(t){return this.urlTree.root.children.primary.segments},t.prototype.getSegmentsFor=function(t){return t.placeDefinition.hasRouteId()?[new h.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new h.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new h.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.includesPathOf=function(t){return this.getPrimarySegments(this.urlTree).find((function(e){return e.path===t.path}))},t.prototype.getInteractionIds=function(){var e=this.urlTree.queryParams[t.INTERACTION_QUERY_PARAM];return e?t.parseInteractionIds(e):[]},t.prototype.hasInteractions=function(){return this.getInteractionIds().length>0},t.prototype.hasInteractionIds=function(t){return M.isEqual(this.getInteractionIds(),t)},t.prototype.updateInteractionIds=function(e){if(0===e.length)return this.removeInteractionIds();var n=this.urlSerializer.parse(this.url);return n.queryParams[t.INTERACTION_QUERY_PARAM]=t.createPathIdFor(e),new t(this.urlSerializer,n.toString())},t.prototype.removeInteractionIds=function(){var e=this.urlSerializer.parse(this.url);return e.queryParams&&e.queryParams[t.INTERACTION_QUERY_PARAM]&&(e.queryParams={}),new t(this.urlSerializer,e.toString())},t.prototype.toString=function(){return"UrlSnapshot("+this.url+")"},t}(),(Tt=t.UrlSnapshot||(t.UrlSnapshot={})).INTERACTION_QUERY_PARAM="aup-interactions",Tt.INTERACTION_ID_SEPARATOR="--",Tt.parseInteractionIds=function(t){return t.split(Tt.INTERACTION_ID_SEPARATOR)},Tt.createPathIdFor=function(t){return t.join(Tt.INTERACTION_ID_SEPARATOR)};var _t=function(){function i(t,e,n){this.angularRouter=t,this.angularLocation=e,this.urlSerializer=n}return i.prototype.parseUrl=function(e){return new t.UrlSnapshot(this.urlSerializer,e)},i.prototype.createUrlSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return e.forEach((function(e){i.push(t.parseUrl(""+e.placeDefinition.path).updateVisitSegments(e).url)})),this.parseUrl(i.join(""))},i.prototype.getCurrentRouterUrl=function(){return this.angularRouter.routerState?this.angularRouter.routerState.snapshot.url:null},i.prototype.getCurrentLocationUrl=function(){return this.angularLocation.path()},i.prototype.getCurrentLocationUrlSnapshot=function(){return this.parseUrl(this.getCurrentLocationUrl())},i.prototype.getCurrentRouterSnapshot=function(){return this.parseUrl(this.getCurrentRouterUrl())},i.prototype.getActiveInteractionIdsFromUrl=function(t){return this.parseUrl(t).getInteractionIds()},i.prototype.hasActiveInteractions=function(t){return this.getActiveInteractionIdsFromUrl(t).length>0},i.prototype.resetBrowserLocation=function(t,e){e.replaceCurrent?this.angularLocation.replaceState(t):this.angularLocation.go(t)},i.prototype.back=function(){this.angularLocation.back()},i.ctorParameters=function(){return[{type:h.Router},{type:e.Location},{type:h.UrlSerializer}]},i.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(h.Router),n.ɵɵinject(e.Location),n.ɵɵinject(h.UrlSerializer))},token:i,providedIn:"root"}),i=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[h.Router,e.Location,h.UrlSerializer])],i)}(),jt=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!y.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,D(D({},this.visitParameters),((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)i.includes(t.name)&&(o[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(o[t.name]=r)}})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=y.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!y.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t.prototype.toDebugString=function(){var t=this;return Object.keys(this.visitParameters).map((function(e){return e+"="+t.visitParameters[e]})).join(",")},t}(),Ut=function(i){function o(e,n,o,r,a){var s=i.call(this)||this;s.angularRouter=e,s.angularLocation=n,s.interactionService=o,s.urlService=r,s.placeHistory=a,s.navigationSessionModel=new p.MutableValueModel,s._activeVisits=new p.MutableListModel,s.sessionFinishedJobs=[],s.routerInteractionAdapter=o.registerPlaceRouter(s),s.navigationContext=new t.NavigationContext.Impl(s.urlService,s.routerInteractionAdapter,(function(t,e){return s.navigateByUrl(t,e)}),(function(t){s.transitionTo(t)}),(function(t){s.routingSessionFinished(t)}));var c=p.Dsl.disposeWith(s),u=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;s.navigationInProgress=u(s.navigationSessionModel).isNotNil();var l=u(s.interactionService.active).map((function(t){return t?"IdleDuringInteraction":"Idle"}));return s.navigationSessionName=u(s.navigationSessionModel).pluck("name").otherwise(l),p.DebugContext.tag(s._activeVisits,"PlaceRouter.activeVisits"),s.activeVisitsByPlaceDefinition=u(s._activeVisits).indexBy("placeDefinition"),e.events.subscribe((function(t){t instanceof h.NavigationStart&&("popstate"===t.navigationTrigger?s.onPopState(t):s.onRouterStarted(t)),t instanceof h.NavigationEnd&&s.onRouterEnd(t),t instanceof h.NavigationError&&s.onRouterError(t),t instanceof h.NavigationCancel&&s.onRouterCancelled(t)})),n.onUrlChange((function(t){return s.onUrlChanged(t)})),s}return x(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this.navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"currentSession",{get:function(){return this.navigationSessionModel.value},enumerable:!0,configurable:!0}),o.prototype.onPopState=function(t){if(p.assert.isTruthy("popstate"===t.navigationTrigger),this.currentSession)this.currentSession.onPopState(t);else{var e=t.url,n=this.urlService.getCurrentRouterUrl(),i=this.interactionService.isActive()?new Mt(this.navigationContext,n,e):new Ft(this.navigationContext,n,e);this.transitionTo(i)}},o.prototype.onRouterStarted=function(t){p.assert.isFalsey("popstate"===t.navigationTrigger);this.interactionService.isActive();this.currentSession?this.currentSession.onRouterStarted(t):this.transitionTo(this.createNavigationSession(this.urlService.getCurrentRouterUrl()))},o.prototype.onUrlChanged=function(t){this.currentSession?this.currentSession.onUrlChange(t):console.log("FYI: url changed without a navigation session in progress")},o.prototype.onRouterCancelled=function(t){this.currentSession.onRouterCancelled(t)},o.prototype.onRouterError=function(t){this.currentSession.onRouterError(t)},o.prototype.onRouterEnd=function(t){this.currentSession.onRouterEnd(t)},o.prototype.navigate=function(t,e){var n=this;return this.doNavigation(t,(function(i){return F(n,void 0,void 0,(function(){var n;return _(this,(function(i){switch(i.label){case 0:return n=U([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.angularRouter.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))}))},o.prototype.doNavigation=function(t,e){return F(this,void 0,void 0,(function(){var n;return _(this,(function(i){switch(i.label){case 0:this.navigationInProgress.value&&p.lang.illegalState("Navigation already in progress"),(n=this.createNavigationSession(this.urlService.getCurrentRouterUrl())).storeVisit(t),this.transitionTo(n),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,e(this.angularRouter)];case 2:return i.sent(),[3,4];case 3:return!this.angularRouter.getCurrentNavigation()&&this.currentSession&&this.currentSession.onRouterEnd(new h.NavigationEnd(-1,"","")),[7];case 4:return[2]}}))}))},o.prototype.navigateByUrl=function(t,e){return this.angularRouter.navigateByUrl(t.urlTree,e)},Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.pushVisitChangesToRoute=function(t,e){return F(this,void 0,void 0,(function(){var n=this;return _(this,(function(i){return this.placeHistory.updateVisit(e),e.hasRoutingChangedFrom(t)?[2,this.doNavigation(e,(function(t){var i=n.urlService.parseUrl(n.angularRouter.routerState.snapshot.url).updateVisitSegments(e);return n.navigateByUrl(i)}))]:[2]}))}))},o.prototype.createNavigationSession=function(t){return this.interactionService.isActive()?new St(this.navigationContext,t):new xt(this.navigationContext,t)},o.prototype.transitionTo=function(t){var e=this.navigationSessionModel.value;e||this.placeHistory.notifyNavigationStarted(),p.assert.isTruthy(t!==e),p.Logger.get(this).info("### Router State Transition: "+(e?e.toString():"null")+" -> "+t.toString()),this.navigationSessionModel.value=t,e&&e.dispose(),t.notifyActive()},o.prototype.routingSessionFinished=function(t){t&&t.length>0&&(p.assert.isTruthy(this.navigationInProgress.value),this.placeHistory.notifyNavigationFinished(t),this._activeVisits.value=t);var e=this.currentSession;e.dispose(),this.navigationSessionModel.value=null,console.log("### Router Session Finished (was "+e.toString()+")"),this.sessionFinishedJobs.forEach((function(t){return t()})),this.sessionFinishedJobs=[]},o.prototype.runAfterRoutingSessionFinishes=function(t){p.assert.isTruthy(this.navigationInProgress),this.sessionFinishedJobs.push(t)},o.prototype.syncInteractionContextIdsWithRouter=function(){var t=this;if(this.navigationSession){this.navigationSession;return new Promise((function(e,n){t.runAfterRoutingSessionFinishes((function(){t.runAfterRoutingSessionFinishes(e);var n=new Pt(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(n)}))}))}return new Promise((function(e,n){t.runAfterRoutingSessionFinishes(e);var i=new Pt(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(i)}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.ctorParameters=function(){return[{type:h.Router},{type:e.Location},{type:t.ɵz},{type:_t},{type:t.ɵbc}]},o.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(h.Router),n.ɵɵinject(e.Location),n.ɵɵinject(t.ɵz),n.ɵɵinject(_t),n.ɵɵinject(t.ɵbc))},token:o,providedIn:"root"}),O([p.Trace(),E("design:type",Function),E("design:paramtypes",[jt,jt]),E("design:returntype",Promise)],o.prototype,"pushVisitChangesToRoute",null),o=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[h.Router,e.Location,t.ɵz,_t,t.ɵbc])],o)}(p.GarbageCollector),Nt=new n.InjectionToken("AUP_PLACE_CONFIG"),Vt=P.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),kt=[P.query(":enter, :leave",Vt,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(-100%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(100%)"}))],{optional:!0})])],Lt=[P.query(":enter, :leave",Vt,{optional:!0}),P.group([P.query(":enter",[P.style({transform:"translateX(100%)",minHeight:"1px"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(0%)"}))],{optional:!0}),P.query(":leave",[P.style({transform:"translateX(0%)"}),P.animate("{{duration}} ease-out",P.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function Bt(t){return P.trigger("routeAnimations",[P.transition(":increment",Lt,{params:{duration:t}}),P.transition(":decrement",kt,{params:{duration:t}})])}var Ht,qt=Bt("0.3s"),zt=function(t){function e(e,i,o,r){var a=t.call(this)||this;a.router=e,a.placeRouter=i,a.placeConfig=o,a.placeChanged=new n.EventEmitter,a.outletActivated=new p.MutableValueModel(!1),a._activatedRouteModel=new p.MutableValueModel,a._activePlaceModel=new p.MutableValueModel,a.initialPlaceIndex=null,a._isPushingVisitToRoute=new p.MutableValueModel(!1);var s=p.Dsl.disposeWith(a),c=s.chain,u=(s.valueOf,s.before,s.when);s.after,s.observe,s.switchOn;a.parentOutletModel=new p.MutableValueModel(r);var l=c(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),d=c(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=c(a.customPlaceAnimationOrderModel).otherwise(l).reduce((function(t){var e=0;return d.value&&(e=t.indexOf(d.value),y.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),y.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:d}),a._activePlaceDefinition=c(a._activePlaceModel).pluck("placeDefinition"),a.routerVisitModel=a._activePlaceDefinition.findIn(c(i.activeVisitsByPlaceDefinition)),a.navigationInProgress=c(a.placeRouter.navigationInProgress),u.valueOf(a.navigationInProgress).becomesFalsey((function(){a.checkStateAndInitialise()})),u.valueOf(a.outletActivated).becomesTruthy((function(){a.checkStateAndInitialise()})),c(a._activePlaceModel).postponeWhile(a.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),a}return x(e,t),e.prototype.ngOnInit=function(){},e.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),e.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(e.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activePlaceModel",{get:function(){return this._activePlaceModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),e.prototype.onOutletActivated=function(t,e){this._activatedRouteModel.value=t.activatedRoute,this._activePlaceModel.value=e,this.outletActivated.value=!0,this.checkStateAndInitialise()},e.prototype.onOutletDeactivated=function(){this.outletActivated.value=!1,this._activePlaceModel.value=null,this._activatedRouteModel.value=null},e.prototype.checkStateAndInitialise=function(){var t=this.routerVisitModel.value,e=this.activePlaceModel.value;t&&e&&!e.isInitialised()&&(t.placeDefinition!==e.placeDefinition&&p.lang.illegalState("wrong visit!!!"),this.initialisePlace(t,e))},e.prototype.initialisePlace=function(t,e){var n=this,i=new p.MutableValueModel(t);p.DebugContext.tag(i,"PlaceOutletComponent["+e.constructor.name+")].visitModel"),e.initialiseVisit(t,(function(t,e){n.pushVisitChangeToRoute(e,t)})),this.animateModel.value||this.animationDone();var o=p.Dsl.disposeWith(e),r=o.when,a=(o.chain,o.valueOf);r.valueOf(this.routerVisitModel).changes((function(t){e.updateVisit(t)}),{unless:a.any(this._isPushingVisitToRoute,this.routerVisitModel.isNil()).areTruthy()})},e.prototype.pushVisitChangeToRoute=function(t,e){var n=this;this._isPushingVisitToRoute.value=!0,this.placeRouter.pushVisitChangesToRoute(t,e).finally((function(){n._isPushingVisitToRoute.value=!1}))},e.prototype.animationStarted=function(){},e.prototype.animationDone=function(){this._activePlaceModel.value&&this._activePlaceModel.value.onPlaceReady()},e.ctorParameters=function(){return[{type:h.Router},{type:Ut},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Nt]}]},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},O([n.Input(),p.StoreInValueModel("animateModel"),E("design:type",Boolean)],e.prototype,"animate",void 0),O([n.Input(),p.TrackExternal({defaultValue:!0}),E("design:type",p.ValueModel)],e.prototype,"animateModel",void 0),O([n.Input("placeAnimationOrderModel"),p.TrackExternal(),E("design:type",p.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),O([n.Input("placeAnimationOrder"),p.StoreInListModel("customPlaceAnimationOrderModel"),E("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),O([n.Output(),E("design:type",Object)],e.prototype,"placeChanged",void 0),O([n.ViewChild("routeOutlet",{static:!0}),E("design:type",h.RouterOutlet)],e.prototype,"routerOut",void 0),e=O([n.Component({selector:"aup-place-outlet",template:'<ng-container *ngIf="animateModel.value">\n <div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n >\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf="!animateModel.value">\n <div class="router-outlet-container">\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n </div>\n</ng-container>\n\n',animations:[qt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}),T(2,n.Optional()),T(2,n.Inject(Nt)),T(3,n.SkipSelf()),T(3,n.Optional()),E("design:paramtypes",[h.Router,Ut,Object,e])],e)}(V),Gt=function(e){function i(n){var i=e.call(this)||this;i._activePlaceComponent=new p.DelegatingValueModel;var o=p.Dsl.disposeWith(i),r=o.chain,a=(o.valueOf,o.before,o.when);o.after,o.observe,o.switchOn;return i.placeDefinitions=r(i.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),i.commandFactory=p.Command.createFactory((function(t){i.placeOutlet.navigate(new jt(t))})),a.valueOf(i.placeOutletModel).changes((function(t){setTimeout((function(){return i._activePlaceComponent.setDelegate(t?t.activePlaceModel:null)}))})),i.activePlaceDefinition=r(i._activePlaceComponent).pluck("placeDefinition"),i}return x(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.ctorParameters=function(){return[{type:Ut}]},O([n.Input(),p.StoreInListModel("placesModel"),E("design:type",Array)],i.prototype,"places",void 0),O([n.Input(),p.TrackExternal(),E("design:type",p.ListModel)],i.prototype,"placesModel",void 0),O([n.Input(),p.StoreInValueModel("placeOutletModel"),E("design:type",zt)],i.prototype,"placeOutlet",void 0),O([n.Input(),p.TrackExternal(),E("design:type",p.ValueModel)],i.prototype,"placeOutletModel",void 0),O([C.Memoize(),E("design:type",Function),E("design:paramtypes",[ht]),E("design:returntype",Object)],i.prototype,"getNav",null),i=O([n.Component({template:""}),E("design:paramtypes",[Ut])],i)}(V),Wt=function(){function t(){}return t.prototype.ngOnInit=function(){},O([n.Input(),p.TrackExternal(),E("design:type",p.ValueModel)],t.prototype,"busyModel",void 0),O([n.Input(),p.StoreInValueModel("busyModel"),E("design:type",Boolean)],t.prototype,"busy",void 0),t=O([n.Component({selector:"aup-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}),E("design:paramtypes",[])],t)}(),Kt=function(){function t(){}return t.prototype.ngOnInit=function(){},t=O([n.Component({selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}),E("design:paramtypes",[])],t)}(),Xt=function(t){function e(e){var n=t.call(this,e)||this;return n.expanded=!0,n}return x(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.ctorParameters=function(){return[{type:Ut}]},O([n.HostBinding("class.expanded"),E("design:type",Object)],e.prototype,"expanded",void 0),e=O([n.Component({selector:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}),E("design:paramtypes",[Ut])],e)}(Gt),Yt=function(t){function e(e){return t.call(this,e)||this}return x(e,t),e.ctorParameters=function(){return[{type:Ut}]},e=O([n.Component({selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}),E("design:paramtypes",[Ut])],e)}(Gt),Zt=function(){function t(){}return t=O([n.NgModule({imports:[e.CommonModule,c.BrowserAnimationsModule,m.MatProgressSpinnerModule,h.RouterModule,s.MatTabsModule,v.MatListModule,b.MatTooltipModule,l.MatIconModule,L],declarations:[Kt,Wt,zt,Yt,Xt,Gt],entryComponents:[Wt],exports:[Wt,zt,Kt,Yt,Xt,Gt],providers:[]})],t)}(),Jt=function(){function t(){}return t=O([n.NgModule({declarations:[],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,L,Q,Zt,dt],exports:[dt,Zt,L,Q,W]})],t)}(),Qt=P.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),$t=P.trigger("slideDownOnEnter",[P.transition(":enter",[Qt,P.animate("{{duration}}")],{params:{duration:"100ms"}}),P.transition(":leave",[P.animate("{{duration}}",Qt)],{params:{duration:"100ms"}})]),te=P.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),ee=P.trigger("slideRightOnEnter",[P.transition(":enter",[te,P.animate("{{duration}}")],{params:{duration:"100ms"}}),P.transition(":leave",[P.animate("{{duration}}",te)],{params:{duration:"100ms"}})]),ne=function(t,e){this.width=t,this.height=e},ie=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return x(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new ie(t.clientX-this.left,t.clientY-this.top):new ie(t.x-this.left,t.y-this.top)},e}(ne),(Ht=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Ht(e.top,e.left,e.width,e.height)};var oe=function(e){function i(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new p.ValueHolder(new t.Bounds(0,0,0,0)),o}return x(i,e),i.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new S((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(i.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),i.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(i.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),i.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},i.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},i=O([n.Directive(),E("design:paramtypes",[n.ElementRef,n.NgZone])],i)}(V),re=function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.identifier=e,r.api=n,r.dialogService=i,r.config=o,r.garbage=new p.GarbageCollector,g.assert.notNil(i),r}return x(e,t),e.prototype.cancelActiveActivity=function(){return this.activityContainer.cancelActiveActivity()},e.prototype.dispose=function(){this.isActive()&&p.lang.illegalState("Dispose called while active."),this.garbage.dispose()},e.prototype.registerDisposable=function(t){return this.garbage.registerDisposable(t)},e.prototype.isActive=function(){return!!this.activityContainer&&this.activityContainer.isActive()},e.prototype.createAndLaunchActivity=function(t,e,n){var i=this;g.assert.isNil(this._currentActivityRef);var o=D(D({},this.config),{disableClose:n,panelClass:"dialog-interaction-context"}),r=this.dialogService.open(st,o),a=this.activityContainer=r.componentInstance;this.activityContainer.initialise(this.identifier,this.api);var s=this.activityContainer.startActivity(t,e);return s.finally((function(){return r.close()})),r.afterClosed().subscribe((function(t){a.isActive()&&a.cancelActiveActivity(),i.activityContainer=null})),r.updateSize(),r.afterOpened().subscribe((function(t){r.updateSize()})),s},e}(ot),ae=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),se=function(t){function e(e,n,i){var o=t.call(this)||this;return o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,g.assert.notNil(e),o}return x(e,t),e.prototype.createInteractionContext=function(t,e){var n=D(D({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig),this.dialogServiceDefaults);return new re(t,e,this.dialogService,n)},e.ctorParameters=function(){return[{type:f.MatDialog},{type:f.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[ae]}]},{type:f.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[f.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(f.MatDialog),n.ɵɵinject(ae,8),n.ɵɵinject(f.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e=O([n.Injectable({providedIn:"root"}),T(1,n.Optional()),T(1,n.Inject(ae)),T(2,n.Optional()),T(2,n.Inject(f.MAT_DIALOG_DEFAULT_OPTIONS)),E("design:paramtypes",[f.MatDialog,f.MatDialogConfig,f.MatDialogConfig])],e)}(ut);var ce,ue,le,pe,de=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new fe(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),O([C.Memoize(),E("design:type",Array),E("design:paramtypes",[])],t.prototype,"keys",null),t}(),fe=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}(),he=function(){function t(){}return t.prototype.canActivate=function(t,e){return F(this,void 0,void 0,(function(){return _(this,(function(t){return[2,!0]}))}))},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=O([n.Injectable({providedIn:"root"}),E("design:paramtypes",[])],t)}(),ge=function(){function t(t,e,n,i,o){this.navigationSession=t,this.activatedRoute=e,this.router=n,this.placeHistory=i,this.injector=o}return t.prototype.sanitise=function(t){return F(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return _(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector,this.navigationSession.isPopState)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},O([p.Trace(),E("design:type",Function),E("design:paramtypes",[jt]),E("design:returntype",Promise)],t.prototype,"sanitise",null),t}(),ye=function(){function e(t,e,n,i,o,r){this.router=t,this.urlService=e,this.placeRouter=n,this.placeHistory=i,this.interactionService=o,this.injector=r}return e.prototype.canActivate=function(t,e){return F(this,void 0,void 0,(function(){var n=this;return _(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return F(n,void 0,void 0,(function(){var n,o=this;return _(this,(function(r){switch(r.label){case 0:return[4,this.cleanInteractionState(t,e,(function(){return F(o,void 0,void 0,(function(){var n,o,r,a,s;return _(this,(function(c){switch(c.label){case 0:return n=new de(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationSession,a=r.getVisitFor(i)||new jt(i,o),[4,new ge(r,t,this.router,this.placeHistory,this.injector).sanitise(a.mergeRouteParameters(o))];case 1:return s=c.sent(),r.storeVisit(s),a.hasRoutingChangedFrom(s)?[2,this.urlService.parseUrl(e.url).updateVisitSegments(s)]:[2,!0]}}))}))}))];case 1:return n=r.sent(),[2,this.handleGuardResult(n)]}}))}))}))]}))}))},e.prototype.canDeactivate=function(t,e,n,i){return F(this,void 0,void 0,(function(){var e,o,r;return _(this,(function(a){switch(a.label){case 0:return e=this.urlService.parseUrl(n.url),o=this.urlService.parseUrl(i.url),[4,this.placeRouter.navigationSession.canDeactivatePlace(t,e,o)];case 1:return r=a.sent(),[2,this.handleGuardResult(r)]}}))}))},e.prototype.handleGuardResult=function(e){return e instanceof t.UrlSnapshot?e.urlTree:e},e.prototype.authorisePlaceThen=function(e,n,i){return F(this,void 0,void 0,(function(){var o,r,a;return _(this,(function(s){switch(s.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.isAuthorised(e,n)]:[3,2]:[3,4];case 1:return a=s.sent(),[3,3];case 2:a=!0,s.label=3;case 3:return!0===(r=a)?[2,i(o)]:(console.log("not authorised result",r),[2,r]);case 4:return[2,p.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return F(this,void 0,void 0,(function(){var n;return _(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof A.Observable?n.toPromise():n]}))}))},e.prototype.cleanInteractionState=function(t,e,n){return F(this,void 0,void 0,(function(){var t;return _(this,(function(i){return t=this.urlService.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractions()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();function me(t,e,n,i,o){var r={backingModel:n,binding:null},a=i+"("+t.constructor.name+"."+e.toString()+")";p.DebugContext.get(r.backingModel).tag(a),p.Logger.get(r.backingModel).tag(a),Object.defineProperty(t,e,{get:function(){return r.backingModel},set:function(t){r.binding&&r.binding.dispose(),t&&(r.binding=new p.Binding(r.backingModel,t),o(t)?r.binding.writeRight():(o(r.backingModel)||console.warn("Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden"),r.binding.writeLeft()))}})}ce=t.Formatter||(t.Formatter={}),ue=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),le=function(){function t(){}return t.prototype.format=function(t){return M.isNumber(t)&&!M.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return M.isNaN(e)?null:e},t}(),pe=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),ce.STRING=new ue,ce.NUMBER=new le,ce.BOOLEAN=new pe,t.ACTIVITY_DATA=$,t.AUP_PLACE_CONFIG=Nt,t.AbstractInputComponent=B,t.AbstractInteractionContext=ot,t.AbstractPlaceNavigationComponent=Gt,t.AbstractPopStateNavigation=At,t.Activity=tt,t.ActivityContainerComponent=st,t.ActivityOutletComponent=at,t.ActivityRef=rt,t.AlertDialogComponent=et,t.AngularUiPowerupsModule=Jt,t.BusyOverlayComponent=Wt,t.CommandDirective=N,t.ComponentsModule=Q,t.ConfirmThenDialogComponent=nt,t.ConfirmationDialogComponent=it,t.ConsolidatedParameterMap=de,t.DEFINITION_META_DATA_KEY="PLACE_DEFINITION_OPTIONS",t.DIALOG_INTERACTION_SERVICE_DEFAULTS=ae,t.DialogInteractionContext=re,t.DialogInteractionContextFactory=se,t.Dimension=ne,t.DirectivesModule=L,t.DisposableComponent=V,t.EmptyStateComponent=Kt,t.EventCleanUpSession=Ct,t.FocusBindingDirective=k,t.InPlaceInteractionContextComponent=pt,t.InteractionModule=dt,t.InteractionService=t.ɵz,t.InteractionServiceRoutingAdapter=ct,t.LEFT_RIGHT_PLACE_ANIMATION=qt,t.ListPlaceNavComponent=Xt,t.ModalInteractionContextFactory=ut,t.Navigating=xt,t.NavigatingDuringInteraction=St,t.NavigationSession=bt,t.NoopAuthGuard=he,t.NoopComponent=W,t.NumberInputComponent=H,t.PasswordInputComponent=q,t.Place=function(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new ht(n,e.path,!!y.isNil(e.authenticate)||e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):p.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}},t.PlaceComponentDeactivationHandler=vt,t.PlaceDefinition=ht,t.PlaceGuard=ye,t.PlaceHistory=t.ɵbc,t.PlaceModule=Zt,t.PlaceOutletComponent=zt,t.PlaceRouter=Ut,t.Point=ie,t.PopStateDuringInteractionNavigation=Mt,t.PopStateNavigation=Ft,t.ROUTE_PARAMETER_LIST_KEY=gt,t.RemoveLastInteractionFromUrlNavigationSession=Rt,t.ResizeAwareComponent=oe,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);g.Klass.get(i).addToOwnMetadataList(gt,r),me(i,o,new p.MutableValueModel,"@RouteId",(function(t){return t.query().isNil()}))}},t.ScrollContainerComponent=K,t.SelectInputComponent=z,t.StringInputComponent=G,t.SwitchCaseComponent=J,t.SwitchCaseDefaultDirective=Z,t.SwitchCaseOption=X,t.SwitchCaseWhenDirective=Y,t.SynchroniseInteractionContextIdsWithRoute=Pt,t.TabbedPlaceNavigationComponent=Yt,t.UrlService=_t,t.Visit=jt,t.VisitParameter=function(e){var n=g.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));g.Klass.get(i).addToOwnMetadataList(gt,r),me(i,o,new p.MutableValueModel,"@VisitParameter",(function(t){return t.query().isNil()}))}},t.VisitParameterList=function(e){var n=g.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));g.Klass.get(i).addToOwnMetadataList(gt,r),me(i,o,new p.MutableListModel,"@VisitParameterList",(function(t){return t.query().isEmpty()}))}},t.VisitSanitiser=ge,t.WaitUntilLeavingInteractionTransitionCancelled=It,t.WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish=wt,t.WaitUntilPopStateDuringCanDeactivateInteractionFinishes=Et,t.leftRightPlaceAnimation=Bt,t.slideDownOnEnterAnimation=$t,t.slideRightOnEnterAnimation=ee,t.ɵa=L,t.ɵb=N,t.ɵba=ut,t.ɵbb=_t,t.ɵbd=Yt,t.ɵbe=Gt,t.ɵbf=Xt,t.ɵbg=dt,t.ɵbh=st,t.ɵbi=ot,t.ɵbj=at,t.ɵbk=it,t.ɵbl=$,t.ɵbm=tt,t.ɵbo=nt,t.ɵbp=et,t.ɵbr=pt,t.ɵc=k,t.ɵd=V,t.ɵe=Q,t.ɵf=H,t.ɵg=B,t.ɵh=G,t.ɵi=q,t.ɵj=z,t.ɵk=K,t.ɵl=W,t.ɵm=X,t.ɵn=Y,t.ɵo=Z,t.ɵp=J,t.ɵq=Zt,t.ɵr=Kt,t.ɵs=Wt,t.ɵt=zt,t.ɵu=Bt,t.ɵv=qt,t.ɵw=Nt,t.ɵy=Ut,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
17
17
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|