{"version":3,"file":"vendors-319a6989.47e839c4edc29ae0ca22.bundle.js","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACzaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACvzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACnXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC7jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://client-app/./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js","webpack://client-app/./node_modules/aurelia-dependency-injection/dist/native-modules/aurelia-dependency-injection.js","webpack://client-app/./node_modules/aurelia-dialog/dist/native-modules/aurelia-dialog.js","webpack://client-app/./node_modules/aurelia-dialog/dist/native-modules/chunk.js","webpack://client-app/./node_modules/aurelia-event-aggregator/dist/native-modules/aurelia-event-aggregator.js","webpack://client-app/./node_modules/aurelia-fetch-client/dist/native-modules/aurelia-fetch-client.js","webpack://client-app/./node_modules/aurelia-framework/dist/native-modules/aurelia-framework.js","webpack://client-app/./node_modules/aurelia-history-browser/dist/native-modules/aurelia-history-browser.js","webpack://client-app/./node_modules/aurelia-history/dist/native-modules/aurelia-history.js","webpack://client-app/./node_modules/aurelia-http-client/dist/native-modules/aurelia-http-client.js","webpack://client-app/./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js","webpack://client-app/./node_modules/aurelia-loader/dist/native-modules/aurelia-loader.js","webpack://client-app/./node_modules/aurelia-logging-console/dist/native-modules/aurelia-logging-console.js","webpack://client-app/./node_modules/aurelia-logging/dist/native-modules/aurelia-logging.js","webpack://client-app/./node_modules/aurelia-metadata/dist/native-modules/aurelia-metadata.js","webpack://client-app/./node_modules/aurelia-pal-browser/dist/native-modules/aurelia-pal-browser.js","webpack://client-app/./node_modules/aurelia-pal/dist/native-modules/aurelia-pal.js","webpack://client-app/./node_modules/aurelia-path/dist/native-modules/aurelia-path.js"],"sourcesContent":["import 'aurelia-polyfills';\nimport { PLATFORM, isInitialized } from 'aurelia-pal';\n\nvar bootstrapPromises = [];\r\nvar startResolve;\r\nvar startPromise = new Promise(function (resolve) { return startResolve = resolve; });\r\nvar host = PLATFORM.global;\r\nvar isNodeLike = typeof process !== 'undefined' && !process.browser && process.version;\r\nfunction ready() {\r\n if (!host.document || host.document.readyState === 'complete') {\r\n return Promise.resolve();\r\n }\r\n return new Promise(function (resolve) {\r\n host.document.addEventListener('DOMContentLoaded', completed);\r\n host.addEventListener('load', completed);\r\n function completed() {\r\n host.document.removeEventListener('DOMContentLoaded', completed);\r\n host.removeEventListener('load', completed);\r\n resolve();\r\n }\r\n });\r\n}\r\nfunction createLoader() {\r\n if (PLATFORM.Loader) {\r\n return Promise.resolve(new PLATFORM.Loader());\r\n }\r\n if (typeof AURELIA_WEBPACK_2_0 === 'undefined') {\r\n if (typeof __webpack_require__ !== 'undefined') {\r\n var m = __webpack_require__(require.resolve('aurelia-loader-webpack'));\r\n return Promise.resolve(new m.WebpackLoader());\r\n }\r\n if (host.System && typeof host.System.config === 'function') {\r\n return host.System.normalize('aurelia-bootstrapper').then(function (bsn) {\r\n return host.System.normalize('aurelia-loader-default', bsn);\r\n }).then(function (loaderName) {\r\n return host.System.import(loaderName).then(function (m) { return new m.DefaultLoader(); });\r\n });\r\n }\r\n if (typeof host.require === 'function' && typeof host.define === 'function' && typeof host.define.amd === 'object') {\r\n return new Promise(function (resolve, reject) { return host.require(['aurelia-loader-default'], function (m) { return resolve(new m.DefaultLoader()); }, reject); });\r\n }\r\n if (isNodeLike && typeof module !== 'undefined' && typeof module.require !== 'undefined') {\r\n var m = module.require('aurelia-loader-nodejs');\r\n return Promise.resolve(new m.NodeJsLoader());\r\n }\r\n }\r\n return Promise.reject('No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally available to load your app.');\r\n}\r\nfunction initializePal(loader) {\r\n if (isInitialized)\r\n return Promise.resolve();\r\n var type;\r\n var isRenderer = isNodeLike && (process.type === 'renderer' || process.versions['node-webkit']);\r\n if (isNodeLike && !isRenderer) {\r\n type = 'nodejs';\r\n }\r\n else if (typeof window !== 'undefined') {\r\n type = 'browser';\r\n }\r\n else if (typeof self !== 'undefined') {\r\n type = 'worker';\r\n }\r\n else {\r\n throw new Error('Could not determine platform implementation to load.');\r\n }\r\n return loader.loadModule('aurelia-pal-' + type)\r\n .then(function (palModule) { return type === 'nodejs' && !isInitialized && palModule.globalize() || palModule.initialize(); });\r\n}\r\nfunction preparePlatform(loader) {\r\n var map = function (moduleId, relativeTo) {\r\n return loader.normalize(moduleId, relativeTo)\r\n .then(function (normalized) {\r\n loader.map(moduleId, normalized);\r\n return normalized;\r\n });\r\n };\r\n return initializePal(loader)\r\n .then(function () { return loader.normalize('aurelia-bootstrapper'); })\r\n .then(function (bootstrapperName) {\r\n var frameworkPromise = map(PLATFORM.moduleName('aurelia-framework', { exports: ['Aurelia'] }), bootstrapperName);\r\n return Promise.all([\r\n frameworkPromise,\r\n frameworkPromise.then(function (frameworkName) { return map('aurelia-dependency-injection', frameworkName); }),\r\n map('aurelia-router', bootstrapperName),\r\n map('aurelia-logging-console', bootstrapperName)\r\n ]);\r\n })\r\n .then(function (_a) {\r\n var frameworkName = _a[0];\r\n return loader.loadModule(frameworkName);\r\n })\r\n .then(function (fx) { return startResolve(function () { return new fx.Aurelia(loader); }); });\r\n}\r\nfunction config(appHost, configModuleId, aurelia) {\r\n aurelia.host = appHost;\r\n aurelia.configModuleId = configModuleId || null;\r\n if (configModuleId) {\r\n return aurelia.loader\r\n .loadModule(configModuleId)\r\n .then(function (customConfig) {\r\n if (!customConfig.configure) {\r\n throw new Error(\"Cannot initialize module '\".concat(configModuleId, \"' without a configure function.\"));\r\n }\r\n return customConfig.configure(aurelia);\r\n });\r\n }\r\n aurelia.use\r\n .standardConfiguration()\r\n .developmentLogging();\r\n return aurelia.start().then(function () { return aurelia.setRoot(); });\r\n}\r\nfunction run() {\r\n return ready()\r\n .then(createLoader)\r\n .then(preparePlatform)\r\n .then(function () {\r\n var appHosts = host.document.querySelectorAll('[aurelia-app],[data-aurelia-app]');\r\n for (var i = 0, ii = appHosts.length; i < ii; ++i) {\r\n var appHost = appHosts[i];\r\n var mainModuleId = appHost.getAttribute('aurelia-app') || appHost.getAttribute('data-aurelia-app');\r\n bootstrap(config.bind(null, appHost, mainModuleId));\r\n }\r\n var toConsole = console.error.bind(console);\r\n var bootstraps = bootstrapPromises.map(function (p) { return p.catch(toConsole); });\r\n bootstrapPromises = null;\r\n return Promise.all(bootstraps);\r\n });\r\n}\r\nfunction bootstrap(configure) {\r\n var p = startPromise.then(function (factory) { return configure(factory()); });\r\n if (bootstrapPromises)\r\n bootstrapPromises.push(p);\r\n return p;\r\n}\r\nvar starting = run();\n\nexport { bootstrap, starting };\n//# sourceMappingURL=aurelia-bootstrapper.js.map\n","import { metadata, protocol } from 'aurelia-metadata';\nimport { AggregateError } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\n\nfunction isInjectable(potentialTarget) {\r\n return !!potentialTarget;\r\n}\r\nfunction autoinject(potentialTarget) {\r\n var deco = function (target) {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (metadata.getOwn(metadata.paramTypes, target) ||\r\n _emptyParameters).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget);\r\n }\r\n return deco;\r\n}\r\nfunction inject() {\r\n var rest = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n rest[_i] = arguments[_i];\r\n }\r\n return function (target, _key, descriptor) {\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n if (descriptor) {\r\n var fn = descriptor.value;\r\n fn.inject = rest;\r\n }\r\n else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\n\nvar resolver = protocol.create('aurelia:resolver', function (target) {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n return true;\r\n});\r\nvar Strategy;\r\n(function (Strategy) {\r\n Strategy[Strategy[\"instance\"] = 0] = \"instance\";\r\n Strategy[Strategy[\"singleton\"] = 1] = \"singleton\";\r\n Strategy[Strategy[\"transient\"] = 2] = \"transient\";\r\n Strategy[Strategy[\"function\"] = 3] = \"function\";\r\n Strategy[Strategy[\"array\"] = 4] = \"array\";\r\n Strategy[Strategy[\"alias\"] = 5] = \"alias\";\r\n})(Strategy || (Strategy = {}));\r\nfunction isStrategy(actual, expected, state) {\r\n return actual === expected;\r\n}\r\nvar StrategyResolver = (function () {\r\n function StrategyResolver(strategy, state) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n StrategyResolver.prototype.get = function (container, key) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n var singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return this.state[0].get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state);\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n };\r\n StrategyResolver = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Number, Object])\r\n ], StrategyResolver);\r\n return StrategyResolver;\r\n}());\r\nvar Lazy = (function () {\r\n function Lazy(key) {\r\n this._key = key;\r\n }\r\n Lazy_1 = Lazy;\r\n Lazy.prototype.get = function (container) {\r\n var _this = this;\r\n return function () { return container.get(_this._key); };\r\n };\r\n Lazy.of = function (key) {\r\n return new Lazy_1(key);\r\n };\r\n var Lazy_1;\r\n Lazy = Lazy_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Lazy);\r\n return Lazy;\r\n}());\r\nvar All = (function () {\r\n function All(key) {\r\n this._key = key;\r\n }\r\n All_1 = All;\r\n All.prototype.get = function (container) {\r\n return container.getAll(this._key);\r\n };\r\n All.of = function (key) {\r\n return new All_1(key);\r\n };\r\n var All_1;\r\n All = All_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], All);\r\n return All;\r\n}());\r\nvar Optional = (function () {\r\n function Optional(key, checkParent) {\r\n if (checkParent === void 0) { checkParent = true; }\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n Optional_1 = Optional;\r\n Optional.prototype.get = function (container) {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n return null;\r\n };\r\n Optional.of = function (key, checkParent) {\r\n if (checkParent === void 0) { checkParent = true; }\r\n return new Optional_1(key, checkParent);\r\n };\r\n var Optional_1;\r\n Optional = Optional_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object, Boolean])\r\n ], Optional);\r\n return Optional;\r\n}());\r\nvar Parent = (function () {\r\n function Parent(key) {\r\n this._key = key;\r\n }\r\n Parent_1 = Parent;\r\n Parent.prototype.get = function (container) {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n };\r\n Parent.of = function (key) {\r\n return new Parent_1(key);\r\n };\r\n var Parent_1;\r\n Parent = Parent_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Parent);\r\n return Parent;\r\n}());\r\nvar Factory = (function () {\r\n function Factory(key) {\r\n this._key = key;\r\n }\r\n Factory_1 = Factory;\r\n Factory.prototype.get = function (container) {\r\n var fn = this._key;\r\n var resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n return function () {\r\n var rest = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n rest[_i] = arguments[_i];\r\n }\r\n return container.invoke(fn, rest);\r\n };\r\n };\r\n Factory.of = function (key) {\r\n return new Factory_1(key);\r\n };\r\n var Factory_1;\r\n Factory = Factory_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Factory);\r\n return Factory;\r\n}());\r\nvar NewInstance = (function () {\r\n function NewInstance(key) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n NewInstance_1 = NewInstance;\r\n NewInstance.prototype.get = function (container) {\r\n var dynamicDependencies = this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(function (dependency) {\r\n return dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency);\r\n })\r\n : undefined;\r\n var fn = this.key;\r\n var resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n var instance = container.invoke(fn, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n };\r\n NewInstance.prototype.as = function (key) {\r\n this.asKey = key;\r\n return this;\r\n };\r\n NewInstance.of = function (key) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n return new (NewInstance_1.bind.apply(NewInstance_1, [void 0, key].concat(dynamicDependencies)))();\r\n };\r\n var NewInstance_1;\r\n NewInstance = NewInstance_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object, Object])\r\n ], NewInstance);\r\n return NewInstance;\r\n}());\r\nfunction getDecoratorDependencies(target) {\r\n autoinject(target);\r\n return target.inject;\r\n}\r\nfunction lazy(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Lazy.of(keyValue);\r\n };\r\n}\r\nfunction all(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = All.of(keyValue);\r\n };\r\n}\r\nfunction optional(checkParentOrTarget) {\r\n if (checkParentOrTarget === void 0) { checkParentOrTarget = true; }\r\n var deco = function (checkParent) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Optional.of(inject$$1[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\nfunction parent(target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Parent.of(inject$$1[index]);\r\n}\r\nfunction factory(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Factory.of(keyValue);\r\n };\r\n}\r\nfunction newInstance(asKeyOrTarget) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n var deco = function (asKey) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = NewInstance.of.apply(NewInstance, [inject$$1[index]].concat(dynamicDependencies));\r\n if (!!asKey) {\r\n inject$$1[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\n\nfunction validateKey(key) {\r\n if (key === null || key === undefined) {\r\n throw new Error('key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n }\r\n}\r\nvar _emptyParameters = Object.freeze([]);\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\nvar resolverDecorates = resolver.decorates;\r\nvar InvocationHandler = (function () {\r\n function InvocationHandler(fn, invoker, dependencies) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n InvocationHandler.prototype.invoke = function (container, dynamicDependencies) {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(container, this.fn, this.dependencies, dynamicDependencies)\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n };\r\n return InvocationHandler;\r\n}());\r\nfunction invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {\r\n var i = staticDependencies.length;\r\n var args = new Array(i);\r\n var lookup;\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error('Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n }\r\n else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n return Reflect.construct(fn, args);\r\n}\r\nvar classInvoker = {\r\n invoke: function (container, Type, deps) {\r\n var instances = deps.map(function (dep) { return container.get(dep); });\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies: invokeWithDynamicDependencies\r\n};\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n return f.inject;\r\n}\r\nvar Container = (function () {\r\n function Container(configuration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n Container.prototype.makeGlobal = function () {\r\n Container.instance = this;\r\n return this;\r\n };\r\n Container.prototype.setHandlerCreatedCallback = function (onHandlerCreated) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n };\r\n Container.prototype.registerInstance = function (key, instance) {\r\n return this.registerResolver(key, new StrategyResolver(0, instance === undefined ? key : instance));\r\n };\r\n Container.prototype.registerSingleton = function (key, fn) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn === undefined ? key : fn));\r\n };\r\n Container.prototype.registerTransient = function (key, fn) {\r\n return this.registerResolver(key, new StrategyResolver(2, fn === undefined ? key : fn));\r\n };\r\n Container.prototype.registerHandler = function (key, handler) {\r\n return this.registerResolver(key, new StrategyResolver(3, handler));\r\n };\r\n Container.prototype.registerAlias = function (originalKey, aliasKey) {\r\n return this.registerResolver(aliasKey, new StrategyResolver(5, originalKey));\r\n };\r\n Container.prototype.registerResolver = function (key, resolver$$1) {\r\n validateKey(key);\r\n var allResolvers = this._resolvers;\r\n var result = allResolvers.get(key);\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver$$1);\r\n }\r\n else if (result.strategy === 4) {\r\n result.state.push(resolver$$1);\r\n }\r\n else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver$$1]));\r\n }\r\n return resolver$$1;\r\n };\r\n Container.prototype.autoRegister = function (key, fn) {\r\n fn = fn === undefined ? key : fn;\r\n if (typeof fn === 'function') {\r\n var registration = metadata.get(metadata.registration, fn);\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n };\r\n Container.prototype.autoRegisterAll = function (fns) {\r\n var i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n };\r\n Container.prototype.unregister = function (key) {\r\n this._resolvers.delete(key);\r\n };\r\n Container.prototype.hasResolver = function (key, checkParent) {\r\n if (checkParent === void 0) { checkParent = false; }\r\n validateKey(key);\r\n return (this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent)));\r\n };\r\n Container.prototype.getResolver = function (key) {\r\n return this._resolvers.get(key);\r\n };\r\n Container.prototype.get = function (key) {\r\n validateKey(key);\r\n if (key === Container) {\r\n return this;\r\n }\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n var registration = metadata.get(metadata.registration, key);\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n return registration.registerResolver(this, key, key).get(this, key);\r\n }\r\n return resolver$$1.get(this, key);\r\n };\r\n Container.prototype._get = function (key) {\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n return this.parent._get(key);\r\n }\r\n return resolver$$1.get(this, key);\r\n };\r\n Container.prototype.getAll = function (key) {\r\n validateKey(key);\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n return this.parent.getAll(key);\r\n }\r\n if (resolver$$1.strategy === 4) {\r\n var state = resolver$$1.state;\r\n var i = state.length;\r\n var results = new Array(i);\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n return results;\r\n }\r\n return [resolver$$1.get(this, key)];\r\n };\r\n Container.prototype.createChild = function () {\r\n var child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n };\r\n Container.prototype.invoke = function (fn, dynamicDependencies) {\r\n try {\r\n var handler = this._handlers.get(fn);\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n return handler.invoke(this, dynamicDependencies);\r\n }\r\n catch (e) {\r\n throw new AggregateError(\"Error invoking \" + fn.name + \". Check the inner error for details.\", e, true);\r\n }\r\n };\r\n Container.prototype._createInvocationHandler = function (fn) {\r\n var dependencies;\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n }\r\n else {\r\n dependencies = [];\r\n var ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push.apply(dependencies, getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n var invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n var handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n };\r\n return Container;\r\n}());\n\nfunction invoker(value) {\r\n return function (target) {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\nfunction invokeAsFactory(potentialTarget) {\r\n var deco = function (target) {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\nvar FactoryInvoker = (function () {\r\n function FactoryInvoker() {\r\n }\r\n FactoryInvoker.prototype.invoke = function (container, fn, dependencies) {\r\n var i = dependencies.length;\r\n var args = new Array(i);\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n return fn.apply(undefined, args);\r\n };\r\n FactoryInvoker.prototype.invokeWithDynamicDependencies = function (container, fn, staticDependencies, dynamicDependencies) {\r\n var i = staticDependencies.length;\r\n var args = new Array(i);\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n return fn.apply(undefined, args);\r\n };\r\n return FactoryInvoker;\r\n}());\r\nFactoryInvoker.instance = new FactoryInvoker();\n\nfunction registration(value) {\r\n return function (target) {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\nfunction transient(key) {\r\n return registration(new TransientRegistration(key));\r\n}\r\nfunction singleton(keyOrRegisterInChild, registerInChild) {\r\n if (registerInChild === void 0) { registerInChild = false; }\r\n return registration(new SingletonRegistration(keyOrRegisterInChild, registerInChild));\r\n}\r\nvar TransientRegistration = (function () {\r\n function TransientRegistration(key) {\r\n this._key = key;\r\n }\r\n TransientRegistration.prototype.registerResolver = function (container, key, fn) {\r\n var existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient((this._key || key), fn)\r\n : existingResolver;\r\n };\r\n return TransientRegistration;\r\n}());\r\nvar SingletonRegistration = (function () {\r\n function SingletonRegistration(keyOrRegisterInChild, registerInChild) {\r\n if (registerInChild === void 0) { registerInChild = false; }\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n }\r\n else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n SingletonRegistration.prototype.registerResolver = function (container, key, fn) {\r\n var targetContainer = this._registerInChild ? container : container.root;\r\n var existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n };\r\n return SingletonRegistration;\r\n}());\n\nexport { _emptyParameters, InvocationHandler, Container, autoinject, inject, invoker, invokeAsFactory, FactoryInvoker, registration, transient, singleton, TransientRegistration, SingletonRegistration, resolver, Strategy, StrategyResolver, Lazy, All, Optional, Parent, Factory, NewInstance, getDecoratorDependencies, lazy, all, optional, parent, factory, newInstance };\n","import { a as Renderer, b as createDialogCancelError, c as invokeLifecycle, d as DialogController } from './chunk.js';\nexport { d as DialogController, a as Renderer, b as createDialogCancelError, e as createDialogCloseError } from './chunk.js';\nimport { DOM } from 'aurelia-pal';\nimport { Container } from 'aurelia-dependency-injection';\nimport { ViewSlot, CompositionEngine } from 'aurelia-templating';\n\nvar DefaultDialogSettings = (function () {\r\n function DefaultDialogSettings() {\r\n this.lock = true;\r\n this.startingZIndex = 1000;\r\n this.centerHorizontalOnly = false;\r\n this.rejectOnCancel = false;\r\n this.ignoreTransitions = false;\r\n this.restoreFocus = function (lastActiveElement) { return lastActiveElement.focus(); };\r\n }\r\n return DefaultDialogSettings;\r\n}());\n\nvar RENDERRERS = {\r\n ux: function () { return import('./ux-dialog-renderer.js').then(function (m) { return m.DialogRenderer; }); },\r\n native: function () { return import('./native-dialog-renderer.js').then(function (m) { return m.NativeDialogRenderer; }); }\r\n};\r\nvar DEFAULT_RESOURCES = {\r\n 'ux-dialog': function () { return import('./ux-dialog.js').then(function (m) { return m.UxDialog; }); },\r\n 'ux-dialog-header': function () { return import('./ux-dialog-header.js').then(function (m) { return m.UxDialogHeader; }); },\r\n 'ux-dialog-body': function () { return import('./ux-dialog-body.js').then(function (m) { return m.UxDialogBody; }); },\r\n 'ux-dialog-footer': function () { return import('./ux-dialog-footer.js').then(function (m) { return m.UxDialogFooter; }); },\r\n 'attach-focus': function () { return import('./attach-focus.js').then(function (m) { return m.AttachFocus; }); }\r\n};\r\nvar DEFAULT_CSS_TEXT = function () { return import('./default-styles.js').then(function (cssM) { return cssM['default']; }); };\r\nvar DialogConfiguration = (function () {\r\n function DialogConfiguration(frameworkConfiguration, applySetter) {\r\n var _this = this;\r\n this.renderer = 'ux';\r\n this.cssText = DEFAULT_CSS_TEXT;\r\n this.resources = [];\r\n this.fwConfig = frameworkConfiguration;\r\n this.settings = frameworkConfiguration.container.get(DefaultDialogSettings);\r\n applySetter(function () { return _this._apply(); });\r\n }\r\n DialogConfiguration.prototype._apply = function () {\r\n var _this = this;\r\n var renderer = this.renderer;\r\n var cssText = this.cssText;\r\n return Promise\r\n .all([\r\n typeof renderer === 'string' ? RENDERRERS[renderer]() : renderer,\r\n cssText\r\n ? typeof cssText === 'string'\r\n ? cssText\r\n : cssText()\r\n : ''\r\n ])\r\n .then(function (_a) {\r\n var rendererImpl = _a[0], $cssText = _a[1];\r\n var fwConfig = _this.fwConfig;\r\n fwConfig.transient(Renderer, rendererImpl);\r\n if ($cssText) {\r\n DOM.injectStyles($cssText);\r\n }\r\n return Promise\r\n .all(_this.resources.map(function (name) { return DEFAULT_RESOURCES[name](); }))\r\n .then(function (modules) {\r\n fwConfig.globalResources(modules);\r\n });\r\n });\r\n };\r\n DialogConfiguration.prototype.useDefaults = function () {\r\n return this\r\n .useRenderer('ux')\r\n .useCSS(DEFAULT_CSS_TEXT)\r\n .useStandardResources();\r\n };\r\n DialogConfiguration.prototype.useStandardResources = function () {\r\n Object.keys(DEFAULT_RESOURCES).forEach(this.useResource, this);\r\n return this;\r\n };\r\n DialogConfiguration.prototype.useResource = function (resourceName) {\r\n this.resources.push(resourceName);\r\n return this;\r\n };\r\n DialogConfiguration.prototype.useRenderer = function (renderer, settings) {\r\n this.renderer = renderer;\r\n if (settings) {\r\n Object.assign(this.settings, settings);\r\n }\r\n return this;\r\n };\r\n DialogConfiguration.prototype.useCSS = function (cssText) {\r\n this.cssText = cssText;\r\n return this;\r\n };\r\n return DialogConfiguration;\r\n}());\n\nfunction whenClosed(onfulfilled, onrejected) {\r\n return this.then(function (r) { return r.wasCancelled ? r : r.closeResult; }).then(onfulfilled, onrejected);\r\n}\r\nfunction asDialogOpenPromise(promise) {\r\n promise.whenClosed = whenClosed;\r\n return promise;\r\n}\r\nvar DialogService = (function () {\r\n function DialogService(container, compositionEngine, defaultSettings) {\r\n this.controllers = [];\r\n this.hasOpenDialog = false;\r\n this.hasActiveDialog = false;\r\n this.container = container;\r\n this.compositionEngine = compositionEngine;\r\n this.defaultSettings = defaultSettings;\r\n }\r\n DialogService.prototype.validateSettings = function (settings) {\r\n if (!settings.viewModel && !settings.view) {\r\n throw new Error('Invalid Dialog Settings. You must provide \"viewModel\", \"view\" or both.');\r\n }\r\n };\r\n DialogService.prototype.createCompositionContext = function (childContainer, host, settings) {\r\n return {\r\n container: childContainer.parent,\r\n childContainer: childContainer,\r\n bindingContext: null,\r\n viewResources: null,\r\n model: settings.model,\r\n view: settings.view,\r\n viewModel: settings.viewModel,\r\n viewSlot: new ViewSlot(host, true),\r\n host: host\r\n };\r\n };\r\n DialogService.prototype.ensureViewModel = function (compositionContext) {\r\n if (typeof compositionContext.viewModel === 'object') {\r\n return Promise.resolve(compositionContext);\r\n }\r\n return this.compositionEngine.ensureViewModel(compositionContext);\r\n };\r\n DialogService.prototype._cancelOperation = function (rejectOnCancel) {\r\n if (!rejectOnCancel) {\r\n return { wasCancelled: true };\r\n }\r\n throw createDialogCancelError();\r\n };\r\n DialogService.prototype.composeAndShowDialog = function (compositionContext, dialogController) {\r\n var _this = this;\r\n if (!compositionContext.viewModel) {\r\n compositionContext.bindingContext = { controller: dialogController };\r\n }\r\n return this.compositionEngine\r\n .compose(compositionContext)\r\n .then(function (controller) {\r\n dialogController.controller = controller;\r\n return dialogController.renderer\r\n .showDialog(dialogController)\r\n .then(function () {\r\n _this.controllers.push(dialogController);\r\n _this.hasActiveDialog = _this.hasOpenDialog = !!_this.controllers.length;\r\n }, function (reason) {\r\n if (controller.viewModel) {\r\n invokeLifecycle(controller.viewModel, 'deactivate');\r\n }\r\n return Promise.reject(reason);\r\n });\r\n });\r\n };\r\n DialogService.prototype.createSettings = function (settings) {\r\n settings = Object.assign({}, this.defaultSettings, settings);\r\n if (typeof settings.keyboard !== 'boolean' && !settings.keyboard) {\r\n settings.keyboard = !settings.lock;\r\n }\r\n if (typeof settings.overlayDismiss !== 'boolean') {\r\n settings.overlayDismiss = !settings.lock;\r\n }\r\n Object.defineProperty(settings, 'rejectOnCancel', {\r\n writable: false,\r\n configurable: true,\r\n enumerable: true\r\n });\r\n this.validateSettings(settings);\r\n return settings;\r\n };\r\n DialogService.prototype.open = function (settings) {\r\n var _this = this;\r\n if (settings === void 0) { settings = {}; }\r\n settings = this.createSettings(settings);\r\n var childContainer = settings.childContainer || this.container.createChild();\r\n var resolveCloseResult;\r\n var rejectCloseResult;\r\n var closeResult = new Promise(function (resolve, reject) {\r\n resolveCloseResult = resolve;\r\n rejectCloseResult = reject;\r\n });\r\n var dialogController = childContainer.invoke(DialogController, [settings, resolveCloseResult, rejectCloseResult]);\r\n childContainer.registerInstance(DialogController, dialogController);\r\n closeResult.then(function () {\r\n removeController(_this, dialogController);\r\n }, function () {\r\n removeController(_this, dialogController);\r\n });\r\n var compositionContext = this.createCompositionContext(childContainer, dialogController.renderer.getDialogContainer(), dialogController.settings);\r\n var openResult = this.ensureViewModel(compositionContext).then(function (compositionContext) {\r\n if (!compositionContext.viewModel) {\r\n return true;\r\n }\r\n return invokeLifecycle(compositionContext.viewModel, 'canActivate', dialogController.settings.model);\r\n }).then(function (canActivate) {\r\n if (!canActivate) {\r\n return _this._cancelOperation(dialogController.settings.rejectOnCancel);\r\n }\r\n return _this.composeAndShowDialog(compositionContext, dialogController)\r\n .then(function () { return ({ controller: dialogController, closeResult: closeResult, wasCancelled: false }); });\r\n });\r\n return asDialogOpenPromise(openResult);\r\n };\r\n DialogService.prototype.closeAll = function () {\r\n return Promise.all(this.controllers.slice(0).map(function (controller) {\r\n if (!controller.settings.rejectOnCancel) {\r\n return controller.cancel().then(function (result) {\r\n if (result.wasCancelled) {\r\n return controller;\r\n }\r\n return null;\r\n });\r\n }\r\n return controller.cancel().then(function () { return null; }).catch(function (reason) {\r\n if (reason.wasCancelled) {\r\n return controller;\r\n }\r\n throw reason;\r\n });\r\n })).then(function (unclosedControllers) { return unclosedControllers.filter(function (unclosed) { return !!unclosed; }); });\r\n };\r\n DialogService.inject = [Container, CompositionEngine, DefaultDialogSettings];\r\n return DialogService;\r\n}());\r\nfunction removeController(service, dialogController) {\r\n var i = service.controllers.indexOf(dialogController);\r\n if (i !== -1) {\r\n service.controllers.splice(i, 1);\r\n service.hasActiveDialog = service.hasOpenDialog = !!service.controllers.length;\r\n }\r\n}\n\nfunction configure(frameworkConfig, callback) {\r\n var applyConfig = null;\r\n var config = new DialogConfiguration(frameworkConfig, function (apply) { applyConfig = apply; });\r\n if (typeof callback === 'function') {\r\n callback(config);\r\n }\r\n else {\r\n config.useDefaults();\r\n }\r\n return applyConfig();\r\n}\n\nexport { DefaultDialogSettings, DialogConfiguration, DialogService, configure };\n//# sourceMappingURL=aurelia-dialog.js.map\n","var Renderer = (function () {\r\n function Renderer() {\r\n }\r\n Renderer.prototype.getDialogContainer = function () {\r\n throw new Error('DialogRenderer must implement getDialogContainer().');\r\n };\r\n Renderer.prototype.showDialog = function (dialogController) {\r\n throw new Error('DialogRenderer must implement showDialog().');\r\n };\r\n Renderer.prototype.hideDialog = function (dialogController) {\r\n throw new Error('DialogRenderer must implement hideDialog().');\r\n };\r\n return Renderer;\r\n}());\n\nfunction createDialogCancelError(output) {\r\n var error = new Error('Operation cancelled.');\r\n error.wasCancelled = true;\r\n error.output = output;\r\n return error;\r\n}\n\nfunction createDialogCloseError(output) {\r\n var error = new Error();\r\n error.wasCancelled = false;\r\n error.output = output;\r\n return error;\r\n}\n\nfunction invokeLifecycle(instance, name, model) {\r\n if (typeof instance[name] === 'function') {\r\n return new Promise(function (resolve) {\r\n resolve(instance[name](model));\r\n }).then(function (result) {\r\n if (result !== null && result !== undefined) {\r\n return result;\r\n }\r\n return true;\r\n });\r\n }\r\n return Promise.resolve(true);\r\n}\n\nvar DialogController = (function () {\r\n function DialogController(renderer, settings, resolve, reject) {\r\n this.resolve = resolve;\r\n this.reject = reject;\r\n this.settings = settings;\r\n this.renderer = renderer;\r\n }\r\n DialogController.prototype.releaseResources = function (result) {\r\n var _this = this;\r\n return invokeLifecycle(this.controller.viewModel || {}, 'deactivate', result)\r\n .then(function () { return _this.renderer.hideDialog(_this); })\r\n .then(function () {\r\n _this.controller.unbind();\r\n });\r\n };\r\n DialogController.prototype.cancelOperation = function () {\r\n if (!this.settings.rejectOnCancel) {\r\n return { wasCancelled: true };\r\n }\r\n throw createDialogCancelError();\r\n };\r\n DialogController.prototype.ok = function (output) {\r\n return this.close(true, output);\r\n };\r\n DialogController.prototype.cancel = function (output) {\r\n return this.close(false, output);\r\n };\r\n DialogController.prototype.error = function (output) {\r\n var _this = this;\r\n var closeError = createDialogCloseError(output);\r\n return this.releaseResources(closeError).then(function () { _this.reject(closeError); });\r\n };\r\n DialogController.prototype.close = function (ok, output) {\r\n var _this = this;\r\n if (this.closePromise) {\r\n return this.closePromise;\r\n }\r\n var dialogResult = { wasCancelled: !ok, output: output };\r\n return this.closePromise = invokeLifecycle(this.controller.viewModel || {}, 'canDeactivate', dialogResult)\r\n .catch(function (reason) {\r\n _this.closePromise = undefined;\r\n return Promise.reject(reason);\r\n }).then(function (canDeactivate) {\r\n if (!canDeactivate) {\r\n _this.closePromise = undefined;\r\n return _this.cancelOperation();\r\n }\r\n return _this.releaseResources(dialogResult).then(function () {\r\n if (!_this.settings.rejectOnCancel || ok) {\r\n _this.resolve(dialogResult);\r\n }\r\n else {\r\n _this.reject(createDialogCancelError(output));\r\n }\r\n return { wasCancelled: false };\r\n }).catch(function (reason) {\r\n _this.closePromise = undefined;\r\n return Promise.reject(reason);\r\n });\r\n });\r\n };\r\n DialogController.inject = [Renderer];\r\n return DialogController;\r\n}());\n\nexport { Renderer as a, createDialogCancelError as b, invokeLifecycle as c, DialogController as d, createDialogCloseError as e };\n//# sourceMappingURL=chunk.js.map\n","\n\nimport * as LogManager from 'aurelia-logging';\n\nvar logger = LogManager.getLogger('event-aggregator');\n\nvar Handler = function () {\n function Handler(messageType, callback) {\n \n\n this.messageType = messageType;\n this.callback = callback;\n }\n\n Handler.prototype.handle = function handle(message) {\n if (message instanceof this.messageType) {\n this.callback.call(null, message);\n }\n };\n\n return Handler;\n}();\n\nfunction invokeCallback(callback, data, event) {\n try {\n callback(data, event);\n } catch (e) {\n logger.error(e);\n }\n}\n\nfunction invokeHandler(handler, data) {\n try {\n handler.handle(data);\n } catch (e) {\n logger.error(e);\n }\n}\n\nexport var EventAggregator = function () {\n function EventAggregator() {\n \n\n this.eventLookup = {};\n this.messageHandlers = [];\n }\n\n EventAggregator.prototype.publish = function publish(event, data) {\n var subscribers = void 0;\n var i = void 0;\n\n if (!event) {\n throw new Error('Event was invalid.');\n }\n\n if (typeof event === 'string') {\n subscribers = this.eventLookup[event];\n if (subscribers) {\n subscribers = subscribers.slice();\n i = subscribers.length;\n\n while (i--) {\n invokeCallback(subscribers[i], data, event);\n }\n }\n } else {\n subscribers = this.messageHandlers.slice();\n i = subscribers.length;\n\n while (i--) {\n invokeHandler(subscribers[i], event);\n }\n }\n };\n\n EventAggregator.prototype.subscribe = function subscribe(event, callback) {\n var handler = void 0;\n var subscribers = void 0;\n\n if (!event) {\n throw new Error('Event channel/type was invalid.');\n }\n\n if (typeof event === 'string') {\n handler = callback;\n subscribers = this.eventLookup[event] || (this.eventLookup[event] = []);\n } else {\n handler = new Handler(event, callback);\n subscribers = this.messageHandlers;\n }\n\n subscribers.push(handler);\n\n return {\n dispose: function dispose() {\n var idx = subscribers.indexOf(handler);\n if (idx !== -1) {\n subscribers.splice(idx, 1);\n }\n }\n };\n };\n\n EventAggregator.prototype.subscribeOnce = function subscribeOnce(event, callback) {\n var sub = this.subscribe(event, function (a, b) {\n sub.dispose();\n return callback(a, b);\n });\n\n return sub;\n };\n\n return EventAggregator;\n}();\n\nexport function includeEventsIn(obj) {\n var ea = new EventAggregator();\n\n obj.subscribeOnce = function (event, callback) {\n return ea.subscribeOnce(event, callback);\n };\n\n obj.subscribe = function (event, callback) {\n return ea.subscribe(event, callback);\n };\n\n obj.publish = function (event, data) {\n ea.publish(event, data);\n };\n\n return ea;\n}\n\nexport function configure(config) {\n config.instance(EventAggregator, includeEventsIn(config.aurelia));\n}","import { PLATFORM, DOM } from 'aurelia-pal';\n\nfunction json(body, replacer) {\r\n return JSON.stringify((body !== undefined ? body : {}), replacer);\r\n}\n\nvar retryStrategy = {\r\n fixed: 0,\r\n incremental: 1,\r\n exponential: 2,\r\n random: 3\r\n};\r\nvar defaultRetryConfig = {\r\n maxRetries: 3,\r\n interval: 1000,\r\n strategy: retryStrategy.fixed\r\n};\r\nvar RetryInterceptor = (function () {\r\n function RetryInterceptor(retryConfig) {\r\n this.retryConfig = Object.assign({}, defaultRetryConfig, retryConfig || {});\r\n if (this.retryConfig.strategy === retryStrategy.exponential &&\r\n this.retryConfig.interval <= 1000) {\r\n throw new Error('An interval less than or equal to 1 second is not allowed when using the exponential retry strategy');\r\n }\r\n }\r\n RetryInterceptor.prototype.request = function (request) {\r\n var $r = request;\r\n if (!$r.retryConfig) {\r\n $r.retryConfig = Object.assign({}, this.retryConfig);\r\n $r.retryConfig.counter = 0;\r\n }\r\n $r.retryConfig.requestClone = request.clone();\r\n return request;\r\n };\r\n RetryInterceptor.prototype.response = function (response, request) {\r\n delete request.retryConfig;\r\n return response;\r\n };\r\n RetryInterceptor.prototype.responseError = function (error, request, httpClient) {\r\n var retryConfig = request.retryConfig;\r\n var requestClone = retryConfig.requestClone;\r\n return Promise.resolve().then(function () {\r\n if (retryConfig.counter < retryConfig.maxRetries) {\r\n var result = retryConfig.doRetry ? retryConfig.doRetry(error, request) : true;\r\n return Promise.resolve(result).then(function (doRetry) {\r\n if (doRetry) {\r\n retryConfig.counter++;\r\n return new Promise(function (resolve) { return PLATFORM.global.setTimeout(resolve, calculateDelay(retryConfig) || 0); })\r\n .then(function () {\r\n var newRequest = requestClone.clone();\r\n if (typeof (retryConfig.beforeRetry) === 'function') {\r\n return retryConfig.beforeRetry(newRequest, httpClient);\r\n }\r\n return newRequest;\r\n })\r\n .then(function (newRequest) {\r\n return httpClient.fetch(Object.assign(newRequest, { retryConfig: retryConfig }));\r\n });\r\n }\r\n delete request.retryConfig;\r\n throw error;\r\n });\r\n }\r\n delete request.retryConfig;\r\n throw error;\r\n });\r\n };\r\n return RetryInterceptor;\r\n}());\r\nfunction calculateDelay(retryConfig) {\r\n var interval = retryConfig.interval, strategy = retryConfig.strategy, minRandomInterval = retryConfig.minRandomInterval, maxRandomInterval = retryConfig.maxRandomInterval, counter = retryConfig.counter;\r\n if (typeof (strategy) === 'function') {\r\n return retryConfig.strategy(counter);\r\n }\r\n switch (strategy) {\r\n case (retryStrategy.fixed):\r\n return retryStrategies[retryStrategy.fixed](interval);\r\n case (retryStrategy.incremental):\r\n return retryStrategies[retryStrategy.incremental](counter, interval);\r\n case (retryStrategy.exponential):\r\n return retryStrategies[retryStrategy.exponential](counter, interval);\r\n case (retryStrategy.random):\r\n return retryStrategies[retryStrategy.random](counter, interval, minRandomInterval, maxRandomInterval);\r\n default:\r\n throw new Error('Unrecognized retry strategy');\r\n }\r\n}\r\nvar retryStrategies = [\r\n function (interval) { return interval; },\r\n function (retryCount, interval) { return interval * retryCount; },\r\n function (retryCount, interval) { return retryCount === 1 ? interval : Math.pow(interval, retryCount) / 1000; },\r\n function (retryCount, interval, minRandomInterval, maxRandomInterval) {\r\n if (minRandomInterval === void 0) { minRandomInterval = 0; }\r\n if (maxRandomInterval === void 0) { maxRandomInterval = 60000; }\r\n return Math.random() * (maxRandomInterval - minRandomInterval) + minRandomInterval;\r\n }\r\n];\n\nvar HttpClientConfiguration = (function () {\r\n function HttpClientConfiguration() {\r\n this.baseUrl = '';\r\n this.defaults = {};\r\n this.interceptors = [];\r\n }\r\n HttpClientConfiguration.prototype.withBaseUrl = function (baseUrl) {\r\n this.baseUrl = baseUrl;\r\n return this;\r\n };\r\n HttpClientConfiguration.prototype.withDefaults = function (defaults) {\r\n this.defaults = defaults;\r\n return this;\r\n };\r\n HttpClientConfiguration.prototype.withInterceptor = function (interceptor) {\r\n this.interceptors.push(interceptor);\r\n return this;\r\n };\r\n HttpClientConfiguration.prototype.useStandardConfiguration = function () {\r\n var standardConfig = { credentials: 'same-origin' };\r\n Object.assign(this.defaults, standardConfig, this.defaults);\r\n return this.rejectErrorResponses();\r\n };\r\n HttpClientConfiguration.prototype.rejectErrorResponses = function () {\r\n return this.withInterceptor({ response: rejectOnError });\r\n };\r\n HttpClientConfiguration.prototype.withRetry = function (config) {\r\n var interceptor = new RetryInterceptor(config);\r\n return this.withInterceptor(interceptor);\r\n };\r\n return HttpClientConfiguration;\r\n}());\r\nfunction rejectOnError(response) {\r\n if (!response.ok) {\r\n throw response;\r\n }\r\n return response;\r\n}\n\nvar HttpClient = (function () {\r\n function HttpClient() {\r\n this.activeRequestCount = 0;\r\n this.isRequesting = false;\r\n this.isConfigured = false;\r\n this.baseUrl = '';\r\n this.defaults = null;\r\n this.interceptors = [];\r\n if (typeof fetch === 'undefined') {\r\n throw new Error('HttpClient requires a Fetch API implementation, but the current environment doesn\\'t support it. You may need to load a polyfill such as https://github.com/github/fetch');\r\n }\r\n }\r\n HttpClient.prototype.configure = function (config) {\r\n var normalizedConfig;\r\n if (typeof config === 'object') {\r\n normalizedConfig = { defaults: config };\r\n }\r\n else if (typeof config === 'function') {\r\n normalizedConfig = new HttpClientConfiguration();\r\n normalizedConfig.baseUrl = this.baseUrl;\r\n normalizedConfig.defaults = Object.assign({}, this.defaults);\r\n normalizedConfig.interceptors = this.interceptors;\r\n var c = config(normalizedConfig);\r\n if (HttpClientConfiguration.prototype.isPrototypeOf(c)) {\r\n normalizedConfig = c;\r\n }\r\n }\r\n else {\r\n throw new Error('invalid config');\r\n }\r\n var defaults = normalizedConfig.defaults;\r\n if (defaults && Headers.prototype.isPrototypeOf(defaults.headers)) {\r\n throw new Error('Default headers must be a plain object.');\r\n }\r\n var interceptors = normalizedConfig.interceptors;\r\n if (interceptors && interceptors.length) {\r\n if (interceptors.filter(function (x) { return RetryInterceptor.prototype.isPrototypeOf(x); }).length > 1) {\r\n throw new Error('Only one RetryInterceptor is allowed.');\r\n }\r\n var retryInterceptorIndex = interceptors.findIndex(function (x) { return RetryInterceptor.prototype.isPrototypeOf(x); });\r\n if (retryInterceptorIndex >= 0 && retryInterceptorIndex !== interceptors.length - 1) {\r\n throw new Error('The retry interceptor must be the last interceptor defined.');\r\n }\r\n }\r\n this.baseUrl = normalizedConfig.baseUrl;\r\n this.defaults = defaults;\r\n this.interceptors = normalizedConfig.interceptors || [];\r\n this.isConfigured = true;\r\n return this;\r\n };\r\n HttpClient.prototype.fetch = function (input, init) {\r\n var _this = this;\r\n trackRequestStart(this);\r\n var request = this.buildRequest(input, init);\r\n return processRequest(request, this.interceptors, this).then(function (result) {\r\n var response = null;\r\n if (Response.prototype.isPrototypeOf(result)) {\r\n response = Promise.resolve(result);\r\n }\r\n else if (Request.prototype.isPrototypeOf(result)) {\r\n request = result;\r\n response = fetch(result);\r\n }\r\n else {\r\n throw new Error(\"An invalid result was returned by the interceptor chain. Expected a Request or Response instance, but got [\" + result + \"]\");\r\n }\r\n return processResponse(response, _this.interceptors, request, _this);\r\n })\r\n .then(function (result) {\r\n if (Request.prototype.isPrototypeOf(result)) {\r\n return _this.fetch(result);\r\n }\r\n return result;\r\n })\r\n .then(function (result) {\r\n trackRequestEnd(_this);\r\n return result;\r\n }, function (error) {\r\n trackRequestEnd(_this);\r\n throw error;\r\n });\r\n };\r\n HttpClient.prototype.buildRequest = function (input, init) {\r\n var defaults = this.defaults || {};\r\n var request;\r\n var body;\r\n var requestContentType;\r\n var parsedDefaultHeaders = parseHeaderValues(defaults.headers);\r\n if (Request.prototype.isPrototypeOf(input)) {\r\n request = input;\r\n requestContentType = new Headers(request.headers).get('Content-Type');\r\n }\r\n else {\r\n if (!init) {\r\n init = {};\r\n }\r\n body = init.body;\r\n var bodyObj = body ? { body: body } : null;\r\n var requestInit = Object.assign({}, defaults, { headers: {} }, init, bodyObj);\r\n requestContentType = new Headers(requestInit.headers).get('Content-Type');\r\n request = new Request(getRequestUrl(this.baseUrl, input), requestInit);\r\n }\r\n if (!requestContentType) {\r\n if (new Headers(parsedDefaultHeaders).has('content-type')) {\r\n request.headers.set('Content-Type', new Headers(parsedDefaultHeaders).get('content-type'));\r\n }\r\n else if (body && isJSON(body)) {\r\n request.headers.set('Content-Type', 'application/json');\r\n }\r\n }\r\n setDefaultHeaders(request.headers, parsedDefaultHeaders);\r\n if (body && Blob.prototype.isPrototypeOf(body) && body.type) {\r\n request.headers.set('Content-Type', body.type);\r\n }\r\n return request;\r\n };\r\n HttpClient.prototype.get = function (input, init) {\r\n return this.fetch(input, init);\r\n };\r\n HttpClient.prototype.post = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'POST');\r\n };\r\n HttpClient.prototype.put = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'PUT');\r\n };\r\n HttpClient.prototype.patch = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'PATCH');\r\n };\r\n HttpClient.prototype.delete = function (input, body, init) {\r\n return callFetch(this, input, body, init, 'DELETE');\r\n };\r\n return HttpClient;\r\n}());\r\nvar absoluteUrlRegexp = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction trackRequestStart(client) {\r\n client.isRequesting = !!(++client.activeRequestCount);\r\n if (client.isRequesting) {\r\n var evt_1 = DOM.createCustomEvent('aurelia-fetch-client-request-started', { bubbles: true, cancelable: true });\r\n setTimeout(function () { return DOM.dispatchEvent(evt_1); }, 1);\r\n }\r\n}\r\nfunction trackRequestEnd(client) {\r\n client.isRequesting = !!(--client.activeRequestCount);\r\n if (!client.isRequesting) {\r\n var evt_2 = DOM.createCustomEvent('aurelia-fetch-client-requests-drained', { bubbles: true, cancelable: true });\r\n setTimeout(function () { return DOM.dispatchEvent(evt_2); }, 1);\r\n }\r\n}\r\nfunction parseHeaderValues(headers) {\r\n var parsedHeaders = {};\r\n for (var name_1 in headers || {}) {\r\n if (headers.hasOwnProperty(name_1)) {\r\n parsedHeaders[name_1] = (typeof headers[name_1] === 'function') ? headers[name_1]() : headers[name_1];\r\n }\r\n }\r\n return parsedHeaders;\r\n}\r\nfunction getRequestUrl(baseUrl, url) {\r\n if (absoluteUrlRegexp.test(url)) {\r\n return url;\r\n }\r\n return (baseUrl || '') + url;\r\n}\r\nfunction setDefaultHeaders(headers, defaultHeaders) {\r\n for (var name_2 in defaultHeaders || {}) {\r\n if (defaultHeaders.hasOwnProperty(name_2) && !headers.has(name_2)) {\r\n headers.set(name_2, defaultHeaders[name_2]);\r\n }\r\n }\r\n}\r\nfunction processRequest(request, interceptors, http) {\r\n return applyInterceptors(request, interceptors, 'request', 'requestError', http);\r\n}\r\nfunction processResponse(response, interceptors, request, http) {\r\n return applyInterceptors(response, interceptors, 'response', 'responseError', request, http);\r\n}\r\nfunction applyInterceptors(input, interceptors, successName, errorName) {\r\n var interceptorArgs = [];\r\n for (var _i = 4; _i < arguments.length; _i++) {\r\n interceptorArgs[_i - 4] = arguments[_i];\r\n }\r\n return (interceptors || [])\r\n .reduce(function (chain, interceptor) {\r\n var successHandler = interceptor[successName];\r\n var errorHandler = interceptor[errorName];\r\n return chain.then(successHandler && (function (value) { return successHandler.call.apply(successHandler, [interceptor, value].concat(interceptorArgs)); }) || identity, errorHandler && (function (reason) { return errorHandler.call.apply(errorHandler, [interceptor, reason].concat(interceptorArgs)); }) || thrower);\r\n }, Promise.resolve(input));\r\n}\r\nfunction isJSON(str) {\r\n try {\r\n JSON.parse(str);\r\n }\r\n catch (err) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nfunction identity(x) {\r\n return x;\r\n}\r\nfunction thrower(x) {\r\n throw x;\r\n}\r\nfunction callFetch(client, input, body, init, method) {\r\n if (!init) {\r\n init = {};\r\n }\r\n init.method = method;\r\n if (body) {\r\n init.body = body;\r\n }\r\n return client.fetch(input, init);\r\n}\n\nexport { json, retryStrategy, RetryInterceptor, HttpClientConfiguration, HttpClient };\n","import { Container } from 'aurelia-dependency-injection';\nexport * from 'aurelia-dependency-injection';\nexport * from 'aurelia-binding';\nexport * from 'aurelia-metadata';\nimport { HtmlBehaviorResource, ViewEngine, BindingLanguage, TemplatingEngine, CompositionTransaction, ViewSlot, ViewResources } from 'aurelia-templating';\nexport * from 'aurelia-templating';\nimport { Loader } from 'aurelia-loader';\nexport * from 'aurelia-loader';\nexport * from 'aurelia-task-queue';\nimport { join, relativeToFile } from 'aurelia-path';\nexport * from 'aurelia-path';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nexport * from 'aurelia-pal';\nimport * as TheLogManager from 'aurelia-logging';\nexport { TheLogManager as LogManager };\n\nvar logger = TheLogManager.getLogger('aurelia');\r\nvar extPattern = /\\.[^/.]+$/;\r\nfunction runTasks(config, tasks) {\r\n var current;\r\n var next = function () {\r\n current = tasks.shift();\r\n if (current) {\r\n return Promise.resolve(current(config)).then(next);\r\n }\r\n return Promise.resolve();\r\n };\r\n return next();\r\n}\r\nfunction loadPlugin(fwConfig, loader, info) {\r\n logger.debug(\"Loading plugin \".concat(info.moduleId, \".\"));\r\n if (typeof info.moduleId === 'string') {\r\n fwConfig.resourcesRelativeTo = info.resourcesRelativeTo;\r\n var id = info.moduleId;\r\n if (info.resourcesRelativeTo.length > 1) {\r\n return loader.normalize(info.moduleId, info.resourcesRelativeTo[1])\r\n .then(function (normalizedId) { return _loadPlugin(normalizedId); });\r\n }\r\n return _loadPlugin(id);\r\n }\r\n else if (typeof info.configure === 'function') {\r\n if (fwConfig.configuredPlugins.indexOf(info.configure) !== -1) {\r\n return Promise.resolve();\r\n }\r\n fwConfig.configuredPlugins.push(info.configure);\r\n return Promise.resolve(info.configure.call(null, fwConfig, info.config || {}));\r\n }\r\n throw new Error(invalidConfigMsg(info.moduleId || info.configure, 'plugin'));\r\n function _loadPlugin(moduleId) {\r\n return loader.loadModule(moduleId).then(function (m) {\r\n if ('configure' in m) {\r\n if (fwConfig.configuredPlugins.indexOf(m.configure) !== -1) {\r\n return Promise.resolve();\r\n }\r\n return Promise.resolve(m.configure(fwConfig, info.config || {})).then(function () {\r\n fwConfig.configuredPlugins.push(m.configure);\r\n fwConfig.resourcesRelativeTo = null;\r\n logger.debug(\"Configured plugin \".concat(info.moduleId, \".\"));\r\n });\r\n }\r\n fwConfig.resourcesRelativeTo = null;\r\n logger.debug(\"Loaded plugin \".concat(info.moduleId, \".\"));\r\n });\r\n }\r\n}\r\nfunction loadResources(aurelia, resourcesToLoad, appResources) {\r\n if (Object.keys(resourcesToLoad).length === 0) {\r\n return Promise.resolve();\r\n }\r\n var viewEngine = aurelia.container.get(ViewEngine);\r\n return Promise.all(Object.keys(resourcesToLoad).map(function (n) { return _normalize(resourcesToLoad[n]); }))\r\n .then(function (loads) {\r\n var names = [];\r\n var importIds = [];\r\n loads.forEach(function (l) {\r\n names.push(undefined);\r\n importIds.push(l.importId);\r\n });\r\n return viewEngine.importViewResources(importIds, names, appResources);\r\n });\r\n function _normalize(load) {\r\n var moduleId = load.moduleId;\r\n var ext = getExt(moduleId);\r\n if (isOtherResource(moduleId)) {\r\n moduleId = removeExt(moduleId);\r\n }\r\n return aurelia.loader.normalize(moduleId, load.relativeTo)\r\n .then(function (normalized) {\r\n return {\r\n name: load.moduleId,\r\n importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized\r\n };\r\n });\r\n }\r\n function isOtherResource(name) {\r\n var ext = getExt(name);\r\n if (!ext)\r\n return false;\r\n if (ext === '')\r\n return false;\r\n if (ext === '.js' || ext === '.ts')\r\n return false;\r\n return true;\r\n }\r\n function removeExt(name) {\r\n return name.replace(extPattern, '');\r\n }\r\n function addOriginalExt(normalized, ext) {\r\n return removeExt(normalized) + '.' + ext;\r\n }\r\n}\r\nfunction getExt(name) {\r\n var match = name.match(extPattern);\r\n if (match && match.length > 0) {\r\n return (match[0].split('.'))[1];\r\n }\r\n}\r\nfunction loadBehaviors(config) {\r\n return Promise.all(config.behaviorsToLoad.map(function (m) { return m.load(config.container, m.target); })).then(function () {\r\n config.behaviorsToLoad = null;\r\n });\r\n}\r\nfunction assertProcessed(plugins) {\r\n if (plugins.processed) {\r\n throw new Error('This config instance has already been applied. To load more plugins or global resources, create a new FrameworkConfiguration instance.');\r\n }\r\n}\r\nfunction invalidConfigMsg(cfg, type) {\r\n return \"Invalid \".concat(type, \" [\").concat(cfg, \"], \").concat(type, \" must be specified as functions or relative module IDs.\");\r\n}\r\nvar FrameworkConfiguration = (function () {\r\n function FrameworkConfiguration(aurelia) {\r\n var _this = this;\r\n this.aurelia = aurelia;\r\n this.container = aurelia.container;\r\n this.info = [];\r\n this.processed = false;\r\n this.preTasks = [];\r\n this.postTasks = [];\r\n this.behaviorsToLoad = [];\r\n this.configuredPlugins = [];\r\n this.resourcesToLoad = {};\r\n this.preTask(function () { return aurelia.loader.normalize('aurelia-bootstrapper', undefined)\r\n .then(function (name) { return _this.bootstrapperName = name; }); });\r\n this.postTask(function () { return loadResources(aurelia, _this.resourcesToLoad, aurelia.resources); });\r\n }\r\n FrameworkConfiguration.prototype.instance = function (type, instance) {\r\n this.container.registerInstance(type, instance);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.singleton = function (type, implementation) {\r\n this.container.registerSingleton(type, implementation);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.transient = function (type, implementation) {\r\n this.container.registerTransient(type, implementation);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.preTask = function (task) {\r\n assertProcessed(this);\r\n this.preTasks.push(task);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.postTask = function (task) {\r\n assertProcessed(this);\r\n this.postTasks.push(task);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.feature = function (plugin, config) {\r\n if (config === void 0) { config = {}; }\r\n switch (typeof plugin) {\r\n case 'string':\r\n var hasIndex = /\\/index$/i.test(plugin);\r\n var moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';\r\n var root = hasIndex ? plugin.slice(0, -6) : plugin;\r\n this.info.push({ moduleId: moduleId, resourcesRelativeTo: [root, ''], config: config });\r\n break;\r\n case 'function':\r\n this.info.push({ configure: plugin, config: config || {} });\r\n break;\r\n default:\r\n throw new Error(invalidConfigMsg(plugin, 'feature'));\r\n }\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.globalResources = function (resources) {\r\n var _this = this;\r\n assertProcessed(this);\r\n var toAdd = Array.isArray(resources) ? resources : arguments;\r\n var resource;\r\n var resourcesRelativeTo = this.resourcesRelativeTo || ['', ''];\r\n for (var i = 0, ii = toAdd.length; i < ii; ++i) {\r\n resource = toAdd[i];\r\n switch (typeof resource) {\r\n case 'string':\r\n var parent_1 = resourcesRelativeTo[0];\r\n var grandParent = resourcesRelativeTo[1];\r\n var name_1 = resource;\r\n if ((resource.startsWith('./') || resource.startsWith('../')) && parent_1 !== '') {\r\n name_1 = join(parent_1, resource);\r\n }\r\n this.resourcesToLoad[name_1] = { moduleId: name_1, relativeTo: grandParent };\r\n break;\r\n case 'function':\r\n var meta = this.aurelia.resources.autoRegister(this.container, resource);\r\n if (meta instanceof HtmlBehaviorResource && meta.elementName !== null) {\r\n if (this.behaviorsToLoad.push(meta) === 1) {\r\n this.postTask(function () { return loadBehaviors(_this); });\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error(invalidConfigMsg(resource, 'resource'));\r\n }\r\n }\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.globalName = function (resourcePath, newName) {\r\n assertProcessed(this);\r\n this.resourcesToLoad[resourcePath] = { moduleId: newName, relativeTo: '' };\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.plugin = function (plugin, pluginConfig) {\r\n assertProcessed(this);\r\n var info;\r\n switch (typeof plugin) {\r\n case 'string':\r\n info = { moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: pluginConfig || {} };\r\n break;\r\n case 'function':\r\n info = { configure: plugin, config: pluginConfig || {} };\r\n break;\r\n default:\r\n throw new Error(invalidConfigMsg(plugin, 'plugin'));\r\n }\r\n this.info.push(info);\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype._addNormalizedPlugin = function (name, config) {\r\n var _this = this;\r\n var plugin = { moduleId: name, resourcesRelativeTo: [name, ''], config: config || {} };\r\n this.info.push(plugin);\r\n this.preTask(function () {\r\n var relativeTo = [name, _this.bootstrapperName];\r\n plugin.moduleId = name;\r\n plugin.resourcesRelativeTo = relativeTo;\r\n return Promise.resolve();\r\n });\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.defaultBindingLanguage = function () {\r\n return this._addNormalizedPlugin('aurelia-templating-binding');\r\n };\r\n FrameworkConfiguration.prototype.router = function () {\r\n return this._addNormalizedPlugin('aurelia-templating-router');\r\n };\r\n FrameworkConfiguration.prototype.history = function () {\r\n return this._addNormalizedPlugin('aurelia-history-browser');\r\n };\r\n FrameworkConfiguration.prototype.defaultResources = function () {\r\n return this._addNormalizedPlugin('aurelia-templating-resources');\r\n };\r\n FrameworkConfiguration.prototype.eventAggregator = function () {\r\n return this._addNormalizedPlugin('aurelia-event-aggregator');\r\n };\r\n FrameworkConfiguration.prototype.basicConfiguration = function () {\r\n return this.defaultBindingLanguage().defaultResources().eventAggregator();\r\n };\r\n FrameworkConfiguration.prototype.standardConfiguration = function () {\r\n return this.basicConfiguration().history().router();\r\n };\r\n FrameworkConfiguration.prototype.developmentLogging = function (level) {\r\n var _this = this;\r\n var logLevel = level ? TheLogManager.logLevel[level] : undefined;\r\n if (logLevel === undefined) {\r\n logLevel = TheLogManager.logLevel.debug;\r\n }\r\n this.preTask(function () {\r\n return _this.aurelia.loader.normalize('aurelia-logging-console', _this.bootstrapperName).then(function (name) {\r\n return _this.aurelia.loader.loadModule(name).then(function (m) {\r\n TheLogManager.addAppender(new m.ConsoleAppender());\r\n TheLogManager.setLevel(logLevel);\r\n });\r\n });\r\n });\r\n return this;\r\n };\r\n FrameworkConfiguration.prototype.apply = function () {\r\n var _this = this;\r\n if (this.processed) {\r\n return Promise.resolve();\r\n }\r\n return runTasks(this, this.preTasks).then(function () {\r\n var loader = _this.aurelia.loader;\r\n var info = _this.info;\r\n var current;\r\n var next = function () {\r\n current = info.shift();\r\n if (current) {\r\n return loadPlugin(_this, loader, current).then(next);\r\n }\r\n _this.processed = true;\r\n _this.configuredPlugins = null;\r\n return Promise.resolve();\r\n };\r\n return next().then(function () { return runTasks(_this, _this.postTasks); });\r\n });\r\n };\r\n return FrameworkConfiguration;\r\n}());\n\nfunction preventActionlessFormSubmit() {\r\n DOM.addEventListener('submit', function (evt) {\r\n var target = evt.target;\r\n var action = target.action;\r\n if (target.tagName.toLowerCase() === 'form' && !action) {\r\n evt.preventDefault();\r\n }\r\n }, false);\r\n}\r\nvar Aurelia = (function () {\r\n function Aurelia(loader, container, resources) {\r\n this.loader = loader || new PLATFORM.Loader();\r\n this.container = container || (new Container()).makeGlobal();\r\n this.resources = resources || new ViewResources();\r\n this.use = new FrameworkConfiguration(this);\r\n this.logger = TheLogManager.getLogger('aurelia');\r\n this.hostConfigured = false;\r\n this.host = null;\r\n this.use.instance(Aurelia, this);\r\n this.use.instance(Loader, this.loader);\r\n this.use.instance(ViewResources, this.resources);\r\n }\r\n Aurelia.prototype.start = function () {\r\n var _this = this;\r\n if (this._started) {\r\n return this._started;\r\n }\r\n this.logger.info('Aurelia Starting');\r\n return this._started = this.use.apply().then(function () {\r\n preventActionlessFormSubmit();\r\n if (!_this.container.hasResolver(BindingLanguage)) {\r\n var message = 'You must configure Aurelia with a BindingLanguage implementation.';\r\n _this.logger.error(message);\r\n throw new Error(message);\r\n }\r\n _this.logger.info('Aurelia Started');\r\n var evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true });\r\n DOM.dispatchEvent(evt);\r\n return _this;\r\n });\r\n };\r\n Aurelia.prototype.enhance = function (bindingContext, applicationHost) {\r\n var _this = this;\r\n if (bindingContext === void 0) { bindingContext = {}; }\r\n if (applicationHost === void 0) { applicationHost = null; }\r\n this._configureHost(applicationHost || DOM.querySelectorAll('body')[0]);\r\n return new Promise(function (resolve) {\r\n var engine = _this.container.get(TemplatingEngine);\r\n _this.root = engine.enhance({ container: _this.container, element: _this.host, resources: _this.resources, bindingContext: bindingContext });\r\n _this.root.attached();\r\n _this._onAureliaComposed();\r\n resolve(_this);\r\n });\r\n };\r\n Aurelia.prototype.setRoot = function (root, applicationHost) {\r\n var _this = this;\r\n if (root === void 0) { root = null; }\r\n if (applicationHost === void 0) { applicationHost = null; }\r\n var instruction = {};\r\n if (this.root && this.root.viewModel && this.root.viewModel.router) {\r\n this.root.viewModel.router.deactivate();\r\n this.root.viewModel.router.reset();\r\n }\r\n this._configureHost(applicationHost);\r\n var engine = this.container.get(TemplatingEngine);\r\n var transaction = this.container.get(CompositionTransaction);\r\n delete transaction.initialComposition;\r\n if (!root) {\r\n if (this.configModuleId) {\r\n root = relativeToFile('./app', this.configModuleId);\r\n }\r\n else {\r\n root = 'app';\r\n }\r\n }\r\n instruction.viewModel = root;\r\n instruction.container = instruction.childContainer = this.container;\r\n instruction.viewSlot = this.hostSlot;\r\n instruction.host = this.host;\r\n return engine.compose(instruction).then(function (r) {\r\n _this.root = r;\r\n instruction.viewSlot.attached();\r\n _this._onAureliaComposed();\r\n return _this;\r\n });\r\n };\r\n Aurelia.prototype._configureHost = function (applicationHost) {\r\n if (this.hostConfigured) {\r\n return;\r\n }\r\n applicationHost = applicationHost || this.host;\r\n if (!applicationHost || typeof applicationHost === 'string') {\r\n this.host = DOM.getElementById(applicationHost || 'applicationHost');\r\n }\r\n else {\r\n this.host = applicationHost;\r\n }\r\n if (!this.host) {\r\n throw new Error('No applicationHost was specified.');\r\n }\r\n this.hostConfigured = true;\r\n this.host.aurelia = this;\r\n this.hostSlot = new ViewSlot(this.host, true);\r\n this.hostSlot.transformChildNodesIntoView();\r\n this.container.registerInstance(DOM.boundary, this.host);\r\n };\r\n Aurelia.prototype._onAureliaComposed = function () {\r\n var evt = DOM.createCustomEvent('aurelia-composed', { bubbles: true, cancelable: true });\r\n setTimeout(function () { return DOM.dispatchEvent(evt); }, 1);\r\n };\r\n return Aurelia;\r\n}());\n\nexport { Aurelia, FrameworkConfiguration };\n//# sourceMappingURL=aurelia-framework.js.map\n","import { History } from 'aurelia-history';\nimport { DOM, PLATFORM } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\nvar LinkHandler = (function () {\r\n function LinkHandler() {\r\n }\r\n LinkHandler.prototype.activate = function (history) { };\r\n LinkHandler.prototype.deactivate = function () { };\r\n return LinkHandler;\r\n}());\r\nvar DefaultLinkHandler = (function (_super) {\r\n __extends(DefaultLinkHandler, _super);\r\n function DefaultLinkHandler() {\r\n var _this = _super.call(this) || this;\r\n _this.handler = function (e) {\r\n var _a = DefaultLinkHandler.getEventInfo(e), shouldHandleEvent = _a.shouldHandleEvent, href = _a.href;\r\n if (shouldHandleEvent) {\r\n e.preventDefault();\r\n _this.history.navigate(href);\r\n }\r\n };\r\n return _this;\r\n }\r\n DefaultLinkHandler.prototype.activate = function (history) {\r\n if (history._hasPushState) {\r\n this.history = history;\r\n DOM.addEventListener('click', this.handler, true);\r\n }\r\n };\r\n DefaultLinkHandler.prototype.deactivate = function () {\r\n DOM.removeEventListener('click', this.handler, true);\r\n };\r\n DefaultLinkHandler.getEventInfo = function (event) {\r\n var $event = event;\r\n var info = {\r\n shouldHandleEvent: false,\r\n href: null,\r\n anchor: null\r\n };\r\n var target = DefaultLinkHandler.findClosestAnchor($event.target);\r\n if (!target || !DefaultLinkHandler.targetIsThisWindow(target)) {\r\n return info;\r\n }\r\n if (hasAttribute(target, 'download')\r\n || hasAttribute(target, 'router-ignore')\r\n || hasAttribute(target, 'data-router-ignore')) {\r\n return info;\r\n }\r\n if ($event.altKey || $event.ctrlKey || $event.metaKey || $event.shiftKey) {\r\n return info;\r\n }\r\n var href = target.getAttribute('href');\r\n info.anchor = target;\r\n info.href = href;\r\n var leftButtonClicked = $event.which === 1;\r\n var isRelative = href && !(href.charAt(0) === '#' || (/^[a-z]+:/i).test(href));\r\n info.shouldHandleEvent = leftButtonClicked && isRelative;\r\n return info;\r\n };\r\n DefaultLinkHandler.findClosestAnchor = function (el) {\r\n while (el) {\r\n if (el.tagName === 'A') {\r\n return el;\r\n }\r\n el = el.parentNode;\r\n }\r\n };\r\n DefaultLinkHandler.targetIsThisWindow = function (target) {\r\n var targetWindow = target.getAttribute('target');\r\n var win = PLATFORM.global;\r\n return !targetWindow ||\r\n targetWindow === win.name ||\r\n targetWindow === '_self';\r\n };\r\n return DefaultLinkHandler;\r\n}(LinkHandler));\r\nvar hasAttribute = function (el, attr) { return el.hasAttribute(attr); };\n\nvar BrowserHistory = (function (_super) {\r\n __extends(BrowserHistory, _super);\r\n function BrowserHistory(linkHandler) {\r\n var _this = _super.call(this) || this;\r\n _this._isActive = false;\r\n _this._checkUrlCallback = _this._checkUrl.bind(_this);\r\n _this.location = PLATFORM.location;\r\n _this.history = PLATFORM.history;\r\n _this.linkHandler = linkHandler;\r\n return _this;\r\n }\r\n BrowserHistory.prototype.activate = function (options) {\r\n if (this._isActive) {\r\n throw new Error('History has already been activated.');\r\n }\r\n var $history = this.history;\r\n var wantsPushState = !!options.pushState;\r\n this._isActive = true;\r\n var normalizedOptions = this.options = Object.assign({}, { root: '/' }, this.options, options);\r\n var rootUrl = this.root = ('/' + normalizedOptions.root + '/').replace(rootStripper, '/');\r\n var wantsHashChange = this._wantsHashChange = normalizedOptions.hashChange !== false;\r\n var hasPushState = this._hasPushState = !!(normalizedOptions.pushState && $history && $history.pushState);\r\n var eventName;\r\n if (hasPushState) {\r\n eventName = 'popstate';\r\n }\r\n else if (wantsHashChange) {\r\n eventName = 'hashchange';\r\n }\r\n PLATFORM.addEventListener(eventName, this._checkUrlCallback);\r\n if (wantsHashChange && wantsPushState) {\r\n var $location = this.location;\r\n var atRoot = $location.pathname.replace(/[^\\/]$/, '$&/') === rootUrl;\r\n if (!hasPushState && !atRoot) {\r\n var fragment = this.fragment = this._getFragment(null, true);\r\n $location.replace(rootUrl + $location.search + '#' + fragment);\r\n return true;\r\n }\r\n else if (hasPushState && atRoot && $location.hash) {\r\n var fragment = this.fragment = this._getHash().replace(routeStripper, '');\r\n $history.replaceState({}, DOM.title, rootUrl + fragment + $location.search);\r\n }\r\n }\r\n if (!this.fragment) {\r\n this.fragment = this._getFragment('');\r\n }\r\n this.linkHandler.activate(this);\r\n if (!normalizedOptions.silent) {\r\n return this._loadUrl('');\r\n }\r\n };\r\n BrowserHistory.prototype.deactivate = function () {\r\n var handler = this._checkUrlCallback;\r\n PLATFORM.removeEventListener('popstate', handler);\r\n PLATFORM.removeEventListener('hashchange', handler);\r\n this._isActive = false;\r\n this.linkHandler.deactivate();\r\n };\r\n BrowserHistory.prototype.getAbsoluteRoot = function () {\r\n var $location = this.location;\r\n var origin = createOrigin($location.protocol, $location.hostname, $location.port);\r\n return \"\" + origin + this.root;\r\n };\r\n BrowserHistory.prototype.navigate = function (fragment, _a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.trigger, trigger = _c === void 0 ? true : _c, _d = _b.replace, replace = _d === void 0 ? false : _d;\r\n var location = this.location;\r\n if (fragment && absoluteUrl.test(fragment)) {\r\n location.href = fragment;\r\n return true;\r\n }\r\n if (!this._isActive) {\r\n return false;\r\n }\r\n fragment = this._getFragment(fragment || '');\r\n if (this.fragment === fragment && !replace) {\r\n return false;\r\n }\r\n this.fragment = fragment;\r\n var url = this.root + fragment;\r\n if (fragment === '' && url !== '/') {\r\n url = url.slice(0, -1);\r\n }\r\n if (this._hasPushState) {\r\n url = url.replace('//', '/');\r\n this.history[replace ? 'replaceState' : 'pushState']({}, DOM.title, url);\r\n }\r\n else if (this._wantsHashChange) {\r\n updateHash(location, fragment, replace);\r\n }\r\n else {\r\n location.assign(url);\r\n }\r\n if (trigger) {\r\n return this._loadUrl(fragment);\r\n }\r\n return true;\r\n };\r\n BrowserHistory.prototype.navigateBack = function () {\r\n this.history.back();\r\n };\r\n BrowserHistory.prototype.setTitle = function (title) {\r\n DOM.title = title;\r\n };\r\n BrowserHistory.prototype.setState = function (key, value) {\r\n var $history = this.history;\r\n var state = Object.assign({}, $history.state);\r\n var _a = this.location, pathname = _a.pathname, search = _a.search, hash = _a.hash;\r\n state[key] = value;\r\n $history.replaceState(state, null, \"\" + pathname + search + hash);\r\n };\r\n BrowserHistory.prototype.getState = function (key) {\r\n var state = Object.assign({}, this.history.state);\r\n return state[key];\r\n };\r\n BrowserHistory.prototype.getHistoryIndex = function () {\r\n var historyIndex = this.getState('HistoryIndex');\r\n if (historyIndex === undefined) {\r\n historyIndex = this.history.length - 1;\r\n this.setState('HistoryIndex', historyIndex);\r\n }\r\n return historyIndex;\r\n };\r\n BrowserHistory.prototype.go = function (movement) {\r\n this.history.go(movement);\r\n };\r\n BrowserHistory.prototype._getHash = function () {\r\n return this.location.hash.substr(1);\r\n };\r\n BrowserHistory.prototype._getFragment = function (fragment, forcePushState) {\r\n var rootUrl;\r\n if (!fragment) {\r\n if (this._hasPushState || !this._wantsHashChange || forcePushState) {\r\n var location_1 = this.location;\r\n fragment = location_1.pathname + location_1.search;\r\n rootUrl = this.root.replace(trailingSlash, '');\r\n if (!fragment.indexOf(rootUrl)) {\r\n fragment = fragment.substr(rootUrl.length);\r\n }\r\n }\r\n else {\r\n fragment = this._getHash();\r\n }\r\n }\r\n return '/' + fragment.replace(routeStripper, '');\r\n };\r\n BrowserHistory.prototype._checkUrl = function () {\r\n var current = this._getFragment('');\r\n if (current !== this.fragment) {\r\n this._loadUrl('');\r\n }\r\n };\r\n BrowserHistory.prototype._loadUrl = function (fragmentOverride) {\r\n var fragment = this.fragment = this._getFragment(fragmentOverride);\r\n return this.options.routeHandler ?\r\n this.options.routeHandler(fragment) :\r\n false;\r\n };\r\n BrowserHistory.inject = [LinkHandler];\r\n return BrowserHistory;\r\n}(History));\r\nvar routeStripper = /^#?\\/*|\\s+$/g;\r\nvar rootStripper = /^\\/+|\\/+$/g;\r\nvar trailingSlash = /\\/$/;\r\nvar absoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction updateHash($location, fragment, replace) {\r\n if (replace) {\r\n var href = $location.href.replace(/(javascript:|#).*$/, '');\r\n $location.replace(href + '#' + fragment);\r\n }\r\n else {\r\n $location.hash = '#' + fragment;\r\n }\r\n}\r\nfunction createOrigin(protocol, hostname, port) {\r\n return protocol + \"//\" + hostname + (port ? ':' + port : '');\r\n}\n\nfunction configure(config) {\r\n var $config = config;\r\n $config.singleton(History, BrowserHistory);\r\n $config.transient(LinkHandler, DefaultLinkHandler);\r\n}\n\nexport { BrowserHistory, DefaultLinkHandler, LinkHandler, configure };\n//# sourceMappingURL=aurelia-history-browser.js.map\n","\n\nfunction mi(name) {\n throw new Error('History must implement ' + name + '().');\n}\n\nexport var History = function () {\n function History() {\n \n }\n\n History.prototype.activate = function activate(options) {\n mi('activate');\n };\n\n History.prototype.deactivate = function deactivate() {\n mi('deactivate');\n };\n\n History.prototype.getAbsoluteRoot = function getAbsoluteRoot() {\n mi('getAbsoluteRoot');\n };\n\n History.prototype.navigate = function navigate(fragment, options) {\n mi('navigate');\n };\n\n History.prototype.navigateBack = function navigateBack() {\n mi('navigateBack');\n };\n\n History.prototype.setTitle = function setTitle(title) {\n mi('setTitle');\n };\n\n History.prototype.setState = function setState(key, value) {\n mi('setState');\n };\n\n History.prototype.getState = function getState(key) {\n mi('getState');\n };\n\n History.prototype.getHistoryIndex = function getHistoryIndex() {\n mi('getHistoryIndex');\n };\n\n History.prototype.go = function go(movement) {\n mi('go');\n };\n\n return History;\n}();","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nimport { join, buildQueryString } from 'aurelia-path';\nimport { PLATFORM, DOM } from 'aurelia-pal';\n\nexport var Headers = function () {\n function Headers() {\n var headers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n \n\n this.headers = {};\n\n for (var _key in headers) {\n this.headers[_key.toLowerCase()] = { key: _key, value: headers[_key] };\n }\n }\n\n Headers.prototype.add = function add(key, value) {\n this.headers[key.toLowerCase()] = { key: key, value: value };\n };\n\n Headers.prototype.get = function get(key) {\n var header = this.headers[key.toLowerCase()];\n return header ? header.value : undefined;\n };\n\n Headers.prototype.clear = function clear() {\n this.headers = {};\n };\n\n Headers.prototype.has = function has(header) {\n return this.headers.hasOwnProperty(header.toLowerCase());\n };\n\n Headers.prototype.configureXHR = function configureXHR(xhr) {\n for (var name in this.headers) {\n if (this.headers.hasOwnProperty(name)) {\n xhr.setRequestHeader(this.headers[name].key, this.headers[name].value);\n }\n }\n };\n\n Headers.parse = function parse(headerStr) {\n var headers = new Headers();\n if (!headerStr) {\n return headers;\n }\n\n var headerPairs = headerStr.split('\\r\\n');\n for (var i = 0; i < headerPairs.length; i++) {\n var headerPair = headerPairs[i];\n\n var index = headerPair.indexOf(': ');\n if (index > 0) {\n var _key2 = headerPair.substring(0, index);\n var val = headerPair.substring(index + 2);\n headers.add(_key2, val);\n }\n }\n\n return headers;\n };\n\n return Headers;\n}();\n\nexport var RequestMessage = function () {\n function RequestMessage(method, url, content, headers) {\n \n\n this.method = method;\n this.url = url;\n this.content = content;\n this.headers = headers || new Headers();\n this.baseUrl = '';\n }\n\n RequestMessage.prototype.buildFullUrl = function buildFullUrl() {\n var absoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\n var url = absoluteUrl.test(this.url) ? this.url : join(this.baseUrl, this.url);\n\n if (this.params) {\n var qs = buildQueryString(this.params, this.traditional);\n url = qs ? url + (this.url.indexOf('?') < 0 ? '?' : '&') + qs : url;\n }\n\n return url;\n };\n\n return RequestMessage;\n}();\n\nexport var HttpResponseMessage = function () {\n function HttpResponseMessage(requestMessage, xhr, responseType, reviver) {\n \n\n this.requestMessage = requestMessage;\n this.statusCode = xhr.status;\n this.response = xhr.response || xhr.responseText;\n this.isSuccess = xhr.status >= 200 && xhr.status < 400;\n this.statusText = xhr.statusText;\n this.reviver = reviver;\n this.mimeType = null;\n\n if (xhr.getAllResponseHeaders) {\n this.headers = Headers.parse(xhr.getAllResponseHeaders());\n } else {\n this.headers = new Headers();\n }\n\n var contentType = void 0;\n\n if (this.headers && this.headers.headers) {\n contentType = this.headers.get('Content-Type');\n }\n\n if (contentType) {\n this.mimeType = responseType = contentType.split(';')[0].trim();\n if (mimeTypes.hasOwnProperty(this.mimeType)) responseType = mimeTypes[this.mimeType];\n }\n\n this.responseType = responseType;\n }\n\n _createClass(HttpResponseMessage, [{\n key: 'content',\n get: function get() {\n try {\n if (this._content !== undefined) {\n return this._content;\n }\n\n if (this.response === undefined || this.response === null || this.response === '') {\n this._content = this.response;\n return this._content;\n }\n\n if (this.responseType === 'json') {\n this._content = JSON.parse(this.response, this.reviver);\n return this._content;\n }\n\n if (this.reviver) {\n this._content = this.reviver(this.response);\n return this._content;\n }\n\n this._content = this.response;\n return this._content;\n } catch (e) {\n if (this.isSuccess) {\n throw e;\n }\n\n this._content = null;\n return this._content;\n }\n }\n }]);\n\n return HttpResponseMessage;\n}();\n\nexport var mimeTypes = {\n 'text/html': 'html',\n 'text/javascript': 'js',\n 'application/javascript': 'js',\n 'text/json': 'json',\n 'application/json': 'json',\n 'application/rss+xml': 'rss',\n 'application/atom+xml': 'atom',\n 'application/xhtml+xml': 'xhtml',\n 'text/markdown': 'md',\n 'text/xml': 'xml',\n 'text/mathml': 'mml',\n 'application/xml': 'xml',\n 'text/yml': 'yml',\n 'text/csv': 'csv',\n 'text/css': 'css',\n 'text/less': 'less',\n 'text/stylus': 'styl',\n 'text/scss': 'scss',\n 'text/sass': 'sass',\n 'text/plain': 'txt'\n};\n\nfunction applyXhrTransformers(xhrTransformers, client, processor, message, xhr) {\n var i = void 0;\n var ii = void 0;\n\n for (i = 0, ii = xhrTransformers.length; i < ii; ++i) {\n xhrTransformers[i](client, processor, message, xhr);\n }\n}\n\nexport var RequestMessageProcessor = function () {\n function RequestMessageProcessor(xhrType, xhrTransformers) {\n \n\n this.XHRType = xhrType;\n this.xhrTransformers = xhrTransformers;\n this.isAborted = false;\n }\n\n RequestMessageProcessor.prototype.abort = function abort() {\n if (this.xhr && this.xhr.readyState !== PLATFORM.XMLHttpRequest.UNSENT) {\n this.xhr.abort();\n }\n\n this.isAborted = true;\n };\n\n RequestMessageProcessor.prototype.process = function process(client, requestMessage) {\n var _this = this;\n\n var promise = new Promise(function (resolve, reject) {\n var rejectResponse = void 0;\n if (client.rejectPromiseWithErrorObject) {\n rejectResponse = function rejectResponse(resp) {\n var errorResp = new ErrorHttpResponseMessage(resp);\n reject(errorResp);\n };\n } else {\n rejectResponse = function rejectResponse(resp) {\n reject(resp);\n };\n }\n\n var xhr = _this.xhr = new _this.XHRType();\n xhr.onload = function (e) {\n var response = new HttpResponseMessage(requestMessage, xhr, requestMessage.responseType, requestMessage.reviver);\n if (response.isSuccess) {\n resolve(response);\n } else {\n rejectResponse(response);\n }\n };\n\n xhr.ontimeout = function (e) {\n rejectResponse(new HttpResponseMessage(requestMessage, {\n response: e,\n status: xhr.status,\n statusText: xhr.statusText\n }, 'timeout'));\n };\n\n xhr.onerror = function (e) {\n rejectResponse(new HttpResponseMessage(requestMessage, {\n response: e,\n status: xhr.status,\n statusText: xhr.statusText\n }, 'error'));\n };\n\n xhr.onabort = function (e) {\n rejectResponse(new HttpResponseMessage(requestMessage, {\n response: e,\n status: xhr.status,\n statusText: xhr.statusText\n }, 'abort'));\n };\n });\n\n return Promise.resolve(requestMessage).then(function (message) {\n var processRequest = function processRequest() {\n if (_this.isAborted) {\n _this.xhr.abort();\n } else {\n _this.xhr.open(message.method, message.buildFullUrl(), true, message.user, message.password);\n applyXhrTransformers(_this.xhrTransformers, client, _this, message, _this.xhr);\n if (typeof message.content === 'undefined') {\n _this.xhr.send();\n } else {\n _this.xhr.send(message.content);\n }\n }\n\n return promise;\n };\n\n var chain = [[processRequest, undefined]];\n\n var interceptors = message.interceptors || [];\n interceptors.forEach(function (interceptor) {\n if (interceptor.request || interceptor.requestError) {\n chain.unshift([interceptor.request ? interceptor.request.bind(interceptor) : undefined, interceptor.requestError ? interceptor.requestError.bind(interceptor) : undefined]);\n }\n\n if (interceptor.response || interceptor.responseError) {\n chain.push([interceptor.response ? interceptor.response.bind(interceptor) : undefined, interceptor.responseError ? interceptor.responseError.bind(interceptor) : undefined]);\n }\n });\n\n var interceptorsPromise = Promise.resolve(message);\n\n while (chain.length) {\n var _interceptorsPromise;\n\n interceptorsPromise = (_interceptorsPromise = interceptorsPromise).then.apply(_interceptorsPromise, chain.shift());\n }\n\n return interceptorsPromise;\n });\n };\n\n return RequestMessageProcessor;\n}();\n\nexport function timeoutTransformer(client, processor, message, xhr) {\n if (message.timeout !== undefined) {\n xhr.timeout = message.timeout;\n }\n}\n\nexport function callbackParameterNameTransformer(client, processor, message, xhr) {\n if (message.callbackParameterName !== undefined) {\n xhr.callbackParameterName = message.callbackParameterName;\n }\n}\n\nexport function credentialsTransformer(client, processor, message, xhr) {\n if (message.withCredentials !== undefined) {\n xhr.withCredentials = message.withCredentials;\n }\n}\n\nexport function progressTransformer(client, processor, message, xhr) {\n if (message.progressCallback) {\n xhr.upload.onprogress = message.progressCallback;\n }\n}\n\nexport function downloadProgressTransformer(client, processor, message, xhr) {\n if (message.downloadProgressCallback) {\n xhr.onprogress = message.downloadProgressCallback;\n }\n}\n\nexport function responseTypeTransformer(client, processor, message, xhr) {\n var responseType = message.responseType;\n\n if (responseType === 'json') {\n responseType = 'text';\n }\n\n xhr.responseType = responseType;\n}\n\nexport function headerTransformer(client, processor, message, xhr) {\n message.headers.configureXHR(xhr);\n}\n\nexport function contentTransformer(client, processor, message, xhr) {\n if (message.skipContentProcessing) {\n return;\n }\n\n if (PLATFORM.global.FormData && message.content instanceof FormData) {\n return;\n }\n\n if (PLATFORM.global.Blob && message.content instanceof Blob) {\n return;\n }\n\n if (PLATFORM.global.ArrayBuffer && message.content instanceof ArrayBuffer) {\n return;\n }\n\n if (message.content instanceof Document) {\n return;\n }\n\n if (typeof message.content === 'string') {\n return;\n }\n\n if (message.content === null || message.content === undefined) {\n return;\n }\n\n message.content = JSON.stringify(message.content, message.replacer);\n\n if (!message.headers.has('Content-Type')) {\n message.headers.add('Content-Type', 'application/json');\n }\n}\n\nexport var JSONPRequestMessage = function (_RequestMessage) {\n _inherits(JSONPRequestMessage, _RequestMessage);\n\n function JSONPRequestMessage(url, callbackParameterName) {\n \n\n var _this2 = _possibleConstructorReturn(this, _RequestMessage.call(this, 'JSONP', url));\n\n _this2.responseType = 'jsonp';\n _this2.callbackParameterName = callbackParameterName;\n return _this2;\n }\n\n return JSONPRequestMessage;\n}(RequestMessage);\n\nvar JSONPXHR = function () {\n function JSONPXHR() {\n \n }\n\n JSONPXHR.prototype.open = function open(method, url) {\n this.method = method;\n this.url = url;\n this.callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random());\n };\n\n JSONPXHR.prototype.send = function send() {\n var _this3 = this;\n\n var url = this.url + (this.url.indexOf('?') >= 0 ? '&' : '?') + encodeURIComponent(this.callbackParameterName) + '=' + this.callbackName;\n var script = DOM.createElement('script');\n\n script.src = url;\n script.onerror = function (e) {\n cleanUp();\n\n _this3.status = 0;\n _this3.onerror(new Error('error'));\n };\n\n var cleanUp = function cleanUp() {\n delete PLATFORM.global[_this3.callbackName];\n DOM.removeNode(script);\n };\n\n PLATFORM.global[this.callbackName] = function (data) {\n cleanUp();\n\n if (_this3.status === undefined) {\n _this3.status = 200;\n _this3.statusText = 'OK';\n _this3.response = data;\n _this3.onload(_this3);\n }\n };\n\n DOM.appendNode(script);\n\n if (this.timeout !== undefined) {\n setTimeout(function () {\n if (_this3.status === undefined) {\n _this3.status = 0;\n _this3.ontimeout(new Error('timeout'));\n }\n }, this.timeout);\n }\n };\n\n JSONPXHR.prototype.abort = function abort() {\n if (this.status === undefined) {\n this.status = 0;\n this.onabort(new Error('abort'));\n }\n };\n\n JSONPXHR.prototype.setRequestHeader = function setRequestHeader() {};\n\n return JSONPXHR;\n}();\n\nexport function createJSONPRequestMessageProcessor() {\n return new RequestMessageProcessor(JSONPXHR, [timeoutTransformer, callbackParameterNameTransformer]);\n}\n\nexport var HttpRequestMessage = function (_RequestMessage2) {\n _inherits(HttpRequestMessage, _RequestMessage2);\n\n function HttpRequestMessage(method, url, content, headers) {\n \n\n var _this4 = _possibleConstructorReturn(this, _RequestMessage2.call(this, method, url, content, headers));\n\n _this4.responseType = 'json';return _this4;\n }\n\n return HttpRequestMessage;\n}(RequestMessage);\n\nexport function createHttpRequestMessageProcessor() {\n return new RequestMessageProcessor(PLATFORM.XMLHttpRequest, [timeoutTransformer, credentialsTransformer, progressTransformer, downloadProgressTransformer, responseTypeTransformer, contentTransformer, headerTransformer]);\n}\n\nexport var ErrorHttpResponseMessage = function (_HttpResponseMessage) {\n _inherits(ErrorHttpResponseMessage, _HttpResponseMessage);\n\n function ErrorHttpResponseMessage(responseMessage) {\n \n\n var _this5 = _possibleConstructorReturn(this, _HttpResponseMessage.call(this, responseMessage.requestMessage, {\n response: responseMessage.response,\n status: responseMessage.statusCode,\n statusText: responseMessage.statusText\n }, responseMessage.responseType));\n\n _this5.name = responseMessage.responseType;\n _this5.message = 'Error: ' + responseMessage.statusCode + ' Status: ' + responseMessage.statusText;\n return _this5;\n }\n\n return ErrorHttpResponseMessage;\n}(HttpResponseMessage);\n\nexport var RequestBuilder = function () {\n function RequestBuilder(client) {\n \n\n this.client = client;\n this.transformers = client.requestTransformers.slice(0);\n this.useJsonp = false;\n }\n\n RequestBuilder.prototype.asDelete = function asDelete() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'DELETE';\n });\n };\n\n RequestBuilder.prototype.asGet = function asGet() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'GET';\n });\n };\n\n RequestBuilder.prototype.asHead = function asHead() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'HEAD';\n });\n };\n\n RequestBuilder.prototype.asOptions = function asOptions() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'OPTIONS';\n });\n };\n\n RequestBuilder.prototype.asPatch = function asPatch() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'PATCH';\n });\n };\n\n RequestBuilder.prototype.asPost = function asPost() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'POST';\n });\n };\n\n RequestBuilder.prototype.asPut = function asPut() {\n return this._addTransformer(function (client, processor, message) {\n message.method = 'PUT';\n });\n };\n\n RequestBuilder.prototype.asJsonp = function asJsonp(callbackParameterName) {\n this.useJsonp = true;\n return this._addTransformer(function (client, processor, message) {\n message.callbackParameterName = callbackParameterName;\n });\n };\n\n RequestBuilder.prototype.withUrl = function withUrl(url) {\n return this._addTransformer(function (client, processor, message) {\n message.url = url;\n });\n };\n\n RequestBuilder.prototype.withContent = function withContent(content) {\n return this._addTransformer(function (client, processor, message) {\n message.content = content;\n });\n };\n\n RequestBuilder.prototype.withBaseUrl = function withBaseUrl(baseUrl) {\n return this._addTransformer(function (client, processor, message) {\n message.baseUrl = baseUrl;\n });\n };\n\n RequestBuilder.prototype.withParams = function withParams(params, traditional) {\n return this._addTransformer(function (client, processor, message) {\n message.traditional = traditional;\n message.params = params;\n });\n };\n\n RequestBuilder.prototype.withResponseType = function withResponseType(responseType) {\n return this._addTransformer(function (client, processor, message) {\n message.responseType = responseType;\n });\n };\n\n RequestBuilder.prototype.withTimeout = function withTimeout(timeout) {\n return this._addTransformer(function (client, processor, message) {\n message.timeout = timeout;\n });\n };\n\n RequestBuilder.prototype.withHeader = function withHeader(key, value) {\n return this._addTransformer(function (client, processor, message) {\n message.headers.add(key, value);\n });\n };\n\n RequestBuilder.prototype.withCredentials = function withCredentials(value) {\n return this._addTransformer(function (client, processor, message) {\n message.withCredentials = value;\n });\n };\n\n RequestBuilder.prototype.withLogin = function withLogin(user, password) {\n return this._addTransformer(function (client, processor, message) {\n message.user = user;message.password = password;\n });\n };\n\n RequestBuilder.prototype.withReviver = function withReviver(reviver) {\n return this._addTransformer(function (client, processor, message) {\n message.reviver = reviver;\n });\n };\n\n RequestBuilder.prototype.withReplacer = function withReplacer(replacer) {\n return this._addTransformer(function (client, processor, message) {\n message.replacer = replacer;\n });\n };\n\n RequestBuilder.prototype.withProgressCallback = function withProgressCallback(progressCallback) {\n return this._addTransformer(function (client, processor, message) {\n message.progressCallback = progressCallback;\n });\n };\n\n RequestBuilder.prototype.withDownloadProgressCallback = function withDownloadProgressCallback(downloadProgressCallback) {\n return this._addTransformer(function (client, processor, message) {\n message.downloadProgressCallback = downloadProgressCallback;\n });\n };\n\n RequestBuilder.prototype.withCallbackParameterName = function withCallbackParameterName(callbackParameterName) {\n return this._addTransformer(function (client, processor, message) {\n message.callbackParameterName = callbackParameterName;\n });\n };\n\n RequestBuilder.prototype.withInterceptor = function withInterceptor(interceptor) {\n return this._addTransformer(function (client, processor, message) {\n message.interceptors = message.interceptors || [];\n message.interceptors.unshift(interceptor);\n });\n };\n\n RequestBuilder.prototype.skipContentProcessing = function skipContentProcessing() {\n return this._addTransformer(function (client, processor, message) {\n message.skipContentProcessing = true;\n });\n };\n\n RequestBuilder.prototype._addTransformer = function _addTransformer(fn) {\n this.transformers.push(fn);\n return this;\n };\n\n RequestBuilder.addHelper = function addHelper(name, fn) {\n RequestBuilder.prototype[name] = function () {\n return this._addTransformer(fn.apply(this, arguments));\n };\n };\n\n RequestBuilder.prototype.send = function send() {\n var message = this.useJsonp ? new JSONPRequestMessage() : new HttpRequestMessage();\n return this.client.send(message, this.transformers);\n };\n\n return RequestBuilder;\n}();\n\nfunction trackRequestStart(client, processor) {\n client.pendingRequests.push(processor);\n client.isRequesting = true;\n}\n\nfunction trackRequestEnd(client, processor) {\n var index = client.pendingRequests.indexOf(processor);\n\n client.pendingRequests.splice(index, 1);\n client.isRequesting = client.pendingRequests.length > 0;\n\n if (!client.isRequesting) {\n var evt = DOM.createCustomEvent('aurelia-http-client-requests-drained', { bubbles: true, cancelable: true });\n setTimeout(function () {\n return DOM.dispatchEvent(evt);\n }, 1);\n }\n}\n\nexport var HttpClient = function () {\n function HttpClient() {\n \n\n this.isRequesting = false;\n\n this.rejectPromiseWithErrorObject = false;\n this.requestTransformers = [];\n this.requestProcessorFactories = new Map();\n this.requestProcessorFactories.set(HttpRequestMessage, createHttpRequestMessageProcessor);\n this.requestProcessorFactories.set(JSONPRequestMessage, createJSONPRequestMessageProcessor);\n this.pendingRequests = [];\n }\n\n HttpClient.prototype.configure = function configure(fn) {\n var builder = new RequestBuilder(this);\n fn(builder);\n this.requestTransformers = builder.transformers;\n return this;\n };\n\n HttpClient.prototype.createRequest = function createRequest(url) {\n var builder = new RequestBuilder(this);\n\n if (url) {\n builder.withUrl(url);\n }\n\n return builder;\n };\n\n HttpClient.prototype.send = function send(requestMessage, transformers) {\n var _this6 = this;\n\n var createProcessor = this.requestProcessorFactories.get(requestMessage.constructor);\n var processor = void 0;\n var promise = void 0;\n var i = void 0;\n var ii = void 0;\n\n if (!createProcessor) {\n throw new Error('No request message processor factory for ' + requestMessage.constructor + '.');\n }\n\n processor = createProcessor();\n trackRequestStart(this, processor);\n\n transformers = transformers || this.requestTransformers;\n\n promise = Promise.resolve(requestMessage).then(function (message) {\n for (i = 0, ii = transformers.length; i < ii; ++i) {\n transformers[i](_this6, processor, message);\n }\n\n return processor.process(_this6, message).then(function (response) {\n trackRequestEnd(_this6, processor);\n return response;\n }).catch(function (response) {\n trackRequestEnd(_this6, processor);\n throw response;\n });\n });\n\n promise.abort = promise.cancel = function () {\n processor.abort();\n };\n\n return promise;\n };\n\n HttpClient.prototype.delete = function _delete(url) {\n return this.createRequest(url).asDelete().send();\n };\n\n HttpClient.prototype.get = function get(url, params, traditional) {\n var req = this.createRequest(url).asGet();\n\n if (params) {\n return req.withParams(params, traditional).send();\n }\n\n return req.send();\n };\n\n HttpClient.prototype.head = function head(url) {\n return this.createRequest(url).asHead().send();\n };\n\n HttpClient.prototype.jsonp = function jsonp(url) {\n var callbackParameterName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'jsoncallback';\n\n return this.createRequest(url).asJsonp(callbackParameterName).send();\n };\n\n HttpClient.prototype.options = function options(url) {\n return this.createRequest(url).asOptions().send();\n };\n\n HttpClient.prototype.put = function put(url, content) {\n return this.createRequest(url).asPut().withContent(content).send();\n };\n\n HttpClient.prototype.patch = function patch(url, content) {\n return this.createRequest(url).asPatch().withContent(content).send();\n };\n\n HttpClient.prototype.post = function post(url, content) {\n return this.createRequest(url).asPost().withContent(content).send();\n };\n\n return HttpClient;\n}();","import { Loader } from 'aurelia-loader';\nimport { Origin } from 'aurelia-metadata';\nimport { PLATFORM, DOM } from 'aurelia-pal';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\n/**\r\n* An implementation of the TemplateLoader interface implemented with text-based loading.\r\n*/\r\nvar TextTemplateLoader = /** @class */ (function () {\r\n function TextTemplateLoader() {\r\n }\r\n /**\r\n * Loads a template.\r\n * @param loader The loader that is requesting the template load.\r\n * @param entry The TemplateRegistryEntry to load and populate with a template.\r\n * @return A promise which resolves when the TemplateRegistryEntry is loaded with a template.\r\n */\r\n TextTemplateLoader.prototype.loadTemplate = function (loader, entry) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var text;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, loader.loadText(entry.address)];\r\n case 1:\r\n text = _a.sent();\r\n entry.template = DOM.createTemplateFromMarkup(text);\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n return TextTemplateLoader;\r\n}());\r\nfunction ensureOriginOnExports(moduleExports, moduleId) {\r\n var target = moduleExports;\r\n var key;\r\n var exportedValue;\r\n if (target.__useDefault) {\r\n target = target.default;\r\n }\r\n Origin.set(target, new Origin(moduleId, 'default'));\r\n if (typeof target === 'object') {\r\n for (key in target) {\r\n exportedValue = target[key];\r\n if (typeof exportedValue === 'function') {\r\n Origin.set(exportedValue, new Origin(moduleId, key));\r\n }\r\n }\r\n }\r\n return moduleExports;\r\n}\r\n/**\r\n* A default implementation of the Loader abstraction which works with webpack (extended common-js style).\r\n*/\r\nvar WebpackLoader = /** @class */ (function (_super) {\r\n __extends(WebpackLoader, _super);\r\n function WebpackLoader() {\r\n var _this = _super.call(this) || this;\r\n _this.moduleRegistry = Object.create(null);\r\n _this.loaderPlugins = Object.create(null);\r\n _this.modulesBeingLoaded = new Map();\r\n _this.useTemplateLoader(new TextTemplateLoader());\r\n _this.addPlugin('template-registry-entry', {\r\n fetch: function (moduleId) { return __awaiter(_this, void 0, void 0, function () {\r\n var HmrContext, entry;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // HMR:\r\n if (module.hot) {\r\n if (!this.hmrContext) {\r\n HmrContext = require('aurelia-hot-module-reload').HmrContext;\r\n this.hmrContext = new HmrContext(this);\r\n }\r\n module.hot.accept(moduleId, function () { return __awaiter(_this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.hmrContext.handleViewChange(moduleId)];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n }); });\r\n }\r\n entry = this.getOrCreateTemplateRegistryEntry(moduleId);\r\n if (!!entry.templateIsLoaded) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.templateLoader.loadTemplate(this, entry)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2: return [2 /*return*/, entry];\r\n }\r\n });\r\n }); }\r\n });\r\n PLATFORM.eachModule = function (callback) {\r\n var registry = __webpack_require__.c;\r\n var cachedModuleIds = Object.getOwnPropertyNames(registry);\r\n cachedModuleIds\r\n // Note: we use .some here like a .forEach that can be \"break\"ed out of.\r\n // It will stop iterating only when a truthy value is returned.\r\n // Even though the docs say \"true\" explicitly, loader-default also goes by truthy\r\n // and this is to keep it consistent with that.\r\n .some(function (moduleId) {\r\n var moduleExports = registry[moduleId].exports;\r\n if (typeof moduleExports === 'object') {\r\n return callback(moduleId, moduleExports);\r\n }\r\n return false;\r\n });\r\n };\r\n return _this;\r\n }\r\n WebpackLoader.prototype._import = function (address, defaultHMR) {\r\n if (defaultHMR === void 0) { defaultHMR = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var addressParts, moduleId, loaderPlugin, plugin_1, asyncModuleId, callback;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n addressParts = address.split('!');\r\n moduleId = addressParts.splice(addressParts.length - 1, 1)[0];\r\n loaderPlugin = addressParts.length === 1 ? addressParts[0] : null;\r\n if (!loaderPlugin) return [3 /*break*/, 2];\r\n plugin_1 = this.loaderPlugins[loaderPlugin];\r\n if (!plugin_1) {\r\n throw new Error(\"Plugin \" + loaderPlugin + \" is not registered in the loader.\");\r\n }\r\n if (module.hot && plugin_1.hot) {\r\n module.hot.accept(moduleId, function () { return plugin_1.hot(moduleId); });\r\n }\r\n return [4 /*yield*/, plugin_1.fetch(moduleId)];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n case 2:\r\n if (__webpack_require__.m[moduleId]) {\r\n if (defaultHMR && module.hot && this.hmrContext) {\r\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n }\r\n return [2 /*return*/, __webpack_require__(moduleId)];\r\n }\r\n asyncModuleId = \"async!\" + moduleId;\r\n if (!__webpack_require__.m[asyncModuleId]) return [3 /*break*/, 4];\r\n if (defaultHMR && module.hot && this.hmrContext) {\r\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n module.hot.accept(asyncModuleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n }\r\n callback = __webpack_require__(asyncModuleId);\r\n return [4 /*yield*/, new Promise(callback)];\r\n case 3: return [2 /*return*/, _a.sent()];\r\n case 4: throw new Error(\"Unable to find module with ID: \" + moduleId);\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Maps a module id to a source.\r\n * @param id The module id.\r\n * @param source The source to map the module to.\r\n */\r\n WebpackLoader.prototype.map = function (id, source) { };\r\n /**\r\n * Normalizes a module id.\r\n * @param moduleId The module id to normalize.\r\n * @param relativeTo What the module id should be normalized relative to.\r\n * @return The normalized module id.\r\n */\r\n WebpackLoader.prototype.normalizeSync = function (moduleId, relativeTo) {\r\n return moduleId;\r\n };\r\n /**\r\n * Normalizes a module id.\r\n * @param moduleId The module id to normalize.\r\n * @param relativeTo What the module id should be normalized relative to.\r\n * @return The normalized module id.\r\n */\r\n WebpackLoader.prototype.normalize = function (moduleId, relativeTo) {\r\n return Promise.resolve(moduleId);\r\n };\r\n /**\r\n * Instructs the loader to use a specific TemplateLoader instance for loading templates\r\n * @param templateLoader The instance of TemplateLoader to use for loading templates.\r\n */\r\n WebpackLoader.prototype.useTemplateLoader = function (templateLoader) {\r\n this.templateLoader = templateLoader;\r\n };\r\n /**\r\n * Loads a collection of modules.\r\n * @param ids The set of module ids to load.\r\n * @return A Promise for an array of loaded modules.\r\n */\r\n WebpackLoader.prototype.loadAllModules = function (ids) {\r\n var _this = this;\r\n return Promise.all(ids.map(function (id) { return _this.loadModule(id); }));\r\n };\r\n /**\r\n * Loads a module.\r\n * @param moduleId The module ID to load.\r\n * @return A Promise for the loaded module.\r\n */\r\n WebpackLoader.prototype.loadModule = function (moduleId, defaultHMR) {\r\n if (defaultHMR === void 0) { defaultHMR = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var existing, beingLoaded, moduleExports;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n existing = this.moduleRegistry[moduleId];\r\n if (existing) {\r\n return [2 /*return*/, existing];\r\n }\r\n beingLoaded = this.modulesBeingLoaded.get(moduleId);\r\n if (beingLoaded) {\r\n return [2 /*return*/, beingLoaded];\r\n }\r\n beingLoaded = this._import(moduleId, defaultHMR);\r\n this.modulesBeingLoaded.set(moduleId, beingLoaded);\r\n return [4 /*yield*/, beingLoaded];\r\n case 1:\r\n moduleExports = _a.sent();\r\n this.moduleRegistry[moduleId] = ensureOriginOnExports(moduleExports, moduleId);\r\n this.modulesBeingLoaded.delete(moduleId);\r\n return [2 /*return*/, moduleExports];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Loads a template.\r\n * @param url The url of the template to load.\r\n * @return A Promise for a TemplateRegistryEntry containing the template.\r\n */\r\n WebpackLoader.prototype.loadTemplate = function (url) {\r\n return this.loadModule(this.applyPluginToUrl(url, 'template-registry-entry'), false);\r\n };\r\n /**\r\n * Loads a text-based resource.\r\n * @param url The url of the text file to load.\r\n * @return A Promise for text content.\r\n */\r\n WebpackLoader.prototype.loadText = function (url) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var result, defaultExport;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.loadModule(url, false)];\r\n case 1:\r\n result = _a.sent();\r\n defaultExport = result && result.__esModule ? result.default : result;\r\n if (this.isCssLoaderModule(defaultExport)) {\r\n // we're dealing with a file loaded using the css-loader:\r\n return [2 /*return*/, this.getCssText(defaultExport)];\r\n }\r\n return [2 /*return*/, typeof result === \"string\" ? result : defaultExport];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Check if a loaded module is a css-loader module\r\n * @param o The loaded module\r\n * @returns `true` when {@link o} is a {@link CssLoaderModule}; otherwise false\r\n */\r\n WebpackLoader.prototype.isCssLoaderModule = function (o) {\r\n return o instanceof Array && o[0] instanceof Array && o.hasOwnProperty('toString');\r\n };\r\n /**\r\n * Get CSS text from loaded css-loader module\r\n * @param cssLoaderModule The {@link CssLoaderModule}\r\n * @returns The css content with potential source map references\r\n */\r\n WebpackLoader.prototype.getCssText = function (cssLoaderModule) {\r\n var result = cssLoaderModule.toString();\r\n // If some css-loader modules include source maps,\r\n // ensure /*# sourceURL=[...] */ is removed to avoid chrome devtools problems\r\n if (cssLoaderModule.some(function (m) { return m[3]; })) {\r\n result = result.replace(/^\\/\\*# sourceURL=.* \\*\\/\\s*\\n/gm, \"\");\r\n }\r\n return result;\r\n };\r\n /**\r\n * Alters a module id so that it includes a plugin loader.\r\n * @param url The url of the module to load.\r\n * @param pluginName The plugin to apply to the module id.\r\n * @return The plugin-based module id.\r\n */\r\n WebpackLoader.prototype.applyPluginToUrl = function (url, pluginName) {\r\n return pluginName + \"!\" + url;\r\n };\r\n /**\r\n * Registers a plugin with the loader.\r\n * @param pluginName The name of the plugin.\r\n * @param implementation The plugin implementation.\r\n */\r\n WebpackLoader.prototype.addPlugin = function (pluginName, implementation) {\r\n this.loaderPlugins[pluginName] = implementation;\r\n };\r\n return WebpackLoader;\r\n}(Loader));\r\nPLATFORM.Loader = WebpackLoader;\n\nexport { TextTemplateLoader, WebpackLoader, ensureOriginOnExports };\n","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\n\nimport { relativeToFile } from 'aurelia-path';\nimport { Origin } from 'aurelia-metadata';\n\nexport var TemplateDependency = function TemplateDependency(src, name) {\n \n\n this.src = src;\n this.name = name;\n};\n\nexport var TemplateRegistryEntry = function () {\n function TemplateRegistryEntry(address) {\n \n\n this.templateIsLoaded = false;\n this.factoryIsReady = false;\n this.resources = null;\n this.dependencies = null;\n\n this.address = address;\n this.onReady = null;\n this._template = null;\n this._factory = null;\n }\n\n TemplateRegistryEntry.prototype.addDependency = function addDependency(src, name) {\n var finalSrc = typeof src === 'string' ? relativeToFile(src, this.address) : Origin.get(src).moduleId;\n\n this.dependencies.push(new TemplateDependency(finalSrc, name));\n };\n\n _createClass(TemplateRegistryEntry, [{\n key: 'template',\n get: function get() {\n return this._template;\n },\n set: function set(value) {\n var address = this.address;\n var requires = void 0;\n var current = void 0;\n var src = void 0;\n var dependencies = void 0;\n\n this._template = value;\n this.templateIsLoaded = true;\n\n requires = value.content.querySelectorAll('require');\n dependencies = this.dependencies = new Array(requires.length);\n\n for (var i = 0, ii = requires.length; i < ii; ++i) {\n current = requires[i];\n src = current.getAttribute('from');\n\n if (!src) {\n throw new Error(' element in ' + address + ' has no \"from\" attribute.');\n }\n\n dependencies[i] = new TemplateDependency(relativeToFile(src, address), current.getAttribute('as'));\n\n if (current.parentNode) {\n current.parentNode.removeChild(current);\n }\n }\n }\n }, {\n key: 'factory',\n get: function get() {\n return this._factory;\n },\n set: function set(value) {\n this._factory = value;\n this.factoryIsReady = true;\n }\n }]);\n\n return TemplateRegistryEntry;\n}();\n\nexport var Loader = function () {\n function Loader() {\n \n\n this.templateRegistry = {};\n }\n\n Loader.prototype.map = function map(id, source) {\n throw new Error('Loaders must implement map(id, source).');\n };\n\n Loader.prototype.normalizeSync = function normalizeSync(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalizeSync(moduleId, relativeTo).');\n };\n\n Loader.prototype.normalize = function normalize(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalize(moduleId: string, relativeTo: string): Promise.');\n };\n\n Loader.prototype.loadModule = function loadModule(id) {\n throw new Error('Loaders must implement loadModule(id).');\n };\n\n Loader.prototype.loadAllModules = function loadAllModules(ids) {\n throw new Error('Loader must implement loadAllModules(ids).');\n };\n\n Loader.prototype.loadTemplate = function loadTemplate(url) {\n throw new Error('Loader must implement loadTemplate(url).');\n };\n\n Loader.prototype.loadText = function loadText(url) {\n throw new Error('Loader must implement loadText(url).');\n };\n\n Loader.prototype.applyPluginToUrl = function applyPluginToUrl(url, pluginName) {\n throw new Error('Loader must implement applyPluginToUrl(url, pluginName).');\n };\n\n Loader.prototype.addPlugin = function addPlugin(pluginName, implementation) {\n throw new Error('Loader must implement addPlugin(pluginName, implementation).');\n };\n\n Loader.prototype.getOrCreateTemplateRegistryEntry = function getOrCreateTemplateRegistryEntry(address) {\n return this.templateRegistry[address] || (this.templateRegistry[address] = new TemplateRegistryEntry(address));\n };\n\n return Loader;\n}();","\n\nexport var ConsoleAppender = function () {\n function ConsoleAppender() {\n \n }\n\n ConsoleAppender.prototype.debug = function debug(logger) {\n var _console;\n\n for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n (_console = console).debug.apply(_console, [\"DEBUG [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.info = function info(logger) {\n var _console2;\n\n for (var _len2 = arguments.length, rest = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n (_console2 = console).info.apply(_console2, [\"INFO [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.warn = function warn(logger) {\n var _console3;\n\n for (var _len3 = arguments.length, rest = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n rest[_key3 - 1] = arguments[_key3];\n }\n\n (_console3 = console).warn.apply(_console3, [\"WARN [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.error = function error(logger) {\n var _console4;\n\n for (var _len4 = arguments.length, rest = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n rest[_key4 - 1] = arguments[_key4];\n }\n\n (_console4 = console).error.apply(_console4, [\"ERROR [\" + logger.id + \"]\"].concat(rest));\n };\n\n return ConsoleAppender;\n}();","\n\nexport var logLevel = {\n none: 0,\n error: 10,\n warn: 20,\n info: 30,\n debug: 40\n};\n\nvar loggers = {};\nvar appenders = [];\nvar globalDefaultLevel = logLevel.none;\n\nvar standardLevels = ['none', 'error', 'warn', 'info', 'debug'];\nfunction isStandardLevel(level) {\n return standardLevels.filter(function (l) {\n return l === level;\n }).length > 0;\n}\n\nfunction appendArgs() {\n return [this].concat(Array.prototype.slice.call(arguments));\n}\n\nfunction logFactory(level) {\n var threshold = logLevel[level];\n return function () {\n if (this.level < threshold) {\n return;\n }\n\n var args = appendArgs.apply(this, arguments);\n var i = appenders.length;\n while (i--) {\n var _appenders$i;\n\n (_appenders$i = appenders[i])[level].apply(_appenders$i, args);\n }\n };\n}\n\nfunction logFactoryCustom(level) {\n var threshold = logLevel[level];\n return function () {\n if (this.level < threshold) {\n return;\n }\n\n var args = appendArgs.apply(this, arguments);\n var i = appenders.length;\n while (i--) {\n var appender = appenders[i];\n if (appender[level] !== undefined) {\n appender[level].apply(appender, args);\n }\n }\n };\n}\n\nfunction connectLoggers() {\n var proto = Logger.prototype;\n for (var _level in logLevel) {\n if (isStandardLevel(_level)) {\n if (_level !== 'none') {\n proto[_level] = logFactory(_level);\n }\n } else {\n proto[_level] = logFactoryCustom(_level);\n }\n }\n}\n\nfunction disconnectLoggers() {\n var proto = Logger.prototype;\n for (var _level2 in logLevel) {\n if (_level2 !== 'none') {\n proto[_level2] = function () {};\n }\n }\n}\n\nexport function getLogger(id) {\n return loggers[id] || new Logger(id);\n}\n\nexport function addAppender(appender) {\n if (appenders.push(appender) === 1) {\n connectLoggers();\n }\n}\n\nexport function removeAppender(appender) {\n appenders = appenders.filter(function (a) {\n return a !== appender;\n });\n}\n\nexport function getAppenders() {\n return [].concat(appenders);\n}\n\nexport function clearAppenders() {\n appenders = [];\n disconnectLoggers();\n}\n\nexport function addCustomLevel(name, value) {\n if (logLevel[name] !== undefined) {\n throw Error('Log level \"' + name + '\" already exists.');\n }\n\n if (isNaN(value)) {\n throw Error('Value must be a number.');\n }\n\n logLevel[name] = value;\n\n if (appenders.length > 0) {\n connectLoggers();\n } else {\n Logger.prototype[name] = function () {};\n }\n}\n\nexport function removeCustomLevel(name) {\n if (logLevel[name] === undefined) {\n return;\n }\n\n if (isStandardLevel(name)) {\n throw Error('Built-in log level \"' + name + '\" cannot be removed.');\n }\n\n delete logLevel[name];\n delete Logger.prototype[name];\n}\n\nexport function setLevel(level) {\n globalDefaultLevel = level;\n for (var key in loggers) {\n loggers[key].setLevel(level);\n }\n}\n\nexport function getLevel() {\n return globalDefaultLevel;\n}\n\nexport var Logger = function () {\n function Logger(id) {\n \n\n var cached = loggers[id];\n if (cached) {\n return cached;\n }\n\n loggers[id] = this;\n this.id = id;\n this.level = globalDefaultLevel;\n }\n\n Logger.prototype.debug = function debug(message) {};\n\n Logger.prototype.info = function info(message) {};\n\n Logger.prototype.warn = function warn(message) {};\n\n Logger.prototype.error = function error(message) {};\n\n Logger.prototype.setLevel = function setLevel(level) {\n this.level = level;\n };\n\n Logger.prototype.isDebugEnabled = function isDebugEnabled() {\n return this.level === logLevel.debug;\n };\n\n return Logger;\n}();","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\r\n\r\n\r\n\r\nimport { PLATFORM } from 'aurelia-pal';\r\n\r\nfunction isObject(val) {\r\n return val && (typeof val === 'function' || (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object');\r\n}\r\n\r\nexport var metadata = {\r\n resource: 'aurelia:resource',\r\n paramTypes: 'design:paramtypes',\r\n propertyType: 'design:type',\r\n properties: 'design:properties',\r\n get: function get(metadataKey, target, targetKey) {\r\n if (!isObject(target)) {\r\n return undefined;\r\n }\r\n var result = metadata.getOwn(metadataKey, target, targetKey);\r\n return result === undefined ? metadata.get(metadataKey, Object.getPrototypeOf(target), targetKey) : result;\r\n },\r\n getOwn: function getOwn(metadataKey, target, targetKey) {\r\n if (!isObject(target)) {\r\n return undefined;\r\n }\r\n return Reflect.getOwnMetadata(metadataKey, target, targetKey);\r\n },\r\n define: function define(metadataKey, metadataValue, target, targetKey) {\r\n Reflect.defineMetadata(metadataKey, metadataValue, target, targetKey);\r\n },\r\n getOrCreateOwn: function getOrCreateOwn(metadataKey, Type, target, targetKey) {\r\n var result = metadata.getOwn(metadataKey, target, targetKey);\r\n\r\n if (result === undefined) {\r\n result = new Type();\r\n Reflect.defineMetadata(metadataKey, result, target, targetKey);\r\n }\r\n\r\n return result;\r\n }\r\n};\r\n\r\nvar originStorage = new Map();\r\nvar unknownOrigin = Object.freeze({ moduleId: undefined, moduleMember: undefined });\r\n\r\nexport var Origin = function () {\r\n function Origin(moduleId, moduleMember) {\r\n \r\n\r\n this.moduleId = moduleId;\r\n this.moduleMember = moduleMember;\r\n }\r\n\r\n Origin.get = function get(fn) {\r\n var origin = originStorage.get(fn);\r\n\r\n if (origin === undefined) {\r\n PLATFORM.eachModule(function (key, value) {\r\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\r\n var isBrowserWindow = typeof window !== 'undefined' && value === window;\r\n for (var name in value) {\r\n if (isBrowserWindow && name === 'webkitStorageInfo') {\r\n continue;\r\n }\r\n try {\r\n var exp = value[name];\r\n if (exp === fn) {\r\n originStorage.set(fn, origin = new Origin(key, name));\r\n return true;\r\n }\r\n } catch (e) {}\r\n }\r\n }\r\n\r\n if (value === fn) {\r\n originStorage.set(fn, origin = new Origin(key, 'default'));\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n }\r\n\r\n return origin || unknownOrigin;\r\n };\r\n\r\n Origin.set = function set(fn, origin) {\r\n originStorage.set(fn, origin);\r\n };\r\n\r\n return Origin;\r\n}();\r\n\r\nexport function decorators() {\r\n for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {\r\n rest[_key] = arguments[_key];\r\n }\r\n\r\n var applicator = function applicator(target, key, descriptor) {\r\n var i = rest.length;\r\n\r\n if (key) {\r\n descriptor = descriptor || {\r\n value: target[key],\r\n writable: true,\r\n configurable: true,\r\n enumerable: true\r\n };\r\n\r\n while (i--) {\r\n descriptor = rest[i](target, key, descriptor) || descriptor;\r\n }\r\n\r\n Object.defineProperty(target, key, descriptor);\r\n } else {\r\n while (i--) {\r\n target = rest[i](target) || target;\r\n }\r\n }\r\n\r\n return target;\r\n };\r\n\r\n applicator.on = applicator;\r\n return applicator;\r\n}\r\n\r\nexport function deprecated(optionsOrTarget, maybeKey, maybeDescriptor) {\r\n function decorator(target, key, descriptor) {\r\n var methodSignature = target.constructor.name + '#' + key;\r\n var options = maybeKey ? {} : optionsOrTarget || {};\r\n var message = 'DEPRECATION - ' + methodSignature;\r\n\r\n if (typeof descriptor.value !== 'function') {\r\n throw new SyntaxError('Only methods can be marked as deprecated.');\r\n }\r\n\r\n if (options.message) {\r\n message += ' - ' + options.message;\r\n }\r\n\r\n return _extends({}, descriptor, {\r\n value: function deprecationWrapper() {\r\n if (options.error) {\r\n throw new Error(message);\r\n } else {\r\n console.warn(message);\r\n }\r\n\r\n return descriptor.value.apply(this, arguments);\r\n }\r\n });\r\n }\r\n\r\n return maybeKey ? decorator(optionsOrTarget, maybeKey, maybeDescriptor) : decorator;\r\n}\r\n\r\nexport function mixin(behavior) {\r\n var instanceKeys = Object.keys(behavior);\r\n\r\n function _mixin(possible) {\r\n var decorator = function decorator(target) {\r\n var resolvedTarget = typeof target === 'function' ? target.prototype : target;\r\n\r\n var i = instanceKeys.length;\r\n while (i--) {\r\n var property = instanceKeys[i];\r\n Object.defineProperty(resolvedTarget, property, {\r\n value: behavior[property],\r\n writable: true\r\n });\r\n }\r\n };\r\n\r\n return possible ? decorator(possible) : decorator;\r\n }\r\n\r\n return _mixin;\r\n}\r\n\r\nfunction alwaysValid() {\r\n return true;\r\n}\r\nfunction noCompose() {}\r\n\r\nfunction ensureProtocolOptions(options) {\r\n if (options === undefined) {\r\n options = {};\r\n } else if (typeof options === 'function') {\r\n options = {\r\n validate: options\r\n };\r\n }\r\n\r\n if (!options.validate) {\r\n options.validate = alwaysValid;\r\n }\r\n\r\n if (!options.compose) {\r\n options.compose = noCompose;\r\n }\r\n\r\n return options;\r\n}\r\n\r\nfunction createProtocolValidator(validate) {\r\n return function (target) {\r\n var result = validate(target);\r\n return result === true;\r\n };\r\n}\r\n\r\nfunction createProtocolAsserter(name, validate) {\r\n return function (target) {\r\n var result = validate(target);\r\n if (result !== true) {\r\n throw new Error(result || name + ' was not correctly implemented.');\r\n }\r\n };\r\n}\r\n\r\nexport function protocol(name, options) {\r\n options = ensureProtocolOptions(options);\r\n\r\n var result = function result(target) {\r\n var resolvedTarget = typeof target === 'function' ? target.prototype : target;\r\n\r\n options.compose(resolvedTarget);\r\n result.assert(resolvedTarget);\r\n\r\n Object.defineProperty(resolvedTarget, 'protocol:' + name, {\r\n enumerable: false,\r\n configurable: false,\r\n writable: false,\r\n value: true\r\n });\r\n };\r\n\r\n result.validate = createProtocolValidator(options.validate);\r\n result.assert = createProtocolAsserter(name, options.validate);\r\n\r\n return result;\r\n}\r\n\r\nprotocol.create = function (name, options) {\r\n options = ensureProtocolOptions(options);\r\n var hidden = 'protocol:' + name;\r\n var result = function result(target) {\r\n var decorator = protocol(name, options);\r\n return target ? decorator(target) : decorator;\r\n };\r\n\r\n result.decorates = function (obj) {\r\n return obj[hidden] === true;\r\n };\r\n result.validate = createProtocolValidator(options.validate);\r\n result.assert = createProtocolAsserter(name, options.validate);\r\n\r\n return result;\r\n};","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nimport { initializePAL, isInitialized } from 'aurelia-pal';\n\nexport var _PLATFORM = {\n location: window.location,\n history: window.history,\n addEventListener: function addEventListener(eventName, callback, capture) {\n this.global.addEventListener(eventName, callback, capture);\n },\n removeEventListener: function removeEventListener(eventName, callback, capture) {\n this.global.removeEventListener(eventName, callback, capture);\n },\n\n performance: window.performance,\n requestAnimationFrame: function requestAnimationFrame(callback) {\n return this.global.requestAnimationFrame(callback);\n }\n};\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var test = function test() {};\n\n if (test.name === undefined) {\n Object.defineProperty(Function.prototype, 'name', {\n get: function get() {\n var name = this.toString().match(/^\\s*function\\s*(\\S*)\\s*\\(/)[1];\n\n Object.defineProperty(this, 'name', { value: name });\n return name;\n }\n });\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n if (!('classList' in document.createElement('_')) || document.createElementNS && !('classList' in document.createElementNS('http://www.w3.org/2000/svg', 'g'))) {\n var protoProp = 'prototype';\n var strTrim = String.prototype.trim;\n var arrIndexOf = Array.prototype.indexOf;\n var emptyArray = [];\n\n var DOMEx = function DOMEx(type, message) {\n this.name = type;\n this.code = DOMException[type];\n this.message = message;\n };\n\n var checkTokenAndGetIndex = function checkTokenAndGetIndex(classList, token) {\n if (token === '') {\n throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified');\n }\n\n if (/\\s/.test(token)) {\n throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character');\n }\n\n return arrIndexOf.call(classList, token);\n };\n\n var ClassList = function ClassList(elem) {\n var trimmedClasses = strTrim.call(elem.getAttribute('class') || '');\n var classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : emptyArray;\n\n for (var i = 0, ii = classes.length; i < ii; ++i) {\n this.push(classes[i]);\n }\n\n this._updateClassName = function () {\n elem.setAttribute('class', this.toString());\n };\n };\n\n var classListProto = ClassList[protoProp] = [];\n\n DOMEx[protoProp] = Error[protoProp];\n\n classListProto.item = function (i) {\n return this[i] || null;\n };\n\n classListProto.contains = function (token) {\n token += '';\n return checkTokenAndGetIndex(this, token) !== -1;\n };\n\n classListProto.add = function () {\n var tokens = arguments;\n var i = 0;\n var ii = tokens.length;\n var token = void 0;\n var updated = false;\n\n do {\n token = tokens[i] + '';\n if (checkTokenAndGetIndex(this, token) === -1) {\n this.push(token);\n updated = true;\n }\n } while (++i < ii);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.remove = function () {\n var tokens = arguments;\n var i = 0;\n var ii = tokens.length;\n var token = void 0;\n var updated = false;\n var index = void 0;\n\n do {\n token = tokens[i] + '';\n index = checkTokenAndGetIndex(this, token);\n while (index !== -1) {\n this.splice(index, 1);\n updated = true;\n index = checkTokenAndGetIndex(this, token);\n }\n } while (++i < ii);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.toggle = function (token, force) {\n token += '';\n\n var result = this.contains(token);\n var method = result ? force !== true && 'remove' : force !== false && 'add';\n\n if (method) {\n this[method](token);\n }\n\n if (force === true || force === false) {\n return force;\n }\n\n return !result;\n };\n\n classListProto.toString = function () {\n return this.join(' ');\n };\n\n Object.defineProperty(Element.prototype, 'classList', {\n get: function get() {\n return new ClassList(this);\n },\n enumerable: true,\n configurable: true\n });\n } else {\n var testElement = document.createElement('_');\n testElement.classList.add('c1', 'c2');\n\n if (!testElement.classList.contains('c2')) {\n var createMethod = function createMethod(method) {\n var original = DOMTokenList.prototype[method];\n\n DOMTokenList.prototype[method] = function (token) {\n for (var i = 0, ii = arguments.length; i < ii; ++i) {\n token = arguments[i];\n original.call(this, token);\n }\n };\n };\n\n createMethod('add');\n createMethod('remove');\n }\n\n testElement.classList.toggle('c3', false);\n\n if (testElement.classList.contains('c3')) {\n var _toggle = DOMTokenList.prototype.toggle;\n\n DOMTokenList.prototype.toggle = function (token, force) {\n if (1 in arguments && !this.contains(token) === !force) {\n return force;\n }\n\n return _toggle.call(this, token);\n };\n }\n\n testElement = null;\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var _filterEntries = function _filterEntries(key, value) {\n var i = 0,\n n = _entries.length,\n result = [];\n for (; i < n; i++) {\n if (_entries[i][key] == value) {\n result.push(_entries[i]);\n }\n }\n return result;\n };\n\n var _clearEntries = function _clearEntries(type, name) {\n var i = _entries.length,\n entry;\n while (i--) {\n entry = _entries[i];\n if (entry.entryType == type && (name === void 0 || entry.name == name)) {\n _entries.splice(i, 1);\n }\n }\n };\n\n // @license http://opensource.org/licenses/MIT\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n var nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = function now() {\n return Date.now() - nowOffset;\n };\n }\n\n var startOffset = Date.now ? Date.now() : +new Date();\n var _entries = [];\n var _marksIndex = {};\n\n ;\n\n if (!window.performance.mark) {\n window.performance.mark = window.performance.webkitMark || function (name) {\n var mark = {\n name: name,\n entryType: \"mark\",\n startTime: window.performance.now(),\n duration: 0\n };\n\n _entries.push(mark);\n _marksIndex[name] = mark;\n };\n }\n\n if (!window.performance.measure) {\n window.performance.measure = window.performance.webkitMeasure || function (name, startMark, endMark) {\n startMark = _marksIndex[startMark].startTime;\n endMark = _marksIndex[endMark].startTime;\n\n _entries.push({\n name: name,\n entryType: \"measure\",\n startTime: startMark,\n duration: endMark - startMark\n });\n };\n }\n\n if (!window.performance.getEntriesByType) {\n window.performance.getEntriesByType = window.performance.webkitGetEntriesByType || function (type) {\n return _filterEntries(\"entryType\", type);\n };\n }\n\n if (!window.performance.getEntriesByName) {\n window.performance.getEntriesByName = window.performance.webkitGetEntriesByName || function (name) {\n return _filterEntries(\"name\", name);\n };\n }\n\n if (!window.performance.clearMarks) {\n window.performance.clearMarks = window.performance.webkitClearMarks || function (name) {\n _clearEntries(\"mark\", name);\n };\n }\n\n if (!window.performance.clearMeasures) {\n window.performance.clearMeasures = window.performance.webkitClearMeasures || function (name) {\n _clearEntries(\"measure\", name);\n };\n }\n\n _PLATFORM.performance = window.performance;\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var con = window.console = window.console || {};\n var nop = function nop() {};\n\n if (!con.memory) con.memory = {};\n ('assert,clear,count,debug,dir,dirxml,error,exception,group,' + 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' + 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',').forEach(function (m) {\n if (!con[m]) con[m] = nop;\n });\n\n if (_typeof(con.log) === 'object') {\n 'log,info,warn,error,assert,dir,clear,profile,profileEnd'.split(',').forEach(function (method) {\n console[method] = this.bind(console[method], console);\n }, Function.prototype.call);\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n if (!window.CustomEvent || typeof window.CustomEvent !== 'function') {\n var _CustomEvent = function _CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n _CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = _CustomEvent;\n }\n}\n\nif (Element && !Element.prototype.matches) {\n var proto = Element.prototype;\n proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;\n}\n\nexport var _FEATURE = {\n shadowDOM: !!HTMLElement.prototype.attachShadow,\n scopedCSS: 'scoped' in document.createElement('style'),\n htmlTemplateElement: function () {\n var d = document.createElement('div');\n d.innerHTML = '';\n return 'content' in d.children[0];\n }(),\n mutationObserver: !!(window.MutationObserver || window.WebKitMutationObserver),\n ensureHTMLTemplateElement: function ensureHTMLTemplateElement(t) {\n return t;\n }\n};\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var isSVGTemplate = function isSVGTemplate(el) {\n return el.tagName === 'template' && el.namespaceURI === 'http://www.w3.org/2000/svg';\n };\n\n var fixSVGTemplateElement = function fixSVGTemplateElement(el) {\n var template = el.ownerDocument.createElement('template');\n var attrs = el.attributes;\n var length = attrs.length;\n var attr = void 0;\n\n el.parentNode.insertBefore(template, el);\n\n while (length-- > 0) {\n attr = attrs[length];\n template.setAttribute(attr.name, attr.value);\n el.removeAttribute(attr.name);\n }\n\n el.parentNode.removeChild(el);\n\n return fixHTMLTemplateElement(template);\n };\n\n var fixHTMLTemplateElement = function fixHTMLTemplateElement(template) {\n var content = template.content = document.createDocumentFragment();\n var child = void 0;\n\n while (child = template.firstChild) {\n content.appendChild(child);\n }\n\n return template;\n };\n\n var fixHTMLTemplateElementRoot = function fixHTMLTemplateElementRoot(template) {\n var content = fixHTMLTemplateElement(template).content;\n var childTemplates = content.querySelectorAll('template');\n\n for (var i = 0, ii = childTemplates.length; i < ii; ++i) {\n var child = childTemplates[i];\n\n if (isSVGTemplate(child)) {\n fixSVGTemplateElement(child);\n } else {\n fixHTMLTemplateElement(child);\n }\n }\n\n return template;\n };\n\n if (!_FEATURE.htmlTemplateElement) {\n _FEATURE.ensureHTMLTemplateElement = fixHTMLTemplateElementRoot;\n }\n}\n\nvar shadowPoly = window.ShadowDOMPolyfill || null;\n\nexport var _DOM = {\n Element: Element,\n NodeList: NodeList,\n SVGElement: SVGElement,\n boundary: 'aurelia-dom-boundary',\n addEventListener: function addEventListener(eventName, callback, capture) {\n document.addEventListener(eventName, callback, capture);\n },\n removeEventListener: function removeEventListener(eventName, callback, capture) {\n document.removeEventListener(eventName, callback, capture);\n },\n adoptNode: function adoptNode(node) {\n return document.adoptNode(node);\n },\n createAttribute: function createAttribute(name) {\n return document.createAttribute(name);\n },\n createElement: function createElement(tagName) {\n return document.createElement(tagName);\n },\n createTextNode: function createTextNode(text) {\n return document.createTextNode(text);\n },\n createComment: function createComment(text) {\n return document.createComment(text);\n },\n createDocumentFragment: function createDocumentFragment() {\n return document.createDocumentFragment();\n },\n createTemplateElement: function createTemplateElement() {\n var template = document.createElement('template');\n return _FEATURE.ensureHTMLTemplateElement(template);\n },\n createMutationObserver: function createMutationObserver(callback) {\n return new (window.MutationObserver || window.WebKitMutationObserver)(callback);\n },\n createCustomEvent: function createCustomEvent(eventType, options) {\n return new window.CustomEvent(eventType, options);\n },\n dispatchEvent: function dispatchEvent(evt) {\n document.dispatchEvent(evt);\n },\n getComputedStyle: function getComputedStyle(element) {\n return window.getComputedStyle(element);\n },\n getElementById: function getElementById(id) {\n return document.getElementById(id);\n },\n querySelector: function querySelector(query) {\n return document.querySelector(query);\n },\n querySelectorAll: function querySelectorAll(query) {\n return document.querySelectorAll(query);\n },\n nextElementSibling: function nextElementSibling(element) {\n if (element.nextElementSibling) {\n return element.nextElementSibling;\n }\n do {\n element = element.nextSibling;\n } while (element && element.nodeType !== 1);\n return element;\n },\n createTemplateFromMarkup: function createTemplateFromMarkup(markup) {\n var parser = document.createElement('div');\n parser.innerHTML = markup;\n\n var temp = parser.firstElementChild;\n if (!temp || temp.nodeName !== 'TEMPLATE') {\n throw new Error('Template markup must be wrapped in a