{"version":3,"file":"checkout.10ac359b0db27fa9acac.js","mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACVA;AACA;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACptBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC7/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1EA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACxEA;AACA;AACA;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/IA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACzUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjNA;AACA;;;;;;;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACtNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACxpBA;AACA;AACA","sources":["webpack://advantshop/./node_modules/angular-ui-bootstrap/src/popover/index-nocss.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/popover/index.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/popover/popover.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/position/index-nocss.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/position/position.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/stackedMap/index.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/stackedMap/stackedMap.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/tooltip/index-nocss.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/tooltip/tooltip.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/template/popover/popover-html.html.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/template/popover/popover-template.html.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/template/popover/popover.html.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/template/tooltip/tooltip-html-popup.html.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/template/tooltip/tooltip-popup.html.js","webpack://advantshop/./node_modules/angular-ui-bootstrap/template/tooltip/tooltip-template-popup.html.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/index.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/l10n/default.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/types/options.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/utils/dates.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/utils/dom.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/utils/formatting.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/utils/index.js","webpack://advantshop/./node_modules/flatpickr/dist/esm/utils/polyfills.js","webpack://advantshop/./node_modules/flatpickr/dist/l10n/ru.js","webpack://advantshop/./Areas/Admin/Content/src/_partials/help-trigger/styles/help-trigger.scss?3378","webpack://advantshop/./node_modules/angular-ui-bootstrap/src/tooltip/tooltip.css?5273","webpack://advantshop/./node_modules/flatpickr/dist/flatpickr.min.css?47f5","webpack://advantshop/./scripts/_common/modal/styles/modal-theme.scss?cf4e","webpack://advantshop/./scripts/_common/modal/styles/modal.scss?38ed","webpack://advantshop/./scripts/_partials/address/styles/address.scss?ceb3","webpack://advantshop/./scripts/_partials/bonus/styles/bonus.scss?8dd2","webpack://advantshop/./scripts/_partials/buy-one-click/styles/buyOneClick.scss?3a24","webpack://advantshop/./scripts/_partials/cart/styles/cart.scss?b460","webpack://advantshop/./scripts/_partials/login-open-id/styles/loginOpenId.scss?aa16","webpack://advantshop/./scripts/_partials/payment/styles/payment.scss?44c6","webpack://advantshop/./scripts/_partials/shipping/styles/shipping.scss?4d25","webpack://advantshop/./scripts/_partials/zone/styles/zones.scss?b7a7","webpack://advantshop/./scripts/sms/smsConfirmation.scss?d79e","webpack://advantshop/./styles/partials/bonus-card.scss?c5bb","webpack://advantshop/./styles/partials/order-history-products.scss?5a0e","webpack://advantshop/./styles/views/checkout.scss?c288","webpack://advantshop/./vendors/flatpickr/flatpickr.custom.css?25d2","webpack://advantshop/./vendors/rangeSlider/styles/angular.rangeSlider.css?8459","webpack://advantshop/./vendors/ui-bootstrap-custom/styles/ui-popover.css?40f0","webpack://advantshop/./Areas/Admin/Content/src/_partials/help-trigger/helpTrigger.component.js","webpack://advantshop/./Areas/Admin/Content/src/_partials/help-trigger/helpTrigger.js","webpack://advantshop/./Areas/Admin/Content/src/_partials/help-trigger/helpTrigger.module.js","webpack://advantshop/./Areas/Admin/Content/src/_partials/help-trigger/helpTrigger.service.js","webpack://advantshop/./Areas/Admin/Content/src/_shared/is-mobile/is-mobile.js","webpack://advantshop/./Areas/Admin/Templates/Mobile/Content/vendors/ui-bootstrap/angular-popover-decorator/angular-popover-decorator.js","webpack://advantshop/./bundle_config/checkout.js","webpack://advantshop/./scripts/_common/PubSub/PubSub.js","webpack://advantshop/./scripts/_common/modal/controllers/modalController.js","webpack://advantshop/./scripts/_common/modal/directives/modalDirectives.js","webpack://advantshop/./scripts/_common/modal/modal.js","webpack://advantshop/./scripts/_common/modal/modal.module.js","webpack://advantshop/./scripts/_common/modal/services/modalService.js","webpack://advantshop/./scripts/_common/yandexMaps/yandexMaps.module.js","webpack://advantshop/./scripts/_common/yandexMaps/yandexMapsService.js","webpack://advantshop/./scripts/_partials/address/address.module.js","webpack://advantshop/./scripts/_partials/address/controllers/addressListController.js","webpack://advantshop/./scripts/_partials/address/directives/addressDirectives.js","webpack://advantshop/./scripts/_partials/address/services/addressService.js","webpack://advantshop/./scripts/_partials/bonus/bonus.module.js","webpack://advantshop/./scripts/_partials/bonus/controllers/bonusApplyController.js","webpack://advantshop/./scripts/_partials/bonus/controllers/bonusAuthController.js","webpack://advantshop/./scripts/_partials/bonus/controllers/bonusCodeController.js","webpack://advantshop/./scripts/_partials/bonus/controllers/bonusInfoController.js","webpack://advantshop/./scripts/_partials/bonus/controllers/bonusRegController.js","webpack://advantshop/./scripts/_partials/bonus/controllers/bonusWhatToDoController.js","webpack://advantshop/./scripts/_partials/bonus/directives/bonusDirectives.js","webpack://advantshop/./scripts/_partials/bonus/services/bonusService.js","webpack://advantshop/./scripts/_partials/buy-one-click/buyOneClick.module.js","webpack://advantshop/./scripts/_partials/buy-one-click/controllers/buyOneClickFormController.js","webpack://advantshop/./scripts/_partials/buy-one-click/controllers/buyOneClickTriggerController.js","webpack://advantshop/./scripts/_partials/buy-one-click/directives/buyOneClickDirectives.js","webpack://advantshop/./scripts/_partials/buy-one-click/services/buyOneClickService.js","webpack://advantshop/./scripts/_partials/cards/cards.module.js","webpack://advantshop/./scripts/_partials/cards/controllers/cardsFormController.js","webpack://advantshop/./scripts/_partials/cards/controllers/cardsRemoveController.js","webpack://advantshop/./scripts/_partials/cards/directives/cardsDirectives.js","webpack://advantshop/./scripts/_partials/cards/services/cardsService.js","webpack://advantshop/./scripts/_partials/cart/cart.js","webpack://advantshop/./scripts/_partials/cart/cart.module.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartAddController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartConfirmController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartCountController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartFullController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartMiniController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartMiniListController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartMobileFullController.js","webpack://advantshop/./scripts/_partials/cart/controllers/cartPreorderController.js","webpack://advantshop/./scripts/_partials/cart/directives/cartDirectives.js","webpack://advantshop/./scripts/_partials/cart/services/cartService.js","webpack://advantshop/./scripts/_partials/login-open-id/loginOpenId.module.js","webpack://advantshop/./scripts/_partials/payment/controllers/paymentListController.js","webpack://advantshop/./scripts/_partials/payment/controllers/paymentTemplateController.js","webpack://advantshop/./scripts/_partials/payment/directives/paymentDirectives.js","webpack://advantshop/./scripts/_partials/payment/payment.module.js","webpack://advantshop/./scripts/_partials/shipping/controllers/shippingListController.js","webpack://advantshop/./scripts/_partials/shipping/controllers/shippingTemplateController.js","webpack://advantshop/./scripts/_partials/shipping/controllers/shippingVariantsController.js","webpack://advantshop/./scripts/_partials/shipping/directives/shippingDirectives.js","webpack://advantshop/./scripts/_partials/shipping/extendTemplate/extendTemplate.js","webpack://advantshop/./scripts/_partials/shipping/services/shipping.service.js","webpack://advantshop/./scripts/_partials/shipping/shipping.module.js","webpack://advantshop/./scripts/_partials/zone/controllers/zoneController.js","webpack://advantshop/./scripts/_partials/zone/controllers/zonePopoverController.js","webpack://advantshop/./scripts/_partials/zone/directives/zoneDirectives.js","webpack://advantshop/./scripts/_partials/zone/services/zoneService.js","webpack://advantshop/./scripts/_partials/zone/zone.js","webpack://advantshop/./scripts/_partials/zone/zone.module.js","webpack://advantshop/./scripts/appDependency.js","webpack://advantshop/./scripts/auth/auth.module.js","webpack://advantshop/./scripts/auth/controllers/authController.js","webpack://advantshop/./scripts/auth/services/authService.js","webpack://advantshop/./scripts/checkout/checkout.module.js","webpack://advantshop/./scripts/checkout/controllers/checkoutController.js","webpack://advantshop/./scripts/checkout/services/checkoutService.js","webpack://advantshop/./scripts/sms/controllers/authSmsController.js","webpack://advantshop/./scripts/sms/controllers/smsConfirmationCtrl.js","webpack://advantshop/./scripts/sms/controllers/smsConfirmationInputCtrl.js","webpack://advantshop/./scripts/sms/directives/smsDirectives.js","webpack://advantshop/./scripts/sms/services/smsService.js","webpack://advantshop/./scripts/sms/smsConfirmation.module.js","webpack://advantshop/./vendors/flatpickr/flatpickr.module.js","webpack://advantshop/./vendors/flatpickr/ng-flatpickr.js","webpack://advantshop/./vendors/rangeSlider/angular.rangeSlider.js","webpack://advantshop/./vendors/rangeSlider/rangeSlider.module.js"],"sourcesContent":["require('../tooltip/index-nocss.js');\nrequire('../../template/popover/popover.html.js');\nrequire('../../template/popover/popover-html.html.js');\nrequire('../../template/popover/popover-template.html.js');\nrequire('./popover');\n\nvar MODULE_NAME = 'ui.bootstrap.module.popover';\n\nangular.module(MODULE_NAME, ['ui.bootstrap.popover', 'uib/template/popover/popover.html', 'uib/template/popover/popover-html.html', 'uib/template/popover/popover-template.html']);\n\nmodule.exports = MODULE_NAME;\n","require('../tooltip/tooltip.css');\nmodule.exports = require('./index-nocss.js');\n","/**\n * The following features are still outstanding: popup delay, animation as a\n * function, placement as a function, inside, support for more triggers than\n * just mouse enter/leave, and selector delegatation.\n */\nangular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])\n\n.directive('uibPopoverTemplatePopup', function() {\n return {\n restrict: 'A',\n scope: { uibTitle: '@', contentExp: '&', originScope: '&' },\n templateUrl: 'uib/template/popover/popover-template.html'\n };\n})\n\n.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibPopoverTemplate', 'popover', 'click', {\n useContentExp: true\n });\n}])\n\n.directive('uibPopoverHtmlPopup', function() {\n return {\n restrict: 'A',\n scope: { contentExp: '&', uibTitle: '@' },\n templateUrl: 'uib/template/popover/popover-html.html'\n };\n})\n\n.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibPopoverHtml', 'popover', 'click', {\n useContentExp: true\n });\n}])\n\n.directive('uibPopoverPopup', function() {\n return {\n restrict: 'A',\n scope: { uibTitle: '@', content: '@' },\n templateUrl: 'uib/template/popover/popover.html'\n };\n})\n\n.directive('uibPopover', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibPopover', 'popover', 'click');\n}]);\n","require('./position');\n\nvar MODULE_NAME = 'ui.bootstrap.module.position';\n\nangular.module(MODULE_NAME, ['ui.bootstrap.position']);\n\nmodule.exports = MODULE_NAME;\n","angular.module('ui.bootstrap.position', [])\n\n/**\n * A set of utility methods for working with the DOM.\n * It is meant to be used where we need to absolute-position elements in\n * relation to another element (this is the case for tooltips, popovers,\n * typeahead suggestions etc.).\n */\n .factory('$uibPosition', ['$document', '$window', function($document, $window) {\n /**\n * Used by scrollbarWidth() function to cache scrollbar's width.\n * Do not access this variable directly, use scrollbarWidth() instead.\n */\n var SCROLLBAR_WIDTH;\n /**\n * scrollbar on body and html element in IE and Edge overlay\n * content and should be considered 0 width.\n */\n var BODY_SCROLLBAR_WIDTH;\n var OVERFLOW_REGEX = {\n normal: /(auto|scroll)/,\n hidden: /(auto|scroll|hidden)/\n };\n var PLACEMENT_REGEX = {\n auto: /\\s?auto?\\s?/i,\n primary: /^(top|bottom|left|right)$/,\n secondary: /^(top|bottom|left|right|center)$/,\n vertical: /^(top|bottom)$/\n };\n var BODY_REGEX = /(HTML|BODY)/;\n\n return {\n\n /**\n * Provides a raw DOM element from a jQuery/jQLite element.\n *\n * @param {element} elem - The element to convert.\n *\n * @returns {element} A HTML element.\n */\n getRawNode: function(elem) {\n return elem.nodeName ? elem : elem[0] || elem;\n },\n\n /**\n * Provides a parsed number for a style property. Strips\n * units and casts invalid numbers to 0.\n *\n * @param {string} value - The style value to parse.\n *\n * @returns {number} A valid number.\n */\n parseStyle: function(value) {\n value = parseFloat(value);\n return isFinite(value) ? value : 0;\n },\n\n /**\n * Provides the closest positioned ancestor.\n *\n * @param {element} element - The element to get the offest parent for.\n *\n * @returns {element} The closest positioned ancestor.\n */\n offsetParent: function(elem) {\n elem = this.getRawNode(elem);\n\n var offsetParent = elem.offsetParent || $document[0].documentElement;\n\n function isStaticPositioned(el) {\n return ($window.getComputedStyle(el).position || 'static') === 'static';\n }\n\n while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) {\n offsetParent = offsetParent.offsetParent;\n }\n\n return offsetParent || $document[0].documentElement;\n },\n\n /**\n * Provides the scrollbar width, concept from TWBS measureScrollbar()\n * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js\n * In IE and Edge, scollbar on body and html element overlay and should\n * return a width of 0.\n *\n * @returns {number} The width of the browser scollbar.\n */\n scrollbarWidth: function(isBody) {\n if (isBody) {\n if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) {\n var bodyElem = $document.find('body');\n bodyElem.addClass('uib-position-body-scrollbar-measure');\n BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth;\n BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0;\n bodyElem.removeClass('uib-position-body-scrollbar-measure');\n }\n return BODY_SCROLLBAR_WIDTH;\n }\n\n if (angular.isUndefined(SCROLLBAR_WIDTH)) {\n var scrollElem = angular.element('
');\n $document.find('body').append(scrollElem);\n SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth;\n SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0;\n scrollElem.remove();\n }\n\n return SCROLLBAR_WIDTH;\n },\n\n /**\n * Provides the padding required on an element to replace the scrollbar.\n *\n * @returns {object} An object with the following properties:\n * \n */\n scrollbarPadding: function(elem) {\n elem = this.getRawNode(elem);\n\n var elemStyle = $window.getComputedStyle(elem);\n var paddingRight = this.parseStyle(elemStyle.paddingRight);\n var paddingBottom = this.parseStyle(elemStyle.paddingBottom);\n var scrollParent = this.scrollParent(elem, false, true);\n var scrollbarWidth = this.scrollbarWidth(BODY_REGEX.test(scrollParent.tagName));\n\n return {\n scrollbarWidth: scrollbarWidth,\n widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth,\n right: paddingRight + scrollbarWidth,\n originalRight: paddingRight,\n heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight,\n bottom: paddingBottom + scrollbarWidth,\n originalBottom: paddingBottom\n };\n },\n\n /**\n * Checks to see if the element is scrollable.\n *\n * @param {element} elem - The element to check.\n * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,\n * default is false.\n *\n * @returns {boolean} Whether the element is scrollable.\n */\n isScrollable: function(elem, includeHidden) {\n elem = this.getRawNode(elem);\n\n var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;\n var elemStyle = $window.getComputedStyle(elem);\n return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX);\n },\n\n /**\n * Provides the closest scrollable ancestor.\n * A port of the jQuery UI scrollParent method:\n * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js\n *\n * @param {element} elem - The element to find the scroll parent of.\n * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,\n * default is false.\n * @param {boolean=} [includeSelf=false] - Should the element being passed be\n * included in the scrollable llokup.\n *\n * @returns {element} A HTML element.\n */\n scrollParent: function(elem, includeHidden, includeSelf) {\n elem = this.getRawNode(elem);\n\n var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;\n var documentEl = $document[0].documentElement;\n var elemStyle = $window.getComputedStyle(elem);\n if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) {\n return elem;\n }\n var excludeStatic = elemStyle.position === 'absolute';\n var scrollParent = elem.parentElement || documentEl;\n\n if (scrollParent === documentEl || elemStyle.position === 'fixed') {\n return documentEl;\n }\n\n while (scrollParent.parentElement && scrollParent !== documentEl) {\n var spStyle = $window.getComputedStyle(scrollParent);\n if (excludeStatic && spStyle.position !== 'static') {\n excludeStatic = false;\n }\n\n if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) {\n break;\n }\n scrollParent = scrollParent.parentElement;\n }\n\n return scrollParent;\n },\n\n /**\n * Provides read-only equivalent of jQuery's position function:\n * http://api.jquery.com/position/ - distance to closest positioned\n * ancestor. Does not account for margins by default like jQuery position.\n *\n * @param {element} elem - The element to caclulate the position on.\n * @param {boolean=} [includeMargins=false] - Should margins be accounted\n * for, default is false.\n *\n * @returns {object} An object with the following properties:\n * \n */\n position: function(elem, includeMagins) {\n elem = this.getRawNode(elem);\n\n var elemOffset = this.offset(elem);\n if (includeMagins) {\n var elemStyle = $window.getComputedStyle(elem);\n elemOffset.top -= this.parseStyle(elemStyle.marginTop);\n elemOffset.left -= this.parseStyle(elemStyle.marginLeft);\n }\n var parent = this.offsetParent(elem);\n var parentOffset = {top: 0, left: 0};\n\n if (parent !== $document[0].documentElement) {\n parentOffset = this.offset(parent);\n parentOffset.top += parent.clientTop - parent.scrollTop;\n parentOffset.left += parent.clientLeft - parent.scrollLeft;\n }\n\n return {\n width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth),\n height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight),\n top: Math.round(elemOffset.top - parentOffset.top),\n left: Math.round(elemOffset.left - parentOffset.left)\n };\n },\n\n /**\n * Provides read-only equivalent of jQuery's offset function:\n * http://api.jquery.com/offset/ - distance to viewport. Does\n * not account for borders, margins, or padding on the body\n * element.\n *\n * @param {element} elem - The element to calculate the offset on.\n *\n * @returns {object} An object with the following properties:\n * \n */\n offset: function(elem) {\n elem = this.getRawNode(elem);\n\n var elemBCR = elem.getBoundingClientRect();\n return {\n width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth),\n height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight),\n top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)),\n left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft))\n };\n },\n\n /**\n * Provides offset distance to the closest scrollable ancestor\n * or viewport. Accounts for border and scrollbar width.\n *\n * Right and bottom dimensions represent the distance to the\n * respective edge of the viewport element. If the element\n * edge extends beyond the viewport, a negative value will be\n * reported.\n *\n * @param {element} elem - The element to get the viewport offset for.\n * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead\n * of the first scrollable element, default is false.\n * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element\n * be accounted for, default is true.\n *\n * @returns {object} An object with the following properties:\n * \n */\n viewportOffset: function(elem, useDocument, includePadding) {\n elem = this.getRawNode(elem);\n includePadding = includePadding !== false ? true : false;\n\n var elemBCR = elem.getBoundingClientRect();\n var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0};\n\n var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem);\n var offsetParentBCR = offsetParent.getBoundingClientRect();\n\n offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop;\n offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft;\n if (offsetParent === $document[0].documentElement) {\n offsetBCR.top += $window.pageYOffset;\n offsetBCR.left += $window.pageXOffset;\n }\n offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight;\n offsetBCR.right = offsetBCR.left + offsetParent.clientWidth;\n\n if (includePadding) {\n var offsetParentStyle = $window.getComputedStyle(offsetParent);\n offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop);\n offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom);\n offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft);\n offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight);\n }\n\n return {\n top: Math.round(elemBCR.top - offsetBCR.top),\n bottom: Math.round(offsetBCR.bottom - elemBCR.bottom),\n left: Math.round(elemBCR.left - offsetBCR.left),\n right: Math.round(offsetBCR.right - elemBCR.right)\n };\n },\n\n /**\n * Provides an array of placement values parsed from a placement string.\n * Along with the 'auto' indicator, supported placement strings are:\n * \n * A placement string with an 'auto' indicator is expected to be\n * space separated from the placement, i.e: 'auto bottom-left' If\n * the primary and secondary placement values do not match 'top,\n * bottom, left, right' then 'top' will be the primary placement and\n * 'center' will be the secondary placement. If 'auto' is passed, true\n * will be returned as the 3rd value of the array.\n *\n * @param {string} placement - The placement string to parse.\n *\n * @returns {array} An array with the following values\n * \n */\n parsePlacement: function(placement) {\n var autoPlace = PLACEMENT_REGEX.auto.test(placement);\n if (autoPlace) {\n placement = placement.replace(PLACEMENT_REGEX.auto, '');\n }\n\n placement = placement.split('-');\n\n placement[0] = placement[0] || 'top';\n if (!PLACEMENT_REGEX.primary.test(placement[0])) {\n placement[0] = 'top';\n }\n\n placement[1] = placement[1] || 'center';\n if (!PLACEMENT_REGEX.secondary.test(placement[1])) {\n placement[1] = 'center';\n }\n\n if (autoPlace) {\n placement[2] = true;\n } else {\n placement[2] = false;\n }\n\n return placement;\n },\n\n /**\n * Provides coordinates for an element to be positioned relative to\n * another element. Passing 'auto' as part of the placement parameter\n * will enable smart placement - where the element fits. i.e:\n * 'auto left-top' will check to see if there is enough space to the left\n * of the hostElem to fit the targetElem, if not place right (same for secondary\n * top placement). Available space is calculated using the viewportOffset\n * function.\n *\n * @param {element} hostElem - The element to position against.\n * @param {element} targetElem - The element to position.\n * @param {string=} [placement=top] - The placement for the targetElem,\n * default is 'top'. 'center' is assumed as secondary placement for\n * 'top', 'left', 'right', and 'bottom' placements. Available placements are:\n * \n * @param {boolean=} [appendToBody=false] - Should the top and left values returned\n * be calculated from the body element, default is false.\n *\n * @returns {object} An object with the following properties:\n * \n */\n positionElements: function(hostElem, targetElem, placement, appendToBody) {\n hostElem = this.getRawNode(hostElem);\n targetElem = this.getRawNode(targetElem);\n\n // need to read from prop to support tests.\n var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth');\n var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight');\n\n placement = this.parsePlacement(placement);\n\n var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem);\n var targetElemPos = {top: 0, left: 0, placement: ''};\n\n if (placement[2]) {\n var viewportOffset = this.viewportOffset(hostElem, appendToBody);\n\n var targetElemStyle = $window.getComputedStyle(targetElem);\n var adjustedSize = {\n width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))),\n height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom)))\n };\n\n placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' :\n placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' :\n placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' :\n placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' :\n placement[0];\n\n placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' :\n placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' :\n placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' :\n placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' :\n placement[1];\n\n if (placement[1] === 'center') {\n if (PLACEMENT_REGEX.vertical.test(placement[0])) {\n var xOverflow = hostElemPos.width / 2 - targetWidth / 2;\n if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) {\n placement[1] = 'left';\n } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) {\n placement[1] = 'right';\n }\n } else {\n var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2;\n if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) {\n placement[1] = 'top';\n } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) {\n placement[1] = 'bottom';\n }\n }\n }\n }\n\n switch (placement[0]) {\n case 'top':\n targetElemPos.top = hostElemPos.top - targetHeight;\n break;\n case 'bottom':\n targetElemPos.top = hostElemPos.top + hostElemPos.height;\n break;\n case 'left':\n targetElemPos.left = hostElemPos.left - targetWidth;\n break;\n case 'right':\n targetElemPos.left = hostElemPos.left + hostElemPos.width;\n break;\n }\n\n switch (placement[1]) {\n case 'top':\n targetElemPos.top = hostElemPos.top;\n break;\n case 'bottom':\n targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight;\n break;\n case 'left':\n targetElemPos.left = hostElemPos.left;\n break;\n case 'right':\n targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth;\n break;\n case 'center':\n if (PLACEMENT_REGEX.vertical.test(placement[0])) {\n targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2;\n } else {\n targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2;\n }\n break;\n }\n\n targetElemPos.top = Math.round(targetElemPos.top);\n targetElemPos.left = Math.round(targetElemPos.left);\n targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1];\n\n return targetElemPos;\n },\n\n /**\n * Provides a way to adjust the top positioning after first\n * render to correctly align element to top after content\n * rendering causes resized element height\n *\n * @param {array} placementClasses - The array of strings of classes\n * element should have.\n * @param {object} containerPosition - The object with container\n * position information\n * @param {number} initialHeight - The initial height for the elem.\n * @param {number} currentHeight - The current height for the elem.\n */\n adjustTop: function(placementClasses, containerPosition, initialHeight, currentHeight) {\n if (placementClasses.indexOf('top') !== -1 && initialHeight !== currentHeight) {\n return {\n top: containerPosition.top - currentHeight + 'px'\n };\n }\n },\n\n /**\n * Provides a way for positioning tooltip & dropdown\n * arrows when using placement options beyond the standard\n * left, right, top, or bottom.\n *\n * @param {element} elem - The tooltip/dropdown element.\n * @param {string} placement - The placement for the elem.\n */\n positionArrow: function(elem, placement) {\n elem = this.getRawNode(elem);\n\n var innerElem = elem.querySelector('.tooltip-inner, .popover-inner');\n if (!innerElem) {\n return;\n }\n\n var isTooltip = angular.element(innerElem).hasClass('tooltip-inner');\n\n var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow');\n if (!arrowElem) {\n return;\n }\n\n var arrowCss = {\n top: '',\n bottom: '',\n left: '',\n right: ''\n };\n\n placement = this.parsePlacement(placement);\n if (placement[1] === 'center') {\n // no adjustment necessary - just reset styles\n angular.element(arrowElem).css(arrowCss);\n return;\n }\n\n var borderProp = 'border-' + placement[0] + '-width';\n var borderWidth = $window.getComputedStyle(arrowElem)[borderProp];\n\n var borderRadiusProp = 'border-';\n if (PLACEMENT_REGEX.vertical.test(placement[0])) {\n borderRadiusProp += placement[0] + '-' + placement[1];\n } else {\n borderRadiusProp += placement[1] + '-' + placement[0];\n }\n borderRadiusProp += '-radius';\n var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp];\n\n switch (placement[0]) {\n case 'top':\n arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth;\n break;\n case 'bottom':\n arrowCss.top = isTooltip ? '0' : '-' + borderWidth;\n break;\n case 'left':\n arrowCss.right = isTooltip ? '0' : '-' + borderWidth;\n break;\n case 'right':\n arrowCss.left = isTooltip ? '0' : '-' + borderWidth;\n break;\n }\n\n arrowCss[placement[1]] = borderRadius;\n\n angular.element(arrowElem).css(arrowCss);\n }\n };\n }]);\n","require('./stackedMap');\n\nvar MODULE_NAME = 'ui.bootstrap.module.stackedMap';\n\nangular.module(MODULE_NAME, ['ui.bootstrap.stackedMap']);\n\nmodule.exports = MODULE_NAME;\n","angular.module('ui.bootstrap.stackedMap', [])\n/**\n * A helper, internal data structure that acts as a map but also allows getting / removing\n * elements in the LIFO order\n */\n .factory('$$stackedMap', function() {\n return {\n createNew: function() {\n var stack = [];\n\n return {\n add: function(key, value) {\n stack.push({\n key: key,\n value: value\n });\n },\n get: function(key) {\n for (var i = 0; i < stack.length; i++) {\n if (key === stack[i].key) {\n return stack[i];\n }\n }\n },\n keys: function() {\n var keys = [];\n for (var i = 0; i < stack.length; i++) {\n keys.push(stack[i].key);\n }\n return keys;\n },\n top: function() {\n return stack[stack.length - 1];\n },\n remove: function(key) {\n var idx = -1;\n for (var i = 0; i < stack.length; i++) {\n if (key === stack[i].key) {\n idx = i;\n break;\n }\n }\n return stack.splice(idx, 1)[0];\n },\n removeTop: function() {\n return stack.pop();\n },\n length: function() {\n return stack.length;\n }\n };\n }\n };\n });","require('../position/index-nocss.js');\nrequire('../stackedMap');\nrequire('../../template/tooltip/tooltip-popup.html.js');\nrequire('../../template/tooltip/tooltip-html-popup.html.js');\nrequire('../../template/tooltip/tooltip-template-popup.html.js');\nrequire('./tooltip');\n\nvar MODULE_NAME = 'ui.bootstrap.module.tooltip';\n\nangular.module(MODULE_NAME, ['ui.bootstrap.tooltip', 'uib/template/tooltip/tooltip-popup.html', 'uib/template/tooltip/tooltip-html-popup.html', 'uib/template/tooltip/tooltip-template-popup.html']);\n\nmodule.exports = MODULE_NAME;\n","/**\n * The following features are still outstanding: animation as a\n * function, placement as a function, inside, support for more triggers than\n * just mouse enter/leave, html tooltips, and selector delegation.\n */\nangular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap'])\n\n/**\n * The $tooltip service creates tooltip- and popover-like directives as well as\n * houses global options for them.\n */\n.provider('$uibTooltip', function() {\n // The default options tooltip and popover.\n var defaultOptions = {\n placement: 'top',\n placementClassPrefix: '',\n animation: true,\n popupDelay: 0,\n popupCloseDelay: 0,\n useContentExp: false\n };\n\n // Default hide triggers for each show trigger\n var triggerMap = {\n 'mouseenter': 'mouseleave',\n 'click': 'click',\n 'outsideClick': 'outsideClick',\n 'focus': 'blur',\n 'none': ''\n };\n\n // The options specified to the provider globally.\n var globalOptions = {};\n\n /**\n * `options({})` allows global configuration of all tooltips in the\n * application.\n *\n * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) {\n * // place tooltips left instead of top by default\n * $tooltipProvider.options( { placement: 'left' } );\n * });\n */\n\tthis.options = function(value) {\n\t\tangular.extend(globalOptions, value);\n\t};\n\n /**\n * This allows you to extend the set of trigger mappings available. E.g.:\n *\n * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } );\n */\n this.setTriggers = function setTriggers(triggers) {\n angular.extend(triggerMap, triggers);\n };\n\n /**\n * This is a helper function for translating camel-case to snake_case.\n */\n function snake_case(name) {\n var regexp = /[A-Z]/g;\n var separator = '-';\n return name.replace(regexp, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n }\n\n /**\n * Returns the actual instance of the $tooltip service.\n * TODO support multiple triggers\n */\n this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) {\n var openedTooltips = $$stackedMap.createNew();\n $document.on('keyup', keypressListener);\n\n $rootScope.$on('$destroy', function() {\n $document.off('keyup', keypressListener);\n });\n\n function keypressListener(e) {\n if (e.which === 27) {\n var last = openedTooltips.top();\n if (last) {\n last.value.close();\n last = null;\n }\n }\n }\n\n return function $tooltip(ttType, prefix, defaultTriggerShow, options) {\n options = angular.extend({}, defaultOptions, globalOptions, options);\n\n /**\n * Returns an object of show and hide triggers.\n *\n * If a trigger is supplied,\n * it is used to show the tooltip; otherwise, it will use the `trigger`\n * option passed to the `$tooltipProvider.options` method; else it will\n * default to the trigger supplied to this directive factory.\n *\n * The hide trigger is based on the show trigger. If the `trigger` option\n * was passed to the `$tooltipProvider.options` method, it will use the\n * mapped trigger from `triggerMap` or the passed trigger if the map is\n * undefined; otherwise, it uses the `triggerMap` value of the show\n * trigger; else it will just use the show trigger.\n */\n function getTriggers(trigger) {\n var show = (trigger || options.trigger || defaultTriggerShow).split(' ');\n var hide = show.map(function(trigger) {\n return triggerMap[trigger] || trigger;\n });\n return {\n show: show,\n hide: hide\n };\n }\n\n var directiveName = snake_case(ttType);\n\n var startSym = $interpolate.startSymbol();\n var endSym = $interpolate.endSymbol();\n var template =\n '
' +\n '
';\n\n return {\n compile: function(tElem, tAttrs) {\n var tooltipLinker = $compile(template);\n\n return function link(scope, element, attrs, tooltipCtrl) {\n var tooltip;\n var tooltipLinkedScope;\n var transitionTimeout;\n var showTimeout;\n var hideTimeout;\n var positionTimeout;\n var adjustmentTimeout;\n var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;\n var triggers = getTriggers(undefined);\n var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);\n var ttScope = scope.$new(true);\n var repositionScheduled = false;\n var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false;\n var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false;\n var observers = [];\n var lastPlacement;\n\n var positionTooltip = function() {\n // check if tooltip exists and is not empty\n if (!tooltip || !tooltip.html()) { return; }\n\n if (!positionTimeout) {\n positionTimeout = $timeout(function() {\n var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);\n var initialHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');\n var elementPos = appendToBody ? $position.offset(element) : $position.position(element);\n tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' });\n var placementClasses = ttPosition.placement.split('-');\n\n if (!tooltip.hasClass(placementClasses[0])) {\n tooltip.removeClass(lastPlacement.split('-')[0]);\n tooltip.addClass(placementClasses[0]);\n }\n\n if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) {\n tooltip.removeClass(options.placementClassPrefix + lastPlacement);\n tooltip.addClass(options.placementClassPrefix + ttPosition.placement);\n }\n\n adjustmentTimeout = $timeout(function() {\n var currentHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');\n var adjustment = $position.adjustTop(placementClasses, elementPos, initialHeight, currentHeight);\n if (adjustment) {\n tooltip.css(adjustment);\n }\n adjustmentTimeout = null;\n }, 0, false);\n\n // first time through tt element will have the\n // uib-position-measure class or if the placement\n // has changed we need to position the arrow.\n if (tooltip.hasClass('uib-position-measure')) {\n $position.positionArrow(tooltip, ttPosition.placement);\n tooltip.removeClass('uib-position-measure');\n } else if (lastPlacement !== ttPosition.placement) {\n $position.positionArrow(tooltip, ttPosition.placement);\n }\n lastPlacement = ttPosition.placement;\n\n positionTimeout = null;\n }, 0, false);\n }\n };\n\n // Set up the correct scope to allow transclusion later\n ttScope.origScope = scope;\n\n // By default, the tooltip is not open.\n // TODO add ability to start tooltip opened\n ttScope.isOpen = false;\n\n function toggleTooltipBind() {\n if (!ttScope.isOpen) {\n showTooltipBind();\n } else {\n hideTooltipBind();\n }\n }\n\n // Show the tooltip with delay if specified, otherwise show it immediately\n function showTooltipBind() {\n if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {\n return;\n }\n\n cancelHide();\n prepareTooltip();\n\n if (ttScope.popupDelay) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!showTimeout) {\n showTimeout = $timeout(show, ttScope.popupDelay, false);\n }\n } else {\n show();\n }\n }\n\n function hideTooltipBind() {\n cancelShow();\n\n if (ttScope.popupCloseDelay) {\n if (!hideTimeout) {\n hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false);\n }\n } else {\n hide();\n }\n }\n\n // Show the tooltip popup element.\n function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }\n\n function cancelShow() {\n if (showTimeout) {\n $timeout.cancel(showTimeout);\n showTimeout = null;\n }\n\n if (positionTimeout) {\n $timeout.cancel(positionTimeout);\n positionTimeout = null;\n }\n }\n\n // Hide the tooltip popup element.\n function hide() {\n if (!ttScope) {\n return;\n }\n\n // First things first: we don't show it anymore.\n ttScope.$evalAsync(function() {\n if (ttScope) {\n ttScope.isOpen = false;\n assignIsOpen(false);\n // And now we remove it from the DOM. However, if we have animation, we\n // need to wait for it to expire beforehand.\n // FIXME: this is a placeholder for a port of the transitions library.\n // The fade transition in TWBS is 150ms.\n if (ttScope.animation) {\n if (!transitionTimeout) {\n transitionTimeout = $timeout(removeTooltip, 150, false);\n }\n } else {\n removeTooltip();\n }\n }\n });\n }\n\n function cancelHide() {\n if (hideTimeout) {\n $timeout.cancel(hideTimeout);\n hideTimeout = null;\n }\n\n if (transitionTimeout) {\n $timeout.cancel(transitionTimeout);\n transitionTimeout = null;\n }\n }\n\n function createTooltip() {\n // There can only be one tooltip element per directive shown at once.\n if (tooltip) {\n return;\n }\n\n tooltipLinkedScope = ttScope.$new();\n tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {\n if (appendToBody) {\n $document.find('body').append(tooltip);\n } else {\n element.after(tooltip);\n }\n });\n\n openedTooltips.add(ttScope, {\n close: hide\n });\n\n prepObservers();\n }\n\n function removeTooltip() {\n cancelShow();\n cancelHide();\n unregisterObservers();\n\n if (tooltip) {\n tooltip.remove();\n \n tooltip = null;\n if (adjustmentTimeout) {\n $timeout.cancel(adjustmentTimeout);\n }\n }\n\n openedTooltips.remove(ttScope);\n \n if (tooltipLinkedScope) {\n tooltipLinkedScope.$destroy();\n tooltipLinkedScope = null;\n }\n }\n\n /**\n * Set the initial scope values. Once\n * the tooltip is created, the observers\n * will be added to keep things in sync.\n */\n function prepareTooltip() {\n ttScope.title = attrs[prefix + 'Title'];\n if (contentParse) {\n ttScope.content = contentParse(scope);\n } else {\n ttScope.content = attrs[ttType];\n }\n\n ttScope.popupClass = attrs[prefix + 'Class'];\n ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement;\n var placement = $position.parsePlacement(ttScope.placement);\n lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0];\n\n var delay = parseInt(attrs[prefix + 'PopupDelay'], 10);\n var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10);\n ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay;\n ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay;\n }\n\n function assignIsOpen(isOpen) {\n if (isOpenParse && angular.isFunction(isOpenParse.assign)) {\n isOpenParse.assign(scope, isOpen);\n }\n }\n\n ttScope.contentExp = function() {\n return ttScope.content;\n };\n\n /**\n * Observe the relevant attributes.\n */\n attrs.$observe('disabled', function(val) {\n if (val) {\n cancelShow();\n }\n\n if (val && ttScope.isOpen) {\n hide();\n }\n });\n\n if (isOpenParse) {\n scope.$watch(isOpenParse, function(val) {\n if (ttScope && !val === ttScope.isOpen) {\n toggleTooltipBind();\n }\n });\n }\n\n function prepObservers() {\n observers.length = 0;\n\n if (contentParse) {\n observers.push(\n scope.$watch(contentParse, function(val) {\n ttScope.content = val;\n if (!val && ttScope.isOpen) {\n hide();\n }\n })\n );\n\n observers.push(\n tooltipLinkedScope.$watch(function() {\n if (!repositionScheduled) {\n repositionScheduled = true;\n tooltipLinkedScope.$$postDigest(function() {\n repositionScheduled = false;\n if (ttScope && ttScope.isOpen) {\n positionTooltip();\n }\n });\n }\n })\n );\n } else {\n observers.push(\n attrs.$observe(ttType, function(val) {\n ttScope.content = val;\n if (!val && ttScope.isOpen) {\n hide();\n } else {\n positionTooltip();\n }\n })\n );\n }\n\n observers.push(\n attrs.$observe(prefix + 'Title', function(val) {\n ttScope.title = val;\n if (ttScope.isOpen) {\n positionTooltip();\n }\n })\n );\n\n observers.push(\n attrs.$observe(prefix + 'Placement', function(val) {\n ttScope.placement = val ? val : options.placement;\n if (ttScope.isOpen) {\n positionTooltip();\n }\n })\n );\n }\n\n function unregisterObservers() {\n if (observers.length) {\n angular.forEach(observers, function(observer) {\n observer();\n });\n observers.length = 0;\n }\n }\n\n // hide tooltips/popovers for outsideClick trigger\n function bodyHideTooltipBind(e) {\n if (!ttScope || !ttScope.isOpen || !tooltip) {\n return;\n }\n // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked\n if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) {\n hideTooltipBind();\n }\n }\n\n // KeyboardEvent handler to hide the tooltip on Escape key press\n function hideOnEscapeKey(e) {\n if (e.which === 27) {\n hideTooltipBind();\n }\n }\n\n var unregisterTriggers = function() {\n triggers.show.forEach(function(trigger) {\n if (trigger === 'outsideClick') {\n element.off('click', toggleTooltipBind);\n } else {\n element.off(trigger, showTooltipBind);\n element.off(trigger, toggleTooltipBind);\n }\n element.off('keypress', hideOnEscapeKey);\n });\n triggers.hide.forEach(function(trigger) {\n if (trigger === 'outsideClick') {\n $document.off('click', bodyHideTooltipBind);\n } else {\n element.off(trigger, hideTooltipBind);\n }\n });\n };\n\n function prepTriggers() {\n var showTriggers = [], hideTriggers = [];\n var val = scope.$eval(attrs[prefix + 'Trigger']);\n unregisterTriggers();\n\n if (angular.isObject(val)) {\n Object.keys(val).forEach(function(key) {\n showTriggers.push(key);\n hideTriggers.push(val[key]);\n });\n triggers = {\n show: showTriggers,\n hide: hideTriggers\n };\n } else {\n triggers = getTriggers(val);\n }\n\n if (triggers.show !== 'none') {\n triggers.show.forEach(function(trigger, idx) {\n if (trigger === 'outsideClick') {\n element.on('click', toggleTooltipBind);\n $document.on('click', bodyHideTooltipBind);\n } else if (trigger === triggers.hide[idx]) {\n element.on(trigger, toggleTooltipBind);\n } else if (trigger) {\n element.on(trigger, showTooltipBind);\n element.on(triggers.hide[idx], hideTooltipBind);\n }\n element.on('keypress', hideOnEscapeKey);\n });\n }\n }\n\n prepTriggers();\n\n var animation = scope.$eval(attrs[prefix + 'Animation']);\n ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;\n\n var appendToBodyVal;\n var appendKey = prefix + 'AppendToBody';\n if (appendKey in attrs && attrs[appendKey] === undefined) {\n appendToBodyVal = true;\n } else {\n appendToBodyVal = scope.$eval(attrs[appendKey]);\n }\n\n appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;\n\n // Make sure tooltip is destroyed and removed.\n scope.$on('$destroy', function onDestroyTooltip() {\n unregisterTriggers();\n removeTooltip();\n ttScope = null;\n });\n };\n }\n };\n };\n }];\n})\n\n// This is mostly ngInclude code but with a custom scope\n.directive('uibTooltipTemplateTransclude', [\n '$animate', '$sce', '$compile', '$templateRequest',\nfunction ($animate, $sce, $compile, $templateRequest) {\n return {\n link: function(scope, elem, attrs) {\n var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);\n\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if (previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n\n if (currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) {\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (thisChangeId !== changeCounter) { return; }\n var newScope = origScope.$new();\n var template = response;\n\n var clone = $compile(template)(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, elem);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n }, function() {\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n }\n });\n\n scope.$on('$destroy', cleanupLastIncludeContent);\n }\n };\n}])\n\n/**\n * Note that it's intentional that these classes are *not* applied through $animate.\n * They must not be animated as they're expected to be present on the tooltip on\n * initialization.\n */\n.directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n // need to set the primary position so the\n // arrow has space during position measure.\n // tooltip.positionTooltip()\n if (scope.placement) {\n // // There are no top-left etc... classes\n // // in TWBS, so we need the primary position.\n var position = $uibPosition.parsePlacement(scope.placement);\n element.addClass(position[0]);\n }\n\n if (scope.popupClass) {\n element.addClass(scope.popupClass);\n }\n\n if (scope.animation) {\n element.addClass(attrs.tooltipAnimationClass);\n }\n }\n };\n}])\n\n.directive('uibTooltipPopup', function() {\n return {\n restrict: 'A',\n scope: { content: '@' },\n templateUrl: 'uib/template/tooltip/tooltip-popup.html'\n };\n})\n\n.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter');\n}])\n\n.directive('uibTooltipTemplatePopup', function() {\n return {\n restrict: 'A',\n scope: { contentExp: '&', originScope: '&' },\n templateUrl: 'uib/template/tooltip/tooltip-template-popup.html'\n };\n})\n\n.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', {\n useContentExp: true\n });\n}])\n\n.directive('uibTooltipHtmlPopup', function() {\n return {\n restrict: 'A',\n scope: { contentExp: '&' },\n templateUrl: 'uib/template/tooltip/tooltip-html-popup.html'\n };\n})\n\n.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) {\n return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', {\n useContentExp: true\n });\n}]);\n","angular.module(\"uib/template/popover/popover-html.html\", []).run([\"$templateCache\", function ($templateCache) {\n $templateCache.put(\"uib/template/popover/popover-html.html\",\n \"
\\n\" +\n \"\\n\" +\n \"
\\n\" +\n \"

