@coolon/angular-ui-powerups 1.12.0 → 1.13.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/assets/table.scss +32 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +760 -426
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  7. package/coolon-angular-ui-powerups.d.ts +58 -55
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/coolon-angular-ui-powerups.js +56 -53
  10. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  11. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  12. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  13. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  14. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  15. package/esm2015/lib/components/components.module.js +9 -2
  16. package/esm2015/lib/components/components.module.js.map +1 -1
  17. package/esm2015/lib/components/components.module.metadata.json +1 -1
  18. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  19. package/esm2015/lib/components/forms/abstract-input.component.js +10 -15
  20. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  21. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  22. package/esm2015/lib/components/forms/abstract-list-input.component.js +27 -0
  23. package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -0
  24. package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -0
  25. package/esm2015/lib/components/forms/abstract-list-input.component.ngfactory.js.map +1 -0
  26. package/esm2015/lib/components/forms/abstract-value-input.component.js +27 -0
  27. package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -0
  28. package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -0
  29. package/esm2015/lib/components/forms/abstract-value-input.component.ngfactory.js.map +1 -0
  30. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -3
  31. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  32. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  33. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +54 -0
  34. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -0
  35. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -0
  36. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.ngfactory.js.map +1 -0
  37. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.scss.shim.ngstyle.js.map +1 -0
  38. package/esm2015/lib/components/forms/number-input/number-input.component.js +4 -4
  39. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  40. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  41. package/esm2015/lib/components/forms/password-input/password-input.component.js +4 -4
  42. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  43. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  44. package/esm2015/lib/components/forms/select-input/select-input.component.js +4 -4
  45. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  46. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  47. package/esm2015/lib/components/forms/string-input/string-input.component.js +4 -4
  48. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  49. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  50. package/esm2015/lib/components/forms/text-input/text-input.component.js +4 -4
  51. package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
  52. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  53. package/esm2015/lib/components/index.js +3 -0
  54. package/esm2015/lib/components/index.js.map +1 -1
  55. package/esm2015/lib/components/index.metadata.json +1 -1
  56. package/esm2015/lib/components/table/cell-editors.js +1 -0
  57. package/esm2015/lib/components/table/cell-editors.js.map +1 -0
  58. package/esm2015/lib/components/table/cell-editors.metadata.json +1 -0
  59. package/esm2015/lib/components/table/column-model.js +205 -60
  60. package/esm2015/lib/components/table/column-model.js.map +1 -1
  61. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  62. package/esm2015/lib/components/table/column-template/column-template.directive.js +26 -1
  63. package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -1
  64. package/esm2015/lib/components/table/column-template/column-template.directive.metadata.json +1 -1
  65. package/esm2015/lib/components/table/edit-session.js +10 -7
  66. package/esm2015/lib/components/table/edit-session.js.map +1 -1
  67. package/esm2015/lib/components/table/edit-session.metadata.json +1 -1
  68. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +1 -12
  69. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
  70. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.metadata.json +1 -1
  71. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +6 -8
  72. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
  73. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -1
  74. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +43 -19
  75. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  76. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  77. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +12 -8
  78. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
  79. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
  80. package/esm2015/lib/components/table/table-model.js +15 -4
  81. package/esm2015/lib/components/table/table-model.js.map +1 -1
  82. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  83. package/esm2015/lib/components/table/table.component.js +8 -0
  84. package/esm2015/lib/components/table/table.component.js.map +1 -1
  85. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  86. package/esm5/coolon-angular-ui-powerups.js +56 -53
  87. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  88. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  89. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  90. package/esm5/lib/components/components.module.js +9 -2
  91. package/esm5/lib/components/components.module.js.map +1 -1
  92. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  93. package/esm5/lib/components/forms/abstract-input.component.js +18 -15
  94. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  95. package/esm5/lib/components/forms/abstract-list-input.component.js +30 -0
  96. package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -0
  97. package/esm5/lib/components/forms/abstract-list-input.component.ngfactory.js.map +1 -0
  98. package/esm5/lib/components/forms/abstract-value-input.component.js +30 -0
  99. package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -0
  100. package/esm5/lib/components/forms/abstract-value-input.component.ngfactory.js.map +1 -0
  101. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -3
  102. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  103. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +57 -0
  104. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -0
  105. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.ngfactory.js.map +1 -0
  106. package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.scss.shim.ngstyle.js.map +1 -0
  107. package/esm5/lib/components/forms/number-input/number-input.component.js +4 -4
  108. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  109. package/esm5/lib/components/forms/password-input/password-input.component.js +4 -4
  110. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  111. package/esm5/lib/components/forms/select-input/select-input.component.js +4 -4
  112. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  113. package/esm5/lib/components/forms/string-input/string-input.component.js +4 -4
  114. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  115. package/esm5/lib/components/forms/text-input/text-input.component.js +4 -4
  116. package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
  117. package/esm5/lib/components/index.js +3 -0
  118. package/esm5/lib/components/index.js.map +1 -1
  119. package/esm5/lib/components/table/cell-editors.js +1 -0
  120. package/esm5/lib/components/table/cell-editors.js.map +1 -0
  121. package/esm5/lib/components/table/column-model.js +243 -80
  122. package/esm5/lib/components/table/column-model.js.map +1 -1
  123. package/esm5/lib/components/table/column-template/column-template.directive.js +26 -1
  124. package/esm5/lib/components/table/column-template/column-template.directive.js.map +1 -1
  125. package/esm5/lib/components/table/edit-session.js +10 -7
  126. package/esm5/lib/components/table/edit-session.js.map +1 -1
  127. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +1 -16
  128. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
  129. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +6 -8
  130. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
  131. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +43 -19
  132. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  133. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +12 -8
  134. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
  135. package/esm5/lib/components/table/table-model.js +15 -4
  136. package/esm5/lib/components/table/table-model.js.map +1 -1
  137. package/esm5/lib/components/table/table.component.js +8 -0
  138. package/esm5/lib/components/table/table.component.js.map +1 -1
  139. package/fesm2015/coolon-angular-ui-powerups.js +579 -288
  140. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  141. package/fesm5/coolon-angular-ui-powerups.js +673 -358
  142. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  143. package/lib/components/forms/abstract-input.component.d.ts +10 -12
  144. package/lib/components/forms/abstract-list-input.component.d.ts +16 -0
  145. package/lib/components/forms/abstract-value-input.component.d.ts +16 -0
  146. package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +4 -4
  147. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +15 -0
  148. package/lib/components/forms/number-input/number-input.component.d.ts +4 -4
  149. package/lib/components/forms/password-input/password-input.component.d.ts +4 -4
  150. package/lib/components/forms/select-input/select-input.component.d.ts +4 -4
  151. package/lib/components/forms/string-input/string-input.component.d.ts +4 -4
  152. package/lib/components/forms/text-input/text-input.component.d.ts +4 -4
  153. package/lib/components/index.d.ts +4 -1
  154. package/lib/components/table/cell-editors.d.ts +9 -0
  155. package/lib/components/table/column-model.d.ts +85 -33
  156. package/lib/components/table/column-template/column-template.directive.d.ts +8 -2
  157. package/lib/components/table/edit-session.d.ts +4 -4
  158. package/lib/components/table/select-cell-renderer/select-cell-renderer.component.d.ts +1 -3
  159. package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +13 -6
  160. package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +8 -4
  161. package/lib/components/table/table-model.d.ts +5 -1
  162. package/lib/components/table/table.component.d.ts +3 -1
  163. package/package.json +1 -1
  164. package/esm2015/lib/components/table/cell-editor.component.js +0 -1
  165. package/esm2015/lib/components/table/cell-editor.component.js.map +0 -1
  166. package/esm2015/lib/components/table/cell-editor.component.metadata.json +0 -1
  167. package/esm5/lib/components/table/cell-editor.component.js +0 -1
  168. package/esm5/lib/components/table/cell-editor.component.js.map +0 -1
  169. package/lib/components/table/cell-editor.component.d.ts +0 -5
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/material/select"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@angular/cdk/portal"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/icon"),require("@angular/material/table"),require("@coolon/pectin"),require("@angular/flex-layout"),require("@angular/material/dialog"),require("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/cdk/overlay"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("immer"),require("@angular/material/progress-spinner"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations"),require("resize-observer-polyfill"),require("rxjs")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material/form-field","@angular/material/input","@angular/material/select","@angular/material/tabs","@angular/platform-browser/animations","@angular/cdk/portal","@angular/material/button","@angular/material/checkbox","@angular/material/icon","@angular/material/table","@coolon/pectin","@angular/flex-layout","@angular/material/dialog","@angular/router","lodash","@coolon/typescript-utilities","@angular/cdk/overlay","@typescript-plus/fast-memoize-decorator/dist/src","immer","@angular/material/progress-spinner","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations","resize-observer-polyfill","rxjs"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material.formField,t.ng.material.input,t.ng.material.select,t.ng.material.tabs,t.ng.platformBrowser.animations,t.ng.cdk.portal,t.ng.material.button,t.ng.material.checkbox,t.ng.material.icon,t.ng.material.table,t.pectin,t.ng.flexLayout,t.ng.material.dialog,t.ng.router,t.___default,t.typescriptUtilities,t.ng.cdk.overlay,t.src,t.produce,t.ng.material.progressSpinner,t.ng.material.list,t.ng.material.tooltip,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver,t.rxjs)}(this,(function(t,e,n,i,o,r,a,s,c,l,u,p,d,f,h,m,g,y,v,b,C,I,x,w,R,P,S,M,O,A,D){"use strict";var T="default"in v?v.default:v;x=x&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x,A=A&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A;
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/material/select"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@angular/cdk/portal"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/icon"),require("@angular/material/table"),require("@coolon/pectin"),require("@angular/flex-layout"),require("@angular/material/dialog"),require("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/cdk/overlay"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("immer"),require("@angular/material/progress-spinner"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations"),require("resize-observer-polyfill"),require("rxjs")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material/form-field","@angular/material/input","@angular/material/select","@angular/material/tabs","@angular/platform-browser/animations","@angular/cdk/portal","@angular/material/button","@angular/material/checkbox","@angular/material/icon","@angular/material/table","@coolon/pectin","@angular/flex-layout","@angular/material/dialog","@angular/router","lodash","@coolon/typescript-utilities","@angular/cdk/overlay","@typescript-plus/fast-memoize-decorator/dist/src","immer","@angular/material/progress-spinner","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations","resize-observer-polyfill","rxjs"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material.formField,t.ng.material.input,t.ng.material.select,t.ng.material.tabs,t.ng.platformBrowser.animations,t.ng.cdk.portal,t.ng.material.button,t.ng.material.checkbox,t.ng.material.icon,t.ng.material.table,t.pectin,t.ng.flexLayout,t.ng.material.dialog,t.ng.router,t.___default,t.typescriptUtilities,t.ng.cdk.overlay,t.src,t.produce,t.ng.material.progressSpinner,t.ng.material.list,t.ng.material.tooltip,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver,t.rxjs)}(this,(function(t,e,n,i,o,r,a,s,c,l,u,p,d,f,h,m,g,y,v,b,C,I,x,R,w,P,S,M,A,O,T){"use strict";var D="default"in v?v.default:v;x=x&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x,O=O&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O;
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -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 E=function(t,e){return(E=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 F(t,e){function n(){this.constructor=t}E(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var k=function(){return(k=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 _(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 j(t,e){return function(n,i){e(n,i,t)}}function N(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function U(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 V(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 L(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 B(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L(arguments[e]));return t}var H=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new h.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return F(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(){h.assert.notNil(this.pectinCommand),this.pectinCommand instanceof h.UnaryCommand?this._commandParameterProvided||h.lang.illegalState("UnaryCommands require the command parameter to be specified."):this._commandParameterProvided&&h.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;h.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 h.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]}]}]},_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],e.prototype,"pectinCommand",null),_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],e.prototype,"commandParameter",null),_([n.HostListener("click",["$event"]),N("design:type",Function),N("design:paramtypes",[Event]),N("design:returntype",void 0)],e.prototype,"notifyClick",null),e=_([n.Directive({selector:"[pectinCommand]"}),j(0,n.Inject(n.ElementRef)),N("design:paramtypes",[n.ElementRef])],e)}(h.GarbageCollector),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e=_([n.Directive()],e)}(h.GarbageCollector),G=function(t){function i(e,n,i,o){var r=t.call(this)||this;return r.focusTargetElement=e,r.ngZone=n,r.focusContext=o,r.document=i,h.Dsl.disposeWith(r).when.valueOf(r.focusContext.focused).changes((function(t){t&&!r.alreadyHasFocus()&&r.tryAndFocus()}),{initialValue:"triggerChangeUnlessNil"}),r}return F(i,t),i.prototype.onFocusIn=function(){this.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.focusContext.notifyFocusOut()},i.prototype.alreadyHasFocus=function(){return this.isElementFocused(this.focusTarget)},i.prototype.isElementFocused=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()||(h.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):h.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.focusTargetElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i=_([j(1,n.Inject(n.NgZone)),j(2,n.Inject(e.DOCUMENT)),N("design:paramtypes",[HTMLElement,n.NgZone,Object,Object])],i)}(h.GarbageCollector),z=function(){function t(t,e){this.ngZone=t,this.document=e}return t.prototype.createBinding=function(t,e){return new G(t,this.ngZone,this.document,e)},t.ctorParameters=function(){return[{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(n.NgZone),n.ɵɵinject(e.DOCUMENT))},token:t,providedIn:"root"}),t=_([n.Injectable({providedIn:"root"}),j(0,n.Inject(n.NgZone)),j(1,n.Inject(e.DOCUMENT)),N("design:paramtypes",[n.NgZone,Object])],t)}(),W=function(t){function e(e,n){var i=t.call(this)||this;return i.el=e,i.focusBindingFactory=n,i}return F(e,t),e.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusIn()},e.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusOut()},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.hasBinding()?this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget,this.pectinFocusBinding)):h.Logger.get(this).warn("pectinFocusBinding was nil")},e.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding},Object.defineProperty(e.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:z}]},_([n.Input(),N("design:type",Object)],e.prototype,"pectinFocusBinding",void 0),_([n.Input(),N("design:type",HTMLElement)],e.prototype,"focusBindingTarget",void 0),_([n.HostListener("focusin"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onFocusIn",null),_([n.HostListener("focusout"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onFocusOut",null),e=_([n.Directive({selector:"[pectinFocusBinding]"}),j(0,n.Inject(n.ElementRef)),N("design:paramtypes",[n.ElementRef,z])],e)}(q),K=function(){function t(){}return t=_([n.NgModule({declarations:[H,W],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule],exports:[H,W]})],t)}(),X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.align="start",e}return F(e,t),Object.defineProperty(e.prototype,"alignEnd",{get:function(){return"end"===this.align},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.hasConfirmText=function(){return!T.isEmpty(this.confirmText)},_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"confirmCommand",void 0),_([n.Input(),N("design:type",String)],e.prototype,"confirmText",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"cancelCommand",void 0),_([n.Input(),N("design:type",String)],e.prototype,"align",void 0),_([n.HostBinding("class.align-end"),N("design:type",Boolean),N("design:paramtypes",[])],e.prototype,"alignEnd",null),e=_([n.Component({selector:"aup-activity-actions",template:'<button class="cancel" mat-icon-button [pectinCommand]="cancelCommand">\n <mat-icon>clear</mat-icon>\n</button>\n<button class="confirm" *ngIf="!hasConfirmText()" mat-icon-button [pectinCommand]="confirmCommand">\n <mat-icon>done</mat-icon>\n</button>\n<button class="confirm" *ngIf="hasConfirmText()" mat-button [pectinCommand]="confirmCommand">{{confirmText}}</button>\n<div class="content">\n <ng-content></ng-content>\n</div>\n',styles:[':host{display:-ms-grid;display:grid;grid-template-areas:"cancel confirm content";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:"content cancel confirm";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}']})],e)}(q),Y=new n.InjectionToken("InteractionActivityData"),Z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new h.DelegatingValueModel).withDefault(!1),e.class="aup-activity",e}return F(e,t),e.prototype.initialise=function(t,e){b.assert.isNil(this._activityContext),this._activityContext=e,this._interactionContext=t},Object.defineProperty(e.prototype,"interactionContext",{get:function(){return b.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},_([n.HostBinding("class"),N("design:type",Object)],e.prototype,"class",void 0),e}(q),$=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return F(e,t),e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Y]}]}]},e=_([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}"]}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),J=function(t){function e(e){var n=t.call(this)||this;return n.config=e,h.assert.notNil(e),n}return F(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:[Y]}]}]},e=_([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}"]}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),Q=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,h.assert.notNil(e),n}return F(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:[Y]}]}]},e=_([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}"]}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),tt=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($,t,!1)},t.prototype.confirmOrReject=function(t){return this.createAndLaunchActivity(Q,t,!0)},t.prototype.confirmThen=function(t,e,n){return this.createAndLaunchActivity(J,{confirm:t,activityType:e,data:n},!0)},t}(),et=function(){function t(t,e,n){this.activityClass=t,this.activityData=e,this.onComplete=n,this._complete=!1,this.deferredResult=h.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 h.assert.isTruthy(this.isActivityRealised()),this._activity},enumerable:!0,configurable:!0}),t.prototype.notifyActivityCreated=function(t,e){h.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){h.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}(),nt=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()&&b.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:Y,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}]},_([n.Input(),N("design:type",Object)],t.prototype,"nestedInteractionContext",void 0),_([n.Input(),N("design:type",et),N("design:paramtypes",[et])],t.prototype,"activityRef",null),t=_([n.Component({selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}),N("design:paramtypes",[n.ComponentFactoryResolver,n.ViewContainerRef,n.Injector])],t)}(),it=function(t){function e(){var e=t.call(this)||this;return e.dynamicHeight=!1,e.activityTabs=[],e.garbage=new h.GarbageCollector,e}return F(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=h.Dsl.disposeWith(this);e.chain;e.observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},e.prototype.initialise=function(t,e){h.assert.isFalsey(this.isInitialised()),h.assert.notNil(t),h.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(){h.assert.isFalsey(this.isActive()),this.garbage.dispose()},e.prototype.getActiveActivityRef=function(){return this.isActive()||b.lang.illegalState("no activity in progress"),T.findLast(this.activityTabs,(function(t){return!t.isComplete()}))},e.prototype.cancelActiveActivity=function(){return U(this,void 0,void 0,(function(){return V(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;h.assert.isTruthy(this.isInitialised());var o=new et(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 U(this,void 0,void 0,(function(){return V(this,(function(t){return[2,!this._deferredCleanUp||this._deferredCleanUp]}))}))},e.prototype.finishAndStartCleanup=function(){var t=this;if(!this._deferredCleanUp){this.activityTabs=[];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.synchroniseSelectedTabIndex()},e.prototype.activityIndex=function(t,e){return t},e.prototype.onAnimationFinished=function(){this.onAnimationFinishedJob&&(this.onAnimationFinishedJob(),this.onAnimationFinishedJob=void 0)},e.prototype.synchroniseSelectedTabIndex=function(){var t=this,e=this.tabs.selectedIndex,n=this.getActiveActivityCount()-1;e!==n&&(this.tabs.selectedIndex=n,this.onAnimationFinishedJob=function(){t.getSelectedOutlet().component.onActivityReady(),t.activityTabs=t.activityTabs.filter((function(t){return!t.isComplete()}))})},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)},_([n.Input(),N("design:type",Object)],e.prototype,"dynamicHeight",void 0),_([n.ViewChild("tabs",{static:!0}),N("design:type",s.MatTabGroup)],e.prototype,"tabs",void 0),_([n.ViewChildren(nt),N("design:type",n.QueryList)],e.prototype,"activityOutlets",void 0),_([h.Trace(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"dispose",null),e=_([n.Component({selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header\n [dynamicHeight]="dynamicHeight"\n [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}"]}),N("design:paramtypes",[])],e)}(tt),ot=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}(),rt=function(){},at=0;t.ɵbw=function(){function t(t){this.modelInteractionContextFactory=t,this.garbage=new h.GarbageCollector,this._navigationInProgress=(new h.DelegatingValueModel).withDefault(!1);var n=h.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"+ ++at,new e.ApiAdapter(this.placeRouter,this.inPlaceInteractionRegistry))},t.prototype.registerPlaceRouter=function(t){var n=this;b.assert.isFalsey(this.placeRouter),this.placeRouter=t,this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);var i=this;return new ot(this.activeInteractionContextIds,this.activeModalContext,(function(){return i.modelInteractionContextFactory.createInteractionContext("exclusive",new e.ApiAdapter(n.placeRouter,n.exclusiveInteractionRegistry))}))},t.ctorParameters=function(){return[{type:rt}]},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(rt))},token:t,providedIn:"root"}),t=e=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[rt])],t)}(),function(t){var e=function(t){function e(){var e=t.call(this)||this;e._interactions=new h.MutableListModel,e._disabledDelegate=(new h.DelegatingValueModel).withDefault(!1);var n=h.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 F(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}(h.GarbageCollector);t.ContextRegistry=e;var n=function(){function t(t,e){this.placeRouter=t,this.contextRegistry=e}return t.prototype.notifyActive=function(t){return b.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.ɵbw||(t.ɵbw={}));var st=function(e){function i(t,n){var i=e.call(this)||this;return i.interactionService=t,i.tabConfig=n,i.animateFirstActivity=!0,i}return F(i,e),Object.defineProperty(i.prototype,"animationDuration",{get:function(){var t;return this.animateFirstActivity?(null===(t=this.tabConfig)||void 0===t?void 0:t.animationDuration)||"500ms":"0ms"},enumerable:!0,configurable:!0}),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.ɵbw},{type:void 0,decorators:[{type:n.Inject,args:[s.MAT_TABS_CONFIG]},{type:n.Optional}]}]},_([n.ViewChild("activityContainer",{static:!0}),N("design:type",it)],i.prototype,"activityContainerComponent",void 0),_([n.Input(),N("design:type",Object)],i.prototype,"animateFirstActivity",void 0),i=_([n.Component({selector:"aup-in-place-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false" [animationDuration]="animationDuration">\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}"]}),j(1,n.Inject(s.MAT_TABS_CONFIG)),j(1,n.Optional()),N("design:paramtypes",[t.ɵbw,Object])],i)}(q),ct=function(t){function e(){var e=t.call(this)||this;return e.tabindex=0,e.clickCommand=h.Command.create((function(t){e.activityClass?e.startActivity(e.activityClass,e.activityData).catch((function(t){})):e.addCommand.withContext(t).execute()})),e}return F(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return!!this.interactionContext&&this.interactionContext.isActive()},enumerable:!0,configurable:!0}),e.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},e.prototype.ngOnInit=function(){},_([n.Input(),N("design:type",String)],e.prototype,"label",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityClass",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityData",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"addCommand",void 0),_([n.ViewChild(st),N("design:type",st)],e.prototype,"interactionContext",void 0),_([n.HostBinding("class.interaction-active"),N("design:type",Boolean),N("design:paramtypes",[])],e.prototype,"active",null),_([n.HostBinding("tabindex"),N("design:type",Object)],e.prototype,"tabindex",void 0),e=_([n.Component({selector:"aup-add-item-interaction-context",template:'<aup-in-place-interaction-context #interactionContext [animateFirstActivity]="false">\n <a part="link" class="link" [pectinCommand]="clickCommand"><mat-icon>add</mat-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n',styles:[":host{--def-link-color:var(--link-color, currentColor);--def-link-backgound:var(--link-background, rgba(0, 0, 0, 0.05));--def-link-border-radius:var(--link-border-radius, 4px);--def-link-padding:var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:0}:host:hover{--link-background:rgba(0,0,0,0.1)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-backgound);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]}),N("design:paramtypes",[])],e)}(q),lt=function(t){function e(e,n){var i=t.call(this)||this;return i._element=e,i._overlay=n,i.outputPortal=new l.ComponentPortal(st),i.anchorX="start",i.anchorY="bottom",i}return F(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this.isActive()},enumerable:!0,configurable:!0}),e.prototype.startActivity=function(t,e){var n=this,i=this._overlay.create({hasBackdrop:!1,panelClass:"aup-popup-interaction-panel",positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withPositions(this.computePositions()).withGrowAfterOpen(!0)}),o=i.attach(this.outputPortal);return this.interactionContext=o.instance,new Promise((function(o,r){setTimeout((function(){n.interactionContext.startActivity(t,e).then(o).catch(r).finally((function(){return i.dispose()}))}))}))},e.prototype.computePositions=function(){var t="start"===this.anchorX?"start":"end",e="top"===this.anchorY?"bottom":"top";return[{originX:this.anchorX,originY:this.anchorY,overlayX:t,overlayY:e}]},e.prototype.cancelActiveActivity=function(){return this.interactionContext.cancelActiveActivity()},e.prototype.isActive=function(){return this.interactionContext&&this.interactionContext.isActive()},e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:n.ElementRef},{type:C.Overlay}]},_([n.HostBinding("class.interaction-active"),N("design:type",Boolean),N("design:paramtypes",[])],e.prototype,"active",null),_([n.Input(),N("design:type",String)],e.prototype,"anchorX",void 0),_([n.Input(),N("design:type",String)],e.prototype,"anchorY",void 0),e=_([n.Component({selector:"aup-popup-interaction-context",template:"<ng-content></ng-content>\n",styles:[":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]}),N("design:paramtypes",[n.ElementRef,C.Overlay])],e)}(q),ut=function(t){function e(){var e=t.call(this)||this;return e.activityDone=new n.EventEmitter,e.activityCancelled=new n.EventEmitter,e}return F(e,t),e.prototype.onEnter=function(t){this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.onClick=function(t){this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.startActivity=function(){var t=this;h.assert.isTruthy(this.aupInteractionContextTriggerFor),h.assert.isFalsey(this.aupInteractionContextTriggerFor.isActive()),h.assert.isTruthy(this.activityClass),this.aupInteractionContextTriggerFor.startActivity(this.activityClass,this.activityData).then((function(e){t.activityDone.emit(e)})).catch((function(e){t.activityCancelled.emit(e)}))},e.prototype.prepareActivityData=function(){return T.isFunction(this.activityDataFactory())?this.activityDataFactory():this.activityData},_([n.Input(),N("design:type",Object)],e.prototype,"aupInteractionContextTriggerFor",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityClass",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityData",void 0),_([n.Input(),N("design:type",Function)],e.prototype,"activityDataFactory",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"activityDone",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"activityCancelled",void 0),_([n.HostListener("keyup.enter"),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"onEnter",null),_([n.HostListener("click"),N("design:type",Function),N("design:paramtypes",[MouseEvent]),N("design:returntype",void 0)],e.prototype,"onClick",null),e=_([n.Directive({selector:"[aupInteractionContextTriggerFor]"}),N("design:paramtypes",[])],e)}(h.GarbageCollector),pt=function(){function i(){}return i=_([n.NgModule({imports:[e.CommonModule,u.MatButtonModule,g.MatDialogModule,s.MatTabsModule,l.PortalModule,y.RouterModule,d.MatIconModule,K,m.FlexModule,m.GridModule],declarations:[it,Q,J,$,nt,st,ct,X,lt,ut],exports:[it,nt,st,ct,X,lt,ut],entryComponents:[it,Q,J,$],providers:[t.ɵbw]})],i)}(),dt=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"addCardCommand",void 0),_([n.ContentChild("addCardTemplate"),N("design:type",n.TemplateRef)],e.prototype,"addCardTemplate",void 0),e=_([n.Component({selector:"aup-card-container",template:'<div class="card-container">\n <ng-content></ng-content>\n\n <div class="add-card-container" *ngIf="addCardCommand.enabled.value" [pectinCommand]="addCardCommand">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class="add-card-template" *ngIf="addCardTemplate">\n <ng-container [ngTemplateOutlet]="addCardTemplate"></ng-container>\n </div>\n\n</div>\n',styles:[":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]}),N("design:paramtypes",[])],e)}(q),ft=function(t){function e(e){var n=t.call(this)||this;return n.focusManager=e,n.restoreFocusCommand=h.Command.create((function(){n.restoreFocus()})),n.tabIndex=-1,n}return F(e,t),e.prototype.ngOnInit=function(){},e.prototype.restoreFocus=function(){this.focusManager.restoreFocus()},e.ctorParameters=function(){return[{type:h.FocusManager,decorators:[{type:n.Self}]}]},_([n.HostBinding("attr.tabindex"),N("design:type",Object)],e.prototype,"tabIndex",void 0),e=_([n.Component({selector:"aup-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:h.FocusManager}],styles:[":host{display:block}"]}),j(0,n.Self()),N("design:paramtypes",[h.FocusManager])],e)}(q),ht=function(t){function e(e,n,i){var o=t.call(this)||this;o.el=e,o.focusManager=n;var r=h.Dsl.disposeWith(o);r.chain,r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return o.focusManager&&(o._focusContext=o.focusManager.registerFocusable(o),o.registerDisposable(o._focusContext),o.registerDisposable(i.createBinding(e.nativeElement,o.focusContext))),o}return F(e,t),Object.defineProperty(e.prototype,"focusable",{get:function(){return this.focusContext?0:void 0},enumerable:!0,configurable:!0}),e.prototype.onFocus=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusIn()},e.prototype.onBlur=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusOut()},Object.defineProperty(e.prototype,"focusContext",{get:function(){return this._focusContext},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:n.ElementRef},{type:h.FocusManager},{type:z}]},_([n.HostBinding("attr.tabindex"),N("design:type",Object),N("design:paramtypes",[])],e.prototype,"focusable",null),_([n.HostListener("focus"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onFocus",null),_([n.HostListener("blur"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onBlur",null),e=_([n.Component({template:""}),N("design:paramtypes",[n.ElementRef,h.FocusManager,z])],e)}(q),mt=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 h.GarbageCollector,b.assert.notNil(i),r}return F(e,t),e.prototype.cancelActiveActivity=function(){return this.activityContainer.cancelActiveActivity()},e.prototype.dispose=function(){this.isActive()&&h.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;b.assert.isNil(this._currentActivityRef);var o=k(k({},this.config),{disableClose:n,panelClass:"dialog-interaction-context"}),r=this.dialogService.open(it,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}(tt),gt=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),yt=function(t){function e(e,n,i){var o=t.call(this)||this;return o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,b.assert.notNil(e),o}return F(e,t),e.prototype.createInteractionContext=function(t,e){var n=k(k({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig),this.dialogServiceDefaults);return new mt(t,e,this.dialogService,n)},e.ctorParameters=function(){return[{type:g.MatDialog},{type:g.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[gt]}]},{type:g.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[g.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(g.MatDialog),n.ɵɵinject(gt,8),n.ɵɵinject(g.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e=_([n.Injectable({providedIn:"root"}),j(1,n.Optional()),j(1,n.Inject(gt)),j(2,n.Optional()),j(2,n.Inject(g.MAT_DIALOG_DEFAULT_OPTIONS)),N("design:paramtypes",[g.MatDialog,g.MatDialogConfig,g.MatDialogConfig])],e)}(rt),vt=function(t){function e(e){var n=t.call(this)||this;n.data=e,n.class="aup-input-activity";var i=new h.Form;return n.valueModel=i.valueModel(n.data.initialValue),n.valueModel.validateUsing(e.validators||[]),n.confirmCommand=h.Command.create((function(){if(n.valueModel.validate()){if(e.save)return Promise.resolve(e.save(n.valueModel,n.interactionContext)).then((function(){return n.done()}));n.done(n.valueModel.value)}})),n.cancelCommand=h.Command.create((function(){n.cancel()})),n}return F(e,t),e.prototype.onActivityReady=function(){this.valueModel.focusContext.requestFocus()},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Y]}]}]},_([n.HostBinding("class"),N("design:type",Object)],e.prototype,"class",void 0),e=_([n.Component({template:""}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),bt=function(t){function e(){var e=t.call(this)||this;e.delegatingFormValueModel=e.registerDisposable(new h.DelegatingFormValueModel),e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter,e.baseClassName="aup-input-component";var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return F(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}),_([n.Input(),N("design:type",String)],e.prototype,"label",void 0),_([n.Input(),N("design:type",String)],e.prototype,"floatLabel",void 0),_([n.Input(),N("design:type",String)],e.prototype,"hint",void 0),_([n.Input(),N("design:type",String)],e.prototype,"placeholder",void 0),_([n.Input("command.focus"),N("design:type",h.Command)],e.prototype,"focusCommand",void 0),_([n.Input("command.blur"),N("design:type",h.Command)],e.prototype,"blurCommand",void 0),_([n.Input("command.enter"),N("design:type",h.Command)],e.prototype,"enterCommand",void 0),_([n.Input("command.escape"),N("design:type",h.Command)],e.prototype,"escapeCommand",void 0),_([n.Input("command.click"),N("design:type",h.Command)],e.prototype,"clickCommand",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"focus",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"blur",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"enterKey",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"escapeKey",void 0),_([n.HostBinding("class"),N("design:type",Object)],e.prototype,"baseClassName",void 0),_([n.HostListener("click"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"notifyClick",null),_([n.HostListener("focusin"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"notifyFocusIn",null),_([n.HostListener("focusout"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"notifyFocusOut",null),e=_([n.Component({template:""}),N("design:paramtypes",[])],e)}(q),Ct=function(t){function e(){var e=t.call(this)||this;return e.color="accent",e.labelPosition="after",e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"delegatingFormValueModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),N("design:type",String)],e.prototype,"color",void 0),_([n.Input(),N("design:type",String)],e.prototype,"labelPosition",void 0),e=_([n.Component({selector:"aup-checkbox-input",template:'\x3c!-- TODO: add focus binding --\x3e\n<mat-checkbox\n [(ngModel)]="valueModel.value"\n [color]="color"\n [labelPosition]="labelPosition"\n [disabled]="!isEnabled()"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf="hint">{{hint}}</mat-hint>\n<mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n',styles:[":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]}),N("design:paramtypes",[])],e)}(bt),It=function(t){function e(){var e=t.call(this)||this;return e.min=Number.MIN_SAFE_INTEGER,e.max=Number.MAX_SAFE_INTEGER,e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"delegatingFormValueModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"min",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"max",void 0),e=_([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]="delegatingFormValueModel?.focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [min]="min"\n [max]="max"\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]}),N("design:paramtypes",[])],e)}(bt),xt=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"delegatingFormValueModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),e=_([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]="delegatingFormValueModel.focusContext"\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]}),N("design:paramtypes",[])],e)}(bt),wt=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 F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"delegatingFormValueModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ListModel)],e.prototype,"optionsModel",void 0),_([n.Input(),h.StoreInListModel("optionsModel"),N("design:type",Array)],e.prototype,"options",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"optionLabel",void 0),_([n.Input(),N("design:type",Boolean)],e.prototype,"allowNil",void 0),_([n.ContentChild("optionTemplate"),N("design:type",n.TemplateRef)],e.prototype,"optionTemplateRef",void 0),_([n.ContentChild("nilOptionTemplate"),N("design:type",n.TemplateRef)],e.prototype,"nilOptionTemplateRef",void 0),_([n.Input(),N("design:type",Function)],e.prototype,"optionLabelFormat",void 0),e=_([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]="delegatingFormValueModel.focusContext"\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%}"]}),N("design:paramtypes",[])],e)}(bt),Rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e=_([n.Component({selector:"aup-string-input-activity",template:'\n <aup-string-input [valueModel]="valueModel"\n [label]="data.label"\n [placeholder]="data.placeholder"\n [command.enter]="confirmCommand"\n [command.escape]="cancelCommand"></aup-string-input>\n <aup-activity-actions align="end"\n [confirmCommand]="confirmCommand"\n [cancelCommand]="cancelCommand"></aup-activity-actions>\n '})],e)}(vt),Pt=function(t){function e(){var e=t.call(this)||this,n=h.Dsl.disposeWith(e),i=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.clearCommand=h.Command.create((function(){e.valueModel.value=null})),e.clearCommand.disableWhile(i.stringValue(e.valueModel).isBlank()),e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"delegatingFormValueModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),h.TrackExternal({defaultValue:!1}),N("design:type",h.ValueModel)],e.prototype,"enableClearModel",void 0),_([n.Input(),h.StoreInValueModel("enableClearModel"),N("design:type",Boolean)],e.prototype,"enableClear",void 0),e=_([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]="delegatingFormValueModel.focusContext"\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]}),N("design:paramtypes",[])],e)}(bt),St=function(t){function e(){var e=t.call(this)||this;return e.rows=2,e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"delegatingFormValueModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"rows",void 0),_([n.Input(),N("design:type",Number)],e.prototype,"cols",void 0),e=_([n.Component({selector:"aup-text-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <textarea matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="delegatingFormValueModel.focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [rows]="rows"\n [cols]="cols"\n >\n </textarea>\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]}),N("design:paramtypes",[])],e)}(bt),Mt=function(){function t(){}return t=_([n.Component({selector:"aup-noop",template:"",styles:[":host{display:block}"]}),N("design:paramtypes",[])],t)}(),Ot=function(){function t(){}return t.prototype.ngOnInit=function(){},t=_([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}"]}),N("design:paramtypes",[])],t)}(),At=function(){function t(t){this.templateRef=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),t}(),Dt=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!1,n}var i;return F(e,t),i=e,e.prototype.matches=function(t){return this.aupSwitchCaseWhen===t},e.ctorParameters=function(){return[{type:n.TemplateRef}]},_([n.Input(),N("design:type",Object)],e.prototype,"aupSwitchCaseWhen",void 0),e=i=_([n.Directive({selector:"[aupSwitchCaseWhen]",providers:[{provide:At,useExisting:i}]}),N("design:paramtypes",[n.TemplateRef])],e)}(At),Tt=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!0,n}var i;return F(e,t),i=e,e.prototype.matches=function(t){return!1},e.ctorParameters=function(){return[{type:n.TemplateRef}]},e=i=_([n.Directive({selector:"[aupSwitchCaseDefault]",providers:[{provide:At,useExisting:i}]}),N("design:paramtypes",[n.TemplateRef])],e)}(At),Et=function(t){function e(e){var n=t.call(this)||this;return n.cdr=e,n.selectedIndex=0,n}return F(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=h.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}]},_([n.Input(),h.TrackExternal(),N("design:type",h.ValueModel)],e.prototype,"switchModel",void 0),_([n.Input(),h.StoreInValueModel("switchModel"),N("design:type",Object)],e.prototype,"switch",void 0),_([n.ContentChildren(At),N("design:type",n.QueryList)],e.prototype,"switchCaseOptions",void 0),e=_([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}"]}),N("design:paramtypes",[n.ChangeDetectorRef])],e)}(q),Ft=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!0,configurable:!0}),_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],t.prototype,"value",null),t=_([n.Component({selector:"aup-default-cell-renderer",template:"{{value}}\n",styles:[""]}),N("design:paramtypes",[])],t)}(),kt=function(){function t(){}return _([n.Input(),N("design:type",String)],t.prototype,"headerText",void 0),t=_([n.Component({selector:"aup-default-header-renderer",template:"{{headerText}}\n",styles:[""]}),N("design:paramtypes",[])],t)}(),_t=function(t){function e(e,n,i){var o=t.call(this)||this;return o.rowId=e,o.saveCommand=i,o._editorValue=new h.MutableValueModel,o.rowValueModel=o._editorValue.readonly,o.form=new h.Form,o.form.load(n),o._editorValue.value=n,o.form.onEdit((function(){o._editorValue.value=x(o._editorValue.value,(function(t){o.form.writeDirtyStateTo(t)}))})),o}return F(e,t),e}(h.GarbageCollector),jt=function(t){function e(){var e=t.call(this)||this;return e.saveCommand=h.Command.create((function(){e.editSession.saveCommand.execute(e.editSession.form).then((function(t){t&&e.editSession.dispose()}))})),e.cancelCommand=h.Command.create((function(){e.editSession.dispose()})),e}return F(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"form",{get:function(){var t;return null===(t=this.editSession)||void 0===t?void 0:t.form},enumerable:!0,configurable:!0}),_([n.Input(),N("design:type",Object)],e.prototype,"row",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"editRowCommand",void 0),_([n.Input(),N("design:type",_t)],e.prototype,"editSession",void 0),e=_([n.Component({selector:"aup-row-editor-controls",template:'<button *ngIf="!editSession" mat-icon-button [pectinCommand]="editRowCommand" class="edit-button"><mat-icon>edit</mat-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="saveCommand"><mat-icon>done</mat-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="cancelCommand"><mat-icon>clear</mat-icon></button>\n',styles:[":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]}),N("design:paramtypes",[])],e)}(q),Nt=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=h.Command.create((function(){e.selectionModel.selectCommand.execute(e.row)})),e}return F(e,t),Object.defineProperty(e.prototype,"row",{get:function(){return this._row},set:function(t){this._row=t},enumerable:!0,configurable:!0}),e.prototype.isSelected=function(){return this.selectionModel.isSelected(this.row)},_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],e.prototype,"row",null),_([n.Input(),N("design:type",Object)],e.prototype,"selectionModel",void 0),e=_([n.Component({selector:"aup-select-cell-renderer",template:'<mat-checkbox [pectinCommand]="selectCommand" [checked]="isSelected()"></mat-checkbox>\n',styles:[""]}),N("design:paramtypes",[])],e)}(q),Ut=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=h.Command.create((function(){e.selectionModel.toggleAllCommand.execute()})),e}return F(e,t),e.prototype.isSelected=function(){return this.selectionModel.allSelected.value},e.prototype.isIntermediate=function(){return this.selectionModel.someSelected.value},_([n.Input(),N("design:type",h.MultipleSelectionModel)],e.prototype,"selectionModel",void 0),e=_([n.Component({selector:"aup-select-header-cell-renderer",template:'<mat-checkbox [pectinCommand]="selectCommand" [checked]="isSelected()" [indeterminate]="this.isIntermediate()"></mat-checkbox>\n',styles:[""]}),N("design:paramtypes",[])],e)}(q),Vt=function(){function t(t,e){this.columnId=t,this.defaults=e,this.cellHeaderRenderer(kt,(function(t,e){t.headerText=e.getHeaderText()}))}return t.prototype.getHeaderText=function(){var t;return(null===(t=this.getColumnTextProperties())||void 0===t?void 0:t.headerText())||this.getDefaultHeaderText()},t.prototype.getDefaultHeaderText=function(){return this.columnId},t.prototype.getColumnTextProperties=function(){return this._columnTextProperties||this.defaults.getColumnTextProperties(this)},t.prototype.textProperties=function(t){return this._columnTextProperties=t,this},t.prototype.setCellRenderer=function(t,e){this._cellRendererConfig={portal:new l.ComponentPortal(t),pushState:e}},t.prototype.cellHeaderRenderer=function(t,e){return this._columnHeaderConfig={portal:new l.ComponentPortal(t),initialiseComponent:e},this},t.prototype.setCellEditor=function(t){this._cellEditorConfig=t},Object.defineProperty(t.prototype,"cellRendererPortal",{get:function(){return this._cellRendererConfig.portal},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnHeaderCellRendererPortal",{get:function(){return this._columnHeaderConfig.portal},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cellEditorPortal",{get:function(){var t;return null===(t=this._cellEditorConfig)||void 0===t?void 0:t.portal},enumerable:!0,configurable:!0}),t.prototype.hasEditor=function(){return!!this._cellEditorConfig},t.prototype.updateCellRenderer=function(t,e,n,i){this._cellRendererConfig.pushState(t,e,n,i)},t.prototype.initialiseHeader=function(t){this._columnHeaderConfig.initialiseComponent(t,this)},t.prototype.initialiseEditor=function(t,e){this._cellEditorConfig.initialiseComponent(t,e)},_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",String)],t.prototype,"getHeaderText",null),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",Object)],t.prototype,"getColumnTextProperties",null),t}(),Lt=function(t){function e(e,n){var i=t.call(this,e.toString(),n)||this;return i.property=e,i._format=function(t){return t},i.cellRenderer(Ft),i}return F(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.setCellRenderer(t,(function(t,n){t.value=e._format(n[e.property])})),this},e.prototype.cellEditor=function(t,e){var n=this;return this.setCellEditor({portal:new l.ComponentPortal(t),initialiseComponent:function(t,i){var o=i.form.pluck(n.property);(null==e?void 0:e.validators)&&o.validateUsing(e.validators),t.valueModel=o,(null==e?void 0:e.initialiseComponent)&&e.initialiseComponent(t)}}),this},e.prototype.format=function(t){return b.assert.isFunction(t),this._format=t,this},e}(Vt),Bt=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.getValue=i,o.cellRenderer(Ft),o}return F(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.setCellRenderer(t,(function(t,n){t.value=e.getValue(n)})),this},e}(Vt),Ht=function(t){function e(e,n,i){var o=t.call(this,e,i)||this;return o.cellRenderer(jt),o}return F(e,t),e.prototype.cellRenderer=function(t){return this.setCellRenderer(t,(function(t,e,n,i){t.row=e,t.editSession=i,t.editRowCommand=n})),this},e.prototype.getDefaultHeaderText=function(){return""},e}(Vt),qt=function(t){function e(e,n,i){return t.call(this,e,n)||this}return F(e,t),e}(Vt),Gt=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return i instanceof h.MultipleSelectionModel&&o.cellHeaderRenderer(Ut,(function(t){t.selectionModel=i})),o.setCellRenderer(Nt,(function(t,e,n,o){t.row=e,t.selectionModel=i})),o}return F(e,t),e.prototype.getDefaultHeaderText=function(){return""},e}(Vt),zt=function(){function t(t){this.sourceOfTruth=t,this._garbage=new h.GarbageCollector,this._columns=new h.MutableListModel,this._editorSessions=new h.MutableListModel,this.identityOf=t.identityOf;var e=h.Dsl.disposeWith(this._garbage),n=e.chain;e.valueOf,e.before,e.when,e.after,e.observe,e.switchOn;this._columnsById=n(this._columns).indexBy("columnId"),this._rowsBeingEdited=new h.MutableListModel([],{identifiedWith:this.identityOf}),this._editorSessionByRowId=n(this._editorSessions).indexBy("rowId"),this.editing=n(this._editorSessions).count().isGreaterThan(0),this.dataSource=n(this.sourceOfTruth).replaceAll(this.rowsBeingEdited)}var e;return e=t,t.fromList=function(t,n){var i=new e(t);return n(i),i},Object.defineProperty(t.prototype,"rowsBeingEdited",{get:function(){return this._rowsBeingEdited.readonly},enumerable:!0,configurable:!0}),t.prototype.getTrackByFunction=function(){var t=this;return function(e,n){return t.identityOf?t.identityOf(n):e}},Object.defineProperty(t.prototype,"columns",{get:function(){return this._columns.readonly},enumerable:!0,configurable:!0}),t.prototype.pluck=function(t){return this.addColumn(new Lt(t,this))},t.prototype.addSelectionColumn=function(t){return this.addColumn(new Gt("selection",this,t))},t.prototype.addEditControls=function(t){return this.saveCommand=t,this.addColumn(new Ht("editControls",t,this))},t.prototype.addCustomColumn=function(t,e){return this.addColumn(new Bt(t,this,e))},t.prototype.addColumn=function(t){return this._columnsById.get(t.columnId)?h.lang.illegalState("Column with id="+t.columnId+" already exists"):this._columns.push(t),t},t.prototype.columnTextProperties=function(t){this._columnTextPropertiesLookup=t},t.prototype.getColumnTextProperties=function(t){var e=this._columnTextPropertiesLookup?this._columnTextPropertiesLookup[t.columnId]:void 0;return e?e():void 0},t.prototype.startEditSession=function(t){var e=this,n=this.identityOf(t);if(this._rowsBeingEdited.query().indexOf(t)>-1)return h.lang.illegalState("Row with id="+n+" already being edited");var i=new _t(n,t,this.saveCommand);return h.Dsl.disposeWith(i).when.valueOf(i.rowValueModel).changes((function(t){e._rowsBeingEdited.replaceOrPush(t)}),{initialValue:"triggerChangeUnlessNil"}),this._editorSessions.push(i),i.onDispose((function(){e._rowsBeingEdited.remove(i.rowValueModel.value),e._editorSessions.remove(i)})),i},t.prototype.getEditSessionFor=function(t){return this._editorSessionByRowId.get(this.identityOf(t))},t.prototype.cancelAllEditorSessions=function(){var t=this;this._editorSessions.runInTransaction((function(e){t._rowsBeingEdited.runInTransaction((function(){e.value.forEach((function(t){return t.dispose()}))}))}))},t.ctorParameters=function(){return[{type:h.ListModel}]},t=e=_([h.TrackExternal.Strategy(new h.TrackExternal.OneTimeBinding),N("design:paramtypes",[h.ListModel])],t)}(),Wt=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.ngOnInit=function(){var t=h.Dsl.disposeWith(this),e=t.chain;t.valueOf,t.before,t.when,t.after,t.observe,t.switchOn;this.columns=e(this.tableModel.columns),this.columnIds=e(this.columns).pluck("columnId")},e.prototype.isEditing=function(t){return!!this.tableModel.getEditSessionFor(t)},_([n.Input(),h.TrackExternal(),N("design:type",zt)],e.prototype,"tableModel",void 0),e=_([n.Component({selector:"aup-table",template:'<table mat-table [dataSource]="tableModel.dataSource.value" [trackBy]="tableModel.getTrackByFunction()">\n\n <ng-container *ngFor="let column of columns.value; index as index; first as first; last as last" matColumnDef="{{column.columnId}}">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]="column"\n [attr.column-index]="index"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef="let row">\n <aup-table-cell-renderer [column]="column"\n [row]="row"\n [tableModel]="tableModel"\n [editSession]="tableModel.getEditSessionFor(row)"\n [attr.column-index]="index"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef="columnIds.value"></tr>\n <tr mat-row *matRowDef="let row; columns: columnIds.value;"></tr>\n\n</table>\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]}),N("design:paramtypes",[])],e)}(q),Kt=function(){function t(t,e,n){this.templateRef=e,this.viewContainer=n}return t.ctorParameters=function(){return[{type:Wt},{type:n.TemplateRef},{type:n.ViewContainerRef}]},t=_([n.Directive({selector:"[aupColumnTemplate]"}),N("design:paramtypes",[Wt,n.TemplateRef,n.ViewContainerRef])],t)}(),Xt=function(){function t(){var t=this;this.defaultClassNames="aup-header-cell-renderer",this.editRowCommand=h.Command.create((function(){t.tableModel.startEditSession(t.row)}))}return t.prototype.initialiseRenderer=function(t){this.renderer!==t&&(this.renderer=t,this.column.updateCellRenderer(this.renderer,this.row,this.editRowCommand,this.editSession))},t.prototype.initialiseEditor=function(t){this.editor!==t&&(this.editor=t,this.column.initialiseEditor(this.editor,this.editSession))},t.prototype.ngOnChanges=function(t){this.renderer&&(this.column.updateCellRenderer(this.renderer,this.row,this.editRowCommand,this.editSession),this.renderer.editSession=this.editSession)},t.prototype.hasActiveEditor=function(){return this.editSession&&this.column.hasEditor()},_([n.Input(),N("design:type",Object)],t.prototype,"row",void 0),_([n.Input(),N("design:type",Vt)],t.prototype,"column",void 0),_([n.Input(),N("design:type",_t)],t.prototype,"editSession",void 0),_([n.Input(),N("design:type",zt)],t.prototype,"tableModel",void 0),_([n.HostBinding("class"),N("design:type",Object)],t.prototype,"defaultClassNames",void 0),t=_([n.Component({selector:"aup-table-cell-renderer",template:'<ng-container *ngIf="!hasActiveEditor()" [cdkPortalOutlet]="column.cellRendererPortal" (attached)="initialiseRenderer($event.instance)"></ng-container>\n<ng-container *ngIf="hasActiveEditor()" [cdkPortalOutlet]="column.cellEditorPortal" (attached)="initialiseEditor($event.instance)"></ng-container>\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch}"]}),N("design:paramtypes",[])],t)}(),Yt=function(){function t(){this.defaultClassNames="aup-header-cell-renderer"}return t.prototype.initialiseHeader=function(t){this.renderer!==t&&(this.renderer=t,this.column.initialiseHeader(this.renderer))},_([n.Input(),N("design:type",Vt)],t.prototype,"column",void 0),_([n.HostBinding("class"),N("design:type",Object)],t.prototype,"defaultClassNames",void 0),t=_([n.Component({selector:"aup-table-header-cell-renderer",template:'<ng-container [cdkPortalOutlet]="column.columnHeaderCellRendererPortal" (attached)="initialiseHeader($event.instance)"></ng-container>\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch}"]}),N("design:paramtypes",[])],t)}(),Zt=function(t){function e(e){var n=t.call(this,e)||this;return n.focusManager=e,n}return F(e,t),e.prototype.arrowLeft=function(t){this.leftArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.leftArrowCommand.execute())},e.prototype.arrowRight=function(t){this.rightArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.rightArrowCommand.execute())},e.prototype.arrowDown=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusNext()},e.prototype.arrowUp=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusPrevious()},e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:h.FocusManager,decorators:[{type:n.Self}]}]},_([n.Input("command.arrowRight"),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"rightArrowCommand",void 0),_([n.Input("command.arrowLeft"),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"leftArrowCommand",void 0),_([n.HostListener("keyup.arrowLeft",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowLeft",null),_([n.HostListener("keyup.arrowRight",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowRight",null),_([n.HostListener("keyup.arrowDown",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowDown",null),_([n.HostListener("keyup.arrowUp",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowUp",null),e=_([n.Component({selector:"aup-vertical-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:h.FocusManager}],styles:[":host{display:block}"]}),j(0,n.Self()),N("design:paramtypes",[h.FocusManager])],e)}(ft),$t=function(){function t(){}return t=_([n.NgModule({declarations:[bt,vt,It,Pt,Rt,St,xt,wt,Ct,Ot,Mt,Et,Dt,Tt,ft,Zt,ht,dt,Wt,jt,Kt,Ft,Xt,Nt,Ut,kt,Yt],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,K,d.MatIconModule,u.MatButtonModule,p.MatCheckboxModule,pt,f.MatTableModule,l.PortalModule],exports:[It,Pt,St,xt,Ct,wt,Ot,Mt,Et,Dt,Tt,ft,Zt,ht,dt,Wt,jt,Kt],providers:[z]})],t)}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=b.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 U(this,void 0,void 0,(function(){var i;return V(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 F(e,t),e.prototype.isEmptyValue=function(t){return T.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 F(e,t),e.prototype.isEmptyValue=function(t){return T.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 F(e,t),e.prototype.isEmptyValue=function(t){return T.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!T.isEqual(t,e)},e}(t);t.ArrayParameter=i}(t.ParameterDefinition||(t.ParameterDefinition={}));var Jt,Qt=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=b.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?T.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!T.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?(h.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(h.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&&T.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[Object]),N("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[Object]),N("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),te=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){var e=t.call(this)||this;return e.visitModel=new h.MutableValueModel,e._inVisitUpdate=new h.Guard,e}var i;return F(e,t),i=e,e.prototype.initialiseVisit=function(t,e){var n=this;h.assert.isNil(this.visitModel.value);var i=h.Dsl.disposeWith(this).when;this.visitModel.value=t,h.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;h.assert.isTruthy(this.isInitialised()),h.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];h.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName),this.registerDisposable(new h.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(){},_([S.Memoize(),N("design:type",Qt),N("design:paramtypes",[])],e.prototype,"placeDefinition",null),e=i=_([n.Directive(),N("design:paramtypes",[])],e)}(q),(Jt=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return h.lang.constructorChain(t).includes(Jt)},Jt.getRouteParameters=function(t){return b.Klass.get(t).getMetadataList(te)},Jt.getDefinition=function(t){return Reflect.getMetadata("PLACE_DEFINITION_OPTIONS",t)},Jt.injectDefinition=function(t,e){Reflect.defineMetadata("PLACE_DEFINITION_OPTIONS",e,t)};var ee,ne,ie=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 U(this,void 0,void 0,(function(){return V(this,(function(n){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t,e)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t,e){return U(this,void 0,void 0,(function(){var t,n;return V(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(),v.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}(),oe=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 F(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 h.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){h.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:"",h.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 U(this,void 0,void 0,(function(){var i,o;return V(this,(function(r){return(i=this.componentDeactivationHandlers.get(t))||(o=0===this.componentDeactivationHandlers.size,i=new ie(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){h.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachCanDeactivateInteractionContext();h.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}(h.GarbageCollector),re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e.prototype.handleCanDeactivateCancelledEventScenario=function(t){b.lang.illegalState("onCanDeactivateInteractionCancelled not supported for event clean up states")},e}(oe),ae=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 F(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 U(this,void 0,void 0,(function(){return V(this,(function(t){return[2,!1]}))}))},e}(re),se=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.isPopState=!0,i.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],i.finished=h.Deferred.defer(),i}return F(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){h.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}(oe),ce=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.wasTriggeredByPopState=i,o.isPopState=!1,o}return F(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(T.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)||b.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 se(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){b.lang.methodNotSupported()},e}(oe),le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e}return F(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 ce(this.context,this.startingUrl,!1)):this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new ae(this.context,this.startingUrl,t))},e}(oe),ue=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 F(e,t),e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(){t.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation.call(this,this.poppedHistoryUrl,this.startingUrl)},e}(oe),pe=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return F(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.transitionTo(new ce(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}(ue),de=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 F(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 U(this,void 0,void 0,(function(){return V(this,(function(t){return[2,!1]}))}))},e}(re),fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl","urlAfterRedirects"],e}return F(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 de(this.context,this.startingUrl,t))},e}(oe);ee=t.NavigationContext||(t.NavigationContext={}),ne=function(t,e,n,i,o){this.urlService=t,this.routerInteractionAdapter=e,this.navigateByUrl=n,this.transitionTo=i,this.finishRoutingSession=o},ee.Impl=ne;var he,me,ge,ye=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 F(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 U(this,void 0,void 0,(function(){return V(this,(function(t){return[2,!1]}))}))},e}(re),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(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 ye(this.context,this.startingUrl,t,this.poppedHistoryUrl))},e}(ue);t.ɵcm=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){h.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 T.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=T.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=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[])],t)}(),he=t.ɵcm||(t.ɵcm={}),me=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}(),he.VisitRecord=me,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=B(this.getPrimarySegments(n)),o=this.getSegmentsFor(e),r=i.findIndex((function(t){return t.path===o[0].path}));return i.splice.apply(i,B([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 y.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new y.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new y.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 T.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}(),(ge=t.UrlSnapshot||(t.UrlSnapshot={})).INTERACTION_QUERY_PARAM="aup-interactions",ge.INTERACTION_ID_SEPARATOR="--",ge.parseInteractionIds=function(t){return t.split(ge.INTERACTION_ID_SEPARATOR)},ge.createPathIdFor=function(t){return t.join(ge.INTERACTION_ID_SEPARATOR)};var be=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:y.Router},{type:e.Location},{type:y.UrlSerializer}]},i.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(y.Router),n.ɵɵinject(e.Location),n.ɵɵinject(y.UrlSerializer))},token:i,providedIn:"root"}),i=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[y.Router,e.Location,y.UrlSerializer])],i)}(),Ce=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!v.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,k(k({},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=v.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!v.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}(),Ie=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 h.MutableValueModel,s._activeVisits=new h.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=h.Dsl.disposeWith(s),l=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;s.navigationInProgress=l(s.navigationSessionModel).isNotNil();var u=l(s.interactionService.active).map((function(t){return t?"IdleDuringInteraction":"Idle"}));return s.navigationSessionName=l(s.navigationSessionModel).pluck("name").otherwise(u),h.DebugContext.tag(s._activeVisits,"PlaceRouter.activeVisits"),s.activeVisitsByPlaceDefinition=l(s._activeVisits).indexBy("placeDefinition"),e.events.subscribe((function(t){t instanceof y.NavigationStart&&("popstate"===t.navigationTrigger?s.onPopState(t):s.onRouterStarted(t)),t instanceof y.NavigationEnd&&s.onRouterEnd(t),t instanceof y.NavigationError&&s.onRouterError(t),t instanceof y.NavigationCancel&&s.onRouterCancelled(t)})),n.onUrlChange((function(t){return s.onUrlChanged(t)})),s}return F(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(h.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 pe(this.navigationContext,n,e):new ve(this.navigationContext,n,e);this.transitionTo(i)}},o.prototype.onRouterStarted=function(t){h.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 U(n,void 0,void 0,(function(){var n;return V(this,(function(i){switch(i.label){case 0:return n=B([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 U(this,void 0,void 0,(function(){var n;return V(this,(function(i){switch(i.label){case 0:this.navigationInProgress.value&&h.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 y.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 U(this,void 0,void 0,(function(){var n=this;return V(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 le(this.navigationContext,t):new fe(this.navigationContext,t)},o.prototype.transitionTo=function(t){var e=this.navigationSessionModel.value;e||this.placeHistory.notifyNavigationStarted(),h.assert.isTruthy(t!==e),h.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&&(h.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){h.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 ce(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(n)}))}))}return new Promise((function(e,n){t.runAfterRoutingSessionFinishes(e);var i=new ce(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:y.Router},{type:e.Location},{type:t.ɵbw},{type:be},{type:t.ɵcm}]},o.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(y.Router),n.ɵɵinject(e.Location),n.ɵɵinject(t.ɵbw),n.ɵɵinject(be),n.ɵɵinject(t.ɵcm))},token:o,providedIn:"root"}),_([h.Trace(),N("design:type",Function),N("design:paramtypes",[Ce,Ce]),N("design:returntype",Promise)],o.prototype,"pushVisitChangesToRoute",null),o=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[y.Router,e.Location,t.ɵbw,be,t.ɵcm])],o)}(h.GarbageCollector),xe=new n.InjectionToken("AUP_PLACE_CONFIG"),we=O.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),Re=[O.query(":enter, :leave",we,{optional:!0}),O.group([O.query(":enter",[O.style({transform:"translateX(-100%)"}),O.animate("{{duration}} ease-out",O.style({transform:"translateX(0%)"}))],{optional:!0}),O.query(":leave",[O.style({transform:"translateX(0%)"}),O.animate("{{duration}} ease-out",O.style({transform:"translateX(100%)"}))],{optional:!0})])],Pe=[O.query(":enter, :leave",we,{optional:!0}),O.group([O.query(":enter",[O.style({transform:"translateX(100%)",minHeight:"1px"}),O.animate("{{duration}} ease-out",O.style({transform:"translateX(0%)"}))],{optional:!0}),O.query(":leave",[O.style({transform:"translateX(0%)"}),O.animate("{{duration}} ease-out",O.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function Se(t){return O.trigger("routeAnimations",[O.transition(":increment",Pe,{params:{duration:t}}),O.transition(":decrement",Re,{params:{duration:t}})])}var Me,Oe=Se("0.3s"),Ae=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 h.MutableValueModel(!1),a._activatedRouteModel=new h.MutableValueModel,a._activePlaceModel=new h.MutableValueModel,a.initialPlaceIndex=null,a._isPushingVisitToRoute=new h.MutableValueModel(!1);var s=h.Dsl.disposeWith(a),c=s.chain,l=(s.valueOf,s.before,s.when);s.after,s.observe,s.switchOn;a.parentOutletModel=new h.MutableValueModel(r);var u=c(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),p=c(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=c(a.customPlaceAnimationOrderModel).otherwise(u).reduce((function(t){var e=0;return p.value&&(e=t.indexOf(p.value),v.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),v.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:p}),a._activePlaceDefinition=c(a._activePlaceModel).pluck("placeDefinition"),a.routerVisitModel=a._activePlaceDefinition.findIn(c(i.activeVisitsByPlaceDefinition)),a.navigationInProgress=c(a.placeRouter.navigationInProgress),l.valueOf(a.navigationInProgress).becomesFalsey((function(){a.checkStateAndInitialise()})),l.valueOf(a.outletActivated).becomesTruthy((function(){a.checkStateAndInitialise()})),c(a._activePlaceModel).postponeWhile(a.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),a}return F(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&&h.lang.illegalState("wrong visit!!!"),this.initialisePlace(t,e))},e.prototype.initialisePlace=function(t,e){var n=this,i=new h.MutableValueModel(t);h.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=h.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:y.Router},{type:Ie},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[xe]}]},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},_([n.Input(),h.StoreInValueModel("animateModel"),N("design:type",Boolean)],e.prototype,"animate",void 0),_([n.Input(),h.TrackExternal({defaultValue:!0}),N("design:type",h.ValueModel)],e.prototype,"animateModel",void 0),_([n.Input("placeAnimationOrderModel"),h.TrackExternal(),N("design:type",h.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),_([n.Input("placeAnimationOrder"),h.StoreInListModel("customPlaceAnimationOrderModel"),N("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"placeChanged",void 0),_([n.ViewChild("routeOutlet",{static:!0}),N("design:type",y.RouterOutlet)],e.prototype,"routerOut",void 0),e=_([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:[Oe],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}"]}),j(2,n.Optional()),j(2,n.Inject(xe)),j(3,n.SkipSelf()),j(3,n.Optional()),N("design:paramtypes",[y.Router,Ie,Object,e])],e)}(q),De=function(e){function i(n){var i=e.call(this)||this;i._activePlaceComponent=new h.DelegatingValueModel;var o=h.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=h.Command.createFactory((function(t){i.placeOutlet.navigate(new Ce(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 F(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:Ie}]},_([n.Input(),h.StoreInListModel("placesModel"),N("design:type",Array)],i.prototype,"places",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ListModel)],i.prototype,"placesModel",void 0),_([n.Input(),h.StoreInValueModel("placeOutletModel"),N("design:type",Ae)],i.prototype,"placeOutlet",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ValueModel)],i.prototype,"placeOutletModel",void 0),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[Qt]),N("design:returntype",Object)],i.prototype,"getNav",null),i=_([n.Component({template:""}),N("design:paramtypes",[Ie])],i)}(q),Te=function(){function t(){}return t.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal(),N("design:type",h.ValueModel)],t.prototype,"busyModel",void 0),_([n.Input(),h.StoreInValueModel("busyModel"),N("design:type",Boolean)],t.prototype,"busy",void 0),t=_([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}"]}),N("design:paramtypes",[])],t)}(),Ee=function(){function t(){}return t.prototype.ngOnInit=function(){},t=_([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}"]}),N("design:paramtypes",[])],t)}(),Fe=function(t){function e(e){return t.call(this,e)||this}return F(e,t),e.ctorParameters=function(){return[{type:Ie}]},e=_([n.Component({selector:"aup-list-place-nav",template:'<mat-nav-list fxFlex>\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>{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--selected-border-color:#838383;--selected-color:inherit;--selected-background:#f1f1f1}mat-nav-list{padding-top:0}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}"]}),N("design:paramtypes",[Ie])],e)}(De),ke=function(t){function e(e){return t.call(this,e)||this}return F(e,t),e.ctorParameters=function(){return[{type:Ie}]},e=_([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:[""]}),N("design:paramtypes",[Ie])],e)}(De),_e=function(t){function e(e,n){var i=t.call(this,n)||this;return i.router=e,i.expanded=!1,i}return F(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:y.Router},{type:Ie}]},_([n.HostBinding("class.expanded"),N("design:type",Object)],e.prototype,"expanded",void 0),_([n.ContentChild("navEndTemplate"),N("design:type",n.TemplateRef)],e.prototype,"navEndTemplate",void 0),e=_([n.Component({selector:"aup-side-place-navigation",template:'<mat-nav-list>\n <a mat-list-item (click)="toggleMenu()" class="home">\n <mat-icon class="collapsed-only">menu</mat-icon>\n <mat-icon class="expanded-only">arrow_back</mat-icon>\n <span class="expanded-only">Menu</span>\n </a>\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\n class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n <span [style.flex]="1"></span>\n <ng-container *ngIf="navEndTemplate" [ngTemplateOutlet]="navEndTemplate"></ng-container>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width, 56px);--resolved-nav-item-height:var(--nav-item-height, var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width, 235px);--resolved-color:var(--nav-color, rgba(255, 255, 255, 0.9));--resolved-background-color:var(--nav-background-color, #555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]}),N("design:paramtypes",[y.Router,Ie])],e)}(De),je=function(){function t(){}return t=_([n.NgModule({imports:[e.CommonModule,c.BrowserAnimationsModule,w.MatProgressSpinnerModule,y.RouterModule,s.MatTabsModule,R.MatListModule,P.MatTooltipModule,d.MatIconModule,K,m.FlexModule],declarations:[Ee,Te,Ae,ke,Fe,_e,De],entryComponents:[Te],exports:[Te,Ae,Ee,ke,Fe,_e,De],providers:[]})],t)}(),Ne=function(){function t(){}return t=_([n.NgModule({declarations:[],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,K,$t,je,pt],exports:[pt,je,K,$t,Mt]})],t)}(),Ue=O.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),Ve=O.trigger("slideDownOnEnter",[O.transition(":enter",[Ue,O.animate("{{duration}}")],{params:{duration:"100ms"}}),O.transition(":leave",[O.animate("{{duration}}",Ue)],{params:{duration:"100ms"}})]),Le=O.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),Be=O.trigger("slideRightOnEnter",[O.transition(":enter",[Le,O.animate("{{duration}}")],{params:{duration:"100ms"}}),O.transition(":leave",[O.animate("{{duration}}",Le)],{params:{duration:"100ms"}})]),He=function(t,e){this.width=t,this.height=e},qe=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 F(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new qe(t.clientX-this.left,t.clientY-this.top):new qe(t.x-this.left,t.y-this.top)},e}(He),(Me=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Me(e.top,e.left,e.width,e.height)};var Ge=function(e){function i(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new h.MutableValueModel(new t.Bounds(0,0,0,0)),o}return F(i,e),i.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new A((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=_([n.Directive(),N("design:paramtypes",[n.ElementRef,n.NgZone])],i)}(q);var ze,We,Ke,Xe,Ye=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new Ze(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}),_([I.Memoize(),N("design:type",Array),N("design:paramtypes",[])],t.prototype,"keys",null),t}(),Ze=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}(),$e=function(){function t(){}return t.prototype.canActivate=function(t,e){return U(this,void 0,void 0,(function(){return V(this,(function(t){return[2,!0]}))}))},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[])],t)}(),Je=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 U(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,l;return V(this,(function(u){switch(u.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(l=u.sent(),console.log({routeId:i,sanitisedValue:l}),n.hasChanged(i,l))return[2,t.replace(n,l)];u.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,u.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:l=u.sent(),s.hasChanged(c,l)&&(r=r.replace(s,l)),u.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}(),Qe=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 U(this,void 0,void 0,(function(){var n=this;return V(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return U(n,void 0,void 0,(function(){var n,o=this;return V(this,(function(r){switch(r.label){case 0:return[4,this.cleanInteractionState(t,e,(function(){return U(o,void 0,void 0,(function(){var n,o,r,a,s;return V(this,(function(c){switch(c.label){case 0:return n=new Ye(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationSession,a=r.getVisitFor(i)||new Ce(i,o),[4,new Je(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 U(this,void 0,void 0,(function(){var e,o,r;return V(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 U(this,void 0,void 0,(function(){var o,r,a;return V(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,h.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return U(this,void 0,void 0,(function(){var n;return V(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof D.Observable?n.toPromise():n]}))}))},e.prototype.cleanInteractionState=function(t,e,n){return U(this,void 0,void 0,(function(){var t;return V(this,(function(i){return t=this.urlService.parseUrl(e.url),!this.interactionService.isActive()&&t.hasInteractions()?[2,t.removeInteractionIds()]:[2,n()]}))}))},e}();function tn(t,e,n,i,o){var r={backingModel:n,binding:null},a=i+"("+t.constructor.name+"."+e.toString()+")";h.DebugContext.get(r.backingModel).tag(a),h.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 h.Binding(r.backingModel,t,{toLeft:h.Functions.identity,toRight:h.Functions.identity}),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()))}})}ze=t.Formatter||(t.Formatter={}),We=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Ke=function(){function t(){}return t.prototype.format=function(t){return T.isNumber(t)&&!T.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return T.isNaN(e)?null:e},t}(),Xe=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),ze.STRING=new We,ze.NUMBER=new Ke,ze.BOOLEAN=new Xe,t.ACTIVITY_DATA=Y,t.AUP_PLACE_CONFIG=xe,t.AbstractInputActivity=vt,t.AbstractInputComponent=bt,t.AbstractInteractionContext=tt,t.AbstractPlaceNavigationComponent=De,t.AbstractPopStateNavigation=ue,t.Activity=Z,t.ActivityActionsComponent=X,t.ActivityContainerComponent=it,t.ActivityOutletComponent=nt,t.ActivityRef=et,t.AddItemInteractionContextComponent=ct,t.AlertDialogComponent=$,t.AngularUiPowerupsModule=Ne,t.BusyOverlayComponent=Te,t.CardContainerComponent=dt,t.CheckboxInputComponent=Ct,t.ColumnModel=Vt,t.ColumnTemplateDirective=Kt,t.CommandDirective=H,t.ComponentsModule=$t,t.ConfirmThenDialogComponent=J,t.ConfirmationDialogComponent=Q,t.ConsolidatedParameterMap=Ye,t.CustomTemplateColumnModel=qt,t.CustomValueColumnModel=Bt,t.DEFINITION_META_DATA_KEY="PLACE_DEFINITION_OPTIONS",t.DIALOG_INTERACTION_SERVICE_DEFAULTS=gt,t.DefaultCellRendererComponent=Ft,t.DefaultHeaderCellRendererComponent=kt,t.DialogInteractionContext=mt,t.DialogInteractionContextFactory=yt,t.Dimension=He,t.DirectivesModule=K,t.DisposableComponent=q,t.EditRowControls=jt,t.EditSession=_t,t.EditorControlColumnModel=Ht,t.EmptyStateComponent=Ee,t.EventCleanUpSession=re,t.FocusBinding=G,t.FocusBindingDirective=W,t.FocusBindingFactory=z,t.FocusContainerComponent=ft,t.FocusableComponent=ht,t.InPlaceInteractionContextComponent=st,t.InteractionContextTriggerFor=ut,t.InteractionModule=pt,t.InteractionService=t.ɵbw,t.InteractionServiceRoutingAdapter=ot,t.LEFT_RIGHT_PLACE_ANIMATION=Oe,t.ListPlaceNavComponent=Fe,t.ModalInteractionContextFactory=rt,t.Navigating=fe,t.NavigatingDuringInteraction=le,t.NavigationSession=oe,t.NoopAuthGuard=$e,t.NoopComponent=Mt,t.NumberInputComponent=It,t.PasswordInputComponent=xt,t.Place=function(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new Qt(n,e.path,!!v.isNil(e.authenticate)||e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):h.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}},t.PlaceComponentDeactivationHandler=ie,t.PlaceDefinition=Qt,t.PlaceGuard=Qe,t.PlaceHistory=t.ɵcm,t.PlaceModule=je,t.PlaceOutletComponent=Ae,t.PlaceRouter=Ie,t.Point=qe,t.PopStateDuringInteractionNavigation=pe,t.PopStateNavigation=ve,t.PopupInteractionContextComponent=lt,t.PropertyColumnModel=Lt,t.ROUTE_PARAMETER_LIST_KEY=te,t.RemoveLastInteractionFromUrlNavigationSession=se,t.ResizeAwareComponent=Ge,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);b.Klass.get(i).addToOwnMetadataList(te,r),tn(i,o,new h.MutableValueModel,"@RouteId",(function(t){return t.query().isNil()}))}},t.ScrollContainerComponent=Ot,t.SelectCellRendererComponent=Nt,t.SelectHeaderCellRendererComponent=Ut,t.SelectInputComponent=wt,t.SelectionColumnModel=Gt,t.SidePlaceNavigationComponent=_e,t.StringInputActivity=Rt,t.StringInputComponent=Pt,t.SwitchCaseComponent=Et,t.SwitchCaseDefaultDirective=Tt,t.SwitchCaseOption=At,t.SwitchCaseWhenDirective=Dt,t.SynchroniseInteractionContextIdsWithRoute=ce,t.TabbedPlaceNavigationComponent=ke,t.TableCellRendererComponent=Xt,t.TableComponent=Wt,t.TableHeaderCellRendererComponent=Yt,t.TableModel=zt,t.TextInputComponent=St,t.UrlService=be,t.VerticalFocusContainerComponent=Zt,t.Visit=Ce,t.VisitParameter=function(e){var n=b.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));b.Klass.get(i).addToOwnMetadataList(te,r),tn(i,o,new h.MutableValueModel,"@VisitParameter",(function(t){return t.query().isNil()}))}},t.VisitParameterList=function(e){var n=b.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));b.Klass.get(i).addToOwnMetadataList(te,r),tn(i,o,new h.MutableListModel,"@VisitParameterList",(function(t){return t.query().isEmpty()}))}},t.VisitSanitiser=Je,t.WaitUntilLeavingInteractionTransitionCancelled=ae,t.WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish=de,t.WaitUntilPopStateDuringCanDeactivateInteractionFinishes=ye,t.leftRightPlaceAnimation=Se,t.slideDownOnEnterAnimation=Ve,t.slideRightOnEnterAnimation=Be,t.ɵa=K,t.ɵb=H,t.ɵba=dt,t.ɵbb=Wt,t.ɵbc=jt,t.ɵbd=Kt,t.ɵbe=Ft,t.ɵbf=Xt,t.ɵbg=Nt,t.ɵbh=Ut,t.ɵbi=kt,t.ɵbj=Yt,t.ɵbk=pt,t.ɵbl=it,t.ɵbm=tt,t.ɵbn=nt,t.ɵbo=Q,t.ɵbp=Y,t.ɵbq=Z,t.ɵbs=J,t.ɵbt=$,t.ɵbv=st,t.ɵbx=rt,t.ɵby=ct,t.ɵbz=X,t.ɵc=W,t.ɵca=lt,t.ɵcb=ut,t.ɵcc=je,t.ɵcd=Ee,t.ɵce=Te,t.ɵcf=Ae,t.ɵcg=Se,t.ɵch=Oe,t.ɵci=xe,t.ɵck=Ie,t.ɵcl=be,t.ɵcn=ke,t.ɵco=De,t.ɵcp=Fe,t.ɵcq=_e,t.ɵd=q,t.ɵe=z,t.ɵf=$t,t.ɵg=bt,t.ɵh=vt,t.ɵi=Z,t.ɵj=Y,t.ɵk=It,t.ɵl=Pt,t.ɵm=Rt,t.ɵn=St,t.ɵo=xt,t.ɵp=wt,t.ɵq=Ct,t.ɵr=Ot,t.ɵs=Mt,t.ɵt=At,t.ɵu=Dt,t.ɵv=Tt,t.ɵw=Et,t.ɵx=ft,t.ɵy=Zt,t.ɵz=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
16
+ var E=function(t,e){return(E=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 F(t,e){function n(){this.constructor=t}E(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var k=function(){return(k=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 _(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 j(t,e){return function(n,i){e(n,i,t)}}function N(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function L(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 V(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 B(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(V(arguments[e]));return t}var H=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new h.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return F(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(){h.assert.notNil(this.pectinCommand),this.pectinCommand instanceof h.UnaryCommand?this._commandParameterProvided||h.lang.illegalState("UnaryCommands require the command parameter to be specified."):this._commandParameterProvided&&h.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;h.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 h.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]}]}]},_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],e.prototype,"pectinCommand",null),_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],e.prototype,"commandParameter",null),_([n.HostListener("click",["$event"]),N("design:type",Function),N("design:paramtypes",[Event]),N("design:returntype",void 0)],e.prototype,"notifyClick",null),e=_([n.Directive({selector:"[pectinCommand]"}),j(0,n.Inject(n.ElementRef)),N("design:paramtypes",[n.ElementRef])],e)}(h.GarbageCollector),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e=_([n.Directive()],e)}(h.GarbageCollector),z=function(t){function i(e,n,i,o){var r=t.call(this)||this;return r.focusTargetElement=e,r.ngZone=n,r.focusContext=o,r.document=i,h.Dsl.disposeWith(r).when.valueOf(r.focusContext.focused).changes((function(t){t&&!r.alreadyHasFocus()&&r.tryAndFocus()}),{initialValue:"triggerChangeUnlessNil"}),r}return F(i,t),i.prototype.onFocusIn=function(){this.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.focusContext.notifyFocusOut()},i.prototype.alreadyHasFocus=function(){return this.isElementFocused(this.focusTarget)},i.prototype.isElementFocused=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()||(h.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):h.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.focusTargetElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i=_([j(1,n.Inject(n.NgZone)),j(2,n.Inject(e.DOCUMENT)),N("design:paramtypes",[HTMLElement,n.NgZone,Object,Object])],i)}(h.GarbageCollector),G=function(){function t(t,e){this.ngZone=t,this.document=e}return t.prototype.createBinding=function(t,e){return new z(t,this.ngZone,this.document,e)},t.ctorParameters=function(){return[{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(n.NgZone),n.ɵɵinject(e.DOCUMENT))},token:t,providedIn:"root"}),t=_([n.Injectable({providedIn:"root"}),j(0,n.Inject(n.NgZone)),j(1,n.Inject(e.DOCUMENT)),N("design:paramtypes",[n.NgZone,Object])],t)}(),K=function(t){function e(e,n){var i=t.call(this)||this;return i.el=e,i.focusBindingFactory=n,i}return F(e,t),e.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusIn()},e.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.notifyFocusOut()},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.hasBinding()?this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget,this.pectinFocusBinding)):h.Logger.get(this).warn("pectinFocusBinding was nil")},e.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding},Object.defineProperty(e.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:G}]},_([n.Input(),N("design:type",Object)],e.prototype,"pectinFocusBinding",void 0),_([n.Input(),N("design:type",HTMLElement)],e.prototype,"focusBindingTarget",void 0),_([n.HostListener("focusin"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onFocusIn",null),_([n.HostListener("focusout"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onFocusOut",null),e=_([n.Directive({selector:"[pectinFocusBinding]"}),j(0,n.Inject(n.ElementRef)),N("design:paramtypes",[n.ElementRef,G])],e)}(q),W=function(){function t(){}return t=_([n.NgModule({declarations:[H,K],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule],exports:[H,K]})],t)}(),X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.align="start",e}return F(e,t),Object.defineProperty(e.prototype,"alignEnd",{get:function(){return"end"===this.align},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.hasConfirmText=function(){return!D.isEmpty(this.confirmText)},_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"confirmCommand",void 0),_([n.Input(),N("design:type",String)],e.prototype,"confirmText",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"cancelCommand",void 0),_([n.Input(),N("design:type",String)],e.prototype,"align",void 0),_([n.HostBinding("class.align-end"),N("design:type",Boolean),N("design:paramtypes",[])],e.prototype,"alignEnd",null),e=_([n.Component({selector:"aup-activity-actions",template:'<button class="cancel" mat-icon-button [pectinCommand]="cancelCommand">\n <mat-icon>clear</mat-icon>\n</button>\n<button class="confirm" *ngIf="!hasConfirmText()" mat-icon-button [pectinCommand]="confirmCommand">\n <mat-icon>done</mat-icon>\n</button>\n<button class="confirm" *ngIf="hasConfirmText()" mat-button [pectinCommand]="confirmCommand">{{confirmText}}</button>\n<div class="content">\n <ng-content></ng-content>\n</div>\n',styles:[':host{display:-ms-grid;display:grid;grid-template-areas:"cancel confirm content";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:"content cancel confirm";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}']})],e)}(q),Y=new n.InjectionToken("InteractionActivityData"),Z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new h.DelegatingValueModel).withDefault(!1),e.class="aup-activity",e}return F(e,t),e.prototype.initialise=function(t,e){b.assert.isNil(this._activityContext),this._activityContext=e,this._interactionContext=t},Object.defineProperty(e.prototype,"interactionContext",{get:function(){return b.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},_([n.HostBinding("class"),N("design:type",Object)],e.prototype,"class",void 0),e}(q),$=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return F(e,t),e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Y]}]}]},e=_([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}"]}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),J=function(t){function e(e){var n=t.call(this)||this;return n.config=e,h.assert.notNil(e),n}return F(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:[Y]}]}]},e=_([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}"]}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),Q=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,h.assert.notNil(e),n}return F(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:[Y]}]}]},e=_([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}"]}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),tt=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($,t,!1)},t.prototype.confirmOrReject=function(t){return this.createAndLaunchActivity(Q,t,!0)},t.prototype.confirmThen=function(t,e,n){return this.createAndLaunchActivity(J,{confirm:t,activityType:e,data:n},!0)},t}(),et=function(){function t(t,e,n){this.activityClass=t,this.activityData=e,this.onComplete=n,this._complete=!1,this.deferredResult=h.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 h.assert.isTruthy(this.isActivityRealised()),this._activity},enumerable:!0,configurable:!0}),t.prototype.notifyActivityCreated=function(t,e){h.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){h.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}(),nt=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()&&b.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:Y,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}]},_([n.Input(),N("design:type",Object)],t.prototype,"nestedInteractionContext",void 0),_([n.Input(),N("design:type",et),N("design:paramtypes",[et])],t.prototype,"activityRef",null),t=_([n.Component({selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}),N("design:paramtypes",[n.ComponentFactoryResolver,n.ViewContainerRef,n.Injector])],t)}(),it=function(t){function e(){var e=t.call(this)||this;return e.dynamicHeight=!1,e.activityTabs=[],e.garbage=new h.GarbageCollector,e}return F(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=h.Dsl.disposeWith(this);e.chain;e.observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},e.prototype.initialise=function(t,e){h.assert.isFalsey(this.isInitialised()),h.assert.notNil(t),h.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(){h.assert.isFalsey(this.isActive()),this.garbage.dispose()},e.prototype.getActiveActivityRef=function(){return this.isActive()||b.lang.illegalState("no activity in progress"),D.findLast(this.activityTabs,(function(t){return!t.isComplete()}))},e.prototype.cancelActiveActivity=function(){return L(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;h.assert.isTruthy(this.isInitialised());var o=new et(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 L(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){this.activityTabs=[];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.synchroniseSelectedTabIndex()},e.prototype.activityIndex=function(t,e){return t},e.prototype.onAnimationFinished=function(){this.onAnimationFinishedJob&&(this.onAnimationFinishedJob(),this.onAnimationFinishedJob=void 0)},e.prototype.synchroniseSelectedTabIndex=function(){var t=this,e=this.tabs.selectedIndex,n=this.getActiveActivityCount()-1;e!==n&&(this.tabs.selectedIndex=n,this.onAnimationFinishedJob=function(){t.getSelectedOutlet().component.onActivityReady(),t.activityTabs=t.activityTabs.filter((function(t){return!t.isComplete()}))})},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)},_([n.Input(),N("design:type",Object)],e.prototype,"dynamicHeight",void 0),_([n.ViewChild("tabs",{static:!0}),N("design:type",s.MatTabGroup)],e.prototype,"tabs",void 0),_([n.ViewChildren(nt),N("design:type",n.QueryList)],e.prototype,"activityOutlets",void 0),_([h.Trace(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"dispose",null),e=_([n.Component({selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header\n [dynamicHeight]="dynamicHeight"\n [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}"]}),N("design:paramtypes",[])],e)}(tt),ot=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}(),rt=function(){},at=0;t.ɵbz=function(){function t(t){this.modelInteractionContextFactory=t,this.garbage=new h.GarbageCollector,this._navigationInProgress=(new h.DelegatingValueModel).withDefault(!1);var n=h.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"+ ++at,new e.ApiAdapter(this.placeRouter,this.inPlaceInteractionRegistry))},t.prototype.registerPlaceRouter=function(t){var n=this;b.assert.isFalsey(this.placeRouter),this.placeRouter=t,this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);var i=this;return new ot(this.activeInteractionContextIds,this.activeModalContext,(function(){return i.modelInteractionContextFactory.createInteractionContext("exclusive",new e.ApiAdapter(n.placeRouter,n.exclusiveInteractionRegistry))}))},t.ctorParameters=function(){return[{type:rt}]},t.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(rt))},token:t,providedIn:"root"}),t=e=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[rt])],t)}(),function(t){var e=function(t){function e(){var e=t.call(this)||this;e._interactions=new h.MutableListModel,e._disabledDelegate=(new h.DelegatingValueModel).withDefault(!1);var n=h.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 F(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}(h.GarbageCollector);t.ContextRegistry=e;var n=function(){function t(t,e){this.placeRouter=t,this.contextRegistry=e}return t.prototype.notifyActive=function(t){return b.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.ɵbz||(t.ɵbz={}));var st=function(e){function i(t,n){var i=e.call(this)||this;return i.interactionService=t,i.tabConfig=n,i.animateFirstActivity=!0,i}return F(i,e),Object.defineProperty(i.prototype,"animationDuration",{get:function(){var t;return this.animateFirstActivity?(null===(t=this.tabConfig)||void 0===t?void 0:t.animationDuration)||"500ms":"0ms"},enumerable:!0,configurable:!0}),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.ɵbz},{type:void 0,decorators:[{type:n.Inject,args:[s.MAT_TABS_CONFIG]},{type:n.Optional}]}]},_([n.ViewChild("activityContainer",{static:!0}),N("design:type",it)],i.prototype,"activityContainerComponent",void 0),_([n.Input(),N("design:type",Object)],i.prototype,"animateFirstActivity",void 0),i=_([n.Component({selector:"aup-in-place-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false" [animationDuration]="animationDuration">\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}"]}),j(1,n.Inject(s.MAT_TABS_CONFIG)),j(1,n.Optional()),N("design:paramtypes",[t.ɵbz,Object])],i)}(q),ct=function(t){function e(){var e=t.call(this)||this;return e.tabindex=0,e.clickCommand=h.Command.create((function(t){e.activityClass?e.startActivity(e.activityClass,e.activityData).catch((function(t){})):e.addCommand.withContext(t).execute()})),e}return F(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return!!this.interactionContext&&this.interactionContext.isActive()},enumerable:!0,configurable:!0}),e.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},e.prototype.ngOnInit=function(){},_([n.Input(),N("design:type",String)],e.prototype,"label",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityClass",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityData",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"addCommand",void 0),_([n.ViewChild(st),N("design:type",st)],e.prototype,"interactionContext",void 0),_([n.HostBinding("class.interaction-active"),N("design:type",Boolean),N("design:paramtypes",[])],e.prototype,"active",null),_([n.HostBinding("tabindex"),N("design:type",Object)],e.prototype,"tabindex",void 0),e=_([n.Component({selector:"aup-add-item-interaction-context",template:'<aup-in-place-interaction-context #interactionContext [animateFirstActivity]="false">\n <a part="link" class="link" [pectinCommand]="clickCommand"><mat-icon>add</mat-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n',styles:[":host{--def-link-color:var(--link-color, currentColor);--def-link-backgound:var(--link-background, rgba(0, 0, 0, 0.05));--def-link-border-radius:var(--link-border-radius, 4px);--def-link-padding:var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:0}:host:hover{--link-background:rgba(0,0,0,0.1)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-backgound);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]}),N("design:paramtypes",[])],e)}(q),lt=function(t){function e(e,n){var i=t.call(this)||this;return i._element=e,i._overlay=n,i.outputPortal=new l.ComponentPortal(st),i.anchorX="start",i.anchorY="bottom",i}return F(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this.isActive()},enumerable:!0,configurable:!0}),e.prototype.startActivity=function(t,e){var n=this,i=this._overlay.create({hasBackdrop:!1,panelClass:"aup-popup-interaction-panel",positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withPositions(this.computePositions()).withGrowAfterOpen(!0)}),o=i.attach(this.outputPortal);return this.interactionContext=o.instance,new Promise((function(o,r){setTimeout((function(){n.interactionContext.startActivity(t,e).then(o).catch(r).finally((function(){return i.dispose()}))}))}))},e.prototype.computePositions=function(){var t="start"===this.anchorX?"start":"end",e="top"===this.anchorY?"bottom":"top";return[{originX:this.anchorX,originY:this.anchorY,overlayX:t,overlayY:e}]},e.prototype.cancelActiveActivity=function(){return this.interactionContext.cancelActiveActivity()},e.prototype.isActive=function(){return this.interactionContext&&this.interactionContext.isActive()},e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:n.ElementRef},{type:C.Overlay}]},_([n.HostBinding("class.interaction-active"),N("design:type",Boolean),N("design:paramtypes",[])],e.prototype,"active",null),_([n.Input(),N("design:type",String)],e.prototype,"anchorX",void 0),_([n.Input(),N("design:type",String)],e.prototype,"anchorY",void 0),e=_([n.Component({selector:"aup-popup-interaction-context",template:"<ng-content></ng-content>\n",styles:[":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]}),N("design:paramtypes",[n.ElementRef,C.Overlay])],e)}(q),ut=function(t){function e(){var e=t.call(this)||this;return e.activityDone=new n.EventEmitter,e.activityCancelled=new n.EventEmitter,e}return F(e,t),e.prototype.onEnter=function(t){this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.onClick=function(t){this.aupInteractionContextTriggerFor.isActive()?this.aupInteractionContextTriggerFor.cancelActiveActivity():this.startActivity()},e.prototype.startActivity=function(){var t=this;h.assert.isTruthy(this.aupInteractionContextTriggerFor),h.assert.isFalsey(this.aupInteractionContextTriggerFor.isActive()),h.assert.isTruthy(this.activityClass),this.aupInteractionContextTriggerFor.startActivity(this.activityClass,this.activityData).then((function(e){t.activityDone.emit(e)})).catch((function(e){t.activityCancelled.emit(e)}))},e.prototype.prepareActivityData=function(){return D.isFunction(this.activityDataFactory())?this.activityDataFactory():this.activityData},_([n.Input(),N("design:type",Object)],e.prototype,"aupInteractionContextTriggerFor",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityClass",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"activityData",void 0),_([n.Input(),N("design:type",Function)],e.prototype,"activityDataFactory",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"activityDone",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"activityCancelled",void 0),_([n.HostListener("keyup.enter"),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"onEnter",null),_([n.HostListener("click"),N("design:type",Function),N("design:paramtypes",[MouseEvent]),N("design:returntype",void 0)],e.prototype,"onClick",null),e=_([n.Directive({selector:"[aupInteractionContextTriggerFor]"}),N("design:paramtypes",[])],e)}(h.GarbageCollector),pt=function(){function i(){}return i=_([n.NgModule({imports:[e.CommonModule,u.MatButtonModule,g.MatDialogModule,s.MatTabsModule,l.PortalModule,y.RouterModule,d.MatIconModule,W,m.FlexModule,m.GridModule],declarations:[it,Q,J,$,nt,st,ct,X,lt,ut],exports:[it,nt,st,ct,X,lt,ut],entryComponents:[it,Q,J,$],providers:[t.ɵbz]})],i)}(),dt=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"addCardCommand",void 0),_([n.ContentChild("addCardTemplate"),N("design:type",n.TemplateRef)],e.prototype,"addCardTemplate",void 0),e=_([n.Component({selector:"aup-card-container",template:'<div class="card-container">\n <ng-content></ng-content>\n\n <div class="add-card-container" *ngIf="addCardCommand.enabled.value" [pectinCommand]="addCardCommand">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class="add-card-template" *ngIf="addCardTemplate">\n <ng-container [ngTemplateOutlet]="addCardTemplate"></ng-container>\n </div>\n\n</div>\n',styles:[":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]}),N("design:paramtypes",[])],e)}(q),ft=function(t){function e(e){var n=t.call(this)||this;return n.focusManager=e,n.restoreFocusCommand=h.Command.create((function(){n.restoreFocus()})),n.tabIndex=-1,n}return F(e,t),e.prototype.ngOnInit=function(){},e.prototype.restoreFocus=function(){this.focusManager.restoreFocus()},e.ctorParameters=function(){return[{type:h.FocusManager,decorators:[{type:n.Self}]}]},_([n.HostBinding("attr.tabindex"),N("design:type",Object)],e.prototype,"tabIndex",void 0),e=_([n.Component({selector:"aup-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:h.FocusManager}],styles:[":host{display:block}"]}),j(0,n.Self()),N("design:paramtypes",[h.FocusManager])],e)}(q),ht=function(t){function e(e,n,i){var o=t.call(this)||this;o.el=e,o.focusManager=n;var r=h.Dsl.disposeWith(o);r.chain,r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return o.focusManager&&(o._focusContext=o.focusManager.registerFocusable(o),o.registerDisposable(o._focusContext),o.registerDisposable(i.createBinding(e.nativeElement,o.focusContext))),o}return F(e,t),Object.defineProperty(e.prototype,"focusable",{get:function(){return this.focusContext?0:void 0},enumerable:!0,configurable:!0}),e.prototype.onFocus=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusIn()},e.prototype.onBlur=function(){var t;null===(t=this.focusContext)||void 0===t||t.notifyFocusOut()},Object.defineProperty(e.prototype,"focusContext",{get:function(){return this._focusContext},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:n.ElementRef},{type:h.FocusManager},{type:G}]},_([n.HostBinding("attr.tabindex"),N("design:type",Object),N("design:paramtypes",[])],e.prototype,"focusable",null),_([n.HostListener("focus"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onFocus",null),_([n.HostListener("blur"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"onBlur",null),e=_([n.Component({template:""}),N("design:paramtypes",[n.ElementRef,h.FocusManager,G])],e)}(q),mt=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 h.GarbageCollector,b.assert.notNil(i),r}return F(e,t),e.prototype.cancelActiveActivity=function(){return this.activityContainer.cancelActiveActivity()},e.prototype.dispose=function(){this.isActive()&&h.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;b.assert.isNil(this._currentActivityRef);var o=k(k({},this.config),{disableClose:n,panelClass:"dialog-interaction-context"}),r=this.dialogService.open(it,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}(tt),gt=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),yt=function(t){function e(e,n,i){var o=t.call(this)||this;return o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,b.assert.notNil(e),o}return F(e,t),e.prototype.createInteractionContext=function(t,e){var n=k(k({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig),this.dialogServiceDefaults);return new mt(t,e,this.dialogService,n)},e.ctorParameters=function(){return[{type:g.MatDialog},{type:g.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[gt]}]},{type:g.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[g.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(g.MatDialog),n.ɵɵinject(gt,8),n.ɵɵinject(g.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e=_([n.Injectable({providedIn:"root"}),j(1,n.Optional()),j(1,n.Inject(gt)),j(2,n.Optional()),j(2,n.Inject(g.MAT_DIALOG_DEFAULT_OPTIONS)),N("design:paramtypes",[g.MatDialog,g.MatDialogConfig,g.MatDialogConfig])],e)}(rt),vt=function(t){function e(e){var n=t.call(this)||this;n.data=e,n.class="aup-input-activity";var i=new h.Form;return n.valueModel=i.valueModel(n.data.initialValue),n.valueModel.validateUsing(e.validators||[]),n.confirmCommand=h.Command.create((function(){if(n.valueModel.validate()){if(e.save)return Promise.resolve(e.save(n.valueModel,n.interactionContext)).then((function(){return n.done()}));n.done(n.valueModel.value)}})),n.cancelCommand=h.Command.create((function(){n.cancel()})),n}return F(e,t),e.prototype.onActivityReady=function(){this.valueModel.focusContext.requestFocus()},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[Y]}]}]},_([n.HostBinding("class"),N("design:type",Object)],e.prototype,"class",void 0),e=_([n.Component({template:""}),j(0,n.Inject(Y)),N("design:paramtypes",[Object])],e)}(Z),bt=function(t){function e(){var e=t.call(this)||this;e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter,e.baseClassName="aup-input-component";var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return F(e,t),Object.defineProperty(e.prototype,"inputModel",{get:function(){return b.lang.abstractMethod(this.constructor,"inputModel")},enumerable:!0,configurable:!0}),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.inputModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.inputModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusContext",{get:function(){return this.inputModel.focusContext},enumerable:!0,configurable:!0}),_([n.Input(),N("design:type",String)],e.prototype,"label",void 0),_([n.Input(),N("design:type",String)],e.prototype,"floatLabel",void 0),_([n.Input(),N("design:type",String)],e.prototype,"hint",void 0),_([n.Input(),N("design:type",String)],e.prototype,"placeholder",void 0),_([n.Input("command.focus"),N("design:type",h.Command)],e.prototype,"focusCommand",void 0),_([n.Input("command.blur"),N("design:type",h.Command)],e.prototype,"blurCommand",void 0),_([n.Input("command.enter"),N("design:type",h.Command)],e.prototype,"enterCommand",void 0),_([n.Input("command.escape"),N("design:type",h.Command)],e.prototype,"escapeCommand",void 0),_([n.Input("command.click"),N("design:type",h.Command)],e.prototype,"clickCommand",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"focus",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"blur",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"enterKey",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"escapeKey",void 0),_([n.HostBinding("class"),N("design:type",Object)],e.prototype,"baseClassName",void 0),_([n.HostListener("click"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"notifyClick",null),_([n.HostListener("focusin"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"notifyFocusIn",null),_([n.HostListener("focusout"),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",void 0)],e.prototype,"notifyFocusOut",null),e=_([n.Component({template:""}),N("design:paramtypes",[])],e)}(q),Ct=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputModel=e.registerDisposable(new h.DelegatingFormListModel),e}return F(e,t),e=_([n.Component({template:""})],e)}(bt),It=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputModel=e.registerDisposable(new h.DelegatingFormValueModel),e}return F(e,t),e=_([n.Component({template:""})],e)}(bt),xt=function(t){function e(){var e=t.call(this)||this;return e.color="accent",e.labelPosition="after",e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),N("design:type",String)],e.prototype,"color",void 0),_([n.Input(),N("design:type",String)],e.prototype,"labelPosition",void 0),e=_([n.Component({selector:"aup-checkbox-input",template:'\x3c!-- TODO: add focus binding --\x3e\n<mat-checkbox\n [(ngModel)]="valueModel.value"\n [color]="color"\n [labelPosition]="labelPosition"\n [disabled]="!isEnabled()"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf="hint">{{hint}}</mat-hint>\n<mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n',styles:[":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]}),N("design:paramtypes",[])],e)}(It),Rt=function(t){function e(){var e=t.call(this)||this;return e.min=Number.MIN_SAFE_INTEGER,e.max=Number.MAX_SAFE_INTEGER,e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"min",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"max",void 0),e=_([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]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [min]="min"\n [max]="max"\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]}),N("design:paramtypes",[])],e)}(It),wt=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),e=_([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]="focusContext"\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]}),N("design:paramtypes",[])],e)}(It),Pt=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 F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ListModel)],e.prototype,"optionsModel",void 0),_([n.Input(),h.StoreInListModel("optionsModel"),N("design:type",Array)],e.prototype,"options",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"optionLabel",void 0),_([n.Input(),N("design:type",Boolean)],e.prototype,"allowNil",void 0),_([n.ContentChild("optionTemplate"),N("design:type",n.TemplateRef)],e.prototype,"optionTemplateRef",void 0),_([n.ContentChild("nilOptionTemplate"),N("design:type",n.TemplateRef)],e.prototype,"nilOptionTemplateRef",void 0),_([n.Input(),N("design:type",Function)],e.prototype,"optionLabelFormat",void 0),e=_([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]="focusContext"\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%}"]}),N("design:paramtypes",[])],e)}(It),St=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e=_([n.Component({selector:"aup-string-input-activity",template:'\n <aup-string-input [valueModel]="valueModel"\n [label]="data.label"\n [placeholder]="data.placeholder"\n [command.enter]="confirmCommand"\n [command.escape]="cancelCommand"></aup-string-input>\n <aup-activity-actions align="end"\n [confirmCommand]="confirmCommand"\n [cancelCommand]="cancelCommand"></aup-activity-actions>\n '})],e)}(vt),Mt=function(t){function e(){var e=t.call(this)||this,n=h.Dsl.disposeWith(e),i=n.chain;n.valueOf,n.before,n.when,n.after,n.observe,n.switchOn;return e.clearCommand=h.Command.create((function(){e.valueModel.value=null})),e.clearCommand.disableWhile(i.stringValue(e.valueModel).isBlank()),e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),h.TrackExternal({defaultValue:!1}),N("design:type",h.ValueModel)],e.prototype,"enableClearModel",void 0),_([n.Input(),h.StoreInValueModel("enableClearModel"),N("design:type",Boolean)],e.prototype,"enableClear",void 0),e=_([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]="focusContext"\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]}),N("design:paramtypes",[])],e)}(It),At=function(t){function e(){var e=t.call(this)||this;return e.rows=2,e}return F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"valueModel",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"rows",void 0),_([n.Input(),N("design:type",Number)],e.prototype,"cols",void 0),e=_([n.Component({selector:"aup-text-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <textarea matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\n [errorStateMatcher]="errorStateMatcher"\n [rows]="rows"\n [cols]="cols"\n >\n </textarea>\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}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]}),N("design:paramtypes",[])],e)}(It),Ot=function(){function t(){}return t=_([n.Component({selector:"aup-noop",template:"",styles:[":host{display:block}"]}),N("design:paramtypes",[])],t)}(),Tt=function(){function t(){}return t.prototype.ngOnInit=function(){},t=_([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}"]}),N("design:paramtypes",[])],t)}(),Dt=function(){function t(t){this.templateRef=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),t}(),Et=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!1,n}var i;return F(e,t),i=e,e.prototype.matches=function(t){return this.aupSwitchCaseWhen===t},e.ctorParameters=function(){return[{type:n.TemplateRef}]},_([n.Input(),N("design:type",Object)],e.prototype,"aupSwitchCaseWhen",void 0),e=i=_([n.Directive({selector:"[aupSwitchCaseWhen]",providers:[{provide:Dt,useExisting:i}]}),N("design:paramtypes",[n.TemplateRef])],e)}(Dt),Ft=function(t){function e(e){var n=t.call(this,e)||this;return n.isDefault=!0,n}var i;return F(e,t),i=e,e.prototype.matches=function(t){return!1},e.ctorParameters=function(){return[{type:n.TemplateRef}]},e=i=_([n.Directive({selector:"[aupSwitchCaseDefault]",providers:[{provide:Dt,useExisting:i}]}),N("design:paramtypes",[n.TemplateRef])],e)}(Dt),kt=function(t){function e(e){var n=t.call(this)||this;return n.cdr=e,n.selectedIndex=0,n}return F(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=h.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}]},_([n.Input(),h.TrackExternal(),N("design:type",h.ValueModel)],e.prototype,"switchModel",void 0),_([n.Input(),h.StoreInValueModel("switchModel"),N("design:type",Object)],e.prototype,"switch",void 0),_([n.ContentChildren(Dt),N("design:type",n.QueryList)],e.prototype,"switchCaseOptions",void 0),e=_([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}"]}),N("design:paramtypes",[n.ChangeDetectorRef])],e)}(q),_t=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!0,configurable:!0}),_([n.Input(),N("design:type",Object),N("design:paramtypes",[Object])],t.prototype,"value",null),t=_([n.Component({selector:"aup-default-cell-renderer",template:"{{value}}\n",styles:[""]}),N("design:paramtypes",[])],t)}(),jt=function(){function t(){}return _([n.Input(),N("design:type",String)],t.prototype,"headerText",void 0),t=_([n.Component({selector:"aup-default-header-renderer",template:"{{headerText}}\n",styles:[""]}),N("design:paramtypes",[])],t)}(),Nt=function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.rowId=e,r.form=i,r.saveCommand=o,r._liveRowValue=new h.MutableValueModel,r.liveRowValue=r._liveRowValue.readonly,r.form.load(n),r._liveRowValue.value=n,r.form.onEdit((function(){r._liveRowValue.value=x(r._liveRowValue.value,(function(t){r.form.writeDirtyStateTo(t)}))})),r}return F(e,t),e}(h.GarbageCollector),Lt=function(t){function e(){var e=t.call(this)||this;return e.saveCommand=h.Command.create((function(){e.editSession.saveCommand.execute(e.editSession.form).then((function(t){t&&e.editSession.dispose()}))})),e.cancelCommand=h.Command.create((function(){e.editSession.dispose()})),e}return F(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"form",{get:function(){var t;return null===(t=this.editSession)||void 0===t?void 0:t.form},enumerable:!0,configurable:!0}),_([n.Input(),N("design:type",Object)],e.prototype,"row",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"editRowCommand",void 0),_([n.Input(),N("design:type",Nt)],e.prototype,"editSession",void 0),e=_([n.Component({selector:"aup-row-editor-controls",template:'<button *ngIf="!editSession" mat-icon-button [pectinCommand]="editRowCommand" class="edit-button"><mat-icon>edit</mat-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="saveCommand"><mat-icon>done</mat-icon></button>\n<button *ngIf="editSession" mat-icon-button [pectinCommand]="cancelCommand"><mat-icon>clear</mat-icon></button>\n',styles:[":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]}),N("design:paramtypes",[])],e)}(q),Ut=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=h.Command.create((function(){e.selectionModel.selectCommand.execute(e.row)})),e}return F(e,t),e.prototype.isSelected=function(){return this.selectionModel.isSelected(this.row)},_([n.Input(),N("design:type",Object)],e.prototype,"row",void 0),e=_([n.Component({selector:"aup-select-cell-renderer",template:'<mat-checkbox [pectinCommand]="selectCommand" [checked]="isSelected()"></mat-checkbox>\n',styles:[""]}),N("design:paramtypes",[])],e)}(q),Vt=function(t){function e(){var e=t.call(this)||this;return e.selectCommand=h.Command.create((function(){e.selectionModel.toggleAllCommand.execute()})),e}return F(e,t),e.prototype.isSelected=function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.allSelected.value)||!1},e.prototype.isIntermediate=function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.someSelected.value)||!1},e=_([n.Component({selector:"aup-select-header-cell-renderer",template:'<mat-checkbox [pectinCommand]="selectCommand" [checked]="isSelected()" [indeterminate]="this.isIntermediate()"></mat-checkbox>\n',styles:[""]}),N("design:paramtypes",[])],e)}(q),Bt=function(){function t(t){this.sourceOfTruth=t,this._garbage=new h.GarbageCollector,this._columns=new h.MutableListModel,this._editorSessions=new h.MutableListModel,this._createForm=function(t){return new h.Form},this.identityOf=t.identityOf;var e=h.Dsl.disposeWith(this._garbage),n=e.chain;e.valueOf,e.before,e.when,e.after,e.observe,e.switchOn;this._columnsById=n(this._columns).indexBy("columnId"),this._rowsBeingEdited=new h.MutableListModel([],{identifiedWith:this.identityOf}),this._editorSessionByRowId=n(this._editorSessions).indexBy("rowId"),this.editing=n(this._editorSessions).count().isGreaterThan(0),this.dataSource=n(this.sourceOfTruth).replaceAll(this.rowsBeingEdited)}var e;return e=t,t.fromList=function(t,n){var i=new e(t);return n(i),i},Object.defineProperty(t.prototype,"rowsBeingEdited",{get:function(){return this._rowsBeingEdited.readonly},enumerable:!0,configurable:!0}),t.prototype.getTrackByFunction=function(){var t=this;return function(e,n){return t.identityOf?t.identityOf(n):e}},Object.defineProperty(t.prototype,"columns",{get:function(){return this._columns.readonly},enumerable:!0,configurable:!0}),t.prototype.pluck=function(t){return this.addColumn(new ne(t,this))},t.prototype.pluckList=function(t){return this.addColumn(new ie(t,this))},t.prototype.addSelectionColumn=function(t){return this.addColumn(new se("selection",this,t))},t.prototype.addEditControls=function(t){return this.saveCommand=t,this.addColumn(new re("editControls",t,this))},t.prototype.addCustomColumn=function(t,e){return this.addColumn(new oe(t,this,e))},t.prototype.addTemplateColumn=function(t){return this.addColumn(new ae(t,this))},t.prototype.useFormFactory=function(t){return this._createForm=t,this},t.prototype.addColumn=function(t){return this._columnsById.get(t.columnId)?h.lang.illegalState("Column with id="+t.columnId+" already exists"):this._columns.push(t),t},t.prototype.columnTextProperties=function(t){this._columnTextPropertiesLookup=t},t.prototype.getColumnTextProperties=function(t){var e=this._columnTextPropertiesLookup?this._columnTextPropertiesLookup[t.columnId]:void 0;return e?e():void 0},t.prototype.startEditSession=function(t){var e=this,n=this.identityOf(t);if(this._rowsBeingEdited.query().indexOf(t)>-1)return h.lang.illegalState("Row with id="+n+" already being edited");var i=new Nt(n,t,this._createForm(t),this.saveCommand);return h.Dsl.disposeWith(i).when.valueOf(i.liveRowValue).changes((function(t){e._rowsBeingEdited.replaceOrPush(t)}),{initialValue:"triggerChangeUnlessNil"}),this._editorSessions.push(i),i.onDispose((function(){e._rowsBeingEdited.remove(i.liveRowValue.value),e._editorSessions.remove(i)})),i},t.prototype.getEditSessionFor=function(t){return this._editorSessionByRowId.get(this.identityOf(t))},t.prototype.cancelAllEditorSessions=function(){var t=this;this._editorSessions.runInTransaction((function(e){t._rowsBeingEdited.runInTransaction((function(){e.value.forEach((function(t){return t.dispose()}))}))}))},t.ctorParameters=function(){return[{type:h.ListModel}]},t=e=_([h.TrackExternal.Strategy(new h.TrackExternal.OneTimeBinding),N("design:paramtypes",[h.ListModel])],t)}(),Ht=function(){function t(){var t=this;this.defaultClassNames="aup-cell-renderer",this.fillCell=!1,this.padChild=!1,this.editRowCommand=h.Command.create((function(){t.tableModel.startEditSession(t.row)}))}return t.prototype.ngOnInit=function(){this.column.attachCell(this)},t.prototype.hasActiveEditor=function(){return!!this.editSession&&!!this.column.hasEditorPortal()},t.prototype.initialiseRenderer=function(t){this.column.onRendererAttached(this,t)},t.prototype.initialiseEditor=function(t){this.column.onEditorAttached(this,t)},t.prototype.ngOnChanges=function(t){this.column.updatePortalContent(this)},t.prototype.getRendererPortal=function(){return this[zt]},t.prototype.getEditorPortal=function(){return this[Gt]},t.prototype.getRowData=function(){return{row:this.row,editSession:this.editSession,editRowCommand:this.editRowCommand}},_([n.Input(),N("design:type",Object)],t.prototype,"row",void 0),_([n.Input(),N("design:type",ee)],t.prototype,"column",void 0),_([n.Input(),N("design:type",Nt)],t.prototype,"editSession",void 0),_([n.Input(),N("design:type",Bt)],t.prototype,"tableModel",void 0),_([n.HostBinding("class"),N("design:type",Object)],t.prototype,"defaultClassNames",void 0),_([n.HostBinding("class.fillCell"),N("design:type",Object)],t.prototype,"fillCell",void 0),_([n.HostBinding("class.padChild"),N("design:type",Object)],t.prototype,"padChild",void 0),_([h.Trace(),N("design:type",Function),N("design:paramtypes",[Object]),N("design:returntype",void 0)],t.prototype,"initialiseEditor",null),t=_([n.Component({selector:"aup-table-cell-renderer",template:'<ng-container *ngIf="!hasActiveEditor()" [cdkPortalOutlet]="getRendererPortal()" (attached)="initialiseRenderer($event.instance)"></ng-container>\n<ng-container *ngIf="hasActiveEditor()" [cdkPortalOutlet]="getEditorPortal()" (attached)="initialiseEditor($event.instance)"></ng-container>\n',styles:[""]}),N("design:paramtypes",[])],t)}(),qt=Symbol("aup-cell-header-renderer-component-ref"),zt=Symbol("aup-cell-renderer-component-ref"),Gt=Symbol("aup-cell-editor-component-ref"),Kt=Symbol("aup-cell-renderer-portal-component"),Wt=Symbol("aup-cell-editor-portal-component"),Xt=function(){},Yt=function(){},Zt=function(t){function e(e,n){var i=t.call(this)||this;return i.componentType=e,i.initialiseHeader=n,i}return F(e,t),e.prototype.initialiseHost=function(t,e){b.assert.isTruthy(t),t[qt]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){this.initialiseHeader(e,t.column)},e}(Yt),$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e}(Yt),Jt=function(t){function e(e,n){var i=t.call(this)||this;return i.componentType=e,i.updateComponent=n,i}return F(e,t),e.prototype.initialiseHost=function(t,e){t[zt]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){t[Kt]=e,this.updateComponent(e,t.getRowData())},e.prototype.pushState=function(t){t[Kt]&&this.updateComponent(t[Kt],t.getRowData())},e}($t),Qt=function(t){function e(e,n){var i=t.call(this)||this;return i.componentType=e,i.initialiseEditorSession=n,i}return F(e,t),e.prototype.initialiseHost=function(t,e){b.assert.isTruthy(t),t[Gt]=new l.ComponentPortal(this.componentType)},e.prototype.onPortalAttached=function(t,e){t[Wt]=e,this.initialiseEditorSession(e,t.editSession)},_([h.Trace(),N("design:type",Function),N("design:paramtypes",[Ht,Object]),N("design:returntype",void 0)],e.prototype,"onPortalAttached",null),e}(Yt),te=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.registerPortal=function(t,e,n,i){this.templateRef=t,this.viewContainer=e,this.fillCell=n,this.padChild=i},e.prototype.initialiseHost=function(t,e){b.assert.isTruthy(t)},e.prototype.onPortalAttached=function(t,e){},e.prototype.pushState=function(t){t[zt]=this.createPortal(t.getRowData()),t.fillCell=this.fillCell,t.padChild=this.padChild},e.prototype.createPortal=function(t){return new l.TemplatePortal(this.templateRef,this.viewContainer,k(k({},t),{$implicit:t.row}))},_([h.Trace(),N("design:type",Function),N("design:paramtypes",[Ht,void 0]),N("design:returntype",void 0)],e.prototype,"onPortalAttached",null),e}($t),ee=function(){function t(t,e){this.columnId=t,this.defaults=e,this.cellHeaderRenderer(jt,(function(t,e){t.headerText=e.getHeaderText()}))}return t.prototype.getHeaderText=function(){var t;return(null===(t=this.getColumnTextProperties())||void 0===t?void 0:t.headerText())||this.getDefaultHeaderText()},t.prototype.getDefaultHeaderText=function(){return this.columnId},t.prototype.getColumnTextProperties=function(){return this._columnTextProperties||this.defaults.getColumnTextProperties(this)},t.prototype.textProperties=function(t){return this._columnTextProperties=t,this},t.prototype.configureHeaderRenderer=function(t){this._columnHeaderPortalRef=t},t.prototype.configureCellRenderer=function(t){this._cellRendererPortalRef=t},t.prototype.configureCellEditor=function(t){this._cellEditorPortalRef=t},t.prototype.cellHeaderRenderer=function(t,e){return this.configureHeaderRenderer(new Zt(t,e)),this},t.prototype.hasEditorPortal=function(){return!!this._cellEditorPortalRef},t.prototype.attachHeaderCell=function(t){this._columnHeaderPortalRef.initialiseHost(t,this)},t.prototype.attachCell=function(t){this._cellRendererPortalRef.initialiseHost(t,this),this.hasEditorPortal()&&this._cellEditorPortalRef.initialiseHost(t,this)},t.prototype.onHeaderAttached=function(t,e){this._columnHeaderPortalRef.onPortalAttached(t,e)},t.prototype.onRendererAttached=function(t,e){this._cellRendererPortalRef.onPortalAttached(t,e)},t.prototype.onEditorAttached=function(t,e){this._cellEditorPortalRef.onPortalAttached(t,e)},t.prototype.updatePortalContent=function(t){this._cellRendererPortalRef.pushState(t)},_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",String)],t.prototype,"getHeaderText",null),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",Object)],t.prototype,"getColumnTextProperties",null),_([h.Trace(),N("design:type",Function),N("design:paramtypes",[Ht,Object]),N("design:returntype",void 0)],t.prototype,"onEditorAttached",null),t}(),ne=function(t){function e(e,n){var i=t.call(this,e.toString(),n)||this;return i.property=e,i._format=function(t){return t},i.cellRenderer(_t),i}return F(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new Jt(t,(function(t,n){t.value=e._format(n.row[e.property])}))),this},e.prototype.cellEditor=function(t,e,n){var i=this,o=Array.isArray(e)?e:void 0,r=D.isFunction(e)?e:n;return this.configureCellEditor(new Qt(t,(function(t,e){var n=e.form.pluck(i.property);o&&n.validateUsing(o),t.valueModel=n,r&&r(t)}))),this},e.prototype.format=function(t){return b.assert.isFunction(t),this._format=t,this},e}(ee),ie=function(t){function e(e,n){var i=t.call(this,e.toString(),n)||this;return i.property=e,i._format=function(t){return t.map((function(t){return null==t?void 0:t.toString()})).join(", ")},i.cellRenderer(_t),i}return F(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new Jt(t,(function(t,n){t.value=e._format(n.row[e.property])}))),this},e.prototype.cellEditor=function(t,e,n){var i=this,o=Array.isArray(e)?e:void 0,r=D.isFunction(e)?e:n;return this.configureCellEditor(new Qt(t,(function(t,e){var n=e.form.pluckList(i.property);o&&n.validateUsing(o),t.listModel=n,r&&r(t)}))),this},e.prototype.format=function(t){return b.assert.isFunction(t),this._format=t,this},e}(ee),oe=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.getValue=i,o.cellRenderer(_t),o}return F(e,t),e.prototype.cellRenderer=function(t){var e=this;return this.configureCellRenderer(new Jt(t,(function(t,n){t.value=e.getValue(n.row)}))),this},e}(ee),re=function(t){function e(e,n,i){var o=t.call(this,e,i)||this;return o.cellRenderer(Lt),o}return F(e,t),e.prototype.cellRenderer=function(t){return this.configureCellRenderer(new Jt(t,(function(t,e){t.row=e.row,t.editSession=e.editSession,t.editRowCommand=e.editRowCommand}))),this},e.prototype.getDefaultHeaderText=function(){return""},e}(ee),ae=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.config=new te,i.configureCellRenderer(i.config),i}return F(e,t),e.prototype.setTemplate=function(t,e,n,i){this.config.registerPortal(t,e,n,i)},e}(ee),se=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return i instanceof h.MultipleSelectionModel&&o.cellHeaderRenderer(Vt,(function(t){t.selectionModel=i})),o.configureCellRenderer(new Jt(Ut,(function(t,e){t.row=e.row,t.selectionModel=i}))),o}return F(e,t),e.prototype.getDefaultHeaderText=function(){return""},e}(ee),ce=function(t){function e(){return t.call(this)||this}return F(e,t),e.prototype.ngOnInit=function(){var t=h.Dsl.disposeWith(this),e=t.chain;t.valueOf,t.before,t.when,t.after,t.observe,t.switchOn;this.columns=e(this.tableModel.columns),this.columnIds=e(this.columns).pluck("columnId"),this.columnsById=e(this.columns).indexBy("columnId")},e.prototype.isEditing=function(t){return!!this.tableModel.getEditSessionFor(t)},e.prototype.registerColumnTemplate=function(t,e,n,i,o){var r=this.columnsById.get(t);r instanceof ae&&r.setTemplate(e,n,i,o)},_([n.Input(),h.TrackExternal(),N("design:type",Bt)],e.prototype,"tableModel",void 0),e=_([n.Component({selector:"aup-table",template:'<table mat-table [dataSource]="tableModel.dataSource.value" [trackBy]="tableModel.getTrackByFunction()">\n\n <ng-container *ngFor="let column of columns.value; index as index; first as first; last as last" matColumnDef="{{column.columnId}}">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]="column"\n [attr.column-index]="index"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef="let row">\n <aup-table-cell-renderer [column]="column"\n [row]="row"\n [tableModel]="tableModel"\n [editSession]="tableModel.getEditSessionFor(row)"\n [attr.column-index]="index"\n [class.first-column]="first"\n [class.last-column]="last"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef="columnIds.value"></tr>\n <tr mat-row *matRowDef="let row; columns: columnIds.value;"></tr>\n\n</table>\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]}),N("design:paramtypes",[])],e)}(q),le=function(){function t(t,e,n){this.host=t,this.templateRef=e,this.viewContainer=n,this.aupColumnTemplateFillCell=!1,this.aupColumnTemplateAutoPadChild=void 0}return t.prototype.ngOnInit=function(){var t;h.assert.isTruthy(this.aupColumnTemplateColumnId),this.host.registerColumnTemplate(this.aupColumnTemplateColumnId,this.templateRef,this.viewContainer,this.aupColumnTemplateFillCell,null!==(t=this.aupColumnTemplateAutoPadChild)&&void 0!==t?t:this.aupColumnTemplateFillCell)},t.ctorParameters=function(){return[{type:ce},{type:n.TemplateRef},{type:n.ViewContainerRef}]},_([n.Input(),N("design:type",String)],t.prototype,"aupColumnTemplate",void 0),_([n.Input(),N("design:type",String)],t.prototype,"aupColumnTemplateColumnId",void 0),_([n.Input(),N("design:type",Object)],t.prototype,"aupColumnTemplateFillCell",void 0),_([n.Input(),N("design:type",Object)],t.prototype,"aupColumnTemplateAutoPadChild",void 0),t=_([n.Directive({selector:"[aupColumnTemplate]"}),N("design:paramtypes",[ce,n.TemplateRef,n.ViewContainerRef])],t)}(),ue=function(){function t(){this.defaultClassNames="aup-header-cell-renderer"}return t.prototype.ngOnInit=function(){this.column.attachHeaderCell(this)},t.prototype.initialiseHeader=function(t){this.column.onHeaderAttached(this,t)},t.prototype.getPortal=function(){return this[qt]},_([n.Input(),N("design:type",ee)],t.prototype,"column",void 0),_([n.HostBinding("class"),N("design:type",Object)],t.prototype,"defaultClassNames",void 0),t=_([n.Component({selector:"aup-table-header-cell-renderer",template:'<ng-container [cdkPortalOutlet]="getPortal()" (attached)="initialiseHeader($event.instance)"></ng-container>\n',styles:[":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]}),N("design:paramtypes",[])],t)}(),pe=function(t){function e(e){var n=t.call(this,e)||this;return n.focusManager=e,n}return F(e,t),e.prototype.arrowLeft=function(t){this.leftArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.leftArrowCommand.execute())},e.prototype.arrowRight=function(t){this.rightArrowCommand.enabled.value&&(t.preventDefault(),t.stopPropagation(),this.rightArrowCommand.execute())},e.prototype.arrowDown=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusNext()},e.prototype.arrowUp=function(t){t.preventDefault(),t.stopPropagation(),this.focusManager.focusPrevious()},e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:h.FocusManager,decorators:[{type:n.Self}]}]},_([n.Input("command.arrowRight"),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"rightArrowCommand",void 0),_([n.Input("command.arrowLeft"),h.TrackExternal(),N("design:type",h.Command)],e.prototype,"leftArrowCommand",void 0),_([n.HostListener("keyup.arrowLeft",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowLeft",null),_([n.HostListener("keyup.arrowRight",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowRight",null),_([n.HostListener("keyup.arrowDown",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowDown",null),_([n.HostListener("keyup.arrowUp",["$event"]),N("design:type",Function),N("design:paramtypes",[KeyboardEvent]),N("design:returntype",void 0)],e.prototype,"arrowUp",null),e=_([n.Component({selector:"aup-vertical-focus-container",template:"<ng-content></ng-content>\n",providers:[{provide:h.FocusManager}],styles:[":host{display:block}"]}),j(0,n.Self()),N("design:paramtypes",[h.FocusManager])],e)}(ft),de=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 F(e,t),e.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal({delegateTo:"inputModel"}),N("design:type",Object)],e.prototype,"listModel",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ListModel)],e.prototype,"optionsModel",void 0),_([n.Input(),h.StoreInListModel("optionsModel"),N("design:type",Array)],e.prototype,"options",void 0),_([n.Input(),N("design:type",Object)],e.prototype,"optionLabel",void 0),_([n.Input(),N("design:type",Boolean)],e.prototype,"allowNil",void 0),_([n.ContentChild("optionTemplate"),N("design:type",n.TemplateRef)],e.prototype,"optionTemplateRef",void 0),_([n.ContentChild("nilOptionTemplate"),N("design:type",n.TemplateRef)],e.prototype,"nilOptionTemplateRef",void 0),_([n.Input(),N("design:type",Function)],e.prototype,"optionLabelFormat",void 0),e=_([n.Component({selector:"aup-multiple-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n multiple\n [(ngModel)]="listModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="focusContext"\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%}"]}),N("design:paramtypes",[])],e)}(Ct),fe=function(){function t(){}return t=_([n.NgModule({declarations:[bt,It,Ct,vt,Rt,Mt,St,At,wt,Pt,xt,Tt,Ot,kt,Et,Ft,ft,pe,ht,dt,ce,Lt,le,_t,Ht,Ut,Vt,jt,ue,de],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,W,d.MatIconModule,u.MatButtonModule,p.MatCheckboxModule,pt,f.MatTableModule,l.PortalModule],exports:[Rt,Mt,At,wt,xt,Pt,Tt,Ot,kt,Et,Ft,ft,pe,ht,dt,ce,Lt,le,de],providers:[G]})],t)}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=b.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 L(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 F(e,t),e.prototype.isEmptyValue=function(t){return D.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 F(e,t),e.prototype.isEmptyValue=function(t){return D.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 F(e,t),e.prototype.isEmptyValue=function(t){return D.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!D.isEqual(t,e)},e}(t);t.ArrayParameter=i}(t.ParameterDefinition||(t.ParameterDefinition={}));var he,me=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=b.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?D.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!D.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?(h.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(h.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&&D.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[]),N("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[Object]),N("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[Object]),N("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),ge=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){var e=t.call(this)||this;return e.visitModel=new h.MutableValueModel,e._inVisitUpdate=new h.Guard,e}var i;return F(e,t),i=e,e.prototype.initialiseVisit=function(t,e){var n=this;h.assert.isNil(this.visitModel.value);var i=h.Dsl.disposeWith(this).when;this.visitModel.value=t,h.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;h.assert.isTruthy(this.isInitialised()),h.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];h.DebugContext.tag(e,this.placeDefinition.component.name+"."+t.propertyName),this.registerDisposable(new h.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(){},_([S.Memoize(),N("design:type",me),N("design:paramtypes",[])],e.prototype,"placeDefinition",null),e=i=_([n.Directive(),N("design:paramtypes",[])],e)}(q),(he=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return h.lang.constructorChain(t).includes(he)},he.getRouteParameters=function(t){return b.Klass.get(t).getMetadataList(ge)},he.getDefinition=function(t){return Reflect.getMetadata("PLACE_DEFINITION_OPTIONS",t)},he.injectDefinition=function(t,e){Reflect.defineMetadata("PLACE_DEFINITION_OPTIONS",e,t)};var ye,ve,be=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 L(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 L(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(),v.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}(),Ce=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 F(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 h.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){h.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:"",h.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 L(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 be(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){h.Logger.get(this).info("back button pressed during navigation session interaction promise");var e=this.detachCanDeactivateInteractionContext();h.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}(h.GarbageCollector),Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(e,t),e.prototype.handleCanDeactivateCancelledEventScenario=function(t){b.lang.illegalState("onCanDeactivateInteractionCancelled not supported for event clean up states")},e}(Ce),xe=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 F(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 L(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!1]}))}))},e}(Ie),Re=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.isPopState=!0,i.debugPropertyKeys=["startingUrl","poppedHistoryUrl"],i.finished=h.Deferred.defer(),i}return F(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){h.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}(Ce),we=function(t){function e(e,n,i){var o=t.call(this,e,n)||this;return o.wasTriggeredByPopState=i,o.isPopState=!1,o}return F(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(D.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)||b.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 Re(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){b.lang.methodNotSupported()},e}(Ce),Pe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e}return F(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 we(this.context,this.startingUrl,!1)):this.context.finishRoutingSession(this.getVisits())},e.prototype.handleCanDeactivateCancelledEventScenario=function(t){this.context.transitionTo(new xe(this.context,this.startingUrl,t))},e}(Ce),Se=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 F(e,t),e.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation=function(){t.prototype.repairBrowserHistoryAndUrlAfterGuardCancellation.call(this,this.poppedHistoryUrl,this.startingUrl)},e}(Ce),Me=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return F(e,t),e.prototype.onRouterCancelled=function(t){this.repairBrowserHistoryAndUrlAfterGuardCancellation(),this.context.transitionTo(new we(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}(Se),Ae=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 F(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 L(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!1]}))}))},e}(Ie),Oe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isPopState=!1,e.debugPropertyKeys=["startingUrl","urlAfterRedirects"],e}return F(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 Ae(this.context,this.startingUrl,t))},e}(Ce);ye=t.NavigationContext||(t.NavigationContext={}),ve=function(t,e,n,i,o){this.urlService=t,this.routerInteractionAdapter=e,this.navigateByUrl=n,this.transitionTo=i,this.finishRoutingSession=o},ye.Impl=ve;var Te,De,Ee,Fe=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 F(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 L(this,void 0,void 0,(function(){return U(this,(function(t){return[2,!1]}))}))},e}(Ie),ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return F(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 Fe(this.context,this.startingUrl,t,this.poppedHistoryUrl))},e}(Se);t.ɵcp=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){h.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 D.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=D.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=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[])],t)}(),Te=t.ɵcp||(t.ɵcp={}),De=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}(),Te.VisitRecord=De,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=B(this.getPrimarySegments(n)),o=this.getSegmentsFor(e),r=i.findIndex((function(t){return t.path===o[0].path}));return i.splice.apply(i,B([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 y.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new y.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new y.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 D.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}(),(Ee=t.UrlSnapshot||(t.UrlSnapshot={})).INTERACTION_QUERY_PARAM="aup-interactions",Ee.INTERACTION_ID_SEPARATOR="--",Ee.parseInteractionIds=function(t){return t.split(Ee.INTERACTION_ID_SEPARATOR)},Ee.createPathIdFor=function(t){return t.join(Ee.INTERACTION_ID_SEPARATOR)};var _e=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:y.Router},{type:e.Location},{type:y.UrlSerializer}]},i.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(y.Router),n.ɵɵinject(e.Location),n.ɵɵinject(y.UrlSerializer))},token:i,providedIn:"root"}),i=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[y.Router,e.Location,y.UrlSerializer])],i)}(),je=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!v.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,k(k({},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=v.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!v.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}(),Ne=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 h.MutableValueModel,s._activeVisits=new h.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=h.Dsl.disposeWith(s),l=c.chain;c.valueOf,c.before,c.when,c.after,c.observe,c.switchOn;s.navigationInProgress=l(s.navigationSessionModel).isNotNil();var u=l(s.interactionService.active).map((function(t){return t?"IdleDuringInteraction":"Idle"}));return s.navigationSessionName=l(s.navigationSessionModel).pluck("name").otherwise(u),h.DebugContext.tag(s._activeVisits,"PlaceRouter.activeVisits"),s.activeVisitsByPlaceDefinition=l(s._activeVisits).indexBy("placeDefinition"),e.events.subscribe((function(t){t instanceof y.NavigationStart&&("popstate"===t.navigationTrigger?s.onPopState(t):s.onRouterStarted(t)),t instanceof y.NavigationEnd&&s.onRouterEnd(t),t instanceof y.NavigationError&&s.onRouterError(t),t instanceof y.NavigationCancel&&s.onRouterCancelled(t)})),n.onUrlChange((function(t){return s.onUrlChanged(t)})),s}return F(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(h.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 Me(this.navigationContext,n,e):new ke(this.navigationContext,n,e);this.transitionTo(i)}},o.prototype.onRouterStarted=function(t){h.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 L(n,void 0,void 0,(function(){var n;return U(this,(function(i){switch(i.label){case 0:return n=B([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 L(this,void 0,void 0,(function(){var n;return U(this,(function(i){switch(i.label){case 0:this.navigationInProgress.value&&h.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 y.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 L(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 Pe(this.navigationContext,t):new Oe(this.navigationContext,t)},o.prototype.transitionTo=function(t){var e=this.navigationSessionModel.value;e||this.placeHistory.notifyNavigationStarted(),h.assert.isTruthy(t!==e),h.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&&(h.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){h.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 we(t.navigationContext,t.urlService.getCurrentRouterUrl(),!1);t.transitionTo(n)}))}))}return new Promise((function(e,n){t.runAfterRoutingSessionFinishes(e);var i=new we(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:y.Router},{type:e.Location},{type:t.ɵbz},{type:_e},{type:t.ɵcp}]},o.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(y.Router),n.ɵɵinject(e.Location),n.ɵɵinject(t.ɵbz),n.ɵɵinject(_e),n.ɵɵinject(t.ɵcp))},token:o,providedIn:"root"}),_([h.Trace(),N("design:type",Function),N("design:paramtypes",[je,je]),N("design:returntype",Promise)],o.prototype,"pushVisitChangesToRoute",null),o=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[y.Router,e.Location,t.ɵbz,_e,t.ɵcp])],o)}(h.GarbageCollector),Le=new n.InjectionToken("AUP_PLACE_CONFIG"),Ue=A.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),Ve=[A.query(":enter, :leave",Ue,{optional:!0}),A.group([A.query(":enter",[A.style({transform:"translateX(-100%)"}),A.animate("{{duration}} ease-out",A.style({transform:"translateX(0%)"}))],{optional:!0}),A.query(":leave",[A.style({transform:"translateX(0%)"}),A.animate("{{duration}} ease-out",A.style({transform:"translateX(100%)"}))],{optional:!0})])],Be=[A.query(":enter, :leave",Ue,{optional:!0}),A.group([A.query(":enter",[A.style({transform:"translateX(100%)",minHeight:"1px"}),A.animate("{{duration}} ease-out",A.style({transform:"translateX(0%)"}))],{optional:!0}),A.query(":leave",[A.style({transform:"translateX(0%)"}),A.animate("{{duration}} ease-out",A.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function He(t){return A.trigger("routeAnimations",[A.transition(":increment",Be,{params:{duration:t}}),A.transition(":decrement",Ve,{params:{duration:t}})])}var qe,ze=He("0.3s"),Ge=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 h.MutableValueModel(!1),a._activatedRouteModel=new h.MutableValueModel,a._activePlaceModel=new h.MutableValueModel,a.initialPlaceIndex=null,a._isPushingVisitToRoute=new h.MutableValueModel(!1);var s=h.Dsl.disposeWith(a),c=s.chain,l=(s.valueOf,s.before,s.when);s.after,s.observe,s.switchOn;a.parentOutletModel=new h.MutableValueModel(r);var u=c(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),p=c(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=c(a.customPlaceAnimationOrderModel).otherwise(u).reduce((function(t){var e=0;return p.value&&(e=t.indexOf(p.value),v.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),v.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:p}),a._activePlaceDefinition=c(a._activePlaceModel).pluck("placeDefinition"),a.routerVisitModel=a._activePlaceDefinition.findIn(c(i.activeVisitsByPlaceDefinition)),a.navigationInProgress=c(a.placeRouter.navigationInProgress),l.valueOf(a.navigationInProgress).becomesFalsey((function(){a.checkStateAndInitialise()})),l.valueOf(a.outletActivated).becomesTruthy((function(){a.checkStateAndInitialise()})),c(a._activePlaceModel).postponeWhile(a.navigationInProgress).subscribe((function(t){return a.placeChanged.emit(t)})),a}return F(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&&h.lang.illegalState("wrong visit!!!"),this.initialisePlace(t,e))},e.prototype.initialisePlace=function(t,e){var n=this,i=new h.MutableValueModel(t);h.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=h.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:y.Router},{type:Ne},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Le]}]},{type:e,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},_([n.Input(),h.StoreInValueModel("animateModel"),N("design:type",Boolean)],e.prototype,"animate",void 0),_([n.Input(),h.TrackExternal({defaultValue:!0}),N("design:type",h.ValueModel)],e.prototype,"animateModel",void 0),_([n.Input("placeAnimationOrderModel"),h.TrackExternal(),N("design:type",h.ListModel)],e.prototype,"customPlaceAnimationOrderModel",void 0),_([n.Input("placeAnimationOrder"),h.StoreInListModel("customPlaceAnimationOrderModel"),N("design:type",Array)],e.prototype,"customPlaceAnimationOrder",void 0),_([n.Output(),N("design:type",Object)],e.prototype,"placeChanged",void 0),_([n.ViewChild("routeOutlet",{static:!0}),N("design:type",y.RouterOutlet)],e.prototype,"routerOut",void 0),e=_([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:[ze],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}"]}),j(2,n.Optional()),j(2,n.Inject(Le)),j(3,n.SkipSelf()),j(3,n.Optional()),N("design:paramtypes",[y.Router,Ne,Object,e])],e)}(q),Ke=function(e){function i(n){var i=e.call(this)||this;i._activePlaceComponent=new h.DelegatingValueModel;var o=h.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=h.Command.createFactory((function(t){i.placeOutlet.navigate(new je(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 F(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:Ne}]},_([n.Input(),h.StoreInListModel("placesModel"),N("design:type",Array)],i.prototype,"places",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ListModel)],i.prototype,"placesModel",void 0),_([n.Input(),h.StoreInValueModel("placeOutletModel"),N("design:type",Ge)],i.prototype,"placeOutlet",void 0),_([n.Input(),h.TrackExternal(),N("design:type",h.ValueModel)],i.prototype,"placeOutletModel",void 0),_([I.Memoize(),N("design:type",Function),N("design:paramtypes",[me]),N("design:returntype",Object)],i.prototype,"getNav",null),i=_([n.Component({template:""}),N("design:paramtypes",[Ne])],i)}(q),We=function(){function t(){}return t.prototype.ngOnInit=function(){},_([n.Input(),h.TrackExternal(),N("design:type",h.ValueModel)],t.prototype,"busyModel",void 0),_([n.Input(),h.StoreInValueModel("busyModel"),N("design:type",Boolean)],t.prototype,"busy",void 0),t=_([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}"]}),N("design:paramtypes",[])],t)}(),Xe=function(){function t(){}return t.prototype.ngOnInit=function(){},t=_([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}"]}),N("design:paramtypes",[])],t)}(),Ye=function(t){function e(e){return t.call(this,e)||this}return F(e,t),e.ctorParameters=function(){return[{type:Ne}]},e=_([n.Component({selector:"aup-list-place-nav",template:'<mat-nav-list fxFlex>\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>{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--selected-border-color:#838383;--selected-color:inherit;--selected-background:#f1f1f1}mat-nav-list{padding-top:0}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}"]}),N("design:paramtypes",[Ne])],e)}(Ke),Ze=function(t){function e(e){return t.call(this,e)||this}return F(e,t),e.ctorParameters=function(){return[{type:Ne}]},e=_([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:[""]}),N("design:paramtypes",[Ne])],e)}(Ke),$e=function(t){function e(e,n){var i=t.call(this,n)||this;return i.router=e,i.expanded=!1,i}return F(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:y.Router},{type:Ne}]},_([n.HostBinding("class.expanded"),N("design:type",Object)],e.prototype,"expanded",void 0),_([n.ContentChild("navEndTemplate"),N("design:type",n.TemplateRef)],e.prototype,"navEndTemplate",void 0),e=_([n.Component({selector:"aup-side-place-navigation",template:'<mat-nav-list>\n <a mat-list-item (click)="toggleMenu()" class="home">\n <mat-icon class="collapsed-only">menu</mat-icon>\n <mat-icon class="expanded-only">arrow_back</mat-icon>\n <span class="expanded-only">Menu</span>\n </a>\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\n class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n <span [style.flex]="1"></span>\n <ng-container *ngIf="navEndTemplate" [ngTemplateOutlet]="navEndTemplate"></ng-container>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width, 56px);--resolved-nav-item-height:var(--nav-item-height, var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width, 235px);--resolved-color:var(--nav-color, rgba(255, 255, 255, 0.9));--resolved-background-color:var(--nav-background-color, #555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]}),N("design:paramtypes",[y.Router,Ne])],e)}(Ke),Je=function(){function t(){}return t=_([n.NgModule({imports:[e.CommonModule,c.BrowserAnimationsModule,R.MatProgressSpinnerModule,y.RouterModule,s.MatTabsModule,w.MatListModule,P.MatTooltipModule,d.MatIconModule,W,m.FlexModule],declarations:[Xe,We,Ge,Ze,Ye,$e,Ke],entryComponents:[We],exports:[We,Ge,Xe,Ze,Ye,$e,Ke],providers:[]})],t)}(),Qe=function(){function t(){}return t=_([n.NgModule({declarations:[],imports:[e.CommonModule,c.BrowserAnimationsModule,i.FormsModule,r.MatInputModule,o.MatFormFieldModule,a.MatSelectModule,s.MatTabsModule,W,fe,Je,pt],exports:[pt,Je,W,fe,Ot]})],t)}(),tn=A.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"}),en=A.trigger("slideDownOnEnter",[A.transition(":enter",[tn,A.animate("{{duration}}")],{params:{duration:"100ms"}}),A.transition(":leave",[A.animate("{{duration}}",tn)],{params:{duration:"100ms"}})]),nn=A.style({opacity:0,width:"0",paddingLeft:"0",paddingRight:"0"}),on=A.trigger("slideRightOnEnter",[A.transition(":enter",[nn,A.animate("{{duration}}")],{params:{duration:"100ms"}}),A.transition(":leave",[A.animate("{{duration}}",nn)],{params:{duration:"100ms"}})]),rn=function(t,e){this.width=t,this.height=e},an=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 F(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new an(t.clientX-this.left,t.clientY-this.top):new an(t.x-this.left,t.y-this.top)},e}(rn),(qe=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new qe(e.top,e.left,e.width,e.height)};var sn=function(e){function i(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new h.MutableValueModel(new t.Bounds(0,0,0,0)),o}return F(i,e),i.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new O((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=_([n.Directive(),N("design:paramtypes",[n.ElementRef,n.NgZone])],i)}(q);var cn,ln,un,pn,dn=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new fn(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}),_([I.Memoize(),N("design:type",Array),N("design:paramtypes",[])],t.prototype,"keys",null),t}(),fn=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}(),hn=function(){function t(){}return t.prototype.canActivate=function(t,e){return L(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=_([n.Injectable({providedIn:"root"}),N("design:paramtypes",[])],t)}(),mn=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 L(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,l;return U(this,(function(u){switch(u.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(l=u.sent(),console.log({routeId:i,sanitisedValue:l}),n.hasChanged(i,l))return[2,t.replace(n,l)];u.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,u.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:l=u.sent(),s.hasChanged(c,l)&&(r=r.replace(s,l)),u.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}(),gn=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 L(this,void 0,void 0,(function(){var n=this;return U(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return L(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 L(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 dn(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationSession,a=r.getVisitFor(i)||new je(i,o),[4,new mn(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 L(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 L(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,h.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return L(this,void 0,void 0,(function(){var n;return U(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof T.Observable?n.toPromise():n]}))}))},e.prototype.cleanInteractionState=function(t,e,n){return L(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 yn(t,e,n,i,o){var r={backingModel:n,binding:null},a=i+"("+t.constructor.name+"."+e.toString()+")";h.DebugContext.get(r.backingModel).tag(a),h.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 h.Binding(r.backingModel,t,{toLeft:h.Functions.identity,toRight:h.Functions.identity}),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()))}})}cn=t.Formatter||(t.Formatter={}),ln=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),un=function(){function t(){}return t.prototype.format=function(t){return D.isNumber(t)&&!D.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return D.isNaN(e)?null:e},t}(),pn=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),cn.STRING=new ln,cn.NUMBER=new un,cn.BOOLEAN=new pn,t.ACTIVITY_DATA=Y,t.AUP_PLACE_CONFIG=Le,t.AbstractInputActivity=vt,t.AbstractInputComponent=bt,t.AbstractInteractionContext=tt,t.AbstractListInputComponent=Ct,t.AbstractPlaceNavigationComponent=Ke,t.AbstractPopStateNavigation=Se,t.AbstractValueInputComponent=It,t.Activity=Z,t.ActivityActionsComponent=X,t.ActivityContainerComponent=it,t.ActivityOutletComponent=nt,t.ActivityRef=et,t.AddItemInteractionContextComponent=ct,t.AlertDialogComponent=$,t.AngularUiPowerupsModule=Qe,t.BusyOverlayComponent=We,t.CELL_EDITOR_PORTAL=Gt,t.CELL_RENDERER_PORTAL=zt,t.CardContainerComponent=dt,t.CellEditorPortalRef=Qt,t.CellHeaderPortalRef=Zt,t.CellPortalRef=Yt,t.CellRendererPortalRef=$t,t.CheckboxInputComponent=xt,t.ColumnModel=ee,t.ColumnTemplateDirective=le,t.CommandDirective=H,t.ComponentCellRendererPortalRef=Jt,t.ComponentsModule=fe,t.ConfirmThenDialogComponent=J,t.ConfirmationDialogComponent=Q,t.ConsolidatedParameterMap=dn,t.CustomTemplateColumnModel=ae,t.CustomValueColumnModel=oe,t.DEFINITION_META_DATA_KEY="PLACE_DEFINITION_OPTIONS",t.DIALOG_INTERACTION_SERVICE_DEFAULTS=gt,t.DefaultCellRendererComponent=_t,t.DefaultHeaderCellRendererComponent=jt,t.DialogInteractionContext=mt,t.DialogInteractionContextFactory=yt,t.Dimension=rn,t.DirectivesModule=W,t.DisposableComponent=q,t.EditRowControls=Lt,t.EditSession=Nt,t.EditorControlColumnModel=re,t.EmptyStateComponent=Xe,t.EventCleanUpSession=Ie,t.FocusBinding=z,t.FocusBindingDirective=K,t.FocusBindingFactory=G,t.FocusContainerComponent=ft,t.FocusableComponent=ht,t.HEADER_CELL_RENDERER_PORTAL=qt,t.InPlaceInteractionContextComponent=st,t.InteractionContextTriggerFor=ut,t.InteractionModule=pt,t.InteractionService=t.ɵbz,t.InteractionServiceRoutingAdapter=ot,t.LEFT_RIGHT_PLACE_ANIMATION=ze,t.ListPlaceNavComponent=Ye,t.ListPropertyColumnModel=ie,t.ModalInteractionContextFactory=rt,t.MultipleSelectInputComponent=de,t.Navigating=Oe,t.NavigatingDuringInteraction=Pe,t.NavigationSession=Ce,t.NoopAuthGuard=hn,t.NoopComponent=Ot,t.NumberInputComponent=Rt,t.PORTAL_EDITOR_COMPONENT=Wt,t.PORTAL_RENDERER_COMPONENT=Kt,t.PasswordInputComponent=wt,t.Place=function(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new me(n,e.path,!!v.isNil(e.authenticate)||e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):h.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}},t.PlaceComponentDeactivationHandler=be,t.PlaceDefinition=me,t.PlaceGuard=gn,t.PlaceHistory=t.ɵcp,t.PlaceModule=Je,t.PlaceOutletComponent=Ge,t.PlaceRouter=Ne,t.Point=an,t.PopStateDuringInteractionNavigation=Me,t.PopStateNavigation=ke,t.PopupInteractionContextComponent=lt,t.PropertyColumnModel=ne,t.ROUTE_PARAMETER_LIST_KEY=ge,t.RemoveLastInteractionFromUrlNavigationSession=Re,t.ResizeAwareComponent=sn,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);b.Klass.get(i).addToOwnMetadataList(ge,r),yn(i,o,new h.MutableValueModel,"@RouteId",(function(t){return t.query().isNil()}))}},t.ScrollContainerComponent=Tt,t.SelectCellRendererComponent=Ut,t.SelectHeaderCellRendererComponent=Vt,t.SelectInputComponent=Pt,t.SelectionColumnModel=se,t.SidePlaceNavigationComponent=$e,t.StringInputActivity=St,t.StringInputComponent=Mt,t.SwitchCaseComponent=kt,t.SwitchCaseDefaultDirective=Ft,t.SwitchCaseOption=Dt,t.SwitchCaseWhenDirective=Et,t.SynchroniseInteractionContextIdsWithRoute=we,t.TabbedPlaceNavigationComponent=Ze,t.TableCellRendererComponent=Ht,t.TableComponent=ce,t.TableHeaderCellRendererComponent=ue,t.TableModel=Bt,t.TemplateCellRendererPortalRef=te,t.TextInputComponent=At,t.UrlService=_e,t.VerticalFocusContainerComponent=pe,t.Visit=je,t.VisitParameter=function(e){var n=b.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));b.Klass.get(i).addToOwnMetadataList(ge,r),yn(i,o,new h.MutableValueModel,"@VisitParameter",(function(t){return t.query().isNil()}))}},t.VisitParameterList=function(e){var n=b.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));b.Klass.get(i).addToOwnMetadataList(ge,r),yn(i,o,new h.MutableListModel,"@VisitParameterList",(function(t){return t.query().isEmpty()}))}},t.VisitSanitiser=mn,t.WaitUntilLeavingInteractionTransitionCancelled=xe,t.WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish=Ae,t.WaitUntilPopStateDuringCanDeactivateInteractionFinishes=Fe,t.leftRightPlaceAnimation=He,t.slideDownOnEnterAnimation=en,t.slideRightOnEnterAnimation=on,t.ɵ0=Xt,t.ɵa=W,t.ɵb=H,t.ɵba=pe,t.ɵbb=ht,t.ɵbc=dt,t.ɵbd=ce,t.ɵbe=Lt,t.ɵbf=le,t.ɵbg=_t,t.ɵbh=Ht,t.ɵbi=Ut,t.ɵbj=Vt,t.ɵbk=jt,t.ɵbl=ue,t.ɵbm=de,t.ɵbn=pt,t.ɵbo=it,t.ɵbp=tt,t.ɵbq=nt,t.ɵbr=Q,t.ɵbs=Y,t.ɵbt=Z,t.ɵbv=J,t.ɵbw=$,t.ɵby=st,t.ɵc=K,t.ɵca=rt,t.ɵcb=ct,t.ɵcc=X,t.ɵcd=lt,t.ɵce=ut,t.ɵcf=Je,t.ɵcg=Xe,t.ɵch=We,t.ɵci=Ge,t.ɵcj=He,t.ɵck=ze,t.ɵcl=Le,t.ɵcn=Ne,t.ɵco=_e,t.ɵcq=Ze,t.ɵcr=Ke,t.ɵcs=Ye,t.ɵct=$e,t.ɵd=q,t.ɵe=G,t.ɵf=fe,t.ɵg=bt,t.ɵh=It,t.ɵi=Ct,t.ɵj=vt,t.ɵk=Z,t.ɵl=Y,t.ɵm=Rt,t.ɵn=Mt,t.ɵo=St,t.ɵp=At,t.ɵq=wt,t.ɵr=Pt,t.ɵs=xt,t.ɵt=Tt,t.ɵu=Ot,t.ɵv=Dt,t.ɵw=Et,t.ɵx=Ft,t.ɵy=kt,t.ɵz=ft,Object.defineProperty(t,"__esModule",{value:!0})}));
17
17
  //# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map