\\n\" +\n \"
\\n\" +\n \"
\\n\" +\n \"\");\n}]);\n","angular.module(\"uib/template/popover/popover-template.html\", []).run([\"$templateCache\", function ($templateCache) {\n $templateCache.put(\"uib/template/popover/popover-template.html\",\n \"
\\n\" +\n \"\\n\" +\n \"
\\n\" +\n \"

\\n\" +\n \"
\\n\" +\n \"
\\n\" +\n \"\");\n}]);\n","angular.module(\"uib/template/popover/popover.html\", []).run([\"$templateCache\", function ($templateCache) {\n $templateCache.put(\"uib/template/popover/popover.html\",\n \"
\\n\" +\n \"\\n\" +\n \"
\\n\" +\n \"

\\n\" +\n \"
\\n\" +\n \"
\\n\" +\n \"\");\n}]);\n","angular.module(\"uib/template/tooltip/tooltip-html-popup.html\", []).run([\"$templateCache\", function ($templateCache) {\n $templateCache.put(\"uib/template/tooltip/tooltip-html-popup.html\",\n \"
\\n\" +\n \"
\\n\" +\n \"\");\n}]);\n","angular.module(\"uib/template/tooltip/tooltip-popup.html\", []).run([\"$templateCache\", function ($templateCache) {\n $templateCache.put(\"uib/template/tooltip/tooltip-popup.html\",\n \"
\\n\" +\n \"
\\n\" +\n \"\");\n}]);\n","angular.module(\"uib/template/tooltip/tooltip-template-popup.html\", []).run([\"$templateCache\", function ($templateCache) {\n $templateCache.put(\"uib/template/tooltip/tooltip-template-popup.html\",\n \"
\\n\" +\n \"
\\n\" +\n \"\");\n}]);\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ru = {}));\n}(this, (function (exports) { 'use strict';\n\n var fp = typeof window !== \"undefined\" && window.flatpickr !== undefined\n ? window.flatpickr\n : {\n l10ns: {},\n };\n var Russian = {\n weekdays: {\n shorthand: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"],\n longhand: [\n \"Воскресенье\",\n \"Понедельник\",\n \"Вторник\",\n \"Среда\",\n \"Четверг\",\n \"Пятница\",\n \"Суббота\",\n ],\n },\n months: {\n shorthand: [\n \"Янв\",\n \"Фев\",\n \"Март\",\n \"Апр\",\n \"Май\",\n \"Июнь\",\n \"Июль\",\n \"Авг\",\n \"Сен\",\n \"Окт\",\n \"Ноя\",\n \"Дек\",\n ],\n longhand: [\n \"Январь\",\n \"Февраль\",\n \"Март\",\n \"Апрель\",\n \"Май\",\n \"Июнь\",\n \"Июль\",\n \"Август\",\n \"Сентябрь\",\n \"Октябрь\",\n \"Ноябрь\",\n \"Декабрь\",\n ],\n },\n firstDayOfWeek: 1,\n ordinal: function () {\n return \"\";\n },\n rangeSeparator: \" — \",\n weekAbbreviation: \"Нед.\",\n scrollTitle: \"Прокрутите для увеличения\",\n toggleTitle: \"Нажмите для переключения\",\n amPM: [\"ДП\", \"ПП\"],\n yearAriaLabel: \"Год\",\n time_24hr: true,\n };\n fp.l10ns.ru = Russian;\n var ru = fp.l10ns;\n\n exports.Russian = Russian;\n exports.default = ru;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import helpTriggerTemplate from '/Areas/Admin/Content/src/_partials/help-trigger/templates/help-trigger.html';\n(function (ng) {\n 'use strict';\n\n /*\n * \n sdasfasdas
\n asdfsdasd\n
\n */\n var increment = 1;\n ng.module('helpTrigger').directive('helpTrigger', ['$sce', '$templateRequest', '$compile', '$templateCache', '$parse', 'urlHelper', function ($sce, $templateRequest, $compile, $templateCache, $parse, urlHelper) {\n return {\n controller: 'HelpTriggerCtrl',\n bindToController: true,\n controllerAs: '$ctrl',\n transclude: true,\n //scope: {\n // title: '@',\n // useTemplate: '').append(clone).html());\n }\n element[0].innerHTML = innerEl.innerHTML;\n var childs = element[0].children;\n $compile(childs)(scope);\n increment++;\n });\n }\n };\n }]);\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n var HelpTriggerCtrl = function ($scope, $document, $element, domService, helpTriggerService, isMobileService) {\n var ctrl = this,\n scrollTimer,\n scrollableContainer,\n popover,\n isTriggerHover = false,\n isPopoverHover = false;\n ctrl.$onInit = function () {\n ctrl.isMobile = isMobileService.getValue();\n };\n ctrl.mouseenter = function () {\n isTriggerHover = true;\n setTimeout(function () {\n if (isTriggerHover === false) {\n return;\n }\n var activeHelpTrigger = helpTriggerService.getActiveHelpTrigger();\n if (activeHelpTrigger != null) {\n activeHelpTrigger.close();\n }\n helpTriggerService.addActiveHelpTrigger(ctrl);\n ctrl.open();\n if (scrollableContainer == null) {\n scrollableContainer = domService.getScrollableParent($element[0]);\n }\n scrollableContainer.addEventListener('scroll', scroll);\n setTimeout(function () {\n popover = $document[0].querySelector('.' + ctrl.innerPopoverContentClass);\n bindPopover(popover);\n $document[0].addEventListener('mousemove', checkInHover);\n }, 100);\n $scope.$digest();\n }, 300);\n };\n ctrl.mouseleave = function () {\n isTriggerHover = false;\n };\n ctrl.close = function () {\n ctrl.isOpen = false;\n $document[0].removeEventListener('mousemove', checkInHover);\n scrollableContainer.removeEventListener('scroll', scroll);\n unbindPopover();\n helpTriggerService.clearActiveHelpTrigger(ctrl);\n popover = null;\n scrollableContainer = null;\n };\n ctrl.open = function () {\n ctrl.isOpen = true;\n };\n function bindPopover(popover) {\n if (popover != null) {\n popover.addEventListener('mouseenter', popoverMouseEnter);\n popover.addEventListener('mouseleave', popoverMouseLeave);\n }\n }\n function unbindPopover(popover) {\n if (popover != null) {\n popover.removeEventListener('mouseenter', popoverMouseEnter);\n popover.removeEventListener('mouseleave', popoverMouseLeave);\n }\n }\n function popoverMouseEnter(e) {\n isPopoverHover = true;\n }\n ;\n function popoverMouseLeave(e) {\n isPopoverHover = false;\n }\n function scroll(e) {\n if (scrollTimer != null) {\n clearTimeout(scrollTimer);\n }\n scrollTimer = setTimeout(function () {\n checkInHover(e);\n }, 100);\n }\n function checkInHover(e) {\n if (popover != null && isPopoverHover === false) {\n var mouseLoc = {\n x: e.x,\n y: e.y\n };\n var triggerRect = helpTriggerService.getContainerRect($element[0], scrollableContainer);\n var popoverRect = helpTriggerService.getContainerRect(popover, scrollableContainer);\n var options = {\n tolerance: 10\n };\n if (helpTriggerService.checkInTriangle(triggerRect, popoverRect, mouseLoc, options) === false) {\n ctrl.close();\n $scope.$digest();\n }\n }\n }\n };\n HelpTriggerCtrl.$inject = ['$scope', '$document', '$element', 'domService', 'helpTriggerService', 'isMobileService'];\n ng.module('helpTrigger', []).controller('HelpTriggerCtrl', HelpTriggerCtrl);\n})(window.angular);","import appDependency from \"../../../../../../scripts/appDependency.js\";\nimport popover from 'angular-ui-bootstrap/src/popover/index.js';\nimport '../../../../../../vendors/ui-bootstrap-custom/styles/ui-popover.css';\nappDependency.addItem(popover);\nimport './styles/help-trigger.scss';\nimport './helpTrigger.js';\nimport './helpTrigger.service.js';\nimport './helpTrigger.component.js';\nexport default 'helpTrigger';",";\n(function (ng) {\n 'use strict';\n\n var helpTriggerService = function ($window) {\n var service = this;\n var activeHelpTrigger;\n service.addActiveHelpTrigger = function (helpTrigger) {\n activeHelpTrigger = helpTrigger;\n };\n service.getActiveHelpTrigger = function () {\n return activeHelpTrigger;\n };\n service.clearActiveHelpTrigger = function (helpTrigger) {\n if (helpTrigger === activeHelpTrigger) {\n activeHelpTrigger = null;\n }\n };\n service.getContainerRect = function (container, scrollableContainer) {\n var rect = container.getBoundingClientRect();\n //var scrollTop = scrollableContainer.scrollTop;\n //var scrollLeft = scrollableContainer.scrollLeft;\n return {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n height: rect.height,\n width: rect.width,\n x: rect.x,\n y: rect.y\n };\n };\n\n //https://www.geeksforgeeks.org/check-whether-a-given-point-lies-inside-a-triangle-or-not/\n service.checkInTriangle = function (triggerRect, containerRect, mouseLoc, options) {\n var point1 = {\n x: triggerRect.x - options.tolerance,\n y: triggerRect.y\n };\n var point2 = {\n x: containerRect.left + options.tolerance,\n y: containerRect.top - options.tolerance\n };\n var point3 = {\n x: containerRect.left + options.tolerance,\n y: containerRect.bottom + options.tolerance\n };\n return isTriangleInside(point1, point2, point3, mouseLoc);\n };\n function isTriangleInside(point1, point2, point3, currentPoint) {\n var a = triangleArea(point1, point2, point3);\n var a1 = triangleArea(currentPoint, point2, point3);\n var a2 = triangleArea(point1, currentPoint, point3);\n var a3 = triangleArea(point1, point2, currentPoint);\n return a === a1 + a2 + a3;\n }\n function triangleArea(point1, point2, point3) {\n return Math.abs((point1.x * (point2.y - point3.y) + point2.x * (point3.y - point1.y) + point3.x * (point1.y - point2.y)) / 2.0);\n }\n };\n ng.module('helpTrigger').service('helpTriggerService', ['$window', helpTriggerService]);\n})(window.angular);","(function (ng) {\n 'use strict';\n\n const isMobile = document.documentElement.classList.contains('mobile-version');\n class IsMobileController {\n constructor() {}\n $onInit() {\n this.value = isMobile;\n }\n }\n class IsMobileDirective {\n constructor() {\n this.priority = 10;\n this.scope = false;\n this.controllerAs = \"isMobile\";\n this.controller = IsMobileController;\n this.bindToController = true;\n }\n }\n class IsMobileService {\n getValue() {\n return isMobile;\n }\n }\n angular.module('isMobile', []).service('isMobileService', IsMobileService).directive('isMobile', () => new IsMobileDirective());\n})(window.angular);","angular.module('ui.bootstrap.popover').config( /* @ngInject */[\"$provide\", function ($provide) {\n let uid = 0;\n const prefix = 'popover';\n const backdropDonor = document.createElement('div');\n backdropDonor.classList.add('popover-backdrop');\n ['uibPopoverTemplateDirective', 'uibPopoverHtmlDirective', 'uibPopoverDirective'].forEach(directiveName => {\n $provide.decorator(directiveName, /* @ngInject */[\"$delegate\", \"$parse\", \"isMobileService\", \"$timeout\", function ($delegate, $parse, isMobileService, $timeout) {\n const directive = $delegate[0];\n const originalCompile = directive.compile;\n directive.compile = function (tElement, tAttrs) {\n const originalLink = originalCompile(tElement, tAttrs);\n return function (scope, element, attrs, tooltipCtrl) {\n if (isMobileService.getValue()) {\n attrs.$set('popoverTrigger', null);\n attrs.$set('popoverAppendToBody', 'true');\n }\n const isOpenAttr = attrs[prefix + 'IsOpen'];\n if (angular.isDefined(isOpenAttr) === false) {\n attrs.$set('popoverIsOpen', \"app.popoverIsOpenGenerated_\" + uid);\n uid = uid + 1;\n }\n let onClickBackButtonFunc = function (e) {\n event.preventDefault();\n const getter = $parse(attrs.popoverIsOpen);\n getter.assign(scope, false);\n scope.$apply();\n };\n scope.$watch(attrs.popoverIsOpen, (newValue, oldValue) => {\n if (newValue === oldValue) {\n return;\n }\n if (newValue === true) {\n window.history.pushState({\n 'popover': 'open'\n }, null, window.location.href);\n window.addEventListener('popstate', onClickBackButtonFunc);\n } else {\n window.history.replaceState({\n 'popover': 'close'\n }, null, window.location.href);\n window.removeEventListener('popstate', onClickBackButtonFunc);\n }\n });\n originalLink.apply(directive, arguments);\n };\n };\n return $delegate;\n }]);\n });\n ['uibPopoverTemplatePopupDirective', 'uibPopoverHtmlPopupDirective', 'uibPopoverPopupDirective'].forEach(directiveName => {\n $provide.decorator(directiveName, /* @ngInject */[\"$delegate\", \"$parse\", \"isMobileService\", function ($delegate, $parse, isMobileService) {\n const directive = $delegate[0];\n const originalCompile = directive.compile;\n let originalLink;\n directive.compile = function (tElement, tAttrs) {\n originalLink = originalCompile ? originalCompile(tElement, tAttrs) : directive.link;\n return function (scope, element, attrs) {\n if (originalLink != null) {\n originalLink.apply(directive, arguments);\n }\n if (isMobileService.getValue()) {\n const backdrop = backdropDonor.cloneNode();\n element[0].insertAdjacentElement(\"beforebegin\", backdrop);\n element.on('$destroy', () => {\n backdrop.remove();\n });\n }\n };\n };\n return $delegate;\n }]);\n });\n}]);","import checkoutModule from '../scripts/checkout/checkout.module.js';\nimport appDependency from '../scripts/appDependency.js';\nappDependency.addItem(checkoutModule);","/**\n * Class implementing publish/subscribe.\n * Class is singleton\n */\n\n// TODO rewrite to TS\nlet instance;\nclass PubSubClass {\n constructor() {\n if (instance || window.PubSub) {\n return instance || window.PubSub;\n }\n instance = this;\n this.events = {};\n }\n /**\n * Subscribes callback to the event\n * @param {string} eventName\n * @param {Function} callback\n * @returns {Function} function for remove it callback\n */\n subscribe(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = [];\n }\n const id = this.events[eventName].push(callback) - 1;\n return () => {\n this.events[eventName].splice(id, 1);\n };\n }\n /**\n * Notify subscribes callbacks\n * @param {string} eventName\n * @param {any} data - data to params callback.\n * @returns {boolean} True, if publish success. False, if fail\n */\n publish(eventName) {\n for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n const event = this.events[eventName];\n if (!event) {\n return false;\n }\n event.forEach(callback => callback(...data));\n\n //TODO: remove when we give up JQ\n $(document).trigger(eventName, [...data]);\n return true;\n }\n /**\n * Get all subscribes on event\n * @param {string} eventName\n * @returns {Array} array subscribes\n */\n getSubscribes(eventName) {\n return this.events[eventName];\n }\n /**\n * Clear all events.\n */\n clear() {\n this.events = {};\n }\n}\nconst PubSub = new PubSubClass();\nglobalThis.PubSub = PubSub;\nexport { PubSub };",";\n(function (ng) {\n 'use strict';\n\n var isTouchDevice = ('ontouchstart' in document.documentElement);\n var ModalController = function ($element, $attrs, $location, $scope, $window, modalDefaultOptions, modalService) {\n var ctrl = this,\n urlSearch = $location.search(),\n mobilePageYOffset;\n if (urlSearch != null && angular.isDefined(urlSearch.modal) && urlSearch.modal === $attrs.id) {\n ctrl.isOpen = true;\n } else {\n ctrl.isOpen = angular.isDefined($attrs.isOpen) ? $attrs.isOpen === 'true' : modalDefaultOptions.isOpen;\n }\n ctrl.modalClickOut = function (event) {\n if (ctrl.closeOut === true && event.currentTarget === event.target && ctrl.isFloating === false && ctrl.mousedownOnContent !== true) {\n ctrl.close();\n }\n };\n ctrl.setMousedownOnContent = function (value) {\n ctrl.mousedownOnContent = value;\n };\n ctrl.setVisibleFooter = function (visible) {\n ctrl.isShowFooter = visible;\n };\n ctrl.close = function (skipRemove) {\n ctrl.isOpen = false;\n if (isTouchDevice === true) {\n document.body.style.width = 'auto';\n document.body.classList.remove('adv-body-fixed-touch');\n $window.scrollBy(0, mobilePageYOffset);\n mobilePageYOffset = null;\n }\n modalService.removeItemQueue(ctrl);\n if (ctrl.spyAddress === true) {\n /* && $location.hash() === ctrl.anchor*/\n $window.history.pushState('', '', $window.location.pathname);\n }\n document.body.classList.remove('bodyNotScroll');\n if (ctrl.callbackClose != null) {\n ctrl.callbackClose($scope);\n }\n if (ctrl.destroyOnClose === true && !skipRemove) {\n modalService.removeFromStorage(ctrl.id);\n $scope.$destroy();\n $element.remove();\n }\n };\n ctrl.destroy = function () {\n ctrl.close();\n $element.remove();\n modalService.removeFromStorage(ctrl.id);\n };\n ctrl.open = function (skipQueue, modalDataAdditional) {\n if (ctrl.isOpen === false && (modalService.isWorking() === true || modalService.checkQueue(ctrl) === true || skipQueue === true)) {\n ctrl.modalDataAdditional = modalDataAdditional;\n ctrl.isOpen = true;\n if (isTouchDevice === true) {\n mobilePageYOffset = $window.pageYOffset;\n document.body.style.width = document.body.offsetWidth + 'px';\n document.body.classList.add('adv-body-fixed-touch');\n }\n document.body.classList.add('bodyNotScroll');\n if (ctrl.spyAddress === true) {\n $location.hash(ctrl.anchor);\n }\n if (ctrl.callbackOpen != null) {\n ctrl.callbackOpen($scope);\n }\n }\n if (modalService.existInQueue(ctrl) === false) {\n modalService.addQueue(ctrl);\n }\n $element.css('z-index', modalService.getNewZIndex( /*GlorySoft_015*/ctrl.id == 'modalCartPopup' ? 5000 : null));\n };\n ctrl.getModalScope = function () {\n return ctrl;\n };\n ctrl.getModalElement = function () {\n return $element;\n };\n ctrl.getTransformValue = function (x, y) {\n return 'translate3d(' + x.toFixed() + 'px,' + y.toFixed() + 'px, 0px)';\n };\n ctrl.getTransformMethodString = function () {\n if (angular.isDefined(this.transform)) {\n return this.transform;\n }\n var methodsArray = ['webkitTransform', 'MozTransform', 'msTransform', 'OTransform', 'transform'],\n noopStyle = document.createElement('span').style;\n for (var i = 0, il = methodsArray.length; i < il; i += 1) {\n if (angular.isDefined(noopStyle[methodsArray[i]])) {\n this.transform = methodsArray[i];\n break;\n }\n }\n return this.transform;\n };\n };\n angular.module('modal').controller('ModalCtrl', ModalController);\n ModalController.$inject = ['$element', '$attrs', '$location', '$scope', '$window', 'modalDefaultOptions', 'modalService', '$timeout'];\n})(angular);","import modalTemplate from '/scripts/_common/modal/templates/modal.html';\n;\n(function (ng) {\n 'use strict';\n\n var modalIdIncrement = 0,\n transformName = 'transform',\n inIframe = function () {\n try {\n return window.self !== window.top;\n } catch (e) {\n return true;\n }\n }();\n angular.module('modal').directive('modalControl', ['$compile', '$document', '$parse', '$timeout', 'modalService', 'modalDefaultOptions', 'domService', 'urlHelper', '$location', function ($compile, $document, $parse, $timeout, modalService, modalDefaultOptions, domService, urlHelper, $location) {\n return {\n restrict: 'EA',\n transclude: true,\n scope: true,\n replace: true,\n controller: 'ModalCtrl',\n controllerAs: 'modal',\n bindToController: true,\n templateUrl: function (element, attrs) {\n return attrs.templatePath || modalTemplate;\n },\n compile: function (cElement, cAttrs) {\n return function (scope, element, attrs, ctrl, transclude) {\n ctrl.id = attrs.id;\n if (ctrl.id == null || ctrl.id.length === 0) {\n ctrl.id = 'modal_' + modalIdIncrement;\n modalIdIncrement += 1;\n attrs.$set('id', ctrl.id);\n }\n if (modalService.hasModal(ctrl.id) === true) {\n return;\n }\n ctrl._form = scope.form;\n ctrl.inIframe = inIframe;\n ctrl.modalClass = (attrs.modalClass || modalDefaultOptions.modalClass) + ' ' + (attrs.appendModalClass != null ? attrs.appendModalClass : modalDefaultOptions.appendModalClass);\n ctrl.modalOverlayClass = attrs.modalOverlayClass;\n ctrl.isFloating = angular.isDefined(attrs.isFloating) ? attrs.isFloating == 'true' : modalDefaultOptions.isFloating;\n ctrl.crossEnable = angular.isDefined(attrs.crossEnable) ? attrs.crossEnable == 'true' : modalDefaultOptions.crossEnable;\n ctrl.backgroundEnable = angular.isDefined(attrs.backgroundEnable) ? attrs.backgroundEnable === 'true' : modalDefaultOptions.backgroundEnable;\n ctrl.closeOut = angular.isDefined(attrs.closeOut) ? attrs.closeOut === 'true' : modalDefaultOptions.closeOut;\n ctrl.isFloating = angular.isDefined(ctrl.isFloating) ? ctrl.isFloating : modalDefaultOptions.isFloating;\n ctrl.crossEnable = angular.isDefined(ctrl.crossEnable) ? ctrl.crossEnable : modalDefaultOptions.crossEnable;\n ctrl.backgroundEnable = angular.isDefined(ctrl.backgroundEnable) ? ctrl.backgroundEnable : modalDefaultOptions.backgroundEnable;\n ctrl.closeOut = angular.isDefined(ctrl.closeOut) ? ctrl.closeOut : modalDefaultOptions.closeOut;\n ctrl.isOpen = angular.isDefined(ctrl.isOpen) ? ctrl.isOpen : modalDefaultOptions.isOpen;\n ctrl.startOpenDelay = angular.isDefined(attrs.startOpenDelay) && attrs.startOpenDelay.length > 0 ? parseInt(attrs.startOpenDelay) : null;\n ctrl.callbackOpen = $parse(attrs.callbackOpen);\n ctrl.callbackClose = $parse(attrs.callbackClose);\n ctrl.callbackInit = $parse(attrs.callbackInit);\n ctrl.closeEsc = angular.isDefined(attrs.closeEsc) ? attrs.closeEsc === 'true' : modalDefaultOptions.closeEsc;\n ctrl.isShowFooter = angular.isDefined(attrs.isShowFooter) ? attrs.isShowFooter === 'true' : modalDefaultOptions.isShowFooter;\n ctrl.destroyOnClose = angular.isDefined(attrs.destroyOnClose) ? attrs.destroyOnClose === 'true' : false;\n ctrl.anchor = attrs.anchor || ctrl.id;\n ctrl.spyAddress = angular.isDefined(attrs.spyAddress) ? attrs.spyAddress === 'true' : false;\n var modalElementTransclude = angular.element(element[0].querySelector('.js-modal-transclude'));\n transclude(scope, function (clone) {\n modalElementTransclude.replaceWith(clone);\n });\n modalService.addStorage(attrs.id, element, ctrl);\n if (element[0].parentNode !== document.body) {\n document.body.appendChild(element[0]);\n }\n if (attrs.callbackInit != null) {\n ctrl.callbackInit(scope);\n }\n if (ctrl.startOpenDelay != null) {\n $timeout(modalService.open.bind(this, ctrl.id), ctrl.startOpenDelay);\n }\n if (ctrl.closeEsc === true) {\n $document[0].addEventListener('keyup', function (event) {\n if (event.keyCode === 27 && ctrl.isOpen === true) {\n //esc\n ctrl.close();\n scope.$apply();\n }\n });\n }\n ;\n var hash;\n if ($location.hash() != null) {\n hash = $location.hash();\n var splitedHash = $location.hash().split('?');\n hash = splitedHash != null ? splitedHash[0] : hash;\n }\n if (ctrl.spyAddress === true && ctrl.anchor != null && ctrl.anchor.length > 0 && hash === ctrl.anchor) {\n ctrl.open();\n }\n ;\n $document[0].addEventListener('click', function () {\n ctrl.setMousedownOnContent(false);\n });\n };\n }\n };\n }]);\n angular.module('modal').directive('modalHeader', ['$q', '$document', '$window', 'domService', function ($q, $document, $window, domService) {\n return {\n restrict: 'EA',\n require: '^modalControl',\n transclude: true,\n replace: true,\n template: '
',\n scope: true,\n link: function (scope, element, attrs, ctrl) {\n ctrl.headerExist = true;\n var modalHeader = element[0],\n modal = ctrl.getModalElement()[0];\n if (ctrl.isFloating === true) {\n var mouseStartPosition = {\n x: 0,\n y: 0\n },\n transitionStartPosition = {\n x: 0,\n y: 0\n },\n transitionMovePosition = {\n x: 0,\n y: 0\n },\n isFirstMove = true,\n isMove = false,\n isModalForseFloatDisable = false;\n var start = function (e) {\n var computedStyleTransform, parsedTransform;\n if (isModalForseFloatDisable === true || domService.closest(e.target, modal) == null || domService.closest(e.target, '.js-modal-header') == null) {\n return;\n }\n mouseStartPosition.x = e.pageX;\n mouseStartPosition.y = e.pageY;\n isMove = true;\n if (isFirstMove === true) {\n isFirstMove = false;\n computedStyleTransform = window.getComputedStyle(modal)[transformName];\n if (computedStyleTransform.length > 0) {\n if (computedStyleTransform === 'none') {\n transitionStartPosition.x = 0;\n transitionStartPosition.y = 0;\n } else {\n parsedTransform = JSON.parse(computedStyleTransform.replace(/^\\w+\\(/, \"[\").replace(/\\)$/, \"]\"));\n transitionStartPosition.x = parsedTransform[4];\n transitionStartPosition.y = parsedTransform[5];\n }\n }\n }\n $document[0].addEventListener('mousemove', move);\n $document[0].addEventListener('touchmove', move, {\n passive: true\n });\n modalHeader.addEventListener('mouseup', end);\n modalHeader.addEventListener('touchend', end, {\n passive: true\n });\n\n //e.stopPropagation();\n //e.preventDefault();\n };\n\n var move = function (e) {\n //if (isModalForseFloatDisable === true || domService.closest(e.target, modal) == null || domService.closest(e.target, '.js-modal-header') == null || isMove === false) {\n // isMove = false;\n // return;\n //}\n\n transitionMovePosition.x = transitionStartPosition.x + (e.pageX - mouseStartPosition.x);\n transitionMovePosition.y = transitionStartPosition.y + (e.pageY - mouseStartPosition.y);\n modal.style[ctrl.getTransformMethodString()] = ctrl.getTransformValue(transitionMovePosition.x, transitionMovePosition.y);\n\n //e.stopPropagation();\n //e.preventDefault();\n };\n\n var end = function (e) {\n //if (isModalForseFloatDisable === true || domService.closest(e.target, modal) == null || domService.closest(e.target, '.js-modal-header') == null) {\n // return;\n //}\n\n mouseStartPosition.x = e.pageX;\n mouseStartPosition.y = e.pageY;\n transitionStartPosition.x = transitionMovePosition.x;\n transitionStartPosition.y = transitionMovePosition.y;\n transitionMovePosition.x = 0;\n transitionMovePosition.y = 0;\n isMove = false;\n $document[0].removeEventListener('mousemove', move);\n $document[0].removeEventListener('touchmove', move);\n modalHeader.removeEventListener('mouseup', end);\n modalHeader.removeEventListener('touchend', end);\n\n //e.stopPropagation();\n //e.preventDefault();\n };\n\n modalHeader.addEventListener('mousedown', start);\n modalHeader.addEventListener('touchstart', start, {\n passive: true\n });\n $window.matchMedia('(max-width: 30em)').addListener(function () {\n isModalForseFloatDisable = true;\n });\n $window.matchMedia('(min-width: 31em)').addListener(function () {\n isModalForseFloatDisable = false;\n });\n }\n }\n };\n }]);\n angular.module('modal').directive('modalFooter', function () {\n return {\n restrict: 'EA',\n require: '^modalControl',\n transclude: true,\n replace: true,\n template: '
',\n scope: true\n };\n });\n angular.module('modal').directive('modalOpen', ['$parse', 'modalService', function ($parse, modalService) {\n return {\n restrict: 'A',\n link: function (scope, element, attrs, ctrl) {\n var callbackOpen, callbackClose;\n if (attrs.modalOpenCallback != null && attrs.modalOpenCallback.length > 0) {\n callbackOpen = $parse(attrs.modalOpenCallback);\n }\n if (attrs.modalOpenCallbackOnClose != null && attrs.modalOpenCallbackOnClose.length > 0) {\n callbackClose = $parse(attrs.modalOpenCallbackOnClose);\n }\n element.on('click', function () {\n modalService.getModal(attrs.modalOpen).then(function (modal) {\n if (callbackOpen != null) {\n callbackOpen(scope);\n }\n if (callbackClose != null) {\n var oldFn = modal.modalScope.callbackClose;\n modal.modalScope.callbackClose = function (modalScope) {\n oldFn.apply(this, arguments);\n callbackClose(scope);\n };\n }\n });\n var modalDataAdditional = $parse(attrs.modalDataAdditional)(scope);\n modalService.open(attrs.modalOpen, attrs.modalOpenSkipQueue === 'true', modalDataAdditional);\n scope.$apply();\n });\n }\n };\n }]);\n angular.module('modal').directive('modalClose', ['$parse', 'modalService', function ($parse, modalService) {\n return {\n require: '?^modalControl',\n restrict: 'A',\n link: function (scope, element, attrs, ctrl) {\n var modalCtrl = ctrl,\n callback;\n if (attrs.modalCloseCallback != null && attrs.modalCloseCallback.length > 0) {\n callback = $parse(attrs.modalCloseCallback);\n }\n element.on('click', function () {\n if (callback != null) {\n callback(scope);\n }\n if (attrs.modalClose != null && attrs.modalClose.length > 0) {\n modalService.close(attrs.modalClose);\n } else if (modalCtrl != null) {\n modalCtrl.close();\n }\n scope.$apply();\n });\n }\n };\n }]);\n})(angular);",";\n(function (ng) {\n 'use strict';\n\n angular.module('modal', []).constant('modalDefaultOptions', {\n id: undefined,\n isFloating: false,\n crossEnable: true,\n backgroundEnable: true,\n closeOut: true,\n isOpen: false,\n closeEsc: true,\n isShowFooter: true,\n modalClass: undefined,\n modalOverlayClass: undefined,\n callbackInit: undefined,\n callbackOpen: undefined,\n callbackClose: undefined,\n startOpenDelay: undefined,\n zIndex: 999\n });\n})(angular);","import './styles/modal.scss';\nimport './styles/modal-theme.scss';\nimport './modal.js';\nimport './controllers/modalController.js';\nimport './directives/modalDirectives.js';\nimport './services/modalService.js';",";\n(function (ng) {\n 'use strict';\n\n angular.module('modal').service('modalService', ['$compile', '$rootScope', '$q', 'modalDefaultOptions', function ($compile, $rootScope, $q, modalDefaultOptions) {\n var modals = {},\n promises = {},\n queue = [],\n working = true,\n modalService = this;\n modalService.stopWorking = function () {\n working = false;\n };\n modalService.startWorking = function () {\n working = true;\n if (queue.length > 0) {\n modalService.open(queue[0].id);\n }\n };\n modalService.isWorking = function () {\n return working === true;\n };\n modalService.checkQueue = function (modal) {\n return queue.length === 0 || modalService.existInQueue(modal);\n };\n modalService.existInQueue = function (modal) {\n return queue.indexOf(modal) !== -1;\n };\n modalService.addQueue = function (modal) {\n queue.push(modal);\n };\n modalService.removeItemQueue = function (modal) {\n var index = queue.indexOf(modal);\n if (index !== -1) {\n queue.splice(index, 1);\n }\n if (queue.length > 0) {\n modalService.open(queue[queue.length - 1].id);\n }\n };\n modalService.open = function (modalId, skipQueue, modalDataAdditional) {\n if (angular.isDefined(modals[modalId])) {\n modals[modalId].modalScope.open(skipQueue, modalDataAdditional);\n }\n };\n modalService.close = function (modalId) {\n if (angular.isDefined(modals[modalId])) {\n modals[modalId].modalScope.close();\n }\n };\n modalService.destroy = function (modalId) {\n if (angular.isDefined(modals[modalId])) {\n modals[modalId].modalScope.destroy();\n modalService.removeFromStorage(modalId);\n }\n };\n modalService.setVisibleFooter = function (modalId, visible) {\n if (angular.isDefined(modals[modalId])) {\n modals[modalId].modalScope.setVisibleFooter(visible);\n }\n };\n modalService.addStorage = function (modalId, modalElement, modalScope) {\n modals[modalId] = {\n modalElement: modalElement,\n modalScope: modalScope\n };\n if (promises[modalId] != null) {\n promises[modalId].resolve(modals[modalId]);\n delete promises[modalId];\n }\n return modals[modalId];\n };\n modalService.hasModal = function (modalId) {\n return modals[modalId] != null;\n };\n modalService.getModal = function (modalId) {\n var defer = $q.defer();\n if (modals[modalId] != null) {\n defer.resolve(modals[modalId]);\n } else {\n promises[modalId] = defer;\n }\n return defer.promise;\n };\n modalService.renderAttrubutes = function (attrubutes) {\n var arrStrings = [],\n tempString,\n keyFormatted;\n for (var key in attrubutes) {\n if (attrubutes.hasOwnProperty(key)) {\n keyFormatted = key.replace(/[A-Z]/g, function (str) {\n return \"-\" + str.toLowerCase();\n });\n tempString = [keyFormatted, '=', '\"', attrubutes[key], '\"'].join('');\n arrStrings.push(tempString);\n }\n }\n return arrStrings.join(' ');\n };\n /**\n * \n * @param {string} modalId Unique id for modal\n * @param {string} modalHeader String as html for header\n * @param {string} modalContent String as html for content\n * @param {string} modalFooter String as html for footer\n * @param {object} options Options for modal\n * @param {$scope} parentScope Parent scope for compile\n * @returns {JqueryElement} Form Element\n */\n modalService.renderModal = function (modalId, modalHeader, modalContent, modalFooter, options, parentScope) {\n if (angular.isUndefined(modalId) || modalId.length === 0) {\n throw Error('Modal \"id\" is required');\n }\n if (angular.isDefined(modals[modalId])) {\n return modals[modalId].modalElement;\n }\n var parentScopeAsAngularScope = parentScope != null && parentScope instanceof $rootScope.constructor;\n options = options || {};\n options = angular.extend({}, modalDefaultOptions, options, {\n id: modalId\n });\n var scope = parentScopeAsAngularScope ? parentScope : $rootScope.$new(),\n blockStart = [''],\n header = modalHeader != null ? ['
', modalHeader, '
'] : [' '],\n content = modalContent != null ? ['
', modalContent, '
'] : [' '],\n footer = modalFooter != null ? ['
', modalFooter, '
'] : [' '],\n blockEnd = ['
'],\n compileString = blockStart.join('') + header.join('') + footer.join('') + content.join('') + blockEnd.join(''),\n modalElement;\n modalElement = angular.element(compileString).css('z-index', modalService.getNewZIndex(options.zIndex));\n angular.element(document.body).append(modalElement);\n if (parentScope != null && parentScopeAsAngularScope === false) {\n angular.extend(scope, parentScope);\n }\n return $compile(modalElement)(scope);\n };\n modalService.getNewZIndex = function (zIndex) {\n return (zIndex != null ? zIndex : modalDefaultOptions.zIndex) * (queue.length + 1);\n };\n modalService.removeFromStorage = function (modalId) {\n delete modals[modalId];\n };\n }]);\n})(angular);","import yandexMapsService from './yandexMapsService.js';\nconst moduleName = 'yandexMaps';\nangular.module(moduleName, []).service('yandexMapsService', yandexMapsService);\nexport default moduleName;","yandexMapsService.$inject = [\"urlHelper\", \"$q\"];\n/*@ngInject*/\nfunction yandexMapsService(urlHelper, $q) {\n const service = this;\n let deferReady = $q.defer();\n let isInitialized = false;\n\n // дополнительная функция проверки признаков что янекс.карта уже как-то загружена\n service.isLoadedYandexMap = function () {\n return window.ymaps != null;\n };\n service.loadYandexMap = function (params) {\n if (service.isLoadedYandexMap() && isInitialized) {\n return deferReady.resolve();\n } else {\n if (document.querySelector('script[src*=\"api-maps.yandex.ru\"]') == null) {\n var script = document.createElement('script');\n script.onload = function () {\n waitingInitYmaps();\n };\n script.src = 'https://api-maps.yandex.ru/2.1/?' + urlHelper.paramsToString(angular.extend({\n lang: 'ru-RU'\n }, params || {}));\n document.body.appendChild(script);\n } else {\n waitingInitYmaps();\n }\n }\n return deferReady.promise;\n };\n function waitingInitYmaps() {\n const _defer = $q.defer();\n if (service.isLoadedYandexMap()) {\n ymaps.ready(() => _defer.resolve());\n } else {\n return loop(_defer);\n }\n return _defer.promise.then(() => {\n isInitialized = true;\n deferReady.resolve();\n });\n }\n const delay = 50;\n const retryMax = 3000 / 50;\n let tryCount = 0;\n function loop(defer) {\n if (service.isLoadedYandexMap()) {\n defer.resolve();\n } else if (tryCount < retryMax) {\n tryCount += 1;\n setTimeout(() => loop(defer), delay);\n } else {\n console.warn('Yandex map not found');\n defer.reject('Yandex map not found');\n }\n return defer.promise;\n }\n}\nexport default yandexMapsService;","import './styles/address.scss';\nimport AddressListCtrl from './controllers/addressListController.js';\nimport { addressListDirective, addressListTransclude } from './directives/addressDirectives.js';\nimport addressService from './services/addressService.js';\nimport zone from '../zone/zone.module.js';\nconst moduleName = 'address';\nangular.module(moduleName, [zone]).constant('addressListConfig', {\n autocompleteAlt: false,\n themeAlt: false,\n compactMode: false,\n overrideFields: null\n}).service('addressService', addressService).controller('AddressListCtrl', AddressListCtrl).directive('addressList', addressListDirective).directive('addressListTransclude', addressListTransclude);\nexport default moduleName;","AddressListCtrl.$inject = [\"$http\", \"$q\", \"$timeout\", \"addressService\", \"zoneService\", \"modalService\", \"urlHelper\", \"addressListConfig\", \"$transclude\", \"$scope\", \"SweetAlert\", \"$translate\"];\n/* @ngInject */\nfunction AddressListCtrl($http, $q, $timeout, addressService, zoneService, modalService, urlHelper, addressListConfig, $transclude, $scope, SweetAlert, $translate) {\n var ctrl = this,\n timerChange,\n processContactTimer;\n ctrl.$onInit = function () {\n ctrl.items = [];\n ctrl.form = {};\n ctrl.fields = null;\n ctrl.isLoaded = false;\n ctrl.themeAlt = ctrl.themeAlt != null ? ctrl.themeAlt : addressListConfig.themeAlt;\n ctrl.compactMode = ctrl.compactMode != null ? ctrl.compactMode : addressListConfig.compactMode;\n ctrl.autocompleteAlt = ctrl.autocompleteAlt != null ? ctrl.autocompleteAlt : addressListConfig.autocompleteAlt;\n modalService.getModal('modalAddress').then(function (modal) {\n ctrl.formModal = modal.modalScope._form;\n });\n addressService.getAddresses(ctrl.customerId).then(function (response) {\n ctrl.items = [];\n if (response != null && response !== '' && response.length > 0) {\n ctrl.items = response.filter(x => {\n var _x$Country;\n return ((_x$Country = x.Country) === null || _x$Country === void 0 ? void 0 : _x$Country.length) > 0;\n });\n }\n ctrl.addressSelected = ctrl.findItemForSelect();\n ctrl.initAddressFn({\n address: ctrl.addressSelected\n });\n ctrl.isLoaded = true;\n });\n };\n ctrl.isModalRendered = function () {\n return modalService.hasModal('modalAddress');\n };\n ctrl.change = function (address) {\n if (timerChange != null) {\n clearTimeout(timerChange);\n }\n timerChange = setTimeout(function () {\n ctrl.changeAddressFn({\n address: ctrl.addressSelected\n });\n }, 600);\n };\n ctrl.add = function () {\n ctrl.clearFormData();\n ctrl.buildModal();\n if (ctrl.isModalRendered() === false) {\n addressService.dialogRender('addressList.modalCallbackClose(modalScope)', ctrl);\n } else {\n addressService.dialogOpen();\n }\n };\n ctrl.edit = function (item) {\n ctrl.form.contactId = item.ContactId;\n ctrl.form.fio = item.Name;\n ctrl.form.firstName = item.FirstName;\n ctrl.form.lastName = item.LastName;\n ctrl.form.patronymic = item.Patronymic;\n ctrl.form.countryId = item.CountryId;\n //ctrl.form.country = item.Country; //set in ctrl.buildModal()\n ctrl.form.region = item.Region;\n ctrl.form.city = item.City;\n ctrl.form.district = item.District;\n ctrl.form.zip = item.Zip;\n ctrl.form.street = item.Street;\n ctrl.form.house = item.House;\n ctrl.form.apartment = item.Apartment;\n ctrl.form.structure = item.Structure;\n ctrl.form.entrance = item.Entrance;\n ctrl.form.floor = item.Floor;\n ctrl.buildModal().then(function () {\n if (ctrl.isModalRendered() === false) {\n addressService.dialogRender('addressList.modalCallbackClose', ctrl);\n } else {\n addressService.dialogOpen();\n }\n });\n };\n ctrl.remove = function (contactId, index) {\n SweetAlert.confirm($translate.instant('Js.Address.AreYouSureDelete'), {\n title: $translate.instant('Js.Address.Deleting')\n }).then(function (result) {\n if (result === true || result.value) {\n addressService.removeAddress(contactId, ctrl.customerId).then(function (response) {\n if (response === true) {\n var isItemSeletedRemoved = ctrl.addressSelected === ctrl.items[index];\n var itemRemoved = ctrl.items.splice(index, 1);\n if (isItemSeletedRemoved && ctrl.items.length > 0) {\n ctrl.addressSelected = ctrl.items[0];\n }\n if (ctrl.deleteAddressFn != null) {\n ctrl.deleteAddressFn({\n items: ctrl.items,\n itemRemoved: itemRemoved[0],\n addressSelected: ctrl.addressSelected,\n isItemSeletedRemoved\n });\n }\n }\n });\n }\n });\n };\n ctrl.checkFieldsVisible = function (fields) {\n if (addressListConfig.overrideFields != null && Array.isArray(addressListConfig.overrideFields.visible)) {\n for (const value of addressListConfig.overrideFields.visible) {\n if (fields[value] != null) {\n fields[value] = true;\n }\n }\n }\n return fields;\n };\n ctrl.buildModal = function () {\n return addressService.getFields(ctrl.isShowName, ctrl.customerId).then(function (response) {\n return ctrl.fields = ctrl.fields || ctrl.checkFieldsVisible(response);\n }).then(function (fields) {\n if (!fields.IsShowFullAddress) {\n ctrl.clearFullAddressData();\n }\n ctrl.initListsMaxHeight();\n if (fields.IsShowCountry === true) {\n return ctrl.getCountries();\n }\n }).then(function (countries) {\n if (countries != null) {\n return ctrl.getSelectedCountry(countries);\n }\n });\n };\n ctrl.getCountries = function () {\n var countriesDefer = $q.defer(),\n countriesPromise;\n if (ctrl.form.countries != null) {\n countriesPromise = countriesDefer.promise;\n countriesDefer.resolve(ctrl.form.countries);\n } else {\n countriesPromise = $http.get(urlHelper.getAbsUrl('location/GetCountries', true)).then(function (response) {\n return ctrl.form.countries = response.data;\n });\n }\n return countriesPromise;\n };\n ctrl.getSelectedCountry = function (countries) {\n return $q.when(ctrl.form.countryId != null && ctrl.form.countryId !== 0 ? {\n CountryId: ctrl.form.countryId\n } : zoneService.getCurrentZone()).then(function (zone) {\n var country;\n for (var i = countries.length - 1; i >= 0; i--) {\n if (countries[i].CountryId === zone.CountryId) {\n country = countries[i];\n break;\n }\n }\n return ctrl.form.country = country;\n });\n };\n ctrl.save = function () {\n var obj = ctrl.getObjectForUpdate();\n addressService.addUpdateCustomerContact(obj, ctrl.customerId).then(function (response) {\n var editContact, needSelect;\n if (response !== null) {\n if (ctrl.zoneUpdateOnAdd === true) {\n zoneService.setCurrentZone(response.City, response.CityId, response.CountryId, response.Region, response.Country, response.Zip, response.District);\n }\n addressService.getAddresses(ctrl.customerId).then(function (response) {\n ctrl.items = response;\n ctrl.addressSelected = ctrl.findItemForSelect();\n addressService.dialogClose();\n ctrl.saveAddressFn({\n address: ctrl.addressSelected\n });\n });\n }\n });\n };\n ctrl.clearFormData = function () {\n ctrl.form.contactId = null;\n ctrl.form.fio = null;\n ctrl.form.firstName = null;\n ctrl.form.lastName = null;\n ctrl.form.patronymic = null;\n ctrl.form.countryId = null;\n ctrl.form.country = null;\n ctrl.form.region = null;\n ctrl.form.city = null;\n ctrl.form.district = null;\n ctrl.form.street = null;\n ctrl.form.zip = null;\n if (ctrl.formModal != null) {\n ctrl.formModal.$setPristine();\n }\n };\n ctrl.clearFullAddressData = function () {\n ctrl.form.house = '';\n ctrl.form.apartment = '';\n ctrl.form.structure = '';\n ctrl.form.entrance = '';\n ctrl.form.floor = '';\n };\n ctrl.initListsMaxHeight = function () {\n ctrl.addressListMaxHeight = 50 * (ctrl.fields.IsShowCity + ctrl.fields.IsShowDistrict + ctrl.fields.IsShowState + ctrl.fields.IsShowCountry + ctrl.fields.IsShowZip) || 50;\n if (!ctrl.fields.IsShowFullAddress) {\n ctrl.citiesListMaxHeight = 50 * (ctrl.fields.IsShowState + ctrl.fields.IsShowCountry + ctrl.fields.IsShowZip + 2 * ctrl.fields.IsShowAddress) || 50;\n }\n };\n ctrl.modalCallbackClose = function (modal) {\n ctrl.clearFormData();\n if (ctrl.fields.IsShowFullAddress) {\n ctrl.clearFullAddressData();\n }\n };\n ctrl.getObjectForUpdate = function () {\n var form = ctrl.form,\n account = {};\n if (form.contactId) {\n account.ContactId = form.contactId;\n }\n if (form.fio) {\n account.Fio = form.fio;\n }\n if (form.firstName) {\n account.FirstName = form.firstName;\n }\n if (form.lastName) {\n account.LastName = form.lastName;\n }\n if (form.patronymic) {\n account.Patronymic = form.patronymic;\n }\n if (form.country) {\n account.CountryId = form.country.CountryId;\n account.Country = form.country.Name;\n }\n if (form.region) {\n account.Region = form.region;\n }\n if (form.district) {\n account.District = form.district;\n }\n if (form.city) {\n account.City = form.city;\n }\n if (form.zip) {\n account.Zip = form.zip;\n }\n account.Street = form.street;\n account.House = form.house;\n account.Apartment = form.apartment;\n account.Structure = form.structure;\n account.Entrance = form.entrance;\n account.Floor = form.floor;\n account.IsShowName = ctrl.isShowName;\n account.IsMain = ctrl.addressSelected != null ? ctrl.form.contactId === ctrl.addressSelected.ContactId : false;\n return account;\n };\n ctrl.processCity = function (zone, timeout) {\n if (processContactTimer != null) {\n $timeout.cancel(processContactTimer);\n }\n return processContactTimer = $timeout(function () {\n if (zone != null) {\n ctrl.form.region = zone.Region;\n ctrl.form.district = zone.District;\n ctrl.form.countryId = zone.CountryId;\n ctrl.form.zip = zone.Zip;\n }\n ctrl.form.byCity = zone == null;\n addressService.processAddress(ctrl.form, ctrl.customerId).then(function (data) {\n if (data.result === true) {\n ctrl.form.countryId = data.obj.CountryId;\n ctrl.form.region = data.obj.Region;\n ctrl.form.district = data.obj.District;\n ctrl.form.zip = data.obj.Zip;\n ctrl.getSelectedCountry(ctrl.form.countries);\n }\n });\n }, timeout != null ? timeout : 700);\n };\n ctrl.processAddress = function (data, timeout) {\n if (!ctrl.fields.UseAddressSuggestions) {\n return;\n }\n if (processContactTimer != null) {\n $timeout.cancel(processContactTimer);\n }\n return processContactTimer = $timeout(function () {\n ctrl.form.byCity = false;\n if (data != null && data.Zip) {\n ctrl.form.zip = data.Zip;\n } else {\n addressService.processAddress(ctrl.form, ctrl.customerId).then(function (data) {\n if (data.result === true) {\n ctrl.form.zip = data.obj.Zip;\n }\n });\n }\n }, timeout != null ? timeout : 700);\n };\n ctrl.processCountry = function () {\n ctrl.form.countryId = ctrl.form.country.CountryId;\n };\n ctrl.addressStringify = function (address) {\n addressService.addressStringify(address);\n };\n ctrl.transcudeContent = function (scope, element) {\n const scopeNew = $scope.$parent.$new();\n scopeNew.address = scope.item;\n $transclude(scopeNew, function (clone, _scope) {\n element.append(clone);\n });\n };\n ctrl.findItemForSelect = function () {\n let result = null;\n if (ctrl.contactId != null && ctrl.items != null && ctrl.items.length > 0) {\n result = ctrl.items.find(x => x.ContactId == ctrl.contactId);\n }\n if (result == null) {\n result = ctrl.items.find(x => x.IsMain);\n }\n if (result == null) {\n result = ctrl.items[0];\n }\n return result;\n };\n}\n;\nexport default AddressListCtrl;","import addressListTemplate from \"/scripts/_partials/address/templates/addressList.html\";\nfunction addressListDirective() {\n return {\n restrict: 'A',\n scope: {\n type: '@',\n // change, view, viewRo\n initAddressFn: '&',\n changeAddressFn: '&',\n saveAddressFn: '&',\n deleteAddressFn: '&',\n isShowFullAddress: '\"), \"
\"), options, {\n addressList: parentScope\n });\n };\n service.dialogOpen = function () {\n modalService.open('modalAddress');\n };\n service.dialogClose = function () {\n modalService.close('modalAddress');\n };\n service.getDialogScope = function () {\n return modalService.getModal('modalAddress').then(function (dialog) {\n return dialog.modalScope;\n });\n };\n service.removeAddress = function (contactId, customerId) {\n return $http.post(customerId == null ? urlHelper.getAbsUrl('MyAccount/DeleteCustomerContact', true) : 'Customers/DeleteCustomerContact', {\n customerId,\n contactId,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.getAddresses = function (customerId) {\n return $http.get(customerId == null ? urlHelper.getAbsUrl('MyAccount/GetCustomerContacts', true) : 'Customers/GetCustomerContacts', {\n params: {\n customerId,\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.getFields = function (isShowName, customerId) {\n return fields != null ? $q.when(fields) : $http.get(customerId == null ? urlHelper.getAbsUrl('MyAccount/GetFieldsForCustomerContacts', true) : 'Customers/GetFieldsForCustomerContacts', {\n params: {\n customerId,\n isShowName\n }\n }).then(function (response) {\n return fields = response.data;\n });\n };\n service.processAddress = function (address, customerId) {\n return $http.post(customerId == null ? urlHelper.getAbsUrl('MyAccount/processAddress', true) : 'Customers/processAddress', {\n customerId,\n address\n }).then(function (response) {\n return response.data;\n });\n };\n service.addUpdateCustomerContact = function (account, customerId) {\n return $http.post(customerId == null ? urlHelper.getAbsUrl('MyAccount/AddUpdateCustomerContact', true) : 'Customers/AddUpdateCustomerContact', {\n customerId,\n account,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.addressStringify = function (address) {\n var array = [];\n if (address.Zip != null && address.Zip.length > 0 && address.Zip !== '-') {\n array.push(address.Zip);\n }\n if (address.Country != null && address.Country.length > 0) {\n array.push(address.Country);\n }\n if (address.Region != null && address.Region.length > 0 && address.Region !== '-') {\n array.push(address.Region);\n }\n if (address.City != null && address.City.length > 0) {\n array.push(address.City);\n }\n if (address.Street != null && address.Street.length > 0) {\n array.push(ctrl.getCustomerAddress(address));\n }\n return array.join(', ');\n };\n}\n;\nexport default addressService;","import './styles/bonus.scss';\nimport bonusService from './services/bonusService.js';\nimport BonusApplyCtrl from './controllers/bonusApplyController.js';\nimport BonusAuthCtrl from './controllers/bonusAuthController.js';\nimport BonusCodeCtrl from './controllers/bonusCodeController.js';\nimport BonusInfoCtrl from './controllers/bonusInfoController.js';\nimport BonusRegCtrl from './controllers/bonusRegController.js';\nimport BonusWhatToDoCtrl from './controllers/bonusWhatToDoController.js';\n// костыль так как если импортировать модуль получиться циклическая зависимость\nimport CheckoutService from \"../../checkout/services/checkoutService.js\";\nimport { bonusWhatToDoDirective, bonusAuthDirective, bonusRegDirective, bonusApplyDirective, bonusInfoDirective, bonusCodeDirective } from './directives/bonusDirectives.js';\nconst moduleName = 'bonus';\nangular.module(moduleName, []).service('bonusService', bonusService).service('checkoutService', CheckoutService).controller('BonusApplyCtrl', BonusApplyCtrl).controller('BonusAuthCtrl', BonusAuthCtrl).controller('BonusCodeCtrl', BonusCodeCtrl).controller('BonusInfoCtrl', BonusInfoCtrl).controller('BonusRegCtrl', BonusRegCtrl).controller('BonusWhatToDoCtrl', BonusWhatToDoCtrl).directive('bonusWhatToDo', bonusWhatToDoDirective).directive('bonusAuth', bonusAuthDirective).directive('bonusReg', bonusRegDirective).directive('bonusApply', bonusApplyDirective).directive('bonusInfo', bonusInfoDirective).directive('bonusCode', bonusCodeDirective);\nexport default moduleName;","BonusApplyCtrl.$inject = [\"$timeout\"];\n/* @ngInject */\nfunction BonusApplyCtrl($timeout) {\n var ctrl = this;\n var timerRange;\n ctrl.$onInit = function () {\n ctrl.isApply = ctrl.appliedBonuses > 0;\n };\n ctrl.rangeSliderMove = function (event, modelMin, modelMax) {\n ctrl.sendChangeBonus(modelMax);\n };\n ctrl.sendChangeBonus = function (appliedBonuses) {\n if (!appliedBonuses) appliedBonuses = 0;\n if (timerRange != null) {\n $timeout.cancel(timerRange);\n }\n timerRange = $timeout(function () {\n ctrl.changeBonus({\n appliedBonuses: appliedBonuses\n });\n }, 500);\n };\n ctrl.applyBonus = function () {\n if (ctrl.isApply) ctrl.appliedBonuses = ctrl.maxBonus;else ctrl.appliedBonuses = 0;\n ctrl.changeBonus({\n appliedBonuses: ctrl.appliedBonuses\n });\n };\n}\n;\nexport default BonusApplyCtrl;","BonusAuthCtrl.$inject = [\"toaster\", \"bonusService\", \"$translate\"];\n/* @ngInject */\nfunction BonusAuthCtrl(toaster, bonusService, $translate) {\n var ctrl = this;\n ctrl.isCheckout = ctrl.page === 'checkout';\n ctrl.autorize = function () {\n if (ctrl.inProgress === true) {\n return;\n }\n ctrl.inProgress = true;\n bonusService.autorize(ctrl.numberCard, ctrl.phone).then(function (response) {\n if (response.error != null && response.error.length > 0) {\n toaster.pop('error', $translate.instant('Js.Bonus.AuthCartError'), response.error);\n } else {\n bonusService.showModalCode(ctrl.check);\n }\n ctrl.inProgress = false;\n });\n };\n ctrl.check = function (code) {\n bonusService.checkCode(code, ctrl.isCheckout).then(function (bonus) {\n if (bonus.error != null && bonus.error.length > 0) {\n toaster.pop('error', $translate.instant('Js.Bonus.SmsConfirmError'), bonus.error);\n } else {\n bonusService.successModal();\n ctrl.callbackSuccess({\n bonus: bonus\n });\n }\n });\n };\n}\n;\nexport default BonusAuthCtrl;","BonusCodeCtrl.$inject = [\"bonusService\"];\n/* @ngInject */\nfunction BonusCodeCtrl(bonusService) {\n var ctrl = this,\n callback;\n ctrl.state = 'form';\n ctrl.modalInit = function (modal) {\n ctrl.modal = modal;\n };\n ctrl.showModal = function () {\n ctrl.modal.open();\n };\n ctrl.successModal = function () {\n ctrl.state = 'success';\n };\n ctrl.closeModal = function () {\n ctrl.modal.close();\n ctrl.state = 'form';\n };\n ctrl.setCallback = function (fn) {\n callback = fn;\n };\n ctrl.confirm = function (code) {\n if (callback != null) {\n callback(code);\n }\n };\n bonusService.addModalCode(ctrl);\n}\n;\nexport default BonusCodeCtrl;","BonusInfoCtrl.$inject = [\"toaster\", \"bonusService\", \"modalService\", \"$translate\"];\nimport bonusInfoTemplate from '../templates/modalEdit.html';\n\n/* @ngInject */\nfunction BonusInfoCtrl(toaster, bonusService, modalService, $translate) {\n var ctrl = this,\n isRenderModal = false;\n ctrl.bonusDataMaster = {};\n ctrl.save = function () {\n bonusService.updateCard(ctrl.bonusData).then(function (response) {\n if (response.error != null && response.error.length > 0) {\n toaster.pop('error', $translate.instant('Js.Bonus.BonusCartTitle'), response.error);\n } else {\n ctrl.modalDataSave = true;\n ctrl.dialogClose();\n toaster.pop('success', $translate.instant('Js.Bonus.BonusCartTitle'), $translate.instant('Js.Bonus.ChangesSaved'));\n }\n });\n };\n ctrl.dialogOpen = function () {\n ctrl.modalDataSave = false;\n angular.copy(ctrl.bonusData, ctrl.bonusDataMaster);\n if (isRenderModal === false) {\n modalService.renderModal('modalBonusInfo', $translate.instant('Js.Bonus.BonusCartTitle'), \"
\"), '', {\n isOpen: true,\n modalClass: 'modal-bonus-info',\n callbackClose: 'bonusInfo.dialogReset'\n }, {\n bonusInfo: ctrl\n });\n isRenderModal = true;\n } else {\n modalService.open('modalBonusInfo');\n }\n };\n ctrl.dialogClose = function () {\n modalService.close('modalBonusInfo');\n };\n ctrl.dialogReset = function () {\n if (ctrl.modalDataSave === false) {\n angular.copy(ctrl.bonusDataMaster, ctrl.bonusData);\n }\n };\n}\n;\nexport default BonusInfoCtrl;","BonusRegCtrl.$inject = [\"toaster\", \"bonusService\", \"$translate\"];\n/* @ngInject */\nfunction BonusRegCtrl(toaster, bonusService, $translate) {\n var ctrl = this;\n ctrl.cardAdded = false;\n ctrl.isCheckout = ctrl.page === 'checkout';\n bonusService.getDataAgreement().then(function (response) {\n ctrl.isShowUserAgreementText = response.IsShowUserAgreementText;\n ctrl.userAgreementText = response.UserAgreementText;\n });\n ctrl.register = function () {\n if (ctrl.inProgress === true) {\n return;\n }\n ctrl.inProgress = true;\n bonusService.register(ctrl.phone).then(function (response) {\n if (response.error != null && response.error.length > 0) {\n ctrl.error = response.error;\n } else {\n ctrl.error = null;\n bonusService.showModalCode(ctrl.check);\n }\n ctrl.inProgress = false;\n });\n };\n ctrl.validate = function () {\n var result = true;\n if (typeof ctrl.agreement != \"undefined\" && !ctrl.agreement) {\n toaster.pop('error', $translate.instant('Js.Subscribe.ErrorAgreement'));\n result = false;\n }\n return result;\n };\n ctrl.check = function (code) {\n //bonusService.newCard(code, ctrl.isCheckout, ctrl.name, ctrl.surname, ctrl.patronymic || '', ctrl.sex || 0, ctrl.birthday, ctrl.phone, ctrl.email || '', ctrl.city || '')\n bonusService.newCard(code, ctrl.isCheckout).then(function (bonus) {\n if (bonus.error != null && bonus.error.length > 0) {\n toaster.pop('error', $translate.instant('Js.Bonus.SmsConfirmError'), bonus.error);\n } else {\n bonusService.successModal();\n ctrl.cardAdded = true;\n ctrl.callbackSuccess({\n bonus: bonus\n });\n }\n });\n };\n}\n;\nexport default BonusRegCtrl;","BonusWhatToDoCtrl.$inject = [\"bonusService\", \"toaster\", \"$translate\", \"checkoutService\"];\n/* @ngInject */\nfunction BonusWhatToDoCtrl(bonusService, toaster, $translate, checkoutService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.bonusAvalable = 'not';\n ctrl.activeView = 'none';\n ctrl.isShowPatronymic = ctrl.isShowPatronymic();\n ctrl.init();\n };\n ctrl.init = function () {\n bonusService.getBonus().then(function (bonus) {\n ctrl.bonusData = bonus;\n if (ctrl.bonusData == null) {\n ctrl.activeView = ctrl.page === 'myaccount' ? 'myaccount_newcart' : 'form';\n } else if (ctrl.bonusData != null && ctrl.bonusData.bonus != null && ctrl.bonusData.bonus.Blocked === true) {\n ctrl.activeView = 'blocked';\n } else {\n if (ctrl.bonusData.bonus.BonusAmount < ctrl.appliedBonuses) {\n ctrl.appliedBonuses = ctrl.bonusData.bonus.BonusAmount;\n }\n ctrl.activeView = ctrl.page === 'checkout' ? 'apply' : 'info';\n }\n });\n };\n ctrl.signIn = function (bonusData) {\n ctrl.bonusData = bonusData;\n ctrl.activeView = ctrl.page === 'checkout' ? 'apply' : 'info';\n ctrl.autorizeBonus({\n cardNumber: bonusData.bonus.CardNumber\n });\n };\n ctrl.changeBonusInterface = function (appliedBonuses) {\n ctrl.changeBonus({\n appliedBonuses: appliedBonuses\n });\n };\n ctrl.createBonusCard = function () {\n bonusService.createBonusCard().then(function (data) {\n if (data.result === true) {\n toaster.pop('success', '', $translate.instant('Js.Bonus.BonusCartCreated'));\n } else {\n toaster.pop('error', '', data.error);\n }\n ctrl.init();\n });\n };\n}\n;\nexport default BonusWhatToDoCtrl;","import codeTemplate from \"/scripts/_partials/bonus/templates/code.html\";\nimport infoTemplate from \"/scripts/_partials/bonus/templates/info.html\";\nimport applyTemplate from \"/scripts/_partials/bonus/templates/apply.html\";\nimport regTemplate from \"/scripts/_partials/bonus/templates/reg.html\";\nimport authTemplate from \"/scripts/_partials/bonus/templates/auth.html\";\nimport whatToDoTemplate from \"/scripts/_partials/bonus/templates/whatToDo.html\";\nfunction bonusWhatToDoDirective() {\n return {\n restrict: 'A',\n scope: {\n page: '@',\n autorizeBonus: '&',\n changeBonus: '&',\n email: '=',\n city: '=',\n outsideName: '=?',\n outsideSurname: '=?',\n outsidePhone: '=?',\n outsidePatronymic: '=?',\n isShowPatronymic: '&',\n appliedBonuses: '=',\n bonusPlus: '@',\n allowSpecifyBonusAmount: '='\n },\n controller: 'BonusWhatToDoCtrl',\n controllerAs: 'bonusWhatToDo',\n bindToController: true,\n replace: true,\n templateUrl: whatToDoTemplate\n };\n}\nfunction bonusAuthDirective() {\n return {\n restrict: 'A',\n scope: {\n page: '=',\n callbackSuccess: '&',\n outsidePhone: '=?',\n enablePhoneMask: '');\n document.body.appendChild(bonusCodeEl[0]);\n $compile(bonusCodeEl)($rootScope.$new());\n service.addModalCode = function (bonusCode) {\n _bonusCode = bonusCode;\n };\n service.showModalCode = function (fn) {\n _bonusCode.setCallback(fn);\n _bonusCode.showModal();\n };\n service.successModal = function () {\n _bonusCode.successModal();\n };\n service.getBonus = function () {\n return $http.get('bonuses/bonusjson', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.createBonusCard = function () {\n return $http.post('bonuses/createbonuscard', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.autorize = function (cardnumber, phone) {\n phone = phone || '';\n return $http.post('bonuses/confirmcard', {\n cardnumber: cardnumber,\n phone: phone.replace(/\\D+/g, ''),\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.register = function (phone) {\n return $http.post('bonuses/confirmnewcard', {\n phone: phone.replace(/\\D+/g, ''),\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.checkCode = function (code, isCheckout) {\n return $http.post('bonuses/confirmcode', {\n code: code,\n isCheckout: isCheckout,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n\n //service.newCard = function (code, isCheckout, firstName, lastName, secondName, gender, birthDay, phone, email, city) {\n service.newCard = function (code, isCheckout) {\n return $http.post('bonuses/confirmcodefornewcard', {\n code: code,\n isCheckout: isCheckout,\n //firstName: firstName,\n //lastName: lastName,\n //secondName: secondName,\n ///gender: gender,\n //birthDay: birthDay,\n //phone: phone.replace(/\\D+/g, ''),\n //email: email,\n //city: city,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.getDataAgreement = function () {\n return $http.post('Checkout/CheckoutBuyInOneClickFields', {\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n\n //service.updateCard = function (bonus) {\n // return $http.post('bonuses/updatecard', bonus)\n // .then(function (response) {\n // return response.data;\n // });\n //};\n}\n;\nexport default bonusService;","import './styles/buyOneClick.scss';\nimport BuyOneClickTriggerCtrl from './controllers/buyOneClickTriggerController.js';\nimport BuyOneClickFormCtrl from './controllers/buyOneClickFormController.js';\nimport { buyOneClickFormDirective, buyOneClickTriggerDirective } from './directives/buyOneClickDirectives.js';\nimport buyOneClickService from './services/buyOneClickService.js';\nconst moduleName = 'buyOneClick';\nangular.module(moduleName, []).service('buyOneClickService', buyOneClickService).directive('buyOneClickForm', buyOneClickFormDirective).directive('buyOneClickTrigger', buyOneClickTriggerDirective).controller('BuyOneClickTriggerCtrl', BuyOneClickTriggerCtrl).controller('BuyOneClickFormCtrl', BuyOneClickFormCtrl);\nexport default moduleName;","BuyOneClickFormCtrl.$inject = [\"$sce\", \"$timeout\", \"$window\", \"buyOneClickService\", \"toaster\", \"$scope\", \"$http\"];\n/* @ngInject */\nfunction BuyOneClickFormCtrl($sce, $timeout, $window, buyOneClickService, toaster, $scope, $http) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.success = false;\n ctrl.process = false;\n ctrl.showRedirectButton = false;\n //ctrl.compactMode = ctrl.compactMode === 'True' ? true : false;\n\n buyOneClickService.getFieldsOptions().then(function (fields) {\n ctrl.fields = angular.extend(fields, ctrl.fieldsOptions);\n ctrl.fields.BuyInOneClickFirstText = $sce.trustAsHtml(ctrl.fields.BuyInOneClickFirstText);\n ctrl.fields.BuyInOneClickFinalText = $sce.trustAsHtml(ctrl.fields.BuyInOneClickFinalText);\n ctrl.fields.UserAgreementForPromotionalNewsletter = $sce.trustAsHtml(ctrl.fields.UserAgreementForPromotionalNewsletter);\n ctrl.fullNameListMaxHeight = 50 + (50 * (ctrl.fields.IsShowBuyInOneClickEmail + ctrl.fields.IsShowBuyInOneClickPhone + ctrl.fields.IsShowBuyInOneClickComment * 2 + ctrl.fields.IsShowUserAgreementText) || 50);\n if (ctrl.fields.EnableCaptchaInBuyInOneClick) {\n ctrl.initCaptcha(\"buyOneClickForm.captchaCode\").then(function (data) {\n ctrl.captchaHtml = data;\n });\n }\n });\n buyOneClickService.getCustomerInfo().then(function (data) {\n ctrl.name = data.name;\n ctrl.email = data.email;\n ctrl.phone = data.phone;\n });\n if (ctrl.formInit != null) {\n ctrl.formInit({\n form: ctrl\n });\n }\n };\n ctrl.reset = function () {\n ctrl.name = '';\n ctrl.email = '';\n ctrl.phone = '';\n ctrl.comment = '';\n ctrl.success = false;\n ctrl.showRedirectButton = false;\n ctrl.result = null;\n ctrl.form.$setPristine();\n };\n ctrl.send = function () {\n var isValid = ctrl.buyOneClickValid();\n if (isValid === true || isValid == null) {\n ctrl.process = true;\n var captchaExist = typeof CaptchaSourceBuyInOneClick != \"undefined\" && CaptchaSourceBuyInOneClick != null;\n var captchaInstanceId = captchaExist ? CaptchaSourceBuyInOneClick.InstanceId : null;\n buyOneClickService.checkout(ctrl.page, ctrl.orderType, ctrl.offerId, ctrl.productId, ctrl.amount, ctrl.attributesXml, ctrl.name, ctrl.email, ctrl.phone, ctrl.comment, ctrl.captchaCode, captchaInstanceId, ctrl.isAgreeForPromotionalNewsletter).then(function (result) {\n if (result.error != null && result.error.length > 0) {\n toaster.pop('error', null, result.error);\n if (captchaExist) {\n CaptchaSourceBuyInOneClick.ReloadImage();\n }\n } else {\n ctrl.result = result;\n ctrl.success = true;\n ctrl.successFn({\n result: result\n });\n if (ctrl.autoReset != null) {\n $timeout(ctrl.reset, ctrl.autoReset);\n }\n }\n ctrl.process = false;\n });\n }\n };\n ctrl.initCaptcha = function (ngModel) {\n return $http.post('/commonExt/getCaptchaHtml', {\n ngModel: ngModel,\n captchaId: 'CaptchaSourceBuyInOneClick'\n }).then(function (response) {\n return $sce.trustAsHtml(response.data);\n });\n };\n}\n;\nexport default BuyOneClickFormCtrl;","BuyOneClickTriggerCtrl.$inject = [\"$window\", \"toaster\", \"buyOneClickService\"];\n/* @ngInject */\nfunction BuyOneClickTriggerCtrl($window, toaster, buyOneClickService) {\n var ctrl = this;\n ctrl.formInit = function (form) {\n ctrl.form = form;\n };\n ctrl.modalCallbackClose = function (modalScope) {\n if (ctrl.form.result != null && ctrl.form.showRedirectButton === true) {\n window.location = ctrl.form.result.url;\n }\n if (ctrl.form.success === true) {\n ctrl.form.reset();\n }\n };\n ctrl.successFn = function (result) {\n if (result.url != null && result.doGo === true) {\n ctrl.form.success = false;\n window.location = result.url;\n } else {\n if (result.url != null) {\n ctrl.form.showRedirectButton = true;\n } else {\n buyOneClickService.modalFooterShow(ctrl.modalId, false);\n }\n }\n };\n}\n;\nexport default BuyOneClickTriggerCtrl;","buyOneClickTriggerDirective.$inject = [\"buyOneClickService\"];\nimport formTemplate from \"/scripts/_partials/buy-one-click/templates/form.html\";\n/* @ngInject */\nfunction buyOneClickTriggerDirective(buyOneClickService) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'BuyOneClickTriggerCtrl',\n controllerAs: 'buyOneClickTrigger',\n bindToController: true,\n link: function (scope, element, attrs, ctrl) {\n element.on('click', function (event) {\n event.preventDefault();\n var modalId = element[0].getAttribute('data-buy-one-click-modal');\n ctrl.modalId = modalId != null ? modalId : 'modalBuyOneClick';\n scope.$apply(function () {\n buyOneClickService.showDialog(ctrl.modalId);\n });\n });\n }\n };\n}\nfunction buyOneClickFormDirective() {\n return {\n restrict: 'A',\n scope: {\n buttonText: '@',\n page: '@',\n orderType: '@',\n offerId: '=?',\n productId: '=?',\n amount: '=?',\n attributesXml: '=?',\n formInit: '&',\n successFn: '&',\n fieldsOptions: '=?',\n autoReset: '=?',\n buyOneClickValid: '&',\n compactMode: '@',\n agreementDefaultChecked: ' 0) {\n cardsService.apply(code).then(function (data) {\n if (data.result === true && data.msg == null) {\n ctrl.applyFn();\n } else {\n ctrl.applyFn();\n toaster.pop('error', $translate.instant('Js.Cards.CantApplyCoupon'), data.msg);\n }\n });\n }\n };\n}\n;\nexport default CardsFormCtrl;","CardsRemoveCtrl.$inject = [\"cardsService\", \"$translate\"];\n/* @ngInject */\nfunction CardsRemoveCtrl(cardsService, $translate) {\n var ctrl = this;\n ctrl.remove = function (type) {\n var request;\n switch (type) {\n case 'coupon':\n request = cardsService.deleteCoupon();\n break;\n case 'certificate':\n request = cardsService.deleteCertificate();\n break;\n default:\n throw Error($translate.instant('Js.Cards.NotFoundTypeToRemove'));\n }\n request.then(function () {\n ctrl.applyFn();\n });\n };\n}\n;\nexport default CardsRemoveCtrl;","import cardsFormTemplate from \"/scripts/_partials/cards/templates/cardsForm.html\";\nfunction cardsFormDirective() {\n return {\n restrict: 'A',\n scope: {\n applyFn: '&',\n btnClasses: ''\n };\n}\nexport { cardsFormDirective, cardsRemoveDirective };","cardsService.$inject = [\"$http\"];\n/* @ngInject */\nfunction cardsService($http) {\n var service = this;\n service.apply = function (code) {\n return $http.post('coupon/couponpost', {\n code: code,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.deleteCoupon = function () {\n return $http.post('coupon/deletecoupon', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.deleteCertificate = function () {\n return $http.post('coupon/deletecertificate', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n}\n;\nexport default cardsService;","import helpTriggerModule from '../../../Areas/Admin/Content/src/_partials/help-trigger/helpTrigger.module.js';\nimport '../../../Areas/Admin/Content/src/_shared/is-mobile/is-mobile.js';\nimport '../../../Areas/Admin/Templates/Mobile/Content/vendors/ui-bootstrap/angular-popover-decorator/angular-popover-decorator.js';\n(function (ng) {\n 'use strict';\n\n angular.module('cart', ['isMobile', helpTriggerModule]).constant('cartConfig', {\n callbackNames: {\n get: 'get',\n update: 'update',\n remove: 'remove',\n add: 'add',\n clear: 'clear',\n open: 'open'\n },\n cartMini: {\n delayHide: 3000\n }\n });\n})(window.angular);","import './styles/cart.scss';\nimport './cart.js';\nimport './services/cartService.js';\nimport './directives/cartDirectives.js';\nimport './controllers/cartAddController.js';\nimport './controllers/cartConfirmController.js';\nimport './controllers/cartCountController.js';\nimport './controllers/cartFullController.js';\nimport './controllers/cartMiniController.js';\nimport './controllers/cartMiniListController.js';\nimport './controllers/cartMobileFullController.js';\nimport './controllers/cartPreorderController.js';\nexport default 'cart';","import { PubSub } from \"../../../_common/PubSub/PubSub.js\";\n;\n(function (ng) {\n 'use strict';\n\n var cartToolbar, timerPopoverHide;\n var CartAddCtrl = function ($document, $q, $timeout, $window, cartConfig, cartService, moduleService, popoverService, SweetAlert, $translate, domService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n if (ctrl.source != null && ctrl.source === 'mobile') {\n cartService.setStateInfo(true);\n }\n };\n ctrl.addItem = function (event, offerId, productId, amount, attributesXml, payment, href, mode, lpId, lpUpId, lpEntityId, lpEntityType, lpBlockId, hideShipping, offerIds, modeFrom, lpButtonName) {\n event.preventDefault();\n var isValid = ctrl.cartAddValid(),\n deferNoop = $q.defer();\n if (isValid === true || isValid == null) {\n if (ctrl.isLoading == true) {\n deferNoop.resolve(null);\n return deferNoop.promise;\n }\n ctrl.isLoading = true;\n return cartService.addItem(offerId, productId, amount, attributesXml, payment, mode, lpId, lpEntityId, lpEntityType, lpBlockId, {\n lpUpId: lpUpId,\n hideShipping: hideShipping,\n offerIds: offerIds,\n modeFrom: modeFrom,\n lpButtonName: lpButtonName\n }).then(function (result) {\n if (result[0].status == 'redirect') {\n if (result[0].url != null && result[0].url.length > 0) {\n $window.location.assign(result[0].url);\n } else {\n $window.location.assign(href);\n }\n } else {\n PubSub.publish(\"add_to_cart\", href);\n PubSub.publish(\"cart.add\", offerId, productId, amount, attributesXml, result['0'].cartId, event.target);\n PubSub.publish(\"cart.addv2\", productId, result['0'].cartId, result['0'].CartItem, event.target);\n moduleService.update(['minicartmessage', 'fullcartmessage']).then(ctrl.popoverModule);\n }\n return result;\n }).then(function (result) {\n if (ctrl.source != null && ctrl.source === 'mobile' && result[0].status !== 'redirect') {\n cartService.showInfoWithDebounce();\n }\n return result;\n }).finally(function () {\n ctrl.isLoading = false;\n });\n } else {\n deferNoop.resolve(null);\n return deferNoop.promise;\n }\n };\n ctrl.popoverModule = function (content) {\n if (moduleService.getModule('minicartmessage') != null && content[0].trim().length > 0) {\n $timeout(function () {\n popoverService.getPopoverScope('popoverCartToolbar').then(function (popoverScope) {\n cartToolbar = cartToolbar || document.getElementById('cartToolbar');\n popoverScope.active(cartToolbar);\n popoverScope.updatePosition(cartToolbar);\n if (timerPopoverHide != null) {\n $timeout.cancel(timerPopoverHide);\n }\n timerPopoverHide = $timeout(function () {\n popoverScope.deactive();\n }, 5000);\n });\n }, 0);\n }\n };\n };\n angular.module('cart').controller('CartAddCtrl', CartAddCtrl);\n CartAddCtrl.$inject = ['$document', '$q', '$timeout', '$window', 'cartConfig', 'cartService', 'moduleService', 'popoverService', 'SweetAlert', '$translate', 'domService'];\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n var CartConfirmCtrl = function (cartService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.cartData = {};\n cartService.getData().then(function (data) {\n ctrl.cartData = data;\n });\n };\n };\n angular.module('cart').controller('CartConfirmCtrl', CartConfirmCtrl);\n CartConfirmCtrl.$inject = ['cartService'];\n})(angular);",";\n(function (ng) {\n 'use strict';\n\n var CartCountCtrl = function ($filter, cartService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n cartService.getData().then(function (data) {\n ctrl.cartData = data;\n });\n };\n ctrl.getValue = function () {\n var result;\n if (ctrl.cartData == null) {\n result = ctrl.startValue;\n } else {\n switch (ctrl.type) {\n case 'count':\n result = ctrl.cartData.Count;\n break;\n default:\n result = $filter('number')(ctrl.cartData.TotalItems);\n }\n }\n return result;\n };\n };\n angular.module('cart').controller('CartCountCtrl', CartCountCtrl);\n CartCountCtrl.$inject = ['$filter', 'cartService'];\n})(angular);","import { PubSub } from \"../../../_common/PubSub/PubSub.js\";\n;\n(function (ng) {\n 'use strict';\n\n var CartFullCtrl = function ($rootScope, cartService, moduleService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n cartService.getData().then(function (data) {\n ctrl.cartData = data;\n });\n ctrl.cssClassForPopoverHelpTrigger = 'cart-help-trigger-popover';\n };\n ctrl.updateAmount = function (value, itemId) {\n var item = {\n Key: itemId,\n Value: value\n };\n cartService.updateAmount([item]).then(function () {\n moduleService.update('fullcartmessage');\n });\n };\n ctrl.remove = function (shoppingCartItemId) {\n cartService.removeItem(shoppingCartItemId).then(function (result) {\n moduleService.update('fullcartmessage');\n PubSub.publish(\"cart.remove\", result.offerId);\n });\n };\n ctrl.clear = function () {\n cartService.clear().then(function () {\n moduleService.update('fullcartmessage');\n PubSub.publish(\"cart.clear\");\n });\n };\n ctrl.refresh = function () {\n return cartService.getData(false).then(function (data) {\n moduleService.update('fullcartmessage');\n ctrl.cartData = data;\n });\n };\n };\n angular.module('cart').controller('CartFullCtrl', CartFullCtrl);\n CartFullCtrl.$inject = ['$rootScope', 'cartService', 'moduleService'];\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n var CartMiniCtrl = function (cartService, cartConfig) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.cartData = {};\n cartService.getData().then(function (data) {\n ctrl.cartData = data;\n });\n };\n ctrl.addMinicartList = function (miniCartList) {\n ctrl.list = miniCartList;\n };\n ctrl.triggerClick = function (event) {\n if (event != null) {\n event.preventDefault();\n }\n if (ctrl.cartData.TotalItems > 0 && ctrl.list != null) {\n ctrl.list.cartToggle(true);\n }\n cartService.processCallback(cartConfig.callbackNames.open);\n };\n };\n angular.module('cart').controller('CartMiniCtrl', CartMiniCtrl);\n CartMiniCtrl.$inject = ['cartService', 'cartConfig'];\n})(angular);","import { PubSub } from \"../../../_common/PubSub/PubSub.js\";\n;\n(function (ng) {\n 'use strict';\n\n var CartMiniListCtrl = function ($element, $timeout, $window, $scope, cartService, cartConfig, domService, moduleService) {\n var ctrl = this,\n timer;\n ctrl.$onInit = function () {\n ctrl.isPopup = ctrl.isPopup != null ? ctrl.isPopup() : true;\n ctrl.showEmptyCart = ctrl.showEmptyCart != null ? ctrl.showEmptyCart() : true;\n ctrl.isVisibleCart = ctrl.isPopup !== true || ctrl.isMobile;\n ctrl.isCartMiniFixed = false;\n cartService.addCallback(cartConfig.callbackNames.add, ctrl.cartOpen, 'cartMiniList');\n $element.on('$destroy', () => {\n cartService.removeCallback(cartConfig.callbackNames.add, 'cartMiniList');\n });\n };\n ctrl.cartOpen = function (startTime) {\n if (startTime == null) {\n startTime = true;\n }\n ctrl.isVisibleCart = true;\n ctrl.saveStartPosition();\n if (startTime === true) {\n ctrl.startTimerClose();\n }\n };\n ctrl.saveStartPosition = function () {\n $timeout(function () {\n var offset = $element[0].children[0].getBoundingClientRect();\n ctrl.staticPosition = {\n top: offset.top,\n left: offset.left,\n width: offset.width\n };\n\n //if (ctrl.staticPosition.top < 0) {\n ctrl.staticPosition.top += $window.pageYOffset;\n //}\n\n ctrl.checkFixed();\n }, 100);\n };\n ctrl.cartClose = function () {\n ctrl.isCartMiniFixed = false;\n ctrl.isVisibleCart = false;\n ctrl.clearTimerClose();\n };\n ctrl.cartToggle = function (startTime) {\n ctrl.isVisibleCart === true ? ctrl.cartClose() : ctrl.cartOpen(startTime);\n };\n ctrl.cartMouseEnter = function () {\n ctrl.clearTimerClose();\n };\n ctrl.cartMouseLeave = function (event) {\n ctrl.startTimerClose();\n };\n ctrl.checkVisibleCart = function () {\n return ctrl.isVisibleCart === true && (ctrl.showEmptyCart === false ? ctrl.cartData.TotalItems > 0 : true);\n };\n ctrl.windowScroll = function (event) {\n if (ctrl.checkVisibleCart() === true) {\n $scope.$apply(ctrl.checkFixed);\n }\n };\n ctrl.startTimerClose = function () {\n timer = $timeout(function () {\n ctrl.cartClose();\n }, cartConfig.cartMini.delayHide);\n };\n ctrl.clearTimerClose = function () {\n if (timer != null) {\n $timeout.cancel(timer);\n }\n };\n ctrl.checkFixed = function () {\n ctrl.isCartMiniFixed = $window.pageYOffset > ctrl.staticPosition.top;\n };\n ctrl.clickOut = function (event) {\n var parentCart = domService.closest(event.target, '[data-cart-mini]');\n if (parentCart == null && ctrl.checkVisibleCart() === true) {\n $scope.$apply(function () {\n ctrl.cartClose();\n });\n }\n };\n ctrl.updateAmount = function (value, itemId) {\n var item = {\n Key: itemId,\n Value: value\n };\n cartService.updateAmount([item]).then(function () {\n moduleService.update('minicartmessage');\n });\n };\n ctrl.remove = function (shoppingCartItemId) {\n cartService.removeItem(shoppingCartItemId).then(function (result) {\n moduleService.update('minicartmessage');\n PubSub.publish(\"cart.remove\", result.offerId);\n });\n };\n };\n angular.module('cart').controller('CartMiniListCtrl', CartMiniListCtrl);\n CartMiniListCtrl.$inject = ['$element', '$timeout', '$window', '$scope', 'cartService', 'cartConfig', 'domService', 'moduleService'];\n})(angular);",";\n(function (ng) {\n 'use strict';\n\n var CartMobileFullCtrl = function ($rootScope, cartService, moduleService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n cartService.getData().then(function (data) {\n ctrl.cartData = data;\n });\n };\n ctrl.updateAmount = function (value, itemId) {\n var item = {\n Key: itemId,\n Value: value\n };\n cartService.updateAmount([item]).then(function () {\n moduleService.update('fullcartmessage');\n });\n };\n ctrl.remove = function (shoppingCartItemId) {\n cartService.removeItem(shoppingCartItemId).then(function () {\n moduleService.update('fullcartmessage');\n });\n };\n ctrl.clear = function () {\n cartService.clear().then(function () {\n moduleService.update('fullcartmessage');\n });\n };\n ctrl.getOptions = function (min, step, amount, max) {\n var tempArr = [];\n var start = Math.ceil(min / step) * step;\n if (amount > max) {\n //if you need limit options number by availability\n for (var i = start; i <= amount; i = +(i + step).toFixed(4)) {\n tempArr.push(i);\n }\n } else {\n for (var i = start; i <= max; i = +(i + step).toFixed(4)) {\n tempArr.push(i);\n }\n }\n return tempArr;\n };\n ctrl.refresh = function () {\n return cartService.getData(false).then(function (data) {\n ctrl.cartData = data;\n });\n };\n };\n angular.module('cart').controller('CartMobileFullCtrl', CartMobileFullCtrl);\n CartMobileFullCtrl.$inject = ['$rootScope', 'cartService', 'moduleService'];\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n var CartPreorderCtrl = function ($window) {\n var ctrl = this;\n ctrl.getPreOrderUrl = function () {\n var params = [];\n if (ctrl.amount != null && ctrl.amount != '') {\n params.push(\"amount=\" + ctrl.amount);\n }\n if (ctrl.attributesHash != null && ctrl.attributesHash != '') {\n params.push(\"optionsHash=\" + ctrl.attributesHash);\n }\n return \"preorder\" + (ctrl.lp || '') + '/' + ctrl.offerId + (params.length ? \"?\" + params.join('&') : '');\n };\n };\n CartPreorderCtrl.$inject = ['$window'];\n angular.module('cart').controller('CartPreorderCtrl', CartPreorderCtrl);\n})(window.angular);","import cartMobileFullTemplate from \"../templates/cart-mobile-full.html\";\nimport cartFullTemplate from \"../templates/cart-full.html\";\nimport cartMiniTemplate from \"../templates/cart-mini.html\";\n(function (ng) {\n 'use strict';\n\n angular.module('cart').directive('cartMini', ['cartService', function (cartService) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'CartMiniCtrl',\n controllerAs: 'cartMini',\n bindToController: true\n };\n }]);\n angular.module('cart').directive('cartMiniTrigger', function () {\n return {\n require: '^cartMini',\n restrict: 'A',\n scope: {},\n link: function (scope, element, attrs, ctrl) {\n element.on('click', function (event) {\n ctrl.triggerClick(event);\n scope.$apply();\n });\n }\n };\n });\n angular.module('cart').directive('cartMiniList', ['$window', function ($window) {\n return {\n require: ['cartMiniList', '^cartMini'],\n restrict: 'EA',\n scope: {\n cartData: '=',\n isMobile: '',\n controller: 'CartPreorderCtrl',\n controllerAs: 'cartPreorder',\n bindToController: true\n };\n });\n angular.module('cart').directive('cartCount', ['$sce', function ($sce) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'CartCountCtrl',\n controllerAs: 'cartCount',\n bindToController: true,\n link: function (scope, element, attrs, ctrl, transclude) {\n ctrl.type = attrs.type;\n var startValue = element.html();\n ctrl.startValue = $sce.trustAsHtml(startValue);\n }\n };\n }]);\n angular.module('cart').directive('cartConfirm', function () {\n return {\n restrict: 'A',\n scope: true,\n controller: 'CartConfirmCtrl',\n controllerAs: 'cartConfirm',\n bindToController: true\n };\n });\n})(angular);",";\n(function (ng) {\n 'use strict';\n\n var cartService = function ($document, $q, $http, $translate, $window, cartConfig, domService, SweetAlert) {\n var service = this,\n isRequestProcess = false,\n isInitilaze = false,\n deferes = [],\n cart = {},\n callbacks = {},\n needInfoShow = false;\n service.getData = function (cache, queryParams) {\n var defer = $q.defer();\n if (cache == null) {\n cache = true;\n }\n if (isInitilaze === true && cache === true) {\n defer.resolve(cart);\n } else {\n if (isRequestProcess === true) {\n deferes.push(defer);\n } else {\n isRequestProcess = true;\n deferes.push(defer);\n $http.post('/cart/getCart', angular.extend({\n rnd: Math.random()\n }, queryParams || {})).then(function (response) {\n angular.extend(cart, response.data);\n isInitilaze = true;\n isRequestProcess = false;\n for (var i = deferes.length - 1; i >= 0; i--) {\n deferes[i].resolve(cart);\n }\n deferes.length = 0;\n });\n }\n }\n return defer.promise.then(function (result) {\n service.processCallback('get', result);\n return result;\n });\n };\n service.updateAmount = function (items, queryParams) {\n return $http.post('/cart/updateCart', angular.extend({\n items: items,\n rnd: Math.random()\n }, queryParams || {})).then(function (response) {\n service.processCallback('update', response.data);\n return service.getData(false, queryParams);\n });\n };\n service.removeItem = function (shoppingCartItemId, queryParams) {\n return $http.post('/cart/removeFromCart', angular.extend({\n itemId: shoppingCartItemId\n }, queryParams || {})).then(function (response) {\n service.processCallback('remove', response.data);\n service.getData(false, queryParams);\n return response.data;\n });\n };\n service.addItem = function (offerId, productId, amount, attributesXml, payment, mode, lpId, lpEntityId, lpEntityType, lpBlockId, queryParams) {\n var params = angular.extend({\n offerId: offerId,\n productId: productId,\n amount: amount,\n attributesXml: attributesXml,\n payment: payment,\n mode: mode,\n lpId: lpId,\n lpEntityId: lpEntityId,\n lpEntityType: lpEntityType,\n lpBlockId: lpBlockId\n }, queryParams || {});\n if (params.offerId == null && params.offerIds == null) return;\n return $http.post('/cart/addToCart', params).then(function (response) {\n var result = response.data,\n defer,\n promise;\n if (response.data.status !== 'redirect') {\n return service.getData(false, params).then(function (data) {\n service.processCallback('add', [result]);\n return [result, data];\n });\n } else {\n defer = $q.defer();\n promise = defer.promise;\n defer.resolve([result]);\n return promise;\n }\n });\n };\n service.addItems = function (items, queryParams) {\n if (items == null || items.length == 0) return;\n return $http.post('/cart/addCartItems', angular.extend({\n items: items\n }, queryParams || {})).then(function (response) {\n var result = response.data;\n result.addedCount = items.length;\n if (result.status === 'success') {\n return service.getData(false, queryParams).then(function () {\n service.processCallback('add', result);\n return [result];\n });\n }\n });\n };\n service.clear = function (queryParams) {\n return $http.post('/Cart/ClearCart', queryParams || {}).then(function () {\n service.processCallback('clear');\n return service.getData(false, queryParams);\n });\n };\n service.addCallback = function (name, func, targetName) {\n callbacks[name] = callbacks[name] || [];\n if (func == null) {\n throw Error('Callback for cart equal null');\n }\n ;\n callbacks[name].push({\n callback: func,\n targetName: targetName || null\n });\n };\n service.processCallback = function (name, params, targetName) {\n if (callbacks[name] == null) {\n return;\n }\n ;\n for (var i = callbacks[name].length - 1; i >= 0; i--) {\n if (targetName != null && callbacks[name][i].targetName === targetName) {\n callbacks[name][i].callback(cart, params);\n } else {\n callbacks[name][i].callback(cart, params);\n }\n }\n ;\n };\n service.removeCallback = function (name, targetName) {\n var arrayCallbacksByName = callbacks[name],\n index;\n if (arrayCallbacksByName == null) {\n return;\n }\n if (targetName != null) {\n for (var i = 0; i < arrayCallbacksByName.length; i++) {\n if (arrayCallbacksByName[i].targetName === targetName) {\n arrayCallbacksByName.splice(i, 1);\n i--;\n }\n }\n } else {\n index = callbacks.indexOf(callbacks[name]);\n if (index !== -1) {\n callbacks.splice(index, 1);\n }\n }\n };\n service.setStateInfo = function (needShow) {\n needInfoShow = needShow;\n };\n let timerShowSuccess;\n service.showInfoWithDebounce = function (data) {\n if (needInfoShow === true) {\n if (timerShowSuccess != null) {\n clearTimeout(timerShowSuccess);\n }\n timerShowSuccess = setTimeout(function () {\n service.showInfo(data);\n }, 700);\n }\n };\n service.showInfo = function () {\n $document[0].addEventListener('click', clickout);\n var html = 'В корзине ' + cart.Count + ' на сумму ' + cart.TotalPrice + '
' + '
' + $translate.instant('Js.Cart.Cart') + '
' + (cart.ShowConfirmButtons ? '
' + $translate.instant('Js.Cart.Checkout') + '
' : '') + '
';\n SweetAlert.info(null, {\n title: null,\n html: html,\n position: 'top',\n grow: 'row',\n icon: null,\n padding: '8px 0',\n customClass: {\n container: 'mobile-cart-popover-container',\n popup: 'mobile-cart-popover cs-br-1'\n },\n buttonsStyling: false,\n showCloseButton: false,\n showCancelButton: false,\n showConfirmButton: false,\n timer: 5000,\n toast: true\n }).then(function (result) {\n $document[0].removeEventListener('click', clickout);\n if (result.value === true) {\n $window.location.assign('./cart');\n }\n }).catch(function (error) {\n throw new Error(error);\n });\n };\n function clickout(e) {\n if (domService.closest(e.target, '.swal2-popup') == null) {\n Sweetalert2.close();\n }\n }\n };\n angular.module('cart').service('cartService', cartService);\n cartService.$inject = ['$document', '$q', '$http', '$translate', '$window', 'cartConfig', 'domService', 'SweetAlert'];\n})(angular);","import './styles/loginOpenId.scss';\nexport default 'loginOpenId';","PaymentListCtrl.$inject = [\"$anchorScroll\", \"$location\"];\n/* @ngInject */\nfunction PaymentListCtrl($anchorScroll, $location) {\n var ctrl = this;\n ctrl.isProgress = null;\n $anchorScroll.yOffset = 50;\n\n //ctrl.selectedItemIndex = 0;\n //ctrl.collapsed = true;\n ctrl.visibleItems = Number.POSITIVE_INFINITY;\n ctrl.changePayment = function (payment, index) {\n if (index != null) {\n ctrl.selectedItemIndex = index;\n }\n ctrl.change({\n payment: payment\n });\n };\n ctrl.changePaymentControl = function (payment) {\n for (var i = ctrl.items.length - 1; i >= 0; i--) {\n if (ctrl.items[i] == payment) {\n ctrl.selectedItemIndex = i;\n break;\n }\n }\n ctrl.change({\n payment: payment\n });\n };\n ctrl.calc = function (index) {\n var selectItemPos = index + 1;\n ctrl.selectedItemIndex = index;\n ctrl.visibleItems = selectItemPos > ctrl.countVisibleItems ? selectItemPos : ctrl.countVisibleItems;\n return selectItemPos;\n };\n ctrl.toggleVisible = function () {\n var selectItemPos = ctrl.calc(ctrl.selectedItemIndex);\n if (ctrl.collapsed === true) {\n ctrl.visibleItems = ctrl.items.length;\n ctrl.collapsed = false;\n } else {\n if (selectItemPos === ctrl.items.length) {\n return;\n }\n ctrl.visibleItems = selectItemPos > ctrl.countVisibleItems ? selectItemPos : ctrl.countVisibleItems;\n ctrl.collapsed = true;\n $location.hash(ctrl.anchor);\n $anchorScroll();\n }\n };\n ctrl.setSelectedIndex = function (index) {\n var selectItemPos = ctrl.calc(index);\n if (selectItemPos === ctrl.items.length) {\n ctrl.collapsed = false;\n } else {\n ctrl.collapsed = true;\n }\n };\n}\n;\nexport default PaymentListCtrl;","PaymentTemplateCtrl.$inject = [\"$timeout\"];\n/* @ngInject */\nfunction PaymentTemplateCtrl($timeout) {\n var ctrl = this,\n timer;\n ctrl.changePrepare = function (event, field) {\n if (field == null) {\n return;\n }\n if (event != null && event.type == 'keyup') {\n if (timer != null) {\n $timeout.cancel(timer);\n }\n timer = $timeout(function () {\n ctrl.changeControl({\n payment: ctrl.payment\n });\n }, 500);\n } else {\n ctrl.changeControl({\n payment: ctrl.payment\n });\n }\n };\n ctrl.changeSpinbox = function (value, proxy) {\n ctrl.changeControl({\n payment: ctrl.payment\n });\n };\n}\n;\nexport default PaymentTemplateCtrl;","paymentListDirective.$inject = [\"urlHelper\"];\nimport paymentListTemplate from '/scripts/_partials/payment/templates/paymentList.html';\n\n/* @ngInject */\nfunction paymentListDirective(urlHelper) {\n return {\n restrict: 'A',\n scope: {\n items: '=',\n selectPayment: '=',\n countVisibleItems: '=',\n change: '&',\n anchor: '@',\n isProgress: '=?',\n iconWidth: '@',\n iconHeight: '@',\n enablePhoneMask: ''\n };\n}\n;\nexport { paymentListDirective, paymentTemplateDirective };","import './styles/payment.scss';\nimport PaymentListCtrl from './controllers/paymentListController.js';\nimport PaymentTemplateCtrl from './controllers/paymentTemplateController.js';\nimport { paymentListDirective, paymentTemplateDirective } from './directives/paymentDirectives.js';\nconst moduleName = 'payment';\nangular.module(moduleName, []).controller('PaymentListCtrl', PaymentListCtrl).controller('PaymentTemplateCtrl', PaymentTemplateCtrl).directive('paymentList', paymentListDirective).directive('paymentTemplate', paymentTemplateDirective);\nexport default moduleName;","ShippingListCtrl.$inject = [\"$anchorScroll\", \"$location\", \"shippingService\"];\n/* @ngInject */\nfunction ShippingListCtrl($anchorScroll, $location, shippingService) {\n var ctrl = this;\n var watchersFn = [];\n //ctrl.isProgress = null;\n\n $anchorScroll.yOffset = 50;\n\n //ctrl.selectedItemIndex = 0;\n //ctrl.collapsed = true;\n\n ctrl.visibleItems = Number.POSITIVE_INFINITY;\n ctrl.changeShipping = function (shipping, index) {\n if (index != null) {\n ctrl.selectedItemIndex = index;\n }\n ctrl.change({\n shipping: shipping,\n newShipping: ctrl.newShipping\n });\n };\n ctrl.changeShippingControl = function (shipping) {\n for (var i = ctrl.items.length - 1; i >= 0; i--) {\n if (ctrl.items[i] === shipping) {\n ctrl.selectShipping = shipping;\n ctrl.selectedItemIndex = i;\n break;\n }\n }\n ctrl.change({\n shipping: shipping,\n customShipping: ctrl.customShipping\n });\n };\n ctrl.focusEditPrice = function (shipping, index) {\n ctrl.selectShipping = shipping;\n ctrl.selectedItemIndex = index;\n ctrl.focus({\n shipping: shipping,\n customShipping: ctrl.customShipping\n });\n };\n ctrl.calc = function (index) {\n var selectItemPos = index + 1;\n ctrl.selectedItemIndex = index;\n ctrl.visibleItems = selectItemPos > ctrl.countVisibleItems ? selectItemPos : ctrl.countVisibleItems;\n return selectItemPos;\n };\n ctrl.toggleVisible = function () {\n var selectItemPos = ctrl.calc(ctrl.selectedItemIndex);\n if (ctrl.collapsed === true) {\n ctrl.visibleItems = ctrl.items.length;\n ctrl.collapsed = false;\n } else {\n if (selectItemPos === ctrl.items.length) {\n return;\n }\n ctrl.visibleItems = selectItemPos > ctrl.countVisibleItems ? selectItemPos : ctrl.countVisibleItems;\n ctrl.collapsed = true;\n $location.hash(ctrl.anchor);\n $anchorScroll();\n }\n };\n ctrl.setSelectedIndex = function (index) {\n var selectItemPos = ctrl.calc(index);\n if (selectItemPos === ctrl.items.length) {\n ctrl.collapsed = false;\n } else {\n ctrl.collapsed = true;\n }\n };\n ctrl.addCallbackOnLoad = function (fn) {\n watchersFn.push(fn);\n };\n ctrl.processCallbacks = function () {\n var params = arguments;\n watchersFn.forEach(function (fn) {\n fn(params);\n });\n };\n ctrl.showProgressForItem = function (item) {\n return ctrl.isProgress !== true && item.Template && shippingService.isTemplateReady(item.Template) !== true;\n };\n\n //#region deliveryInterval\n\n ctrl.changeDeliveryInterval = function (item, index) {\n if (ctrl.selectShipping.TimeOfDelivery) {\n ctrl.changeShipping(item, index);\n }\n };\n ctrl.changeSoonest = function (item, index) {\n if (!ctrl.selectShipping.soonest) return;\n ctrl.selectShipping.TimeOfDelivery = null;\n ctrl.changeShipping(item, index);\n };\n ctrl.initIntervals = function () {\n var dateArr = ctrl.selectShipping.DateOfDeliveryStr.split('.');\n var selectedDate = new Date(dateArr[2], dateArr[1] - 1, dateArr[0]);\n var dayOfWeek = selectedDate.getDay();\n if (!ctrl.deliveryIntervals || !ctrl.deliveryIntervals.hasOwnProperty(dayOfWeek)) {\n ctrl.intervalsOnSelectedDay = null;\n return;\n }\n var dateNow = new Date(ctrl.selectShipping.StartDateTime);\n if (dateNow.getDay() != dayOfWeek || dateNow.getDate() != selectedDate.getDate() || dateNow.getMonth() != selectedDate.getMonth() || dateNow.getFullYear() != selectedDate.getFullYear()) {\n ctrl.intervalsOnSelectedDay = ctrl.deliveryIntervals[dayOfWeek];\n return;\n }\n var countInvalidIntervals = 0;\n var minutes = dateNow.getUTCMinutes() + ctrl.selectShipping.TimeZoneOffset % 1 * 60;\n var hours = dateNow.getUTCHours() + Math.trunc(ctrl.selectShipping.TimeZoneOffset + minutes / 60);\n ctrl.deliveryIntervals[dayOfWeek].forEach(function (interval) {\n var timeArr = interval.split('-')[0].split(':');\n if (hours < timeArr[0] || hours == timeArr[0] && minutes < timeArr[1]) return;\n if (interval == ctrl.selectShipping.TimeOfDelivery)\n //выбранный интервал уже недоступен\n ctrl.selectShipping.TimeOfDelivery = null;\n countInvalidIntervals++;\n });\n ctrl.intervalsOnSelectedDay = ctrl.deliveryIntervals[dayOfWeek].slice(countInvalidIntervals);\n };\n ctrl.parseDeliveryInterval = function () {\n ctrl.deliveryIntervals = {};\n if (ctrl.selectShipping.DeliveryIntervalsStr) {\n ctrl.selectShipping.DeliveryIntervalsStr.split('|').forEach(function (dayStr) {\n var arr = dayStr.split('!');\n var day = arr[0];\n var intervals = arr[1].split('&').filter(x => !!x && x.length != 0);\n ctrl.deliveryIntervals[day] = intervals || [];\n });\n }\n ctrl.initIntervals();\n ctrl.disabledDates = [function (date) {\n return !ctrl.deliveryIntervals || !ctrl.deliveryIntervals.hasOwnProperty(date.getDay());\n }];\n };\n\n //#endregion\n}\n\n;\nexport default ShippingListCtrl;","ShippingTemplateCtrl.$inject = [\"$scope\", \"$timeout\", \"$ocLazyLoad\", \"urlHelper\", \"shippingService\"];\n/* @ngInject */\nfunction ShippingTemplateCtrl($scope, $timeout, $ocLazyLoad, urlHelper, shippingService) {\n var ctrl = this,\n timer;\n ctrl.$onInit = function () {\n shippingService.whenTemplateReady($scope, event => {\n $timeout(() => shippingService.saveTemplateState(ctrl.templateUrl));\n });\n };\n ctrl.fireTemplateReady = function () {\n shippingService.fireTemplateReady($scope);\n };\n ctrl.prepereLazyLoadUrl = function (params) {\n for (var i = 0, len = params.length; i < len; i++) {\n params[i] = urlHelper.getAbsUrl(params[i], true);\n }\n return params;\n };\n ctrl.changePrepare = function (event, field, shipping) {\n if (field == null) {\n return;\n }\n angular.extend(ctrl.shipping, shipping);\n if (event != null && event.type === 'keyup') {\n if (timer != null) {\n $timeout.cancel(timer);\n }\n timer = $timeout(function () {\n ctrl.changeControl({\n shipping: ctrl.shipping\n });\n }, 500);\n } else {\n ctrl.changeControl({\n shipping: ctrl.shipping\n });\n }\n };\n ctrl.changeSpinbox = function (value, proxy) {\n ctrl.changeControl({\n shipping: ctrl.shipping\n });\n };\n}\n;\nexport default ShippingTemplateCtrl;","ShippingVariantsCtrl.$inject = [\"$http\", \"zoneService\"];\n/* @ngInject */\nfunction ShippingVariantsCtrl($http, zoneService) {\n var ctrl = this;\n ctrl.$postLink = function () {\n if (ctrl.type === \"display\") {\n ctrl.getData(ctrl.startOfferId, ctrl.startAmount, ctrl.startSvCustomOptions, ctrl.zip);\n }\n if (ctrl.type === \"none\") {\n ctrl.getData(ctrl.startOfferId, ctrl.startAmount, ctrl.startSvCustomOptions, ctrl.zip);\n }\n if (ctrl.type === \"Always\") {\n ctrl.getData(ctrl.startOfferId, ctrl.startAmount, ctrl.startSvCustomOptions, ctrl.zip);\n }\n zoneService.addCallback('set', function (data) {\n ctrl.zip = data.Zip;\n ctrl.getData(ctrl.offerId, ctrl.amount != null ? ctrl.amount : ctrl.startAmount, ctrl.svCustomOptions, ctrl.zip);\n });\n ctrl.initFn({\n shippingVariants: ctrl\n });\n };\n ctrl.getData = function (offerId, amount, customOptions, zip) {\n if (offerId == null || amount == null) {\n return null;\n }\n ctrl.isProgress = true;\n return $http.post('productExt/getshippings', {\n offerId: offerId,\n amount: amount,\n customOptions: customOptions,\n zip: zip,\n rnd: Math.random()\n }).then(function (response) {\n if (response.data != null) {\n ctrl.items = response.data.Shippings;\n if (response.data.AdvancedObj) {\n ctrl.showZip = response.data.AdvancedObj.ShowZip;\n }\n } else {\n ctrl.items = [];\n }\n ctrl.isProgress = false;\n return response.data;\n });\n };\n ctrl.update = function () {\n return ctrl.getData(ctrl.offerId, ctrl.amount, ctrl.svCustomOptions, ctrl.zip).then(function (data) {\n return data;\n });\n };\n ctrl.calcShippings = function () {\n ctrl.type = \"Always\";\n ctrl.getData(ctrl.startOfferId, ctrl.startAmount, ctrl.startSvCustomOptions, ctrl.zip);\n };\n}\n;\nexport default ShippingVariantsCtrl;","shippingListDirective.$inject = [\"urlHelper\", \"$timeout\"];\nimport shippingListTemplate from '../templates/shippingList.html';\nimport shippingVariantsTemplate from \"../templates/shippingVariants.html\";\nimport shippingItemErrorTemplate from \"../templates/shippingItemError.html\";\n\n/* @ngInject */\nfunction shippingListDirective(urlHelper, $timeout) {\n return {\n restrict: 'A',\n scope: {\n items: '=',\n selectShipping: '=',\n countVisibleItems: '=',\n change: '&',\n focus: '&',\n anchor: '@',\n isProgress: '=?',\n contact: ''\n };\n}\nfunction shippingVariantsDirective() {\n return {\n restrict: 'A',\n scope: {\n type: '@',\n offerId: '=',\n amount: '=',\n svCustomOptions: '=',\n startOfferId: '@',\n startAmount: '@',\n startSvCustomOptions: '@',\n zip: '@',\n initFn: '&'\n },\n controller: 'ShippingVariantsCtrl',\n controllerAs: 'shippingVariants',\n bindToController: true,\n replace: true,\n templateUrl: shippingVariantsTemplate\n };\n}\nconst shippingItemError = {\n require: {\n shippingTemplate: \"?^shippingTemplate\"\n },\n bindings: {\n errorText: '<'\n },\n templateUrl: shippingItemErrorTemplate\n};\nexport { shippingListDirective, shippingTemplateDirective, shippingVariantsDirective, shippingItemError };","import './BoxberryOption.html';\nimport './BoxberryWidgetOption.html';\nimport './CheckoutPointOption.html';\nimport './DDeliveryOption.html';\nimport './DDeliveryWidgetOption.html';\nimport './DpdOption.html';\nimport './EdostPickPointOption.html';\nimport './EdostSelectOption.html';\nimport './GrastinOption.html';\nimport './GrastinWidgetOption.html';\nimport './HermesOption.html';\nimport './HermesWidgetOption.html';\nimport './LPostPointOption.html';\nimport './MeasoftOption.html';\nimport './OzonRocketOption.html';\nimport './OzonRocketWidgetOption.html';\nimport './PecEasywayListOption.html';\nimport './PecOption.html';\nimport './PickPointOption.html';\nimport './PickPointWidjetOption.html';\nimport './PointDeliveryMapOption.html';\nimport './PointDeliverySelectOption.html';\nimport './RangePriceAndDistanceOption.html';\nimport './RangeWeightAndDistanceOption.html';\nimport './SberlogisticOption.html';\nimport './SberlogisticWidjetOption.html';\nimport './SdekOption.html';\nimport './SdekWidjetOption.html';\nimport './ShiptorWidgetOption.html';\nimport './YandexDeliveryOption.html';\nimport './YandexDeliveryPickupPointOption.html';\nimport './YandexDeliveryWidgetOption.html';\nimport './YandexNewDeliveryWidgetOption.html';\nimport './YandexNewPointDeliveryListOption.html';\nimport './DeliveryByZonesOption.html';\nimport './SelfDeliveryOption.html'; //GlorySoft_012","const eventReady = \"shippingTemplateReady\";\nconst dataSet = new Set();\nclass ShippingService {\n whenTemplateReady(scope, fn) {\n scope.$on(eventReady, event => {\n fn(event);\n });\n }\n fireTemplateReady(scope, value) {\n scope.$emit(eventReady, value);\n }\n saveTemplateState(templateUrl) {\n dataSet.add(templateUrl);\n }\n isTemplateReady(templateUrl) {\n return dataSet.has(templateUrl);\n }\n}\nexport default ShippingService;","import './styles/shipping.scss';\nimport './extendTemplate/extendTemplate.js';\nimport yandexMaps from '../../_common/yandexMaps/yandexMaps.module.js';\nimport '../../_common/modal/modal.module.js';\nimport ShippingService from './services/shipping.service.js';\nimport ShippingListCtrl from './controllers/shippingListController.js';\nimport ShippingVariantsCtrl from './controllers/shippingVariantsController.js';\nimport ShippingTemplateCtrl from './controllers/shippingTemplateController.js';\nimport { shippingListDirective, shippingTemplateDirective, shippingVariantsDirective, shippingItemError } from './directives/shippingDirectives.js';\nconst moduleName = 'shipping';\nangular.module(moduleName, [yandexMaps, 'modal']).service('shippingService', ShippingService).controller('ShippingListCtrl', ShippingListCtrl).controller('ShippingTemplateCtrl', ShippingTemplateCtrl).controller('ShippingVariantsCtrl', ShippingVariantsCtrl).directive('shippingList', shippingListDirective).directive('shippingTemplate', shippingTemplateDirective).directive('shippingVariants', shippingVariantsDirective).component('shippingItemError', shippingItemError);\nexport default moduleName;",";\n(function (ng) {\n 'use strict';\n\n var ZoneCtrl = function (zoneService, $timeout, /*GlorySoft_000*/$window) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.zoneCity = '';\n ctrl.isProgress = true;\n zoneService.getDataForPopup().then(function (data) {\n ctrl.data = data;\n ctrl.countrySelected = ctrl.data[0];\n for (var i = ctrl.data.length - 1; i >= 0; i--) {\n ctrl.data[i].Columns = zoneService.sliceCitiesForDialog(ctrl.data[i].Cities);\n }\n return data;\n }).finally(function () {\n ctrl.isProgress = false;\n });\n };\n ctrl.changeCity = function (city, obj, countryId, region, event) {\n if (!city.length || event != null && event.type === 'blur') return;\n if (!region && obj != null) region = obj.Region;\n var zip = obj != null ? obj.Zip : null;\n var country = obj != null ? obj.Country : null;\n var district = obj != null ? obj.District : null;\n zoneService.setCurrentZone(city, obj, countryId, region, country, zip, district).then(function (data) {\n if (!data.Region) {\n ctrl.showRegion = true;\n ctrl.autocompleter.toggleVisible(false);\n } else {\n zoneService.zoneDialogClose();\n ctrl.zoneCity = ctrl.zoneRegion = \"\";\n ctrl.showRegion = false;\n $window.location.reload(); //GlorySoft_000\n }\n\n $timeout(function () {\n zoneService.processCallback('changeCity');\n }, 0);\n });\n };\n ctrl.keyup = function ($event, val) {\n $event.stopPropagation();\n var keyCode = $event.keyCode;\n switch (keyCode) {\n case 13:\n //enter\n ctrl.changeCity(ctrl.zoneCity, null, ctrl.countrySelected.CountryId, ctrl.zoneRegion);\n break;\n }\n };\n ctrl.autocompleterOnInit = function (autocompleter) {\n ctrl.autocompleter = autocompleter;\n };\n };\n angular.module('zone').controller('ZoneCtrl', ZoneCtrl);\n ZoneCtrl.$inject = ['zoneService', '$timeout', /*GlorySoft_000*/'$window'];\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n var ZonePopoverCtrl = function ($cookies, zoneService, popoverService, modalService) {\n var ctrl = this;\n ctrl.$onInit = function () {\n zoneService.zonePopoverShown();\n };\n ctrl.modalsStartWorking = function () {\n modalService.startWorking();\n };\n ctrl.zoneOk = function () {\n popoverService.getPopoverScope('zonePopover').then(function (popoverScope) {\n popoverScope.deactive();\n ctrl.modalsStartWorking();\n });\n zoneService.approveZone();\n };\n ctrl.zoneNo = function () {\n popoverService.getPopoverScope('zonePopover').then(function (popoverScope) {\n popoverScope.deactive();\n zoneService.zoneDialogOpen();\n });\n };\n };\n angular.module('zone').controller('ZonePopoverCtrl', ZonePopoverCtrl);\n ZonePopoverCtrl.$inject = ['$cookies', 'zoneService', 'popoverService', 'modalService'];\n})(window.angular);","import dialogTemplate from \"/scripts/_partials/zone/templates/dialog.html\";\n(function (ng) {\n 'use strict';\n\n angular.module('zone').directive('zoneDialogTrigger', ['zoneService', function (zoneService) {\n return {\n restrict: 'A',\n scope: {},\n link: function (scope, element, attrs, ctrl) {\n element.on('click', function (e) {\n e.stopPropagation();\n scope.$apply(zoneService.zoneDialogOpen);\n });\n }\n };\n }]);\n angular.module('zone').directive('zoneDialog', function () {\n return {\n restrict: 'A',\n scope: {},\n replace: true,\n templateUrl: dialogTemplate,\n controller: 'ZoneCtrl',\n controllerAs: 'zone',\n bindToController: true\n };\n });\n angular.module('zone').directive('zoneCurrent', ['zoneService', function (zoneService) {\n return {\n restrict: 'A',\n scope: true,\n link: function (scope, element, attrs, ctrl) {\n var startVal = new Function('return ' + attrs.startVal)();\n scope.zone = {};\n\n //if (attrs.startCity != null) {\n // scope.zone.City = attrs.startCity;\n //}\n\n if (startVal != null) {\n angular.extend(scope.zone, zoneService.trustZone(startVal));\n }\n zoneService.addUpdateList(scope);\n zoneService.getCurrentZone().then(function (data) {\n scope.zone = zoneService.trustZone(data);\n });\n }\n };\n }]);\n angular.module('zone').directive('zonePopover', function () {\n return {\n restrict: 'A',\n scope: true,\n controller: 'ZonePopoverCtrl',\n controllerAs: 'zonePopover'\n };\n });\n angular.module('zone').directive('zoneAddCallback', ['zoneService', '$parse', function (zoneService, $parse) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'ZonePopoverCtrl',\n controllerAs: 'zonePopover',\n link: function (scope, element, attrs, ctrl) {\n const objCallback = $parse(attrs.zoneAddCallback)(scope);\n if (objCallback != null && objCallback.callback != null && objCallback.callbackName != null) {\n zoneService.addCallback(objCallback.callbackName, objCallback.callback);\n }\n }\n };\n }]);\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n var zoneService = /* @ngInject */function ($http, $cacheFactory, $q, $sce, $timeout, modalService, urlHelper) {\n var service = this,\n isRenderDialog = false,\n updateList = [],\n queryList = [],\n callbacks = {},\n cache = $cacheFactory('zonesCache');\n service.getDataForPopup = function () {\n return $http.get(urlHelper.getAbsUrl('location/getdataforpopup', true)).then(function (response) {\n return response.data;\n });\n };\n service.getZones = function (countryId) {\n return service.getZonesFromCache(countryId).then(function (response) {\n if (response == null) {\n return service.getZonesFromDB(countryId);\n } else {\n return response;\n }\n });\n };\n service.getZonesFromCache = function (countryId) {\n var zones = cache.get('zones'),\n zone = angular.isDefined(zones) ? zones[countryId] : null;\n return $q.when(zone);\n };\n service.getZonesFromDB = function (countryId) {\n return $http.get(urlHelper.getAbsUrl('/location/getcities', true), {\n params: {\n countryId: countryId || 0\n }\n }).then(function (response) {\n var zones = cache.get('zones') || {};\n zones[countryId || 0] = response.data;\n cache.put('zones', zones);\n return response.data;\n });\n };\n service.setCurrentZone = function (city, obj, countryId, region, country, zip, district) {\n var params = {\n city: city,\n countryId: countryId,\n regionName: region,\n countryName: country,\n zip: zip,\n district: district\n };\n if (obj != null) params.cityId = obj.CityId;\n return $http.post(urlHelper.getAbsUrl('/location/setzone', true), params).then(function (response) {\n var currentFromCache = cache.get('currentZone'),\n obj = angular.isDefined(currentFromCache) ? angular.extend(currentFromCache, response.data) : response.data;\n if (obj.Phone != null) {\n obj.Phone = $sce.trustAsHtml(obj.Phone);\n }\n service.processUpdateList(obj);\n service.processCallback('set', obj);\n return cache.put('currentZone', obj);\n });\n };\n service.getCurrentZone = function () {\n var currentFromCache = cache.get('currentZone');\n if (currentFromCache != null) {\n return $q.when(currentFromCache);\n }\n if (queryList.length > 0) {\n var defer = $q.defer();\n queryList.push(defer);\n return defer.promise;\n }\n queryList.push($q.defer());\n return $http.post(urlHelper.getAbsUrl('/location/getcurrentzone', true)).then(function (response) {\n response.data.Phone = $sce.trustAsHtml(response.data.Phone);\n cache.put('currentZone', response.data.current);\n for (var i = queryList.length - 1; i >= 0; i--) {\n queryList[i].resolve(cache.get('currentZone'));\n }\n queryList.length = 0;\n return $q.when(cache.get('currentZone'));\n });\n };\n service.approveZone = function () {\n return $http.post(urlHelper.getAbsUrl('/location/approveZone', true));\n };\n service.zonePopoverShown = function () {\n return $http.post(urlHelper.getAbsUrl('/common/resetLastModified', true));\n };\n service.zoneDialogOpen = function () {\n if (isRenderDialog === false) {\n modalService.renderModal('zoneDialog', undefined, '
', undefined, {\n 'isOpen': true,\n 'modalClass': 'zone-dialog'\n });\n isRenderDialog = true;\n } else {\n modalService.open('zoneDialog');\n }\n };\n service.zoneDialogClose = function () {\n if (isRenderDialog === true) {\n modalService.close('zoneDialog');\n modalService.startWorking();\n }\n };\n service.sliceCitiesForDialog = function (cities) {\n var columnsSize = 4,\n citiesLength = cities.length;\n var itemsSize = Math.ceil(citiesLength / columnsSize),\n newArray = [];\n for (var i = 0; i < columnsSize; i++) {\n newArray.push(cities.slice(i * itemsSize, (i + 1) * itemsSize));\n }\n return newArray;\n };\n service.getCitiesForAutocomplete = function (cityName) {\n return $http.get(urlHelper.getAbsUrl('/location/getcitiesautocomplete', true), {\n params: {\n q: cityName\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.addUpdateList = function (scope) {\n updateList.push(scope);\n };\n service.addCallback = function (eventName, func) {\n callbacks[eventName] = callbacks[eventName] || [];\n callbacks[eventName].push(func);\n };\n service.processCallback = function (eventName, data) {\n if (callbacks[eventName] != null) {\n for (var i = 0, l = callbacks[eventName].length; i < l; i++) {\n callbacks[eventName][i](data);\n }\n }\n };\n service.processUpdateList = function (data) {\n var dataTrusted = service.trustZone(data),\n zoneCurrentItem;\n for (var i = updateList.length - 1; i >= 0; i--) {\n zoneCurrentItem = updateList[i].zone;\n zoneCurrentItem = angular.isDefined(zoneCurrentItem) ? angular.extend(zoneCurrentItem, dataTrusted) : dataTrusted;\n }\n };\n service.trustZone = function (zone) {\n if (zone.Phone != null && typeof zone.Phone === 'string') {\n zone.Phone = $sce.trustAsHtml(zone.Phone);\n }\n return zone;\n };\n };\n zoneService.$inject = [\"$http\", \"$cacheFactory\", \"$q\", \"$sce\", \"$timeout\", \"modalService\", \"urlHelper\"];\n angular.module('zone').service('zoneService', zoneService);\n})(window.angular);",";\n(function (ng) {\n 'use strict';\n\n angular.module('zone', []);\n})(window.angular);","import './styles/zones.scss';\nimport './zone.js';\nimport './controllers/zoneController.js';\nimport './controllers/zonePopoverController.js';\nimport './directives/zoneDirectives.js';\nimport './services/zoneService.js';\nexport default 'zone';","class AppDependency {\n constructor() {\n if (!window.___appDependency) {\n window.___appDependency = this;\n window.___appDependencyList = [];\n }\n return window.___appDependency;\n }\n addItem(moduleName) {\n window.___appDependencyList.push(moduleName);\n }\n addList(moduleNameList) {\n window.___appDependencyList.push.apply(window.___appDependencyList, moduleNameList);\n }\n get() {\n return window.___appDependencyList;\n }\n}\nexport default new AppDependency();","import AuthCtrl from './controllers/authController.js';\nimport authService from './services/authService.js';\nimport loginOpenId from '../../scripts/_partials/login-open-id/loginOpenId.module.js';\nconst moduleName = 'auth';\nangular.module(moduleName, []).controller('AuthCtrl', AuthCtrl).service('authService', authService);\nexport default moduleName;","AuthCtrl.$inject = [\"$window\", \"toaster\", \"authService\", \"$sce\"];\n/* @ngInject */\nfunction AuthCtrl($window, toaster, authService, $sce) {\n var ctrl = this;\n ctrl.login = function (email, password, redirect, forceRedirect) {\n var captchaExist = typeof CaptchaSource != \"undefined\" && CaptchaSource != null;\n var captchaInstanceId = captchaExist ? CaptchaSource.InstanceId : null;\n authService.login(email, password, ctrl.captchaCode, captchaInstanceId).then(function (result) {\n if (result.error != null && result.error.length > 0) {\n toaster.pop('error', result.error);\n if (result.requestCaptcha == true && ctrl.showCaptcha != result.requestCaptcha) {\n ctrl.showCaptcha = result.requestCaptcha;\n ctrl.initCaptcha();\n }\n if (captchaExist) {\n CaptchaSource.ReloadImage();\n }\n } else {\n if (redirect != null && redirect.length > 0) {\n if (!forceRedirect && result.redirectTo != null && redirect.indexOf('checkout') == -1 && redirect.indexOf('/pay/') == -1) {\n redirect = result.redirectTo;\n }\n $window.location = redirect;\n } else {\n $window.location.reload();\n }\n }\n });\n };\n ctrl.initCaptcha = function () {\n authService.getCaptchaHtml(\"auth.captchaCode\").then(function (result) {\n ctrl.captchaHtml = $sce.trustAsHtml(result);\n });\n };\n}\n;\nexport default AuthCtrl;","authService.$inject = [\"$http\"];\n/* @ngInject */\nfunction authService($http) {\n var service = this;\n service.login = function (email, password, captchaCode, captchaSource) {\n return $http.post('/user/loginjson', {\n email: email,\n password: password,\n captchaCode: captchaCode,\n captchaSource: captchaSource\n }).then(function (response) {\n return response.data;\n });\n };\n service.getCaptchaHtml = function (ngModel) {\n return $http.post('/commonExt/getCaptchaHtml', {\n ngModel: ngModel\n }).then(function (response) {\n return response.data;\n });\n };\n}\n;\nexport default authService;","import flatpickrModule from '../../vendors/flatpickr/flatpickr.module.js';\nimport '../../styles/partials/bonus-card.scss';\nimport '../../styles/partials/order-history-products.scss';\nimport '../../styles/views/checkout.scss';\nimport bonusModule from '../_partials/bonus/bonus.module.js';\nimport addressModule from '../_partials/address/address.module.js';\nimport buyOneClickModule from '../_partials/buy-one-click/buyOneClick.module.js';\nimport paymentModule from '../_partials/payment/payment.module.js';\nimport shippingModule from '../_partials/shipping/shipping.module.js';\nimport cardsModule from '../_partials/cards/cards.module.js';\nimport yandexMaps from '../_common/yandexMaps/yandexMaps.module.js';\nimport authModule from '../auth/auth.module.js';\nimport smsConfirmationModule from '../sms/smsConfirmation.module.js';\nimport loginOpenIdModule from '../../scripts/_partials/login-open-id/loginOpenId.module.js';\nimport cartModule from \"../../scripts/_partials/cart/cart.module.js\";\nimport rangeSliderModule from '../../vendors/rangeSlider/rangeSlider.module.js';\nimport CheckOutCtrl from './controllers/checkoutController.js';\nimport checkoutService from './services/checkoutService.js';\nconst moduleName = 'checkout';\nangular.module(moduleName, [flatpickrModule, bonusModule, addressModule, buyOneClickModule, paymentModule, shippingModule, cardsModule, yandexMaps, authModule, smsConfirmationModule, cartModule, rangeSliderModule]).service('checkoutService', checkoutService).controller('CheckOutCtrl', CheckOutCtrl);\nexport default moduleName;","CheckOutCtrl.$inject = [\"$http\", \"$q\", \"$sce\", \"$rootScope\", \"$timeout\", \"$window\", \"toaster\", \"zoneService\", \"checkoutService\", \"smsConfirmationService\", \"cartService\", \"cartConfig\"];\nimport { PubSub } from \"../../_common/PubSub/PubSub.js\";\n\n/* @ngInject */\nfunction CheckOutCtrl($http, $q, $sce, $rootScope, $timeout, $window, toaster, zoneService, checkoutService, smsConfirmationService, cartService, cartConfig) {\n var ctrl = this,\n relationship,\n saveContactTimer,\n saveContactHttpTimer,\n processContactTimer,\n saveCustomerTimer,\n processCompanyNameTimer,\n saveRecipientTimer;\n const cacheStorageShipping = new Map();\n const cacheStoragePayment = new Map();\n const cacheStorageCart = new Map();\n const cacheStorageShippingSelected = new Map();\n const cacheStoragePaymentSelected = new Map();\n ctrl.$onInit = function () {\n //ctrl.address = {};\n ctrl.Payment = {};\n ctrl.Shipping = {};\n ctrl.Cart = {};\n ctrl.isShowCouponInput = false;\n ctrl.newCustomer = {};\n ctrl.contact = {};\n ctrl.shippingLoading = true;\n ctrl.paymentLoading = true;\n ctrl.typeCalculationVariants = 'all';\n cartService.addCallback(cartConfig.callbackNames.update, () => {\n ctrl.callRelationship('address');\n });\n cartService.addCallback(cartConfig.callbackNames.remove, (cart, params) => {\n if (params.TotalItems === 0) {\n $window.location.assign('cart');\n } else {\n ctrl.callRelationship('address');\n }\n });\n cartService.addCallback(cartConfig.callbackNames.clear, cart => {\n $location.path('cart');\n });\n };\n relationship = {\n 'address': function () {\n return ctrl.fetchShipping().then(ctrl.fetchPayment).then(ctrl.fetchCart).then(function (data) {\n checkoutService.processCallbacks('address');\n return data;\n });\n },\n 'shipping': function () {\n return ctrl.fetchPayment().then(ctrl.fetchCart).then(function (data) {\n checkoutService.processCallbacks('shipping');\n return data;\n });\n },\n 'payment': function () {\n return ctrl.fetchShipping().then(ctrl.fetchCart).then(function (data) {\n checkoutService.processCallbacks('payment');\n return data;\n });\n },\n 'bonus': function () {\n return ctrl.fetchShipping().then(ctrl.fetchPayment).then(ctrl.fetchCart).then(function (data) {\n checkoutService.processCallbacks('bonus');\n return data;\n });\n },\n 'coupon': function () {\n return ctrl.fetchShipping().then(ctrl.fetchPayment).then(ctrl.fetchCart).then(function (data) {\n checkoutService.processCallbacks('coupon');\n return data;\n });\n }\n };\n ctrl.startShippingProgress = function () {\n ctrl.shippingLoading = true;\n };\n ctrl.stopShippingProgress = function () {\n ctrl.shippingLoading = false;\n };\n ctrl.startPaymentProgress = function () {\n ctrl.paymentLoading = true;\n };\n ctrl.stopPaymentProgress = function () {\n ctrl.paymentLoading = false;\n };\n ctrl.getAddress = function (contactsExits, useZone) {\n if (contactsExits === true) {\n ctrl.changeListAddress = function (address) {\n ctrl.contact = address;\n ctrl.startShippingProgress();\n ctrl.startPaymentProgress();\n ctrl.saveContact().then(function () {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n });\n };\n ctrl.removeAddress = function (addressSelected) {\n ctrl.changeListAddress(addressSelected);\n };\n } else {\n zoneService.addCallback('set', function (data) {\n ctrl.contact.Country = data.CountryName;\n ctrl.contact.City = data.City;\n ctrl.contact.Region = data.Region;\n ctrl.contact.Zip = data.Zip;\n ctrl.startShippingProgress();\n ctrl.startPaymentProgress();\n ctrl.processCity(data, 0).then(function () {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n });\n });\n if (useZone) {\n zoneService.getCurrentZone().then(function (data) {\n ctrl.contact.Country = data.CountryName;\n ctrl.contact.City = data.City;\n ctrl.contact.Region = data.Region;\n ctrl.contact.Zip = data.Zip;\n ctrl.processCity(data, 0).then(function () {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n });\n });\n } else {\n ctrl.startShippingProgress();\n ctrl.startPaymentProgress();\n ctrl.callRelationship('address').finally(function () {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n });\n }\n }\n };\n ctrl.changeShipping = function (shipping) {\n ctrl.startShippingProgress();\n ctrl.startPaymentProgress();\n if (ctrl.ngSelectShipping !== shipping) {\n ctrl.ngSelectShipping = shipping;\n }\n checkoutService.saveShipping(shipping).then(function (response) {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n return ctrl.ngSelectShipping = angular.extend(ctrl.ngSelectShipping, response.selectShipping);\n }).then(ctrl.callRelationship.bind(ctrl, 'shipping'));\n };\n ctrl.changePayment = function (payment) {\n ctrl.startPaymentProgress();\n if (ctrl.ngSelectPayment !== payment) {\n ctrl.ngSelectPayment = payment;\n }\n checkoutService.savePayment(payment).then(ctrl.callRelationship.bind(ctrl, 'payment')).then(function () {\n ctrl.stopPaymentProgress();\n });\n };\n ctrl.fetchShipping = function () {\n return checkoutService.getShipping(null, ctrl.typeCalculationVariants).then(function (response) {\n ctrl.ngSelectShipping = ctrl.getSelectedItem(response.option, response.selectShipping);\n for (var i = 0, len = response.option.length; i < len; i++) {\n if (response.option[i].ShippingPoints != null) {\n response.option[i].SelectedPoint = response.option[i].SelectedPoint || response.option[i].ShippingPoints[0];\n }\n }\n cacheStorageShipping.set(ctrl.typeCalculationVariants, response);\n\n //if (ctrl.ngSelectShipping == null) {GlorySoft_011\n // return ctrl.Shipping = null;\n //} \n\n return ctrl.Shipping = response;\n });\n };\n ctrl.fetchPayment = function () {\n return checkoutService.getPayment().then(function (response) {\n ctrl.ngSelectPayment = ctrl.getSelectedItem(response.option, response.selectPayment);\n cacheStoragePayment.set(ctrl.typeCalculationVariants, response);\n return ctrl.Payment = response;\n });\n };\n ctrl.fetchCart = function () {\n return checkoutService.getCheckoutCart().then(function (response) {\n ctrl.showCart = true;\n ctrl.isShowCouponInput = response.Certificate == null && response.Coupon == null;\n if (ctrl.Cart.Discount != null) {\n ctrl.Cart.Discount.Key = $sce.trustAsHtml(ctrl.Cart.Discount.Key);\n }\n if (ctrl.Cart.Coupon != null) {\n ctrl.Cart.Coupon.Key = $sce.trustAsHtml(ctrl.Cart.Coupon.Key);\n }\n cacheStorageCart.set(ctrl.typeCalculationVariants, response);\n return ctrl.Cart = response;\n });\n };\n ctrl.getSelectedItem = function (array, selectedItem) {\n var item;\n for (var i = array.length - 1; i >= 0; i--) {\n if (array[i].Id === selectedItem.Id) {\n //selectedItem имеет заполненные поля какие опции выбраны, поэтому объединяем\n array[i] = angular.extend(array[i], selectedItem);\n item = array[i];\n break;\n }\n }\n return item;\n };\n ctrl.autorizeBonus = function (cardNumber) {\n return checkoutService.autorizeBonus(cardNumber).then(function () {\n return ctrl.callRelationship('bonus');\n });\n };\n ctrl.changeBonus = function (appliedBonuses) {\n return checkoutService.toggleBonus(appliedBonuses).then(ctrl.callRelationship.bind(ctrl, 'bonus'));\n };\n ctrl.applyCoupon = function () {\n ctrl.isShowCoupon = false;\n return checkoutService.couponApplied().then(ctrl.callRelationship.bind(ctrl, 'coupon'));\n };\n ctrl.deleteCard = function () {\n ctrl.isShowCoupon = true;\n return checkoutService.couponApplied().then(ctrl.callRelationship.bind(ctrl, 'coupon'));\n };\n ctrl.commentSave = function (message) {\n checkoutService.commentSave(message);\n };\n ctrl.saveDontCallBack = function () {\n checkoutService.saveDontCallBack(ctrl.dontCallBack);\n };\n ctrl.saveAgreementForNewsletter = function () {\n checkoutService.saveAgreementForNewsletter(ctrl.isAgreeForPromotionalNewsletter);\n };\n ctrl.saveNewCustomer = function (field, timeout) {\n if (saveCustomerTimer != null) {\n $timeout.cancel(saveCustomerTimer);\n }\n return saveCustomerTimer = $timeout(function () {\n if (field === 'email') {\n PubSub.publish('customer.email', ctrl.newCustomer);\n }\n ctrl.newCustomer.CustomerType = ctrl.customerType;\n checkoutService.saveNewCustomer(ctrl.newCustomer).then(ctrl.fetchCart).then(ctrl.fetchPayment);\n }, timeout != null ? timeout : 700);\n };\n ctrl.saveRecipient = function (timeout) {\n if (saveRecipientTimer != null) {\n $timeout.cancel(saveRecipientTimer);\n }\n return saveRecipientTimer = $timeout(function () {\n checkoutService.saveRecipient(ctrl.newCustomer);\n }, timeout != null ? timeout : 700);\n };\n ctrl.saveWantBonusCard = function () {\n checkoutService.saveWantBonusCard(ctrl.wantBonusCard).then(ctrl.fetchCart);\n ;\n };\n ctrl.saveContact = function (stopUpdateShipping, timeout) {\n if (saveContactTimer != null) {\n $timeout.cancel(saveContactTimer);\n }\n return saveContactTimer = $timeout(function () {\n var currentContact = ctrl.contact.length > 1 ? ctrl.contact[0] : ctrl.contact;\n if (saveContactHttpTimer != null) {\n saveContactHttpTimer.resolve();\n }\n saveContactHttpTimer = $q.defer();\n return checkoutService.saveContact(currentContact, {\n timeout: saveContactHttpTimer.promise\n }).then(function (data) {\n saveContactHttpTimer = null;\n if (stopUpdateShipping == null || stopUpdateShipping === false) {\n ctrl.startShippingProgress();\n ctrl.startPaymentProgress();\n return ctrl.callRelationship('address', data).finally(function () {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n });\n } else {\n return $q.resolve(data);\n }\n });\n }, timeout != null ? timeout : 700);\n };\n ctrl.processCity = function (zone, timeout) {\n if (processContactTimer != null) {\n $timeout.cancel(processContactTimer);\n }\n return processContactTimer = $timeout(function () {\n var currentContact = ctrl.contact.length > 1 ? ctrl.contact[0] : ctrl.contact;\n if (zone != null) {\n currentContact.District = zone.District;\n currentContact.Region = zone.Region;\n currentContact.Country = zone.CountryName || zone.Country;\n currentContact.Zip = zone.Zip;\n }\n currentContact.byCity = zone == null;\n return checkoutService.processContact(currentContact).then(function (data) {\n if (data.result === true) {\n currentContact.District = data.obj.District;\n currentContact.Region = data.obj.Region;\n currentContact.Country = data.obj.Country;\n currentContact.Zip = data.obj.Zip;\n }\n return currentContact;\n }).then(() => ctrl.saveContact(null, 0));\n }, timeout != null ? timeout : 700);\n };\n ctrl.processAddress = function (data, timeout) {\n if (processContactTimer != null) {\n $timeout.cancel(processContactTimer);\n }\n return processContactTimer = $timeout(function () {\n var currentContact = ctrl.contact.length > 1 ? ctrl.contact[0] : ctrl.contact;\n currentContact.byCity = false;\n if (data != null && data.Zip) {\n currentContact.Zip = data.Zip;\n ctrl.saveContact(null, 0);\n } else {\n checkoutService.processContact(currentContact).then(function (data) {\n if (data.result === true && data.obj.Zip) {\n currentContact.Zip = data.obj.Zip;\n }\n ctrl.saveContact(null, 0);\n });\n }\n }, timeout != null ? timeout : 700);\n };\n ctrl.submitOrder = function (event) {\n event.preventDefault();\n ctrl.confirmInProgress = true;\n checkoutService.saveContact(ctrl.contact).then(function () {\n if (ctrl.checkoutNewCustomerForm != null) {\n ctrl.newCustomer.CustomerType = ctrl.customerType;\n checkoutService.saveNewCustomer(ctrl.newCustomer);\n }\n return checkoutService.saveShipping(ctrl.ngSelectShipping);\n }).then(function () {\n return checkoutService.savePayment(ctrl.ngSelectPayment);\n }).then(function () {\n return checkoutService.commentSave(ctrl.comment);\n }).then(function () {\n return checkoutService.saveAgreementForNewsletter(ctrl.isAgreeForPromotionalNewsletter);\n }).then(function () {\n //todo: remove this code\n document.querySelector('.js-checkout-form').submit();\n }).catch(function () {\n ctrl.confirmInProgress = false;\n });\n };\n ctrl.submitMobile = function () {\n if (ctrl.process) {\n return;\n }\n ctrl.process = true;\n $http.post('mobile/checkoutmobile/confirm', {\n name: ctrl.name,\n phone: ctrl.phone,\n email: ctrl.email,\n message: ctrl.message,\n rnd: Math.random()\n }).then(function (response) {\n var data = response.data;\n ctrl.responseOrderNo = data.orderNumber;\n if (data.error == null || data.error == \"\") {\n PubSub.publish(\"order_from_mobile\");\n setTimeout(function () {\n if (data.redirectToUrl) {\n window.location = data.url;\n } else if (data.code == null || data.orderNumber == null) {\n window.location = data.url;\n } else {\n window.location = window.location.pathname.replace('/index', '') + '/success?code=' + (data.code != null ? data.code : \"\");\n }\n ctrl.process = false;\n $rootScope.$apply();\n }, 2000);\n } else {\n ctrl.process = false;\n console.log(\"Error \" + data.error);\n if (data.error == 'redirectToCart') {\n window.location = data.url;\n } else {\n alert(data.error);\n }\n }\n }, function () {\n console.log(\"Error\");\n ctrl.process = false;\n });\n };\n ctrl.changeTempEmail = function (email) {\n $http.post(\"myaccount/updatecustomeremail\", {\n email: email\n }).then(function (response) {\n if (response.data === true) {\n ctrl.modalWrongNewEmail = false;\n window.location.reload(true);\n } else {\n ctrl.modalWrongNewEmail = true;\n }\n });\n };\n ctrl.callRelationship = function (name, data) {\n return relationship[name](data).then(function (data) {\n checkoutService.processCallbacks('relationshipEnd');\n return data;\n });\n };\n ctrl.buyOneClickSuccessFn = function (result) {\n if (result.doGo === true && result.url != null) {\n $window.location.assign(result.url);\n }\n };\n ctrl.processCompanyName = function (item) {\n if (processCompanyNameTimer != null) {\n $timeout.cancel(processCompanyNameTimer);\n }\n return processCompanyNameTimer = $timeout(function () {\n if (item != null && item.CompanyData) {\n ctrl.newCustomer.CustomerFields.forEach(function (field) {\n if (field.FieldAssignment == 1) field.Value = item.CompanyData.CompanyName;else if (field.FieldAssignment == 2) field.Value = item.CompanyData.LegalAddress;else if (field.FieldAssignment == 3) field.Value = item.CompanyData.INN;else if (field.FieldAssignment == 4) field.Value = item.CompanyData.KPP;else if (field.FieldAssignment == 5) field.Value = item.CompanyData.OGRN;else if (field.FieldAssignment == 6) field.Value = item.CompanyData.OKPO;\n });\n } else if (item != null && item.BankData) {\n ctrl.newCustomer.CustomerFields.forEach(function (field) {\n if (field.FieldAssignment == 7) field.Value = item.BankData.BIK;else if (field.FieldAssignment == 8) field.Value = item.BankData.BankName;else if (field.FieldAssignment == 9) field.Value = item.BankData.CorrespondentAccount;\n });\n }\n }, item != null ? 0 : 700);\n };\n ctrl.onPhoneChanged = function () {\n smsConfirmationService.onPhoneChanged();\n };\n ctrl.initShippingType = function (type) {\n ctrl.typeCalculationVariants = type;\n };\n ctrl.changeShippingType = function (type) {\n cacheStorageShippingSelected.set(ctrl.typeCalculationVariants, ctrl.ngSelectShipping);\n cacheStoragePaymentSelected.set(ctrl.typeCalculationVariants, ctrl.ngSelectPayment);\n ctrl.typeCalculationVariants = type;\n if (cacheStorageShipping.has(type)) {\n ctrl.Shipping = cacheStorageShipping.get(type);\n ctrl.ngSelectShipping = cacheStorageShippingSelected.get(type);\n ctrl.Payment = cacheStoragePayment.get(type);\n ctrl.ngSelectPayment = cacheStoragePaymentSelected.get(type);\n ctrl.Cart = cacheStorageCart.get(type);\n checkoutService.processCallbacks('shipping');\n } else {\n ctrl.startShippingProgress();\n ctrl.startPaymentProgress();\n ctrl.callRelationship('address').finally(() => {\n ctrl.stopShippingProgress();\n ctrl.stopPaymentProgress();\n });\n }\n };\n}\n;\nexport default CheckOutCtrl;","checkoutService.$inject = [\"$http\", \"toaster\", \"$q\"];\n/* @ngInject */\nfunction checkoutService($http, toaster, $q) {\n var service = this,\n callbackStorage = {},\n contact;\n service.getContactFromCache = function () {\n return contact;\n };\n service.processContact = function (address) {\n return $http.post('/checkout/CheckoutProcessContactPost', {\n address: address,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.saveContact = function (address, $httpOptions) {\n return $http.post('/checkout/CheckoutContactPost', {\n address: address,\n rnd: Math.random()\n }, $httpOptions).then(function (response) {\n contact = address;\n return response.data;\n });\n };\n service.getShipping = function (preorderList, typeCalculationVariants) {\n var params = {\n rnd: Math.random(),\n typeCalculationVariants\n };\n if (preorderList != null) {\n params.preorderList = preorderList;\n }\n return $http.post('/checkout/CheckoutShippingJson', params).then(function (response) {\n return response.data;\n });\n };\n service.saveShipping = function (shipping, preorderList) {\n var params = {\n shipping: shipping,\n rnd: Math.random()\n };\n if (preorderList != null) {\n params.preorderList = preorderList;\n }\n return $http.post('/checkout/CheckoutShippingPost', params).then(function (response) {\n return response.data;\n });\n };\n service.getPayment = function (preorderList) {\n var params = {\n rnd: Math.random()\n };\n if (preorderList != null) {\n params.preorderList = preorderList;\n }\n return $http.post('/checkout/CheckoutPaymentJson', params).then(function (response) {\n return response.data;\n });\n };\n service.savePayment = function (payment, preorderList) {\n var params = {\n payment: payment,\n rnd: Math.random()\n };\n if (preorderList != null) {\n params.preorderList = preorderList;\n }\n return $http.post('/checkout/CheckoutPaymentPost', params).then(function (response) {\n return response.data;\n });\n };\n service.getCheckoutCart = function () {\n return $http.get('/checkout/CheckoutCartJson', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.autorizeBonus = function (cardNumber) {\n return $http.post('/checkout/CheckoutBonusAutorizePost', {\n cardNumber: cardNumber,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.toggleBonus = function (appliedBonuses) {\n return $http.post('/checkout/CheckoutBonusApplyPost', {\n appliedBonuses: appliedBonuses,\n rnd: Math.random()\n }).then(function (response) {\n if (!response.data.result) {\n toaster.pop('error', '', response.data.msg);\n }\n return response.data;\n });\n };\n service.couponApplied = function () {\n return $http.post('/checkout/CheckoutCouponApplied', {\n irnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.commentSave = function (message) {\n return $http.post('/checkout/CommentPost', {\n message: message,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.saveDontCallBack = function (dontCallBack) {\n return $http.post('/checkout/saveDontCallBack', {\n dontCallBack: dontCallBack,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.saveAgreementForNewsletter = function (isAgreeForPromotionalNewsletter) {\n let defer = $q.defer();\n if (isAgreeForPromotionalNewsletter == null) {\n defer.resolve(null);\n } else {\n return $http.post('/checkout/saveAgreementForNewsletter', {\n isAgreeForPromotionalNewsletter: isAgreeForPromotionalNewsletter\n }).then(function (response) {\n return response.data;\n });\n }\n return defer.promise;\n };\n service.saveNewCustomer = function (customer) {\n return $http.post('/checkout/CheckoutUserPost', {\n customer: customer,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.saveRecipient = function (customer) {\n return $http.post('/checkout/CheckoutRecipientPost', {\n customer: customer,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n service.saveWantBonusCard = function (wantBonusCard) {\n return $http.post('/checkout/saveWantBonusCard', {\n wantBonusCard: wantBonusCard,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n\n // billing\n service.getBillingPayment = function (orderId) {\n return $http.post('/checkout/BillingPaymentJson', {\n rnd: Math.random(),\n orderId: orderId\n }).then(function (response) {\n return response.data;\n });\n };\n service.getBillingCart = function (orderId) {\n return $http.get('/checkout/BillingCartJson', {\n params: {\n orderId: orderId,\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n service.saveBillingPayment = function (payment, orderId) {\n return $http.post('/checkout/BillingPaymentPost', {\n payment: payment,\n orderId: orderId,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n\n //events: address, shipping, payment, bonus, coupon, relationshipEnd\n service.addCallback = function (eventName, callback) {\n callbackStorage[eventName] = callbackStorage[eventName] || [];\n callbackStorage[eventName].push(callback);\n };\n service.removeCallback = function (eventName, callback) {\n var index;\n if (callbackStorage[eventName] != null && callbackStorage[eventName].length > 0) {\n index = callbackStorage[eventName].indexOf(callback);\n if (index !== -1) {\n callbackStorage[eventName].splice(index, 1);\n }\n }\n };\n service.processCallbacks = function (eventName, data) {\n if (callbackStorage[eventName] != null) {\n callbackStorage[eventName].forEach(function (fn) {\n fn(data);\n });\n }\n };\n}\n;\nexport default checkoutService;","SmsAuthCtrl.$inject = [\"$window\", \"$timeout\", \"$translate\", \"toaster\", \"$q\", \"smsConfirmationService\"];\n/* @ngInject */\nfunction SmsAuthCtrl($window, $timeout, $translate, toaster, $q, smsConfirmationService) {\n var ctrl = this;\n const waitingSeconds = 10;\n ctrl.$onInit = function () {\n ctrl.returnToFirstStep();\n ctrl.settings = {};\n ctrl.getCaptchaSettings();\n };\n ctrl.returnToFirstStep = function () {\n ctrl.currentForm = 'enterPhoneForm';\n ctrl.firstSend = false;\n ctrl.enableRetrySend = true;\n ctrl.smsCodeConfirmed = false;\n ctrl.phone = '';\n ctrl.smsCode = '';\n ctrl.smsCodeEnabled = true;\n ctrl.smsCodeModel = [];\n ctrl.phoneText = '';\n };\n ctrl.validate = function (noCheckSmsCode) {\n if (!noCheckSmsCode && ctrl.currentForm === 'confirmSmsForm') {\n if (ctrl.smsCode.length < 4) {\n return false;\n }\n }\n if (ctrl.currentForm === 'enterPhoneForm' && !ctrl.firstSend) {\n if (ctrl.phone === undefined || ctrl.phone === null || ctrl.phone === '' || ctrl.phone.length <= 0) {\n toaster.pop('error', '', 'Укажите корректный номер телефона');\n return false;\n }\n }\n return true;\n };\n ctrl.sendSmsCode = function () {\n if (!ctrl.validate(true)) return;\n var phoneBlock = document.getElementById('smsConfirmationPhone');\n ctrl.phoneText = phoneBlock !== null ? phoneBlock.value : '';\n smsConfirmationService.sendSmsCode(ctrl.phone).then(function (data) {\n if (data.result != true) {\n if (data.errors != null && data.errors.length > 0) {\n toaster.pop('error', null, data.errors[0]);\n } else {\n toaster.pop('error', null, $translate.instant('Js.ConfirmSms.ErrorSendSms'));\n }\n } else {\n ctrl.confirmationCode = data.code;\n if (!ctrl.firstSend) {\n ctrl.firstSend = true;\n ctrl.currentForm = \"confirmSmsForm\";\n }\n toaster.pop('info', '', $translate.instant('Js.ConfirmSms.CodeSended') + ctrl.phone);\n ctrl.setCountdown();\n }\n });\n };\n ctrl.confirmSmsCode = async function () {\n if (!ctrl.validate(false)) return;\n if (ctrl.showCaptcha) {\n const captchaValid = await ctrl.checkCaptcha();\n if (captchaValid.result !== true) {\n if (captchaValid.message != null) {\n toaster.pop('error', '', captchaValid.message);\n }\n return;\n }\n }\n smsConfirmationService.confirmSmsCode(ctrl.smsCode).then(function (data) {\n if (data.result) {\n ctrl.smsCodeConfirmed = true;\n ctrl.enter();\n } else {\n ctrl.reloadCaptcha();\n toaster.pop('error', '', $translate.instant('Js.ConfirmSms.WrongCode'));\n if (data.wrongConfirmation > 2) {\n ctrl.getCaptchaSettings();\n }\n }\n });\n };\n ctrl.enter = function () {\n if (ctrl.smsCodeConfirmed) {\n ctrl.checkCaptcha().then(function () {\n smsConfirmationService.authByPhone(ctrl.phone).then(function (data) {\n if (data.result) {\n var redirect = data.obj.redirectTo;\n if (redirect != null) {\n $window.location = redirect;\n } else {\n $window.location.reload();\n }\n } else {\n if (data.result.error != null && data.result.error.length > 0) {\n toaster.pop('error', data.result.error);\n }\n }\n });\n }).catch(result => {\n return;\n });\n }\n };\n ctrl.getCaptchaSettings = function () {\n smsConfirmationService.getCaptchaSettings().then(function (data) {\n if (data.result) {\n ctrl.showCaptcha = data.obj;\n smsConfirmationService.showCaptcha = data.obj;\n }\n });\n };\n ctrl.checkCaptcha = function () {\n if (ctrl.showCaptcha && typeof CaptchaSource != 'undefined') {\n CaptchaSource.InputId = 'CaptchaCode';\n var captchaCode = CaptchaSource.GetInputElement().value;\n return smsConfirmationService.checkCaptcha(captchaCode).then(result => {\n if (result.data === true) {\n return $q.resolve({\n result: true\n });\n } else {\n ctrl.reloadCaptcha();\n return $q.resolve({\n message: $translate.instant('Js.Captcha.Wrong')\n });\n }\n });\n } else {\n return $q.resolve();\n }\n };\n ctrl.reloadCaptcha = function () {\n if (ctrl.showCaptcha && typeof CaptchaSource != 'undefined') {\n $timeout(function () {\n CaptchaSource.ReloadImage();\n }, 1000);\n CaptchaSource.GetInputElement().value = '';\n }\n };\n ctrl.setCountdown = function () {\n ctrl.enableRetrySend = false;\n ctrl.countdownSeconds = waitingSeconds;\n if (ctrl.pageType === 'login') {\n var counter = setInterval(function () {\n ctrl.countdownSeconds--;\n var timerBlock = document.getElementById(\"smsConfirmationCountdownTimer\");\n if (timerBlock !== null) {\n timerBlock.innerHTML = 'Отправить код повторно можно через ' + ctrl.countdownSeconds + ' сек.';\n }\n if (ctrl.countdownSeconds <= 0) {\n if (timerBlock !== null) {\n timerBlock.innerHTML = '';\n }\n ctrl.enableRetrySend = true;\n clearInterval(counter);\n var form = document.querySelector('.sms-confirmation-modal');\n if (form !== null) {\n form.click();\n }\n }\n }, 1000);\n } else {\n $timeout(function () {\n ctrl.enableRetrySend = true;\n }, ctrl.countdownSeconds * 1000);\n }\n };\n ctrl.setFocus = function (fromId, toId) {\n $timeout(function () {\n var from = document.getElementById(fromId);\n if (from !== null && from.value !== ' ' && from.value.length > 0) {\n var to = document.getElementById(toId);\n if (to !== null) {\n to.focus();\n to.selectionStart = 0;\n }\n }\n }, 100);\n };\n}\n;\nexport default SmsAuthCtrl;","SmsConfirmationCtrl.$inject = [\"$timeout\", \"smsConfirmationService\", \"toaster\", \"$translate\", \"$sce\", \"$parse\", \"$scope\", \"$attrs\", \"$q\"];\n/* @ngInject */\nfunction SmsConfirmationCtrl($timeout, smsConfirmationService, toaster, $translate, $sce, $parse, $scope, $attrs, $q) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.smsCodeConfirmed = null;\n ctrl.smsCodeEnabled = true;\n ctrl.enableRetrySendSmsCode = true;\n ctrl.pageName = $parse($attrs.smsConfirmationPageName)($scope);\n ctrl.phone = $parse($attrs.smsConfirmationPhone)($scope);\n ctrl.smsConfirmationOnCheck = $parse($attrs.smsConfirmationOnCheck);\n ctrl.checkPhoneConfirmed();\n ctrl.getCaptchaSettings(ctrl.pageName);\n };\n ctrl.sendSmsCode = function (phone) {\n if (phone == null || phone === '' || phone.length <= 0) return;\n ctrl.smsCodeConfirmed = null;\n ctrl.smsCodeEnabled = true;\n ctrl.smsCode = '';\n smsConfirmationService.sendSmsCode(phone).then(function (data) {\n if (data.result === true) {\n ctrl.confirmationCode = data.code;\n toaster.pop('info', '', $translate.instant('Js.ConfirmSms.CodeSended') + phone);\n $timeout(function () {\n ctrl.enableRetrySend = true;\n }, 20 * 1000);\n }\n });\n };\n ctrl.confirmSmsCode = async function (value) {\n if (value == null || value.length < 4) return;\n if (ctrl.showCaptcha) {\n const captchaValid = await ctrl.checkCaptcha();\n if (captchaValid.result !== true) {\n if (captchaValid.message != null) {\n toaster.pop('error', '', captchaValid.message);\n }\n return;\n }\n }\n smsConfirmationService.confirmSmsCode(value).then(function (data) {\n if (data.result) {\n ctrl.smsCodeConfirmed = true;\n ctrl.smsCodeEnabled = false;\n ctrl.showCaptcha = false;\n smsConfirmationService.isPhoneChanged = false;\n } else {\n ctrl.reloadCaptcha();\n toaster.pop('error', '', $translate.instant('Js.ConfirmSms.WrongCode'));\n if (data.wrongConfirmation > 2 && !ctrl.showCaptcha) {\n ctrl.getCaptchaSettings(ctrl.pageName);\n }\n }\n ctrl.smsCode = '';\n });\n };\n ctrl.checkCaptcha = function () {\n if (typeof CaptchaSource != 'undefined') {\n CaptchaSource.InputId = 'CaptchaCode';\n var captchaCode = CaptchaSource.GetInputElement().value;\n if (captchaCode == null || captchaCode.length == 0) {\n return $q.resolve({\n result: false\n });\n }\n return smsConfirmationService.checkCaptcha(captchaCode).then(result => {\n if (result.data === true) {\n return $q.resolve({\n result: true\n });\n } else {\n ctrl.reloadCaptcha();\n return $q.resolve({\n message: $translate.instant('Js.Captcha.Wrong')\n });\n }\n });\n } else {\n return this.$q.resolve();\n }\n };\n ctrl.reloadCaptcha = function () {\n if (ctrl.showCaptcha && typeof CaptchaSource != 'undefined') {\n $timeout(function () {\n CaptchaSource.ReloadImage();\n }, 1000);\n CaptchaSource.GetInputElement().value = '';\n }\n };\n ctrl.getCaptchaSettings = function (pageName) {\n smsConfirmationService.getCaptchaSettings(pageName).then(function (data) {\n if (data.result) {\n ctrl.showCaptcha = data.obj;\n if (ctrl.showCaptcha) {\n ctrl.initCaptcha();\n }\n }\n });\n };\n ctrl.checkPhoneConfirmed = function () {\n smsConfirmationService.checkPhoneConfirmed().then(function (data) {\n var isPhoneConfirmed = data.obj.isPhoneConfirmed;\n var phone = data.obj.phone;\n if (phone != null && ctrl.smsConfirmationOnCheck != null) {\n ctrl.smsConfirmationOnCheck($scope, {\n phone\n });\n }\n if (isPhoneConfirmed) {\n ctrl.smsCodeConfirmed = true;\n ctrl.smsCodeEnabled = false;\n }\n });\n };\n ctrl.initCaptcha = function () {\n smsConfirmationService.getCaptchaHtml(\"smsConfirmation.captchaCode\", ctrl.showCaptcha).then(function (result) {\n ctrl.captchaHtml = $sce.trustAsHtml(result);\n });\n };\n ctrl.getsmsCodeConfirmed = function () {\n return ctrl.smsCodeConfirmed && !smsConfirmationService.isPhoneChanged;\n };\n}\n;\nexport default SmsConfirmationCtrl;","SmsConfirmationInputCtrl.$inject = [\"$scope\", \"$element\"];\n/* @ngInject */\nfunction SmsConfirmationInputCtrl($scope, $element) {\n const ctrl = this;\n const regexp = /\\d{1}/;\n const keyServices = new Set([\"Backspace\", \"ArrowLeft\", \"ArrowRight\"]);\n const isNumber = value => regexp.test(value);\n\n //Unidentified - on mobile\n const getValue = event => event.key === \"Unidentified\" ? event.target.value : event.key;\n const setValue = (value, index) => ctrl.inputsList[index] = parseFloat(value[value.length - 1]);\n const onPaste = function (event, index) {\n if (event.clipboardData != null) {\n event.stopPropagation();\n event.preventDefault();\n const pastedData = event.clipboardData.getData('text/plain');\n if (pastedData != null && pastedData.length > 0 && pastedData.length <= ctrl.count) {\n const dataNormalized = pastedData.replaceAll(/\\D/g, \"\");\n if (dataNormalized.length > 0) {\n const arrNewValues = dataNormalized.split(\"\").map(x => parseFloat(x));\n arrNewValues.length = arrNewValues.length > ctrl.count ? ctrl.count : arrNewValues.length;\n let tempIndex = 0;\n for (let i = ctrl.count - arrNewValues.length; i < ctrl.count; i++) {\n ctrl.inputsList[i] = arrNewValues[tempIndex];\n tempIndex += 1;\n }\n $scope.$digest();\n }\n }\n }\n };\n ctrl.$onInit = function () {\n ctrl.inputsList = new Array(ctrl.count);\n ctrl.itemIndexFocus = 0;\n ctrl.maxIndex = ctrl.count - 1;\n ctrl.minIndex = 0;\n };\n ctrl.$postLink = function () {\n $element[0].addEventListener(\"paste\", onPaste);\n $element.on('$destroy', function () {\n $element[0].removeEventListener(\"paste\", onPaste);\n });\n };\n ctrl.keydown = function (event, index) {\n const value = getValue(event);\n const isKeyServices = keyServices.has(value);\n if (isNumber(value) === false && isKeyServices === false && event.ctrlKey === false) {\n event.preventDefault();\n }\n if (isKeyServices) {\n if (value === \"ArrowLeft\" || value === \"Backspace\" && ctrl.inputsList[index] == null) {\n ctrl.itemIndexFocus = Math.max(ctrl.minIndex, index - 1);\n } else if (value === \"ArrowRight\") {\n ctrl.itemIndexFocus = Math.min(ctrl.maxIndex, index + 1);\n }\n }\n };\n ctrl.keyup = function (event, index) {\n const value = getValue(event);\n if (isNumber(value) === false || keyServices.has(value)) {\n return;\n }\n setValue(value, index);\n ctrl.itemIndexFocus = Math.min(ctrl.maxIndex, index + 1);\n if (ctrl.onComplete != null && ctrl.inputsList.every(x => isNaN(x) === false)) {\n ctrl.onComplete({\n value: ctrl.inputsList.join(\"\")\n });\n }\n };\n}\n;\nexport default SmsConfirmationInputCtrl;","import smsConfirmationInputTemplate from \"../templates/smsConfirmationInput.html\";\nfunction smsConfirmationDirective() {\n return {\n restrict: 'A',\n scope: true,\n controller: 'SmsConfirmationCtrl',\n controllerAs: 'smsConfirmation',\n bindToController: true\n };\n}\nconst smsConfirmationInputComponent = {\n controller: 'SmsConfirmationInputCtrl',\n templateUrl: smsConfirmationInputTemplate,\n bindings: {\n count: '<',\n disabled: ' 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (!service.showCaptcha) {\n return $q.when({\n data: true\n });\n }\n return $http.get(CaptchaSource.ValidationUrl + '&i=' + captchaCode).then(function (result) {\n return result;\n });\n };\n service.checkPhoneConfirmed = function () {\n return $http.get('user/GetSmsPhoneConfirmed').then(function (result) {\n return result.data;\n });\n };\n service.onPhoneChanged = function () {\n service.isPhoneChanged = true;\n };\n service.getCaptchaHtml = function (ngModel, showCaptcha) {\n service.showCaptcha = showCaptcha;\n return $http.post('/commonExt/getCaptchaHtml', {\n ngModel: ngModel\n }).then(function (response) {\n return response.data;\n });\n };\n}\n;\nexport default authSmsService;","import './smsConfirmation.scss';\nimport SmsAuthCtrl from './controllers/authSmsController.js';\nimport SmsConfirmationCtrl from './controllers/smsConfirmationCtrl.js';\nimport SmsConfirmationInputCtrl from './controllers/smsConfirmationInputCtrl.js';\nimport smsConfirmationService from './services/smsService.js';\nimport { smsConfirmationDirective, smsConfirmationInputComponent } from './directives/smsDirectives.js';\nconst moduleName = 'smsConfirmation';\nangular.module(moduleName, []).service('smsConfirmationService', smsConfirmationService).controller('SmsAuthCtrl', SmsAuthCtrl).controller('SmsConfirmationCtrl', SmsConfirmationCtrl).controller('SmsConfirmationInputCtrl', SmsConfirmationInputCtrl).directive('smsConfirmation', smsConfirmationDirective).component('smsConfirmationInput', smsConfirmationInputComponent);\nexport default moduleName;","import flatpickr from 'flatpickr';\nimport 'flatpickr/dist/flatpickr.min.css';\nimport { Russian } from \"flatpickr/dist/l10n/ru.js\";\nflatpickr.localize(Russian); // default locale is now Russian\n\nimport './flatpickr.custom.css';\nimport './ng-flatpickr.js';\nconst moduleName = 'angular-flatpickr';\nangular.module(moduleName).config(['$localeProvider', 'ngFlatpickrDefaultOptions', function ($localeProvider, ngFlatpickrDefaultOptions) {\n ngFlatpickrDefaultOptions.locale = $localeProvider.$get().id.split('-')[0];\n ngFlatpickrDefaultOptions.disableMobile = true;\n}]);\nexport default moduleName;","const tokenRegexCalendar = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n};\nfunction checkNeedFormat(date, format) {\n // if (typeof date !== 'string') {\n // return false;\n // }\n\n var str = '';\n var symbolList = format.split('');\n symbolList.forEach(symbol => str += tokenRegexCalendar[symbol] != null ? tokenRegexCalendar[symbol] : symbol);\n var regexp = new RegExp('^' + str + '$');\n return !regexp.test(date);\n}\nvar maskIsCompleteOptional = function (maskControl) {\n return maskControl == null || maskControl.maskOriginal.masked.isComplete;\n};\nvar ngModelFormatFn = function (flatpickr, ngFlatpickrFilter, maskControl) {\n return function (value) {\n var result;\n if (value == null || value === '' || maskControl != null && maskControl.maskOriginal.masked.isComplete === false) {\n result = value;\n } else {\n if (angular.isString(value) === true && flatpickr.config.startDateFormat == null) {\n console.warn('Option \"startDateFormat\" required');\n }\n result = ngFlatpickrFilter(value, flatpickr.config.dateFormat, flatpickr.config.startDateFormat);\n }\n return result;\n };\n};\nvar ngModelParseFn = function (flatpickr, ngFlatpickrFilter, maskControl) {\n return function (value) {\n return value == null || value.length === 0 || maskControl != null && maskControl.maskOriginal.masked.isComplete === false ? value : ngFlatpickrFilter(value, flatpickr.config.startDateFormat, flatpickr.config.dateFormat);\n };\n};\nvar ngFlatpickr = angular.module('angular-flatpickr', []);\nngFlatpickr.constant('ngFlatpickrDefaultOptions', {\n time_24hr: true,\n allowInput: true\n});\nngFlatpickr.directive('ngFlatpickr', ['$q', '$filter', '$parse', '$timeout', 'ngFlatpickrDefaultOptions', function ($q, $filter, $parse, $timeout, ngFlatpickrDefaultOptions) {\n return {\n require: {\n ngModel: '?ngModel',\n maskControl: '?maskControl'\n },\n restrict: 'A',\n scope: {\n fpOpts: ' ctrl.ngFlatpickrInput.$element.attr(attrName) == null) ? ngModel.$modelValue : ngModel.$viewValue;\n flatpickr.setDate(Array.isArray(valueSource) ? valueSource : $filter('ngFlatpickr')(valueSource, flatpickr.config.dateFormat, flatpickr.config.startDateFormat), false);\n }\n };\n if (ngModel.$viewValue != null && angular.isString(ngModel.$viewValue) === true && ngModel.$viewValue.length > 0 && maskIsCompleteOptional(maskControl)) {\n flatpickr.setDate($filter('ngFlatpickr')(ngModel.$viewValue, flatpickr.config.dateFormat, flatpickr.config.startDateFormat), false);\n }\n return function () {\n var indexFormatFn;\n var indexParseFn;\n if (ngModelFormatFnCurrent) {\n indexFormatFn = ngModel.$formatters.indexOf(ngModelFormatFnCurrent);\n if (indexFormatFn !== -1) {\n ngModel.$formatters.splice(indexFormatFn, 1);\n }\n }\n if (ngModelParseFnCurrent) {\n indexParseFn = ngModel.$parsers.indexOf(ngModelParseFnCurrent);\n if (indexParseFn !== -1) {\n ngModel.$parsers.splice(indexParseFn, 1);\n }\n }\n };\n };\n ctrl.bindElementEvents = function (inputElement, maskControl) {\n if (inputElement != null) {\n inputElement.on('keyup', function () {\n ctrl.needUpdate = true;\n });\n inputElement.on('blur', function (event) {\n var el = this;\n if (ctrl.needUpdate === true && maskIsCompleteOptional(maskControl)) {\n $timeout(function () {\n ctrl.flatpickr.setDate(el.value, true);\n }, 10);\n } else {\n //�������� ����� ������� ������ ������ � flatpickr, ��� ��� �� ������� ��-�� ������������ �����\n event.stopImmediatePropagation();\n }\n });\n return function () {\n inputElement.off();\n };\n } else {\n return function () {};\n }\n };\n function removeMaskPlaceholder(input, ngModel, maskControl, options) {\n var startVal;\n if ((isNaN(ngModel.$modelValue) || ngModel.$modelValue == null) && input != null && maskControl != null) {\n const valueScope = $parse(input.attr('ng-model') || input.attr('data-ng-model'))($scope.$parent);\n let valueScopeParsed;\n if (valueScope != null) {\n valueScopeParsed = valueScope.replace(/[\\.:_]*/g, '');\n }\n startVal = valueScopeParsed != null && valueScopeParsed.length > 0 ? $filter('ngFlatpickr')(valueScope, options.dateFormat, options.startDateFormat) : input.val();\n input.val('');\n return function () {\n setTimeout(() => {\n input.val(startVal);\n }, 0);\n };\n } else {\n return function () {};\n }\n }\n ctrl.$postLink = function () {\n var input = ctrl.ngFlatpickrInput != null ? ctrl.ngFlatpickrInput.$element : $element[0].tagName.toLowerCase() === 'input' ? $element : null;\n var maskControl = ctrl.ngFlatpickrInput != null && ctrl.ngFlatpickrInput.maskControl != null ? ctrl.ngFlatpickrInput.maskControl : ctrl.maskControl;\n var ngModel = ctrl.ngFlatpickrInput != null ? ctrl.ngFlatpickrInput.ngModel : ctrl.ngModel;\n var options = angular.extend({}, ngFlatpickrDefaultOptions, ctrl.fpOpts || {});\n if (typeof options.appendTo === 'string') {\n options.appendTo = document.querySelector(options.appendTo);\n }\n options.onChange = function (selectedDates, dateStr, instance) {\n ctrl.needUpdate = false;\n if (ctrl.fpOnChange != null) {\n $timeout(function () {\n ctrl.fpOnChange({\n selectedDates: selectedDates,\n dateStr: dateStr,\n instance: instance\n });\n });\n }\n };\n options.onValueUpdate = function (selectedDates, dateStr, instance) {\n //����� ����� ������ � �������� �� ���� ������ ���, �� ����������� ����\n if (ngModel != null && ngModel.modelValue == null) {\n if (maskControl != null) {\n maskControl.maskOriginal.value = dateStr;\n }\n ngModel.$setViewValue(dateStr);\n }\n\n //if (maskControl != null) {\n // maskControl.maskOriginal.updateValue();\n //}\n };\n\n options.onOpen = function (selectedDates, dateStr, instance) {\n ctrl.needUpdate = false;\n if (ctrl.fpOnOpen != null) {\n $timeout(function () {\n ctrl.fpOnOpen({\n selectedDates: selectedDates,\n dateStr: dateStr,\n instance: instance\n });\n });\n }\n };\n\n //������� ����������� �� ����� �� ����� ����� ��������� ����� ��� ��� �������� � ������\n var revertMaskPlaceholder = removeMaskPlaceholder(input, ngModel, maskControl, options);\n ctrl.flatpickr = new flatpickr($element[0], options);\n var destroyNgModel = ctrl.processNgModel(ctrl.flatpickr, ngModel, maskControl);\n var destroyElementEvents = ctrl.bindElementEvents(input, maskControl);\n\n //���������� �����������\n revertMaskPlaceholder();\n\n // destroy the flatpickr instance when the dom element is removed\n $element.on('$destroy', function () {\n destroyNgModel();\n destroyElementEvents();\n delete ctrl.ngFlatpickrInput;\n ctrl.flatpickr.destroy();\n $scope.$destroy();\n });\n if (ctrl.fpOnSetup) {\n ctrl.fpOnSetup({\n fpItem: ctrl.flatpickr\n });\n }\n };\n ctrl.parse = function (str) {\n return ctrl.flatpickr.parseDate(str, ctrl.flatpickr.config.dateFormat);\n };\n ctrl.format = function (date) {\n return ctrl.flatpickr.formatDate(date, ctrl.flatpickr.config.dateFormat);\n //return $filter('ngFlatpickr')(date, ctrl.flatpickr.config.dateFormat, ctrl.flatpickr.config.startDateFormat);\n };\n }]\n };\n}]);\n\nngFlatpickr.directive('ngFlatpickrInput', ['$filter', '$timeout', function ($filter, $timeout) {\n return {\n require: {\n ngModel: 'ngModel',\n ngFlatpickr: '^ngFlatpickr',\n maskControl: '?maskControl'\n },\n restrict: 'A',\n bindToController: true,\n controllerAs: 'ngFlatpickrInput',\n controller: ['$element', function ($element) {\n var ctrl = this;\n ctrl.$onInit = function () {\n ctrl.$element = $element;\n ctrl.ngFlatpickr.addNgFlatpickrInput(ctrl);\n };\n ctrl.$postLink = function () {\n $element.attr('data-input', '');\n };\n }]\n };\n}]);\nngFlatpickr.filter('ngFlatpickr', function () {\n return function ngFlatpickrFilter(value, format, formatParse) {\n const valueIsString = angular.isString(value);\n let valueParsed;\n if (value == null || valueIsString && value.length === 0 || checkNeedFormat(value, format) === false) {\n return value;\n }\n if (valueIsString) {\n if (formatParse == null || formatParse.length === 0) {\n console.warn('Missing required filter parameter \"formatParse\" for parse date string');\n } else {\n valueParsed = flatpickr.parseDate(value, formatParse);\n }\n } else if (angular.isDate(value) === true) {\n valueParsed = value;\n } else if (Array.isArray(value)) {\n return value.map(x => ngFlatpickrFilter(x, format, formatParse)).join(\" - \");\n } else {\n console.warn('Unsupport variable type for filter ngFlatpickr');\n return value;\n }\n return flatpickr.formatDate(valueParsed || value, format);\n };\n});\nexport default 'ngFlatpickr';","import rangeSliderTemplate from \"/vendors/rangeSlider/templates/rangeSlider.html\";\n/*\n * Angular RangeSlider Directive\n * \n * Version: 0.0.13\n *\n * Author: Daniel Crisp, danielcrisp.com\n *\n * The rangeSlider has been styled to match the default styling\n * of form elements styled using Twitter's Bootstrap\n *\n * Originally forked from https://github.com/leongersen/noUiSlider\n *\n\n This code is released under the MIT Licence - http://opensource.org/licenses/MIT\n\n Copyright (c) 2013 Daniel Crisp\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n*/\n\n(function () {\n 'use strict';\n\n // check if we need to support legacy angular\n var legacySupport = angular.version.major === 1 && angular.version.minor === 0;\n\n /**\n * RangeSlider, allows user to define a range of values using a slider\n * Touch friendly.\n * @directive\n */\n angular.module('ui-rangeSlider', []).directive('rangeSlider', ['$document', '$filter', '$log', '$parse', function ($document, $filter, $log, $parse) {\n // test for mouse, pointer or touch\n var eventNamespace = '.rangeSlider',\n defaults = {\n disabled: false,\n orientation: 'horizontal',\n step: 0,\n decimalPlaces: 0,\n showValues: true,\n preventEqualMinMax: false,\n attachHandleValues: false,\n showInputs: true,\n caption: null\n },\n // Determine the events to bind. IE11 implements pointerEvents without\n // a prefix, which breaks compatibility with the IE10 implementation.\n /** @const */\n actions = window.navigator.pointerEnabled ? {\n start: 'pointerdown',\n move: 'pointermove',\n end: 'pointerup',\n over: 'pointerdown',\n out: 'mouseout'\n } : window.navigator.msPointerEnabled ? {\n start: 'MSPointerDown',\n move: 'MSPointerMove',\n end: 'MSPointerUp',\n over: 'MSPointerDown',\n out: 'mouseout'\n } : {\n start: 'mousedown touchstart',\n move: 'mousemove touchmove',\n end: 'mouseup touchend',\n over: 'mouseover touchstart',\n out: 'mouseout'\n },\n onEvent = actions.start + eventNamespace,\n moveEvent = actions.move + eventNamespace,\n offEvent = actions.end + eventNamespace,\n overEvent = actions.over + eventNamespace,\n outEvent = actions.out + eventNamespace,\n // get standarised clientX and clientY\n client = function (f) {\n try {\n return [f.clientX || f.originalEvent.clientX || f.originalEvent.touches[0].clientX, f.clientY || f.originalEvent.clientY || f.originalEvent.touches[0].clientY];\n } catch (e) {\n return ['x', 'y'];\n }\n },\n restrict = function (value) {\n // normalize so it can't move out of bounds\n return value < 0 ? 0 : value > 100 ? 100 : value;\n },\n isNumber = function (n) {\n // console.log(n);\n return !isNaN(parseFloat(n)) && isFinite(n);\n },\n scopeOptions = {\n disabled: '=?',\n min: '=',\n max: '=',\n modelMin: '=?',\n modelMax: '=?',\n onHandleDown: '&',\n // calls optional function when handle is grabbed\n onHandleUp: '&',\n // calls optional function when handle is released\n onHandleMoveDown: '&',\n // calls optional function when handle is grabbed\n onHandleMoveUp: '&',\n // calls optional function when handle is released\n orientation: '@',\n // options: horizontal | vertical | vertical left | vertical right\n step: '<',\n decimalPlaces: '<',\n filter: '@',\n filterOptions: '@',\n showValues: '@',\n showInputs: '@',\n pinHandle: '@',\n preventEqualMinMax: '@',\n attachHandleValues: '@',\n caption: '@'\n };\n if (legacySupport) {\n // make optional properties required\n scopeOptions.disabled = '=';\n scopeOptions.modelMin = '=';\n scopeOptions.modelMax = '=';\n }\n\n // if (EVENT < 4) {\n // // some sort of touch has been detected\n // angular.element('html').addClass('ngrs-touch');\n // } else {\n // angular.element('html').addClass('ngrs-no-touch');\n // }\n\n return {\n restrict: 'A',\n replace: true,\n templateUrl: rangeSliderTemplate,\n scope: scopeOptions,\n link: function (scope, element, attrs, controller) {\n /**\n * FIND ELEMENTS\n */\n\n var $slider = angular.element(element),\n handles = [element.find('.ngrs-handle-min'), element.find('.ngrs-handle-max')],\n values = [element.find('.ngrs-value-min'), element.find('.ngrs-value-max')],\n join = element.find('.ngrs-join'),\n pos = 'left',\n posOpp = 'right',\n orientation = 0,\n allowedRange = [0, 0],\n range = 0,\n down = false;\n\n // filtered\n scope.filteredModelMin = scope.modelMin;\n scope.filteredModelMax = scope.modelMax;\n\n /**\n * FALL BACK TO DEFAULTS FOR SOME ATTRIBUTES\n */\n\n attrs.$observe('disabled', function (val) {\n if (!angular.isDefined(val)) {\n scope.disabled = defaults.disabled;\n }\n scope.$watch('disabled', setDisabledStatus);\n });\n attrs.$observe('orientation', function (val) {\n if (!angular.isDefined(val)) {\n scope.orientation = defaults.orientation;\n }\n var classNames = scope.orientation.split(' '),\n useClass;\n for (var i = 0, l = classNames.length; i < l; i++) {\n classNames[i] = 'ngrs-' + classNames[i];\n }\n useClass = classNames.join(' ');\n\n // add class to element\n $slider.addClass(useClass);\n\n // update pos\n if (scope.orientation === 'vertical' || scope.orientation === 'vertical left' || scope.orientation === 'vertical right') {\n pos = 'top';\n posOpp = 'bottom';\n orientation = 1;\n }\n });\n\n //attrs.$observe('step', function(val) {\n // if (!angular.isDefined(val)) {\n // scope.step = defaults.step;\n // }\n //});\n\n //attrs.$observe('decimalPlaces', function(val) {\n // if (!angular.isDefined(val)) {\n // scope.decimalPlaces = defaults.decimalPlaces;\n // }\n //});\n\n attrs.$observe('showValues', function (val) {\n if (!angular.isDefined(val)) {\n scope.showValues = defaults.showValues;\n } else {\n if (val === 'false') {\n scope.showValues = false;\n } else {\n scope.showValues = true;\n }\n }\n });\n attrs.$observe('showInputs', function (val) {\n if (!angular.isDefined(val)) {\n scope.showInputs = defaults.showInputs;\n } else {\n if (val === 'false') {\n scope.showInputs = false;\n } else {\n scope.showInputs = true;\n }\n }\n });\n attrs.$observe('pinHandle', function (val) {\n if (!angular.isDefined(val)) {\n scope.pinHandle = null;\n } else {\n if (val === 'min' || val === 'max') {\n scope.pinHandle = val;\n } else {\n scope.pinHandle = null;\n }\n }\n scope.$watch('pinHandle', setPinHandle);\n });\n attrs.$observe('preventEqualMinMax', function (val) {\n if (!angular.isDefined(val)) {\n scope.preventEqualMinMax = defaults.preventEqualMinMax;\n } else {\n if (val === 'false') {\n scope.preventEqualMinMax = false;\n } else {\n scope.preventEqualMinMax = true;\n }\n }\n });\n attrs.$observe('attachHandleValues', function (val) {\n if (!angular.isDefined(val)) {\n scope.attachHandleValues = defaults.attachHandleValues;\n } else {\n if (val === 'true' || val === '') {\n // flag as true\n scope.attachHandleValues = true;\n // add class to runner\n element.find('.ngrs-value-runner').addClass('ngrs-attached-handles');\n } else {\n scope.attachHandleValues = false;\n }\n }\n });\n\n // listen for changes to values\n scope.$watch('min', setMinMax);\n scope.$watch('max', setMinMax);\n scope.$watch('modelMin', setModelMinMax);\n scope.$watch('modelMax', setModelMinMax);\n\n /**\n * HANDLE CHANGES\n */\n\n function setPinHandle(status) {\n if (status === \"min\") {\n angular.element(handles[0]).css('display', 'none');\n angular.element(handles[1]).css('display', 'block');\n } else if (status === \"max\") {\n angular.element(handles[0]).css('display', 'block');\n angular.element(handles[1]).css('display', 'none');\n } else {\n angular.element(handles[0]).css('display', 'block');\n angular.element(handles[1]).css('display', 'block');\n }\n }\n function setDisabledStatus(status) {\n if (status) {\n $slider.addClass('ngrs-disabled');\n } else {\n $slider.removeClass('ngrs-disabled');\n }\n }\n function setMinMax() {\n if (scope.min > scope.max) {\n throwError('min must be less than or equal to max');\n }\n\n // only do stuff when both values are ready\n if (angular.isDefined(scope.min) && angular.isDefined(scope.max)) {\n // make sure they are numbers\n if (!isNumber(scope.min)) {\n throwError('min must be a number');\n }\n if (!isNumber(scope.max)) {\n throwError('max must be a number');\n }\n range = scope.max - scope.min;\n allowedRange = [scope.min, scope.max];\n\n // update models too\n setModelMinMax();\n }\n }\n scope.blurMin = function () {\n // make sure they are numbers\n if (!isNumber(scope.modelMin)) {\n //|| scope.modelMin < scope.min\n //if (scope.pinHandle !== 'min') {\n // throwWarning('modelMin must be a number');\n //}\n scope.modelMin = scope.min;\n }\n };\n scope.blurMax = function () {\n if (!isNumber(scope.modelMax) || scope.modelMax > scope.max) {\n //if (scope.pinHandle !== 'max') {\n // throwWarning('modelMax must be a number');\n //}\n scope.modelMax = scope.max;\n }\n };\n function setModelMinMax() {\n //if (scope.modelMin > scope.modelMax && scope.modelMax != null) {\n // throwWarning('modelMin must be less than or equal to modelMax');\n // // reset values to correct\n // scope.modelMin = scope.modelMax;\n //}\n\n // only do stuff when both values are ready\n if ((angular.isDefined(scope.modelMin) || scope.pinHandle === 'min') && (angular.isDefined(scope.modelMax) || scope.pinHandle === 'max')) {\n // make sure they are numbers\n //if (!isNumber(scope.modelMin)) { //|| scope.modelMin < scope.min\n // if (scope.pinHandle !== 'min') {\n // throwWarning('modelMin must be a number');\n // }\n // scope.modelMin = scope.min;\n //}\n\n //if (scope.modelMax == null) {\n // return;\n //}\n\n //if (!isNumber(scope.modelMax) || scope.modelMax > scope.max) {\n // if (scope.pinHandle !== 'max') {\n // throwWarning('modelMax must be a number');\n // }\n // scope.modelMax = scope.max;\n //}\n\n var handle1pos = restrict((scope.modelMin - scope.min) / range * 100),\n handle2pos = restrict((scope.modelMax - scope.min) / range * 100),\n value1pos,\n value2pos;\n if (scope.attachHandleValues) {\n value1pos = handle1pos;\n value2pos = handle2pos;\n }\n\n // make sure the model values are within the allowed range\n //scope.modelMin = Math.max(scope.min, scope.modelMin);\n //scope.modelMax = Math.min(scope.max, scope.modelMax);\n\n if (scope.filter && scope.filterOptions) {\n scope.filteredModelMin = $filter(scope.filter)(scope.modelMin, scope.filterOptions);\n scope.filteredModelMax = $filter(scope.filter)(scope.modelMax, scope.filterOptions);\n } else if (scope.filter) {\n var filterTokens = scope.filter.split(':'),\n filterName = scope.filter.split(':')[0],\n filterOptions = filterTokens.slice().slice(1),\n modelMinOptions,\n modelMaxOptions;\n\n // properly parse string and number args\n filterOptions = filterOptions.map(function (arg) {\n if (isNumber(arg)) {\n return +arg;\n } else if (arg[0] == \"\\\"\" && arg[arg.length - 1] == \"\\\"\" || arg[0] == \"\\'\" && arg[arg.length - 1] == \"\\'\") {\n return arg.slice(1, -1);\n }\n });\n modelMinOptions = filterOptions.slice();\n modelMaxOptions = filterOptions.slice();\n modelMinOptions.unshift(scope.modelMin);\n modelMaxOptions.unshift(scope.modelMax);\n scope.filteredModelMin = $filter(filterName).apply(null, modelMinOptions);\n scope.filteredModelMax = $filter(filterName).apply(null, modelMaxOptions);\n } else {\n scope.filteredModelMin = scope.modelMin;\n scope.filteredModelMax = scope.modelMax;\n }\n\n // check for no range\n if (scope.min === scope.max && scope.modelMin == scope.modelMax) {\n // reposition handles\n angular.element(handles[0]).css(pos, '0%');\n angular.element(handles[1]).css(pos, '100%');\n if (scope.attachHandleValues) {\n // reposition values\n angular.element(values[0]).css(pos, '0%');\n angular.element(values[1]).css(pos, '100%');\n }\n\n // reposition join\n angular.element(join).css(pos, '0%').css(posOpp, '0%');\n } else {\n // reposition handles\n angular.element(handles[0]).css(pos, handle1pos + '%');\n angular.element(handles[1]).css(pos, handle2pos + '%');\n if (scope.attachHandleValues) {\n // reposition values\n angular.element(values[0]).css(pos, value1pos + '%');\n angular.element(values[1]).css(pos, value2pos + '%');\n angular.element(values[1]).css(posOpp, 'auto');\n }\n\n // reposition join\n angular.element(join).css(pos, handle1pos + '%').css(posOpp, 100 - handle2pos + '%');\n\n // ensure min handle can't be hidden behind max handle\n if (handle1pos > 95) {\n angular.element(handles[0]).css('z-index', 3);\n }\n }\n }\n }\n function handleMove(index) {\n var $handle = handles[index];\n\n // on mousedown / touchstart\n $handle.bind(onEvent + 'X', function (event) {\n var handleDownClass = (index === 0 ? 'ngrs-handle-min' : 'ngrs-handle-max') + '-down',\n //unbind = $handle.add($document).add('body'),\n modelValue = (index === 0 ? scope.modelMin : scope.modelMax) - scope.min,\n originalPosition = modelValue / range * 100,\n originalClick = client(event),\n previousClick = originalClick,\n previousProposal = false;\n if (angular.isFunction(scope.onHandleDown)) {\n scope.onHandleDown({\n event: originalClick,\n originalEvent: event\n });\n }\n\n // stop user accidentally selecting stuff\n angular.element('body').bind('selectstart' + eventNamespace, function () {\n return false;\n });\n\n // only do stuff if we are disabled\n if (!scope.disabled) {\n // flag as down\n down = true;\n\n // add down class\n $handle.addClass('ngrs-down');\n $slider.addClass('ngrs-focus ' + handleDownClass);\n\n // add touch class for MS styling\n angular.element('body').addClass('ngrs-touching');\n\n // listen for mousemove / touchmove document events\n $document.bind(moveEvent, function (e) {\n // prevent default\n\n if (e.type !== 'touchmove') {\n e.preventDefault();\n }\n var currentClick = client(e),\n movement,\n proposal,\n other,\n per = scope.step / range * 100,\n otherModelPosition = ((index === 0 ? scope.modelMax : scope.modelMin) - scope.min) / range * 100;\n if (currentClick[0] === \"x\") {\n return;\n }\n\n // calculate deltas\n currentClick[0] -= originalClick[0];\n currentClick[1] -= originalClick[1];\n\n // has movement occurred on either axis?\n movement = [previousClick[0] !== currentClick[0], previousClick[1] !== currentClick[1]];\n\n // propose a movement\n proposal = originalPosition + currentClick[orientation] * 100 / (orientation ? $slider.height() : $slider.width());\n\n // normalize so it can't move out of bounds\n proposal = restrict(proposal);\n if (scope.preventEqualMinMax) {\n if (per === 0) {\n per = 1 / range * 100; // restrict to 1\n }\n\n if (index === 0) {\n otherModelPosition = otherModelPosition - per;\n } else if (index === 1) {\n otherModelPosition = otherModelPosition + per;\n }\n }\n\n // check which handle is being moved and add / remove margin\n if (index === 0) {\n proposal = proposal > otherModelPosition ? otherModelPosition : proposal;\n } else if (index === 1) {\n proposal = proposal < otherModelPosition ? otherModelPosition : proposal;\n }\n if (scope.step > 0) {\n // only change if we are within the extremes, otherwise we get strange rounding\n if (proposal < 100 && proposal > 0) {\n proposal = Math.round(proposal / per) * per;\n }\n }\n if (proposal > 95 && index === 0) {\n $handle.css('z-index', 3);\n } else {\n $handle.css('z-index', '');\n }\n if (movement[orientation] && proposal != previousProposal) {\n if (index === 0) {\n // update model as we slide\n scope.modelMin = parseFloat(parseFloat(proposal * range / 100 + scope.min).toFixed(scope.decimalPlaces));\n if (angular.isFunction(scope.onHandleMoveDown)) {\n scope.onHandleMoveDown({\n event: e,\n modelMin: scope.modelMin\n });\n }\n } else if (index === 1) {\n scope.modelMax = parseFloat(parseFloat(proposal * range / 100 + scope.min).toFixed(scope.decimalPlaces));\n if (angular.isFunction(scope.onHandleMoveUp)) {\n scope.onHandleMoveUp({\n event: e,\n modelMax: scope.modelMax\n });\n }\n }\n\n // update angular\n scope.$apply();\n previousProposal = proposal;\n }\n previousClick = currentClick;\n }).bind(offEvent, function (event) {\n if (angular.isFunction(scope.onHandleUp)) {\n scope.onHandleUp({\n event: event\n });\n }\n\n // unbind listeners\n $document.off(moveEvent);\n $document.off(offEvent);\n angular.element('body').removeClass('ngrs-touching');\n\n // cancel down flag\n down = false;\n\n // remove down and over class\n $handle.removeClass('ngrs-down');\n $handle.removeClass('ngrs-over');\n\n // remove active class\n $slider.removeClass('ngrs-focus ' + handleDownClass);\n });\n }\n }).on(overEvent, function () {\n $handle.addClass('ngrs-over');\n }).on(outEvent, function () {\n if (!down) {\n $handle.removeClass('ngrs-over');\n }\n });\n }\n scope.inputChange = function (event) {\n if (angular.element(event.target).val() == '') return;\n if (angular.isFunction(scope.onHandleUp)) {\n scope.onHandleUp({\n event: event\n });\n }\n };\n function throwError(message) {\n scope.disabled = true;\n throw new Error('RangeSlider: ' + message);\n }\n function throwWarning(message) {\n $log.warn(message);\n }\n\n /**\n * DESTROY\n */\n\n scope.$on('$destroy', function () {\n // unbind event from slider\n $slider.off(eventNamespace);\n\n // unbind from body\n angular.element('body').off(eventNamespace);\n\n // unbind from document\n $document.off(eventNamespace);\n\n // unbind from handles\n for (var i = 0, l = handles.length; i < l; i++) {\n handles[i].off(eventNamespace);\n handles[i].off(eventNamespace + 'X');\n }\n });\n\n /**\n * INIT\n */\n\n $slider\n // disable selection\n .bind('selectstart' + eventNamespace, function (event) {\n return false;\n })\n // stop propagation\n .bind('click', function (event) {\n event.stopPropagation();\n });\n\n // bind events to each handle\n handleMove(0);\n handleMove(1);\n }\n };\n }]);\n\n // requestAnimationFramePolyFill\n // http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n // shim layer with setTimeout fallback\n window.requestAnimFrame = function () {\n return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {\n window.setTimeout(callback, 1000 / 60);\n };\n }();\n})();","import './styles/angular.rangeSlider.css';\nimport './angular.rangeSlider.js';\nexport default 'ui-rangeSlider';"],"names":[],"sourceRoot":""}