{"version":3,"file":"vendors-49c3c303.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;AAQA;AAQA;AASA;AAYA;AACA;AAMA;AACA;AAKA;AAYA;AACA;AACA;AASA;AAOA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AAMA;AAOA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AASA;AAQA;AAOA;AAOA;AAOA;AAOA;AAQA;AAOA;AACA;AACA;AACA;AACA;AAGA;AAGA;AACA;AAWA;AAQA;AAUA;AASA;AASA;AAMA;AAKA;AAKA;AAOA;AAUA;AAKA;AACA;AACA;AACA;AASA;AAOA;AAOA;AAKA;AAOA;AAWA;AAKA;AAOA;AACA;AACA;AACA;AACA;AAKA;AAKA;AAKA;AAKA;AAQA;AAKA;AAKA;AAKA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAKA;AACA;AAIA;AAGA;AAMA;AACA;AACA;AAMA;AAWA;AAQA;AAIA;AAKA;AAKA;AAKA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AASA;AASA;AAcA;AAGA;AAUA;AAaA;AAOA;AAOA;AACA;AACA;AACA;AAMA;AAOA;AAOA;AAOA;AAMA;AAOA;AAMA;AAMA;AAcA;AAMA;AAKA;AAWA;AASA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAMA;AAYA;AAQA;AAMA;AAKA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AAIA;AACA;AACA;AACA;AAGA;AACA;AACA;AAGA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AAOA;AAWA;AAYA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AAcA;AASA;AACA;AAOA;AAOA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AAUA;AAUA;AACA;AACA;AAMA;AAOA;AACA;AAQA;AASA;AAOA;AAOA;AAKA;AACA;AAOA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;AAMA;AAKA;AACA;AAOA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkOA","sources":["webpack://www.zeusteam.com/./node_modules/ag-grid-enterprise/dist/package/main.esm.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp(target, key, result);\n return result;\n};\n\n// packages/ag-grid-enterprise/src/main.ts\nvar main_exports = {};\n__export(main_exports, {\n ALWAYS_SYNC_GLOBAL_EVENTS: () => ALWAYS_SYNC_GLOBAL_EVENTS,\n AbstractHeaderCellCtrl: () => AbstractHeaderCellCtrl,\n AdvancedFilterModule: () => AdvancedFilterModule,\n AgAbstractField: () => AgAbstractField,\n AgAbstractLabel: () => AgAbstractLabel2,\n AgAutocomplete: () => AgAutocomplete2,\n AgCheckbox: () => AgCheckbox,\n AgDialog: () => AgDialog5,\n AgGroupComponent: () => AgGroupComponent6,\n AgInputDateField: () => AgInputDateField2,\n AgInputNumberField: () => AgInputNumberField2,\n AgInputRange: () => AgInputRange,\n AgInputTextArea: () => AgInputTextArea,\n AgInputTextField: () => AgInputTextField3,\n AgMenuItemComponent: () => AgMenuItemComponent5,\n AgMenuItemRenderer: () => AgMenuItemRenderer2,\n AgMenuList: () => AgMenuList4,\n AgMenuPanel: () => AgMenuPanel,\n AgPanel: () => AgPanel2,\n AgPickerField: () => AgPickerField2,\n AgPromise: () => AgPromise8,\n AgPromiseStatus: () => AgPromiseStatus,\n AgRadioButton: () => AgRadioButton,\n AgRichSelect: () => AgRichSelect4,\n AgSelect: () => AgSelect9,\n AgSlider: () => AgSlider3,\n AgStackComponentsRegistry: () => AgStackComponentsRegistry,\n AgToggleButton: () => AgToggleButton5,\n AlignedGridsService: () => AlignedGridsService,\n AnimateShowChangeCellRenderer: () => AnimateShowChangeCellRenderer,\n AnimateSlideCellRenderer: () => AnimateSlideCellRenderer,\n AnimationFrameService: () => AnimationFrameService,\n AutoScrollService: () => AutoScrollService2,\n AutoWidthCalculator: () => AutoWidthCalculator,\n Autowired: () => Autowired81,\n BarColumnLabelPlacement: () => BarColumnLabelPlacement,\n BaseComponentWrapper: () => BaseComponentWrapper,\n Bean: () => Bean18,\n BeanStub: () => BeanStub36,\n Beans: () => Beans,\n BodyDropPivotTarget: () => BodyDropPivotTarget,\n BodyDropTarget: () => BodyDropTarget,\n CellComp: () => CellComp,\n CellCtrl: () => CellCtrl2,\n CellNavigationService: () => CellNavigationService2,\n CellPositionUtils: () => CellPositionUtils2,\n CellRangeType: () => CellRangeType3,\n ChangedPath: () => ChangedPath2,\n ChartMappings: () => ChartMappings3,\n CheckboxCellEditor: () => CheckboxCellEditor,\n CheckboxCellRenderer: () => CheckboxCellRenderer,\n CheckboxSelectionComponent: () => CheckboxSelectionComponent,\n ClientSideRowModelSteps: () => ClientSideRowModelSteps,\n ClipboardModule: () => ClipboardModule,\n Column: () => Column,\n ColumnApi: () => ColumnApi,\n ColumnFactory: () => ColumnFactory,\n ColumnGroup: () => ColumnGroup,\n ColumnKeyCreator: () => ColumnKeyCreator,\n ColumnModel: () => ColumnModel,\n ColumnsToolPanelModule: () => ColumnsToolPanelModule,\n Component: () => Component64,\n ComponentUtil: () => ComponentUtil,\n Context: () => Context,\n CssClassApplier: () => CssClassApplier4,\n CssClassManager: () => CssClassManager,\n CtrlsService: () => CtrlsService,\n DataTypeService: () => DataTypeService,\n DateCellEditor: () => DateCellEditor,\n DateFilter: () => DateFilter,\n DateStringCellEditor: () => DateStringCellEditor,\n DisplayedGroupCreator: () => DisplayedGroupCreator,\n DragAndDropService: () => DragAndDropService7,\n DragService: () => DragService,\n DragSourceType: () => DragSourceType6,\n EnterpriseCoreModule: () => EnterpriseCoreModule,\n Environment: () => Environment,\n EventService: () => EventService3,\n Events: () => Events41,\n ExcelExportModule: () => ExcelExportModule,\n ExcelFactoryMode: () => ExcelFactoryMode2,\n ExpansionService: () => ExpansionService2,\n ExpressionService: () => ExpressionService,\n FilterManager: () => FilterManager,\n FilterWrapperComp: () => FilterWrapperComp4,\n FiltersToolPanelModule: () => FiltersToolPanelModule,\n FloatingFilterMapper: () => FloatingFilterMapper,\n FocusService: () => FocusService,\n GROUP_AUTO_COLUMN_ID: () => GROUP_AUTO_COLUMN_ID3,\n Grid: () => Grid,\n GridApi: () => GridApi2,\n GridBodyComp: () => GridBodyComp,\n GridBodyCtrl: () => GridBodyCtrl,\n GridChartsModule: () => GridChartsModule,\n GridComp: () => GridComp,\n GridCoreCreator: () => GridCoreCreator,\n GridCtrl: () => GridCtrl,\n GridHeaderComp: () => GridHeaderComp,\n GridHeaderCtrl: () => GridHeaderCtrl,\n GridOptionsService: () => GridOptionsService,\n GroupCellRenderer: () => GroupCellRenderer,\n GroupCellRendererCtrl: () => GroupCellRendererCtrl,\n GroupInstanceIdCreator: () => GroupInstanceIdCreator,\n HeaderCellCtrl: () => HeaderCellCtrl,\n HeaderFilterCellComp: () => HeaderFilterCellComp,\n HeaderFilterCellCtrl: () => HeaderFilterCellCtrl,\n HeaderGroupCellCtrl: () => HeaderGroupCellCtrl,\n HeaderNavigationDirection: () => HeaderNavigationDirection,\n HeaderNavigationService: () => HeaderNavigationService,\n HeaderPositionUtils: () => HeaderPositionUtils,\n HeaderRowComp: () => HeaderRowComp,\n HeaderRowContainerComp: () => HeaderRowContainerComp,\n HeaderRowContainerCtrl: () => HeaderRowContainerCtrl,\n HeaderRowCtrl: () => HeaderRowCtrl,\n HeaderRowType: () => HeaderRowType,\n HorizontalDirection: () => HorizontalDirection,\n HorizontalResizeService: () => HorizontalResizeService,\n KeyCode: () => KeyCode12,\n LargeTextCellEditor: () => LargeTextCellEditor,\n LayoutCssClasses: () => LayoutCssClasses,\n LicenseManager: () => GridLicenseManager,\n LocaleService: () => LocaleService,\n Logger: () => Logger,\n LoggerFactory: () => LoggerFactory,\n ManagedFocusFeature: () => ManagedFocusFeature2,\n MasterDetailModule: () => MasterDetailModule,\n MenuModule: () => MenuModule,\n MenuService: () => MenuService,\n ModuleNames: () => ModuleNames20,\n ModuleRegistry: () => ModuleRegistry8,\n MouseEventService: () => MouseEventService,\n MoveColumnFeature: () => MoveColumnFeature,\n MultiFilter: () => MultiFilter,\n MultiFilterModule: () => MultiFilterModule,\n NavigationService: () => NavigationService,\n NumberCellEditor: () => NumberCellEditor,\n NumberFilter: () => NumberFilter,\n NumberSequence: () => NumberSequence2,\n Optional: () => Optional8,\n PaginationProxy: () => PaginationProxy,\n PillDragComp: () => PillDragComp3,\n PillDropZonePanel: () => PillDropZonePanel3,\n PinnedRowModel: () => PinnedRowModel,\n PivotDropZonePanel: () => PivotDropZonePanel,\n PopupComponent: () => PopupComponent2,\n PopupEditorWrapper: () => PopupEditorWrapper,\n PopupService: () => PopupService,\n PositionableFeature: () => PositionableFeature2,\n PostConstruct: () => PostConstruct77,\n PreConstruct: () => PreConstruct4,\n PreDestroy: () => PreDestroy9,\n PrimaryColsPanel: () => PrimaryColsPanel,\n PropertyKeys: () => PropertyKeys,\n ProvidedColumnGroup: () => ProvidedColumnGroup6,\n ProvidedFilter: () => ProvidedFilter3,\n Qualifier: () => Qualifier,\n QuerySelector: () => QuerySelector,\n RangeSelectionModule: () => RangeSelectionModule,\n RefSelector: () => RefSelector38,\n ResizeObserverService: () => ResizeObserverService,\n RichSelectModule: () => RichSelectModule,\n RowAnimationCssClasses: () => RowAnimationCssClasses,\n RowContainerComp: () => RowContainerComp,\n RowContainerCtrl: () => RowContainerCtrl,\n RowContainerName: () => RowContainerName,\n RowContainerType: () => RowContainerType,\n RowCtrl: () => RowCtrl,\n RowGroupDropZonePanel: () => RowGroupDropZonePanel,\n RowGroupingModule: () => RowGroupingModule,\n RowHighlightPosition: () => RowHighlightPosition,\n RowNode: () => RowNode3,\n RowNodeBlock: () => RowNodeBlock2,\n RowNodeBlockLoader: () => RowNodeBlockLoader,\n RowNodeSorter: () => RowNodeSorter,\n RowPositionUtils: () => RowPositionUtils2,\n RowRenderer: () => RowRenderer,\n ScalarFilter: () => ScalarFilter,\n ScrollVisibleService: () => ScrollVisibleService,\n SelectCellEditor: () => SelectCellEditor,\n SelectableService: () => SelectableService,\n SelectionHandleType: () => SelectionHandleType5,\n ServerSideRowModelModule: () => ServerSideRowModelModule,\n ServerSideTransactionResultStatus: () => ServerSideTransactionResultStatus4,\n SetFilter: () => SetFilter,\n SetFilterModule: () => SetFilterModule,\n SetLeftFeature: () => SetLeftFeature,\n SideBarModule: () => SideBarModule,\n SimpleFilter: () => SimpleFilter,\n SortController: () => SortController,\n SortIndicatorComp: () => SortIndicatorComp,\n SparklinesModule: () => SparklinesModule,\n StandardMenuFactory: () => StandardMenuFactory,\n StatusBarModule: () => StatusBarModule,\n StylingService: () => StylingService,\n TabGuardClassNames: () => TabGuardClassNames,\n TabGuardComp: () => TabGuardComp5,\n TabGuardCtrl: () => TabGuardCtrl,\n TabbedLayout: () => TabbedLayout3,\n TextCellEditor: () => TextCellEditor,\n TextFilter: () => TextFilter2,\n TextFloatingFilter: () => TextFloatingFilter,\n Timer: () => Timer,\n ToolPanelColDefService: () => ToolPanelColDefService,\n TooltipFeature: () => TooltipFeature4,\n TooltipStateManager: () => TooltipStateManager,\n TouchListener: () => TouchListener2,\n UserComponentFactory: () => UserComponentFactory2,\n UserComponentRegistry: () => UserComponentRegistry,\n ValueCache: () => ValueCache,\n ValueService: () => ValueService2,\n ValuesDropZonePanel: () => ValuesDropZonePanel,\n VanillaFrameworkOverrides: () => VanillaFrameworkOverrides,\n VerticalDirection: () => VerticalDirection,\n ViewportRowModelModule: () => ViewportRowModelModule,\n VirtualList: () => VirtualList5,\n VirtualListDragFeature: () => VirtualListDragFeature3,\n _: () => _76,\n __FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT: () => __FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT,\n agCharts: () => agCharts,\n createGrid: () => createGrid2,\n exportMultipleSheetsAsExcel: () => exportMultipleSheetsAsExcel,\n getMultipleSheetsAsExcel: () => getMultipleSheetsAsExcel,\n getRowContainerTypeForName: () => getRowContainerTypeForName,\n provideGlobalGridOptions: () => provideGlobalGridOptions\n});\nimport { ModuleRegistry as ModuleRegistry7 } from \"ag-grid-community\";\nimport { ClientSideRowModelModule } from \"ag-grid-community\";\nimport { InfiniteRowModelModule } from \"ag-grid-community\";\nimport { CsvExportModule as CsvExportModule3 } from \"ag-grid-community\";\n\n// enterprise-modules/advanced-filter/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames2 } from \"ag-grid-community\";\n\n// enterprise-modules/core/src/agGridEnterpriseModule.ts\nimport { ModuleNames } from \"ag-grid-community\";\n\n// enterprise-modules/core/src/license/gridLicenseManager.ts\nimport { Bean, BeanStub, PreConstruct } from \"ag-grid-community\";\n\n// enterprise-modules/core/src/license/shared/md5.ts\nvar MD5 = class {\n constructor() {\n this.ieCompatibility = false;\n }\n init() {\n this.ieCompatibility = this.md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n }\n md5cycle(x, k) {\n let a = x[0], b = x[1], c = x[2], d = x[3];\n a = this.ff(a, b, c, d, k[0], 7, -680876936);\n d = this.ff(d, a, b, c, k[1], 12, -389564586);\n c = this.ff(c, d, a, b, k[2], 17, 606105819);\n b = this.ff(b, c, d, a, k[3], 22, -1044525330);\n a = this.ff(a, b, c, d, k[4], 7, -176418897);\n d = this.ff(d, a, b, c, k[5], 12, 1200080426);\n c = this.ff(c, d, a, b, k[6], 17, -1473231341);\n b = this.ff(b, c, d, a, k[7], 22, -45705983);\n a = this.ff(a, b, c, d, k[8], 7, 1770035416);\n d = this.ff(d, a, b, c, k[9], 12, -1958414417);\n c = this.ff(c, d, a, b, k[10], 17, -42063);\n b = this.ff(b, c, d, a, k[11], 22, -1990404162);\n a = this.ff(a, b, c, d, k[12], 7, 1804603682);\n d = this.ff(d, a, b, c, k[13], 12, -40341101);\n c = this.ff(c, d, a, b, k[14], 17, -1502002290);\n b = this.ff(b, c, d, a, k[15], 22, 1236535329);\n a = this.gg(a, b, c, d, k[1], 5, -165796510);\n d = this.gg(d, a, b, c, k[6], 9, -1069501632);\n c = this.gg(c, d, a, b, k[11], 14, 643717713);\n b = this.gg(b, c, d, a, k[0], 20, -373897302);\n a = this.gg(a, b, c, d, k[5], 5, -701558691);\n d = this.gg(d, a, b, c, k[10], 9, 38016083);\n c = this.gg(c, d, a, b, k[15], 14, -660478335);\n b = this.gg(b, c, d, a, k[4], 20, -405537848);\n a = this.gg(a, b, c, d, k[9], 5, 568446438);\n d = this.gg(d, a, b, c, k[14], 9, -1019803690);\n c = this.gg(c, d, a, b, k[3], 14, -187363961);\n b = this.gg(b, c, d, a, k[8], 20, 1163531501);\n a = this.gg(a, b, c, d, k[13], 5, -1444681467);\n d = this.gg(d, a, b, c, k[2], 9, -51403784);\n c = this.gg(c, d, a, b, k[7], 14, 1735328473);\n b = this.gg(b, c, d, a, k[12], 20, -1926607734);\n a = this.hh(a, b, c, d, k[5], 4, -378558);\n d = this.hh(d, a, b, c, k[8], 11, -2022574463);\n c = this.hh(c, d, a, b, k[11], 16, 1839030562);\n b = this.hh(b, c, d, a, k[14], 23, -35309556);\n a = this.hh(a, b, c, d, k[1], 4, -1530992060);\n d = this.hh(d, a, b, c, k[4], 11, 1272893353);\n c = this.hh(c, d, a, b, k[7], 16, -155497632);\n b = this.hh(b, c, d, a, k[10], 23, -1094730640);\n a = this.hh(a, b, c, d, k[13], 4, 681279174);\n d = this.hh(d, a, b, c, k[0], 11, -358537222);\n c = this.hh(c, d, a, b, k[3], 16, -722521979);\n b = this.hh(b, c, d, a, k[6], 23, 76029189);\n a = this.hh(a, b, c, d, k[9], 4, -640364487);\n d = this.hh(d, a, b, c, k[12], 11, -421815835);\n c = this.hh(c, d, a, b, k[15], 16, 530742520);\n b = this.hh(b, c, d, a, k[2], 23, -995338651);\n a = this.ii(a, b, c, d, k[0], 6, -198630844);\n d = this.ii(d, a, b, c, k[7], 10, 1126891415);\n c = this.ii(c, d, a, b, k[14], 15, -1416354905);\n b = this.ii(b, c, d, a, k[5], 21, -57434055);\n a = this.ii(a, b, c, d, k[12], 6, 1700485571);\n d = this.ii(d, a, b, c, k[3], 10, -1894986606);\n c = this.ii(c, d, a, b, k[10], 15, -1051523);\n b = this.ii(b, c, d, a, k[1], 21, -2054922799);\n a = this.ii(a, b, c, d, k[8], 6, 1873313359);\n d = this.ii(d, a, b, c, k[15], 10, -30611744);\n c = this.ii(c, d, a, b, k[6], 15, -1560198380);\n b = this.ii(b, c, d, a, k[13], 21, 1309151649);\n a = this.ii(a, b, c, d, k[4], 6, -145523070);\n d = this.ii(d, a, b, c, k[11], 10, -1120210379);\n c = this.ii(c, d, a, b, k[2], 15, 718787259);\n b = this.ii(b, c, d, a, k[9], 21, -343485551);\n x[0] = this.add32(a, x[0]);\n x[1] = this.add32(b, x[1]);\n x[2] = this.add32(c, x[2]);\n x[3] = this.add32(d, x[3]);\n }\n cmn(q, a, b, x, s, t) {\n a = this.add32(this.add32(a, q), this.add32(x, t));\n return this.add32(a << s | a >>> 32 - s, b);\n }\n ff(a, b, c, d, x, s, t) {\n return this.cmn(b & c | ~b & d, a, b, x, s, t);\n }\n gg(a, b, c, d, x, s, t) {\n return this.cmn(b & d | c & ~d, a, b, x, s, t);\n }\n hh(a, b, c, d, x, s, t) {\n return this.cmn(b ^ c ^ d, a, b, x, s, t);\n }\n ii(a, b, c, d, x, s, t) {\n return this.cmn(c ^ (b | ~d), a, b, x, s, t);\n }\n md51(s) {\n const n = s.length;\n const state = [1732584193, -271733879, -1732584194, 271733878];\n let i;\n for (i = 64; i <= s.length; i += 64) {\n this.md5cycle(state, this.md5blk(s.substring(i - 64, i)));\n }\n s = s.substring(i - 64);\n const tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n for (i = 0; i < s.length; i++) {\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n this.md5cycle(state, tail);\n for (i = 0; i < 16; i++) {\n tail[i] = 0;\n }\n }\n tail[14] = n * 8;\n this.md5cycle(state, tail);\n return state;\n }\n /* there needs to be support for Unicode here, * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise I suthis.ggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8 8-bit unsigned value arrays.\n */\n md5blk(s) {\n const md5blks = [];\n for (let i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n }\n return md5blks;\n }\n rhex(n) {\n const hex_chr = \"0123456789abcdef\".split(\"\");\n let s = \"\", j = 0;\n for (; j < 4; j++) {\n s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n }\n return s;\n }\n hex(x) {\n for (let i = 0; i < x.length; i++) {\n x[i] = this.rhex(x[i]);\n }\n return x.join(\"\");\n }\n md5(s) {\n return this.hex(this.md51(s));\n }\n add32(a, b) {\n return this.ieCompatibility ? this.add32Compat(a, b) : this.add32Std(a, b);\n }\n /* this function is much faster, so if possible we use it. Some IEs are the only ones I know of that\n need the idiotic second function, generated by an if clause. */\n add32Std(a, b) {\n return a + b & 4294967295;\n }\n add32Compat(x, y) {\n const lsw = (x & 65535) + (y & 65535), msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n};\n\n// enterprise-modules/core/src/license/shared/licenseManager.ts\nfunction missingOrEmpty(value) {\n return value == null || value.length === 0;\n}\nvar LICENSE_TYPES = {\n \"01\": \"GRID\",\n \"02\": \"CHARTS\",\n \"0102\": \"BOTH\"\n};\nvar _LicenseManager = class _LicenseManager {\n constructor(document2) {\n this.watermarkMessage = void 0;\n this.totalMessageLength = 124;\n this.document = document2;\n this.md5 = new MD5();\n this.md5.init();\n }\n validateLicense() {\n const licenseDetails = this.getLicenseDetails(_LicenseManager.licenseKey);\n const currentLicenseName = `AG Grid ${licenseDetails.currentLicenseType === \"BOTH\" ? \"and AG Charts \" : \"\"}Enterprise`;\n const suppliedLicenseName = licenseDetails.suppliedLicenseType === void 0 ? \"\" : `AG ${licenseDetails.suppliedLicenseType === \"BOTH\" ? \"Grid and AG Charts\" : licenseDetails.suppliedLicenseType === \"GRID\" ? \"Grid\" : \"Charts\"} Enterprise`;\n if (licenseDetails.missing) {\n if (!this.isWebsiteUrl() || this.isForceWatermark()) {\n this.outputMissingLicenseKey(currentLicenseName);\n }\n } else if (licenseDetails.expired) {\n const gridReleaseDate = _LicenseManager.getGridReleaseDate();\n const formattedReleaseDate = _LicenseManager.formatDate(gridReleaseDate);\n this.outputExpiredKey(licenseDetails.expiry, formattedReleaseDate, currentLicenseName, suppliedLicenseName);\n } else if (!licenseDetails.valid) {\n this.outputInvalidLicenseKey(!!licenseDetails.incorrectLicenseType, currentLicenseName, suppliedLicenseName);\n } else if (licenseDetails.isTrial && licenseDetails.trialExpired) {\n this.outputExpiredTrialKey(licenseDetails.expiry, currentLicenseName, suppliedLicenseName);\n }\n }\n static extractExpiry(license) {\n const restrictionHashed = license.substring(license.lastIndexOf(\"_\") + 1, license.length);\n return new Date(parseInt(_LicenseManager.decode(restrictionHashed), 10));\n }\n static extractLicenseComponents(licenseKey) {\n let cleanedLicenseKey = licenseKey.replace(/[\\u200B-\\u200D\\uFEFF]/g, \"\");\n cleanedLicenseKey = cleanedLicenseKey.replace(/\\r?\\n|\\r/g, \"\");\n if (licenseKey.length <= 32) {\n return { md5: null, license: licenseKey, version: null, isTrial: null };\n }\n const hashStart = cleanedLicenseKey.length - 32;\n const md5 = cleanedLicenseKey.substring(hashStart);\n const license = cleanedLicenseKey.substring(0, hashStart);\n const [version, isTrial, type] = _LicenseManager.extractBracketedInformation(cleanedLicenseKey);\n return { md5, license, version, isTrial, type };\n }\n getLicenseDetails(licenseKey) {\n const currentLicenseType = _LicenseManager.chartsLicenseManager ? \"BOTH\" : \"GRID\";\n if (missingOrEmpty(licenseKey)) {\n return {\n licenseKey,\n valid: false,\n missing: true,\n currentLicenseType\n };\n }\n const gridReleaseDate = _LicenseManager.getGridReleaseDate();\n const { md5, license, version, isTrial, type } = _LicenseManager.extractLicenseComponents(licenseKey);\n let valid = md5 === this.md5.md5(license) && licenseKey.indexOf(\"For_Trialing_ag-Grid_Only\") === -1;\n let trialExpired = void 0;\n let expired = void 0;\n let expiry = null;\n let incorrectLicenseType = false;\n let suppliedLicenseType = void 0;\n function handleTrial() {\n const now = /* @__PURE__ */ new Date();\n trialExpired = expiry < now;\n expired = void 0;\n }\n if (valid) {\n expiry = _LicenseManager.extractExpiry(license);\n valid = !isNaN(expiry.getTime());\n if (valid) {\n expired = gridReleaseDate > expiry;\n switch (version) {\n case \"legacy\":\n case \"2\": {\n if (isTrial) {\n handleTrial();\n }\n break;\n }\n case \"3\": {\n if (missingOrEmpty(type)) {\n valid = false;\n } else {\n suppliedLicenseType = type;\n if (type !== LICENSE_TYPES[\"01\"] && type !== LICENSE_TYPES[\"0102\"] || currentLicenseType === \"BOTH\" && suppliedLicenseType !== \"BOTH\") {\n valid = false;\n incorrectLicenseType = true;\n } else if (isTrial) {\n handleTrial();\n }\n }\n }\n }\n }\n }\n if (!valid) {\n return {\n licenseKey,\n valid,\n incorrectLicenseType,\n currentLicenseType,\n suppliedLicenseType\n };\n }\n return {\n licenseKey,\n valid,\n expiry: _LicenseManager.formatDate(expiry),\n expired,\n version,\n isTrial,\n trialExpired,\n incorrectLicenseType,\n currentLicenseType,\n suppliedLicenseType\n };\n }\n isDisplayWatermark() {\n return this.isForceWatermark() || !this.isLocalhost() && !this.isWebsiteUrl() && !missingOrEmpty(this.watermarkMessage);\n }\n getWatermarkMessage() {\n return this.watermarkMessage || \"\";\n }\n getHostname() {\n const win = this.document.defaultView || window;\n const loc = win.location;\n const { hostname = \"\" } = loc;\n return hostname;\n }\n isForceWatermark() {\n const win = this.document.defaultView || window;\n const loc = win.location;\n const { pathname } = loc;\n return pathname ? pathname.indexOf(\"forceWatermark\") !== -1 : false;\n }\n isWebsiteUrl() {\n const hostname = this.getHostname();\n return hostname.match(/^((?:[\\w-]+\\.)?ag-grid\\.com)$/) !== null;\n }\n isLocalhost() {\n const hostname = this.getHostname();\n return hostname.match(/^(?:127\\.0\\.0\\.1|localhost)$/) !== null;\n }\n static formatDate(date) {\n const monthNames = [\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 const day = date.getDate();\n const monthIndex = date.getMonth();\n const year = date.getFullYear();\n return day + \" \" + monthNames[monthIndex] + \" \" + year;\n }\n static getGridReleaseDate() {\n return new Date(parseInt(_LicenseManager.decode(_LicenseManager.RELEASE_INFORMATION), 10));\n }\n static decode(input) {\n const keystr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let t = \"\";\n let n, r, i;\n let s, o, u, a;\n let f = 0;\n const e = input.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = keystr.indexOf(e.charAt(f++));\n o = keystr.indexOf(e.charAt(f++));\n u = keystr.indexOf(e.charAt(f++));\n a = keystr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u != 64) {\n t = t + String.fromCharCode(r);\n }\n if (a != 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = _LicenseManager.utf8_decode(t);\n return t;\n }\n static utf8_decode(input) {\n input = input.replace(/rn/g, \"n\");\n let t = \"\";\n for (let n = 0; n < input.length; n++) {\n const r = input.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n static setChartsLicenseManager(dependantLicenseManager) {\n this.chartsLicenseManager = dependantLicenseManager;\n }\n static setLicenseKey(licenseKey) {\n this.licenseKey = licenseKey;\n if (this.chartsLicenseManager) {\n this.chartsLicenseManager.setLicenseKey(licenseKey, true);\n }\n }\n static extractBracketedInformation(licenseKey) {\n if (!licenseKey.includes(\"[\")) {\n return [\"legacy\", false, void 0];\n }\n const matches = licenseKey.match(/\\[(.*?)\\]/g).map((match) => match.replace(\"[\", \"\").replace(\"]\", \"\"));\n if (!matches || matches.length === 0) {\n return [\"legacy\", false, void 0];\n }\n const isTrial = matches.filter((match) => match === \"TRIAL\").length === 1;\n const rawVersion = matches.filter((match) => match.indexOf(\"v\") === 0)[0];\n const version = rawVersion ? rawVersion.replace(\"v\", \"\") : \"legacy\";\n const type = LICENSE_TYPES[matches.filter((match) => LICENSE_TYPES[match])[0]];\n return [version, isTrial, type];\n }\n centerPadAndOutput(input) {\n const paddingRequired = this.totalMessageLength - input.length;\n console.error(input.padStart(paddingRequired / 2 + input.length, \"*\").padEnd(this.totalMessageLength, \"*\"));\n }\n padAndOutput(input, padding = \"*\", terminateWithPadding = \"\") {\n console.error(input.padEnd(this.totalMessageLength - terminateWithPadding.length, padding) + terminateWithPadding);\n }\n outputInvalidLicenseKey(incorrectLicenseType, currentLicenseName, suppliedLicenseName) {\n if (incorrectLicenseType) {\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(` ${currentLicenseName} License `);\n this.centerPadAndOutput(\" Incompatible License Key \");\n this.padAndOutput(`* Your license key is for ${suppliedLicenseName} only and does not cover you for ${currentLicenseName}.`, \" \", \"*\");\n this.padAndOutput(\"* Please contact info@ag-grid.com to obtain a combined license key.\", \" \", \"*\");\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(\"\");\n } else {\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(` ${currentLicenseName} License `);\n this.centerPadAndOutput(\" Invalid License Key \");\n this.padAndOutput(`* Your license key is not valid - please contact info@ag-grid.com to obtain a valid license.`, \" \", \"*\");\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(\"\");\n }\n this.watermarkMessage = \"Invalid License\";\n }\n outputExpiredTrialKey(formattedExpiryDate, currentLicenseName, suppliedLicenseName) {\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(` ${currentLicenseName} License `);\n this.centerPadAndOutput(\" Trial Period Expired. \");\n this.padAndOutput(`* Your trial only license for ${suppliedLicenseName} expired on ${formattedExpiryDate}.`, \" \", \"*\");\n this.padAndOutput(\"* Please email info@ag-grid.com to purchase a license.\", \" \", \"*\");\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(\"\");\n this.watermarkMessage = \"Trial Period Expired\";\n }\n outputMissingLicenseKey(currentLicenseName) {\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(` ${currentLicenseName} License `);\n this.centerPadAndOutput(\" License Key Not Found \");\n this.padAndOutput(`* All ${currentLicenseName} features are unlocked for trial.`, \" \", \"*\");\n this.padAndOutput(\"* If you want to hide the watermark please email info@ag-grid.com for a trial license key.\", \" \", \"*\");\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(\"\");\n this.watermarkMessage = \"For Trial Use Only\";\n }\n outputExpiredKey(formattedExpiryDate, formattedReleaseDate, currentLicenseName, suppliedLicenseName) {\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(` ${currentLicenseName} License `);\n this.centerPadAndOutput(\" Incompatible Software Version \");\n this.padAndOutput(`* Your license key works with versions of ${suppliedLicenseName} released before ${formattedExpiryDate}.`, \" \", \"*\");\n this.padAndOutput(`* The version you are trying to use was released on ${formattedReleaseDate}.`, \" \", \"*\");\n this.padAndOutput(\"* Please contact info@ag-grid.com to renew your license key.\", \" \", \"*\");\n this.centerPadAndOutput(\"\");\n this.centerPadAndOutput(\"\");\n this.watermarkMessage = \"License Expired\";\n }\n};\n_LicenseManager.RELEASE_INFORMATION = \"MTcxNTc3NTcyODYxNg==\";\nvar LicenseManager = _LicenseManager;\n\n// enterprise-modules/core/src/license/gridLicenseManager.ts\nvar GridLicenseManager = class extends BeanStub {\n validateLicense() {\n this.licenseManager = new LicenseManager(this.gos.getDocument());\n this.licenseManager.validateLicense();\n }\n static getLicenseDetails(licenseKey) {\n return new LicenseManager(null).getLicenseDetails(licenseKey);\n }\n isDisplayWatermark() {\n return this.licenseManager.isDisplayWatermark();\n }\n getWatermarkMessage() {\n return this.licenseManager.getWatermarkMessage();\n }\n static setLicenseKey(licenseKey) {\n LicenseManager.setLicenseKey(licenseKey);\n }\n static setChartsLicenseManager(chartsLicenseManager) {\n LicenseManager.setChartsLicenseManager(chartsLicenseManager);\n }\n};\n__decorateClass([\n PreConstruct\n], GridLicenseManager.prototype, \"validateLicense\", 1);\nGridLicenseManager = __decorateClass([\n Bean(\"licenseManager\")\n], GridLicenseManager);\n\n// enterprise-modules/core/src/license/watermark.ts\nimport { Autowired as Autowired2, Component, PostConstruct, RefSelector } from \"ag-grid-community\";\nvar WatermarkComp = class extends Component {\n constructor() {\n super(\n /* html*/\n `
\n
\n
`\n );\n }\n postConstruct() {\n const show = this.shouldDisplayWatermark();\n this.setDisplayed(show);\n if (show) {\n this.eLicenseTextRef.innerText = this.licenseManager.getWatermarkMessage();\n window.setTimeout(() => this.addCssClass(\"ag-opacity-zero\"), 0);\n window.setTimeout(() => this.setDisplayed(false), 5e3);\n }\n }\n shouldDisplayWatermark() {\n return this.licenseManager.isDisplayWatermark();\n }\n};\n__decorateClass([\n Autowired2(\"licenseManager\")\n], WatermarkComp.prototype, \"licenseManager\", 2);\n__decorateClass([\n RefSelector(\"eLicenseTextRef\")\n], WatermarkComp.prototype, \"eLicenseTextRef\", 2);\n__decorateClass([\n PostConstruct\n], WatermarkComp.prototype, \"postConstruct\", 1);\n\n// enterprise-modules/core/src/version.ts\nvar VERSION = \"31.3.2\";\n\n// enterprise-modules/core/src/agGridEnterpriseModule.ts\nvar EnterpriseCoreModule = {\n version: VERSION,\n moduleName: ModuleNames.EnterpriseCoreModule,\n beans: [GridLicenseManager],\n agStackComponents: [\n { componentName: \"AgWatermark\", componentClass: WatermarkComp }\n ]\n};\n\n// enterprise-modules/advanced-filter/dist/package/main.esm.mjs\nimport {\n AgAutocomplete,\n Autowired as Autowired9,\n Component as Component8,\n PostConstruct as PostConstruct9,\n RefSelector as RefSelector5,\n _ as _12\n} from \"ag-grid-community\";\nimport {\n AgDialog,\n Autowired as Autowired8,\n BeanStub as BeanStub3,\n Events as Events5,\n PostConstruct as PostConstruct8,\n _ as _11\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired3,\n Component as Component2,\n Events,\n KeyCode,\n PostConstruct as PostConstruct2,\n _ as _2\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired7,\n Component as Component7,\n PostConstruct as PostConstruct7,\n RefSelector as RefSelector4,\n TooltipFeature as TooltipFeature3,\n VirtualList as VirtualList3,\n _ as _10\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired5,\n DragAndDropService,\n DragSourceType as DragSourceType2,\n Events as Events3,\n KeyCode as KeyCode4,\n PostConstruct as PostConstruct5,\n RefSelector as RefSelector2,\n TabGuardComp,\n TooltipFeature,\n _ as _8\n} from \"ag-grid-community\";\nimport { AgRichSelect, _ as _22 } from \"ag-grid-community\";\nimport {\n BeanStub as BeanStub2,\n DragSourceType,\n PostConstruct as PostConstruct22,\n VirtualListDragFeature\n} from \"ag-grid-community\";\nimport { BeanStub as BeanStub22, KeyCode as KeyCode2, PostConstruct as PostConstruct3, _ as _3 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired22,\n Component as Component3,\n _ as _4\n} from \"ag-grid-community\";\nimport {\n AgInputDateField,\n AgInputNumberField,\n AgInputTextField,\n Autowired as Autowired32,\n Component as Component4,\n Events as Events2,\n KeyCode as KeyCode3,\n PostConstruct as PostConstruct4,\n RefSelector as RefSelector3,\n _ as _5\n} from \"ag-grid-community\";\nimport { Autowired as Autowired4, Component as Component5 } from \"ag-grid-community\";\nimport { AgRichSelect as AgRichSelect2, _ as _7 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired6,\n Component as Component6,\n Events as Events4,\n PostConstruct as PostConstruct6,\n RefSelector as RefSelector32,\n TooltipFeature as TooltipFeature2,\n _ as _9\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired10,\n Bean as Bean2,\n BeanStub as BeanStub4,\n PostConstruct as PostConstruct10,\n _ as _13\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired11,\n Bean as Bean22,\n BeanStub as BeanStub5,\n Events as Events6,\n PostConstruct as PostConstruct11,\n _ as _14\n} from \"ag-grid-community\";\nvar __defProp2 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp2.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __decorateClass2 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc2(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp2(target, key, result);\n return result;\n};\nvar AdvancedFilterHeaderComp = class extends Component2 {\n constructor(enabled) {\n super(\n /* html */\n `\n
\n
`\n );\n this.enabled = enabled;\n }\n postConstruct() {\n this.setupAdvancedFilter(this.enabled);\n this.addDestroyFunc(() => this.destroyBean(this.eAdvancedFilter));\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, () => this.onGridColumnsChanged());\n this.addGuiEventListener(\"keydown\", (event) => this.onKeyDown(event));\n this.addGuiEventListener(\"focusout\", (event) => {\n if (!this.getFocusableElement().contains(event.relatedTarget)) {\n this.focusService.clearAdvancedFilterColumn();\n }\n });\n }\n getFocusableElement() {\n var _a, _b;\n return (_b = (_a = this.eAdvancedFilter) == null ? void 0 : _a.getGui()) != null ? _b : this.getGui();\n }\n setEnabled(enabled) {\n if (enabled === this.enabled) {\n return;\n }\n this.setupAdvancedFilter(enabled);\n }\n refresh() {\n var _a;\n (_a = this.eAdvancedFilter) == null ? void 0 : _a.refresh();\n }\n getHeight() {\n return this.height;\n }\n setInputDisabled(disabled) {\n var _a;\n (_a = this.eAdvancedFilter) == null ? void 0 : _a.setInputDisabled(disabled);\n }\n setupAdvancedFilter(enabled) {\n const eGui = this.getGui();\n if (enabled) {\n this.eAdvancedFilter = this.createBean(new AdvancedFilterComp());\n const eAdvancedFilterGui = this.eAdvancedFilter.getGui();\n this.eAdvancedFilter.addCssClass(\"ag-advanced-filter-header-cell\");\n this.height = this.columnModel.getFloatingFiltersHeight();\n const height = `${this.height}px`;\n eGui.style.height = height;\n eGui.style.minHeight = height;\n this.setAriaRowIndex();\n _2.setAriaRole(eAdvancedFilterGui, \"gridcell\");\n _2.setAriaColIndex(eAdvancedFilterGui, 1);\n this.setAriaColumnCount(eAdvancedFilterGui);\n eGui.appendChild(eAdvancedFilterGui);\n } else {\n _2.clearElement(eGui);\n this.destroyBean(this.eAdvancedFilter);\n this.height = 0;\n }\n _2.setDisplayed(eGui, enabled);\n this.enabled = enabled;\n }\n setAriaColumnCount(eAdvancedFilterGui) {\n _2.setAriaColSpan(eAdvancedFilterGui, this.columnModel.getAllGridColumns().length);\n }\n setAriaRowIndex() {\n _2.setAriaRowIndex(this.getGui(), this.headerNavigationService.getHeaderRowCount());\n }\n onGridColumnsChanged() {\n if (!this.eAdvancedFilter) {\n return;\n }\n this.setAriaColumnCount(this.eAdvancedFilter.getGui());\n this.setAriaRowIndex();\n }\n onKeyDown(event) {\n switch (event.key) {\n case KeyCode.ENTER: {\n if (this.hasFocus()) {\n if (this.focusService.focusInto(this.getFocusableElement())) {\n event.preventDefault();\n }\n }\n break;\n }\n case KeyCode.ESCAPE:\n if (!this.hasFocus()) {\n this.getFocusableElement().focus();\n }\n break;\n case KeyCode.UP:\n this.navigateUpDown(true, event);\n break;\n case KeyCode.DOWN:\n this.navigateUpDown(false, event);\n break;\n case KeyCode.TAB:\n if (this.hasFocus()) {\n this.navigateLeftRight(event);\n } else {\n const nextFocusableEl = this.focusService.findNextFocusableElement(this.getFocusableElement(), null, event.shiftKey);\n if (nextFocusableEl) {\n event.preventDefault();\n nextFocusableEl.focus();\n } else {\n this.navigateLeftRight(event);\n }\n }\n break;\n }\n }\n navigateUpDown(backwards, event) {\n if (this.hasFocus()) {\n if (this.focusService.focusNextFromAdvancedFilter(backwards)) {\n event.preventDefault();\n }\n ;\n }\n }\n navigateLeftRight(event) {\n if (event.shiftKey ? this.focusService.focusLastHeader() : this.focusService.focusNextFromAdvancedFilter(false, true)) {\n event.preventDefault();\n }\n }\n hasFocus() {\n return this.gos.getActiveDomElement() === this.getFocusableElement();\n }\n};\n__decorateClass2([\n Autowired3(\"columnModel\")\n], AdvancedFilterHeaderComp.prototype, \"columnModel\", 2);\n__decorateClass2([\n Autowired3(\"focusService\")\n], AdvancedFilterHeaderComp.prototype, \"focusService\", 2);\n__decorateClass2([\n Autowired3(\"headerNavigationService\")\n], AdvancedFilterHeaderComp.prototype, \"headerNavigationService\", 2);\n__decorateClass2([\n PostConstruct2\n], AdvancedFilterHeaderComp.prototype, \"postConstruct\", 1);\nvar AddDropdownComp = class extends AgRichSelect {\n constructor(params) {\n super(__spreadProps(__spreadValues({}, params), {\n template: (\n /* html */\n `\n
\n
\n
\n
\n \n
\n
\n
`\n )\n }));\n this.params = params;\n }\n showPicker() {\n setTimeout(() => super.showPicker());\n }\n hidePicker() {\n setTimeout(() => super.hidePicker());\n }\n postConstruct() {\n super.postConstruct();\n const { wrapperClassName, ariaLabel } = this.params;\n _22.setDisplayed(this.eDisplayField, false);\n if (wrapperClassName) {\n this.eWrapper.classList.add(wrapperClassName);\n }\n _22.setAriaLabelledBy(this.eWrapper, \"\");\n _22.setAriaLabel(this.eWrapper, ariaLabel);\n }\n onEnterKeyDown(event) {\n _22.stopPropagationForAgGrid(event);\n if (this.isPickerDisplayed) {\n super.onEnterKeyDown(event);\n } else {\n event.preventDefault();\n this.showPicker();\n }\n }\n};\nvar _AdvancedFilterBuilderDragFeature = class _AdvancedFilterBuilderDragFeature2 extends BeanStub2 {\n constructor(comp, virtualList) {\n super();\n this.comp = comp;\n this.virtualList = virtualList;\n }\n postConstruct() {\n this.createManagedBean(new VirtualListDragFeature(\n this.comp,\n this.virtualList,\n {\n dragSourceType: DragSourceType.AdvancedFilterBuilder,\n listItemDragStartEvent: _AdvancedFilterBuilderDragFeature2.EVENT_DRAG_STARTED,\n listItemDragEndEvent: _AdvancedFilterBuilderDragFeature2.EVENT_DRAG_ENDED,\n eventSource: this,\n getCurrentDragValue: (listItemDragStartEvent) => this.getCurrentDragValue(listItemDragStartEvent),\n isMoveBlocked: () => false,\n getNumRows: (comp) => comp.getNumItems(),\n moveItem: (currentDragValue, lastHoveredListItem) => this.moveItem(currentDragValue, lastHoveredListItem)\n }\n ));\n }\n getCurrentDragValue(listItemDragStartEvent) {\n return listItemDragStartEvent.item;\n }\n moveItem(currentDragValue, lastHoveredListItem) {\n this.comp.moveItem(currentDragValue, lastHoveredListItem);\n }\n};\n_AdvancedFilterBuilderDragFeature.EVENT_DRAG_STARTED = \"advancedFilterBuilderDragStarted\";\n_AdvancedFilterBuilderDragFeature.EVENT_DRAG_ENDED = \"advancedFilterBuilderDragEnded\";\n__decorateClass2([\n PostConstruct22\n], _AdvancedFilterBuilderDragFeature.prototype, \"postConstruct\", 1);\nvar AdvancedFilterBuilderDragFeature = _AdvancedFilterBuilderDragFeature;\nvar AdvancedFilterBuilderItemNavigationFeature = class extends BeanStub22 {\n constructor(eGui, focusWrapper, eFocusableComp) {\n super();\n this.eGui = eGui;\n this.focusWrapper = focusWrapper;\n this.eFocusableComp = eFocusableComp;\n }\n postConstruct() {\n this.addManagedListener(this.eGui, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode2.TAB:\n if (!event.defaultPrevented) {\n _3.stopPropagationForAgGrid(event);\n }\n break;\n case KeyCode2.UP:\n case KeyCode2.DOWN:\n _3.stopPropagationForAgGrid(event);\n break;\n case KeyCode2.ESCAPE:\n if (_3.isStopPropagationForAgGrid(event)) {\n return;\n }\n if (this.eGui.contains(this.gos.getActiveDomElement())) {\n event.preventDefault();\n _3.stopPropagationForAgGrid(event);\n this.focusWrapper.focus();\n }\n break;\n }\n });\n this.addManagedListener(this.focusWrapper, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode2.ENTER:\n if (_3.isStopPropagationForAgGrid(event)) {\n return;\n }\n if (this.gos.getActiveDomElement() === this.focusWrapper) {\n event.preventDefault();\n _3.stopPropagationForAgGrid(event);\n this.eFocusableComp.getFocusableElement().focus();\n }\n break;\n }\n });\n this.addManagedListener(this.focusWrapper, \"focusin\", () => {\n this.focusWrapper.classList.add(\"ag-advanced-filter-builder-virtual-list-item-highlight\");\n });\n this.addManagedListener(this.focusWrapper, \"focusout\", (event) => {\n if (!this.focusWrapper.contains(event.relatedTarget)) {\n this.focusWrapper.classList.remove(\"ag-advanced-filter-builder-virtual-list-item-highlight\");\n }\n });\n }\n};\n__decorateClass2([\n PostConstruct3\n], AdvancedFilterBuilderItemNavigationFeature.prototype, \"postConstruct\", 1);\nfunction getAdvancedFilterBuilderAddButtonParams(translate, maxPickerWidth) {\n return {\n pickerAriaLabelKey: \"ariaLabelAdvancedFilterBuilderAddField\",\n pickerAriaLabelValue: \"Advanced Filter Builder Add Field\",\n pickerType: \"ag-list\",\n valueList: [{\n key: \"condition\",\n displayValue: translate(\"advancedFilterBuilderAddCondition\")\n }, {\n key: \"join\",\n displayValue: translate(\"advancedFilterBuilderAddJoin\")\n }],\n valueFormatter: (value) => {\n var _a;\n return value == null ? null : (_a = value.displayValue) != null ? _a : value.key;\n },\n pickerIcon: \"advancedFilterBuilderAdd\",\n maxPickerWidth: `${maxPickerWidth != null ? maxPickerWidth : 120}px`,\n wrapperClassName: \"ag-advanced-filter-builder-item-button\",\n ariaLabel: translate(\"advancedFilterBuilderAddButtonTooltip\")\n };\n}\nvar AdvancedFilterBuilderEvents = class {\n};\nAdvancedFilterBuilderEvents.EVENT_ADDED = \"advancedFilterBuilderAdded\";\nAdvancedFilterBuilderEvents.EVENT_MOVED = \"advancedFilterBuilderMoved\";\nAdvancedFilterBuilderEvents.EVENT_REMOVED = \"advancedFilterBuilderRemoved\";\nAdvancedFilterBuilderEvents.EVENT_VALUE_CHANGED = \"advancedFilterBuilderValueChanged\";\nAdvancedFilterBuilderEvents.EVENT_VALID_CHANGED = \"advancedFilterBuilderValidChanged\";\nvar ConditionPillWrapperComp = class extends Component3 {\n constructor() {\n super(\n /* html */\n `\n
\n `\n );\n this.validationMessage = null;\n }\n init(params) {\n const { item, createPill } = params;\n this.item = item;\n this.createPill = createPill;\n this.filterModel = item.filterModel;\n this.setupColumnCondition(this.filterModel);\n this.validate();\n this.addDestroyFunc(() => this.destroyBeans([this.eColumnPill, this.eOperatorPill, this.eOperandPill]));\n }\n getDragName() {\n return this.filterModel.colId ? this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel) : this.getDefaultColumnDisplayValue();\n }\n getAriaLabel() {\n return `${this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderFilterItem\")} ${this.getDragName()}`;\n }\n getValidationMessage() {\n return this.validationMessage;\n }\n getFocusableElement() {\n return this.eColumnPill.getFocusableElement();\n }\n setupColumnCondition(filterModel) {\n var _a;\n const columnDetails = this.advancedFilterExpressionService.getColumnDetails(filterModel.colId);\n this.baseCellDataType = columnDetails.baseCellDataType;\n this.column = columnDetails.column;\n this.numOperands = this.getNumOperands(this.getOperatorKey());\n this.eColumnPill = this.createPill({\n key: this.getColumnKey(),\n displayValue: (_a = this.getColumnDisplayValue()) != null ? _a : this.getDefaultColumnDisplayValue(),\n cssClass: \"ag-advanced-filter-builder-column-pill\",\n isSelect: true,\n getEditorParams: () => ({ values: this.advancedFilterExpressionService.getColumnAutocompleteEntries() }),\n update: (key) => this.setColumnKey(key),\n pickerAriaLabelKey: \"ariaLabelAdvancedFilterBuilderColumnSelectField\",\n pickerAriaLabelValue: \"Advanced Filter Builder Column Select Field\",\n ariaLabel: this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderColumn\")\n });\n this.getGui().appendChild(this.eColumnPill.getGui());\n if (_4.exists(this.getColumnKey())) {\n this.createOperatorPill();\n if (this.hasOperand()) {\n this.createOperandPill();\n }\n }\n }\n createOperatorPill() {\n var _a;\n this.eOperatorPill = this.createPill({\n key: this.getOperatorKey(),\n displayValue: (_a = this.getOperatorDisplayValue()) != null ? _a : this.getDefaultOptionSelectValue(),\n cssClass: \"ag-advanced-filter-builder-option-pill\",\n isSelect: true,\n getEditorParams: () => ({ values: this.getOperatorAutocompleteEntries() }),\n update: (key) => this.setOperatorKey(key),\n pickerAriaLabelKey: \"ariaLabelAdvancedFilterBuilderOptionSelectField\",\n pickerAriaLabelValue: \"Advanced Filter Builder Option Select Field\",\n ariaLabel: this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderOption\")\n });\n this.eColumnPill.getGui().insertAdjacentElement(\"afterend\", this.eOperatorPill.getGui());\n }\n createOperandPill() {\n var _a;\n const key = (_a = this.getOperandDisplayValue()) != null ? _a : \"\";\n this.eOperandPill = this.createPill({\n key,\n displayValue: key,\n baseCellDataType: this.baseCellDataType,\n cssClass: \"ag-advanced-filter-builder-value-pill\",\n isSelect: false,\n update: (key2) => this.setOperand(key2),\n ariaLabel: this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderValue\")\n });\n this.getGui().appendChild(this.eOperandPill.getGui());\n }\n getColumnKey() {\n return this.filterModel.colId;\n }\n getColumnDisplayValue() {\n return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel);\n }\n getOperatorKey() {\n return this.filterModel.type;\n }\n getOperatorDisplayValue() {\n return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel);\n }\n getOperandDisplayValue() {\n return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel, true);\n }\n hasOperand() {\n return this.numOperands > 0;\n }\n getOperatorAutocompleteEntries() {\n return this.column ? this.advancedFilterExpressionService.getOperatorAutocompleteEntries(\n this.column,\n this.baseCellDataType\n ) : [];\n }\n setColumnKey(colId) {\n if (!this.eOperatorPill) {\n this.createOperatorPill();\n }\n const newColumnDetails = this.advancedFilterExpressionService.getColumnDetails(colId);\n this.column = newColumnDetails.column;\n const newBaseCellDataType = newColumnDetails.baseCellDataType;\n if (this.baseCellDataType !== newBaseCellDataType) {\n this.baseCellDataType = newBaseCellDataType;\n this.setOperatorKey(void 0);\n if (this.eOperatorPill) {\n _4.removeFromParent(this.eOperatorPill.getGui());\n this.destroyBean(this.eOperatorPill);\n this.createOperatorPill();\n }\n this.validate();\n }\n this.filterModel.colId = colId;\n this.filterModel.filterType = this.baseCellDataType;\n }\n setOperatorKey(operator) {\n const newNumOperands = this.getNumOperands(operator);\n if (newNumOperands !== this.numOperands) {\n this.numOperands = newNumOperands;\n if (newNumOperands === 0) {\n this.destroyOperandPill();\n } else {\n this.createOperandPill();\n if (this.baseCellDataType !== \"number\") {\n this.setOperand(\"\");\n }\n }\n }\n this.filterModel.type = operator;\n this.validate();\n }\n setOperand(operand) {\n var _a;\n let parsedOperand = operand;\n if (this.column) {\n parsedOperand = (_a = this.advancedFilterExpressionService.getOperandModelValue(operand, this.baseCellDataType, this.column)) != null ? _a : \"\";\n }\n this.filterModel.filter = parsedOperand;\n this.validate();\n }\n getNumOperands(operator) {\n var _a, _b;\n return (_b = (_a = this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType, operator)) == null ? void 0 : _a.numOperands) != null ? _b : 0;\n }\n destroyOperandPill() {\n delete this.filterModel.filter;\n this.getGui().removeChild(this.eOperandPill.getGui());\n this.destroyBean(this.eOperandPill);\n this.eOperandPill = void 0;\n }\n validate() {\n let validationMessage = null;\n if (!_4.exists(this.getColumnKey())) {\n validationMessage = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderValidationSelectColumn\");\n } else if (!_4.exists(this.getOperatorKey())) {\n validationMessage = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderValidationSelectOption\");\n } else if (this.numOperands > 0 && !_4.exists(this.getOperandDisplayValue())) {\n validationMessage = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderValidationEnterValue\");\n }\n this.item.valid = !validationMessage;\n if (validationMessage !== this.validationMessage) {\n this.validationMessage = validationMessage;\n this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_VALID_CHANGED\n });\n }\n }\n getDefaultColumnDisplayValue() {\n return this.advancedFilterExpressionService.translate(\"advancedFilterBuilderSelectColumn\");\n }\n getDefaultOptionSelectValue() {\n return this.advancedFilterExpressionService.translate(\"advancedFilterBuilderSelectOption\");\n }\n};\n__decorateClass2([\n Autowired22(\"advancedFilterExpressionService\")\n], ConditionPillWrapperComp.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n Autowired22(\"valueService\")\n], ConditionPillWrapperComp.prototype, \"valueService\", 2);\nvar InputPillComp = class extends Component4 {\n constructor(params) {\n super(\n /* html */\n `\n
\n
\n \n
\n
\n `\n );\n this.params = params;\n this.value = params.value;\n }\n postConstruct() {\n const { cssClass, ariaLabel } = this.params;\n this.ePill.classList.add(cssClass);\n this.activateTabIndex([this.ePill]);\n this.eLabel.id = `${this.getCompId()}`;\n _5.setAriaDescribedBy(this.ePill, this.eLabel.id);\n _5.setAriaLabel(this.ePill, ariaLabel);\n this.renderValue();\n this.addManagedListener(this.ePill, \"click\", (event) => {\n event.preventDefault();\n this.showEditor();\n });\n this.addManagedListener(this.ePill, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode3.ENTER:\n event.preventDefault();\n _5.stopPropagationForAgGrid(event);\n this.showEditor();\n break;\n }\n });\n this.addDestroyFunc(() => this.destroyBean(this.eEditor));\n }\n getFocusableElement() {\n return this.ePill;\n }\n showEditor() {\n if (this.eEditor) {\n return;\n }\n _5.setDisplayed(this.ePill, false);\n this.eEditor = this.createEditorComp(this.params.type);\n this.eEditor.setValue(this.value);\n const eEditorGui = this.eEditor.getGui();\n this.eEditor.addManagedListener(eEditorGui, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode3.ENTER:\n event.preventDefault();\n _5.stopPropagationForAgGrid(event);\n this.updateValue(true);\n break;\n case KeyCode3.ESCAPE:\n event.preventDefault();\n _5.stopPropagationForAgGrid(event);\n this.hideEditor(true);\n break;\n }\n });\n this.eEditor.addManagedListener(eEditorGui, \"focusout\", () => {\n this.updateValue(false);\n });\n this.getGui().appendChild(eEditorGui);\n this.eEditor.getFocusableElement().focus();\n }\n createEditorComp(type) {\n let comp;\n switch (type) {\n case \"text\":\n comp = new AgInputTextField();\n break;\n case \"number\":\n comp = new AgInputNumberField();\n break;\n case \"date\":\n comp = new AgInputDateField();\n break;\n }\n return this.createBean(comp);\n }\n hideEditor(keepFocus) {\n const { eEditor } = this;\n if (!eEditor) {\n return;\n }\n this.eEditor = void 0;\n this.getGui().removeChild(eEditor.getGui());\n this.destroyBean(eEditor);\n _5.setDisplayed(this.ePill, true);\n if (keepFocus) {\n this.ePill.focus();\n }\n }\n renderValue() {\n let value;\n this.eLabel.classList.remove(\n \"ag-advanced-filter-builder-value-empty\",\n \"ag-advanced-filter-builder-value-number\",\n \"ag-advanced-filter-builder-value-text\"\n );\n if (!_5.exists(this.value)) {\n value = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderEnterValue\");\n this.eLabel.classList.add(\"ag-advanced-filter-builder-value-empty\");\n } else if (this.params.type === \"number\") {\n value = this.value;\n this.eLabel.classList.add(\"ag-advanced-filter-builder-value-number\");\n } else {\n value = `\"${this.value}\"`;\n this.eLabel.classList.add(\"ag-advanced-filter-builder-value-text\");\n }\n this.eLabel.innerText = value;\n }\n updateValue(keepFocus) {\n var _a;\n if (!this.eEditor) {\n return;\n }\n const value = (_a = this.eEditor.getValue()) != null ? _a : \"\";\n this.dispatchEvent({\n type: Events2.EVENT_FIELD_VALUE_CHANGED,\n value\n });\n this.value = value;\n this.renderValue();\n this.hideEditor(keepFocus);\n }\n};\n__decorateClass2([\n RefSelector3(\"ePill\")\n], InputPillComp.prototype, \"ePill\", 2);\n__decorateClass2([\n RefSelector3(\"eLabel\")\n], InputPillComp.prototype, \"eLabel\", 2);\n__decorateClass2([\n Autowired32(\"advancedFilterExpressionService\")\n], InputPillComp.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n PostConstruct4\n], InputPillComp.prototype, \"postConstruct\", 1);\nvar JoinPillWrapperComp = class extends Component5 {\n constructor() {\n super(\n /* html */\n `\n
\n `\n );\n }\n init(params) {\n const { item, createPill } = params;\n const filterModel = item.filterModel;\n this.filterModel = filterModel;\n this.ePill = createPill({\n key: filterModel.type,\n displayValue: this.advancedFilterExpressionService.parseJoinOperator(filterModel),\n cssClass: \"ag-advanced-filter-builder-join-pill\",\n isSelect: true,\n getEditorParams: () => ({ values: this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries() }),\n update: (key) => filterModel.type = key,\n pickerAriaLabelKey: \"ariaLabelAdvancedFilterBuilderJoinSelectField\",\n pickerAriaLabelValue: \"Advanced Filter Builder Join Operator Select Field\",\n ariaLabel: this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderJoinOperator\")\n });\n this.getGui().appendChild(this.ePill.getGui());\n this.addDestroyFunc(() => this.destroyBean(this.ePill));\n }\n getDragName() {\n return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel);\n }\n getAriaLabel() {\n return `${this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderGroupItem\")} ${this.getDragName()}`;\n }\n getValidationMessage() {\n return null;\n }\n getFocusableElement() {\n return this.ePill.getFocusableElement();\n }\n};\n__decorateClass2([\n Autowired4(\"advancedFilterExpressionService\")\n], JoinPillWrapperComp.prototype, \"advancedFilterExpressionService\", 2);\nvar SelectPillComp = class extends AgRichSelect2 {\n constructor(params) {\n super(__spreadProps(__spreadValues({}, params), {\n template: (\n /* html */\n `\n
\n
\n
\n
\n \n
\n
\n
`\n )\n }));\n this.params = params;\n }\n getFocusableElement() {\n return this.eWrapper;\n }\n showPicker() {\n setTimeout(() => super.showPicker());\n }\n hidePicker() {\n setTimeout(() => super.hidePicker());\n }\n postConstruct() {\n super.postConstruct();\n const { wrapperClassName, ariaLabel } = this.params;\n this.eWrapper.classList.add(wrapperClassName);\n _7.setAriaLabelledBy(this.eWrapper, \"\");\n _7.setAriaLabel(this.eWrapper, ariaLabel);\n }\n createPickerComponent() {\n var _a;\n if (!this.values) {\n const { values } = this.params.getEditorParams();\n this.values = values;\n const key = this.value.key;\n const value = (_a = values.find((value2) => value2.key === key)) != null ? _a : {\n key,\n displayValue: this.value.displayValue\n };\n this.value = value;\n }\n return super.createPickerComponent();\n }\n onEnterKeyDown(event) {\n _7.stopPropagationForAgGrid(event);\n if (this.isPickerDisplayed) {\n super.onEnterKeyDown(event);\n } else {\n event.preventDefault();\n this.showPicker();\n }\n }\n};\nvar AdvancedFilterBuilderItemComp = class extends TabGuardComp {\n constructor(item, dragFeature, focusWrapper) {\n super(\n /* html */\n `\n
\n
\n
\n \n \n
\n
\n \n \n
\n \n
\n
\n `\n );\n this.item = item;\n this.dragFeature = dragFeature;\n this.focusWrapper = focusWrapper;\n this.moveUpDisabled = false;\n this.moveDownDisabled = false;\n }\n postConstruct() {\n const { filterModel, level, showMove } = this.item;\n const isJoin = filterModel.filterType === \"join\";\n this.ePillWrapper = this.createManagedBean(isJoin ? new JoinPillWrapperComp() : new ConditionPillWrapperComp());\n this.ePillWrapper.init({ item: this.item, createPill: (params) => this.createPill(params) });\n this.eDragHandle.insertAdjacentElement(\"afterend\", this.ePillWrapper.getGui());\n if (level === 0) {\n const eTreeLine = document.createElement(\"div\");\n eTreeLine.classList.add(\"ag-advanced-filter-builder-item-tree-line-vertical-bottom\");\n eTreeLine.classList.add(\"ag-advanced-filter-builder-item-tree-line-root\");\n this.eTreeLines.appendChild(eTreeLine);\n _8.setDisplayed(this.eDragHandle, false);\n _8.setDisplayed(this.eButtons, false);\n _8.setAriaExpanded(this.focusWrapper, true);\n } else {\n this.setupTreeLines(level);\n this.eDragHandle.appendChild(_8.createIconNoSpan(\"advancedFilterBuilderDrag\", this.gos));\n this.setupValidation();\n this.setupMoveButtons(showMove);\n this.setupAddButton();\n this.setupRemoveButton();\n this.setupDragging();\n this.updateAriaExpanded();\n }\n _8.setAriaLevel(this.focusWrapper, level + 1);\n this.initialiseTabGuard({});\n this.createManagedBean(new AdvancedFilterBuilderItemNavigationFeature(\n this.getGui(),\n this.focusWrapper,\n this.ePillWrapper\n ));\n this.updateAriaLabel();\n this.addManagedListener(this.ePillWrapper, AdvancedFilterBuilderEvents.EVENT_VALUE_CHANGED, () => this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_VALUE_CHANGED\n }));\n this.addManagedListener(this.ePillWrapper, AdvancedFilterBuilderEvents.EVENT_VALID_CHANGED, () => this.updateValidity());\n }\n setState(params) {\n const { level } = this.item;\n if (level === 0) {\n return;\n }\n const { showMove } = this.item;\n const { disableMoveUp, disableMoveDown, treeLines, showStartTreeLine } = params;\n this.updateTreeLines(treeLines, showStartTreeLine);\n this.updateAriaExpanded();\n if (showMove) {\n this.moveUpDisabled = !!disableMoveUp;\n this.moveDownDisabled = !!disableMoveDown;\n this.eMoveUpButton.classList.toggle(\"ag-advanced-filter-builder-item-button-disabled\", disableMoveUp);\n this.eMoveDownButton.classList.toggle(\"ag-advanced-filter-builder-item-button-disabled\", disableMoveDown);\n _8.setAriaDisabled(this.eMoveUpButton, !!disableMoveUp);\n _8.setAriaDisabled(this.eMoveDownButton, !!disableMoveDown);\n this.moveUpTooltipFeature.refreshToolTip();\n this.moveDownTooltipFeature.refreshToolTip();\n }\n }\n focusMoveButton(backwards) {\n (backwards ? this.eMoveUpButton : this.eMoveDownButton).focus();\n }\n afterAdd() {\n this.ePillWrapper.getFocusableElement().focus();\n }\n setupTreeLines(level) {\n for (let i = 0; i < level; i++) {\n const eTreeLine = document.createElement(\"div\");\n this.eTreeLines.appendChild(eTreeLine);\n }\n }\n updateTreeLines(treeLines, showStartTreeLine) {\n const lastTreeLineIndex = treeLines.length - 1;\n const { children } = this.eTreeLines;\n for (let i = 0; i < lastTreeLineIndex; i++) {\n const eTreeLine2 = children.item(i);\n if (eTreeLine2) {\n eTreeLine2.classList.toggle(\"ag-advanced-filter-builder-item-tree-line-vertical\", !treeLines[i]);\n }\n }\n const eTreeLine = children.item(lastTreeLineIndex);\n if (eTreeLine) {\n eTreeLine.classList.add(\"ag-advanced-filter-builder-item-tree-line-horizontal\");\n const isLastChild = treeLines[lastTreeLineIndex];\n eTreeLine.classList.toggle(\"ag-advanced-filter-builder-item-tree-line-vertical-top\", isLastChild);\n eTreeLine.classList.toggle(\"ag-advanced-filter-builder-item-tree-line-vertical\", !isLastChild);\n }\n this.eDragHandle.classList.toggle(\"ag-advanced-filter-builder-item-tree-line-vertical-bottom\", showStartTreeLine);\n }\n setupValidation() {\n this.eValidation.appendChild(_8.createIconNoSpan(\"advancedFilterBuilderInvalid\", this.gos));\n this.validationTooltipFeature = this.createManagedBean(new TooltipFeature({\n getGui: () => this.eValidation,\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.ePillWrapper.getValidationMessage(),\n getTooltipShowDelayOverride: () => 1e3\n }));\n this.updateValidity();\n }\n setupAddButton() {\n var _a;\n const addButtonParams = getAdvancedFilterBuilderAddButtonParams(\n (key) => this.advancedFilterExpressionService.translate(key),\n (_a = this.gos.get(\"advancedFilterBuilderParams\")) == null ? void 0 : _a.addSelectWidth\n );\n const eAddButton = this.createManagedBean(new AddDropdownComp(addButtonParams));\n this.addManagedListener(\n eAddButton,\n Events3.EVENT_FIELD_PICKER_VALUE_SELECTED,\n ({ value }) => this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_ADDED,\n item: this.item,\n isJoin: value.key === \"join\"\n })\n );\n this.eAddButton.appendChild(eAddButton.getGui());\n this.createManagedBean(new TooltipFeature({\n getGui: () => this.eAddButton,\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.advancedFilterExpressionService.translate(\"advancedFilterBuilderAddButtonTooltip\")\n }));\n }\n setupRemoveButton() {\n this.eRemoveButton.appendChild(_8.createIconNoSpan(\"advancedFilterBuilderRemove\", this.gos));\n this.addManagedListener(this.eRemoveButton, \"click\", () => this.removeItem());\n this.addManagedListener(this.eRemoveButton, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode4.ENTER:\n event.preventDefault();\n _8.stopPropagationForAgGrid(event);\n this.removeItem();\n break;\n }\n });\n this.createManagedBean(new TooltipFeature({\n getGui: () => this.eRemoveButton,\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.advancedFilterExpressionService.translate(\"advancedFilterBuilderRemoveButtonTooltip\")\n }));\n _8.setAriaLabel(this.eRemoveButton, this.advancedFilterExpressionService.translate(\"advancedFilterBuilderRemoveButtonTooltip\"));\n this.activateTabIndex([this.eRemoveButton]);\n }\n setupMoveButtons(showMove) {\n if (showMove) {\n this.eMoveUpButton.appendChild(_8.createIconNoSpan(\"advancedFilterBuilderMoveUp\", this.gos));\n this.addManagedListener(this.eMoveUpButton, \"click\", () => this.moveItem(true));\n this.addManagedListener(this.eMoveUpButton, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode4.ENTER:\n event.preventDefault();\n _8.stopPropagationForAgGrid(event);\n this.moveItem(true);\n break;\n }\n });\n this.moveUpTooltipFeature = this.createManagedBean(new TooltipFeature({\n getGui: () => this.eMoveUpButton,\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.moveUpDisabled ? null : this.advancedFilterExpressionService.translate(\"advancedFilterBuilderMoveUpButtonTooltip\")\n }));\n _8.setAriaLabel(this.eMoveUpButton, this.advancedFilterExpressionService.translate(\"advancedFilterBuilderMoveUpButtonTooltip\"));\n this.eMoveDownButton.appendChild(_8.createIconNoSpan(\"advancedFilterBuilderMoveDown\", this.gos));\n this.addManagedListener(this.eMoveDownButton, \"click\", () => this.moveItem(false));\n this.addManagedListener(this.eMoveDownButton, \"keydown\", (event) => {\n switch (event.key) {\n case KeyCode4.ENTER:\n event.preventDefault();\n _8.stopPropagationForAgGrid(event);\n this.moveItem(false);\n break;\n }\n });\n this.moveDownTooltipFeature = this.createManagedBean(new TooltipFeature({\n getGui: () => this.eMoveDownButton,\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.moveDownDisabled ? null : this.advancedFilterExpressionService.translate(\"advancedFilterBuilderMoveDownButtonTooltip\")\n }));\n _8.setAriaLabel(this.eMoveDownButton, this.advancedFilterExpressionService.translate(\"advancedFilterBuilderMoveDownButtonTooltip\"));\n this.activateTabIndex([this.eMoveUpButton, this.eMoveDownButton]);\n } else {\n _8.setDisplayed(this.eMoveUpButton, false);\n _8.setDisplayed(this.eMoveDownButton, false);\n }\n }\n updateValidity() {\n _8.setVisible(this.eValidation, !this.item.valid);\n this.validationTooltipFeature.refreshToolTip();\n this.updateAriaLabel();\n }\n createPill(params) {\n var _a, _b;\n const { key, displayValue, cssClass, update, ariaLabel } = params;\n const onUpdated = (key2) => {\n if (key2 == null) {\n return;\n }\n update(key2);\n this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_VALUE_CHANGED\n });\n };\n if (params.isSelect) {\n const { getEditorParams, pickerAriaLabelKey, pickerAriaLabelValue } = params;\n const advancedFilterBuilderParams = this.gos.get(\"advancedFilterBuilderParams\");\n const minPickerWidth = `${(_a = advancedFilterBuilderParams == null ? void 0 : advancedFilterBuilderParams.pillSelectMinWidth) != null ? _a : 140}px`;\n const maxPickerWidth = `${(_b = advancedFilterBuilderParams == null ? void 0 : advancedFilterBuilderParams.pillSelectMaxWidth) != null ? _b : 200}px`;\n const comp = this.createBean(new SelectPillComp({\n pickerAriaLabelKey,\n pickerAriaLabelValue,\n pickerType: \"ag-list\",\n value: {\n key,\n displayValue\n },\n valueFormatter: (value) => {\n var _a2;\n return value == null ? null : (_a2 = value.displayValue) != null ? _a2 : value.key;\n },\n variableWidth: true,\n minPickerWidth,\n maxPickerWidth,\n getEditorParams,\n wrapperClassName: cssClass,\n ariaLabel\n }));\n this.addManagedListener(\n comp,\n Events3.EVENT_FIELD_PICKER_VALUE_SELECTED,\n ({ value }) => onUpdated(value == null ? void 0 : value.key)\n );\n return comp;\n } else {\n const comp = this.createBean(new InputPillComp({\n value: displayValue,\n cssClass,\n type: this.getInputType(params.baseCellDataType),\n ariaLabel\n }));\n this.addManagedListener(\n comp,\n Events3.EVENT_FIELD_VALUE_CHANGED,\n ({ value }) => onUpdated(value)\n );\n return comp;\n }\n }\n getInputType(baseCellDataType) {\n switch (baseCellDataType) {\n case \"text\":\n case \"object\":\n case \"boolean\":\n return \"text\";\n case \"number\":\n return \"number\";\n case \"date\":\n case \"dateString\":\n return \"date\";\n }\n }\n setupDragging() {\n const dragSource = {\n type: DragSourceType2.AdvancedFilterBuilder,\n eElement: this.eDragHandle,\n dragItemName: () => this.ePillWrapper.getDragName(),\n getDefaultIconName: () => DragAndDropService.ICON_NOT_ALLOWED,\n getDragItem: () => ({}),\n onDragStarted: () => this.dragFeature.dispatchEvent({\n type: AdvancedFilterBuilderDragFeature.EVENT_DRAG_STARTED,\n item: this.item\n }),\n onDragStopped: () => this.dragFeature.dispatchEvent({\n type: AdvancedFilterBuilderDragFeature.EVENT_DRAG_ENDED\n })\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(() => this.dragAndDropService.removeDragSource(dragSource));\n }\n updateAriaLabel() {\n const wrapperLabel = this.ePillWrapper.getAriaLabel();\n const level = `${this.item.level + 1}`;\n const validationMessage = this.ePillWrapper.getValidationMessage();\n let ariaLabel;\n if (validationMessage) {\n ariaLabel = this.advancedFilterExpressionService.translate(\n \"ariaAdvancedFilterBuilderItemValidation\",\n [wrapperLabel, level, validationMessage]\n );\n } else {\n ariaLabel = this.advancedFilterExpressionService.translate(\n \"ariaAdvancedFilterBuilderItem\",\n [wrapperLabel, level]\n );\n }\n _8.setAriaLabel(this.focusWrapper, ariaLabel);\n }\n updateAriaExpanded() {\n _8.removeAriaExpanded(this.focusWrapper);\n const { filterModel } = this.item;\n if ((filterModel == null ? void 0 : filterModel.filterType) === \"join\" && filterModel.conditions.length) {\n _8.setAriaExpanded(this.focusWrapper, true);\n }\n }\n removeItem() {\n this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_REMOVED,\n item: this.item\n });\n }\n moveItem(backwards) {\n this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_MOVED,\n item: this.item,\n backwards\n });\n }\n};\n__decorateClass2([\n RefSelector2(\"eTreeLines\")\n], AdvancedFilterBuilderItemComp.prototype, \"eTreeLines\", 2);\n__decorateClass2([\n RefSelector2(\"eDragHandle\")\n], AdvancedFilterBuilderItemComp.prototype, \"eDragHandle\", 2);\n__decorateClass2([\n RefSelector2(\"eItem\")\n], AdvancedFilterBuilderItemComp.prototype, \"eItem\", 2);\n__decorateClass2([\n RefSelector2(\"eButtons\")\n], AdvancedFilterBuilderItemComp.prototype, \"eButtons\", 2);\n__decorateClass2([\n RefSelector2(\"eValidation\")\n], AdvancedFilterBuilderItemComp.prototype, \"eValidation\", 2);\n__decorateClass2([\n RefSelector2(\"eMoveUpButton\")\n], AdvancedFilterBuilderItemComp.prototype, \"eMoveUpButton\", 2);\n__decorateClass2([\n RefSelector2(\"eMoveDownButton\")\n], AdvancedFilterBuilderItemComp.prototype, \"eMoveDownButton\", 2);\n__decorateClass2([\n RefSelector2(\"eAddButton\")\n], AdvancedFilterBuilderItemComp.prototype, \"eAddButton\", 2);\n__decorateClass2([\n RefSelector2(\"eRemoveButton\")\n], AdvancedFilterBuilderItemComp.prototype, \"eRemoveButton\", 2);\n__decorateClass2([\n Autowired5(\"beans\")\n], AdvancedFilterBuilderItemComp.prototype, \"beans\", 2);\n__decorateClass2([\n Autowired5(\"dragAndDropService\")\n], AdvancedFilterBuilderItemComp.prototype, \"dragAndDropService\", 2);\n__decorateClass2([\n Autowired5(\"advancedFilterExpressionService\")\n], AdvancedFilterBuilderItemComp.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n PostConstruct5\n], AdvancedFilterBuilderItemComp.prototype, \"postConstruct\", 1);\nvar AdvancedFilterBuilderItemAddComp = class extends Component6 {\n constructor(item, focusWrapper) {\n super(\n /* html */\n `\n
\n
\n
\n
\n
\n
\n
\n `\n );\n this.item = item;\n this.focusWrapper = focusWrapper;\n }\n postConstruct() {\n var _a;\n _9.setAriaLevel(this.focusWrapper, 2);\n const addButtonParams = getAdvancedFilterBuilderAddButtonParams(\n (key) => this.advancedFilterExpressionService.translate(key),\n (_a = this.gos.get(\"advancedFilterBuilderParams\")) == null ? void 0 : _a.addSelectWidth\n );\n const eAddButton = this.createManagedBean(new AddDropdownComp(addButtonParams));\n this.addManagedListener(eAddButton, Events4.EVENT_FIELD_PICKER_VALUE_SELECTED, ({ value }) => {\n this.dispatchEvent({\n type: AdvancedFilterBuilderEvents.EVENT_ADDED,\n item: this.item,\n isJoin: value.key === \"join\"\n });\n });\n this.eItem.appendChild(eAddButton.getGui());\n this.createManagedBean(new TooltipFeature2({\n getGui: () => eAddButton.getGui(),\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.advancedFilterExpressionService.translate(\"advancedFilterBuilderAddButtonTooltip\")\n }));\n this.createManagedBean(new AdvancedFilterBuilderItemNavigationFeature(\n this.getGui(),\n this.focusWrapper,\n eAddButton\n ));\n _9.setAriaLabel(\n this.focusWrapper,\n this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderItem\", [\n this.advancedFilterExpressionService.translate(\"advancedFilterBuilderAddButtonTooltip\"),\n `${this.item.level + 1}`\n ])\n );\n }\n afterAdd() {\n }\n};\n__decorateClass2([\n Autowired6(\"beans\")\n], AdvancedFilterBuilderItemAddComp.prototype, \"beans\", 2);\n__decorateClass2([\n Autowired6(\"advancedFilterExpressionService\")\n], AdvancedFilterBuilderItemAddComp.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n RefSelector32(\"eItem\")\n], AdvancedFilterBuilderItemAddComp.prototype, \"eItem\", 2);\n__decorateClass2([\n PostConstruct6\n], AdvancedFilterBuilderItemAddComp.prototype, \"postConstruct\", 1);\nvar AdvancedFilterBuilderComp = class extends Component7 {\n constructor() {\n super(\n /* html */\n `\n
\n
\n
\n \n \n
\n
`\n );\n this.validationMessage = null;\n }\n postConstruct() {\n var _a;\n const { showMoveButtons } = (_a = this.gos.get(\"advancedFilterBuilderParams\")) != null ? _a : {};\n this.showMove = !!showMoveButtons;\n this.addManagedPropertyListener(\"advancedFilterBuilderParams\", ({ currentValue }) => {\n this.showMove = !!(currentValue == null ? void 0 : currentValue.showMoveButtons);\n this.refreshList(false);\n });\n this.filterModel = this.setupFilterModel();\n this.setupVirtualList();\n this.dragFeature = this.createManagedBean(new AdvancedFilterBuilderDragFeature(this, this.virtualList));\n this.setupButtons();\n }\n refresh() {\n let indexToFocus = this.virtualList.getLastFocusedRow();\n this.setupFilterModel();\n this.validateItems();\n this.refreshList(false);\n if (indexToFocus != null) {\n if (!this.virtualList.getComponentAt(indexToFocus)) {\n indexToFocus = 0;\n }\n this.virtualList.focusRow(indexToFocus);\n }\n }\n getNumItems() {\n return this.items.length;\n }\n moveItem(item, destination) {\n if (!destination || !item) {\n return;\n }\n this.moveItemToIndex(item, destination.rowIndex, destination.position);\n }\n afterGuiAttached() {\n this.virtualList.focusRow(0);\n }\n setupVirtualList() {\n this.virtualList = this.createManagedBean(new VirtualList3({\n cssIdentifier: \"advanced-filter-builder\",\n ariaRole: \"tree\",\n listName: this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterBuilderList\")\n }));\n this.virtualList.setComponentCreator(this.createItemComponent.bind(this));\n this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this));\n this.virtualList.setRowHeight(40);\n this.eList.appendChild(this.virtualList.getGui());\n this.virtualList.setModel({\n getRowCount: () => this.items.length,\n getRow: (index) => this.items[index],\n areRowsEqual: (oldRow, newRow) => oldRow === newRow\n });\n this.buildList();\n this.virtualList.refresh();\n }\n setupButtons() {\n this.eApplyFilterButton.innerText = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderApply\");\n this.activateTabIndex([this.eApplyFilterButton]);\n this.addManagedListener(this.eApplyFilterButton, \"click\", () => {\n this.advancedFilterService.setModel(this.filterModel);\n this.filterManager.onFilterChanged({ source: \"advancedFilter\" });\n this.close();\n });\n this.validationTooltipFeature = this.createManagedBean(new TooltipFeature3({\n getGui: () => this.eApplyFilterButton,\n getLocation: () => \"advancedFilter\",\n getTooltipValue: () => this.validationMessage,\n getTooltipShowDelayOverride: () => 1e3\n }));\n this.validate();\n this.addManagedListener(\n this.eApplyFilterButton,\n \"mouseenter\",\n () => this.addOrRemoveCssClass(\"ag-advanced-filter-builder-validation\", true)\n );\n this.addManagedListener(\n this.eApplyFilterButton,\n \"mouseleave\",\n () => this.addOrRemoveCssClass(\"ag-advanced-filter-builder-validation\", false)\n );\n this.eCancelFilterButton.innerText = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderCancel\");\n this.activateTabIndex([this.eCancelFilterButton]);\n this.addManagedListener(this.eCancelFilterButton, \"click\", () => this.close());\n }\n removeItemFromParent(item) {\n const sourceParentIndex = item.parent.conditions.indexOf(item.filterModel);\n item.parent.conditions.splice(sourceParentIndex, 1);\n return sourceParentIndex;\n }\n moveItemToIndex(item, destinationRowIndex, destinationPosition) {\n var _a;\n const destinationItem = this.items[destinationRowIndex];\n const destinationIsParent = ((_a = destinationItem.filterModel) == null ? void 0 : _a.filterType) === \"join\" && destinationPosition === \"bottom\";\n const destinationParent = destinationIsParent ? destinationItem.filterModel : destinationItem.parent;\n if (!destinationParent) {\n return;\n }\n if (this.isChildOrSelf(destinationParent, item.filterModel) || destinationItem === item) {\n return;\n }\n this.removeItemFromParent(item);\n let destinationParentIndex;\n if (destinationIsParent) {\n destinationParentIndex = 0;\n } else {\n destinationParentIndex = destinationParent.conditions.indexOf(destinationItem.filterModel);\n if (destinationParentIndex === -1) {\n destinationParentIndex = destinationParent.conditions.length;\n } else if (destinationPosition === \"bottom\") {\n destinationParentIndex += 1;\n }\n }\n destinationParent.conditions.splice(destinationParentIndex, 0, item.filterModel);\n this.refreshList(false);\n }\n isChildOrSelf(modelToCheck, potentialParentModel) {\n return modelToCheck === potentialParentModel || potentialParentModel.filterType === \"join\" && potentialParentModel.conditions.some((condition) => this.isChildOrSelf(modelToCheck, condition));\n }\n setupFilterModel() {\n const filterModel = this.formatFilterModel(this.advancedFilterService.getModel());\n this.stringifiedModel = JSON.stringify(filterModel);\n return filterModel;\n }\n formatFilterModel(filterModel) {\n filterModel = filterModel != null ? filterModel : {\n filterType: \"join\",\n type: \"AND\",\n conditions: []\n };\n if (filterModel.filterType !== \"join\") {\n filterModel = {\n filterType: \"join\",\n type: \"AND\",\n conditions: [filterModel]\n };\n }\n return filterModel;\n }\n buildList() {\n const parseFilterModel = (filterModel, items, level, parent) => {\n items.push({ filterModel, level, parent, valid: true, showMove: this.showMove });\n if (filterModel.filterType === \"join\") {\n filterModel.conditions.forEach((childFilterModel) => parseFilterModel(childFilterModel, items, level + 1, filterModel));\n if (level === 0) {\n items.push({ filterModel: null, level: level + 1, parent: filterModel, valid: true });\n }\n }\n };\n this.items = [];\n parseFilterModel(this.filterModel, this.items, 0);\n }\n refreshList(softRefresh) {\n if (!softRefresh) {\n const invalidModels = [];\n this.items.forEach((item) => {\n if (!item.valid) {\n invalidModels.push(item.filterModel);\n }\n });\n this.buildList();\n if (invalidModels.length) {\n this.items.forEach((item) => {\n if (item.filterModel && invalidModels.includes(item.filterModel)) {\n item.valid = false;\n }\n });\n }\n }\n this.virtualList.refresh(softRefresh);\n this.validate();\n }\n updateItemComponent(item, comp) {\n const index = this.items.indexOf(item);\n const populateTreeLines = (filterModel2, treeLines2) => {\n const parentItem = this.items.find((itemToCheck) => itemToCheck.filterModel === filterModel2);\n const parentFilterModel = parentItem == null ? void 0 : parentItem.parent;\n if (parentFilterModel) {\n const { conditions } = parentFilterModel;\n populateTreeLines(parentFilterModel, treeLines2);\n treeLines2.push(conditions[conditions.length - 1] === filterModel2);\n }\n };\n const treeLines = [];\n const { filterModel } = item;\n if (filterModel) {\n populateTreeLines(filterModel, treeLines);\n treeLines[0] = false;\n }\n const showStartTreeLine = (filterModel == null ? void 0 : filterModel.filterType) === \"join\" && !!filterModel.conditions.length;\n comp.setState({\n disableMoveUp: index === 1,\n disableMoveDown: !this.canMoveDown(item, index),\n treeLines,\n showStartTreeLine\n });\n }\n createItemComponent(item, focusWrapper) {\n const itemComp = this.createBean(item.filterModel ? new AdvancedFilterBuilderItemComp(item, this.dragFeature, focusWrapper) : new AdvancedFilterBuilderItemAddComp(item, focusWrapper));\n itemComp.addManagedListener(\n itemComp,\n AdvancedFilterBuilderEvents.EVENT_REMOVED,\n ({ item: item2 }) => this.removeItem(item2)\n );\n itemComp.addManagedListener(\n itemComp,\n AdvancedFilterBuilderEvents.EVENT_VALUE_CHANGED,\n () => this.validate()\n );\n itemComp.addManagedListener(\n itemComp,\n AdvancedFilterBuilderEvents.EVENT_ADDED,\n ({ item: item2, isJoin }) => this.addItem(item2, isJoin)\n );\n itemComp.addManagedListener(\n itemComp,\n AdvancedFilterBuilderEvents.EVENT_MOVED,\n ({ item: item2, backwards }) => this.moveItemUpDown(item2, backwards)\n );\n if (itemComp instanceof AdvancedFilterBuilderItemComp) {\n this.updateItemComponent(item, itemComp);\n }\n return itemComp;\n }\n addItem(item, isJoin) {\n var _a;\n const { parent: itemParent, level, filterModel: itemFilterModel } = item;\n const itemIsJoin = (itemFilterModel == null ? void 0 : itemFilterModel.filterType) === \"join\";\n const filterModel = isJoin ? {\n filterType: \"join\",\n type: \"AND\",\n conditions: []\n } : {};\n const parent = itemIsJoin ? itemFilterModel : itemParent;\n let insertIndex = itemIsJoin ? 0 : parent.conditions.indexOf(itemFilterModel);\n if (insertIndex >= 0) {\n if (!itemIsJoin) {\n insertIndex += 1;\n }\n parent.conditions.splice(insertIndex, 0, filterModel);\n } else {\n parent.conditions.push(filterModel);\n }\n let index = this.items.indexOf(item);\n const softRefresh = index >= 0;\n if (softRefresh) {\n if (item.filterModel) {\n index++;\n }\n const newItems = [{\n filterModel,\n level: itemIsJoin ? level + 1 : level,\n parent,\n valid: isJoin,\n showMove: this.showMove\n }];\n this.items.splice(index, 0, ...newItems);\n }\n this.refreshList(softRefresh);\n if (softRefresh) {\n (_a = this.virtualList.getComponentAt(index)) == null ? void 0 : _a.afterAdd();\n }\n }\n removeItem(item) {\n var _a;\n const parent = item.parent;\n const { filterModel } = item;\n const parentIndex = parent.conditions.indexOf(filterModel);\n parent.conditions.splice(parentIndex, 1);\n const isJoin = ((_a = item.filterModel) == null ? void 0 : _a.filterType) === \"join\";\n const index = this.items.indexOf(item);\n const softRefresh = !isJoin && index >= 0;\n if (softRefresh) {\n this.items.splice(index, 1);\n }\n this.refreshList(softRefresh);\n if (index >= 0) {\n this.virtualList.focusRow(index);\n }\n }\n moveItemUpDown(item, backwards) {\n const itemIndex = this.items.indexOf(item);\n const destinationIndex = backwards ? itemIndex - 1 : itemIndex + 1;\n if (destinationIndex === 0 || !backwards && !this.canMoveDown(item, itemIndex)) {\n return;\n }\n const destinationItem = this.items[destinationIndex];\n const indexInParent = this.removeItemFromParent(item);\n const { level, filterModel, parent } = item;\n const { level: destinationLevel, filterModel: destinationFilterModel, parent: destinationParent } = destinationItem;\n if (backwards) {\n if (destinationLevel === level && destinationFilterModel.filterType === \"join\") {\n destinationFilterModel.conditions.push(filterModel);\n } else if (destinationLevel <= level) {\n const destinationIndex2 = destinationParent.conditions.indexOf(destinationFilterModel);\n destinationParent.conditions.splice(destinationIndex2, 0, filterModel);\n } else {\n const newParentItem = parent.conditions[indexInParent - 1];\n newParentItem.conditions.push(filterModel);\n }\n } else {\n if (destinationLevel === level) {\n if (destinationFilterModel.filterType === \"join\") {\n destinationFilterModel.conditions.splice(0, 0, filterModel);\n } else {\n const destinationIndex2 = destinationParent.conditions.indexOf(destinationFilterModel);\n destinationParent.conditions.splice(destinationIndex2 + 1, 0, filterModel);\n }\n } else {\n if (indexInParent < parent.conditions.length) {\n parent.conditions.splice(indexInParent + 1, 0, filterModel);\n } else {\n const parentItem = this.items.find((itemToCheck) => itemToCheck.filterModel === parent);\n const destinationIndex2 = parentItem.parent.conditions.indexOf(parentItem.filterModel) + 1;\n parentItem.parent.conditions.splice(destinationIndex2, 0, filterModel);\n }\n }\n }\n this.refreshList(false);\n const newIndex = this.items.findIndex(({ filterModel: filterModelToCheck }) => filterModelToCheck === filterModel);\n if (newIndex >= 0) {\n const comp = this.virtualList.getComponentAt(newIndex);\n if (comp instanceof AdvancedFilterBuilderItemComp) {\n comp.focusMoveButton(backwards);\n }\n }\n }\n canMoveDown(item, index) {\n return !(item.level === 1 && index === this.items.length - 2 || item.level === 1 && item.parent.conditions[item.parent.conditions.length - 1] === item.filterModel);\n }\n close() {\n this.advancedFilterService.getCtrl().toggleFilterBuilder(\"ui\");\n }\n validate() {\n let disableApply = !this.items.every(({ valid }) => valid);\n if (!disableApply) {\n disableApply = JSON.stringify(this.filterModel) === this.stringifiedModel;\n if (disableApply) {\n this.validationMessage = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderValidationAlreadyApplied\");\n } else {\n this.validationMessage = null;\n }\n } else {\n this.validationMessage = this.advancedFilterExpressionService.translate(\"advancedFilterBuilderValidationIncomplete\");\n }\n _10.setDisabled(this.eApplyFilterButton, disableApply);\n this.validationTooltipFeature.refreshToolTip();\n }\n validateItems() {\n const clearOperator = (filterModel) => {\n filterModel.type = void 0;\n };\n const clearOperand = (filterModel) => {\n delete filterModel.filter;\n };\n this.items.forEach((item) => {\n if (!item.valid || !item.filterModel || item.filterModel.filterType === \"join\") {\n return;\n }\n const { filterModel } = item;\n const { colId } = filterModel;\n const hasColumn = this.advancedFilterExpressionService.getColumnAutocompleteEntries().find(({ key }) => key === colId);\n const columnDetails = this.advancedFilterExpressionService.getColumnDetails(filterModel.colId);\n if (!hasColumn || !columnDetails.column) {\n item.valid = false;\n filterModel.colId = void 0;\n clearOperator(filterModel);\n clearOperand(filterModel);\n return;\n }\n const operatorForType = this.advancedFilterExpressionService.getDataTypeExpressionOperator(columnDetails.baseCellDataType);\n const operator = operatorForType.operators[filterModel.type];\n if (!operator) {\n item.valid = false;\n clearOperator(filterModel);\n clearOperand(filterModel);\n return;\n }\n if (operator.numOperands > 0 && !_10.exists(filterModel.filter)) {\n item.valid = false;\n return;\n }\n });\n }\n};\n__decorateClass2([\n RefSelector4(\"eList\")\n], AdvancedFilterBuilderComp.prototype, \"eList\", 2);\n__decorateClass2([\n RefSelector4(\"eApplyFilterButton\")\n], AdvancedFilterBuilderComp.prototype, \"eApplyFilterButton\", 2);\n__decorateClass2([\n RefSelector4(\"eCancelFilterButton\")\n], AdvancedFilterBuilderComp.prototype, \"eCancelFilterButton\", 2);\n__decorateClass2([\n Autowired7(\"filterManager\")\n], AdvancedFilterBuilderComp.prototype, \"filterManager\", 2);\n__decorateClass2([\n Autowired7(\"advancedFilterService\")\n], AdvancedFilterBuilderComp.prototype, \"advancedFilterService\", 2);\n__decorateClass2([\n Autowired7(\"advancedFilterExpressionService\")\n], AdvancedFilterBuilderComp.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n Autowired7(\"beans\")\n], AdvancedFilterBuilderComp.prototype, \"beans\", 2);\n__decorateClass2([\n PostConstruct7\n], AdvancedFilterBuilderComp.prototype, \"postConstruct\", 1);\nvar _AdvancedFilterCtrl = class _AdvancedFilterCtrl2 extends BeanStub3 {\n constructor(enabled) {\n super();\n this.enabled = enabled;\n }\n postConstruct() {\n this.hasAdvancedFilterParent = !!this.gos.get(\"advancedFilterParent\");\n this.ctrlsService.whenReady(() => this.setAdvancedFilterComp());\n this.addManagedListener(\n this.eventService,\n Events5.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,\n ({ enabled }) => this.onEnabledChanged(enabled)\n );\n this.addManagedPropertyListener(\"advancedFilterParent\", () => this.updateComps());\n this.addDestroyFunc(() => {\n this.destroyAdvancedFilterComp();\n this.destroyBean(this.eBuilderComp);\n if (this.eBuilderDialog && this.eBuilderDialog.isAlive()) {\n this.destroyBean(this.eBuilderDialog);\n }\n });\n }\n setupHeaderComp(eCompToInsertBefore) {\n this.eHeaderComp = this.createManagedBean(new AdvancedFilterHeaderComp(this.enabled && !this.hasAdvancedFilterParent));\n eCompToInsertBefore.insertAdjacentElement(\"beforebegin\", this.eHeaderComp.getGui());\n }\n focusHeaderComp() {\n if (this.eHeaderComp) {\n this.eHeaderComp.getFocusableElement().focus();\n return true;\n }\n return false;\n }\n refreshComp() {\n var _a, _b;\n (_a = this.eFilterComp) == null ? void 0 : _a.refresh();\n (_b = this.eHeaderComp) == null ? void 0 : _b.refresh();\n }\n refreshBuilderComp() {\n var _a;\n (_a = this.eBuilderComp) == null ? void 0 : _a.refresh();\n }\n getHeaderHeight() {\n var _a, _b;\n return (_b = (_a = this.eHeaderComp) == null ? void 0 : _a.getHeight()) != null ? _b : 0;\n }\n setInputDisabled(disabled) {\n var _a, _b;\n (_a = this.eFilterComp) == null ? void 0 : _a.setInputDisabled(disabled);\n (_b = this.eHeaderComp) == null ? void 0 : _b.setInputDisabled(disabled);\n }\n toggleFilterBuilder(source, force) {\n if (force && this.eBuilderDialog || force === false && !this.eBuilderDialog) {\n return;\n }\n if (this.eBuilderDialog) {\n this.builderDestroySource = source;\n this.destroyBean(this.eBuilderDialog);\n return;\n }\n this.setInputDisabled(true);\n const { width, height, minWidth } = this.getBuilderDialogSize();\n this.eBuilderComp = this.createBean(new AdvancedFilterBuilderComp());\n this.eBuilderDialog = this.createBean(new AgDialog({\n title: this.advancedFilterExpressionService.translate(\"advancedFilterBuilderTitle\"),\n component: this.eBuilderComp,\n width,\n height,\n resizable: true,\n movable: true,\n maximizable: true,\n centered: true,\n closable: true,\n minWidth,\n afterGuiAttached: () => {\n var _a;\n return (_a = this.eBuilderComp) == null ? void 0 : _a.afterGuiAttached();\n }\n }));\n this.dispatchFilterBuilderVisibleChangedEvent(source, true);\n this.eBuilderDialog.addEventListener(AgDialog.EVENT_DESTROYED, () => {\n var _a;\n this.destroyBean(this.eBuilderComp);\n this.eBuilderComp = void 0;\n this.eBuilderDialog = void 0;\n this.setInputDisabled(false);\n this.dispatchEvent({\n type: _AdvancedFilterCtrl2.EVENT_BUILDER_CLOSED\n });\n this.dispatchFilterBuilderVisibleChangedEvent((_a = this.builderDestroySource) != null ? _a : \"ui\", false);\n this.builderDestroySource = void 0;\n });\n }\n dispatchFilterBuilderVisibleChangedEvent(source, visible) {\n const event = {\n type: Events5.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED,\n source,\n visible\n };\n this.eventService.dispatchEvent(event);\n }\n getBuilderDialogSize() {\n var _a, _b;\n const minWidth = (_b = (_a = this.gos.get(\"advancedFilterBuilderParams\")) == null ? void 0 : _a.minWidth) != null ? _b : 500;\n const popupParent = this.popupService.getPopupParent();\n const maxWidth = Math.round(_11.getAbsoluteWidth(popupParent)) - 2;\n const maxHeight = Math.round(_11.getAbsoluteHeight(popupParent) * 0.75) - 2;\n const width = Math.min(Math.max(600, minWidth), maxWidth);\n const height = Math.min(600, maxHeight);\n return { width, height, minWidth };\n }\n onEnabledChanged(enabled) {\n this.enabled = enabled;\n this.updateComps();\n }\n updateComps() {\n this.setAdvancedFilterComp();\n this.setHeaderCompEnabled();\n this.eventService.dispatchEvent({\n type: Events5.EVENT_HEADER_HEIGHT_CHANGED\n });\n }\n setAdvancedFilterComp() {\n this.destroyAdvancedFilterComp();\n if (!this.enabled) {\n return;\n }\n const advancedFilterParent = this.gos.get(\"advancedFilterParent\");\n this.hasAdvancedFilterParent = !!advancedFilterParent;\n if (advancedFilterParent) {\n const eAdvancedFilterComp = this.createBean(new AdvancedFilterComp());\n const eAdvancedFilterCompGui = eAdvancedFilterComp.getGui();\n const { allThemes } = this.environment.getTheme();\n if (allThemes.length) {\n eAdvancedFilterCompGui.classList.add(...allThemes);\n }\n eAdvancedFilterCompGui.classList.add(this.gos.get(\"enableRtl\") ? \"ag-rtl\" : \"ag-ltr\");\n advancedFilterParent.appendChild(eAdvancedFilterCompGui);\n this.eFilterComp = eAdvancedFilterComp;\n }\n }\n setHeaderCompEnabled() {\n var _a;\n (_a = this.eHeaderComp) == null ? void 0 : _a.setEnabled(this.enabled && !this.hasAdvancedFilterParent);\n }\n destroyAdvancedFilterComp() {\n if (this.eFilterComp) {\n _11.removeFromParent(this.eFilterComp.getGui());\n this.destroyBean(this.eFilterComp);\n }\n }\n};\n_AdvancedFilterCtrl.EVENT_BUILDER_CLOSED = \"advancedFilterBuilderClosed\";\n__decorateClass2([\n Autowired8(\"focusService\")\n], _AdvancedFilterCtrl.prototype, \"focusService\", 2);\n__decorateClass2([\n Autowired8(\"ctrlsService\")\n], _AdvancedFilterCtrl.prototype, \"ctrlsService\", 2);\n__decorateClass2([\n Autowired8(\"popupService\")\n], _AdvancedFilterCtrl.prototype, \"popupService\", 2);\n__decorateClass2([\n Autowired8(\"advancedFilterExpressionService\")\n], _AdvancedFilterCtrl.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n PostConstruct8\n], _AdvancedFilterCtrl.prototype, \"postConstruct\", 1);\nvar AdvancedFilterCtrl = _AdvancedFilterCtrl;\nvar AdvancedFilterComp = class extends Component8 {\n constructor() {\n super(\n /* html */\n `\n
\n \n \n \n
`\n );\n this.expressionParser = null;\n this.isApplyDisabled = true;\n this.builderOpen = false;\n }\n postConstruct() {\n this.eAutocomplete.setListGenerator((_value, position) => this.generateAutocompleteListParams(position)).setValidator(() => this.validateValue()).setForceLastSelection((lastSelection, searchString) => this.forceLastSelection(lastSelection, searchString)).setInputAriaLabel(this.advancedFilterExpressionService.translate(\"ariaAdvancedFilterInput\")).setListAriaLabel(this.advancedFilterExpressionService.translate(\"ariaLabelAdvancedFilterAutocomplete\"));\n this.refresh();\n this.addManagedListener(\n this.eAutocomplete,\n AgAutocomplete.EVENT_VALUE_CHANGED,\n ({ value }) => this.onValueChanged(value)\n );\n this.addManagedListener(\n this.eAutocomplete,\n AgAutocomplete.EVENT_VALUE_CONFIRMED,\n ({ isValid }) => this.onValueConfirmed(isValid)\n );\n this.addManagedListener(\n this.eAutocomplete,\n AgAutocomplete.EVENT_OPTION_SELECTED,\n ({ position, updateEntry, autocompleteType }) => this.onOptionSelected(position, updateEntry, autocompleteType)\n );\n this.addManagedListener(\n this.eAutocomplete,\n AgAutocomplete.EVENT_VALID_CHANGED,\n ({ isValid, validationMessage }) => this.onValidChanged(isValid, validationMessage)\n );\n this.setupApplyButton();\n this.setupBuilderButton();\n }\n refresh() {\n const expression = this.advancedFilterService.getExpressionDisplayValue();\n this.eAutocomplete.setValue({ value: expression != null ? expression : \"\", position: expression == null ? void 0 : expression.length, updateListOnlyIfOpen: true });\n }\n setInputDisabled(disabled) {\n this.eAutocomplete.setInputDisabled(disabled);\n _12.setDisabled(this.eApplyFilterButton, disabled || this.isApplyDisabled);\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"advancedFilter\";\n return res;\n }\n setupApplyButton() {\n this.eApplyFilterButton.innerText = this.advancedFilterExpressionService.translate(\"advancedFilterApply\");\n this.activateTabIndex([this.eApplyFilterButton]);\n this.addManagedListener(this.eApplyFilterButton, \"click\", () => this.onValueConfirmed(this.eAutocomplete.isValid()));\n _12.setDisabled(this.eApplyFilterButton, this.isApplyDisabled);\n }\n setupBuilderButton() {\n this.eBuilderFilterButtonIcon.appendChild(_12.createIconNoSpan(\"advancedFilterBuilder\", this.gos));\n this.eBuilderFilterButtonLabel.innerText = this.advancedFilterExpressionService.translate(\"advancedFilterBuilder\");\n this.activateTabIndex([this.eBuilderFilterButton]);\n this.addManagedListener(this.eBuilderFilterButton, \"click\", () => this.openBuilder());\n this.addManagedListener(this.advancedFilterService.getCtrl(), AdvancedFilterCtrl.EVENT_BUILDER_CLOSED, () => this.closeBuilder());\n }\n onValueChanged(value) {\n var _a;\n value = _12.makeNull(value);\n this.advancedFilterService.setExpressionDisplayValue(value);\n this.expressionParser = this.advancedFilterService.createExpressionParser(value);\n const updatedExpression = (_a = this.expressionParser) == null ? void 0 : _a.parseExpression();\n if (updatedExpression && updatedExpression !== value) {\n this.eAutocomplete.setValue({ value: updatedExpression, silent: true, restoreFocus: true });\n }\n }\n onValueConfirmed(isValid) {\n if (!isValid || this.isApplyDisabled) {\n return;\n }\n _12.setDisabled(this.eApplyFilterButton, true);\n this.advancedFilterService.applyExpression();\n this.filterManager.onFilterChanged({ source: \"advancedFilter\" });\n }\n onOptionSelected(position, updateEntry, type) {\n const { updatedValue, updatedPosition, hideAutocomplete } = this.updateExpression(position, updateEntry, type);\n this.eAutocomplete.setValue({\n value: updatedValue,\n position: updatedPosition,\n updateListOnlyIfOpen: hideAutocomplete,\n restoreFocus: true\n });\n }\n validateValue() {\n var _a, _b, _c;\n return ((_a = this.expressionParser) == null ? void 0 : _a.isValid()) ? null : (_c = (_b = this.expressionParser) == null ? void 0 : _b.getValidationMessage()) != null ? _c : null;\n }\n onValidChanged(isValid, validationMessage) {\n this.isApplyDisabled = !isValid || this.advancedFilterService.isCurrentExpressionApplied();\n _12.setDisabled(this.eApplyFilterButton, this.isApplyDisabled);\n this.setTooltip({\n newTooltipText: validationMessage,\n showDelayOverride: 1e3\n });\n }\n generateAutocompleteListParams(position) {\n return this.expressionParser ? this.expressionParser.getAutocompleteListParams(position) : this.advancedFilterExpressionService.getDefaultAutocompleteListParams(\"\");\n }\n updateExpression(position, updateEntry, type) {\n var _a, _b;\n this.advancedFilterExpressionService.updateAutocompleteCache(updateEntry, type);\n return (_b = (_a = this.expressionParser) == null ? void 0 : _a.updateExpression(position, updateEntry, type)) != null ? _b : this.advancedFilterService.getDefaultExpression(updateEntry);\n }\n forceLastSelection({ key, displayValue }, searchString) {\n return !!searchString.toLocaleLowerCase().match(`^${(displayValue != null ? displayValue : key).toLocaleLowerCase()}\\\\s*$`);\n }\n openBuilder() {\n if (this.builderOpen) {\n return;\n }\n this.builderOpen = true;\n _12.setDisabled(this.eBuilderFilterButton, true);\n this.advancedFilterService.getCtrl().toggleFilterBuilder(\"ui\");\n }\n closeBuilder() {\n if (!this.builderOpen) {\n return;\n }\n this.builderOpen = false;\n _12.setDisabled(this.eBuilderFilterButton, false);\n this.eBuilderFilterButton.focus();\n }\n};\n__decorateClass2([\n RefSelector5(\"eAutocomplete\")\n], AdvancedFilterComp.prototype, \"eAutocomplete\", 2);\n__decorateClass2([\n RefSelector5(\"eApplyFilterButton\")\n], AdvancedFilterComp.prototype, \"eApplyFilterButton\", 2);\n__decorateClass2([\n RefSelector5(\"eBuilderFilterButton\")\n], AdvancedFilterComp.prototype, \"eBuilderFilterButton\", 2);\n__decorateClass2([\n RefSelector5(\"eBuilderFilterButtonIcon\")\n], AdvancedFilterComp.prototype, \"eBuilderFilterButtonIcon\", 2);\n__decorateClass2([\n RefSelector5(\"eBuilderFilterButtonLabel\")\n], AdvancedFilterComp.prototype, \"eBuilderFilterButtonLabel\", 2);\n__decorateClass2([\n Autowired9(\"advancedFilterService\")\n], AdvancedFilterComp.prototype, \"advancedFilterService\", 2);\n__decorateClass2([\n Autowired9(\"advancedFilterExpressionService\")\n], AdvancedFilterComp.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n Autowired9(\"filterManager\")\n], AdvancedFilterComp.prototype, \"filterManager\", 2);\n__decorateClass2([\n PostConstruct9\n], AdvancedFilterComp.prototype, \"postConstruct\", 1);\nvar ADVANCED_FILTER_LOCALE_TEXT = {\n ariaAdvancedFilterBuilderItem: (variableValues) => `${variableValues[0]}. Level ${variableValues[1]}. Press ENTER to edit.`,\n ariaAdvancedFilterBuilderItemValidation: (variableValues) => `${variableValues[0]}. Level ${variableValues[1]}. ${variableValues[2]} Press ENTER to edit.`,\n ariaAdvancedFilterBuilderList: \"Advanced Filter Builder List\",\n ariaAdvancedFilterBuilderFilterItem: \"Filter Condition\",\n ariaAdvancedFilterBuilderGroupItem: \"Filter Group\",\n ariaAdvancedFilterBuilderColumn: \"Column\",\n ariaAdvancedFilterBuilderOption: \"Option\",\n ariaAdvancedFilterBuilderValue: \"Value\",\n ariaAdvancedFilterBuilderJoinOperator: \"Join Operator\",\n ariaAdvancedFilterInput: \"Advanced Filter Input\",\n ariaLabelAdvancedFilterAutocomplete: \"Advanced Filter Autocomplete\",\n advancedFilterContains: \"contains\",\n advancedFilterNotContains: \"does not contain\",\n advancedFilterTextEquals: \"equals\",\n advancedFilterTextNotEqual: \"does not equal\",\n advancedFilterStartsWith: \"begins with\",\n advancedFilterEndsWith: \"ends with\",\n advancedFilterBlank: \"is blank\",\n advancedFilterNotBlank: \"is not blank\",\n advancedFilterEquals: \"=\",\n advancedFilterNotEqual: \"!=\",\n advancedFilterGreaterThan: \">\",\n advancedFilterGreaterThanOrEqual: \">=\",\n advancedFilterLessThan: \"<\",\n advancedFilterLessThanOrEqual: \"<=\",\n advancedFilterTrue: \"is true\",\n advancedFilterFalse: \"is false\",\n advancedFilterAnd: \"AND\",\n advancedFilterOr: \"OR\",\n advancedFilterApply: \"Apply\",\n advancedFilterBuilder: \"Builder\",\n advancedFilterValidationMissingColumn: \"Column is missing\",\n advancedFilterValidationMissingOption: \"Option is missing\",\n advancedFilterValidationMissingValue: \"Value is missing\",\n advancedFilterValidationInvalidColumn: \"Column not found\",\n advancedFilterValidationInvalidOption: \"Option not found\",\n advancedFilterValidationMissingQuote: \"Value is missing an end quote\",\n advancedFilterValidationNotANumber: \"Value is not a number\",\n advancedFilterValidationInvalidDate: \"Value is not a valid date\",\n advancedFilterValidationMissingCondition: \"Condition is missing\",\n advancedFilterValidationJoinOperatorMismatch: \"Join operators within a condition must be the same\",\n advancedFilterValidationInvalidJoinOperator: \"Join operator not found\",\n advancedFilterValidationMissingEndBracket: \"Missing end bracket\",\n advancedFilterValidationExtraEndBracket: \"Too many end brackets\",\n advancedFilterValidationMessage: (variableValues) => `Expression has an error. ${variableValues[0]} - ${variableValues[1]}.`,\n advancedFilterValidationMessageAtEnd: (variableValues) => `Expression has an error. ${variableValues[0]} at end of expression.`,\n advancedFilterBuilderTitle: \"Advanced Filter\",\n advancedFilterBuilderApply: \"Apply\",\n advancedFilterBuilderCancel: \"Cancel\",\n advancedFilterBuilderAddButtonTooltip: \"Add Filter or Group\",\n advancedFilterBuilderRemoveButtonTooltip: \"Remove\",\n advancedFilterBuilderMoveUpButtonTooltip: \"Move Up\",\n advancedFilterBuilderMoveDownButtonTooltip: \"Move Down\",\n advancedFilterBuilderAddJoin: \"Add Group\",\n advancedFilterBuilderAddCondition: \"Add Filter\",\n advancedFilterBuilderSelectColumn: \"Select a column\",\n advancedFilterBuilderSelectOption: \"Select an option\",\n advancedFilterBuilderEnterValue: \"Enter a value...\",\n advancedFilterBuilderValidationAlreadyApplied: \"Current filter already applied.\",\n advancedFilterBuilderValidationIncomplete: \"Not all conditions are complete.\",\n advancedFilterBuilderValidationSelectColumn: \"Must select a column.\",\n advancedFilterBuilderValidationSelectOption: \"Must select an option.\",\n advancedFilterBuilderValidationEnterValue: \"Must enter a value.\"\n};\nfunction getSearchString(value, position, endPosition) {\n if (!value) {\n return \"\";\n }\n const numChars = endPosition - position;\n return numChars ? value.slice(0, value.length - numChars) : value;\n}\nfunction updateExpression(expression, startPosition, endPosition, updatedValuePart, appendSpace, appendQuote, empty) {\n const secondPartStartPosition = endPosition + (!expression.length || empty ? 0 : 1);\n let positionOffset = 0;\n if (appendSpace) {\n if (expression[secondPartStartPosition] === \" \") {\n positionOffset = 1;\n } else {\n updatedValuePart += \" \";\n if (appendQuote) {\n updatedValuePart += `\"`;\n }\n }\n }\n const updatedValue = expression.slice(0, startPosition) + updatedValuePart + expression.slice(secondPartStartPosition);\n return { updatedValue, updatedPosition: startPosition + updatedValuePart.length + positionOffset };\n}\nfunction findStartPosition(expression, position, endPosition) {\n let startPosition = position;\n while (startPosition < endPosition) {\n const char = expression[startPosition];\n if (char !== \" \") {\n break;\n }\n startPosition++;\n }\n return startPosition;\n}\nfunction findEndPosition(expression, position, includeCloseBracket, isStartPositionUnknown) {\n let endPosition = position;\n let isEmpty = false;\n while (endPosition < expression.length) {\n const char = expression[endPosition];\n if (char === \"(\") {\n if (isStartPositionUnknown && expression[endPosition - 1] === \" \") {\n isEmpty = true;\n } else {\n endPosition = endPosition - 1;\n }\n break;\n } else if (char === \" \" || includeCloseBracket && char === \")\") {\n endPosition = endPosition - 1;\n break;\n }\n endPosition++;\n }\n return { endPosition, isEmpty };\n}\nfunction checkAndUpdateExpression(params, userValue, displayValue, endPosition) {\n if (displayValue !== userValue) {\n params.expression = updateExpression(\n params.expression,\n endPosition - userValue.length + 1,\n endPosition,\n displayValue\n ).updatedValue;\n }\n}\nfunction escapeQuotes(value) {\n return value.replace(/(['\"])/, \"\\\\$1\");\n}\nvar ColumnParser = class {\n constructor(params, startPosition) {\n this.params = params;\n this.startPosition = startPosition;\n this.type = \"column\";\n this.valid = true;\n this.hasStartChar = false;\n this.hasEndChar = false;\n this.colName = \"\";\n }\n parse(char, position) {\n if (char === ColFilterExpressionParser.COL_START_CHAR && !this.colName) {\n this.hasStartChar = true;\n } else if (char === ColFilterExpressionParser.COL_END_CHAR && this.hasStartChar) {\n const isMatch = this.parseColumn(false, position);\n if (isMatch) {\n this.hasEndChar = true;\n return false;\n } else {\n this.colName += char;\n }\n } else {\n this.colName += char;\n }\n return void 0;\n }\n getDisplayValue() {\n return (this.hasStartChar ? ColFilterExpressionParser.COL_START_CHAR : \"\") + this.colName + (this.hasEndChar ? ColFilterExpressionParser.COL_END_CHAR : \"\");\n }\n getColId() {\n return this.colId;\n }\n complete(position) {\n this.parseColumn(true, position);\n }\n getValidationError() {\n var _a;\n return this.valid ? null : {\n message: this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationInvalidColumn\"),\n startPosition: this.startPosition,\n endPosition: (_a = this.endPosition) != null ? _a : this.params.expression.length - 1\n };\n }\n parseColumn(fromComplete, endPosition) {\n var _a;\n this.endPosition = endPosition;\n const colValue = this.params.advancedFilterExpressionService.getColId(this.colName);\n if (colValue && this.hasStartChar) {\n this.colId = colValue.colId;\n checkAndUpdateExpression(this.params, this.colName, colValue.columnName, endPosition - 1);\n this.colName = colValue.columnName;\n this.column = this.params.columnModel.getPrimaryColumn(this.colId);\n if (this.column) {\n this.baseCellDataType = (_a = this.params.dataTypeService.getBaseDataType(this.column)) != null ? _a : \"text\";\n return true;\n }\n }\n if (fromComplete) {\n this.valid = false;\n }\n this.baseCellDataType = \"text\";\n return false;\n }\n};\nvar OperatorParser = class {\n constructor(params, startPosition, baseCellDataType) {\n this.params = params;\n this.startPosition = startPosition;\n this.baseCellDataType = baseCellDataType;\n this.type = \"operator\";\n this.valid = true;\n this.expectedNumOperands = 0;\n this.operator = \"\";\n }\n parse(char, position) {\n if (char === \" \" || char === \")\") {\n const isMatch = this.parseOperator(false, position - 1);\n if (isMatch) {\n return true;\n } else {\n this.operator += char;\n }\n } else {\n this.operator += char;\n }\n return void 0;\n }\n complete(position) {\n this.parseOperator(true, position);\n }\n getValidationError() {\n var _a;\n return this.valid ? null : {\n message: this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationInvalidOption\"),\n startPosition: this.startPosition,\n endPosition: (_a = this.endPosition) != null ? _a : this.params.expression.length - 1\n };\n }\n getDisplayValue() {\n return this.operator;\n }\n getOperatorKey() {\n return this.parsedOperator;\n }\n parseOperator(fromComplete, endPosition) {\n const operatorForType = this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType);\n const parsedOperator = operatorForType.findOperator(this.operator);\n this.endPosition = endPosition;\n if (parsedOperator) {\n this.parsedOperator = parsedOperator;\n const operator = operatorForType.operators[parsedOperator];\n this.expectedNumOperands = operator.numOperands;\n const operatorDisplayValue = operator.displayValue;\n checkAndUpdateExpression(this.params, this.operator, operatorDisplayValue, endPosition);\n this.operator = operatorDisplayValue;\n return true;\n }\n const isPartialMatch = parsedOperator === null;\n if (fromComplete || !isPartialMatch) {\n this.valid = false;\n }\n return false;\n }\n};\nvar OperandParser = class {\n constructor(params, startPosition, baseCellDataType, column) {\n this.params = params;\n this.startPosition = startPosition;\n this.baseCellDataType = baseCellDataType;\n this.column = column;\n this.type = \"operand\";\n this.valid = true;\n this.operand = \"\";\n this.validationMessage = null;\n }\n parse(char, position) {\n if (char === \" \") {\n if (this.quotes) {\n this.operand += char;\n } else {\n this.parseOperand(false, position);\n return true;\n }\n } else if (char === \")\") {\n if (this.baseCellDataType === \"number\" || !this.quotes) {\n this.parseOperand(false, position - 1);\n return true;\n } else {\n this.operand += char;\n }\n } else if (!this.operand && !this.quotes && (char === `'` || char === `\"`)) {\n this.quotes = char;\n } else if (this.quotes && char === this.quotes) {\n this.parseOperand(false, position);\n return false;\n } else {\n this.operand += char;\n }\n return void 0;\n }\n complete(position) {\n this.parseOperand(true, position);\n }\n getValidationError() {\n var _a;\n return this.validationMessage ? {\n message: this.validationMessage,\n startPosition: this.startPosition,\n endPosition: (_a = this.endPosition) != null ? _a : this.params.expression.length - 1\n } : null;\n }\n getRawValue() {\n return this.operand;\n }\n getModelValue() {\n return this.modelValue;\n }\n parseOperand(fromComplete, position) {\n const { advancedFilterExpressionService } = this.params;\n this.endPosition = position;\n this.modelValue = this.operand;\n if (fromComplete && this.quotes) {\n this.valid = false;\n this.validationMessage = advancedFilterExpressionService.translate(\"advancedFilterValidationMissingQuote\");\n } else if (this.modelValue === \"\") {\n this.valid = false;\n this.validationMessage = advancedFilterExpressionService.translate(\"advancedFilterValidationMissingValue\");\n } else {\n const modelValue = advancedFilterExpressionService.getOperandModelValue(this.operand, this.baseCellDataType, this.column);\n if (modelValue != null) {\n this.modelValue = modelValue;\n }\n switch (this.baseCellDataType) {\n case \"number\":\n if (this.quotes || isNaN(this.modelValue)) {\n this.valid = false;\n this.validationMessage = advancedFilterExpressionService.translate(\"advancedFilterValidationNotANumber\");\n }\n break;\n case \"date\":\n case \"dateString\":\n if (modelValue == null) {\n this.valid = false;\n this.validationMessage = advancedFilterExpressionService.translate(\"advancedFilterValidationInvalidDate\");\n }\n break;\n }\n }\n }\n};\nvar ColFilterExpressionParser = class {\n constructor(params, startPosition) {\n this.params = params;\n this.startPosition = startPosition;\n this.isAwaiting = true;\n }\n parseExpression() {\n var _a, _b;\n let i = this.startPosition;\n const { expression } = this.params;\n while (i < expression.length) {\n const char = expression[i];\n if (char === \" \" && this.isAwaiting) {\n } else {\n this.isAwaiting = false;\n if (!this.parser) {\n let parser;\n if (!this.columnParser) {\n this.columnParser = new ColumnParser(this.params, i);\n parser = this.columnParser;\n } else if (!this.operatorParser) {\n this.operatorParser = new OperatorParser(this.params, i, this.columnParser.baseCellDataType);\n parser = this.operatorParser;\n } else {\n this.operandParser = new OperandParser(this.params, i, this.columnParser.baseCellDataType, this.columnParser.column);\n parser = this.operandParser;\n }\n this.parser = parser;\n }\n const hasCompletedOnPrevChar = this.parser.parse(char, i);\n if (hasCompletedOnPrevChar != null) {\n if (this.isComplete()) {\n return this.returnEndPosition(hasCompletedOnPrevChar ? i - 1 : i, true);\n }\n this.parser = void 0;\n this.isAwaiting = true;\n }\n }\n i++;\n }\n (_b = (_a = this.parser) == null ? void 0 : _a.complete) == null ? void 0 : _b.call(_a, i - 1);\n return this.returnEndPosition(i);\n }\n isValid() {\n return this.isComplete() && this.columnParser.valid && this.operatorParser.valid && (!this.operandParser || this.operandParser.valid);\n }\n getValidationError() {\n var _a, _b, _c, _d, _e;\n const validationError = (_e = (_c = (_a = this.columnParser) == null ? void 0 : _a.getValidationError()) != null ? _c : (_b = this.operatorParser) == null ? void 0 : _b.getValidationError()) != null ? _e : (_d = this.operandParser) == null ? void 0 : _d.getValidationError();\n if (validationError) {\n return validationError;\n }\n const endPosition = this.params.expression.length;\n let translateKey;\n if (!this.columnParser) {\n translateKey = \"advancedFilterValidationMissingColumn\";\n } else if (!this.operatorParser) {\n translateKey = \"advancedFilterValidationMissingOption\";\n } else if (this.operatorParser.expectedNumOperands && !this.operandParser) {\n translateKey = \"advancedFilterValidationMissingValue\";\n }\n if (translateKey) {\n return {\n message: this.params.advancedFilterExpressionService.translate(translateKey),\n startPosition: endPosition,\n endPosition\n };\n }\n return null;\n }\n getFunctionString(params) {\n return this.getFunctionCommon(params, (operandIndex, operatorIndex, colId, evaluatorParamsIndex) => {\n const escapedColId = escapeQuotes(colId);\n const operand = operandIndex == null ? \"\" : `, params.operands[${operandIndex}]`;\n return `params.operators[${operatorIndex}].evaluator(expressionProxy.getValue('${escapedColId}', node), node, params.evaluatorParams[${evaluatorParamsIndex}]${operand})`;\n });\n }\n getFunctionParsed(params) {\n return this.getFunctionCommon(params, (operandIndex, operatorIndex, colId, evaluatorParamsIndex) => {\n return (expressionProxy, node, p) => p.operators[operatorIndex].evaluator(\n expressionProxy.getValue(colId, node),\n node,\n p.evaluatorParams[evaluatorParamsIndex],\n operandIndex == null ? void 0 : p.operands[operandIndex]\n );\n });\n }\n getAutocompleteListParams(position) {\n if (this.isColumnPosition(position)) {\n return this.getColumnAutocompleteListParams(position);\n }\n if (this.isOperatorPosition(position)) {\n return this.getOperatorAutocompleteListParams(position);\n }\n if (this.isBeyondEndPosition(position)) {\n return void 0;\n }\n return { enabled: false };\n }\n updateExpression(position, updateEntry, type) {\n var _a, _b, _c, _d, _e;\n const { expression } = this.params;\n if (this.isColumnPosition(position)) {\n return updateExpression(\n this.params.expression,\n this.startPosition,\n ((_a = this.columnParser) == null ? void 0 : _a.getColId()) ? this.columnParser.endPosition : findEndPosition(expression, position).endPosition,\n this.params.advancedFilterExpressionService.getColumnValue(updateEntry),\n true\n );\n } else if (this.isOperatorPosition(position)) {\n const baseCellDataType = this.getBaseCellDataTypeFromOperatorAutocompleteType(type);\n const hasOperand = this.hasOperand(baseCellDataType, updateEntry.key);\n const doesOperandNeedQuotes = hasOperand && this.doesOperandNeedQuotes(baseCellDataType);\n let update;\n if (((_b = this.operatorParser) == null ? void 0 : _b.startPosition) != null && position < this.operatorParser.startPosition) {\n update = updateExpression(\n expression,\n position,\n position,\n (_c = updateEntry.displayValue) != null ? _c : updateEntry.key,\n hasOperand,\n doesOperandNeedQuotes\n );\n } else {\n let endPosition;\n let empty = false;\n if ((_d = this.operatorParser) == null ? void 0 : _d.getOperatorKey()) {\n endPosition = this.operatorParser.endPosition;\n } else {\n const { endPosition: calculatedEndPosition, isEmpty } = findEndPosition(expression, position, true, true);\n endPosition = calculatedEndPosition;\n empty = isEmpty;\n }\n update = updateExpression(\n expression,\n findStartPosition(expression, this.columnParser.endPosition + 1, endPosition),\n endPosition,\n (_e = updateEntry.displayValue) != null ? _e : updateEntry.key,\n hasOperand,\n doesOperandNeedQuotes,\n empty\n );\n }\n return __spreadProps(__spreadValues({}, update), { hideAutocomplete: !hasOperand });\n }\n return null;\n }\n getModel() {\n const colId = this.columnParser.getColId();\n const model = {\n filterType: this.columnParser.baseCellDataType,\n colId,\n type: this.operatorParser.getOperatorKey()\n };\n if (this.operatorParser.expectedNumOperands) {\n model.filter = this.operandParser.getModelValue();\n }\n return model;\n }\n getFunctionCommon(params, processFunc) {\n var _a, _b;\n const colId = this.columnParser.getColId();\n const operator = (_a = this.operatorParser) == null ? void 0 : _a.getOperatorKey();\n const { operators, evaluatorParams, operands } = params;\n const operatorForColumn = this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType, operator);\n const operatorIndex = this.addToListAndGetIndex(operators, operatorForColumn);\n const evaluatorParamsForColumn = this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(colId);\n const evaluatorParamsIndex = this.addToListAndGetIndex(evaluatorParams, evaluatorParamsForColumn);\n const operandIndex = ((_b = this.operatorParser) == null ? void 0 : _b.expectedNumOperands) === 0 ? void 0 : this.addToListAndGetIndex(operands, this.getOperandValue());\n return processFunc(operandIndex, operatorIndex, colId, evaluatorParamsIndex);\n }\n getOperandValue() {\n let operand = this.operandParser.getRawValue();\n const { baseCellDataType, column } = this.columnParser;\n switch (baseCellDataType) {\n case \"number\":\n operand = Number(operand);\n break;\n case \"date\":\n case \"dateString\":\n operand = this.params.valueService.parseValue(column, null, operand, void 0);\n break;\n }\n if (baseCellDataType === \"dateString\") {\n return this.params.dataTypeService.getDateParserFunction(column)(operand);\n }\n return operand;\n }\n isComplete() {\n return !!(this.operatorParser && (!this.operatorParser.expectedNumOperands || this.operatorParser.expectedNumOperands && this.operandParser));\n }\n isColumnPosition(position) {\n return !this.columnParser || this.columnParser.endPosition == null || position <= this.columnParser.endPosition + 1;\n }\n isOperatorPosition(position) {\n return !this.operatorParser || this.operatorParser.endPosition == null || position <= this.operatorParser.endPosition + 1;\n }\n isBeyondEndPosition(position) {\n return this.isComplete() && this.endPosition != null && position > this.endPosition + 1 && this.endPosition + 1 < this.params.expression.length;\n }\n returnEndPosition(returnPosition, treatAsEnd) {\n this.endPosition = treatAsEnd ? returnPosition : returnPosition - 1;\n return returnPosition;\n }\n getColumnAutocompleteListParams(position) {\n return this.params.advancedFilterExpressionService.generateAutocompleteListParams(\n this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),\n \"column\",\n this.getColumnSearchString(position)\n );\n }\n getColumnSearchString(position) {\n var _a, _b, _c, _d, _e;\n const columnName = (_b = (_a = this.columnParser) == null ? void 0 : _a.getDisplayValue()) != null ? _b : \"\";\n const searchString = getSearchString(\n columnName,\n position,\n ((_c = this.columnParser) == null ? void 0 : _c.endPosition) == null ? this.params.expression.length : this.columnParser.endPosition + 1\n );\n const containsStartChar = ((_d = this.columnParser) == null ? void 0 : _d.hasStartChar) && searchString.length > 0;\n const containsEndChar = ((_e = this.columnParser) == null ? void 0 : _e.hasEndChar) && searchString.length === columnName.length + 2;\n if (containsStartChar) {\n return searchString.slice(1, containsEndChar ? -1 : void 0);\n }\n return searchString;\n }\n getOperatorAutocompleteListParams(position) {\n var _a, _b, _c, _d, _e;\n const column = (_a = this.columnParser) == null ? void 0 : _a.column;\n if (!column) {\n return { enabled: false };\n }\n const baseCellDataType = this.columnParser.baseCellDataType;\n const searchString = ((_b = this.operatorParser) == null ? void 0 : _b.startPosition) != null && position < this.operatorParser.startPosition ? \"\" : getSearchString(\n (_d = (_c = this.operatorParser) == null ? void 0 : _c.getDisplayValue()) != null ? _d : \"\",\n position,\n ((_e = this.operatorParser) == null ? void 0 : _e.endPosition) == null ? this.params.expression.length : this.operatorParser.endPosition + 1\n );\n return this.params.advancedFilterExpressionService.generateAutocompleteListParams(\n this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(column, baseCellDataType),\n `operator-${baseCellDataType}`,\n searchString\n );\n }\n getBaseCellDataTypeFromOperatorAutocompleteType(type) {\n return type == null ? void 0 : type.replace(\"operator-\", \"\");\n }\n hasOperand(baseCellDataType, operator) {\n var _a, _b;\n return !baseCellDataType || !operator || ((_b = (_a = this.params.advancedFilterExpressionService.getExpressionOperator(baseCellDataType, operator)) == null ? void 0 : _a.numOperands) != null ? _b : 0) > 0;\n }\n doesOperandNeedQuotes(baseCellDataType) {\n return baseCellDataType !== \"number\";\n }\n addToListAndGetIndex(list, value) {\n const index = list.length;\n list.push(value);\n return index;\n }\n};\nColFilterExpressionParser.COL_START_CHAR = \"[\";\nColFilterExpressionParser.COL_END_CHAR = \"]\";\nfunction findMatch(searchValue, values, getDisplayValue) {\n let partialMatch = false;\n const searchValueLowerCase = searchValue.toLocaleLowerCase();\n const partialSearchValue = searchValueLowerCase + \" \";\n const parsedValue = Object.entries(values).find(([_key, value]) => {\n const displayValueLowerCase = getDisplayValue(value).toLocaleLowerCase();\n if (displayValueLowerCase.startsWith(partialSearchValue)) {\n partialMatch = true;\n }\n return displayValueLowerCase === searchValueLowerCase;\n });\n if (parsedValue) {\n return parsedValue[0];\n } else if (partialMatch) {\n return null;\n } else {\n return void 0;\n }\n}\nfunction getEntries(operators, activeOperatorKeys) {\n const keys = activeOperatorKeys != null ? activeOperatorKeys : Object.keys(operators);\n return keys.map((key) => ({\n key,\n displayValue: operators[key].displayValue\n }));\n}\nvar TextFilterExpressionOperators = class {\n constructor(params) {\n this.params = params;\n this.initOperators();\n }\n getEntries(activeOperators) {\n return getEntries(this.operators, activeOperators);\n }\n findOperator(displayValue) {\n return findMatch(displayValue, this.operators, ({ displayValue: displayValue2 }) => displayValue2);\n }\n initOperators() {\n const { translate } = this.params;\n this.operators = {\n contains: {\n displayValue: translate(\"advancedFilterContains\"),\n evaluator: (value, node, params, operand1) => this.evaluateExpression(value, node, params, operand1, false, (v, o) => v.includes(o)),\n numOperands: 1\n },\n notContains: {\n displayValue: translate(\"advancedFilterNotContains\"),\n evaluator: (value, node, params, operand1) => this.evaluateExpression(value, node, params, operand1, true, (v, o) => !v.includes(o)),\n numOperands: 1\n },\n equals: {\n displayValue: translate(\"advancedFilterTextEquals\"),\n evaluator: (value, node, params, operand1) => this.evaluateExpression(value, node, params, operand1, false, (v, o) => v === o),\n numOperands: 1\n },\n notEqual: {\n displayValue: translate(\"advancedFilterTextNotEqual\"),\n evaluator: (value, node, params, operand1) => this.evaluateExpression(value, node, params, operand1, true, (v, o) => v != o),\n numOperands: 1\n },\n startsWith: {\n displayValue: translate(\"advancedFilterStartsWith\"),\n evaluator: (value, node, params, operand1) => this.evaluateExpression(value, node, params, operand1, false, (v, o) => v.startsWith(o)),\n numOperands: 1\n },\n endsWith: {\n displayValue: translate(\"advancedFilterEndsWith\"),\n evaluator: (value, node, params, operand1) => this.evaluateExpression(value, node, params, operand1, false, (v, o) => v.endsWith(o)),\n numOperands: 1\n },\n blank: {\n displayValue: translate(\"advancedFilterBlank\"),\n evaluator: (value) => value == null || typeof value === \"string\" && value.trim().length === 0,\n numOperands: 0\n },\n notBlank: {\n displayValue: translate(\"advancedFilterNotBlank\"),\n evaluator: (value) => value != null && (typeof value !== \"string\" || value.trim().length > 0),\n numOperands: 0\n }\n };\n }\n evaluateExpression(value, node, params, operand, nullsMatch, expression) {\n if (value == null) {\n return nullsMatch;\n }\n return params.caseSensitive ? expression(params.valueConverter(value, node), operand) : expression(params.valueConverter(value, node).toLocaleLowerCase(), operand.toLocaleLowerCase());\n }\n};\nvar ScalarFilterExpressionOperators = class {\n constructor(params) {\n this.params = params;\n this.initOperators();\n }\n getEntries(activeOperators) {\n return getEntries(this.operators, activeOperators);\n }\n findOperator(displayValue) {\n return findMatch(displayValue, this.operators, ({ displayValue: displayValue2 }) => displayValue2);\n }\n initOperators() {\n const { translate, equals } = this.params;\n this.operators = {\n equals: {\n displayValue: translate(\"advancedFilterEquals\"),\n evaluator: (value, node, params, operand1) => this.evaluateSingleOperandExpression(value, node, params, operand1, !!params.includeBlanksInEquals, equals),\n numOperands: 1\n },\n notEqual: {\n displayValue: translate(\"advancedFilterNotEqual\"),\n evaluator: (value, node, params, operand1) => this.evaluateSingleOperandExpression(value, node, params, operand1, !!params.includeBlanksInEquals, (v, o) => !equals(v, o)),\n numOperands: 1\n },\n greaterThan: {\n displayValue: translate(\"advancedFilterGreaterThan\"),\n evaluator: (value, node, params, operand1) => this.evaluateSingleOperandExpression(value, node, params, operand1, !!params.includeBlanksInGreaterThan, (v, o) => v > o),\n numOperands: 1\n },\n greaterThanOrEqual: {\n displayValue: translate(\"advancedFilterGreaterThanOrEqual\"),\n evaluator: (value, node, params, operand1) => this.evaluateSingleOperandExpression(value, node, params, operand1, !!params.includeBlanksInGreaterThan, (v, o) => v >= o),\n numOperands: 1\n },\n lessThan: {\n displayValue: translate(\"advancedFilterLessThan\"),\n evaluator: (value, node, params, operand1) => this.evaluateSingleOperandExpression(value, node, params, operand1, !!params.includeBlanksInLessThan, (v, o) => v < o),\n numOperands: 1\n },\n lessThanOrEqual: {\n displayValue: translate(\"advancedFilterLessThanOrEqual\"),\n evaluator: (value, node, params, operand1) => this.evaluateSingleOperandExpression(value, node, params, operand1, !!params.includeBlanksInLessThan, (v, o) => v <= o),\n numOperands: 1\n },\n blank: {\n displayValue: translate(\"advancedFilterBlank\"),\n evaluator: (value) => value == null,\n numOperands: 0\n },\n notBlank: {\n displayValue: translate(\"advancedFilterNotBlank\"),\n evaluator: (value) => value != null,\n numOperands: 0\n }\n };\n }\n evaluateSingleOperandExpression(value, node, params, operand, nullsMatch, expression) {\n if (value == null) {\n return nullsMatch;\n }\n return expression(params.valueConverter(value, node), operand);\n }\n};\nvar BooleanFilterExpressionOperators = class {\n constructor(params) {\n this.params = params;\n this.initOperators();\n }\n getEntries(activeOperators) {\n return getEntries(this.operators, activeOperators);\n }\n findOperator(displayValue) {\n return findMatch(displayValue, this.operators, ({ displayValue: displayValue2 }) => displayValue2);\n }\n initOperators() {\n const { translate } = this.params;\n this.operators = {\n true: {\n displayValue: translate(\"advancedFilterTrue\"),\n evaluator: (value) => !!value,\n numOperands: 0\n },\n false: {\n displayValue: translate(\"advancedFilterFalse\"),\n evaluator: (value) => value === false,\n numOperands: 0\n },\n blank: {\n displayValue: translate(\"advancedFilterBlank\"),\n evaluator: (value) => value == null,\n numOperands: 0\n },\n notBlank: {\n displayValue: translate(\"advancedFilterNotBlank\"),\n evaluator: (value) => value != null,\n numOperands: 0\n }\n };\n }\n};\nvar AdvancedFilterExpressionService = class extends BeanStub4 {\n constructor() {\n super(...arguments);\n this.columnNameToIdMap = {};\n this.columnAutocompleteEntries = null;\n this.expressionEvaluatorParams = {};\n }\n postConstruct() {\n this.expressionJoinOperators = this.generateExpressionJoinOperators();\n this.expressionOperators = this.generateExpressionOperators();\n }\n parseJoinOperator(model) {\n var _a;\n const { type } = model;\n return (_a = this.expressionJoinOperators[type]) != null ? _a : type;\n }\n getColumnDisplayValue(model) {\n const { colId } = model;\n const columnEntries = this.getColumnAutocompleteEntries();\n const columnEntry = columnEntries.find(({ key }) => key === colId);\n let columnName;\n if (columnEntry) {\n columnName = columnEntry.displayValue;\n this.columnNameToIdMap[columnName.toLocaleUpperCase()] = { colId, columnName };\n } else {\n columnName = colId;\n }\n return columnName;\n }\n getOperatorDisplayValue(model) {\n var _a, _b;\n return (_b = (_a = this.getExpressionOperator(model.filterType, model.type)) == null ? void 0 : _a.displayValue) != null ? _b : model.type;\n }\n getOperandModelValue(operand, baseCellDataType, column) {\n var _a;\n switch (baseCellDataType) {\n case \"number\":\n return _13.exists(operand) ? Number(operand) : null;\n case \"date\":\n return _13.serialiseDate(this.valueService.parseValue(column, null, operand, void 0), false);\n case \"dateString\":\n const parsedDateString = this.valueService.parseValue(column, null, operand, void 0);\n return _13.serialiseDate((_a = this.dataTypeService.getDateParserFunction(column)(parsedDateString)) != null ? _a : null, false);\n }\n return operand;\n }\n getOperandDisplayValue(model, skipFormatting) {\n var _a, _b;\n const { colId, filter } = model;\n const column = this.columnModel.getPrimaryColumn(colId);\n let operand = \"\";\n if (filter != null) {\n let operand1;\n switch (model.filterType) {\n case \"number\":\n operand1 = (_a = _13.toStringOrNull(filter)) != null ? _a : \"\";\n break;\n case \"date\":\n const dateValue = _13.parseDateTimeFromString(filter);\n operand1 = column ? this.valueService.formatValue(column, null, dateValue) : null;\n break;\n case \"dateString\":\n const dateStringDateValue = _13.parseDateTimeFromString(filter);\n const dateStringStringValue = column ? this.dataTypeService.getDateFormatterFunction(column)(dateStringDateValue != null ? dateStringDateValue : void 0) : null;\n operand1 = column ? this.valueService.formatValue(column, null, dateStringStringValue) : null;\n break;\n }\n if (model.filterType !== \"number\") {\n operand1 = (_b = operand1 != null ? operand1 : _13.toStringOrNull(filter)) != null ? _b : \"\";\n if (!skipFormatting) {\n operand1 = `\"${operand1}\"`;\n }\n }\n operand = skipFormatting ? operand1 : ` ${operand1}`;\n }\n return operand;\n }\n parseColumnFilterModel(model) {\n var _a, _b;\n const columnName = (_a = this.getColumnDisplayValue(model)) != null ? _a : \"\";\n const operator = (_b = this.getOperatorDisplayValue(model)) != null ? _b : \"\";\n const operands = this.getOperandDisplayValue(model);\n return `[${columnName}] ${operator}${operands}`;\n }\n updateAutocompleteCache(updateEntry, type) {\n if (type === \"column\") {\n const { key: colId, displayValue } = updateEntry;\n this.columnNameToIdMap[updateEntry.displayValue.toLocaleUpperCase()] = { colId, columnName: displayValue };\n }\n }\n translate(key, variableValues) {\n let defaultValue = ADVANCED_FILTER_LOCALE_TEXT[key];\n if (typeof defaultValue === \"function\") {\n defaultValue = defaultValue(variableValues);\n }\n return this.localeService.getLocaleTextFunc()(key, defaultValue, variableValues);\n }\n generateAutocompleteListParams(entries, type, searchString) {\n return {\n enabled: true,\n type,\n searchString,\n entries\n };\n }\n getColumnAutocompleteEntries() {\n var _a;\n if (this.columnAutocompleteEntries) {\n return this.columnAutocompleteEntries;\n }\n const columns = (_a = this.columnModel.getAllPrimaryColumns()) != null ? _a : [];\n const entries = [];\n const includeHiddenColumns = this.gos.get(\"includeHiddenColumnsInAdvancedFilter\");\n columns.forEach((column) => {\n if (column.getColDef().filter && (includeHiddenColumns || column.isVisible() || column.isRowGroupActive())) {\n entries.push({\n key: column.getColId(),\n displayValue: this.columnModel.getDisplayNameForColumn(column, \"advancedFilter\")\n });\n }\n });\n entries.sort((a, b) => {\n var _a2, _b;\n const aValue = (_a2 = a.displayValue) != null ? _a2 : \"\";\n const bValue = (_b = b.displayValue) != null ? _b : \"\";\n if (aValue < bValue) {\n return -1;\n } else if (bValue > aValue) {\n return 1;\n }\n return 0;\n });\n return entries;\n }\n getOperatorAutocompleteEntries(column, baseCellDataType) {\n const activeOperators = this.getActiveOperators(column);\n return this.getDataTypeExpressionOperator(baseCellDataType).getEntries(activeOperators);\n }\n getJoinOperatorAutocompleteEntries() {\n return Object.entries(this.expressionJoinOperators).map(([key, displayValue]) => ({ key, displayValue }));\n }\n getDefaultAutocompleteListParams(searchString) {\n return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(), \"column\", searchString);\n }\n getDataTypeExpressionOperator(baseCellDataType) {\n return this.expressionOperators[baseCellDataType];\n }\n getExpressionOperator(baseCellDataType, operator) {\n var _a, _b;\n return (_b = (_a = this.getDataTypeExpressionOperator(baseCellDataType)) == null ? void 0 : _a.operators) == null ? void 0 : _b[operator];\n }\n getExpressionJoinOperators() {\n return this.expressionJoinOperators;\n }\n getColId(columnName) {\n const upperCaseColumnName = columnName.toLocaleUpperCase();\n const cachedColId = this.columnNameToIdMap[upperCaseColumnName];\n if (cachedColId) {\n return cachedColId;\n }\n const columnAutocompleteEntries = this.getColumnAutocompleteEntries();\n const colEntry = columnAutocompleteEntries.find(({ displayValue }) => displayValue.toLocaleUpperCase() === upperCaseColumnName);\n if (colEntry) {\n const { key: colId, displayValue } = colEntry;\n const colValue = { colId, columnName: displayValue };\n this.columnNameToIdMap[upperCaseColumnName] = colValue;\n return colValue;\n }\n return null;\n }\n getExpressionEvaluatorParams(colId) {\n let params = this.expressionEvaluatorParams[colId];\n if (params) {\n return params;\n }\n const column = this.columnModel.getPrimaryColumn(colId);\n if (!column) {\n return { valueConverter: (v) => v };\n }\n const baseCellDataType = this.dataTypeService.getBaseDataType(column);\n switch (baseCellDataType) {\n case \"dateString\":\n params = {\n valueConverter: this.dataTypeService.getDateParserFunction(column)\n };\n break;\n case \"object\":\n if (column.getColDef().filterValueGetter) {\n params = { valueConverter: (v) => v };\n } else {\n params = {\n valueConverter: (value, node) => {\n var _a;\n return (_a = this.valueService.formatValue(column, node, value)) != null ? _a : typeof value.toString === \"function\" ? value.toString() : \"\";\n }\n };\n }\n break;\n case \"text\":\n case void 0:\n params = { valueConverter: (v) => _13.toStringOrNull(v) };\n break;\n default:\n params = { valueConverter: (v) => v };\n break;\n }\n const { filterParams } = column.getColDef();\n if (filterParams) {\n [\n \"caseSensitive\",\n \"includeBlanksInEquals\",\n \"includeBlanksInLessThan\",\n \"includeBlanksInGreaterThan\"\n ].forEach((param) => {\n const paramValue = filterParams[param];\n if (paramValue) {\n params[param] = paramValue;\n }\n });\n }\n this.expressionEvaluatorParams[colId] = params;\n return params;\n }\n getColumnDetails(colId) {\n var _a, _b;\n const column = (_a = this.columnModel.getPrimaryColumn(colId)) != null ? _a : void 0;\n const baseCellDataType = (_b = column ? this.dataTypeService.getBaseDataType(column) : void 0) != null ? _b : \"text\";\n return { column, baseCellDataType };\n }\n generateExpressionOperators() {\n const translate = (key, variableValues) => this.translate(key, variableValues);\n return {\n text: new TextFilterExpressionOperators({ translate }),\n boolean: new BooleanFilterExpressionOperators({ translate }),\n object: new TextFilterExpressionOperators({ translate }),\n number: new ScalarFilterExpressionOperators({ translate, equals: (v, o) => v === o }),\n date: new ScalarFilterExpressionOperators({ translate, equals: (v, o) => v.getTime() === o.getTime() }),\n dateString: new ScalarFilterExpressionOperators({ translate, equals: (v, o) => v.getTime() === o.getTime() })\n };\n }\n getColumnValue({ displayValue }) {\n return `${ColFilterExpressionParser.COL_START_CHAR}${displayValue}${ColFilterExpressionParser.COL_END_CHAR}`;\n }\n generateExpressionJoinOperators() {\n return {\n AND: this.translate(\"advancedFilterAnd\"),\n OR: this.translate(\"advancedFilterOr\")\n };\n }\n getActiveOperators(column) {\n var _a;\n const filterOptions = (_a = column.getColDef().filterParams) == null ? void 0 : _a.filterOptions;\n if (!filterOptions) {\n return void 0;\n }\n const isValid = filterOptions.every((filterOption) => typeof filterOption === \"string\");\n return isValid ? filterOptions : void 0;\n }\n resetColumnCaches() {\n this.columnAutocompleteEntries = null;\n this.columnNameToIdMap = {};\n this.expressionEvaluatorParams = {};\n }\n};\n__decorateClass2([\n Autowired10(\"valueService\")\n], AdvancedFilterExpressionService.prototype, \"valueService\", 2);\n__decorateClass2([\n Autowired10(\"columnModel\")\n], AdvancedFilterExpressionService.prototype, \"columnModel\", 2);\n__decorateClass2([\n Autowired10(\"dataTypeService\")\n], AdvancedFilterExpressionService.prototype, \"dataTypeService\", 2);\n__decorateClass2([\n PostConstruct10\n], AdvancedFilterExpressionService.prototype, \"postConstruct\", 1);\nAdvancedFilterExpressionService = __decorateClass2([\n Bean2(\"advancedFilterExpressionService\")\n], AdvancedFilterExpressionService);\nvar OperatorParser2 = class {\n constructor(params) {\n this.params = params;\n this.operators = [];\n this.operatorStartPositions = [];\n this.operatorEndPositions = [];\n this.activeOperator = 0;\n this.validationError = null;\n }\n parseExpression(i) {\n this.operators.push(\"\");\n this.operatorStartPositions.push(i);\n this.operatorEndPositions.push(void 0);\n const { expression } = this.params;\n while (i < expression.length) {\n const char = expression[i];\n if (char === \" \") {\n const isComplete = this.parseOperator(i - 1);\n if (isComplete) {\n this.activeOperator++;\n return i - 1;\n } else {\n this.operators[this.activeOperator] += char;\n }\n } else {\n this.operators[this.activeOperator] += char;\n }\n i++;\n }\n this.parseOperator(i - 1);\n return i;\n }\n isValid() {\n return !this.validationError && (!this.operators.length || !!this.parsedOperator);\n }\n getValidationError() {\n return this.validationError;\n }\n getFunction() {\n return this.parsedOperator === \"OR\" ? \"||\" : \"&&\";\n }\n getModel() {\n return this.parsedOperator === \"OR\" ? \"OR\" : \"AND\";\n }\n getAutocompleteListParams(position, operatorIndex) {\n let searchString;\n if (operatorIndex == null) {\n searchString = \"\";\n } else {\n const operator = this.operators[operatorIndex];\n const operatorEndPosition = this.operatorEndPositions[operatorIndex];\n searchString = getSearchString(\n operator,\n position,\n operatorEndPosition == null ? this.params.expression.length : operatorEndPosition + 1\n );\n }\n let entries = this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();\n if (operatorIndex || operatorIndex == null && this.activeOperator) {\n entries = entries.filter(({ key }) => key === this.parsedOperator);\n }\n return this.params.advancedFilterExpressionService.generateAutocompleteListParams(entries, \"join\", searchString);\n }\n updateExpression(position, updateEntry, operatorIndex) {\n var _a, _b;\n let { expression } = this.params;\n const updatedValuePart = (_a = updateEntry.displayValue) != null ? _a : updateEntry.key;\n if (operatorIndex === 0) {\n for (let i = this.operatorEndPositions.length - 1; i > 0; i--) {\n const operatorEndPosition = this.operatorEndPositions[i];\n if (operatorEndPosition == null) {\n continue;\n }\n expression = updateExpression(\n expression,\n this.operatorStartPositions[i],\n operatorEndPosition,\n updatedValuePart\n ).updatedValue;\n }\n }\n const startPosition = this.operatorStartPositions.length > operatorIndex ? this.operatorStartPositions[operatorIndex] : position;\n const endPosition = (_b = this.operatorEndPositions.length > operatorIndex ? this.operatorEndPositions[operatorIndex] : void 0) != null ? _b : findEndPosition(expression, position, true).endPosition;\n return updateExpression(\n expression,\n startPosition,\n endPosition,\n updatedValuePart,\n true\n );\n }\n getNumOperators() {\n return this.operators.length;\n }\n getLastOperatorEndPosition() {\n return this.operatorEndPositions[this.operatorEndPositions.length - 1];\n }\n parseOperator(endPosition) {\n const operator = this.operators.length > this.activeOperator ? this.operators[this.activeOperator] : \"\";\n const joinOperators = this.params.advancedFilterExpressionService.getExpressionJoinOperators();\n const parsedValue = findMatch(operator, joinOperators, (v) => v);\n if (parsedValue) {\n this.operatorEndPositions[this.activeOperator] = endPosition;\n const displayValue = joinOperators[parsedValue];\n if (this.activeOperator) {\n if (parsedValue !== this.parsedOperator) {\n if (!this.validationError) {\n this.validationError = {\n message: this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationJoinOperatorMismatch\"),\n startPosition: endPosition - operator.length + 1,\n endPosition\n };\n }\n return false;\n }\n } else {\n this.parsedOperator = parsedValue;\n }\n if (operator !== displayValue) {\n checkAndUpdateExpression(this.params, operator, displayValue, endPosition);\n this.operators[this.activeOperator] = displayValue;\n }\n return true;\n } else if (parsedValue === null) {\n return false;\n } else {\n if (!this.validationError) {\n this.validationError = {\n message: this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationInvalidJoinOperator\"),\n startPosition: endPosition - operator.length + 1,\n endPosition\n };\n }\n return true;\n }\n }\n};\nvar JoinFilterExpressionParser = class _JoinFilterExpressionParser {\n constructor(params, startPosition) {\n this.params = params;\n this.startPosition = startPosition;\n this.expectingExpression = true;\n this.expectingOperator = false;\n this.expressionParsers = [];\n this.operatorParser = new OperatorParser2(this.params);\n this.missingEndBracket = false;\n this.extraEndBracket = false;\n }\n parseExpression() {\n let i = this.startPosition;\n const { expression } = this.params;\n while (i < expression.length) {\n const char = expression[i];\n if (char === \"(\" && !this.expectingOperator) {\n const nestedParser = new _JoinFilterExpressionParser(this.params, i + 1);\n i = nestedParser.parseExpression();\n this.expressionParsers.push(nestedParser);\n this.expectingExpression = false;\n this.expectingOperator = true;\n } else if (char === \")\") {\n this.endPosition = i - 1;\n if (this.startPosition === 0) {\n this.extraEndBracket = true;\n }\n return i;\n } else if (char === \" \") {\n } else if (this.expectingExpression) {\n const nestedParser = new ColFilterExpressionParser(this.params, i);\n i = nestedParser.parseExpression();\n this.expressionParsers.push(nestedParser);\n this.expectingExpression = false;\n this.expectingOperator = true;\n } else if (this.expectingOperator) {\n i = this.operatorParser.parseExpression(i);\n this.expectingOperator = false;\n this.expectingExpression = true;\n }\n i++;\n }\n if (this.startPosition > 0) {\n this.missingEndBracket = true;\n }\n return i;\n }\n isValid() {\n return !this.missingEndBracket && !this.extraEndBracket && this.expressionParsers.length === this.operatorParser.getNumOperators() + 1 && this.operatorParser.isValid() && this.expressionParsers.every((expressionParser) => expressionParser.isValid());\n }\n getValidationError() {\n const operatorError = this.operatorParser.getValidationError();\n for (let i = 0; i < this.expressionParsers.length; i++) {\n const expressionError = this.expressionParsers[i].getValidationError();\n if (expressionError) {\n return operatorError && operatorError.startPosition < expressionError.startPosition ? operatorError : expressionError;\n }\n }\n ;\n if (operatorError) {\n return operatorError;\n }\n if (this.extraEndBracket) {\n return {\n message: this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationExtraEndBracket\"),\n startPosition: this.endPosition + 1,\n endPosition: this.endPosition + 1\n };\n }\n let translateKey;\n if (this.expressionParsers.length === this.operatorParser.getNumOperators()) {\n translateKey = \"advancedFilterValidationMissingCondition\";\n } else if (this.missingEndBracket) {\n translateKey = \"advancedFilterValidationMissingEndBracket\";\n }\n if (translateKey) {\n return {\n message: this.params.advancedFilterExpressionService.translate(translateKey),\n startPosition: this.params.expression.length,\n endPosition: this.params.expression.length\n };\n }\n return null;\n }\n getFunctionString(params) {\n const hasMultipleExpressions = this.expressionParsers.length > 1;\n const expression = this.expressionParsers.map(\n (expressionParser) => expressionParser.getFunctionString(params)\n ).join(\n ` ${this.operatorParser.getFunction()} `\n );\n return hasMultipleExpressions ? `(${expression})` : expression;\n }\n getFunctionParsed(params) {\n const operator = this.operatorParser.getFunction();\n const funcs = this.expressionParsers.map((expressionParser) => expressionParser.getFunctionParsed(params));\n const arrayFunc = operator === \"&&\" ? \"every\" : \"some\";\n return (expressionProxy, node, p) => funcs[arrayFunc]((func) => func(expressionProxy, node, p));\n }\n getAutocompleteListParams(position) {\n if (this.endPosition != null && position > this.endPosition + 1) {\n return void 0;\n }\n if (!this.expressionParsers.length) {\n return this.getColumnAutocompleteListParams();\n }\n const expressionParserIndex = this.getExpressionParserIndex(position);\n if (expressionParserIndex == null) {\n if (this.params.expression[position] === \"(\") {\n return { enabled: false };\n }\n return this.getColumnAutocompleteListParams();\n }\n const expressionParser = this.expressionParsers[expressionParserIndex];\n const autocompleteType = expressionParser.getAutocompleteListParams(position);\n if (!autocompleteType) {\n if (expressionParserIndex < this.expressionParsers.length - 1) {\n return this.operatorParser.getAutocompleteListParams(position, expressionParserIndex);\n }\n if (this.expressionParsers.length === this.operatorParser.getNumOperators()) {\n const operatorEndPosition = this.operatorParser.getLastOperatorEndPosition();\n return operatorEndPosition == null || position <= operatorEndPosition + 1 ? this.operatorParser.getAutocompleteListParams(position, this.operatorParser.getNumOperators() - 1) : this.getColumnAutocompleteListParams();\n }\n if (this.params.expression[position - 1] === \")\") {\n return { enabled: false };\n }\n return this.operatorParser.getAutocompleteListParams(position);\n }\n return autocompleteType;\n }\n updateExpression(position, updateEntry, type) {\n var _a;\n const expression = this.params.expression;\n const expressionParserIndex = this.getExpressionParserIndex(position);\n if (expressionParserIndex == null) {\n const updatedValuePart = type === \"column\" ? this.params.advancedFilterExpressionService.getColumnValue(updateEntry) : (_a = updateEntry.displayValue) != null ? _a : updateEntry.key;\n return updateExpression(expression, this.startPosition, this.startPosition, updatedValuePart, true);\n }\n const expressionParser = this.expressionParsers[expressionParserIndex];\n const updatedExpression = expressionParser.updateExpression(position, updateEntry, type);\n if (updatedExpression == null) {\n if (type === \"column\") {\n return updateExpression(\n expression,\n position,\n expression.length - 1,\n this.params.advancedFilterExpressionService.getColumnValue(updateEntry),\n true\n );\n } else if (this.endPosition != null && position > this.endPosition + 1) {\n return null;\n } else {\n return this.operatorParser.updateExpression(position, updateEntry, expressionParserIndex);\n }\n }\n return updatedExpression;\n }\n getModel() {\n if (this.expressionParsers.length > 1) {\n return {\n filterType: \"join\",\n type: this.operatorParser.getModel(),\n conditions: this.expressionParsers.map((parser) => parser.getModel())\n };\n } else {\n return this.expressionParsers[0].getModel();\n }\n }\n getColumnAutocompleteListParams() {\n return this.params.advancedFilterExpressionService.generateAutocompleteListParams(\n this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),\n \"column\",\n \"\"\n );\n }\n getExpressionParserIndex(position) {\n let expressionParserIndex;\n for (let i = 0; i < this.expressionParsers.length; i++) {\n const expressionParserToCheck = this.expressionParsers[i];\n if (expressionParserToCheck.startPosition > position) {\n break;\n }\n expressionParserIndex = i;\n }\n return expressionParserIndex;\n }\n};\nvar FilterExpressionParser = class {\n constructor(params) {\n this.params = params;\n this.valid = false;\n }\n parseExpression() {\n this.joinExpressionParser = new JoinFilterExpressionParser(this.params, 0);\n const i = this.joinExpressionParser.parseExpression();\n this.valid = i >= this.params.expression.length - 1 && this.joinExpressionParser.isValid();\n return this.params.expression;\n }\n isValid() {\n return this.valid;\n }\n getValidationMessage() {\n const error = this.joinExpressionParser.getValidationError();\n if (!error) {\n return null;\n }\n const { message, startPosition, endPosition } = error;\n return startPosition < this.params.expression.length ? this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationMessage\", [\n message,\n this.params.expression.slice(startPosition, endPosition + 1).trim()\n ]) : this.params.advancedFilterExpressionService.translate(\"advancedFilterValidationMessageAtEnd\", [message]);\n }\n getFunctionString() {\n const params = this.createFunctionParams();\n return {\n functionString: `return ${this.joinExpressionParser.getFunctionString(params)};`,\n params\n };\n }\n getFunctionParsed() {\n const params = this.createFunctionParams();\n return {\n expressionFunction: this.joinExpressionParser.getFunctionParsed(params),\n params\n };\n }\n getAutocompleteListParams(position) {\n var _a;\n return (_a = this.joinExpressionParser.getAutocompleteListParams(position)) != null ? _a : { enabled: false };\n }\n updateExpression(position, updateEntry, type) {\n return this.joinExpressionParser.updateExpression(position, updateEntry, type);\n }\n getModel() {\n return this.isValid() ? this.joinExpressionParser.getModel() : null;\n }\n createFunctionParams() {\n return {\n operands: [],\n operators: [],\n evaluatorParams: []\n };\n }\n};\nvar AdvancedFilterService = class extends BeanStub5 {\n constructor() {\n super(...arguments);\n this.appliedExpression = null;\n this.expression = null;\n this.isValid = true;\n }\n postConstruct() {\n this.setEnabled(this.gos.get(\"enableAdvancedFilter\"), true);\n this.ctrl = this.createManagedBean(new AdvancedFilterCtrl(this.enabled));\n this.expressionProxy = {\n getValue: (colId, node) => {\n const column = this.columnModel.getPrimaryColumn(colId);\n return column ? this.valueService.getValue(column, node, true) : void 0;\n }\n };\n this.addManagedPropertyListener(\"enableAdvancedFilter\", (event) => this.setEnabled(!!event.currentValue));\n this.addManagedListener(\n this.eventService,\n Events6.EVENT_NEW_COLUMNS_LOADED,\n (event) => this.onNewColumnsLoaded(event)\n );\n this.addManagedPropertyListener(\"includeHiddenColumnsInAdvancedFilter\", () => this.updateValidity());\n }\n isEnabled() {\n return this.enabled;\n }\n isFilterPresent() {\n return !!this.expressionFunction;\n }\n doesFilterPass(node) {\n return this.expressionFunction(this.expressionProxy, node, this.expressionParams);\n }\n getModel() {\n var _a;\n const expressionParser = this.createExpressionParser(this.appliedExpression);\n expressionParser == null ? void 0 : expressionParser.parseExpression();\n return (_a = expressionParser == null ? void 0 : expressionParser.getModel()) != null ? _a : null;\n }\n setModel(model) {\n const parseModel = (model2, isFirstParent) => {\n if (model2.filterType === \"join\") {\n const operator = this.advancedFilterExpressionService.parseJoinOperator(model2);\n const expression2 = model2.conditions.map((condition) => parseModel(condition)).filter((condition) => _14.exists(condition)).join(` ${operator} `);\n return isFirstParent || model2.conditions.length <= 1 ? expression2 : `(${expression2})`;\n } else {\n return this.advancedFilterExpressionService.parseColumnFilterModel(model2);\n }\n };\n const expression = model ? parseModel(model, true) : null;\n this.setExpressionDisplayValue(expression);\n this.applyExpression();\n this.ctrl.refreshComp();\n this.ctrl.refreshBuilderComp();\n }\n getExpressionDisplayValue() {\n return this.expression;\n }\n setExpressionDisplayValue(expression) {\n this.expression = expression;\n }\n isCurrentExpressionApplied() {\n return this.appliedExpression === this.expression;\n }\n createExpressionParser(expression) {\n if (!expression) {\n return null;\n }\n return new FilterExpressionParser({\n expression,\n columnModel: this.columnModel,\n dataTypeService: this.dataTypeService,\n valueService: this.valueService,\n advancedFilterExpressionService: this.advancedFilterExpressionService\n });\n }\n getDefaultExpression(updateEntry) {\n const updatedValue = this.advancedFilterExpressionService.getColumnValue(updateEntry) + \" \";\n return {\n updatedValue,\n updatedPosition: updatedValue.length\n };\n }\n isHeaderActive() {\n return !this.gos.get(\"advancedFilterParent\");\n }\n getCtrl() {\n return this.ctrl;\n }\n setEnabled(enabled, silent) {\n const previousValue = this.enabled;\n const rowModelType = this.rowModel.getType();\n const isValidRowModel = rowModelType === \"clientSide\" || rowModelType === \"serverSide\";\n if (enabled && !rowModelType) {\n _14.warnOnce(\"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.\");\n }\n this.enabled = enabled && isValidRowModel;\n if (!silent && this.enabled !== previousValue) {\n const event = {\n type: Events6.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,\n enabled: this.enabled\n };\n this.eventService.dispatchEvent(event);\n }\n }\n applyExpression() {\n const expressionParser = this.createExpressionParser(this.expression);\n expressionParser == null ? void 0 : expressionParser.parseExpression();\n this.applyExpressionFromParser(expressionParser);\n }\n applyExpressionFromParser(expressionParser) {\n this.isValid = !expressionParser || expressionParser.isValid();\n if (!expressionParser || !this.isValid) {\n this.expressionFunction = null;\n this.expressionParams = null;\n this.appliedExpression = null;\n return;\n }\n const { expressionFunction, params } = this.getFunction(expressionParser);\n this.expressionFunction = expressionFunction;\n this.expressionParams = params;\n this.appliedExpression = this.expression;\n }\n getFunction(expressionParser) {\n if (this.gos.get(\"suppressAdvancedFilterEval\")) {\n return expressionParser.getFunctionParsed();\n } else {\n const { functionString, params } = expressionParser.getFunctionString();\n return {\n expressionFunction: new Function(\"expressionProxy\", \"node\", \"params\", functionString),\n params\n };\n }\n }\n updateValidity() {\n this.advancedFilterExpressionService.resetColumnCaches();\n const expressionParser = this.createExpressionParser(this.expression);\n expressionParser == null ? void 0 : expressionParser.parseExpression();\n const isValid = !expressionParser || expressionParser.isValid();\n const updatedValidity = isValid !== this.isValid;\n this.applyExpressionFromParser(expressionParser);\n this.ctrl.refreshComp();\n this.ctrl.refreshBuilderComp();\n return updatedValidity;\n }\n onNewColumnsLoaded(event) {\n if (event.source !== \"gridInitializing\" || !this.dataTypeService.isPendingInference()) {\n return;\n }\n this.ctrl.setInputDisabled(true);\n const destroyFunc = this.addManagedListener(this.eventService, Events6.EVENT_DATA_TYPES_INFERRED, () => {\n destroyFunc == null ? void 0 : destroyFunc();\n this.ctrl.setInputDisabled(false);\n });\n }\n};\n__decorateClass2([\n Autowired11(\"valueService\")\n], AdvancedFilterService.prototype, \"valueService\", 2);\n__decorateClass2([\n Autowired11(\"columnModel\")\n], AdvancedFilterService.prototype, \"columnModel\", 2);\n__decorateClass2([\n Autowired11(\"dataTypeService\")\n], AdvancedFilterService.prototype, \"dataTypeService\", 2);\n__decorateClass2([\n Autowired11(\"rowModel\")\n], AdvancedFilterService.prototype, \"rowModel\", 2);\n__decorateClass2([\n Autowired11(\"advancedFilterExpressionService\")\n], AdvancedFilterService.prototype, \"advancedFilterExpressionService\", 2);\n__decorateClass2([\n PostConstruct11\n], AdvancedFilterService.prototype, \"postConstruct\", 1);\nAdvancedFilterService = __decorateClass2([\n Bean22(\"advancedFilterService\")\n], AdvancedFilterService);\nvar VERSION2 = \"31.3.2\";\nvar AdvancedFilterModule = {\n version: VERSION2,\n moduleName: ModuleNames2.AdvancedFilterModule,\n beans: [AdvancedFilterService, AdvancedFilterExpressionService],\n agStackComponents: [\n { componentName: \"agAdvancedFilter\", componentClass: AdvancedFilterComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/charts/dist/package/main.esm.mjs\nvar main_esm_exports = {};\n__export(main_esm_exports, {\n GridChartsModule: () => GridChartsModule,\n __FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT: () => __FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT,\n agCharts: () => agCharts\n});\nimport { ModuleNames as ModuleNames22 } from \"ag-grid-community\";\n\n// enterprise-modules/range-selection/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames3 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired12,\n Bean as Bean3,\n Events as Events7,\n PostConstruct as PostConstruct12,\n BeanStub as BeanStub6,\n AutoScrollService,\n CellCtrl,\n _ as _6\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired33,\n Events as Events22,\n SelectionHandleType as SelectionHandleType2,\n _ as _32\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired23,\n Component as Component9,\n PostConstruct as PostConstruct23,\n _ as _23,\n SelectionHandleType\n} from \"ag-grid-community\";\nimport {\n CellRangeType,\n SelectionHandleType as SelectionHandleType3,\n _ as _42\n} from \"ag-grid-community\";\nimport { Bean as Bean23, BeanStub as BeanStub23, SelectionHandleType as SelectionHandleType4 } from \"ag-grid-community\";\nvar __defProp3 = Object.defineProperty;\nvar __defProps2 = Object.defineProperties;\nvar __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp2 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp3.call(b, prop))\n __defNormalProp2(a, prop, b[prop]);\n if (__getOwnPropSymbols2)\n for (var prop of __getOwnPropSymbols2(b)) {\n if (__propIsEnum2.call(b, prop))\n __defNormalProp2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));\nvar __decorateClass3 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc3(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp3(target, key, result);\n return result;\n};\nvar RangeService = class extends BeanStub6 {\n constructor() {\n super(...arguments);\n this.cellRanges = [];\n this.bodyScrollListener = this.onBodyScroll.bind(this);\n this.dragging = false;\n this.intersectionRange = false;\n }\n init() {\n this.addManagedListener(this.eventService, Events7.EVENT_NEW_COLUMNS_LOADED, () => this.onColumnsChanged());\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_VISIBLE, this.onColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_VALUE_CHANGED, this.onColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_PIVOT_MODE_CHANGED, () => this.removeAllCellRanges());\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_ROW_GROUP_CHANGED, () => this.removeAllCellRanges());\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_PIVOT_CHANGED, () => this.removeAllCellRanges());\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_GROUP_OPENED, this.refreshLastRangeStart.bind(this));\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_MOVED, this.refreshLastRangeStart.bind(this));\n this.addManagedListener(this.eventService, Events7.EVENT_COLUMN_PINNED, this.refreshLastRangeStart.bind(this));\n this.ctrlsService.whenReady((p) => {\n const gridBodyCtrl = p.gridBodyCtrl;\n this.autoScrollService = new AutoScrollService({\n scrollContainer: gridBodyCtrl.getBodyViewportElement(),\n scrollAxis: \"xy\",\n getVerticalPosition: () => gridBodyCtrl.getScrollFeature().getVScrollPosition().top,\n setVerticalPosition: (position) => gridBodyCtrl.getScrollFeature().setVerticalScrollPosition(position),\n getHorizontalPosition: () => gridBodyCtrl.getScrollFeature().getHScrollPosition().left,\n setHorizontalPosition: (position) => gridBodyCtrl.getScrollFeature().setHorizontalScrollPosition(position),\n shouldSkipVerticalScroll: () => !this.gos.isDomLayout(\"normal\"),\n shouldSkipHorizontalScroll: () => !gridBodyCtrl.getScrollFeature().isHorizontalScrollShowing()\n });\n });\n }\n // Called for both columns loaded & column visibility events\n onColumnsChanged() {\n this.refreshLastRangeStart();\n const allColumns = this.columnModel.getAllDisplayedColumns();\n this.cellRanges.forEach((cellRange) => {\n const beforeCols = cellRange.columns;\n cellRange.columns = cellRange.columns.filter(\n (col) => col.isVisible() && allColumns.indexOf(col) !== -1\n );\n const colsInRangeChanged = !_6.areEqual(beforeCols, cellRange.columns);\n if (colsInRangeChanged) {\n this.dispatchChangedEvent(false, true, cellRange.id);\n }\n });\n const countBefore = this.cellRanges.length;\n this.cellRanges = this.cellRanges.filter((range) => range.columns.length > 0);\n if (countBefore > this.cellRanges.length) {\n this.dispatchChangedEvent(false, true);\n }\n }\n refreshLastRangeStart() {\n const lastRange = _6.last(this.cellRanges);\n if (!lastRange) {\n return;\n }\n this.refreshRangeStart(lastRange);\n }\n isContiguousRange(cellRange) {\n const rangeColumns = cellRange.columns;\n if (!rangeColumns.length) {\n return false;\n }\n const allColumns = this.columnModel.getAllDisplayedColumns();\n const allPositions = rangeColumns.map((c) => allColumns.indexOf(c)).sort((a, b) => a - b);\n return _6.last(allPositions) - allPositions[0] + 1 === rangeColumns.length;\n }\n getRangeStartRow(cellRange) {\n if (cellRange.startRow && cellRange.endRow) {\n return this.rowPositionUtils.before(cellRange.startRow, cellRange.endRow) ? cellRange.startRow : cellRange.endRow;\n }\n const rowPinned = this.pinnedRowModel.getPinnedTopRowCount() > 0 ? \"top\" : null;\n return { rowIndex: 0, rowPinned };\n }\n getRangeEndRow(cellRange) {\n if (cellRange.startRow && cellRange.endRow) {\n return this.rowPositionUtils.before(cellRange.startRow, cellRange.endRow) ? cellRange.endRow : cellRange.startRow;\n }\n const pinnedBottomRowCount = this.pinnedRowModel.getPinnedBottomRowCount();\n const pinnedBottom = pinnedBottomRowCount > 0;\n if (pinnedBottom) {\n return {\n rowIndex: pinnedBottomRowCount - 1,\n rowPinned: \"bottom\"\n };\n }\n return {\n rowIndex: this.rowModel.getRowCount() - 1,\n rowPinned: null\n };\n }\n setRangeToCell(cell, appendRange = false) {\n if (!this.gos.get(\"enableRangeSelection\")) {\n return;\n }\n const columns = this.calculateColumnsBetween(cell.column, cell.column);\n if (!columns) {\n return;\n }\n const suppressMultiRangeSelections = this.gos.get(\"suppressMultiRangeSelection\");\n if (suppressMultiRangeSelections || !appendRange || _6.missing(this.cellRanges)) {\n this.removeAllCellRanges(true);\n }\n const rowForCell = {\n rowIndex: cell.rowIndex,\n rowPinned: cell.rowPinned\n };\n const cellRange = {\n startRow: rowForCell,\n endRow: rowForCell,\n columns,\n startColumn: cell.column\n };\n this.cellRanges.push(cellRange);\n this.setNewestRangeStartCell(cell);\n this.onDragStop();\n this.dispatchChangedEvent(true, true);\n }\n extendLatestRangeToCell(cellPosition) {\n if (this.isEmpty() || !this.newestRangeStartCell) {\n return;\n }\n const cellRange = _6.last(this.cellRanges);\n this.updateRangeEnd(cellRange, cellPosition);\n }\n updateRangeEnd(cellRange, cellPosition, silent = false) {\n const endColumn = cellPosition.column;\n const colsToAdd = this.calculateColumnsBetween(cellRange.startColumn, endColumn);\n if (!colsToAdd || this.isLastCellOfRange(cellRange, cellPosition)) {\n return;\n }\n cellRange.columns = colsToAdd;\n cellRange.endRow = { rowIndex: cellPosition.rowIndex, rowPinned: cellPosition.rowPinned };\n if (!silent) {\n this.dispatchChangedEvent(true, true, cellRange.id);\n }\n }\n refreshRangeStart(cellRange) {\n const { startColumn, columns } = cellRange;\n const moveColInCellRange = (colToMove, moveToFront) => {\n const otherCols = cellRange.columns.filter((col) => col !== colToMove);\n if (colToMove) {\n cellRange.startColumn = colToMove;\n cellRange.columns = moveToFront ? [colToMove, ...otherCols] : [...otherCols, colToMove];\n } else {\n cellRange.columns = otherCols;\n }\n };\n const { left, right } = this.getRangeEdgeColumns(cellRange);\n const shouldMoveLeftCol = startColumn === columns[0] && startColumn !== left;\n if (shouldMoveLeftCol) {\n moveColInCellRange(left, true);\n return;\n }\n const shouldMoveRightCol = startColumn === _6.last(columns) && startColumn === right;\n if (shouldMoveRightCol) {\n moveColInCellRange(right, false);\n return;\n }\n }\n getRangeEdgeColumns(cellRange) {\n const allColumns = this.columnModel.getAllDisplayedColumns();\n const allIndices = cellRange.columns.map((c) => allColumns.indexOf(c)).filter((i) => i > -1).sort((a, b) => a - b);\n return {\n left: allColumns[allIndices[0]],\n right: allColumns[_6.last(allIndices)]\n };\n }\n // returns true if successful, false if not successful\n extendLatestRangeInDirection(event) {\n if (this.isEmpty() || !this.newestRangeStartCell) {\n return;\n }\n const key = event.key;\n const ctrlKey = event.ctrlKey || event.metaKey;\n const lastRange = _6.last(this.cellRanges);\n const startCell = this.newestRangeStartCell;\n const firstCol = lastRange.columns[0];\n const lastCol = _6.last(lastRange.columns);\n const endCellIndex = lastRange.endRow.rowIndex;\n const endCellFloating = lastRange.endRow.rowPinned;\n const endCellColumn = startCell.column === firstCol ? lastCol : firstCol;\n const endCell = { column: endCellColumn, rowIndex: endCellIndex, rowPinned: endCellFloating };\n const newEndCell = this.cellNavigationService.getNextCellToFocus(key, endCell, ctrlKey);\n if (!newEndCell) {\n return;\n }\n this.setCellRange({\n rowStartIndex: startCell.rowIndex,\n rowStartPinned: startCell.rowPinned,\n rowEndIndex: newEndCell.rowIndex,\n rowEndPinned: newEndCell.rowPinned,\n columnStart: startCell.column,\n columnEnd: newEndCell.column\n });\n return newEndCell;\n }\n setCellRange(params) {\n if (!this.gos.get(\"enableRangeSelection\")) {\n return;\n }\n this.removeAllCellRanges(true);\n this.addCellRange(params);\n }\n setCellRanges(cellRanges) {\n if (_6.shallowCompare(this.cellRanges, cellRanges)) {\n return;\n }\n this.removeAllCellRanges(true);\n cellRanges.forEach((newRange) => {\n if (newRange.columns && newRange.startRow) {\n this.setNewestRangeStartCell({\n rowIndex: newRange.startRow.rowIndex,\n rowPinned: newRange.startRow.rowPinned,\n column: newRange.columns[0]\n });\n }\n this.cellRanges.push(newRange);\n });\n this.dispatchChangedEvent(false, true);\n }\n setNewestRangeStartCell(position) {\n this.newestRangeStartCell = position;\n }\n clearCellRangeCellValues(params) {\n let { cellRanges } = params;\n const {\n cellEventSource = \"rangeService\",\n dispatchWrapperEvents,\n wrapperEventSource = \"deleteKey\"\n } = params;\n if (dispatchWrapperEvents) {\n const startEvent = {\n type: Events7.EVENT_RANGE_DELETE_START,\n source: wrapperEventSource\n };\n this.eventService.dispatchEvent(startEvent);\n }\n if (!cellRanges) {\n cellRanges = this.cellRanges;\n }\n cellRanges.forEach((cellRange) => {\n this.forEachRowInRange(cellRange, (rowPosition) => {\n var _a;\n const rowNode = this.rowPositionUtils.getRowNode(rowPosition);\n if (!rowNode) {\n return;\n }\n for (let i = 0; i < cellRange.columns.length; i++) {\n const column = this.columnModel.getGridColumn(cellRange.columns[i]);\n if (!column || !column.isCellEditable(rowNode)) {\n continue;\n }\n const emptyValue = (_a = this.valueService.parseValue(column, rowNode, \"\", rowNode.getValueFromValueService(column))) != null ? _a : null;\n rowNode.setDataValue(column, emptyValue, cellEventSource);\n }\n });\n });\n if (dispatchWrapperEvents) {\n const endEvent = {\n type: Events7.EVENT_RANGE_DELETE_END,\n source: wrapperEventSource\n };\n this.eventService.dispatchEvent(endEvent);\n }\n }\n createCellRangeFromCellRangeParams(params) {\n return this.createPartialCellRangeFromRangeParams(params, false);\n }\n // Range service can't normally support a range without columns, but charts can\n createPartialCellRangeFromRangeParams(params, allowEmptyColumns) {\n let columns;\n let startsOnTheRight = false;\n if (params.columns) {\n columns = params.columns.map((c) => this.columnModel.getColumnWithValidation(c)).filter((c) => c);\n } else {\n const columnStart = this.columnModel.getColumnWithValidation(params.columnStart);\n const columnEnd = this.columnModel.getColumnWithValidation(params.columnEnd);\n if (!columnStart || !columnEnd) {\n return;\n }\n columns = this.calculateColumnsBetween(columnStart, columnEnd);\n if (columns && columns.length) {\n startsOnTheRight = columns[0] !== columnStart;\n }\n }\n if (!columns || !allowEmptyColumns && columns.length === 0) {\n return;\n }\n const startRow = params.rowStartIndex != null ? {\n rowIndex: params.rowStartIndex,\n rowPinned: params.rowStartPinned || null\n } : void 0;\n const endRow = params.rowEndIndex != null ? {\n rowIndex: params.rowEndIndex,\n rowPinned: params.rowEndPinned || null\n } : void 0;\n return {\n startRow,\n endRow,\n columns,\n startColumn: startsOnTheRight ? _6.last(columns) : columns[0]\n };\n }\n addCellRange(params) {\n if (!this.gos.get(\"enableRangeSelection\")) {\n return;\n }\n const newRange = this.createCellRangeFromCellRangeParams(params);\n if (newRange) {\n if (newRange.startRow) {\n this.setNewestRangeStartCell({\n rowIndex: newRange.startRow.rowIndex,\n rowPinned: newRange.startRow.rowPinned,\n column: newRange.startColumn\n });\n }\n this.cellRanges.push(newRange);\n this.dispatchChangedEvent(false, true, newRange.id);\n }\n }\n getCellRanges() {\n return this.cellRanges;\n }\n isEmpty() {\n return this.cellRanges.length === 0;\n }\n isMoreThanOneCell() {\n const len = this.cellRanges.length;\n if (len === 0) {\n return false;\n }\n if (len > 1) {\n return true;\n }\n const range = this.cellRanges[0];\n const startRow = this.getRangeStartRow(range);\n const endRow = this.getRangeEndRow(range);\n return startRow.rowPinned !== endRow.rowPinned || startRow.rowIndex !== endRow.rowIndex || range.columns.length !== 1;\n }\n areAllRangesAbleToMerge() {\n const rowToColumnMap = /* @__PURE__ */ new Map();\n const len = this.cellRanges.length;\n if (len <= 1)\n return true;\n this.cellRanges.forEach((range) => {\n this.forEachRowInRange(range, (row) => {\n const rowName = `${row.rowPinned || \"normal\"}_${row.rowIndex}`;\n const columns = rowToColumnMap.get(rowName);\n const currentRangeColIds = range.columns.map((col) => col.getId());\n if (columns) {\n const filteredColumns = currentRangeColIds.filter((col) => columns.indexOf(col) === -1);\n columns.push(...filteredColumns);\n } else {\n rowToColumnMap.set(rowName, currentRangeColIds);\n }\n });\n });\n let columnsString;\n for (const val of rowToColumnMap.values()) {\n const currentValString = val.sort().join();\n if (columnsString === void 0) {\n columnsString = currentValString;\n continue;\n }\n if (columnsString !== currentValString) {\n return false;\n }\n }\n return true;\n }\n forEachRowInRange(cellRange, callback) {\n const topRow = this.getRangeStartRow(cellRange);\n const bottomRow = this.getRangeEndRow(cellRange);\n let currentRow = topRow;\n while (currentRow) {\n callback(currentRow);\n if (this.rowPositionUtils.sameRow(currentRow, bottomRow)) {\n break;\n }\n currentRow = this.cellNavigationService.getRowBelow(currentRow);\n }\n }\n removeAllCellRanges(silent) {\n if (this.isEmpty()) {\n return;\n }\n this.onDragStop();\n this.cellRanges.length = 0;\n if (!silent) {\n this.dispatchChangedEvent(false, true);\n }\n }\n // as the user is dragging outside of the panel, the div starts to scroll, which in turn\n // means we are selection more (or less) cells, but the mouse isn't moving, so we recalculate\n // the selection my mimicking a new mouse event\n onBodyScroll() {\n if (this.dragging && this.lastMouseEvent) {\n this.onDragging(this.lastMouseEvent);\n }\n }\n isCellInAnyRange(cell) {\n return this.getCellRangeCount(cell) > 0;\n }\n isCellInSpecificRange(cell, range) {\n const columnInRange = range.columns !== null && _6.includes(range.columns, cell.column);\n const rowInRange = this.isRowInRange(cell.rowIndex, cell.rowPinned, range);\n return columnInRange && rowInRange;\n }\n isLastCellOfRange(cellRange, cell) {\n const { startRow, endRow } = cellRange;\n const lastRow = this.rowPositionUtils.before(startRow, endRow) ? endRow : startRow;\n const isLastRow = cell.rowIndex === lastRow.rowIndex && cell.rowPinned === lastRow.rowPinned;\n const rangeFirstIndexColumn = cellRange.columns[0];\n const rangeLastIndexColumn = _6.last(cellRange.columns);\n const lastRangeColumn = cellRange.startColumn === rangeFirstIndexColumn ? rangeLastIndexColumn : rangeFirstIndexColumn;\n const isLastColumn = cell.column === lastRangeColumn;\n return isLastColumn && isLastRow;\n }\n isBottomRightCell(cellRange, cell) {\n const allColumns = this.columnModel.getAllDisplayedColumns();\n const allPositions = cellRange.columns.map((c) => allColumns.indexOf(c)).sort((a, b) => a - b);\n const { startRow, endRow } = cellRange;\n const lastRow = this.rowPositionUtils.before(startRow, endRow) ? endRow : startRow;\n const isRightColumn = allColumns.indexOf(cell.column) === _6.last(allPositions);\n const isLastRow = cell.rowIndex === lastRow.rowIndex && _6.makeNull(cell.rowPinned) === _6.makeNull(lastRow.rowPinned);\n return isRightColumn && isLastRow;\n }\n // returns the number of ranges this cell is in\n getCellRangeCount(cell) {\n if (this.isEmpty()) {\n return 0;\n }\n return this.cellRanges.filter((cellRange) => this.isCellInSpecificRange(cell, cellRange)).length;\n }\n isRowInRange(rowIndex, floating, cellRange) {\n const firstRow = this.getRangeStartRow(cellRange);\n const lastRow = this.getRangeEndRow(cellRange);\n const thisRow = { rowIndex, rowPinned: floating || null };\n const equalsFirstRow = thisRow.rowIndex === firstRow.rowIndex && thisRow.rowPinned == firstRow.rowPinned;\n const equalsLastRow = thisRow.rowIndex === lastRow.rowIndex && thisRow.rowPinned == lastRow.rowPinned;\n if (equalsFirstRow || equalsLastRow) {\n return true;\n }\n const afterFirstRow = !this.rowPositionUtils.before(thisRow, firstRow);\n const beforeLastRow = this.rowPositionUtils.before(thisRow, lastRow);\n return afterFirstRow && beforeLastRow;\n }\n getDraggingRange() {\n return this.draggingRange;\n }\n onDragStart(mouseEvent) {\n if (!this.gos.get(\"enableRangeSelection\")) {\n return;\n }\n const { ctrlKey, metaKey, shiftKey } = mouseEvent;\n const isMultiKey = ctrlKey || metaKey;\n const allowMulti = !this.gos.get(\"suppressMultiRangeSelection\");\n const isMultiSelect = allowMulti ? isMultiKey : false;\n const extendRange = shiftKey && _6.existsAndNotEmpty(this.cellRanges);\n if (!isMultiSelect && (!extendRange || _6.exists(_6.last(this.cellRanges).type))) {\n this.removeAllCellRanges(true);\n }\n const startTarget = this.dragService.getStartTarget();\n if (startTarget) {\n this.updateValuesOnMove(startTarget);\n }\n if (!this.lastCellHovered) {\n return;\n }\n this.dragging = true;\n this.lastMouseEvent = mouseEvent;\n this.intersectionRange = isMultiSelect && this.getCellRangeCount(this.lastCellHovered) > 1;\n if (!extendRange) {\n this.setNewestRangeStartCell(this.lastCellHovered);\n }\n if (this.cellRanges.length > 0) {\n this.draggingRange = _6.last(this.cellRanges);\n } else {\n const mouseRowPosition = {\n rowIndex: this.lastCellHovered.rowIndex,\n rowPinned: this.lastCellHovered.rowPinned\n };\n this.draggingRange = {\n startRow: mouseRowPosition,\n endRow: mouseRowPosition,\n columns: [this.lastCellHovered.column],\n startColumn: this.newestRangeStartCell.column\n };\n this.cellRanges.push(this.draggingRange);\n }\n this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener);\n this.dispatchChangedEvent(true, false, this.draggingRange.id);\n }\n intersectLastRange(fromMouseClick) {\n if (fromMouseClick && this.dragging) {\n return;\n }\n if (this.gos.get(\"suppressMultiRangeSelection\")) {\n return;\n }\n if (this.isEmpty()) {\n return;\n }\n const rowPosUtils = this.rowPositionUtils;\n const lastRange = _6.last(this.cellRanges);\n const intersectionStartRow = this.getRangeStartRow(lastRange);\n const intersectionEndRow = this.getRangeEndRow(lastRange);\n const newRanges = [];\n this.cellRanges.slice(0, -1).forEach((range) => {\n const startRow = this.getRangeStartRow(range);\n const endRow = this.getRangeEndRow(range);\n const cols = range.columns;\n const intersectCols = cols.filter((col) => lastRange.columns.indexOf(col) === -1);\n if (intersectCols.length === cols.length) {\n newRanges.push(range);\n return;\n }\n if (rowPosUtils.before(intersectionEndRow, startRow) || rowPosUtils.before(endRow, intersectionStartRow)) {\n newRanges.push(range);\n return;\n }\n const rangeCountBefore = newRanges.length;\n if (rowPosUtils.before(startRow, intersectionStartRow)) {\n const top = {\n columns: [...cols],\n startColumn: lastRange.startColumn,\n startRow: __spreadValues2({}, startRow),\n endRow: this.cellNavigationService.getRowAbove(intersectionStartRow)\n };\n newRanges.push(top);\n }\n if (intersectCols.length > 0) {\n const middle = {\n columns: intersectCols,\n startColumn: _6.includes(intersectCols, lastRange.startColumn) ? lastRange.startColumn : intersectCols[0],\n startRow: this.rowMax([__spreadValues2({}, intersectionStartRow), __spreadValues2({}, startRow)]),\n endRow: this.rowMin([__spreadValues2({}, intersectionEndRow), __spreadValues2({}, endRow)])\n };\n newRanges.push(middle);\n }\n if (rowPosUtils.before(intersectionEndRow, endRow)) {\n newRanges.push({\n columns: [...cols],\n startColumn: lastRange.startColumn,\n startRow: this.cellNavigationService.getRowBelow(intersectionEndRow),\n endRow: __spreadValues2({}, endRow)\n });\n }\n if (newRanges.length - rangeCountBefore === 1) {\n newRanges[newRanges.length - 1].id = range.id;\n }\n });\n this.cellRanges = newRanges;\n if (fromMouseClick) {\n this.dispatchChangedEvent(false, true);\n }\n }\n rowMax(rows) {\n let max;\n rows.forEach((row) => {\n if (max === void 0 || this.rowPositionUtils.before(max, row)) {\n max = row;\n }\n });\n return max;\n }\n rowMin(rows) {\n let min;\n rows.forEach((row) => {\n if (min === void 0 || this.rowPositionUtils.before(row, min)) {\n min = row;\n }\n });\n return min;\n }\n updateValuesOnMove(eventTarget) {\n const cellCtrl = _6.getCtrlForEventTarget(this.gos, eventTarget, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n const cell = cellCtrl == null ? void 0 : cellCtrl.getCellPosition();\n this.cellHasChanged = false;\n if (!cell || this.lastCellHovered && this.cellPositionUtils.equals(cell, this.lastCellHovered)) {\n return;\n }\n if (this.lastCellHovered) {\n this.cellHasChanged = true;\n }\n this.lastCellHovered = cell;\n }\n onDragging(mouseEvent) {\n if (!this.dragging || !mouseEvent) {\n return;\n }\n this.updateValuesOnMove(mouseEvent.target);\n this.lastMouseEvent = mouseEvent;\n const cellPosition = this.lastCellHovered;\n const isMouseAndStartInPinned = (position) => cellPosition && cellPosition.rowPinned === position && this.newestRangeStartCell.rowPinned === position;\n const skipVerticalScroll = isMouseAndStartInPinned(\"top\") || isMouseAndStartInPinned(\"bottom\");\n this.autoScrollService.check(mouseEvent, skipVerticalScroll);\n if (!this.cellHasChanged) {\n return;\n }\n const columns = this.calculateColumnsBetween(this.newestRangeStartCell.column, cellPosition.column);\n if (!columns) {\n return;\n }\n this.draggingRange.endRow = {\n rowIndex: cellPosition.rowIndex,\n rowPinned: cellPosition.rowPinned\n };\n this.draggingRange.columns = columns;\n this.dispatchChangedEvent(false, false, this.draggingRange.id);\n }\n onDragStop() {\n if (!this.dragging) {\n return;\n }\n const { id } = this.draggingRange;\n this.autoScrollService.ensureCleared();\n this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener);\n this.lastMouseEvent = null;\n this.dragging = false;\n this.draggingRange = void 0;\n this.lastCellHovered = void 0;\n if (this.intersectionRange) {\n this.intersectionRange = false;\n this.intersectLastRange();\n }\n this.dispatchChangedEvent(false, true, id);\n }\n dispatchChangedEvent(started, finished, id) {\n const event = {\n type: Events7.EVENT_RANGE_SELECTION_CHANGED,\n started,\n finished,\n id\n };\n this.eventService.dispatchEvent(event);\n }\n calculateColumnsBetween(columnFrom, columnTo) {\n const allColumns = this.columnModel.getAllDisplayedColumns();\n const isSameColumn = columnFrom === columnTo;\n const fromIndex = allColumns.indexOf(columnFrom);\n if (fromIndex < 0) {\n console.warn(`AG Grid: column ${columnFrom.getId()} is not visible`);\n return;\n }\n const toIndex = isSameColumn ? fromIndex : allColumns.indexOf(columnTo);\n if (toIndex < 0) {\n console.warn(`AG Grid: column ${columnTo.getId()} is not visible`);\n return;\n }\n if (isSameColumn) {\n return [columnFrom];\n }\n const firstIndex = Math.min(fromIndex, toIndex);\n const lastIndex = firstIndex === fromIndex ? toIndex : fromIndex;\n const columns = [];\n for (let i = firstIndex; i <= lastIndex; i++) {\n columns.push(allColumns[i]);\n }\n return columns;\n }\n};\n__decorateClass3([\n Autowired12(\"rowModel\")\n], RangeService.prototype, \"rowModel\", 2);\n__decorateClass3([\n Autowired12(\"dragService\")\n], RangeService.prototype, \"dragService\", 2);\n__decorateClass3([\n Autowired12(\"columnModel\")\n], RangeService.prototype, \"columnModel\", 2);\n__decorateClass3([\n Autowired12(\"cellNavigationService\")\n], RangeService.prototype, \"cellNavigationService\", 2);\n__decorateClass3([\n Autowired12(\"pinnedRowModel\")\n], RangeService.prototype, \"pinnedRowModel\", 2);\n__decorateClass3([\n Autowired12(\"rowPositionUtils\")\n], RangeService.prototype, \"rowPositionUtils\", 2);\n__decorateClass3([\n Autowired12(\"cellPositionUtils\")\n], RangeService.prototype, \"cellPositionUtils\", 2);\n__decorateClass3([\n Autowired12(\"ctrlsService\")\n], RangeService.prototype, \"ctrlsService\", 2);\n__decorateClass3([\n Autowired12(\"valueService\")\n], RangeService.prototype, \"valueService\", 2);\n__decorateClass3([\n PostConstruct12\n], RangeService.prototype, \"init\", 1);\nRangeService = __decorateClass3([\n Bean3(\"rangeService\")\n], RangeService);\nvar AbstractSelectionHandle = class extends Component9 {\n constructor() {\n super(...arguments);\n this.changedCalculatedValues = false;\n this.dragging = false;\n this.shouldDestroyOnEndDragging = false;\n }\n init() {\n this.dragService.addDragSource({\n dragStartPixels: 0,\n eElement: this.getGui(),\n onDragStart: this.onDragStart.bind(this),\n onDragging: (e) => {\n this.dragging = true;\n this.rangeService.autoScrollService.check(e);\n if (this.changedCalculatedValues) {\n this.onDrag(e);\n this.changedCalculatedValues = false;\n }\n },\n onDragStop: (e) => {\n this.dragging = false;\n this.onDragEnd(e);\n this.clearValues();\n this.rangeService.autoScrollService.ensureCleared();\n document.body.classList.remove(this.getDraggingCssClass());\n if (this.shouldDestroyOnEndDragging) {\n this.destroy();\n }\n }\n });\n this.addManagedListener(\n this.getGui(),\n \"mousedown\",\n this.preventRangeExtension.bind(this)\n );\n }\n isDragging() {\n return this.dragging;\n }\n getCellCtrl() {\n return this.cellCtrl;\n }\n setCellCtrl(cellComp) {\n this.cellCtrl = cellComp;\n }\n getCellRange() {\n return this.cellRange;\n }\n setCellRange(range) {\n this.cellRange = range;\n }\n getRangeStartRow() {\n return this.rangeStartRow;\n }\n setRangeStartRow(row) {\n this.rangeStartRow = row;\n }\n getRangeEndRow() {\n return this.rangeEndRow;\n }\n setRangeEndRow(row) {\n this.rangeEndRow = row;\n }\n getLastCellHovered() {\n return this.lastCellHovered;\n }\n preventRangeExtension(e) {\n e.stopPropagation();\n }\n onDragStart(e) {\n this.cellHoverListener = this.addManagedListener(\n this.ctrlsService.get(\"gridCtrl\").getGui(),\n \"mousemove\",\n this.updateValuesOnMove.bind(this)\n );\n document.body.classList.add(this.getDraggingCssClass());\n }\n getDraggingCssClass() {\n return `ag-dragging-${this.type === SelectionHandleType.FILL ? \"fill\" : \"range\"}-handle`;\n }\n updateValuesOnMove(e) {\n const cell = this.mouseEventService.getCellPositionForEvent(e);\n if (!cell || this.lastCellHovered && this.cellPositionUtils.equals(cell, this.lastCellHovered)) {\n return;\n }\n this.lastCellHovered = cell;\n this.changedCalculatedValues = true;\n }\n getType() {\n return this.type;\n }\n refresh(cellCtrl) {\n const oldCellComp = this.getCellCtrl();\n const eGui = this.getGui();\n const cellRange = _23.last(this.rangeService.getCellRanges());\n const start = cellRange.startRow;\n const end = cellRange.endRow;\n if (start && end) {\n const isBefore = this.rowPositionUtils.before(end, start);\n if (isBefore) {\n this.setRangeStartRow(end);\n this.setRangeEndRow(start);\n } else {\n this.setRangeStartRow(start);\n this.setRangeEndRow(end);\n }\n }\n if (oldCellComp !== cellCtrl || !_23.isVisible(eGui)) {\n this.setCellCtrl(cellCtrl);\n const eParentOfValue = cellCtrl.getComp().getParentOfValue();\n if (eParentOfValue) {\n eParentOfValue.appendChild(eGui);\n }\n }\n this.setCellRange(cellRange);\n }\n clearValues() {\n this.lastCellHovered = void 0;\n this.removeListeners();\n }\n removeListeners() {\n if (this.cellHoverListener) {\n this.cellHoverListener();\n this.cellHoverListener = void 0;\n }\n }\n destroy() {\n if (!this.shouldDestroyOnEndDragging && this.isDragging()) {\n _23.setDisplayed(this.getGui(), false);\n this.shouldDestroyOnEndDragging = true;\n return;\n }\n this.shouldDestroyOnEndDragging = false;\n super.destroy();\n this.removeListeners();\n const eGui = this.getGui();\n if (eGui.parentElement) {\n eGui.parentElement.removeChild(eGui);\n }\n }\n};\n__decorateClass3([\n Autowired23(\"rowRenderer\")\n], AbstractSelectionHandle.prototype, \"rowRenderer\", 2);\n__decorateClass3([\n Autowired23(\"dragService\")\n], AbstractSelectionHandle.prototype, \"dragService\", 2);\n__decorateClass3([\n Autowired23(\"rangeService\")\n], AbstractSelectionHandle.prototype, \"rangeService\", 2);\n__decorateClass3([\n Autowired23(\"mouseEventService\")\n], AbstractSelectionHandle.prototype, \"mouseEventService\", 2);\n__decorateClass3([\n Autowired23(\"columnModel\")\n], AbstractSelectionHandle.prototype, \"columnModel\", 2);\n__decorateClass3([\n Autowired23(\"cellNavigationService\")\n], AbstractSelectionHandle.prototype, \"cellNavigationService\", 2);\n__decorateClass3([\n Autowired23(\"navigationService\")\n], AbstractSelectionHandle.prototype, \"navigationService\", 2);\n__decorateClass3([\n Autowired23(\"rowPositionUtils\")\n], AbstractSelectionHandle.prototype, \"rowPositionUtils\", 2);\n__decorateClass3([\n Autowired23(\"cellPositionUtils\")\n], AbstractSelectionHandle.prototype, \"cellPositionUtils\", 2);\n__decorateClass3([\n Autowired23(\"ctrlsService\")\n], AbstractSelectionHandle.prototype, \"ctrlsService\", 2);\n__decorateClass3([\n PostConstruct23\n], AbstractSelectionHandle.prototype, \"init\", 1);\nfunction findLineByLeastSquares(values) {\n const len = values.length;\n let maxDecimals = 0;\n if (len <= 1) {\n return values;\n }\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n const splitExponent = value.toString().split(\"e-\");\n if (splitExponent.length > 1) {\n maxDecimals = Math.max(maxDecimals, parseInt(splitExponent[1], 10));\n continue;\n }\n if (Math.floor(value) === value) {\n continue;\n }\n maxDecimals = Math.max(maxDecimals, value.toString().split(\".\")[1].length);\n }\n let sum_x = 0;\n let sum_y = 0;\n let sum_xy = 0;\n let sum_xx = 0;\n let y = 0;\n for (let x = 0; x < len; x++) {\n y = values[x];\n sum_x += x;\n sum_y += y;\n sum_xx += x * x;\n sum_xy += x * y;\n }\n const m = (len * sum_xy - sum_x * sum_y) / (len * sum_xx - sum_x * sum_x);\n const b = sum_y / len - m * sum_x / len;\n const result = [];\n for (let x = 0; x <= len; x++) {\n result.push(parseFloat((x * m + b).toFixed(maxDecimals)));\n }\n return result;\n}\nvar _FillHandle = class _FillHandle2 extends AbstractSelectionHandle {\n constructor() {\n super(_FillHandle2.TEMPLATE);\n this.markedCells = [];\n this.cellValues = [];\n this.isUp = false;\n this.isLeft = false;\n this.isReduce = false;\n this.type = SelectionHandleType2.FILL;\n }\n updateValuesOnMove(e) {\n super.updateValuesOnMove(e);\n if (!this.initialXY) {\n this.initialXY = this.mouseEventService.getNormalisedPosition(e);\n }\n const { x, y } = this.initialXY;\n const { x: newX, y: newY } = this.mouseEventService.getNormalisedPosition(e);\n const diffX = Math.abs(x - newX);\n const diffY = Math.abs(y - newY);\n const allowedDirection = this.getFillHandleDirection();\n let direction;\n if (allowedDirection === \"xy\") {\n direction = diffX > diffY ? \"x\" : \"y\";\n } else {\n direction = allowedDirection;\n }\n if (direction !== this.dragAxis) {\n this.dragAxis = direction;\n this.changedCalculatedValues = true;\n }\n }\n onDrag(e) {\n if (!this.initialPosition) {\n const cellCtrl = this.getCellCtrl();\n if (!cellCtrl) {\n return;\n }\n this.initialPosition = cellCtrl.getCellPosition();\n }\n const lastCellHovered = this.getLastCellHovered();\n if (lastCellHovered) {\n this.markPathFrom(this.initialPosition, lastCellHovered);\n }\n }\n onDragEnd(e) {\n this.initialXY = null;\n if (!this.markedCells.length) {\n return;\n }\n const isX = this.dragAxis === \"x\";\n const initialRange = this.getCellRange();\n const colLen = initialRange.columns.length;\n const rangeStartRow = this.getRangeStartRow();\n const rangeEndRow = this.getRangeEndRow();\n let finalRange;\n if (!this.isUp && !this.isLeft) {\n finalRange = this.rangeService.createCellRangeFromCellRangeParams({\n rowStartIndex: rangeStartRow.rowIndex,\n rowStartPinned: rangeStartRow.rowPinned,\n columnStart: initialRange.columns[0],\n rowEndIndex: isX ? rangeEndRow.rowIndex : this.lastCellMarked.rowIndex,\n rowEndPinned: isX ? rangeEndRow.rowPinned : this.lastCellMarked.rowPinned,\n columnEnd: isX ? this.lastCellMarked.column : initialRange.columns[colLen - 1]\n });\n } else {\n const startRow = isX ? rangeStartRow : this.lastCellMarked;\n finalRange = this.rangeService.createCellRangeFromCellRangeParams({\n rowStartIndex: startRow.rowIndex,\n rowStartPinned: startRow.rowPinned,\n columnStart: isX ? this.lastCellMarked.column : initialRange.columns[0],\n rowEndIndex: rangeEndRow.rowIndex,\n rowEndPinned: rangeEndRow.rowPinned,\n columnEnd: initialRange.columns[colLen - 1]\n });\n }\n if (finalRange) {\n this.raiseFillStartEvent();\n this.handleValueChanged(initialRange, finalRange, e);\n this.rangeService.setCellRanges([finalRange]);\n this.raiseFillEndEvent(initialRange, finalRange);\n }\n }\n getFillHandleDirection() {\n const direction = this.gos.get(\"fillHandleDirection\");\n if (!direction) {\n return \"xy\";\n }\n if (direction !== \"x\" && direction !== \"y\" && direction !== \"xy\") {\n _32.warnOnce(`valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.`);\n return \"xy\";\n }\n return direction;\n }\n raiseFillStartEvent() {\n const fillStartEvent = {\n type: Events22.EVENT_FILL_START\n };\n this.eventService.dispatchEvent(fillStartEvent);\n }\n raiseFillEndEvent(initialRange, finalRange) {\n const fillEndEvent = {\n type: Events22.EVENT_FILL_END,\n initialRange,\n finalRange\n };\n this.eventService.dispatchEvent(fillEndEvent);\n }\n handleValueChanged(initialRange, finalRange, e) {\n const initialRangeEndRow = this.rangeService.getRangeEndRow(initialRange);\n const initialRangeStartRow = this.rangeService.getRangeStartRow(initialRange);\n const finalRangeEndRow = this.rangeService.getRangeEndRow(finalRange);\n const finalRangeStartRow = this.rangeService.getRangeStartRow(finalRange);\n const isVertical = this.dragAxis === \"y\";\n if (this.isReduce && !this.gos.get(\"suppressClearOnFillReduction\")) {\n const columns = isVertical ? initialRange.columns : initialRange.columns.filter((col) => finalRange.columns.indexOf(col) < 0);\n const startRow = isVertical ? this.cellNavigationService.getRowBelow(finalRangeEndRow) : finalRangeStartRow;\n if (startRow) {\n this.clearCellsInRange(startRow, initialRangeEndRow, columns);\n }\n return;\n }\n const values = [];\n const initialValues = [];\n const initialNonAggregatedValues = [];\n const initialFormattedValues = [];\n let withinInitialRange = true;\n let idx = 0;\n const resetValues = () => {\n values.length = 0;\n initialValues.length = 0;\n initialNonAggregatedValues.length = 0;\n initialFormattedValues.length = 0;\n idx = 0;\n };\n const iterateAcrossCells = (column, columns) => {\n let currentRow = this.isUp ? initialRangeEndRow : initialRangeStartRow;\n let finished = false;\n if (isVertical) {\n withinInitialRange = true;\n resetValues();\n }\n while (!finished && currentRow) {\n const rowNode = this.rowPositionUtils.getRowNode(currentRow);\n if (!rowNode) {\n break;\n }\n if (isVertical && column) {\n fillValues(values, column, rowNode, () => {\n return !this.rowPositionUtils.sameRow(currentRow, this.isUp ? initialRangeStartRow : initialRangeEndRow);\n });\n } else if (columns) {\n withinInitialRange = true;\n resetValues();\n columns.forEach((col) => fillValues(\n values,\n col,\n rowNode,\n () => col !== (this.isLeft ? initialRange.columns[0] : _32.last(initialRange.columns))\n ));\n }\n finished = this.rowPositionUtils.sameRow(currentRow, this.isUp ? finalRangeStartRow : finalRangeEndRow);\n currentRow = this.isUp ? this.cellNavigationService.getRowAbove(currentRow) : this.cellNavigationService.getRowBelow(currentRow);\n }\n };\n const fillValues = (currentValues, col, rowNode, updateInitialSet) => {\n var _a, _b;\n let currentValue;\n let skipValue = false;\n if (withinInitialRange) {\n currentValue = this.valueService.getValue(col, rowNode);\n initialValues.push(currentValue);\n initialNonAggregatedValues.push(this.valueService.getValue(col, rowNode, void 0, true));\n initialFormattedValues.push(this.valueService.formatValue(col, rowNode, currentValue));\n withinInitialRange = updateInitialSet();\n } else {\n const { value, fromUserFunction, sourceCol, sourceRowNode } = this.processValues({\n event: e,\n values: currentValues,\n initialValues,\n initialNonAggregatedValues,\n initialFormattedValues,\n col,\n rowNode,\n idx: idx++\n });\n currentValue = value;\n if (col.isCellEditable(rowNode)) {\n const cellValue = this.valueService.getValue(col, rowNode);\n if (!fromUserFunction) {\n if (sourceCol && ((_a = sourceCol.getColDef()) == null ? void 0 : _a.useValueFormatterForExport) !== false) {\n currentValue = (_b = this.valueService.formatValue(sourceCol, sourceRowNode, currentValue)) != null ? _b : currentValue;\n }\n if (col.getColDef().useValueParserForImport !== false) {\n currentValue = this.valueService.parseValue(\n col,\n rowNode,\n // if no sourceCol, then currentValue is a number\n sourceCol ? currentValue : _32.toStringOrNull(currentValue),\n cellValue\n );\n }\n }\n if (!fromUserFunction || cellValue !== currentValue) {\n rowNode.setDataValue(col, currentValue, \"rangeService\");\n } else {\n skipValue = true;\n }\n }\n }\n if (!skipValue) {\n currentValues.push({\n value: currentValue,\n column: col,\n rowNode\n });\n }\n };\n if (isVertical) {\n initialRange.columns.forEach((col) => {\n iterateAcrossCells(col);\n });\n } else {\n const columns = this.isLeft ? [...finalRange.columns].reverse() : finalRange.columns;\n iterateAcrossCells(void 0, columns);\n }\n }\n clearCellsInRange(startRow, endRow, columns) {\n const cellRange = {\n startRow,\n endRow,\n columns,\n startColumn: columns[0]\n };\n this.rangeService.clearCellRangeCellValues({ cellRanges: [cellRange] });\n }\n processValues(params) {\n const { event, values, initialValues, initialNonAggregatedValues, initialFormattedValues, col, rowNode, idx } = params;\n const userFillOperation = this.gos.getCallback(\"fillOperation\");\n const isVertical = this.dragAxis === \"y\";\n let direction;\n if (isVertical) {\n direction = this.isUp ? \"up\" : \"down\";\n } else {\n direction = this.isLeft ? \"left\" : \"right\";\n }\n if (userFillOperation) {\n const params2 = {\n event,\n values: values.map(({ value }) => value),\n initialValues,\n initialNonAggregatedValues,\n initialFormattedValues,\n currentIndex: idx,\n currentCellValue: this.valueService.getValue(col, rowNode),\n direction,\n column: col,\n rowNode\n };\n const userResult = userFillOperation(params2);\n if (userResult !== false) {\n return { value: userResult, fromUserFunction: true };\n }\n }\n const allNumbers = !values.some(({ value }) => {\n const asFloat = parseFloat(value);\n return isNaN(asFloat) || asFloat.toString() !== value.toString();\n });\n if (event.altKey || !allNumbers) {\n if (allNumbers && initialValues.length === 1) {\n const multiplier = this.isUp || this.isLeft ? -1 : 1;\n return { value: parseFloat(_32.last(values).value) + 1 * multiplier, fromUserFunction: false };\n }\n const { value, column: sourceCol, rowNode: sourceRowNode } = values[idx % values.length];\n return { value, fromUserFunction: false, sourceCol, sourceRowNode };\n }\n return { value: _32.last(findLineByLeastSquares(values.map(({ value }) => Number(value)))), fromUserFunction: false };\n }\n clearValues() {\n this.clearMarkedPath();\n this.clearCellValues();\n this.lastCellMarked = void 0;\n super.clearValues();\n }\n clearMarkedPath() {\n this.markedCells.forEach((cell) => {\n if (!cell.isAlive()) {\n return;\n }\n const comp = cell.getComp();\n comp.addOrRemoveCssClass(\"ag-selection-fill-top\", false);\n comp.addOrRemoveCssClass(\"ag-selection-fill-right\", false);\n comp.addOrRemoveCssClass(\"ag-selection-fill-bottom\", false);\n comp.addOrRemoveCssClass(\"ag-selection-fill-left\", false);\n });\n this.markedCells.length = 0;\n this.isUp = false;\n this.isLeft = false;\n this.isReduce = false;\n }\n clearCellValues() {\n this.cellValues.length = 0;\n }\n markPathFrom(initialPosition, currentPosition) {\n this.clearMarkedPath();\n this.clearCellValues();\n if (this.dragAxis === \"y\") {\n if (this.rowPositionUtils.sameRow(currentPosition, initialPosition)) {\n return;\n }\n const isBefore = this.rowPositionUtils.before(currentPosition, initialPosition);\n const rangeStartRow = this.getRangeStartRow();\n const rangeEndRow = this.getRangeEndRow();\n if (isBefore && (currentPosition.rowPinned == rangeStartRow.rowPinned && currentPosition.rowIndex >= rangeStartRow.rowIndex || rangeStartRow.rowPinned != rangeEndRow.rowPinned && currentPosition.rowPinned == rangeEndRow.rowPinned && currentPosition.rowIndex <= rangeEndRow.rowIndex)) {\n this.reduceVertical(initialPosition, currentPosition);\n this.isReduce = true;\n } else {\n this.extendVertical(initialPosition, currentPosition, isBefore);\n this.isReduce = false;\n }\n } else {\n const initialColumn = initialPosition.column;\n const currentColumn = currentPosition.column;\n if (initialColumn === currentColumn) {\n return;\n }\n const displayedColumns = this.columnModel.getAllDisplayedColumns();\n const initialIndex = displayedColumns.indexOf(initialColumn);\n const currentIndex = displayedColumns.indexOf(currentColumn);\n if (currentIndex <= initialIndex && currentIndex >= displayedColumns.indexOf(this.getCellRange().columns[0])) {\n this.reduceHorizontal(initialPosition, currentPosition);\n this.isReduce = true;\n } else {\n this.extendHorizontal(initialPosition, currentPosition, currentIndex < initialIndex);\n this.isReduce = false;\n }\n }\n this.lastCellMarked = currentPosition;\n }\n extendVertical(initialPosition, endPosition, isMovingUp) {\n const { navigationService, rangeService } = this;\n let row = initialPosition;\n do {\n const cellRange = this.getCellRange();\n const colLen = cellRange.columns.length;\n for (let i = 0; i < colLen; i++) {\n const column = cellRange.columns[i];\n const rowPos = { rowIndex: row.rowIndex, rowPinned: row.rowPinned };\n const cellPos = __spreadProps2(__spreadValues2({}, rowPos), { column });\n const cellInRange = rangeService.isCellInSpecificRange(cellPos, cellRange);\n const isInitialRow = this.rowPositionUtils.sameRow(row, initialPosition);\n if (isMovingUp) {\n this.isUp = true;\n }\n if (!isInitialRow) {\n const cell = navigationService.getCellByPosition(cellPos);\n if (cell) {\n this.markedCells.push(cell);\n const cellCtrl = cell.getComp();\n if (!cellInRange) {\n cellCtrl.addOrRemoveCssClass(\"ag-selection-fill-left\", i === 0);\n cellCtrl.addOrRemoveCssClass(\"ag-selection-fill-right\", i === colLen - 1);\n }\n cellCtrl.addOrRemoveCssClass(\n isMovingUp ? \"ag-selection-fill-top\" : \"ag-selection-fill-bottom\",\n this.rowPositionUtils.sameRow(row, endPosition)\n );\n }\n }\n }\n if (this.rowPositionUtils.sameRow(row, endPosition)) {\n break;\n }\n } while (\n // tslint:disable-next-line\n row = isMovingUp ? this.cellNavigationService.getRowAbove(row) : this.cellNavigationService.getRowBelow(row)\n );\n }\n reduceVertical(initialPosition, endPosition) {\n let row = initialPosition;\n do {\n const cellRange = this.getCellRange();\n const colLen = cellRange.columns.length;\n const isLastRow = this.rowPositionUtils.sameRow(row, endPosition);\n for (let i = 0; i < colLen; i++) {\n const rowPos = { rowIndex: row.rowIndex, rowPinned: row.rowPinned };\n const celPos = __spreadProps2(__spreadValues2({}, rowPos), { column: cellRange.columns[i] });\n const cell = this.navigationService.getCellByPosition(celPos);\n if (cell) {\n this.markedCells.push(cell);\n const cellComp = cell.getComp();\n cellComp.addOrRemoveCssClass(\n \"ag-selection-fill-bottom\",\n this.rowPositionUtils.sameRow(row, endPosition)\n );\n }\n }\n if (isLastRow) {\n break;\n }\n } while (row = this.cellNavigationService.getRowAbove(row));\n }\n extendHorizontal(initialPosition, endPosition, isMovingLeft) {\n const allCols = this.columnModel.getAllDisplayedColumns();\n const startCol = allCols.indexOf(isMovingLeft ? endPosition.column : initialPosition.column);\n const endCol = allCols.indexOf(isMovingLeft ? this.getCellRange().columns[0] : endPosition.column);\n const offset = isMovingLeft ? 0 : 1;\n const colsToMark = allCols.slice(startCol + offset, endCol + offset);\n const rangeStartRow = this.getRangeStartRow();\n const rangeEndRow = this.getRangeEndRow();\n colsToMark.forEach((column) => {\n let row = rangeStartRow;\n let isLastRow = false;\n do {\n isLastRow = this.rowPositionUtils.sameRow(row, rangeEndRow);\n const cell = this.navigationService.getCellByPosition({\n rowIndex: row.rowIndex,\n rowPinned: row.rowPinned,\n column\n });\n if (cell) {\n this.markedCells.push(cell);\n const cellComp = cell.getComp();\n cellComp.addOrRemoveCssClass(\"ag-selection-fill-top\", this.rowPositionUtils.sameRow(row, rangeStartRow));\n cellComp.addOrRemoveCssClass(\"ag-selection-fill-bottom\", this.rowPositionUtils.sameRow(row, rangeEndRow));\n if (isMovingLeft) {\n this.isLeft = true;\n cellComp.addOrRemoveCssClass(\"ag-selection-fill-left\", column === colsToMark[0]);\n } else {\n cellComp.addOrRemoveCssClass(\"ag-selection-fill-right\", column === _32.last(colsToMark));\n }\n }\n row = this.cellNavigationService.getRowBelow(row);\n } while (!isLastRow);\n });\n }\n reduceHorizontal(initialPosition, endPosition) {\n const allCols = this.columnModel.getAllDisplayedColumns();\n const startCol = allCols.indexOf(endPosition.column);\n const endCol = allCols.indexOf(initialPosition.column);\n const colsToMark = allCols.slice(startCol, endCol);\n const rangeStartRow = this.getRangeStartRow();\n const rangeEndRow = this.getRangeEndRow();\n colsToMark.forEach((column) => {\n let row = rangeStartRow;\n let isLastRow = false;\n do {\n isLastRow = this.rowPositionUtils.sameRow(row, rangeEndRow);\n const cell = this.navigationService.getCellByPosition({\n rowIndex: row.rowIndex,\n rowPinned: row.rowPinned,\n column\n });\n if (cell) {\n this.markedCells.push(cell);\n const cellComp = cell.getComp();\n cellComp.addOrRemoveCssClass(\"ag-selection-fill-right\", column === colsToMark[0]);\n }\n row = this.cellNavigationService.getRowBelow(row);\n } while (!isLastRow);\n });\n }\n refresh(cellCtrl) {\n const cellRange = this.rangeService.getCellRanges()[0];\n const isColumnRange = !cellRange.startRow || !cellRange.endRow;\n if (isColumnRange) {\n this.destroy();\n return;\n }\n super.refresh(cellCtrl);\n }\n};\n_FillHandle.TEMPLATE = /* html */\n`
`;\n__decorateClass3([\n Autowired33(\"valueService\")\n], _FillHandle.prototype, \"valueService\", 2);\nvar FillHandle = _FillHandle;\nvar _RangeHandle = class _RangeHandle2 extends AbstractSelectionHandle {\n constructor() {\n super(_RangeHandle2.TEMPLATE);\n this.type = SelectionHandleType3.RANGE;\n this.rangeFixed = false;\n }\n onDrag(e) {\n const lastCellHovered = this.getLastCellHovered();\n if (!lastCellHovered) {\n return;\n }\n const cellRanges = this.rangeService.getCellRanges();\n const lastRange = _42.last(cellRanges);\n if (!this.rangeFixed) {\n this.fixRangeStartEnd(lastRange);\n this.rangeFixed = true;\n }\n this.endPosition = {\n rowIndex: lastCellHovered.rowIndex,\n rowPinned: lastCellHovered.rowPinned,\n column: lastCellHovered.column\n };\n if (cellRanges.length === 2 && cellRanges[0].type === CellRangeType.DIMENSION && lastRange.type === CellRangeType.VALUE) {\n const rowChanged = !this.rowPositionUtils.sameRow(this.endPosition, this.rangeService.getRangeEndRow(lastRange));\n if (rowChanged) {\n this.rangeService.updateRangeEnd(\n cellRanges[0],\n __spreadProps2(__spreadValues2({}, this.endPosition), {\n column: cellRanges[0].columns[0]\n }),\n true\n );\n }\n }\n this.rangeService.extendLatestRangeToCell(this.endPosition);\n }\n onDragEnd(e) {\n const cellRange = _42.last(this.rangeService.getCellRanges());\n this.fixRangeStartEnd(cellRange);\n this.rangeFixed = false;\n }\n fixRangeStartEnd(cellRange) {\n const startRow = this.rangeService.getRangeStartRow(cellRange);\n const endRow = this.rangeService.getRangeEndRow(cellRange);\n const column = cellRange.columns[0];\n cellRange.startRow = startRow;\n cellRange.endRow = endRow;\n cellRange.startColumn = column;\n }\n};\n_RangeHandle.TEMPLATE = /* html */\n`
`;\nvar RangeHandle = _RangeHandle;\nvar SelectionHandleFactory = class extends BeanStub23 {\n createSelectionHandle(type) {\n return this.createBean(type === SelectionHandleType4.RANGE ? new RangeHandle() : new FillHandle());\n }\n};\nSelectionHandleFactory = __decorateClass3([\n Bean23(\"selectionHandleFactory\")\n], SelectionHandleFactory);\nvar VERSION3 = \"31.3.2\";\nvar RangeSelectionModule = {\n version: VERSION3,\n moduleName: ModuleNames3.RangeSelectionModule,\n beans: [RangeService, SelectionHandleFactory],\n agStackComponents: [\n { componentName: \"AgFillHandle\", componentClass: FillHandle },\n { componentName: \"AgRangeHandle\", componentClass: RangeHandle }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/charts/dist/package/main.esm.mjs\n__reExport(main_esm_exports, ag_charts_community_star);\nimport {\n Autowired as Autowired41,\n Bean as Bean32,\n BeanStub as BeanStub10,\n Optional as Optional2,\n PreDestroy\n} from \"ag-grid-community\";\nimport { VERSION as CHARTS_VERSION, _ModuleSupport as _ModuleSupport5 } from \"ag-charts-community\";\nimport {\n _ as _33,\n AgDialog as AgDialog2,\n Autowired as Autowired40,\n Component as Component36,\n Events as Events10,\n PostConstruct as PostConstruct42,\n RefSelector as RefSelector12\n} from \"ag-grid-community\";\nimport {\n AgPanel,\n AgPromise as AgPromise2,\n Autowired as Autowired37,\n Component as Component34,\n Events as Events8,\n PostConstruct as PostConstruct40\n} from \"ag-grid-community\";\nimport {\n AgPromise,\n Autowired as Autowired35,\n Component as Component32,\n PostConstruct as PostConstruct39,\n TabbedLayout\n} from \"ag-grid-community\";\nimport {\n _ as _112,\n AutoScrollService as AutoScrollService4,\n Autowired as Autowired102,\n Component as Component52,\n PostConstruct as PostConstruct102\n} from \"ag-grid-community\";\nimport {\n _ as _52,\n Autowired as Autowired42,\n BeanStub as BeanStub52,\n Events as Events23,\n PostConstruct as PostConstruct43\n} from \"ag-grid-community\";\nimport {\n _ as _24,\n Autowired as Autowired34,\n BeanStub as BeanStub42,\n CellRangeType as CellRangeType2,\n PostConstruct as PostConstruct32\n} from \"ag-grid-community\";\nimport {\n _ as _15,\n Autowired as Autowired13,\n BeanStub as BeanStub7,\n ModuleNames as ModuleNames4,\n ModuleRegistry,\n Optional\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired24,\n Bean as Bean4,\n BeanStub as BeanStub24,\n Events as Events9,\n PostConstruct as PostConstruct13\n} from \"ag-grid-community\";\nimport { BeanStub as BeanStub32, PostConstruct as PostConstruct24 } from \"ag-grid-community\";\nimport { ChartMappings } from \"ag-grid-community\";\nimport { _Theme as _Theme2, _ModuleSupport as _ModuleSupport2 } from \"ag-charts-community\";\nimport { _ as _34 } from \"ag-grid-community\";\nimport {\n _Theme\n} from \"ag-charts-community\";\nimport {\n _ as _43\n} from \"ag-grid-community\";\nimport { _ModuleSupport } from \"ag-charts-community\";\nimport {\n AgCheckbox as AgCheckbox2,\n AgGroupComponent as AgGroupComponent2,\n AgRadioButton as AgRadioButton2,\n AgSelect as AgSelect3,\n AgToggleButton,\n Autowired as Autowired62,\n DragAndDropService as DragAndDropService3,\n PostConstruct as PostConstruct62,\n _ as _82\n} from \"ag-grid-community\";\nimport {\n AgSelect as AgSelect2,\n Autowired as Autowired52,\n Component as Component22,\n DragSourceType as DragSourceType22,\n Events as Events32,\n _ as _72\n} from \"ag-grid-community\";\nimport {\n AgSelect,\n Component as Component10,\n DragAndDropService as DragAndDropService2,\n DragSourceType as DragSourceType3,\n PillDragComp,\n PillDropZonePanel,\n PostConstruct as PostConstruct52,\n _ as _62\n} from \"ag-grid-community\";\nimport {\n AgCheckbox as AgCheckbox3,\n AgGroupComponent as AgGroupComponent3,\n AgToggleButton as AgToggleButton2,\n Autowired as Autowired72,\n DragAndDropService as DragAndDropService4,\n PostConstruct as PostConstruct72,\n _ as _92\n} from \"ag-grid-community\";\nimport {\n AgCheckbox as AgCheckbox4,\n AgGroupComponent as AgGroupComponent4,\n AgSelect as AgSelect4,\n Autowired as Autowired82,\n Component as Component33,\n PostConstruct as PostConstruct82,\n _ as _102\n} from \"ag-grid-community\";\nimport {\n AgToggleButton as AgToggleButton3,\n Autowired as Autowired92,\n Component as Component42,\n PostConstruct as PostConstruct92\n} from \"ag-grid-community\";\nimport {\n _ as _25,\n Component as Component28,\n PostConstruct as PostConstruct33\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired122,\n Component as Component72,\n PostConstruct as PostConstruct122\n} from \"ag-grid-community\";\nimport {\n _ as _122,\n Autowired as Autowired112,\n Component as Component62,\n PostConstruct as PostConstruct112,\n RefSelector as RefSelector6\n} from \"ag-grid-community\";\nimport {\n _ as _152,\n AgCheckbox as AgCheckbox5,\n AgSlider,\n Autowired as Autowired17,\n Component as Component102,\n Events as Events52,\n PostConstruct as PostConstruct15,\n RefSelector as RefSelector33\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired132,\n Component as Component82,\n PostConstruct as PostConstruct132\n} from \"ag-grid-community\";\nimport { Autowired as Autowired14, Component as Component92, PostConstruct as PostConstruct14 } from \"ag-grid-community\";\nimport { Autowired as Autowired15, Events as Events42, AgAbstractLabel, RefSelector as RefSelector22, _ as _142 } from \"ag-grid-community\";\nimport { Autowired as Autowired16, BeanStub as BeanStub62 } from \"ag-grid-community\";\nimport {\n AgGroupComponent as AgGroupComponent7,\n AgSelect as AgSelect6,\n AgSlider as AgSlider2,\n Autowired as Autowired18,\n Component as Component11,\n PostConstruct as PostConstruct16,\n RefSelector as RefSelector42\n} from \"ag-grid-community\";\nimport {\n AgSelect as AgSelect7,\n Autowired as Autowired222,\n Component as Component15,\n Events as Events72,\n PostConstruct as PostConstruct20\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired19,\n Component as Component12,\n Events as Events62,\n PostConstruct as PostConstruct17,\n RefSelector as RefSelector52\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired20,\n Component as Component13,\n PostConstruct as PostConstruct18\n} from \"ag-grid-community\";\nimport {\n _ as _17,\n AgSlider as AgSlider4,\n Autowired as Autowired21,\n Component as Component14,\n PostConstruct as PostConstruct19\n} from \"ag-grid-community\";\nimport {\n _ as _222,\n AgSelect as AgSelect8,\n AgSlider as AgSlider7,\n AgToggleButton as AgToggleButton4,\n Autowired as Autowired31,\n Component as Component25,\n PostConstruct as PostConstruct30,\n RefSelector as RefSelector9,\n ChartMappings as ChartMappings2\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired232,\n Component as Component16,\n PostConstruct as PostConstruct21\n} from \"ag-grid-community\";\nimport {\n _ as _18,\n Autowired as Autowired242,\n Component as Component17,\n PostConstruct as PostConstruct222,\n RefSelector as RefSelector62\n} from \"ag-grid-community\";\nimport { Component as Component18, PostConstruct as PostConstruct232, RefSelector as RefSelector7, _ as _19 } from \"ag-grid-community\";\nimport { _Util } from \"ag-charts-community\";\nimport { KeyCode as KeyCode5 } from \"ag-grid-community\";\nimport { AgPickerField, AgDialog as AgDialog3 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired25,\n Component as Component19,\n PostConstruct as PostConstruct242\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired26,\n Component as Component20,\n PostConstruct as PostConstruct25\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired27,\n Component as Component21,\n PostConstruct as PostConstruct26\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired28,\n Component as Component222,\n PostConstruct as PostConstruct27\n} from \"ag-grid-community\";\nimport {\n _ as _21,\n AgSlider as AgSlider6,\n Autowired as Autowired29,\n Component as Component23,\n PostConstruct as PostConstruct28,\n RefSelector as RefSelector8\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired30,\n Component as Component24,\n PostConstruct as PostConstruct29\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired322,\n Component as Component26,\n PostConstruct as PostConstruct31\n} from \"ag-grid-community\";\nimport {\n BeanStub as BeanStub72,\n PostConstruct as PostConstruct322,\n _ as _242\n} from \"ag-grid-community\";\nimport { _ as _27, Component as Component31, PostConstruct as PostConstruct38, RefSelector as RefSelector10 } from \"ag-grid-community\";\nimport {\n _ as _26,\n AgGroupComponent as AgGroupComponent10,\n Autowired as Autowired342,\n Component as Component30,\n PostConstruct as PostConstruct37\n} from \"ag-grid-community\";\nimport { PostConstruct as PostConstruct35 } from \"ag-grid-community\";\nimport { Autowired as Autowired332, Component as Component29, PostConstruct as PostConstruct34 } from \"ag-grid-community\";\nimport { _Scene } from \"ag-charts-community\";\nimport { _Scene as _Scene2 } from \"ag-charts-community\";\nimport { _Scene as _Scene3 } from \"ag-charts-community\";\nimport { _Scene as _Scene4 } from \"ag-charts-community\";\nimport { _Scene as _Scene5 } from \"ag-charts-community\";\nimport { _Scene as _Scene6 } from \"ag-charts-community\";\nimport { _Scene as _Scene7 } from \"ag-charts-community\";\nimport { _Scene as _Scene8 } from \"ag-charts-community\";\nimport { _Scene as _Scene9 } from \"ag-charts-community\";\nimport { _Scene as _Scene10 } from \"ag-charts-community\";\nimport { _Scene as _Scene11 } from \"ag-charts-community\";\nimport { _Scene as _Scene13 } from \"ag-charts-community\";\nimport { PostConstruct as PostConstruct36 } from \"ag-grid-community\";\nimport { _Scene as _Scene12 } from \"ag-charts-community\";\nimport { _Scene as _Scene14 } from \"ag-charts-community\";\nimport { _Scene as _Scene15 } from \"ag-charts-community\";\nimport { _Scene as _Scene16 } from \"ag-charts-community\";\nimport { _Scene as _Scene17 } from \"ag-charts-community\";\nimport { _Scene as _Scene18, _Theme as _Theme4, _Util as _Util3 } from \"ag-charts-community\";\nimport { _Scene as _Scene19, _Theme as _Theme5 } from \"ag-charts-community\";\nimport { _Scene as _Scene20 } from \"ag-charts-community\";\nimport { _Scene as _Scene21, _Theme as _Theme6, _Util as _Util5 } from \"ag-charts-community\";\nimport { _Scene as _Scene22, _Theme as _Theme7 } from \"ag-charts-community\";\nimport { _Scene as _Scene23 } from \"ag-charts-community\";\nimport { _Scene as _Scene24 } from \"ag-charts-community\";\nimport {\n Autowired as Autowired36,\n Component as Component332,\n RefSelector as RefSelector11,\n _ as _28\n} from \"ag-grid-community\";\nimport { Autowired as Autowired38, Component as Component35, PostConstruct as PostConstruct41 } from \"ag-grid-community\";\nimport { _ as _30 } from \"ag-grid-community\";\nimport {\n _Theme as _Theme8,\n _ModuleSupport as _ModuleSupport4,\n AgCharts\n} from \"ag-charts-community\";\nimport { _Util as _Util6 } from \"ag-charts-community\";\nimport {\n BeanStub as BeanStub8,\n Events as Events92\n} from \"ag-grid-community\";\nimport {\n AgCharts as AgCharts2\n} from \"ag-charts-community\";\nimport {\n Autowired as Autowired39,\n Bean as Bean24,\n BeanStub as BeanStub9,\n _ as _322\n} from \"ag-grid-community\";\nimport { GROUP_AUTO_COLUMN_ID } from \"ag-grid-community\";\nimport { Bean as Bean42, BeanStub as BeanStub11 } from \"ag-grid-community\";\nimport {\n _ as _35,\n Autowired as Autowired422,\n Bean as Bean5,\n BeanStub as BeanStub12\n} from \"ag-grid-community\";\nimport {\n AgMenuItemComponent,\n AgMenuList,\n Autowired as Autowired43,\n Bean as Bean6,\n BeanStub as BeanStub13,\n Component as Component37,\n PostConstruct as PostConstruct432,\n RefSelector as RefSelector13,\n _ as _36\n} from \"ag-grid-community\";\nimport {\n AgDialog as AgDialog32,\n Autowired as Autowired48,\n Bean as Bean7,\n BeanStub as BeanStub14,\n PostConstruct as PostConstruct49,\n TabGuardComp as TabGuardComp2\n} from \"ag-grid-community\";\nimport {\n Component as Component422,\n PostConstruct as PostConstruct48\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired44,\n Component as Component38,\n PostConstruct as PostConstruct44\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired45,\n Component as Component39,\n PostConstruct as PostConstruct45\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired46,\n Component as Component40,\n PostConstruct as PostConstruct46\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired47,\n Component as Component41,\n PostConstruct as PostConstruct47,\n RefSelector as RefSelector14\n} from \"ag-grid-community\";\nimport { time, AgChart } from \"ag-charts-community\";\nimport * as ag_charts_community_star from \"ag-charts-community\";\nvar __defProp4 = Object.defineProperty;\nvar __defProps3 = Object.defineProperties;\nvar __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp3 = (obj, key, value) => key in obj ? __defProp4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp4.call(b, prop))\n __defNormalProp3(a, prop, b[prop]);\n if (__getOwnPropSymbols3)\n for (var prop of __getOwnPropSymbols3(b)) {\n if (__propIsEnum3.call(b, prop))\n __defNormalProp3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps3 = (a, b) => __defProps3(a, __getOwnPropDescs3(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols3)\n for (var prop of __getOwnPropSymbols3(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum3.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nvar __decorateClass4 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc4(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp4(target, key, result);\n return result;\n};\nvar _ChartDatasource = class _ChartDatasource2 extends BeanStub7 {\n getData(params) {\n if (params.crossFiltering) {\n if (params.grouping) {\n console.warn(\"AG Grid: crossing filtering with row grouping is not supported.\");\n return { chartData: [], columnNames: {} };\n }\n if (!this.gos.isRowModelType(\"clientSide\")) {\n console.warn(\"AG Grid: crossing filtering is only supported in the client side row model.\");\n return { chartData: [], columnNames: {} };\n }\n }\n const isServerSide = this.gos.isRowModelType(\"serverSide\");\n if (isServerSide && params.pivoting) {\n this.updatePivotKeysForSSRM();\n }\n const result = this.extractRowsFromGridRowModel(params);\n result.chartData = this.aggregateRowsByDimension(params, result.chartData);\n return result;\n }\n extractRowsFromGridRowModel(params) {\n const { crossFiltering, startRow, endRow, valueCols, dimensionCols, grouping } = params;\n let extractedRowData = [];\n const columnNames = {};\n const groupNodeIndexes = {};\n const groupsToRemove = {};\n let filteredNodes = {};\n let allRowNodes = [];\n let numRows;\n if (crossFiltering) {\n filteredNodes = this.getFilteredRowNodes();\n allRowNodes = this.getAllRowNodes();\n numRows = allRowNodes.length;\n } else {\n const modelLastRow = this.gridRowModel.getRowCount() - 1;\n const hasNoRange = startRow === endRow && startRow === 0 && dimensionCols.length === 0 && valueCols.length === 0;\n if (hasNoRange) {\n numRows = 0;\n } else {\n const rangeLastRow = endRow >= 0 ? Math.min(endRow, modelLastRow) : modelLastRow;\n numRows = rangeLastRow - startRow + 1;\n }\n }\n if (numRows > 0) {\n valueCols.forEach((col) => {\n let columnNamesArr = [];\n const pivotKeys = col.getColDef().pivotKeys;\n if (pivotKeys) {\n columnNamesArr = pivotKeys.slice();\n }\n const headerName = col.getColDef().headerName;\n if (headerName) {\n columnNamesArr.push(headerName);\n }\n if (columnNamesArr.length > 0) {\n columnNames[col.getId()] = columnNamesArr;\n }\n });\n }\n let numRemovedNodes = 0;\n for (let i = 0; i < numRows; i++) {\n const rowNode = crossFiltering ? allRowNodes[i] : this.gridRowModel.getRow(i + startRow);\n if (rowNode.footer) {\n numRemovedNodes++;\n continue;\n }\n const data = {};\n dimensionCols.forEach((col) => {\n const colId = col.colId;\n const column = this.columnModel.getGridColumn(colId);\n if (column) {\n const valueObject = this.valueService.getValue(column, rowNode);\n if (grouping) {\n const valueString = valueObject && valueObject.toString ? String(valueObject.toString()) : \"\";\n const labels = _ChartDatasource2.getGroupLabels(rowNode, valueString);\n data[colId] = {\n labels,\n toString: function() {\n return this.labels.filter((l) => !!l).reverse().join(\" - \");\n }\n };\n if (rowNode.group) {\n groupNodeIndexes[labels.toString()] = i - numRemovedNodes;\n }\n const groupKey = labels.slice(1, labels.length).toString();\n if (groupKey) {\n groupsToRemove[groupKey] = groupNodeIndexes[groupKey];\n }\n } else {\n data[colId] = valueObject;\n }\n } else {\n data[ChartDataModel.DEFAULT_CATEGORY] = i + 1;\n }\n });\n valueCols.forEach((col) => {\n const colId = col.getColId();\n if (crossFiltering) {\n const filteredOutColId = colId + \"-filtered-out\";\n const value = this.valueService.getValue(col, rowNode);\n const actualValue = value != null && typeof value.toNumber === \"function\" ? value.toNumber() : value;\n if (filteredNodes[rowNode.id]) {\n data[colId] = actualValue;\n data[filteredOutColId] = params.aggFunc || params.isScatter ? void 0 : 0;\n } else {\n data[colId] = params.aggFunc || params.isScatter ? void 0 : 0;\n data[filteredOutColId] = actualValue;\n }\n } else {\n let value = this.valueService.getValue(col, rowNode);\n if (value && value.hasOwnProperty(\"toString\")) {\n value = parseFloat(value.toString());\n }\n data[colId] = value != null && typeof value.toNumber === \"function\" ? value.toNumber() : value;\n }\n });\n extractedRowData.push(data);\n }\n let groupChartData;\n if (grouping) {\n const groupIndexesToRemove = _15.values(groupsToRemove);\n const allData = extractedRowData;\n extractedRowData = [];\n groupChartData = [];\n for (let i = 0; i < allData.length; i++) {\n (_15.includes(groupIndexesToRemove, i) ? groupChartData : extractedRowData).push(allData[i]);\n }\n }\n return { chartData: extractedRowData, columnNames, groupChartData };\n }\n aggregateRowsByDimension(params, dataFromGrid) {\n const dimensionCols = params.dimensionCols;\n if (!params.aggFunc || dimensionCols.length === 0) {\n return dataFromGrid;\n }\n const lastCol = _15.last(dimensionCols);\n const lastColId = lastCol && lastCol.colId;\n const map = {};\n const dataAggregated = [];\n dataFromGrid.forEach((data) => {\n let currentMap = map;\n dimensionCols.forEach((col) => {\n const colId = col.colId;\n const key = data[colId];\n if (colId === lastColId) {\n let groupItem = currentMap[key];\n if (!groupItem) {\n groupItem = { __children: [] };\n dimensionCols.forEach((dimCol) => {\n const dimColId = dimCol.colId;\n groupItem[dimColId] = data[dimColId];\n });\n currentMap[key] = groupItem;\n dataAggregated.push(groupItem);\n }\n groupItem.__children.push(data);\n } else {\n if (!currentMap[key]) {\n currentMap[key] = {};\n }\n currentMap = currentMap[key];\n }\n });\n });\n if (ModuleRegistry.__assertRegistered(ModuleNames4.RowGroupingModule, \"Charting Aggregation\", this.context.getGridId())) {\n const aggStage = this.aggregationStage;\n dataAggregated.forEach((groupItem) => params.valueCols.forEach((col) => {\n if (params.crossFiltering) {\n params.valueCols.forEach((valueCol) => {\n const colId = valueCol.getColId();\n const dataToAgg = groupItem.__children.filter((child) => typeof child[colId] !== \"undefined\").map((child) => child[colId]);\n let aggResult = aggStage.aggregateValues(dataToAgg, params.aggFunc);\n groupItem[valueCol.getId()] = aggResult && typeof aggResult.value !== \"undefined\" ? aggResult.value : aggResult;\n const filteredOutColId = `${colId}-filtered-out`;\n const dataToAggFiltered = groupItem.__children.filter((child) => typeof child[filteredOutColId] !== \"undefined\").map((child) => child[filteredOutColId]);\n let aggResultFiltered = aggStage.aggregateValues(dataToAggFiltered, params.aggFunc);\n groupItem[filteredOutColId] = aggResultFiltered && typeof aggResultFiltered.value !== \"undefined\" ? aggResultFiltered.value : aggResultFiltered;\n });\n } else {\n const dataToAgg = groupItem.__children.map((child) => child[col.getId()]);\n let aggResult = aggStage.aggregateValues(dataToAgg, params.aggFunc);\n groupItem[col.getId()] = aggResult && typeof aggResult.value !== \"undefined\" ? aggResult.value : aggResult;\n }\n }));\n }\n return dataAggregated;\n }\n updatePivotKeysForSSRM() {\n const secondaryColumns = this.columnModel.getSecondaryColumns();\n if (!secondaryColumns) {\n return;\n }\n const pivotKeySeparator = this.extractPivotKeySeparator(secondaryColumns);\n secondaryColumns.forEach((col) => {\n if (pivotKeySeparator === \"\") {\n col.getColDef().pivotKeys = [];\n } else {\n const keys = col.getColId().split(pivotKeySeparator);\n col.getColDef().pivotKeys = keys.slice(0, keys.length - 1);\n }\n });\n }\n extractPivotKeySeparator(secondaryColumns) {\n if (secondaryColumns.length === 0) {\n return \"\";\n }\n const extractSeparator = (columnGroup, childId) => {\n const groupId = columnGroup.getGroupId();\n if (!columnGroup.getParent()) {\n return childId.split(groupId)[1][0];\n }\n return extractSeparator(columnGroup.getParent(), groupId);\n };\n const firstSecondaryCol = secondaryColumns[0];\n if (firstSecondaryCol.getParent() == null) {\n return \"\";\n }\n return extractSeparator(firstSecondaryCol.getParent(), firstSecondaryCol.getColId());\n }\n static getGroupLabels(rowNode, initialLabel) {\n const labels = [initialLabel];\n while (rowNode && rowNode.level !== 0) {\n rowNode = rowNode.parent;\n if (rowNode) {\n labels.push(rowNode.key);\n }\n }\n return labels;\n }\n getFilteredRowNodes() {\n const filteredNodes = {};\n this.gridRowModel.forEachNodeAfterFilterAndSort((rowNode) => {\n filteredNodes[rowNode.id] = rowNode;\n });\n return filteredNodes;\n }\n getAllRowNodes() {\n let allRowNodes = [];\n this.gridRowModel.forEachNode((rowNode) => {\n allRowNodes.push(rowNode);\n });\n return this.sortRowNodes(allRowNodes);\n }\n sortRowNodes(rowNodes) {\n const sortOptions = this.sortController.getSortOptions();\n const noSort = !sortOptions || sortOptions.length == 0;\n if (noSort)\n return rowNodes;\n return this.rowNodeSorter.doFullSort(rowNodes, sortOptions);\n }\n};\n__decorateClass4([\n Autowired13(\"rowModel\")\n], _ChartDatasource.prototype, \"gridRowModel\", 2);\n__decorateClass4([\n Autowired13(\"valueService\")\n], _ChartDatasource.prototype, \"valueService\", 2);\n__decorateClass4([\n Autowired13(\"columnModel\")\n], _ChartDatasource.prototype, \"columnModel\", 2);\n__decorateClass4([\n Autowired13(\"rowNodeSorter\")\n], _ChartDatasource.prototype, \"rowNodeSorter\", 2);\n__decorateClass4([\n Autowired13(\"sortController\")\n], _ChartDatasource.prototype, \"sortController\", 2);\n__decorateClass4([\n Optional(\"aggregationStage\")\n], _ChartDatasource.prototype, \"aggregationStage\", 2);\nvar ChartDatasource = _ChartDatasource;\nvar ChartColumnService = class extends BeanStub24 {\n constructor() {\n super(...arguments);\n this.valueColsWithoutSeriesType = /* @__PURE__ */ new Set();\n }\n postConstruct() {\n const clearValueCols = () => this.valueColsWithoutSeriesType.clear();\n this.addManagedListener(this.eventService, Events9.EVENT_NEW_COLUMNS_LOADED, clearValueCols);\n this.addManagedListener(this.eventService, Events9.EVENT_ROW_DATA_UPDATED, clearValueCols);\n }\n getColumn(colId) {\n return this.columnModel.getPrimaryColumn(colId);\n }\n getAllDisplayedColumns() {\n return this.columnModel.getAllDisplayedColumns();\n }\n getColDisplayName(col) {\n return this.columnModel.getDisplayNameForColumn(col, \"chart\");\n }\n getRowGroupColumns() {\n return this.columnModel.getRowGroupColumns();\n }\n getGroupDisplayColumns() {\n return this.columnModel.getGroupDisplayColumns();\n }\n isPivotMode() {\n return this.columnModel.isPivotMode();\n }\n isPivotActive() {\n return this.columnModel.isPivotActive();\n }\n getChartColumns() {\n const gridCols = this.columnModel.getAllGridColumns();\n const dimensionCols = /* @__PURE__ */ new Set();\n const valueCols = /* @__PURE__ */ new Set();\n gridCols.forEach((col) => {\n const colDef = col.getColDef();\n const chartDataType = colDef.chartDataType;\n if (chartDataType) {\n switch (chartDataType) {\n case \"category\":\n case \"time\":\n dimensionCols.add(col);\n return;\n case \"series\":\n valueCols.add(col);\n return;\n case \"excluded\":\n return;\n default:\n console.warn(`AG Grid: unexpected chartDataType value '${chartDataType}' supplied, instead use 'category', 'series' or 'excluded'`);\n break;\n }\n }\n if (colDef.colId === \"ag-Grid-AutoColumn\") {\n dimensionCols.add(col);\n return;\n }\n if (!col.isPrimary()) {\n valueCols.add(col);\n return;\n }\n (this.isInferredValueCol(col) ? valueCols : dimensionCols).add(col);\n });\n return { dimensionCols, valueCols };\n }\n isInferredValueCol(col) {\n const colId = col.getColId();\n if (colId === \"ag-Grid-AutoColumn\") {\n return false;\n }\n const row = this.rowPositionUtils.getRowNode({ rowIndex: 0, rowPinned: null });\n if (!row) {\n return this.valueColsWithoutSeriesType.has(colId);\n }\n let cellValue = this.valueService.getValue(col, row);\n if (cellValue == null) {\n cellValue = this.extractLeafData(row, col);\n }\n if (cellValue != null && typeof cellValue.toNumber === \"function\") {\n cellValue = cellValue.toNumber();\n }\n const isNumber5 = typeof cellValue === \"number\";\n if (isNumber5) {\n this.valueColsWithoutSeriesType.add(colId);\n }\n return isNumber5;\n }\n extractLeafData(row, col) {\n if (!row.allLeafChildren) {\n return null;\n }\n for (let i = 0; i < row.allLeafChildren.length; i++) {\n const childRow = row.allLeafChildren[i];\n const value = this.valueService.getValue(col, childRow);\n if (value != null) {\n return value;\n }\n }\n return null;\n }\n destroy() {\n this.valueColsWithoutSeriesType.clear();\n super.destroy();\n }\n};\n__decorateClass4([\n Autowired24(\"columnModel\")\n], ChartColumnService.prototype, \"columnModel\", 2);\n__decorateClass4([\n Autowired24(\"valueService\")\n], ChartColumnService.prototype, \"valueService\", 2);\n__decorateClass4([\n Autowired24(\"rowPositionUtils\")\n], ChartColumnService.prototype, \"rowPositionUtils\", 2);\n__decorateClass4([\n PostConstruct13\n], ChartColumnService.prototype, \"postConstruct\", 1);\nChartColumnService = __decorateClass4([\n Bean4(\"chartColumnService\")\n], ChartColumnService);\nvar _ComboChartModel = class _ComboChartModel2 extends BeanStub32 {\n constructor(chartDataModel) {\n var _a;\n super();\n this.suppressComboChartWarnings = false;\n this.chartDataModel = chartDataModel;\n this.seriesChartTypes = (_a = chartDataModel.params.seriesChartTypes) != null ? _a : [];\n }\n init() {\n this.initComboCharts();\n }\n update(seriesChartTypes) {\n this.seriesChartTypes = seriesChartTypes != null ? seriesChartTypes : this.seriesChartTypes;\n this.initComboCharts();\n this.updateSeriesChartTypes();\n }\n initComboCharts() {\n const seriesChartTypesExist = this.seriesChartTypes && this.seriesChartTypes.length > 0;\n const customCombo = this.chartDataModel.chartType === \"customCombo\" || seriesChartTypesExist;\n if (customCombo) {\n this.chartDataModel.chartType = \"customCombo\";\n this.savedCustomSeriesChartTypes = this.seriesChartTypes || [];\n }\n }\n updateSeriesChartTypes() {\n if (!this.chartDataModel.isComboChart()) {\n return;\n }\n this.seriesChartTypes = this.seriesChartTypes.map((seriesChartType) => {\n const primaryOnly = [\"groupedColumn\", \"stackedColumn\", \"stackedArea\"].includes(seriesChartType.chartType);\n seriesChartType.secondaryAxis = primaryOnly ? false : seriesChartType.secondaryAxis;\n return seriesChartType;\n });\n if (this.chartDataModel.chartType === \"customCombo\") {\n this.updateSeriesChartTypesForCustomCombo();\n return;\n }\n this.updateChartSeriesTypesForBuiltInCombos();\n }\n updateSeriesChartTypesForCustomCombo() {\n const seriesChartTypesSupplied = this.seriesChartTypes && this.seriesChartTypes.length > 0;\n if (!seriesChartTypesSupplied && !this.suppressComboChartWarnings) {\n console.warn(`AG Grid: 'seriesChartTypes' are required when the 'customCombo' chart type is specified.`);\n }\n this.seriesChartTypes = this.seriesChartTypes.map((s) => {\n if (!_ComboChartModel2.SUPPORTED_COMBO_CHART_TYPES.includes(s.chartType)) {\n console.warn(`AG Grid: invalid chartType '${s.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`);\n s.chartType = \"line\";\n }\n return s;\n });\n const getSeriesChartType = (valueCol) => {\n if (!this.savedCustomSeriesChartTypes || this.savedCustomSeriesChartTypes.length === 0) {\n this.savedCustomSeriesChartTypes = this.seriesChartTypes;\n }\n const providedSeriesChartType = this.savedCustomSeriesChartTypes.find((s) => s.colId === valueCol.colId);\n if (!providedSeriesChartType) {\n if (valueCol.selected && !this.suppressComboChartWarnings) {\n console.warn(`AG Grid: no 'seriesChartType' found for colId = '${valueCol.colId}', defaulting to 'line'.`);\n }\n return {\n colId: valueCol.colId,\n chartType: \"line\",\n secondaryAxis: false\n };\n }\n return providedSeriesChartType;\n };\n const updatedSeriesChartTypes = this.chartDataModel.valueColState.map(getSeriesChartType);\n this.seriesChartTypes = updatedSeriesChartTypes;\n this.savedCustomSeriesChartTypes = updatedSeriesChartTypes;\n this.suppressComboChartWarnings = true;\n }\n updateChartSeriesTypesForBuiltInCombos() {\n const { chartType, valueColState } = this.chartDataModel;\n let primaryChartType = chartType === \"columnLineCombo\" ? \"groupedColumn\" : \"stackedArea\";\n let secondaryChartType = chartType === \"columnLineCombo\" ? \"line\" : \"groupedColumn\";\n const selectedCols = valueColState.filter((cs) => cs.selected);\n const lineIndex = Math.ceil(selectedCols.length / 2);\n this.seriesChartTypes = selectedCols.map((valueCol, i) => {\n const seriesType = i >= lineIndex ? secondaryChartType : primaryChartType;\n return { colId: valueCol.colId, chartType: seriesType, secondaryAxis: false };\n });\n }\n};\n_ComboChartModel.SUPPORTED_COMBO_CHART_TYPES = [\"line\", \"groupedColumn\", \"stackedColumn\", \"area\", \"stackedArea\"];\n__decorateClass4([\n PostConstruct24\n], _ComboChartModel.prototype, \"init\", 1);\nvar ComboChartModel = _ComboChartModel;\nvar SERIES_TYPES = {\n \"area\": {\n isCartesian: true,\n canInvert: true\n },\n \"bar\": {\n isCartesian: true,\n canInvert: true\n },\n \"histogram\": {\n isCartesian: true\n },\n \"line\": {\n isCartesian: true,\n canInvert: true\n },\n \"pie\": {\n isPie: true\n },\n \"donut\": {\n isPie: true,\n canInvert: true\n },\n \"scatter\": {\n isCartesian: true\n },\n \"bubble\": {\n isCartesian: true\n },\n \"radial-column\": {\n isPolar: true,\n isEnterprise: true,\n isRadial: true,\n canInvert: true\n },\n \"radial-bar\": {\n isPolar: true,\n isEnterprise: true,\n isRadial: true,\n canInvert: true\n },\n \"radar-line\": {\n isPolar: true,\n isEnterprise: true,\n canInvert: true\n },\n \"radar-area\": {\n isPolar: true,\n isEnterprise: true,\n canInvert: true\n },\n \"nightingale\": {\n isPolar: true,\n isEnterprise: true,\n canInvert: true\n },\n \"range-bar\": {\n isCartesian: true,\n isEnterprise: true,\n canSwitchDirection: true\n },\n \"range-area\": {\n isCartesian: true,\n isEnterprise: true\n },\n \"box-plot\": {\n isCartesian: true,\n isEnterprise: true,\n canSwitchDirection: true\n },\n \"treemap\": {\n isEnterprise: true,\n isHierarchical: true\n },\n \"sunburst\": {\n isEnterprise: true,\n isHierarchical: true\n },\n \"heatmap\": {\n isCartesian: true,\n isEnterprise: true\n },\n \"waterfall\": {\n isCartesian: true,\n isEnterprise: true,\n canSwitchDirection: true\n }\n};\nfunction isSeriesType(seriesType) {\n return !!SERIES_TYPES[seriesType];\n}\nfunction isComboChart(chartType) {\n return ChartMappings.COMBO_CHART_TYPES.includes(chartType);\n}\nfunction doesSeriesHaveProperty(seriesType, prop) {\n var _a;\n return !!((_a = SERIES_TYPES[seriesType]) == null ? void 0 : _a[prop]);\n}\nfunction isEnterpriseChartType(chartType) {\n return doesSeriesHaveProperty(getSeriesType(chartType), \"isEnterprise\");\n}\nvar stackedChartTypes = /* @__PURE__ */ new Set([\"stackedColumn\", \"normalizedColumn\", \"stackedBar\", \"normalizedBar\"]);\nfunction isStacked(chartType) {\n return stackedChartTypes.has(chartType);\n}\nfunction isCartesian(seriesType) {\n return doesSeriesHaveProperty(seriesType, \"isCartesian\");\n}\nfunction isPolar(seriesType) {\n return doesSeriesHaveProperty(seriesType, \"isPolar\");\n}\nfunction isRadial(seriesType) {\n return doesSeriesHaveProperty(seriesType, \"isRadial\");\n}\nfunction isHierarchical(seriesType) {\n return doesSeriesHaveProperty(seriesType, \"isHierarchical\");\n}\nfunction getCanonicalChartType(chartType) {\n return chartType === \"doughnut\" ? \"donut\" : chartType;\n}\nfunction getSeriesTypeIfExists(chartType) {\n return ChartMappings.CHART_TYPE_TO_SERIES_TYPE[chartType];\n}\nfunction getSeriesType(chartType) {\n var _a;\n return (_a = getSeriesTypeIfExists(chartType)) != null ? _a : \"line\";\n}\nfunction isPieChartSeries(seriesType) {\n return doesSeriesHaveProperty(seriesType, \"isPie\");\n}\nfunction canOnlyHaveSingleSeries(chartType) {\n return chartType === \"pie\" || chartType === \"waterfall\" || chartType === \"histogram\";\n}\nfunction getMaxNumCategories(chartType) {\n return isHierarchical(getSeriesType(chartType)) ? void 0 : 1;\n}\nfunction getMaxNumSeries(chartType) {\n if (isHierarchical(getSeriesType(chartType))) {\n return 2;\n } else if (canOnlyHaveSingleSeries(chartType)) {\n return 1;\n } else {\n return void 0;\n }\n}\nfunction supportsInvertedCategorySeries(chartType) {\n return doesSeriesHaveProperty(getSeriesType(chartType), \"canInvert\");\n}\nfunction canSwitchDirection(chartType) {\n return doesSeriesHaveProperty(getSeriesType(chartType), \"canSwitchDirection\");\n}\nvar _ChartDataModel = class _ChartDataModel2 extends BeanStub42 {\n constructor(params) {\n super();\n this.unlinked = false;\n this.chartData = [];\n this.valueColState = [];\n this.dimensionColState = [];\n this.columnNames = {};\n this.crossFiltering = false;\n this.grouping = false;\n this.params = params;\n this.chartId = params.chartId;\n this.setParams(params);\n }\n setParams(params) {\n const {\n chartType,\n pivotChart,\n chartThemeName,\n switchCategorySeries,\n aggFunc,\n cellRange,\n suppressChartRanges,\n unlinkChart,\n crossFiltering,\n seriesGroupType\n } = params;\n this.chartType = chartType;\n this.pivotChart = pivotChart != null ? pivotChart : false;\n this.chartThemeName = chartThemeName;\n this.switchCategorySeries = !!switchCategorySeries;\n this.aggFunc = aggFunc;\n this.referenceCellRange = cellRange;\n this.suppliedCellRange = cellRange;\n this.suppressChartRanges = suppressChartRanges != null ? suppressChartRanges : false;\n this.unlinked = !!unlinkChart;\n this.crossFiltering = !!crossFiltering;\n this.seriesGroupType = seriesGroupType;\n }\n init() {\n this.datasource = this.createManagedBean(new ChartDatasource());\n this.chartColumnService = this.createManagedBean(new ChartColumnService());\n this.comboChartModel = this.createManagedBean(new ComboChartModel(this));\n this.updateCellRanges({ setColsFromRange: true });\n this.updateData();\n }\n updateModel(params) {\n const { cellRange, seriesChartTypes } = params;\n if (cellRange !== this.suppliedCellRange) {\n this.dimensionCellRange = void 0;\n this.valueCellRange = void 0;\n }\n this.setParams(params);\n this.updateSelectedDimensions(cellRange == null ? void 0 : cellRange.columns);\n this.updateCellRanges({ setColsFromRange: true });\n const shouldUpdateComboModel = this.isComboChart() || seriesChartTypes;\n if (shouldUpdateComboModel) {\n this.comboChartModel.update(seriesChartTypes);\n }\n if (!this.unlinked) {\n this.updateData();\n }\n }\n updateCellRanges(params) {\n const { updatedColState, resetOrder, maintainColState, setColsFromRange } = params != null ? params : {};\n if (this.valueCellRange) {\n this.referenceCellRange = this.valueCellRange;\n }\n const { dimensionCols, valueCols } = this.chartColumnService.getChartColumns();\n const allColsFromRanges = this.getAllColumnsFromRanges();\n if (updatedColState) {\n this.updateColumnState(updatedColState, resetOrder);\n }\n this.setDimensionCellRange(dimensionCols, allColsFromRanges, updatedColState);\n this.setValueCellRange(valueCols, allColsFromRanges, setColsFromRange);\n if (!updatedColState && !maintainColState) {\n this.resetColumnState();\n this.syncDimensionCellRange();\n }\n this.comboChartModel.updateSeriesChartTypes();\n }\n updateData() {\n const { startRow, endRow } = this.getRowIndexes();\n if (this.pivotChart) {\n this.resetColumnState();\n }\n this.grouping = this.isGrouping();\n const params = {\n aggFunc: this.aggFunc,\n dimensionCols: this.getSelectedDimensions(),\n grouping: this.grouping,\n pivoting: this.isPivotActive(),\n crossFiltering: this.crossFiltering,\n valueCols: this.getSelectedValueCols(),\n startRow,\n endRow,\n isScatter: _24.includes([\"scatter\", \"bubble\"], this.chartType)\n };\n const { chartData, columnNames, groupChartData } = this.datasource.getData(params);\n this.chartData = chartData;\n this.groupChartData = groupChartData;\n this.columnNames = columnNames;\n this.categoryAxisType = void 0;\n }\n isGrouping() {\n const usingTreeData = this.gos.get(\"treeData\");\n const groupedCols = usingTreeData ? null : this.chartColumnService.getRowGroupColumns();\n const isGroupActive = usingTreeData || groupedCols && groupedCols.length > 0;\n const colIds = this.getSelectedDimensions().map(({ colId }) => colId);\n const displayedGroupCols = this.chartColumnService.getGroupDisplayColumns();\n const groupDimensionSelected = displayedGroupCols.map((col) => col.getColId()).some((id) => colIds.includes(id));\n return !!isGroupActive && groupDimensionSelected;\n }\n getSelectedValueCols() {\n return this.valueColState.filter((cs) => cs.selected).map((cs) => cs.column);\n }\n getSelectedDimensions() {\n return this.dimensionColState.filter((cs) => cs.selected);\n }\n getColDisplayName(col) {\n return this.chartColumnService.getColDisplayName(col);\n }\n isPivotMode() {\n return this.chartColumnService.isPivotMode();\n }\n getChartDataType(colId) {\n const column = this.chartColumnService.getColumn(colId);\n return column ? column.getColDef().chartDataType : void 0;\n }\n isPivotActive() {\n return this.chartColumnService.isPivotActive();\n }\n createCellRange(type, ...columns) {\n return {\n id: this.chartId,\n // set range ID to match chart ID so we can identify changes to the ranges for this chart\n startRow: this.referenceCellRange.startRow,\n endRow: this.referenceCellRange.endRow,\n columns,\n startColumn: type === CellRangeType2.DIMENSION || this.referenceCellRange.startColumn == null ? columns[0] : this.referenceCellRange.startColumn,\n type\n };\n }\n getAllColumnsFromRanges() {\n if (this.pivotChart) {\n return _24.convertToSet(this.chartColumnService.getAllDisplayedColumns());\n }\n const columns = this.dimensionCellRange || this.valueCellRange ? [] : this.referenceCellRange.columns;\n if (this.dimensionCellRange) {\n columns.push(...this.dimensionCellRange.columns);\n }\n if (this.valueCellRange) {\n columns.push(...this.valueCellRange.columns);\n }\n return _24.convertToSet(columns);\n }\n getRowIndexes() {\n let startRow = 0, endRow = 0;\n const { rangeService, valueCellRange, dimensionCellRange } = this;\n const cellRange = valueCellRange || dimensionCellRange;\n if (rangeService && cellRange) {\n startRow = rangeService.getRangeStartRow(cellRange).rowIndex;\n const endRowPosition = rangeService.getRangeEndRow(cellRange);\n endRow = endRowPosition.rowPinned === \"bottom\" ? -1 : endRowPosition.rowIndex;\n }\n return { startRow, endRow };\n }\n resetColumnState() {\n const { dimensionCols, valueCols } = this.chartColumnService.getChartColumns();\n const allCols = this.getAllColumnsFromRanges();\n const isInitialising = this.valueColState.length < 1;\n this.dimensionColState = [];\n this.valueColState = [];\n const supportsMultipleDimensions = isHierarchical(getSeriesType(this.chartType));\n let hasSelectedDimension = false;\n let order = 1;\n const aggFuncDimension = this.suppliedCellRange.columns[0];\n dimensionCols.forEach((column) => {\n const isAutoGroupCol = column.getColId() === \"ag-Grid-AutoColumn\";\n let selected = false;\n if (this.crossFiltering && this.aggFunc) {\n if (aggFuncDimension.getColId() === column.getColId()) {\n selected = true;\n }\n } else {\n selected = isAutoGroupCol ? true : (!hasSelectedDimension || supportsMultipleDimensions) && allCols.has(column);\n }\n this.dimensionColState.push({\n column,\n colId: column.getColId(),\n displayName: this.getColDisplayName(column),\n selected,\n order: order++\n });\n if (selected) {\n hasSelectedDimension = true;\n }\n });\n const defaultCategory = {\n colId: _ChartDataModel2.DEFAULT_CATEGORY,\n displayName: this.chartTranslationService.translate(\"defaultCategory\"),\n selected: !hasSelectedDimension,\n // if no dimensions in range select the default\n order: 0\n };\n this.dimensionColState.unshift(defaultCategory);\n const valueColumnsFromReferenceRange = this.referenceCellRange.columns.filter((c) => valueCols.has(c));\n valueCols.forEach((column) => {\n if (isInitialising && _24.includes(this.referenceCellRange.columns, column)) {\n column = valueColumnsFromReferenceRange.shift();\n }\n this.valueColState.push({\n column,\n colId: column.getColId(),\n displayName: this.getColDisplayName(column),\n selected: allCols.has(column),\n order: order++\n });\n });\n }\n updateColumnState(updatedCol, resetOrder) {\n const idsMatch = (cs) => cs.colId === updatedCol.colId;\n const { dimensionColState, valueColState } = this;\n const matchedDimensionColState = dimensionColState.find(idsMatch);\n const matchedValueColState = valueColState.find(idsMatch);\n if (matchedDimensionColState) {\n const supportsMultipleDimensions = isHierarchical(getSeriesType(this.chartType));\n if (!supportsMultipleDimensions) {\n const selectedColumnState = updatedCol.selected ? matchedDimensionColState : dimensionColState.filter((cs) => cs !== matchedDimensionColState).find(({ selected }) => selected);\n dimensionColState.forEach((cs) => cs.selected = cs === selectedColumnState);\n } else {\n matchedDimensionColState.selected = updatedCol.selected;\n }\n } else if (matchedValueColState) {\n matchedValueColState.selected = updatedCol.selected;\n }\n const allColumns = [...dimensionColState, ...valueColState];\n const orderedColIds = [];\n if (!resetOrder) {\n allColumns.forEach((col, i) => {\n if (i === updatedCol.order) {\n orderedColIds.push(updatedCol.colId);\n }\n if (col.colId !== updatedCol.colId) {\n orderedColIds.push(col.colId);\n }\n });\n allColumns.forEach((col) => {\n const order = orderedColIds.indexOf(col.colId);\n col.order = order >= 0 ? orderedColIds.indexOf(col.colId) : allColumns.length - 1;\n });\n }\n this.reorderColState();\n }\n reorderColState() {\n const ascColStateOrder = (a, b) => a.order - b.order;\n this.dimensionColState.sort(ascColStateOrder);\n this.valueColState.sort(ascColStateOrder);\n }\n setDimensionCellRange(dimensionCols, colsInRange, updatedColState) {\n this.dimensionCellRange = void 0;\n const supportsMultipleDimensions = isHierarchical(getSeriesType(this.chartType));\n if (!updatedColState && !this.dimensionColState.length) {\n const selectedCols = new Array();\n dimensionCols.forEach((col) => {\n if (selectedCols.length > 0 && !supportsMultipleDimensions || !colsInRange.has(col)) {\n return;\n }\n selectedCols.push(col);\n });\n if (selectedCols.length > 0) {\n this.dimensionCellRange = this.createCellRange(CellRangeType2.DIMENSION, ...selectedCols);\n }\n return;\n }\n let selectedDimensionColStates = updatedColState ? [updatedColState] : [];\n if (this.crossFiltering && this.aggFunc) {\n const aggFuncDimension = this.suppliedCellRange.columns[0];\n selectedDimensionColStates = this.dimensionColState.filter((cs) => cs.colId === aggFuncDimension.getColId());\n } else if (supportsMultipleDimensions || selectedDimensionColStates.length === 0 || selectedDimensionColStates.some(({ column }) => !column || !dimensionCols.has(column))) {\n selectedDimensionColStates = this.dimensionColState.filter((cs) => cs.selected);\n }\n const isDefaultCategory = selectedDimensionColStates.length === 1 ? selectedDimensionColStates[0].colId === _ChartDataModel2.DEFAULT_CATEGORY : false;\n const selectedColumns = selectedDimensionColStates.map(({ column }) => column).filter((value) => value != null);\n if (selectedColumns.length > 0 && !isDefaultCategory) {\n this.dimensionCellRange = this.createCellRange(CellRangeType2.DIMENSION, ...selectedColumns);\n }\n }\n setValueCellRange(valueCols, colsInRange, setColsFromRange) {\n this.valueCellRange = void 0;\n const selectedValueCols = [];\n const maxSelection = getMaxNumSeries(this.chartType);\n let numSelected = 0;\n valueCols.forEach((col) => {\n if (setColsFromRange) {\n if ((maxSelection == null || numSelected < maxSelection) && colsInRange.has(col)) {\n selectedValueCols.push(col);\n numSelected++;\n }\n } else {\n if (this.valueColState.some((colState) => colState.selected && colState.colId === col.getColId())) {\n selectedValueCols.push(col);\n }\n }\n });\n if (selectedValueCols.length > 0) {\n let orderedColIds = [];\n if (this.valueColState.length > 0) {\n orderedColIds = this.valueColState.map((c) => c.colId);\n } else {\n colsInRange.forEach((c) => orderedColIds.push(c.getColId()));\n }\n selectedValueCols.sort((a, b) => orderedColIds.indexOf(a.getColId()) - orderedColIds.indexOf(b.getColId()));\n this.valueCellRange = this.createCellRange(CellRangeType2.VALUE, ...selectedValueCols);\n }\n }\n resetCellRanges(dimension, value) {\n if (!dimension && !value) {\n return;\n }\n const { dimensionCols, valueCols } = this.chartColumnService.getChartColumns();\n const allColsFromRanges = this.getAllColumnsFromRanges();\n if (dimension) {\n this.setDimensionCellRange(dimensionCols, allColsFromRanges);\n }\n if (value) {\n this.setValueCellRange(valueCols, allColsFromRanges);\n }\n }\n updateSelectedDimensions(columns) {\n const colIdSet = new Set(columns.map((column) => column.getColId()));\n const supportsMultipleDimensions = isHierarchical(getSeriesType(this.chartType));\n if (!supportsMultipleDimensions) {\n const foundColState = this.dimensionColState.find((colState) => colIdSet.has(colState.colId)) || this.dimensionColState[0];\n const selectedColumnId = foundColState.colId;\n this.dimensionColState = this.dimensionColState.map((colState) => __spreadProps3(__spreadValues3({}, colState), {\n selected: colState.colId === selectedColumnId\n }));\n } else {\n const foundColStates = this.dimensionColState.filter((colState) => colIdSet.has(colState.colId));\n const selectedColumnIds = new Set(foundColStates.map((colState) => colState.colId));\n this.dimensionColState = this.dimensionColState.map((colState) => __spreadProps3(__spreadValues3({}, colState), {\n selected: selectedColumnIds.has(colState.colId)\n }));\n }\n }\n syncDimensionCellRange() {\n const selectedDimensions = this.getSelectedDimensions();\n if (selectedDimensions.length === 0)\n return;\n const selectedCols = selectedDimensions.map(({ column }) => column).filter((value) => value != null);\n if (selectedCols.length > 0) {\n this.dimensionCellRange = this.createCellRange(CellRangeType2.DIMENSION, ...selectedCols);\n }\n }\n isComboChart(chartType) {\n return isComboChart(chartType != null ? chartType : this.chartType);\n }\n};\n_ChartDataModel.DEFAULT_CATEGORY = \"AG-GRID-DEFAULT-CATEGORY\";\n__decorateClass4([\n Autowired34(\"rangeService\")\n], _ChartDataModel.prototype, \"rangeService\", 2);\n__decorateClass4([\n Autowired34(\"chartTranslationService\")\n], _ChartDataModel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct32\n], _ChartDataModel.prototype, \"init\", 1);\nvar ChartDataModel = _ChartDataModel;\nvar ALL_AXIS_TYPES = [\"number\", \"category\", \"grouped-category\", \"log\", \"time\"];\nfunction getLegacyAxisType(chartType) {\n switch (chartType) {\n case \"bar\":\n case \"stackedBar\":\n case \"normalizedBar\":\n return [\"number\", \"category\"];\n case \"groupedBar\":\n return [\"number\", \"grouped-category\"];\n case \"column\":\n case \"stackedColumn\":\n case \"normalizedColumn\":\n case \"line\":\n case \"area\":\n case \"stackedArea\":\n case \"normalizedArea\":\n case \"histogram\":\n return [\"category\", \"number\"];\n case \"groupedColumn\":\n return [\"grouped-category\", \"number\"];\n case \"scatter\":\n case \"bubble\":\n return [\"number\", \"number\"];\n default:\n return void 0;\n }\n}\nfunction emptyTarget(value) {\n return Array.isArray(value) ? [] : {};\n}\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n return options.clone !== false && options.isMergeableObject(value) ? deepMerge(emptyTarget(value), value, options) : value;\n}\nfunction defaultArrayMerge(target, source, options) {\n return target.concat(source).map(function(element) {\n return cloneUnlessOtherwiseSpecified(element, options);\n });\n}\nfunction getMergeFunction(key, options) {\n if (!options.customMerge) {\n return deepMerge;\n }\n const customMerge = options.customMerge(key);\n return typeof customMerge === \"function\" ? customMerge : deepMerge;\n}\nfunction getEnumerableOwnPropertySymbols(target) {\n return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n return target.propertyIsEnumerable(symbol);\n }) : [];\n}\nfunction getKeys(target) {\n return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));\n}\nfunction propertyIsOnObject(object, property) {\n try {\n return property in object;\n } catch (_382) {\n return false;\n }\n}\nfunction propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));\n}\nfunction mergeObject(target = {}, source = {}, options) {\n const destination = {};\n if (options.isMergeableObject(target)) {\n getKeys(target).forEach(function(key) {\n destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n });\n }\n getKeys(source).forEach(function(key) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n destination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n } else {\n destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n }\n });\n return destination;\n}\nfunction defaultIsMergeableObject(value) {\n return isNonNullObject(value) && !isSpecial(value);\n}\nfunction isNonNullObject(value) {\n return !!value && typeof value === \"object\";\n}\nfunction isSpecial(value) {\n const stringValue = Object.prototype.toString.call(value);\n return stringValue === \"[object RegExp]\" || stringValue === \"[object Date]\";\n}\nfunction deepMerge(target, source, options) {\n options = options || {};\n options.arrayMerge = options.arrayMerge || defaultArrayMerge;\n options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject;\n options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n const sourceIsArray = Array.isArray(source);\n const targetIsArray = Array.isArray(target);\n const sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n if (!sourceAndTargetTypesMatch) {\n return cloneUnlessOtherwiseSpecified(source, options);\n } else if (sourceIsArray) {\n return options.arrayMerge(target, source, options);\n } else {\n return mergeObject(target, source, options);\n }\n}\nfunction get(source, expression, defaultValue) {\n if (source == null) {\n return defaultValue;\n }\n const keys = expression.split(\".\");\n let objectToRead = source;\n while (keys.length > 1) {\n objectToRead = objectToRead[keys.shift()];\n if (objectToRead == null) {\n return defaultValue;\n }\n }\n const value = objectToRead[keys[0]];\n return value != null ? value : defaultValue;\n}\nfunction set(target, expression, value) {\n if (target == null) {\n return;\n }\n const keys = expression.split(\".\");\n let objectToUpdate = target;\n keys.forEach((key, i) => {\n if (!objectToUpdate[key]) {\n objectToUpdate[key] = {};\n }\n if (i < keys.length - 1) {\n objectToUpdate = objectToUpdate[key];\n }\n });\n objectToUpdate[keys[keys.length - 1]] = value;\n}\nfunction createAgChartTheme(chartProxyParams, proxy, isEnterprise, chartThemeDefaults, updatedOverrides) {\n var _a;\n const { chartOptionsToRestore, chartPaletteToRestore, chartThemeToRestore } = chartProxyParams;\n const themeName = getSelectedTheme(chartProxyParams);\n const stockTheme = isStockTheme(themeName);\n const rootTheme = stockTheme ? { baseTheme: themeName } : (_a = lookupCustomChartTheme(chartProxyParams, themeName)) != null ? _a : {};\n const gridOptionsThemeOverrides = chartProxyParams.getGridOptionsChartThemeOverrides();\n const apiThemeOverrides = chartProxyParams.apiChartThemeOverrides;\n const standaloneChartType = getSeriesType(chartProxyParams.chartType);\n const crossFilteringOverrides = chartProxyParams.crossFiltering ? createCrossFilterThemeOverrides(proxy, chartProxyParams, standaloneChartType) : void 0;\n const isTitleEnabled = () => {\n const isTitleEnabled2 = (obj) => {\n if (!obj) {\n return false;\n }\n return Object.keys(obj).some((key) => get(obj[key], \"title.enabled\", false));\n };\n return isTitleEnabled2(gridOptionsThemeOverrides) || isTitleEnabled2(apiThemeOverrides);\n };\n const overrides = [\n stockTheme ? inbuiltStockThemeOverrides(chartProxyParams, isEnterprise, isTitleEnabled()) : void 0,\n chartThemeDefaults,\n crossFilteringOverrides,\n gridOptionsThemeOverrides,\n apiThemeOverrides,\n __spreadValues3({}, chartOptionsToRestore != null ? chartOptionsToRestore : {}),\n updatedOverrides\n ];\n const theme = overrides.filter((v) => !!v).reduce(\n (r, n) => ({\n baseTheme: r,\n overrides: n\n }),\n rootTheme\n );\n if (chartPaletteToRestore && themeName === chartThemeToRestore) {\n const rootThemePalette = _Theme.getChartTheme(rootTheme).palette;\n if (!isIdenticalPalette(chartPaletteToRestore, rootThemePalette)) {\n theme.palette = chartPaletteToRestore;\n }\n }\n return theme;\n}\nfunction isIdenticalPalette(paletteA, paletteB) {\n const arrayCompare = (arrA, arrB) => {\n if (arrA.length !== arrB.length)\n return false;\n return arrA.every((v, i) => v === arrB[i]);\n };\n return arrayCompare(paletteA.fills, paletteB.fills) && arrayCompare(paletteA.strokes, paletteB.strokes);\n}\nfunction isStockTheme(themeName) {\n return _34.includes(Object.keys(_Theme.themes), themeName);\n}\nfunction createCrossFilterThemeOverrides(proxy, chartProxyParams, seriesType) {\n const legend = {\n listeners: {\n legendItemClick: (e) => {\n const chart = proxy.getChart();\n chart.series.forEach((s) => {\n s.toggleSeriesItem(e.itemId, e.enabled);\n s.toggleSeriesItem(`${e.itemId}-filtered-out`, e.enabled);\n });\n }\n }\n };\n return {\n [seriesType]: {\n tooltip: {\n delay: 500\n },\n legend,\n listeners: {\n click: (e) => chartProxyParams.crossFilterCallback(e, true)\n }\n }\n };\n}\nvar STATIC_INBUILT_STOCK_THEME_AXES_OVERRIDES = ALL_AXIS_TYPES.reduce(\n (r, n) => __spreadProps3(__spreadValues3({}, r), { [n]: { title: { _enabledFromTheme: true } } }),\n {}\n);\nfunction inbuiltStockThemeOverrides(params, isEnterprise, titleEnabled) {\n const extraPadding = params.getExtraPaddingDirections();\n return {\n common: __spreadProps3(__spreadValues3({}, isEnterprise ? { animation: { duration: 500 } } : void 0), {\n axes: STATIC_INBUILT_STOCK_THEME_AXES_OVERRIDES,\n padding: {\n // don't add extra padding when a title is present!\n top: !titleEnabled && extraPadding.includes(\"top\") ? 40 : 20,\n right: extraPadding.includes(\"right\") ? 30 : 20,\n bottom: extraPadding.includes(\"bottom\") ? 40 : 20,\n left: extraPadding.includes(\"left\") ? 30 : 20\n }\n }),\n pie: {\n series: {\n title: { _enabledFromTheme: true },\n calloutLabel: { _enabledFromTheme: true },\n sectorLabel: {\n enabled: false,\n _enabledFromTheme: true\n }\n }\n },\n donut: {\n series: {\n title: { _enabledFromTheme: true },\n calloutLabel: { _enabledFromTheme: true },\n sectorLabel: {\n enabled: false,\n _enabledFromTheme: true\n }\n }\n }\n };\n}\nfunction getSelectedTheme(chartProxyParams) {\n let chartThemeName = chartProxyParams.getChartThemeName();\n const availableThemes = chartProxyParams.getChartThemes();\n if (!_34.includes(availableThemes, chartThemeName)) {\n chartThemeName = availableThemes[0];\n }\n return chartThemeName;\n}\nfunction lookupCustomChartTheme(chartProxyParams, name) {\n const { customChartThemes } = chartProxyParams;\n const customChartTheme = customChartThemes && customChartThemes[name];\n if (!customChartTheme) {\n console.warn(\n `AG Grid: no stock theme exists with the name '${name}' and no custom chart theme with that name was supplied to 'customChartThemes'`\n );\n }\n return customChartTheme;\n}\nvar validateIfDefined = (validationFn) => {\n return (value) => {\n if (value == void 0)\n return true;\n return validationFn(value);\n };\n};\nvar isString = (value) => typeof value === \"string\";\nvar isBoolean = (value) => typeof value === \"boolean\";\nvar isValidSeriesChartType = (value) => typeof value === \"object\";\nvar createWarnMessage = (property, expectedType) => (value) => `AG Grid - unable to update chart as invalid params supplied: \\`${property}: ${value}\\`, expected ${expectedType}.`;\nvar createEnterpriseMessage = (feature) => {\n const url = \"https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/\";\n return `${feature} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See ${url} for more details.`;\n};\nvar _ChartParamsValidator = class _ChartParamsValidator2 {\n static isEnterprise() {\n return _ModuleSupport.enterpriseModule.isEnterprise;\n }\n static isValidChartType(value) {\n return !!getSeriesTypeIfExists(value) || isComboChart(value);\n }\n static isLegacyChartType(value) {\n return _ChartParamsValidator2.legacyChartTypes.includes(value);\n }\n static validateUpdateParams(params) {\n let paramsToValidate = params;\n switch (paramsToValidate.type) {\n case \"rangeChartUpdate\":\n return _ChartParamsValidator2.validateUpdateRangeChartParams(params);\n case \"pivotChartUpdate\":\n return _ChartParamsValidator2.validateUpdatePivotChartParams(params);\n case \"crossFilterChartUpdate\":\n return _ChartParamsValidator2.validateUpdateCrossFilterChartParams(params);\n default:\n console.warn(`AG Grid - Invalid value supplied for 'type': ${params.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`);\n return false;\n }\n }\n static validateCreateParams(params) {\n return _ChartParamsValidator2.validateProperties(params, [\n _ChartParamsValidator2.enterpriseChartTypeValidation,\n _ChartParamsValidator2.switchCategorySeriesValidation\n ]);\n }\n static validateUpdateRangeChartParams(params) {\n const validations = [\n ..._ChartParamsValidator2.commonUpdateValidations,\n _ChartParamsValidator2.enterpriseChartTypeValidation,\n ..._ChartParamsValidator2.cellRangeValidations,\n {\n property: \"seriesChartTypes\",\n validationFn: (value) => value === void 0 || Array.isArray(value) && value.every(isValidSeriesChartType),\n warnMessage: createWarnMessage(\"seriesChartTypes\", \"Array of SeriesChartType\")\n }\n ];\n return _ChartParamsValidator2.validateProperties(params, validations, [..._ChartParamsValidator2.baseUpdateChartParams, \"cellRange\", \"suppressChartRanges\", \"switchCategorySeries\", \"aggFunc\", \"seriesChartTypes\", \"seriesGroupType\"], \"UpdateRangeChartParams\");\n }\n static validateUpdatePivotChartParams(params) {\n const validations = [\n ..._ChartParamsValidator2.commonUpdateValidations\n ];\n return _ChartParamsValidator2.validateProperties(params, validations, [..._ChartParamsValidator2.baseUpdateChartParams], \"UpdatePivotChartParams\");\n }\n static validateUpdateCrossFilterChartParams(params) {\n const validations = [\n ..._ChartParamsValidator2.commonUpdateValidations,\n ..._ChartParamsValidator2.cellRangeValidations\n ];\n return _ChartParamsValidator2.validateProperties(params, validations, [..._ChartParamsValidator2.baseUpdateChartParams, \"cellRange\", \"suppressChartRanges\", \"aggFunc\"], \"UpdateCrossFilterChartParams\");\n }\n static validateProperties(params, validations, validPropertyNames, paramsType) {\n let validatedProperties = void 0;\n for (const validation of validations) {\n const { property, validationFn, warnMessage, warnIfFixed } = validation;\n if (property in params) {\n const value = params[property];\n const validationResult = validationFn(value);\n if (validationResult === true)\n continue;\n if (validationResult === false) {\n console.warn(warnMessage(value));\n return false;\n }\n validatedProperties = validatedProperties || __spreadValues3({}, params);\n validatedProperties[property] = validationResult;\n if (warnIfFixed) {\n console.warn(warnMessage(value));\n }\n }\n }\n if (validPropertyNames) {\n for (const property in params) {\n if (!validPropertyNames.includes(property)) {\n console.warn(`AG Grid - Unexpected property supplied. ${paramsType} does not contain: \\`${property}\\`.`);\n return false;\n }\n }\n }\n if (validatedProperties)\n return validatedProperties;\n return true;\n }\n};\n_ChartParamsValidator.legacyChartTypes = [\n \"doughnut\"\n];\n_ChartParamsValidator.baseUpdateChartParams = [\"type\", \"chartId\", \"chartType\", \"chartThemeName\", \"chartThemeOverrides\", \"unlinkChart\"];\n_ChartParamsValidator.validateChartType = validateIfDefined((chartType) => {\n if (_ChartParamsValidator.isValidChartType(chartType))\n return true;\n if (_ChartParamsValidator.isLegacyChartType(chartType)) {\n const renamedChartType = getCanonicalChartType(chartType);\n _43.warnOnce(`The chart type '${chartType}' has been deprecated. Please use '${renamedChartType}' instead.`);\n return renamedChartType;\n }\n ;\n return false;\n});\n_ChartParamsValidator.validateAgChartThemeOverrides = validateIfDefined((themeOverrides) => {\n return typeof themeOverrides === \"object\";\n});\n_ChartParamsValidator.validateChartParamsCellRange = validateIfDefined((cellRange) => {\n return typeof cellRange === \"object\";\n});\n_ChartParamsValidator.validateAggFunc = validateIfDefined((aggFunc) => {\n return typeof aggFunc === \"string\" || typeof aggFunc === \"function\";\n});\n_ChartParamsValidator.enterpriseChartTypeValidation = {\n property: \"chartType\",\n validationFn: validateIfDefined((chartType) => _ChartParamsValidator.isEnterprise() || !chartType || !isEnterpriseChartType(chartType)),\n warnMessage: (chartType) => createEnterpriseMessage(`The '${chartType}' chart type`)\n};\n_ChartParamsValidator.switchCategorySeriesValidation = {\n property: \"switchCategorySeries\",\n validationFn: validateIfDefined((switchCategorySeries) => {\n if (!switchCategorySeries || _ChartParamsValidator.isEnterprise()) {\n return true;\n }\n return void 0;\n }),\n warnMessage: () => createEnterpriseMessage(`'switchCategorySeries' has been ignored as it`),\n warnIfFixed: true\n};\n_ChartParamsValidator.commonUpdateValidations = [\n { property: \"chartId\", validationFn: isString, warnMessage: createWarnMessage(\"chartId\", \"string\") },\n {\n property: \"chartType\",\n validationFn: _ChartParamsValidator.validateChartType,\n warnMessage: createWarnMessage(\"chartType\", \"ChartType\")\n },\n {\n property: \"chartThemeName\",\n validationFn: isString,\n warnMessage: createWarnMessage(\"chartThemeName\", \"string\")\n },\n {\n property: \"chartThemeOverrides\",\n validationFn: _ChartParamsValidator.validateAgChartThemeOverrides,\n warnMessage: createWarnMessage(\"chartThemeOverrides\", \"AgChartThemeOverrides\")\n },\n { property: \"unlinkChart\", validationFn: isBoolean, warnMessage: createWarnMessage(\"unlinkChart\", \"boolean\") }\n];\n_ChartParamsValidator.cellRangeValidations = [\n {\n property: \"cellRange\",\n validationFn: _ChartParamsValidator.validateChartParamsCellRange,\n warnMessage: createWarnMessage(\"cellRange\", \"ChartParamsCellRange\")\n },\n {\n property: \"suppressChartRanges\",\n validationFn: isBoolean,\n warnMessage: createWarnMessage(\"suppressChartRanges\", \"boolean\")\n },\n {\n property: \"aggFunc\",\n validationFn: _ChartParamsValidator.validateAggFunc,\n warnMessage: createWarnMessage(\"aggFunc\", \"string or IAggFunc\")\n },\n _ChartParamsValidator.switchCategorySeriesValidation\n];\nvar ChartParamsValidator = _ChartParamsValidator;\nvar DEFAULT_THEMES = [\"ag-default\", \"ag-material\", \"ag-sheets\", \"ag-polychroma\", \"ag-vivid\"];\nvar _ChartController = class _ChartController2 extends BeanStub52 {\n constructor(model) {\n super();\n this.model = model;\n this.isEnterprise = () => _ModuleSupport2.enterpriseModule.isEnterprise;\n }\n init() {\n this.setChartRange();\n this.addManagedListener(this.eventService, Events23.EVENT_RANGE_SELECTION_CHANGED, (event) => {\n if (event.id && event.id === this.model.chartId) {\n this.updateForRangeChange();\n }\n });\n if (this.model.unlinked) {\n if (this.rangeService) {\n this.rangeService.setCellRanges([]);\n }\n }\n this.addManagedListener(this.eventService, Events23.EVENT_COLUMN_MOVED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events23.EVENT_COLUMN_PINNED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events23.EVENT_COLUMN_VISIBLE, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events23.EVENT_COLUMN_ROW_GROUP_CHANGED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events23.EVENT_MODEL_UPDATED, this.updateForGridChange.bind(this));\n this.addManagedListener(this.eventService, Events23.EVENT_CELL_VALUE_CHANGED, this.updateForDataChange.bind(this));\n }\n update(params) {\n if (!this.validUpdateType(params))\n return false;\n const validationResult = ChartParamsValidator.validateUpdateParams(params);\n if (!validationResult)\n return false;\n const validParams = validationResult === true ? params : validationResult;\n this.applyValidatedChartParams(validParams);\n return true;\n }\n applyValidatedChartParams(params) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n const { chartId, chartType, chartThemeName, unlinkChart } = params;\n const common = {\n chartId,\n pivotChart: this.model.pivotChart,\n chartType: chartType != null ? chartType : this.model.chartType,\n chartThemeName: chartThemeName != null ? chartThemeName : this.model.chartThemeName,\n unlinkChart: unlinkChart != null ? unlinkChart : this.model.unlinked,\n cellRange: this.model.suppliedCellRange,\n switchCategorySeries: this.model.switchCategorySeries,\n aggFunc: this.model.aggFunc,\n seriesChartTypes: void 0,\n suppressChartRanges: false,\n crossFiltering: false\n };\n let chartModelParams = __spreadValues3({}, common);\n switch (params.type) {\n case \"rangeChartUpdate\":\n chartModelParams.cellRange = (_a = this.createCellRange(params)) != null ? _a : this.model.suppliedCellRange;\n chartModelParams.switchCategorySeries = (_b = params.switchCategorySeries) != null ? _b : this.model.switchCategorySeries;\n chartModelParams.aggFunc = (_c = params.aggFunc) != null ? _c : this.model.aggFunc;\n chartModelParams.seriesChartTypes = params.seriesChartTypes;\n chartModelParams.suppressChartRanges = (_d = params.suppressChartRanges) != null ? _d : this.model.suppressChartRanges;\n chartModelParams.seriesGroupType = (_e = params.seriesGroupType) != null ? _e : this.model.seriesGroupType;\n break;\n case \"crossFilterChartUpdate\":\n chartModelParams.cellRange = (_f = this.createCellRange(params)) != null ? _f : this.model.suppliedCellRange;\n chartModelParams.switchCategorySeries = false;\n chartModelParams.aggFunc = (_g = params.aggFunc) != null ? _g : this.model.aggFunc;\n chartModelParams.crossFiltering = true;\n chartModelParams.suppressChartRanges = (_h = params.suppressChartRanges) != null ? _h : this.model.suppressChartRanges;\n break;\n case \"pivotChartUpdate\":\n chartModelParams.switchCategorySeries = false;\n break;\n }\n this.model.updateModel(chartModelParams);\n const removeChartCellRanges = chartModelParams.unlinkChart || chartModelParams.suppressChartRanges;\n removeChartCellRanges ? (_i = this.rangeService) == null ? void 0 : _i.setCellRanges([]) : this.setChartRange();\n }\n updateForGridChange(params) {\n if (this.model.unlinked) {\n return;\n }\n const { maintainColState, setColsFromRange } = params != null ? params : {};\n this.model.updateCellRanges({ maintainColState, setColsFromRange });\n this.model.updateData();\n this.setChartRange();\n }\n updateForDataChange() {\n if (this.model.unlinked) {\n return;\n }\n this.model.updateData();\n this.raiseChartModelUpdateEvent();\n }\n updateForRangeChange() {\n this.updateForGridChange({ setColsFromRange: true });\n this.raiseChartRangeSelectionChangedEvent();\n }\n updateForPanelChange(params) {\n this.model.updateCellRanges(params);\n this.model.updateData();\n if (params.skipAnimation) {\n this.getChartProxy().getChartRef().skipAnimations();\n }\n this.setChartRange();\n this.raiseChartRangeSelectionChangedEvent();\n }\n updateThemeOverrides(updatedOverrides) {\n this.chartProxy.updateThemeOverrides(updatedOverrides);\n }\n getChartUpdateParams(updatedOverrides) {\n const selectedCols = this.getSelectedValueColState();\n const fields = selectedCols.map((c) => ({ colId: c.colId, displayName: c.displayName }));\n const data = this.getChartData();\n const selectedDimensions = this.getSelectedDimensions();\n const params = {\n data,\n groupData: this.model.groupChartData,\n grouping: this.isGrouping(),\n categories: selectedDimensions.map((selectedDimension) => {\n var _a;\n return {\n id: selectedDimension.colId,\n name: selectedDimension.displayName,\n chartDataType: (_a = this.model.categoryAxisType) != null ? _a : this.model.getChartDataType(selectedDimension.colId)\n };\n }),\n fields,\n chartId: this.getChartId(),\n getCrossFilteringContext: () => ({ lastSelectedChartId: \"xxx\" }),\n //this.params.crossFilteringContext, //TODO\n seriesChartTypes: this.getSeriesChartTypes(),\n updatedOverrides,\n seriesGroupType: this.model.seriesGroupType\n };\n return this.isCategorySeriesSwitched() ? this.invertCategorySeriesParams(params) : params;\n }\n invertCategorySeriesParams(params) {\n const [category] = params.categories;\n const categories = [{ id: ChartDataModel.DEFAULT_CATEGORY, name: \"\" }];\n const fields = params.data.map((value, index) => {\n const categoryKey = `${category.id}:${index}`;\n const categoryValue = value[category.id];\n const seriesLabel = categoryValue == null ? \"\" : String(categoryValue);\n return { colId: categoryKey, displayName: seriesLabel };\n });\n const data = params.fields.map((field) => {\n const row = {\n [ChartDataModel.DEFAULT_CATEGORY]: field.displayName\n };\n for (const [index, value] of params.data.entries()) {\n const categoryKey = `${category.id}:${index}`;\n const seriesLabelValue = value[field.colId];\n row[categoryKey] = seriesLabelValue;\n }\n return row;\n });\n return __spreadProps3(__spreadValues3({}, params), {\n categories,\n fields,\n data\n });\n }\n getChartModel() {\n const modelType = this.model.pivotChart ? \"pivot\" : \"range\";\n const seriesChartTypes = this.isComboChart() ? this.model.comboChartModel.seriesChartTypes : void 0;\n return {\n modelType,\n chartId: this.model.chartId,\n chartType: this.model.chartType,\n chartThemeName: this.getChartThemeName(),\n chartOptions: this.chartProxy.getChartThemeOverrides(),\n chartPalette: this.chartProxy.getChartPalette(),\n cellRange: this.getCellRangeParams(),\n switchCategorySeries: this.model.switchCategorySeries,\n suppressChartRanges: this.model.suppressChartRanges,\n aggFunc: this.model.aggFunc,\n unlinkChart: this.model.unlinked,\n seriesChartTypes,\n seriesGroupType: this.model.seriesGroupType\n };\n }\n getChartId() {\n return this.model.chartId;\n }\n getChartData() {\n return this.model.chartData;\n }\n getChartType() {\n return this.model.chartType;\n }\n setChartType(chartType) {\n this.updateMultiSeriesAndCategory(this.model.chartType, chartType);\n this.model.chartType = chartType;\n this.model.comboChartModel.updateSeriesChartTypes();\n this.model.switchCategorySeries = false;\n this.model.categoryAxisType = void 0;\n this.model.seriesGroupType = void 0;\n this.raiseChartModelUpdateEvent();\n this.raiseChartOptionsChangedEvent();\n }\n isCategorySeriesSwitched() {\n return this.model.switchCategorySeries && !this.model.isGrouping();\n }\n switchCategorySeries(inverted) {\n if (!supportsInvertedCategorySeries(this.getChartType()))\n return;\n this.model.switchCategorySeries = inverted;\n this.raiseChartModelUpdateEvent();\n }\n getAggFunc() {\n return this.model.aggFunc;\n }\n setAggFunc(value, silent) {\n if (this.model.aggFunc === value)\n return;\n this.model.aggFunc = value;\n if (silent)\n return;\n this.model.updateData();\n this.raiseChartModelUpdateEvent();\n }\n updateMultiSeriesAndCategory(previousChartType, chartType) {\n var _a, _b;\n const updateForMax = (columns, maxNum) => {\n let numSelected = 0;\n for (const colState of columns) {\n if (!colState.selected)\n continue;\n if (numSelected >= maxNum) {\n colState.selected = false;\n } else {\n numSelected++;\n }\n }\n if (numSelected === 0) {\n columns[0].selected = true;\n }\n };\n const maxNumDimensions = getMaxNumCategories(chartType);\n const maxNumSeries = getMaxNumSeries(chartType);\n const updateDimensionColState = maxNumDimensions != null && ((_a = getMaxNumCategories(previousChartType)) != null ? _a : 100) > (maxNumDimensions != null ? maxNumDimensions : 100);\n const updateValueColState = maxNumSeries != null && ((_b = getMaxNumSeries(previousChartType)) != null ? _b : 100) > (maxNumSeries != null ? maxNumSeries : 100);\n if (updateDimensionColState) {\n updateForMax(this.model.dimensionColState, maxNumDimensions);\n }\n if (updateValueColState) {\n updateForMax(this.model.valueColState, maxNumSeries);\n }\n if (updateDimensionColState || updateValueColState) {\n this.model.resetCellRanges(updateDimensionColState, updateValueColState);\n this.setChartRange(true);\n }\n }\n setChartThemeName(chartThemeName, silent) {\n this.model.chartThemeName = chartThemeName;\n if (!silent) {\n this.raiseChartModelUpdateEvent();\n this.raiseChartOptionsChangedEvent();\n }\n }\n getChartThemeName() {\n return this.model.chartThemeName;\n }\n isPivotChart() {\n return this.model.pivotChart;\n }\n isPivotMode() {\n return this.model.isPivotMode();\n }\n isGrouping() {\n return this.model.isGrouping();\n }\n isCrossFilterChart() {\n return this.model.crossFiltering;\n }\n getThemeNames() {\n return this.gos.get(\"chartThemes\") || DEFAULT_THEMES;\n }\n getThemes() {\n const themeNames = this.getThemeNames();\n return themeNames.map((themeName) => {\n const stockTheme = isStockTheme(themeName);\n const theme = stockTheme ? themeName : this.chartProxy.lookupCustomChartTheme(themeName);\n return _Theme2.getChartTheme(theme);\n });\n }\n getPalettes() {\n const themes = this.getThemes();\n return themes.map((theme) => {\n return theme.palette;\n });\n }\n getThemeTemplateParameters() {\n const themes = this.getThemes();\n return themes.map((theme) => {\n return theme.getTemplateParameters();\n });\n }\n getValueColState() {\n return this.model.valueColState.map(this.displayNameMapper.bind(this));\n }\n getSelectedValueColState() {\n return this.getValueColState().filter((cs) => cs.selected);\n }\n getSelectedDimensions() {\n return this.model.getSelectedDimensions();\n }\n displayNameMapper(col) {\n const columnNames = this.model.columnNames[col.colId];\n col.displayName = columnNames ? columnNames.join(\" - \") : this.model.getColDisplayName(col.column);\n return col;\n }\n getColStateForMenu() {\n return { dimensionCols: this.model.dimensionColState, valueCols: this.getValueColState() };\n }\n setChartRange(silent = false) {\n if (this.rangeService && !this.model.suppressChartRanges && !this.model.unlinked) {\n this.rangeService.setCellRanges(this.getCellRanges());\n }\n if (!silent) {\n this.raiseChartModelUpdateEvent();\n }\n }\n detachChartRange() {\n this.model.unlinked = !this.model.unlinked;\n if (this.model.unlinked) {\n if (this.rangeService) {\n this.rangeService.setCellRanges([]);\n }\n } else {\n this.updateForGridChange();\n }\n this.dispatchEvent({ type: _ChartController2.EVENT_CHART_LINKED_CHANGED });\n }\n setChartProxy(chartProxy) {\n this.chartProxy = chartProxy;\n }\n getChartProxy() {\n return this.chartProxy;\n }\n isActiveXYChart() {\n return _52.includes([\"scatter\", \"bubble\"], this.getChartType());\n }\n isChartLinked() {\n return !this.model.unlinked;\n }\n customComboExists() {\n const savedCustomSeriesChartTypes = this.model.comboChartModel.savedCustomSeriesChartTypes;\n return savedCustomSeriesChartTypes && savedCustomSeriesChartTypes.length > 0;\n }\n getSeriesChartTypes() {\n return this.model.comboChartModel.seriesChartTypes;\n }\n isComboChart(chartType) {\n return this.model.isComboChart(chartType);\n }\n updateSeriesChartType(colId, chartType, secondaryAxis) {\n const seriesChartType = this.model.comboChartModel.seriesChartTypes.find((s) => s.colId === colId);\n if (seriesChartType) {\n const updateChartType = this.model.chartType !== \"customCombo\";\n if (updateChartType) {\n this.model.chartType = \"customCombo\";\n }\n const prevSeriesChartType = seriesChartType.chartType;\n if (chartType != null) {\n seriesChartType.chartType = chartType;\n }\n if (secondaryAxis != null) {\n seriesChartType.secondaryAxis = secondaryAxis;\n }\n this.model.comboChartModel.savedCustomSeriesChartTypes = this.model.comboChartModel.seriesChartTypes;\n this.model.comboChartModel.updateSeriesChartTypes();\n this.updateForDataChange();\n if (updateChartType) {\n this.dispatchEvent({\n type: _ChartController2.EVENT_CHART_TYPE_CHANGED\n });\n }\n if (prevSeriesChartType !== chartType) {\n this.dispatchEvent({\n type: _ChartController2.EVENT_CHART_SERIES_CHART_TYPE_CHANGED\n });\n }\n this.raiseChartOptionsChangedEvent();\n }\n }\n getActiveSeriesChartTypes() {\n const selectedColIds = this.getSelectedValueColState().map((c) => c.colId);\n return this.getSeriesChartTypes().filter((s) => selectedColIds.includes(s.colId));\n }\n getChartSeriesTypes(chartType) {\n const targetChartType = chartType != null ? chartType : this.getChartType();\n return this.isComboChart(targetChartType) ? [\"line\", \"bar\", \"area\"] : [getSeriesType(targetChartType)];\n }\n getChartSeriesType() {\n const seriesChartTypes = this.getSeriesChartTypes();\n if (seriesChartTypes.length === 0) {\n return \"bar\";\n }\n const ct = seriesChartTypes[0].chartType;\n if (ct === \"columnLineCombo\") {\n return \"bar\";\n }\n if (ct === \"areaColumnCombo\") {\n return \"area\";\n }\n return getSeriesType(ct);\n }\n getCellRanges() {\n return [this.model.dimensionCellRange, this.model.valueCellRange].filter((r) => r);\n }\n createCellRange(params) {\n var _a;\n return params.cellRange && ((_a = this.rangeService) == null ? void 0 : _a.createPartialCellRangeFromRangeParams(params.cellRange, true));\n }\n validUpdateType(params) {\n var _a;\n if (!params.type) {\n console.warn(`AG Grid - Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`);\n return false;\n }\n const chartTypeMap = {\n \"Range Chart\": () => !this.isPivotChart() && !this.isCrossFilterChart(),\n \"Pivot Chart\": () => this.isPivotChart(),\n \"Cross Filter Chart\": () => this.isCrossFilterChart()\n };\n const currentChartType = (_a = Object.keys(chartTypeMap).find((type) => chartTypeMap[type]())) != null ? _a : \"Range Chart\";\n const valid = params.type === `${currentChartType[0].toLowerCase()}${currentChartType.slice(1).replace(/ /g, \"\")}Update`;\n if (!valid) {\n console.warn(`AG Grid - Unable to update chart as a '${params.type}' update type is not permitted on a ${currentChartType}.`);\n }\n return valid;\n }\n getCellRangeParams() {\n const cellRanges = this.getCellRanges();\n const firstCellRange = cellRanges[0];\n const startRow = firstCellRange && firstCellRange.startRow || null;\n const endRow = firstCellRange && firstCellRange.endRow || null;\n return {\n rowStartIndex: startRow && startRow.rowIndex,\n rowStartPinned: startRow && startRow.rowPinned,\n rowEndIndex: endRow && endRow.rowIndex,\n rowEndPinned: endRow && endRow.rowPinned,\n columns: cellRanges.reduce((columns, value) => columns.concat(value.columns.map((c) => c.getId())), [])\n };\n }\n setCategoryAxisType(categoryAxisType) {\n this.model.categoryAxisType = categoryAxisType;\n this.raiseChartModelUpdateEvent();\n }\n getSeriesGroupType() {\n var _a;\n return (_a = this.model.seriesGroupType) != null ? _a : this.chartProxy.getSeriesGroupType();\n }\n setSeriesGroupType(seriesGroupType) {\n this.model.seriesGroupType = seriesGroupType;\n this.raiseChartModelUpdateEvent();\n }\n raiseChartModelUpdateEvent() {\n const event = {\n type: _ChartController2.EVENT_CHART_MODEL_UPDATE\n };\n this.dispatchEvent(event);\n }\n raiseChartUpdatedEvent() {\n const event = {\n type: _ChartController2.EVENT_CHART_UPDATED\n };\n this.dispatchEvent(event);\n }\n raiseChartApiUpdateEvent() {\n const event = {\n type: _ChartController2.EVENT_CHART_API_UPDATE\n };\n this.dispatchEvent(event);\n }\n raiseChartOptionsChangedEvent() {\n const { chartId, chartType } = this.getChartModel();\n const event = {\n type: Events23.EVENT_CHART_OPTIONS_CHANGED,\n chartId,\n chartType,\n chartThemeName: this.getChartThemeName(),\n chartOptions: this.chartProxy.getChartThemeOverrides()\n };\n this.eventService.dispatchEvent(event);\n }\n raiseChartRangeSelectionChangedEvent() {\n const event = {\n type: Events23.EVENT_CHART_RANGE_SELECTION_CHANGED,\n id: this.model.chartId,\n chartId: this.model.chartId,\n cellRange: this.getCellRangeParams()\n };\n this.eventService.dispatchEvent(event);\n }\n destroy() {\n super.destroy();\n if (this.rangeService) {\n this.rangeService.setCellRanges([]);\n }\n }\n};\n_ChartController.EVENT_CHART_UPDATED = \"chartUpdated\";\n_ChartController.EVENT_CHART_API_UPDATE = \"chartApiUpdate\";\n_ChartController.EVENT_CHART_MODEL_UPDATE = \"chartModelUpdate\";\n_ChartController.EVENT_CHART_TYPE_CHANGED = \"chartTypeChanged\";\n_ChartController.EVENT_CHART_SERIES_CHART_TYPE_CHANGED = \"chartSeriesChartTypeChanged\";\n_ChartController.EVENT_CHART_LINKED_CHANGED = \"chartLinkedChanged\";\n__decorateClass4([\n Autowired42(\"rangeService\")\n], _ChartController.prototype, \"rangeService\", 2);\n__decorateClass4([\n PostConstruct43\n], _ChartController.prototype, \"init\", 1);\nvar ChartController = _ChartController;\nvar _AgPillSelect = class _AgPillSelect2 extends Component10 {\n constructor(config) {\n super(_AgPillSelect2.TEMPLATE);\n this.config = config != null ? config : {};\n const { selectedValueList, valueFormatter, valueList } = this.config;\n this.selectedValues = selectedValueList != null ? selectedValueList : [];\n this.valueList = valueList != null ? valueList : [];\n this.valueFormatter = valueFormatter != null ? valueFormatter : (value) => _62.escapeString(value);\n }\n init() {\n const { ariaLabel, onValuesChange, dragSourceId } = this.config;\n this.dropZonePanel = this.createManagedBean(new PillSelectDropZonePanel(\n {\n getValues: () => this.selectedValues,\n setValues: (values) => this.updateValues(values),\n isDraggable: () => this.selectedValues.length > 1\n },\n (value) => this.valueFormatter(value),\n ariaLabel,\n dragSourceId\n ));\n const eGui = this.getGui();\n eGui.appendChild(this.dropZonePanel.getGui());\n this.initSelect();\n if (onValuesChange != null) {\n this.onValuesChange = onValuesChange;\n }\n }\n setValues(valueList, selectedValues) {\n const { added, removed, updated } = this.getChanges(this.valueList, valueList);\n let refreshSelect = false;\n if (added.length || removed.length || updated.length) {\n refreshSelect = true;\n }\n this.valueList = valueList;\n this.updateValues(selectedValues, refreshSelect, true);\n return this;\n }\n setValueFormatter(valueFormatter) {\n this.valueFormatter = valueFormatter;\n return this;\n }\n initSelect() {\n const options = this.createSelectOptions();\n if (!options.length) {\n return false;\n }\n const { selectPlaceholder: placeholder } = this.config;\n this.eSelect = this.createBean(new AgSelect({\n options,\n placeholder,\n onValueChange: (value) => this.addValue(value),\n pickerIcon: \"chartsMenuAdd\"\n }));\n this.getGui().appendChild(this.eSelect.getGui());\n return true;\n }\n createSelectOptions() {\n let options = [];\n const { maxSelection } = this.config;\n if (maxSelection && this.selectedValues.length >= maxSelection) {\n return options;\n }\n this.valueList.forEach((value) => {\n if (!this.selectedValues.includes(value)) {\n options.push({ value, text: this.valueFormatter(value) });\n }\n });\n return options;\n }\n addValue(value) {\n this.dropZonePanel.addItem(value);\n }\n updateValues(values, forceRefreshSelect, silent) {\n var _a, _b, _c, _d, _e;\n const previousSelectedValues = this.selectedValues;\n this.selectedValues = values;\n const changes = this.getChanges(previousSelectedValues, values);\n const refreshSelect = forceRefreshSelect || changes.added.length || changes.removed.length;\n const activeElement = this.gos.getActiveDomElement();\n const selectHasFocus = (_a = this.eSelect) == null ? void 0 : _a.getGui().contains(activeElement);\n const dropZoneHasFocus = (_b = this.dropZonePanel) == null ? void 0 : _b.getGui().contains(activeElement);\n if (!silent) {\n (_c = this.onValuesChange) == null ? void 0 : _c.call(this, changes);\n }\n const emptyRefreshedSelect = refreshSelect ? !this.refreshSelect() : false;\n this.dropZonePanel.refreshGui();\n if (refreshSelect && selectHasFocus) {\n if (emptyRefreshedSelect) {\n this.dropZonePanel.focusList(true);\n } else {\n (_d = this.eSelect) == null ? void 0 : _d.getFocusableElement().focus();\n }\n }\n if (dropZoneHasFocus && !values.length) {\n (_e = this.eSelect) == null ? void 0 : _e.getFocusableElement().focus();\n }\n }\n getChanges(previousSelectedValues, newSelectedValues) {\n const added = newSelectedValues.filter((value) => !previousSelectedValues.includes(value));\n const removed = previousSelectedValues.filter((value) => !newSelectedValues.includes(value));\n const updated = newSelectedValues.filter((value, index) => previousSelectedValues[index] !== value);\n return { added, removed, updated, selected: newSelectedValues };\n }\n refreshSelect() {\n if (!this.eSelect) {\n return this.initSelect();\n }\n const options = this.createSelectOptions();\n if (!options.length) {\n _62.removeFromParent(this.eSelect.getGui());\n this.eSelect = this.destroyBean(this.eSelect);\n return false;\n }\n this.eSelect.clearOptions().addOptions(options).setValue(void 0, true);\n return true;\n }\n destroy() {\n this.destroyBean(this.eSelect);\n super.destroy();\n }\n};\n_AgPillSelect.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n PostConstruct52\n], _AgPillSelect.prototype, \"init\", 1);\nvar AgPillSelect = _AgPillSelect;\nvar PillSelectDragComp = class extends PillDragComp {\n constructor(value, dragSourceDropTarget, ghost, valueFormatter, draggable, sourceId) {\n super(dragSourceDropTarget, ghost, false);\n this.value = value;\n this.valueFormatter = valueFormatter;\n this.draggable = draggable;\n this.sourceId = sourceId;\n }\n getItem() {\n return this.value;\n }\n getDisplayName() {\n return this.valueFormatter(this.value);\n }\n getAriaDisplayName() {\n return this.getDisplayName();\n }\n getTooltip() {\n return void 0;\n }\n createGetDragItem() {\n return () => ({\n value: this.value\n });\n }\n getDragSourceType() {\n return DragSourceType3.ChartPanel;\n }\n getDragSourceId() {\n return this.sourceId;\n }\n isDraggable() {\n return this.draggable;\n }\n};\nvar PillSelectDropZonePanel = class extends PillDropZonePanel {\n constructor(model, valueFormatter, ariaLabel, sourceId) {\n super(false);\n this.model = model;\n this.valueFormatter = valueFormatter;\n this.ariaLabel = ariaLabel;\n this.sourceId = sourceId;\n }\n postConstruct() {\n super.init();\n }\n isItemDroppable(item, draggingEvent) {\n return this.isSourceEventFromTarget(draggingEvent) || this.sourceId != null && this.sourceId === draggingEvent.dragSource.sourceId;\n }\n updateItems(items) {\n this.model.setValues(items);\n }\n getExistingItems() {\n return this.model.getValues();\n }\n getIconName() {\n return this.isPotentialDndItems() ? DragAndDropService2.ICON_MOVE : DragAndDropService2.ICON_NOT_ALLOWED;\n }\n getAriaLabel() {\n return this.ariaLabel;\n }\n createPillComponent(item, dropTarget, ghost) {\n return new PillSelectDragComp(item, dropTarget, ghost, this.valueFormatter, this.model.isDraggable(), this.sourceId);\n }\n getItems(dragItem) {\n return [dragItem.value];\n }\n isInterestedIn(type) {\n return type === DragSourceType3.ChartPanel;\n }\n};\n__decorateClass4([\n PostConstruct52\n], PillSelectDropZonePanel.prototype, \"postConstruct\", 1);\nvar DragDataPanel = class extends Component22 {\n constructor(chartController, autoScrollService, allowMultipleSelection, maxSelection, template) {\n super(template);\n this.chartController = chartController;\n this.autoScrollService = autoScrollService;\n this.allowMultipleSelection = allowMultipleSelection;\n this.maxSelection = maxSelection;\n this.columnComps = /* @__PURE__ */ new Map();\n }\n refreshColumnComps(cols) {\n if (!_72.areEqual(_72.keys(this.columnComps), cols.map(({ colId }) => colId))) {\n return false;\n }\n cols.forEach((col) => {\n this.columnComps.get(col.colId).setValue(col.selected, true);\n });\n return true;\n }\n createGroup(columns, valueFormatter, selectLabelKey, dragSourceId, skipAnimation) {\n if (this.allowMultipleSelection) {\n const selectedValueList = columns.filter((col) => col.selected);\n this.valuePillSelect = this.groupComp.createManagedBean(new AgPillSelect({\n valueList: columns,\n selectedValueList,\n valueFormatter,\n selectPlaceholder: this.chartTranslationService.translate(selectLabelKey),\n dragSourceId,\n onValuesChange: (params) => this.onValueChange(params),\n maxSelection: this.maxSelection\n }));\n this.groupComp.addItem(this.valuePillSelect);\n } else {\n const params = this.createValueSelectParams(columns);\n params.onValueChange = (updatedColState) => {\n columns.forEach((col) => {\n col.selected = false;\n });\n updatedColState.selected = true;\n if (updatedColState.colId === ChartDataModel.DEFAULT_CATEGORY) {\n this.chartController.setAggFunc(void 0, true);\n }\n this.chartController.updateForPanelChange({ updatedColState, skipAnimation: skipAnimation == null ? void 0 : skipAnimation() });\n };\n this.valueSelect = this.groupComp.createManagedBean(new AgSelect2(params));\n this.groupComp.addItem(this.valueSelect);\n }\n }\n refreshValueSelect(columns) {\n if (!this.valueSelect) {\n return;\n }\n const { options, value } = this.createValueSelectParams(columns);\n this.valueSelect.clearOptions().addOptions(options).setValue(value, true);\n }\n createValueSelectParams(columns) {\n let selectedValue;\n const options = columns.map((value) => {\n var _a;\n const text = (_a = value.displayName) != null ? _a : \"\";\n if (value.selected) {\n selectedValue = value;\n }\n return {\n value,\n text\n };\n });\n return {\n options,\n value: selectedValue\n };\n }\n onDragging(draggingEvent) {\n const itemHovered = this.checkHoveredItem(draggingEvent);\n if (!itemHovered) {\n return;\n }\n this.lastDraggedColumn = draggingEvent.dragItem.columns[0];\n const { comp, position } = itemHovered;\n const { comp: lastHoveredComp, position: lastHoveredPosition } = this.lastHoveredItem || {};\n if (comp === lastHoveredComp && position === lastHoveredPosition) {\n return;\n }\n this.autoScrollService.check(draggingEvent.event);\n this.clearHoveredItems();\n this.lastHoveredItem = { comp, position };\n const eGui = comp.getGui();\n eGui.classList.add(\"ag-list-item-hovered\", `ag-item-highlight-${position}`);\n }\n checkHoveredItem(draggingEvent) {\n if (_72.missing(draggingEvent.vDirection)) {\n return null;\n }\n const mouseEvent = draggingEvent.event;\n for (const comp of this.columnComps.values()) {\n const eGui = comp.getGui();\n if (!eGui.querySelector(\".ag-chart-data-column-drag-handle\")) {\n continue;\n }\n const rect = eGui.getBoundingClientRect();\n const isOverComp = mouseEvent.clientY >= rect.top && mouseEvent.clientY <= rect.bottom;\n if (isOverComp) {\n const height = eGui.clientHeight;\n const position = mouseEvent.clientY > rect.top + height / 2 ? \"bottom\" : \"top\";\n return { comp, position };\n }\n }\n return null;\n }\n onDragLeave() {\n this.clearHoveredItems();\n }\n onDragStop() {\n if (this.lastHoveredItem) {\n const { dimensionCols, valueCols } = this.chartController.getColStateForMenu();\n const draggedColumnState = [...dimensionCols, ...valueCols].find((state) => state.column === this.lastDraggedColumn);\n if (draggedColumnState) {\n let targetIndex = Array.from(this.columnComps.values()).indexOf(this.lastHoveredItem.comp);\n if (this.lastHoveredItem.position === \"bottom\") {\n targetIndex++;\n }\n draggedColumnState.order = targetIndex;\n this.chartController.updateForPanelChange({ updatedColState: draggedColumnState });\n }\n }\n this.clearHoveredItems();\n this.lastDraggedColumn = void 0;\n this.autoScrollService.ensureCleared();\n }\n clearHoveredItems() {\n this.columnComps.forEach((columnComp) => {\n columnComp.getGui().classList.remove(\n \"ag-list-item-hovered\",\n \"ag-item-highlight-top\",\n \"ag-item-highlight-bottom\"\n );\n });\n this.lastHoveredItem = void 0;\n }\n addDragHandle(comp, col) {\n const eDragHandle = _72.createIconNoSpan(\"columnDrag\", this.gos);\n eDragHandle.classList.add(\"ag-drag-handle\", \"ag-chart-data-column-drag-handle\");\n comp.getGui().insertAdjacentElement(\"beforeend\", eDragHandle);\n const dragSource = {\n type: DragSourceType22.ChartPanel,\n eElement: eDragHandle,\n dragItemName: col.displayName,\n getDragItem: () => ({ columns: [col.column] }),\n onDragStopped: () => this.onDragStop()\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(() => this.dragAndDropService.removeDragSource(dragSource));\n }\n addChangeListener(component, updatedColState) {\n this.addManagedListener(component, Events32.EVENT_FIELD_VALUE_CHANGED, () => {\n updatedColState.selected = component.getValue();\n this.chartController.updateForPanelChange({ updatedColState });\n });\n }\n isInterestedIn(type) {\n return type === DragSourceType22.ChartPanel;\n }\n onValueChange({ added, updated, removed, selected }) {\n let updatedColState;\n let resetOrder;\n const updateOrder = () => {\n selected.forEach((col, index) => {\n col.order = index;\n });\n resetOrder = true;\n };\n if (added.length) {\n updatedColState = added[0];\n updatedColState.selected = true;\n updateOrder();\n } else if (removed.length) {\n updatedColState = removed[0];\n updatedColState.selected = false;\n } else if (updated.length) {\n updateOrder();\n updatedColState = updated[0];\n }\n if (updatedColState) {\n this.chartController.updateForPanelChange({ updatedColState, resetOrder });\n }\n }\n destroy() {\n this.valuePillSelect = void 0;\n this.valueSelect = void 0;\n super.destroy();\n }\n};\n__decorateClass4([\n Autowired52(\"dragAndDropService\")\n], DragDataPanel.prototype, \"dragAndDropService\", 2);\n__decorateClass4([\n Autowired52(\"chartTranslationService\")\n], DragDataPanel.prototype, \"chartTranslationService\", 2);\nvar DEFAULT_AGG_FUNC = \"sum\";\nvar _CategoriesDataPanel = class _CategoriesDataPanel2 extends DragDataPanel {\n constructor(chartController, autoScrollService, title, allowMultipleSelection, dimensionCols, isOpen) {\n const maxSelection = void 0;\n super(chartController, autoScrollService, allowMultipleSelection, maxSelection, _CategoriesDataPanel2.TEMPLATE);\n this.title = title;\n this.dimensionCols = dimensionCols;\n this.isOpen = isOpen;\n }\n init() {\n this.groupComp = this.createBean(new AgGroupComponent2({\n title: this.title,\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: false,\n cssIdentifier: \"charts-data\",\n expanded: this.isOpen\n }));\n if (this.chartMenuService.isLegacyFormat()) {\n this.createLegacyCategoriesGroup(this.dimensionCols);\n this.clearAggFuncControls();\n } else {\n this.createCategoriesGroup(this.dimensionCols);\n this.createAggFuncControls(this.dimensionCols);\n }\n this.getGui().appendChild(this.groupComp.getGui());\n }\n refresh(dimensionCols) {\n var _a;\n if (this.chartMenuService.isLegacyFormat()) {\n if (!this.refreshColumnComps(dimensionCols)) {\n this.recreate(dimensionCols);\n }\n } else {\n (_a = this.valuePillSelect) == null ? void 0 : _a.setValues(dimensionCols, dimensionCols.filter((col) => col.selected));\n this.refreshValueSelect(dimensionCols);\n this.refreshAggFuncControls(dimensionCols, this.chartController.getAggFunc());\n }\n }\n recreate(dimensionCols) {\n this.isOpen = this.groupComp.isExpanded();\n _82.clearElement(this.getGui());\n this.destroyBean(this.groupComp);\n this.dimensionCols = dimensionCols;\n this.init();\n }\n createCategoriesGroup(columns) {\n this.createGroup(columns, (col) => {\n var _a;\n return (_a = col.displayName) != null ? _a : \"\";\n }, \"categoryAdd\", \"categorySelect\", () => !this.chartController.getAggFunc());\n }\n createLegacyCategoriesGroup(columns) {\n const inputName = `chartDimension${this.groupComp.getCompId()}`;\n const supportsMultipleCategoryColumns = this.allowMultipleSelection;\n columns.forEach((col) => {\n var _a;\n const params = {\n label: (_a = col.displayName) != null ? _a : \"\",\n value: col.selected,\n inputName\n };\n const comp = this.groupComp.createManagedBean(\n supportsMultipleCategoryColumns ? (() => {\n const checkboxComp = new AgCheckbox2(params);\n checkboxComp.addCssClass(\"ag-data-select-checkbox\");\n return checkboxComp;\n })() : new AgRadioButton2(params)\n );\n this.addChangeListener(comp, col);\n this.groupComp.addItem(comp);\n this.columnComps.set(col.colId, comp);\n if (supportsMultipleCategoryColumns)\n this.addDragHandle(comp, col);\n });\n if (supportsMultipleCategoryColumns) {\n const categoriesGroupGui = this.groupComp.getGui();\n const dropTarget = {\n getIconName: () => DragAndDropService3.ICON_MOVE,\n getContainer: () => categoriesGroupGui,\n onDragging: (params) => this.onDragging(params),\n onDragLeave: () => this.onDragLeave(),\n isInterestedIn: this.isInterestedIn.bind(this),\n targetContainsSource: true\n };\n this.dragAndDropService.addDropTarget(dropTarget);\n this.addDestroyFunc(() => this.dragAndDropService.removeDropTarget(dropTarget));\n }\n }\n createAggFuncControls(dimensionCols) {\n const aggFunc = this.chartController.getAggFunc();\n this.groupComp.addItem(this.aggFuncToggle = this.createBean(new AgToggleButton({\n label: this.chartTranslationService.translate(\"aggregate\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n value: aggFunc != void 0,\n onValueChange: (value) => {\n var _a, _b;\n const aggFunc2 = value ? DEFAULT_AGG_FUNC : void 0;\n this.chartController.setAggFunc(aggFunc2);\n (_a = this.aggFuncSelect) == null ? void 0 : _a.setValue(aggFunc2, true);\n (_b = this.aggFuncSelect) == null ? void 0 : _b.setDisplayed(aggFunc2 != void 0);\n }\n })));\n this.groupComp.addItem(this.aggFuncSelect = this.createBean(new AgSelect3({\n options: [\n { value: \"sum\", text: this.chartTranslationService.translate(\"sum\") },\n { value: \"first\", text: this.chartTranslationService.translate(\"first\") },\n { value: \"last\", text: this.chartTranslationService.translate(\"last\") },\n { value: \"min\", text: this.chartTranslationService.translate(\"min\") },\n { value: \"max\", text: this.chartTranslationService.translate(\"max\") },\n { value: \"count\", text: this.chartTranslationService.translate(\"count\") },\n { value: \"avg\", text: this.chartTranslationService.translate(\"avg\") }\n ],\n value: typeof aggFunc === \"string\" ? aggFunc : void 0,\n onValueChange: (value) => {\n this.chartController.setAggFunc(value);\n }\n })));\n this.refreshAggFuncControls(dimensionCols, aggFunc);\n }\n refreshAggFuncControls(dimensionCols, aggFunc) {\n var _a, _b, _c, _d;\n const selectedDimensions = dimensionCols.filter((col) => col.selected);\n const supportsAggregation = selectedDimensions.some((col) => col.colId !== ChartDataModel.DEFAULT_CATEGORY);\n (_a = this.aggFuncToggle) == null ? void 0 : _a.setValue(aggFunc != void 0);\n (_b = this.aggFuncSelect) == null ? void 0 : _b.setValue(typeof aggFunc === \"string\" ? aggFunc : void 0, true);\n (_c = this.aggFuncToggle) == null ? void 0 : _c.setDisplayed(supportsAggregation);\n (_d = this.aggFuncSelect) == null ? void 0 : _d.setDisplayed(supportsAggregation && aggFunc != void 0);\n }\n clearAggFuncControls() {\n this.aggFuncToggle = this.aggFuncToggle && this.destroyBean(this.aggFuncToggle);\n this.aggFuncSelect = this.aggFuncSelect && this.destroyBean(this.aggFuncSelect);\n }\n destroy() {\n this.clearAggFuncControls();\n this.groupComp = this.destroyBean(this.groupComp);\n super.destroy();\n }\n};\n_CategoriesDataPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired62(\"chartMenuService\")\n], _CategoriesDataPanel.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct62\n], _CategoriesDataPanel.prototype, \"init\", 1);\nvar CategoriesDataPanel = _CategoriesDataPanel;\nvar _SeriesDataPanel = class _SeriesDataPanel2 extends DragDataPanel {\n constructor(chartController, autoScrollService, chartOptionsService, title, allowMultipleSelect, maxSelection, valueCols, isOpen) {\n super(chartController, autoScrollService, allowMultipleSelect, maxSelection, _SeriesDataPanel2.TEMPLATE);\n this.chartOptionsService = chartOptionsService;\n this.title = title;\n this.valueCols = valueCols;\n this.isOpen = isOpen;\n }\n init() {\n this.groupComp = this.createBean(new AgGroupComponent3({\n title: this.title,\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: false,\n cssIdentifier: \"charts-data\",\n expanded: this.isOpen\n }));\n if (this.chartController.isActiveXYChart()) {\n const pairedModeToggle = this.groupComp.createManagedBean(new AgToggleButton2({\n label: this.chartTranslationService.translate(\"paired\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n value: this.chartOptionsService.getPairedMode(),\n onValueChange: (newValue) => {\n this.chartOptionsService.setPairedMode(!!newValue);\n this.chartController.updateForGridChange({ maintainColState: true });\n }\n }));\n this.groupComp.addItem(pairedModeToggle);\n }\n if (this.chartMenuService.isLegacyFormat()) {\n this.createLegacySeriesGroup(this.valueCols);\n } else {\n this.createSeriesGroup(this.valueCols);\n }\n this.getGui().appendChild(this.groupComp.getGui());\n }\n refresh(valueCols) {\n var _a, _b;\n if (this.chartMenuService.isLegacyFormat()) {\n const canRefresh = this.refreshColumnComps(valueCols);\n if (canRefresh) {\n if (this.chartController.isActiveXYChart()) {\n const getSeriesLabel = this.generateGetSeriesLabel(valueCols);\n valueCols.forEach((col) => {\n this.columnComps.get(col.colId).setLabel(getSeriesLabel(col));\n });\n }\n } else {\n this.recreate(valueCols);\n }\n } else {\n (_a = this.valuePillSelect) == null ? void 0 : _a.setValueFormatter(this.generateGetSeriesLabel(valueCols));\n (_b = this.valuePillSelect) == null ? void 0 : _b.setValues(valueCols, valueCols.filter((col) => col.selected));\n this.refreshValueSelect(valueCols);\n }\n }\n recreate(valueCols) {\n this.isOpen = this.groupComp.isExpanded();\n _92.clearElement(this.getGui());\n this.destroyBean(this.groupComp);\n this.valueCols = valueCols;\n this.init();\n }\n createSeriesGroup(columns) {\n this.createGroup(columns, this.generateGetSeriesLabel(columns), \"seriesAdd\", \"seriesSelect\");\n }\n createLegacySeriesGroup(columns) {\n const getSeriesLabel = this.generateGetSeriesLabel(columns);\n columns.forEach((col) => {\n const label = getSeriesLabel(col);\n const comp = this.groupComp.createManagedBean(new AgCheckbox3({\n label,\n value: col.selected\n }));\n comp.addCssClass(\"ag-data-select-checkbox\");\n this.addChangeListener(comp, col);\n this.groupComp.addItem(comp);\n this.columnComps.set(col.colId, comp);\n this.addDragHandle(comp, col);\n });\n const seriesGroupGui = this.groupComp.getGui();\n const dropTarget = {\n getIconName: () => DragAndDropService4.ICON_MOVE,\n getContainer: () => seriesGroupGui,\n onDragging: (params) => this.onDragging(params),\n onDragLeave: () => this.onDragLeave(),\n isInterestedIn: this.isInterestedIn.bind(this),\n targetContainsSource: true\n };\n this.dragAndDropService.addDropTarget(dropTarget);\n this.addDestroyFunc(() => this.dragAndDropService.removeDropTarget(dropTarget));\n }\n generateGetSeriesLabel(valueCols) {\n if (!this.chartController.isActiveXYChart()) {\n return (col) => {\n var _a;\n return (_a = col.displayName) != null ? _a : \"\";\n };\n }\n const selectedCols = valueCols.filter((col) => col.selected);\n const isBubble = this.chartController.getChartType() === \"bubble\";\n const isInPairedMode = this.chartOptionsService.getPairedMode();\n const indexToAxisLabel = /* @__PURE__ */ new Map();\n indexToAxisLabel.set(0, \"X\");\n indexToAxisLabel.set(1, \"Y\");\n indexToAxisLabel.set(2, \"size\");\n return (col) => {\n var _a;\n const escapedLabel = (_a = col.displayName) != null ? _a : \"\";\n if (!col.selected) {\n return escapedLabel;\n }\n const index = selectedCols.indexOf(col);\n if (index === -1) {\n return escapedLabel;\n }\n let axisLabel;\n if (isInPairedMode) {\n axisLabel = indexToAxisLabel.get(index % (isBubble ? 3 : 2));\n } else {\n if (index === 0) {\n axisLabel = \"X\";\n } else {\n axisLabel = isBubble && index % 2 === 0 ? \"size\" : \"Y\";\n }\n }\n return `${escapedLabel} (${axisLabel})`;\n };\n }\n destroy() {\n this.groupComp = this.destroyBean(this.groupComp);\n super.destroy();\n }\n};\n_SeriesDataPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired72(\"chartMenuService\")\n], _SeriesDataPanel.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct72\n], _SeriesDataPanel.prototype, \"init\", 1);\nvar SeriesDataPanel = _SeriesDataPanel;\nvar _SeriesChartTypePanel = class _SeriesChartTypePanel2 extends Component33 {\n constructor(chartController, columns, isOpen) {\n super(_SeriesChartTypePanel2.TEMPLATE);\n this.chartController = chartController;\n this.columns = columns;\n this.isOpen = isOpen;\n this.selectedColIds = [];\n this.chartTypeComps = /* @__PURE__ */ new Map();\n this.secondaryAxisComps = /* @__PURE__ */ new Map();\n }\n init() {\n this.createSeriesChartTypeGroup(this.columns);\n }\n refresh(columns) {\n if (!_102.areEqual(this.getValidColIds(columns), this.selectedColIds)) {\n this.recreate(columns);\n } else {\n this.refreshComps();\n }\n }\n recreate(columns) {\n this.isOpen = this.seriesChartTypeGroupComp.isExpanded();\n _102.clearElement(this.getGui());\n this.destroyBean(this.seriesChartTypeGroupComp);\n this.columns = columns;\n this.selectedColIds = [];\n this.clearComps();\n this.init();\n }\n getValidColIds(columns) {\n const seriesChartTypes = this.chartController.getSeriesChartTypes();\n return columns.filter((col) => col.selected && !!seriesChartTypes.filter((s) => s.colId === col.colId)[0]).map(({ colId }) => colId);\n }\n createSeriesChartTypeGroup(columns) {\n this.seriesChartTypeGroupComp = this.createBean(new AgGroupComponent4({\n title: this.chartTranslationService.translate(\"seriesChartType\"),\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: false,\n cssIdentifier: \"charts-data\",\n expanded: this.isOpen\n }));\n const seriesChartTypes = this.chartController.getSeriesChartTypes();\n columns.forEach((col) => {\n if (!col.selected) {\n return;\n }\n const seriesChartType = seriesChartTypes.filter((s) => s.colId === col.colId)[0];\n if (!seriesChartType) {\n return;\n }\n this.selectedColIds.push(col.colId);\n const seriesItemGroup = this.seriesChartTypeGroupComp.createManagedBean(new AgGroupComponent4({\n title: col.displayName,\n enabled: true,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: true,\n cssIdentifier: \"charts-format-sub-level\"\n }));\n const isSecondaryAxisDisabled = (chartType) => [\"groupedColumn\", \"stackedColumn\", \"stackedArea\"].includes(chartType);\n const secondaryAxisComp = this.seriesChartTypeGroupComp.createManagedBean(new AgCheckbox4({\n label: this.chartTranslationService.translate(\"secondaryAxis\"),\n labelWidth: \"flex\",\n disabled: isSecondaryAxisDisabled(seriesChartType.chartType),\n value: !!seriesChartType.secondaryAxis,\n onValueChange: (enabled) => this.chartController.updateSeriesChartType(col.colId, void 0, enabled)\n }));\n seriesItemGroup.addItem(secondaryAxisComp);\n const translate = (key) => {\n return this.chartTranslationService.translate(key);\n };\n const availableChartTypes = [\n { value: \"line\", text: translate(\"line\") },\n { value: \"area\", text: translate(\"area\") },\n { value: \"stackedArea\", text: translate(\"stackedArea\") },\n { value: \"groupedColumn\", text: translate(\"groupedColumn\") },\n { value: \"stackedColumn\", text: translate(\"stackedColumn\") }\n ];\n const chartTypeComp = seriesItemGroup.createManagedBean(new AgSelect4({\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n options: availableChartTypes,\n value: seriesChartType.chartType,\n onValueChange: (chartType) => this.chartController.updateSeriesChartType(col.colId, chartType)\n }));\n seriesItemGroup.addItem(chartTypeComp);\n this.seriesChartTypeGroupComp.addItem(seriesItemGroup);\n this.chartTypeComps.set(col.colId, chartTypeComp);\n this.secondaryAxisComps.set(col.colId, secondaryAxisComp);\n });\n this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui());\n }\n refreshComps() {\n const seriesChartTypes = this.chartController.getSeriesChartTypes();\n this.selectedColIds.forEach((colId) => {\n const seriesChartType = seriesChartTypes.find((chartType) => chartType.colId === colId);\n if (!seriesChartType) {\n return;\n }\n const chartTypeComp = this.chartTypeComps.get(colId);\n const secondaryAxisComp = this.secondaryAxisComps.get(colId);\n chartTypeComp == null ? void 0 : chartTypeComp.setValue(seriesChartType.chartType);\n secondaryAxisComp == null ? void 0 : secondaryAxisComp.setValue(!!seriesChartType.secondaryAxis);\n secondaryAxisComp == null ? void 0 : secondaryAxisComp.setDisabled(this.isSecondaryAxisDisabled(seriesChartType.chartType));\n });\n }\n clearComps() {\n this.chartTypeComps.clear();\n this.secondaryAxisComps.clear();\n }\n isSecondaryAxisDisabled(chartType) {\n return [\"groupedColumn\", \"stackedColumn\", \"stackedArea\"].includes(chartType);\n }\n destroy() {\n this.clearComps();\n this.seriesChartTypeGroupComp = this.destroyBean(this.seriesChartTypeGroupComp);\n super.destroy();\n }\n};\n_SeriesChartTypePanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired82(\"chartTranslationService\")\n], _SeriesChartTypePanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct82\n], _SeriesChartTypePanel.prototype, \"init\", 1);\nvar SeriesChartTypePanel = _SeriesChartTypePanel;\nvar _SwitchCategorySeriesDataPanel = class _SwitchCategorySeriesDataPanel2 extends Component42 {\n constructor(getValue, setValue) {\n super();\n this.getValue = getValue;\n this.setValue = setValue;\n }\n init() {\n this.switchCategorySeriesToggleButton = this.createManagedBean(new AgToggleButton3({\n label: this.chartTranslationService.translate(\"switchCategorySeries\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n value: this.getValue(),\n onValueChange: (value) => {\n this.setValue(value);\n }\n }));\n const switchCategorySeriesGroupParams = {\n title: void 0,\n suppressEnabledCheckbox: true,\n suppressOpenCloseIcons: true,\n cssIdentifier: \"charts-data\",\n expanded: true,\n items: [this.switchCategorySeriesToggleButton]\n };\n this.setTemplate(_SwitchCategorySeriesDataPanel2.TEMPLATE, {\n switchCategorySeriesGroup: switchCategorySeriesGroupParams\n });\n }\n refresh() {\n var _a;\n (_a = this.switchCategorySeriesToggleButton) == null ? void 0 : _a.setValue(this.getValue(), true);\n }\n};\n_SwitchCategorySeriesDataPanel.TEMPLATE = /* html */\n`
\n \n
`;\n__decorateClass4([\n Autowired92(\"chartTranslationService\")\n], _SwitchCategorySeriesDataPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct92\n], _SwitchCategorySeriesDataPanel.prototype, \"init\", 1);\nvar SwitchCategorySeriesDataPanel = _SwitchCategorySeriesDataPanel;\nvar DefaultDataPanelDef = {\n groups: [\n { type: \"categories\", isOpen: true },\n { type: \"series\", isOpen: true },\n { type: \"seriesChartType\", isOpen: true }\n ]\n};\nvar _ChartDataPanel = class _ChartDataPanel2 extends Component52 {\n constructor(chartController, chartOptionsService) {\n super(_ChartDataPanel2.TEMPLATE);\n this.chartController = chartController;\n this.chartOptionsService = chartOptionsService;\n this.isSwitchCategorySeriesToggled = false;\n }\n init() {\n this.switchCategorySeriesPanel = this.addComponent(this.createManagedBean(new SwitchCategorySeriesDataPanel(\n () => this.chartController.isCategorySeriesSwitched(),\n (value) => this.chartController.switchCategorySeries(value)\n )));\n this.isSwitchCategorySeriesToggled = this.chartController.isCategorySeriesSwitched();\n this.createAutoScrollService();\n this.updatePanels();\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_MODEL_UPDATE, this.updatePanels.bind(this));\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_API_UPDATE, this.updatePanels.bind(this));\n }\n destroy() {\n this.clearPanelComponents();\n super.destroy();\n }\n updatePanels() {\n var _a, _b, _c, _d, _e;\n const currentChartType = this.chartType;\n const isSwitchCategorySeriesToggledCurrent = this.isSwitchCategorySeriesToggled;\n const { dimensionCols, valueCols } = this.chartController.getColStateForMenu();\n this.chartType = this.chartController.getChartType();\n this.isSwitchCategorySeriesToggled = this.chartController.isCategorySeriesSwitched();\n const hasChangedSwitchCategorySeries = this.isSwitchCategorySeriesToggled !== isSwitchCategorySeriesToggledCurrent;\n if (this.canRefresh(currentChartType, this.chartType) && !hasChangedSwitchCategorySeries) {\n (_a = this.categoriesDataPanel) == null ? void 0 : _a.refresh(dimensionCols);\n (_b = this.seriesDataPanel) == null ? void 0 : _b.refresh(valueCols);\n (_c = this.seriesChartTypePanel) == null ? void 0 : _c.refresh(valueCols);\n } else {\n this.recreatePanels(dimensionCols, valueCols);\n }\n (_d = this.switchCategorySeriesPanel) == null ? void 0 : _d.setDisplayed(\n supportsInvertedCategorySeries(this.chartType) && !this.chartMenuService.isLegacyFormat() && !this.chartController.isGrouping()\n );\n if (hasChangedSwitchCategorySeries) {\n (_e = this.switchCategorySeriesPanel) == null ? void 0 : _e.refresh();\n }\n }\n canRefresh(oldChartType, newChartType) {\n if (oldChartType === void 0)\n return false;\n if (oldChartType === newChartType) {\n return true;\n }\n const isCombo = (chartType) => [\"columnLineCombo\", \"areaColumnCombo\", \"customCombo\"].includes(chartType);\n if (isCombo(oldChartType) && isCombo(newChartType)) {\n return true;\n }\n return false;\n }\n recreatePanels(dimensionCols, valueCols) {\n var _a;\n this.clearPanelComponents();\n const { chartType } = this;\n if (!chartType)\n return;\n const isCategorySeriesSwitched = this.chartController.isCategorySeriesSwitched();\n const panels = (_a = this.getDataPanelDef().groups) == null ? void 0 : _a.map(({ type, isOpen }) => {\n if (type === (isCategorySeriesSwitched ? \"series\" : \"categories\")) {\n return this.categoriesDataPanel = this.createBean(new CategoriesDataPanel(\n this.chartController,\n this.autoScrollService,\n this.getCategoryGroupTitle(isCategorySeriesSwitched),\n this.getCategoryGroupMultipleSelect(chartType, isCategorySeriesSwitched),\n dimensionCols,\n isOpen\n ));\n } else if (type === (isCategorySeriesSwitched ? \"categories\" : \"series\")) {\n return this.seriesDataPanel = this.createBean(new SeriesDataPanel(\n this.chartController,\n this.autoScrollService,\n this.chartOptionsService,\n this.getSeriesGroupTitle(isCategorySeriesSwitched),\n this.getSeriesGroupMultipleSelect(chartType, isCategorySeriesSwitched),\n this.getSeriesGroupMaxSelection(chartType, isCategorySeriesSwitched),\n valueCols,\n isOpen\n ));\n } else if (type === \"seriesChartType\") {\n if (this.chartController.isComboChart()) {\n return this.seriesChartTypePanel = this.createBean(new SeriesChartTypePanel(\n this.chartController,\n valueCols,\n isOpen\n ));\n }\n return null;\n } else {\n _112.warnOnce(`Invalid charts data panel group name supplied: '${type}'`);\n return null;\n }\n }).filter((value) => value != null);\n if (panels)\n this.addPanelComponents(panels);\n }\n addPanelComponents(panels) {\n var _a;\n const fragment = document.createDocumentFragment();\n for (const panel of panels) {\n this.registerComponent(panel);\n fragment.appendChild(panel.getGui());\n }\n const afterPanelElement = (_a = this.switchCategorySeriesPanel) == null ? void 0 : _a.getGui();\n this.getGui().insertBefore(fragment, afterPanelElement != null ? afterPanelElement : null);\n return panels;\n }\n clearPanelComponents() {\n const eGui = this.getGui();\n if (this.categoriesDataPanel)\n eGui.removeChild(this.categoriesDataPanel.getGui());\n if (this.seriesDataPanel)\n eGui.removeChild(this.seriesDataPanel.getGui());\n if (this.seriesChartTypePanel)\n eGui.removeChild(this.seriesChartTypePanel.getGui());\n this.categoriesDataPanel = this.destroyBean(this.categoriesDataPanel);\n this.seriesDataPanel = this.destroyBean(this.seriesDataPanel);\n this.seriesChartTypePanel = this.destroyBean(this.seriesChartTypePanel);\n }\n createAutoScrollService() {\n const eGui = this.getGui();\n this.autoScrollService = new AutoScrollService4({\n scrollContainer: eGui,\n scrollAxis: \"y\",\n getVerticalPosition: () => eGui.scrollTop,\n setVerticalPosition: (position) => eGui.scrollTop = position\n });\n }\n addComponent(component) {\n this.registerComponent(component);\n this.getGui().appendChild(component.getGui());\n return component;\n }\n registerComponent(component) {\n component.addCssClass(\"ag-chart-data-section\");\n }\n getDataPanelDef() {\n var _a, _b;\n return (_b = (_a = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _a.dataPanel) != null ? _b : DefaultDataPanelDef;\n }\n getCategoryGroupTitle(isCategorySeriesSwitched) {\n if (isCategorySeriesSwitched)\n return this.chartTranslationService.translate(\"seriesLabels\");\n return this.chartTranslationService.translate(this.chartController.isActiveXYChart() ? \"labels\" : \"categories\");\n }\n getCategoryGroupMultipleSelect(chartType, isCategorySeriesSwitched) {\n if (isCategorySeriesSwitched)\n return false;\n return getMaxNumCategories(chartType) !== 1;\n }\n getSeriesGroupTitle(isCategorySeriesSwitched) {\n if (isCategorySeriesSwitched)\n return this.chartTranslationService.translate(\"categoryValues\");\n return this.chartTranslationService.translate(this.chartController.isActiveXYChart() ? \"xyValues\" : \"series\");\n }\n getSeriesGroupMultipleSelect(chartType, isCategorySeriesSwitched) {\n return this.getSeriesGroupMaxSelection(chartType, isCategorySeriesSwitched) !== 1;\n }\n getSeriesGroupMaxSelection(chartType, isCategorySeriesSwitched) {\n if (isCategorySeriesSwitched)\n return void 0;\n return getMaxNumSeries(chartType);\n }\n};\n_ChartDataPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired102(\"chartTranslationService\")\n], _ChartDataPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired102(\"chartMenuService\")\n], _ChartDataPanel.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct102\n], _ChartDataPanel.prototype, \"init\", 1);\nvar ChartDataPanel = _ChartDataPanel;\nvar _FontPanel = class _FontPanel2 extends Component62 {\n constructor(params) {\n super();\n this.activeComps = [];\n this.params = params;\n this.chartOptions = params.chartMenuUtils.getChartOptions();\n }\n init() {\n const fontGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.params.name || this.chartTranslationService.translate(\"font\"),\n enabled: this.params.enabled,\n suppressEnabledCheckbox: !!this.params.suppressEnabledCheckbox,\n onEnableChange: (enabled) => {\n if (this.params.onEnableChange) {\n this.params.onEnableChange(enabled);\n }\n }\n };\n this.setTemplate(_FontPanel2.TEMPLATE, {\n fontGroup: fontGroupParams,\n familySelect: this.getFamilySelectParams(),\n weightStyleSelect: this.getWeightStyleSelectParams(),\n sizeSelect: this.getSizeSelectParams(),\n colorPicker: this.params.chartMenuUtils.getDefaultColorPickerParams(this.params.keyMapper(\"color\"))\n });\n }\n addCompToPanel(comp) {\n this.fontGroup.addItem(comp);\n this.activeComps.push(comp);\n }\n setEnabled(enabled) {\n this.fontGroup.setEnabled(enabled);\n }\n getFamilySelectParams() {\n const families = [\n \"Arial, sans-serif\",\n \"Aria Black, sans-serif\",\n \"Book Antiqua, serif\",\n \"Charcoal, sans-serif\",\n \"Comic Sans MS, cursive\",\n \"Courier, monospace\",\n \"Courier New, monospace\",\n \"Gadget, sans-serif\",\n \"Geneva, sans-serif\",\n \"Helvetica, sans-serif\",\n \"Impact, sans-serif\",\n \"Lucida Console, monospace\",\n \"Lucida Grande, sans-serif\",\n \"Lucida Sans Unicode, sans-serif\",\n \"Monaco, monospace\",\n \"Palatino Linotype, serif\",\n \"Palatino, serif\",\n \"Times New Roman, serif\",\n \"Times, serif\",\n \"Verdana, sans-serif\"\n ];\n const family = this.getInitialFontValue(\"fontFamily\");\n let initialValue = families[0];\n if (family) {\n const lowerCaseValues = families.map((f) => f.toLowerCase());\n const valueIndex = lowerCaseValues.indexOf(family.toLowerCase());\n if (valueIndex >= 0) {\n initialValue = families[valueIndex];\n } else {\n const capitalisedFontValue = _122.capitalise(family);\n families.push(capitalisedFontValue);\n initialValue = capitalisedFontValue;\n }\n }\n const options = families.sort().map((value) => ({ value, text: value }));\n return {\n options,\n inputWidth: \"flex\",\n value: `${initialValue}`,\n onValueChange: (newValue) => this.setFont({ fontFamily: newValue })\n };\n }\n getSizeSelectParams() {\n const sizes = [8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36];\n const size = this.getInitialFontValue(\"fontSize\");\n if (!_122.includes(sizes, size)) {\n sizes.push(size);\n }\n const options = sizes.sort((a, b) => a - b).map((value) => ({ value: `${value}`, text: `${value}` }));\n return {\n options,\n inputWidth: \"flex\",\n value: `${size}`,\n onValueChange: (newValue) => this.setFont({ fontSize: parseInt(newValue, 10) }),\n label: this.chartTranslationService.translate(\"size\")\n };\n }\n getWeightStyleSelectParams() {\n var _a, _b;\n const weight = (_a = this.getInitialFontValue(\"fontWeight\")) != null ? _a : \"normal\";\n const style = (_b = this.getInitialFontValue(\"fontStyle\")) != null ? _b : \"normal\";\n const weightStyles = [\n { name: \"normal\", weight: \"normal\", style: \"normal\" },\n { name: \"bold\", weight: \"bold\", style: \"normal\" },\n { name: \"italic\", weight: \"normal\", style: \"italic\" },\n { name: \"boldItalic\", weight: \"bold\", style: \"italic\" }\n ];\n let selectedOption = weightStyles.find((x) => x.weight === weight && x.style === style);\n if (!selectedOption) {\n selectedOption = { name: \"predefined\", weight, style };\n weightStyles.unshift(selectedOption);\n }\n const options = weightStyles.map((ws) => ({\n value: ws.name,\n text: this.chartTranslationService.translate(ws.name)\n }));\n return {\n options,\n inputWidth: \"flex\",\n value: selectedOption.name,\n onValueChange: (newValue) => {\n const selectedWeightStyle = weightStyles.find((x) => x.name === newValue);\n this.setFont({ fontWeight: selectedWeightStyle.weight, fontStyle: selectedWeightStyle.style });\n }\n };\n }\n addItemToPanel(item) {\n this.fontGroup.addItem(item);\n this.activeComps.push(item);\n }\n destroyActiveComps() {\n this.activeComps.forEach((comp) => {\n _122.removeFromParent(comp.getGui());\n this.destroyBean(comp);\n });\n }\n destroy() {\n this.destroyActiveComps();\n super.destroy();\n }\n setFont(font) {\n const { keyMapper } = this.params;\n Object.entries(font).forEach(([fontKey, value]) => {\n if (value) {\n this.chartOptions.setValue(keyMapper(fontKey), value);\n }\n });\n }\n getInitialFontValue(fontKey) {\n const { keyMapper } = this.params;\n return this.chartOptions.getValue(keyMapper(fontKey));\n }\n};\n_FontPanel.TEMPLATE = /* html */\n`
\n \n \n \n
\n \n \n
\n
\n
`;\n__decorateClass4([\n RefSelector6(\"fontGroup\")\n], _FontPanel.prototype, \"fontGroup\", 2);\n__decorateClass4([\n Autowired112(\"chartTranslationService\")\n], _FontPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct112\n], _FontPanel.prototype, \"init\", 1);\nvar FontPanel = _FontPanel;\nvar _LegendPanel = class _LegendPanel2 extends Component72 {\n constructor({ chartMenuParamsFactory: chartMenuUtils, isExpandedOnInit = false }) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n this.isExpandedOnInit = isExpandedOnInit;\n }\n init() {\n const legendGroupParams = this.chartMenuUtils.addEnableParams(\n \"legend.enabled\",\n {\n cssIdentifier: \"charts-format-top-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"legend\"),\n suppressEnabledCheckbox: false,\n suppressToggleExpandOnEnableChange: true,\n expanded: this.isExpandedOnInit,\n items: [this.createLabelPanel()]\n }\n );\n this.setTemplate(_LegendPanel2.TEMPLATE, {\n legendGroup: legendGroupParams,\n legendPositionSelect: this.chartMenuUtils.getDefaultLegendParams(\"legend.position\"),\n legendPaddingSlider: this.getSliderParams(\"spacing\", \"spacing\", 200),\n markerSizeSlider: this.getSliderParams(\"item.marker.size\", \"markerSize\", 40),\n markerStrokeSlider: this.getSliderParams(\"item.marker.strokeWidth\", \"markerStroke\", 10),\n markerPaddingSlider: this.getSliderParams(\"item.marker.padding\", \"itemSpacing\", 20),\n itemPaddingXSlider: this.getSliderParams(\"item.paddingX\", \"layoutHorizontalSpacing\", 50),\n itemPaddingYSlider: this.getSliderParams(\"item.paddingY\", \"layoutVerticalSpacing\", 50)\n });\n }\n getSliderParams(expression, labelKey, defaultMaxValue) {\n return this.chartMenuUtils.getDefaultSliderParams(`legend.${expression}`, labelKey, defaultMaxValue);\n }\n createLabelPanel() {\n const params = {\n enabled: true,\n suppressEnabledCheckbox: true,\n chartMenuUtils: this.chartMenuUtils,\n keyMapper: (key) => `legend.item.label.${key}`\n };\n return this.createManagedBean(new FontPanel(params));\n }\n};\n_LegendPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired122(\"chartTranslationService\")\n], _LegendPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct122\n], _LegendPanel.prototype, \"init\", 1);\nvar LegendPanel = _LegendPanel;\nvar _AxisTicksPanel = class _AxisTicksPanel2 extends Component82 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const axisTicksGroupParams = this.chartMenuUtils.addEnableParams(\n \"tick.enabled\",\n {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"ticks\"),\n suppressEnabledCheckbox: false\n }\n );\n const axisTicksColorPickerParams = this.chartMenuUtils.getDefaultColorPickerParams(\"tick.color\");\n const axisTicksWidthSliderParams = this.chartMenuUtils.getDefaultSliderParams(\"tick.width\", \"width\", 10);\n const axisTicksSizeSliderParams = this.chartMenuUtils.getDefaultSliderParams(\"tick.size\", \"length\", 30);\n this.setTemplate(_AxisTicksPanel2.TEMPLATE, {\n axisTicksGroup: axisTicksGroupParams,\n axisTicksColorPicker: axisTicksColorPickerParams,\n axisTicksWidthSlider: axisTicksWidthSliderParams,\n axisTicksSizeSlider: axisTicksSizeSliderParams\n });\n }\n};\n_AxisTicksPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired132(\"chartTranslationService\")\n], _AxisTicksPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct132\n], _AxisTicksPanel.prototype, \"init\", 1);\nvar AxisTicksPanel = _AxisTicksPanel;\nvar _GridLinePanel = class _GridLinePanel2 extends Component92 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n this.chartOptions = chartMenuUtils.getChartOptions();\n }\n init() {\n const gridLineGroupParams = this.chartMenuUtils.addEnableParams(\"gridLine.enabled\", {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"gridLines\"),\n suppressEnabledCheckbox: false\n });\n const gridLineColorPickerParams = this.getGridLineColorPickerParams(\"color\");\n const gridLineWidthSliderParams = this.getGridLineWidthSliderParams(\"thickness\");\n const gridLineLineDashSliderParams = this.getGridLineDashSliderParams(\"lineDash\");\n this.setTemplate(_GridLinePanel2.TEMPLATE, {\n gridLineGroup: gridLineGroupParams,\n gridLineColorPicker: gridLineColorPickerParams,\n gridLineWidthSlider: gridLineWidthSliderParams,\n gridLineLineDashSlider: gridLineLineDashSliderParams\n });\n }\n getGridLineColorPickerParams(labelKey) {\n return this.chartMenuUtils.getDefaultColorPickerParams(\n \"gridLine.style\",\n labelKey,\n {\n formatInputValue: (value) => {\n var _a;\n return (_a = value == null ? void 0 : value[0]) == null ? void 0 : _a.stroke;\n },\n parseInputValue: (value) => {\n var _a;\n const styles = (_a = this.chartOptions.getValue(\"gridLine.style\")) != null ? _a : [];\n if (styles.length === 0)\n return [{ stroke: value, lineDash: [] }];\n return [__spreadProps3(__spreadValues3({}, styles[0]), { stroke: value })];\n }\n }\n );\n }\n getGridLineWidthSliderParams(labelKey) {\n return this.chartMenuUtils.getDefaultSliderParams(\"gridLine.width\", labelKey, 10);\n }\n getGridLineDashSliderParams(labelKey) {\n var _a, _b;\n const initialStyles = this.chartOptions.getValue(\"gridLine.style\");\n const initialValue = (_b = (_a = initialStyles == null ? void 0 : initialStyles[0]) == null ? void 0 : _a.lineDash) == null ? void 0 : _b[0];\n const params = this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(\n initialValue != null ? initialValue : 0,\n labelKey,\n 30\n );\n params.onValueChange = (value) => {\n const stroke = this.chartOptions.getValue(\"gridLine.style.0.stroke\");\n this.chartOptions.setValue(\n \"gridLine.style\",\n [{ lineDash: [value], stroke }]\n );\n };\n return params;\n }\n};\n_GridLinePanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired14(\"chartTranslationService\")\n], _GridLinePanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct14\n], _GridLinePanel.prototype, \"init\", 1);\nvar GridLinePanel = _GridLinePanel;\nvar _AgAngleSelect = class _AgAngleSelect2 extends AgAbstractLabel {\n constructor(config) {\n super(config, _AgAngleSelect2.TEMPLATE);\n this.radius = 0;\n this.offsetX = 0;\n this.offsetY = 0;\n }\n postConstruct() {\n super.postConstruct();\n const { value, onValueChange } = this.config;\n if (value != null) {\n this.setValue(value, void 0, true);\n }\n if (onValueChange != null) {\n this.onValueChange(onValueChange);\n }\n this.dragListener = {\n eElement: this.eParentCircle,\n dragStartPixels: 0,\n onDragStart: (e) => {\n this.parentCircleRect = this.eParentCircle.getBoundingClientRect();\n },\n onDragging: (e) => this.calculateAngleDrag(e),\n onDragStop: () => {\n }\n };\n this.dragService.addDragSource(this.dragListener);\n this.eAngleValue.setLabel(\"\").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange((value2) => {\n if (value2 == null || value2 === \"\") {\n value2 = \"0\";\n }\n value2 = this.eAngleValue.normalizeValue(value2);\n let floatValue = parseFloat(value2);\n if (floatValue > 180) {\n floatValue = floatValue - 360;\n }\n this.setValue(floatValue);\n });\n this.updateNumberInput();\n if (_142.exists(this.getValue())) {\n this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString());\n }\n this.addManagedListener(this, Events42.EVENT_FIELD_VALUE_CHANGED, () => {\n if (this.eAngleValue.getInputElement().contains(this.gos.getActiveDomElement())) {\n return;\n }\n this.updateNumberInput();\n });\n }\n updateNumberInput() {\n const normalizedValue = this.normalizeNegativeValue(this.getValue());\n this.eAngleValue.setValue(normalizedValue.toString());\n }\n positionChildCircle(radians) {\n const rect = this.parentCircleRect || { width: 24, height: 24 };\n const eChildCircle = this.eChildCircle;\n const centerX = rect.width / 2;\n const centerY = rect.height / 2;\n eChildCircle.style.left = `${centerX + Math.cos(radians) * 8}px`;\n eChildCircle.style.top = `${centerY + Math.sin(radians) * 8}px`;\n }\n calculatePolar() {\n const x = this.offsetX;\n const y = this.offsetY;\n const radians = Math.atan2(y, x);\n this.degrees = this.toDegrees(radians);\n this.radius = Math.sqrt(x * x + y * y);\n this.positionChildCircle(radians);\n }\n calculateCartesian() {\n const radians = this.toRadians(this.getValue());\n const radius = this.getRadius();\n this.setOffsetX(Math.cos(radians) * radius).setOffsetY(Math.sin(radians) * radius);\n }\n setOffsetX(offset) {\n if (this.offsetX !== offset) {\n this.offsetX = offset;\n this.calculatePolar();\n }\n return this;\n }\n setOffsetY(offset) {\n if (this.offsetY !== offset) {\n this.offsetY = offset;\n this.calculatePolar();\n }\n return this;\n }\n calculateAngleDrag(e) {\n const rect = this.parentCircleRect;\n const centerX = rect.width / 2;\n const centerY = rect.height / 2;\n const x = e.clientX - rect.left;\n const y = e.clientY - rect.top;\n const dx = x - centerX;\n const dy = y - centerY;\n const radians = Math.atan2(dy, dx);\n this.setValue(radians, true);\n }\n toDegrees(radians) {\n return radians / Math.PI * 180;\n }\n toRadians(degrees) {\n return degrees / 180 * Math.PI;\n }\n normalizeNegativeValue(degrees) {\n return degrees < 0 ? 360 + degrees : degrees;\n }\n normalizeAngle180(radians) {\n radians %= Math.PI * 2;\n if (radians < -Math.PI) {\n radians += Math.PI * 2;\n } else if (radians >= Math.PI) {\n radians -= Math.PI * 2;\n }\n return radians;\n }\n getRadius() {\n return this.radius;\n }\n setRadius(r) {\n if (this.radius === r) {\n return this;\n }\n this.radius = r;\n this.calculateCartesian();\n return this;\n }\n onValueChange(callbackFn) {\n this.addManagedListener(this, Events42.EVENT_FIELD_VALUE_CHANGED, () => {\n callbackFn(this.degrees);\n });\n return this;\n }\n getValue(radians) {\n return radians ? this.toRadians(this.degrees) : this.degrees;\n }\n setValue(degrees, radians, silent) {\n let radiansValue;\n if (!radians) {\n radiansValue = this.normalizeAngle180(this.toRadians(degrees));\n } else {\n radiansValue = degrees;\n }\n degrees = this.toDegrees(radiansValue);\n if (this.degrees !== degrees) {\n this.degrees = Math.floor(degrees);\n this.calculateCartesian();\n this.positionChildCircle(radiansValue);\n if (!silent) {\n this.dispatchEvent({ type: Events42.EVENT_FIELD_VALUE_CHANGED });\n }\n }\n return this;\n }\n setWidth(width) {\n _142.setFixedWidth(this.getGui(), width);\n return this;\n }\n setDisabled(disabled) {\n super.setDisabled(disabled);\n this.eAngleValue.setDisabled(disabled);\n return this;\n }\n destroy() {\n this.dragService.removeDragSource(this.dragListener);\n super.destroy();\n }\n};\n_AgAngleSelect.TEMPLATE = /* html */\n`
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
`;\n__decorateClass4([\n RefSelector22(\"eLabel\")\n], _AgAngleSelect.prototype, \"eLabel\", 2);\n__decorateClass4([\n RefSelector22(\"eParentCircle\")\n], _AgAngleSelect.prototype, \"eParentCircle\", 2);\n__decorateClass4([\n RefSelector22(\"eChildCircle\")\n], _AgAngleSelect.prototype, \"eChildCircle\", 2);\n__decorateClass4([\n RefSelector22(\"eAngleValue\")\n], _AgAngleSelect.prototype, \"eAngleValue\", 2);\n__decorateClass4([\n Autowired15(\"dragService\")\n], _AgAngleSelect.prototype, \"dragService\", 2);\nvar AgAngleSelect = _AgAngleSelect;\nvar ChartMenuParamsFactory = class extends BeanStub62 {\n constructor(chartOptionsProxy) {\n super();\n this.chartOptionsProxy = chartOptionsProxy;\n }\n getDefaultColorPickerParams(expression, labelKey, options) {\n return this.addValueParams(\n expression,\n {\n label: this.chartTranslationService.translate(labelKey != null ? labelKey : \"color\"),\n labelWidth: \"flex\",\n inputWidth: \"flex\"\n },\n options\n );\n }\n getDefaultNumberInputParams(expression, labelKey, options) {\n return this.addValueParams(\n expression,\n {\n label: this.chartTranslationService.translate(labelKey),\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n precision: options == null ? void 0 : options.precision,\n step: options == null ? void 0 : options.step,\n min: options == null ? void 0 : options.min,\n max: options == null ? void 0 : options.max\n },\n {\n parseInputValue: (value) => {\n const numberValue = Number(value);\n return isNaN(numberValue) ? void 0 : numberValue;\n },\n formatInputValue: (value) => {\n return value == null ? \"\" : `${value}`;\n }\n }\n );\n }\n getDefaultSliderParams(expression, labelKey, defaultMaxValue, isArray) {\n var _a;\n let value = (_a = this.chartOptionsProxy.getValue(expression)) != null ? _a : 0;\n if (isArray && Array.isArray(value)) {\n value = value[0];\n }\n const params = this.getDefaultSliderParamsWithoutValueParams(value, labelKey, defaultMaxValue);\n params.onValueChange = (value2) => this.chartOptionsProxy.setValue(expression, isArray ? [value2] : value2);\n return params;\n }\n getDefaultSliderParamsWithoutValueParams(value, labelKey, defaultMaxValue) {\n return {\n label: this.chartTranslationService.translate(labelKey),\n minValue: 0,\n maxValue: Math.max(value, defaultMaxValue),\n textFieldWidth: 45,\n value: `${value}`\n };\n }\n getDefaultCheckboxParams(expression, labelKey, options) {\n const value = this.chartOptionsProxy.getValue(expression);\n const params = {\n label: this.chartTranslationService.translate(labelKey),\n value,\n readOnly: options == null ? void 0 : options.readOnly,\n passive: options == null ? void 0 : options.passive\n };\n params.onValueChange = (value2) => {\n this.chartOptionsProxy.setValue(expression, typeof value2 === \"boolean\" ? value2 : void 0);\n };\n return params;\n }\n getDefaultSelectParams(expression, labelKey, dropdownOptions, options) {\n const value = this.chartOptionsProxy.getValue(expression);\n const params = {\n label: this.chartTranslationService.translate(labelKey),\n value,\n options: dropdownOptions,\n pickerType: options == null ? void 0 : options.pickerType,\n pickerAriaLabelKey: options == null ? void 0 : options.pickerAriaLabelKey,\n pickerAriaLabelValue: options == null ? void 0 : options.pickerAriaLabelValue\n };\n params.onValueChange = (value2) => {\n this.chartOptionsProxy.setValue(expression, value2);\n };\n return params;\n }\n getDefaultLegendParams(expression) {\n return this.addValueParams(\n expression,\n {\n label: this.chartTranslationService.translate(\"position\"),\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n options: [\"top\", \"right\", \"bottom\", \"left\"].map((position) => ({\n value: position,\n text: this.chartTranslationService.translate(position)\n }))\n }\n );\n }\n getDefaultFontPanelParams(expression, labelKey) {\n const keyMapper = (key) => `${expression}.${key}`;\n return this.addEnableParams(\n keyMapper(\"enabled\"),\n {\n name: this.chartTranslationService.translate(labelKey),\n suppressEnabledCheckbox: false,\n chartMenuUtils: this,\n keyMapper\n }\n );\n }\n addValueParams(expression, params, options) {\n const optionsValue = this.chartOptionsProxy.getValue(expression);\n params.value = (options == null ? void 0 : options.formatInputValue) ? options.formatInputValue(optionsValue) : optionsValue;\n params.onValueChange = (value) => {\n const optionsValue2 = (options == null ? void 0 : options.parseInputValue) ? options.parseInputValue(value) : value;\n this.chartOptionsProxy.setValue(expression, optionsValue2);\n };\n return params;\n }\n addEnableParams(expression, params) {\n var _a;\n params.enabled = (_a = this.chartOptionsProxy.getValue(expression)) != null ? _a : false;\n params.onEnableChange = (value) => this.chartOptionsProxy.setValue(expression, value);\n return params;\n }\n getChartOptions() {\n return this.chartOptionsProxy;\n }\n};\n__decorateClass4([\n Autowired16(\"chartTranslationService\")\n], ChartMenuParamsFactory.prototype, \"chartTranslationService\", 2);\nvar DEFAULT_TIME_AXIS_FORMAT = \"%d %B %Y\";\nvar _CartesianAxisPanel = class _CartesianAxisPanel2 extends Component102 {\n constructor(axisType, { chartController, chartOptionsService, isExpandedOnInit = false, seriesType }) {\n super();\n this.activePanels = [];\n this.axisLabelUpdateFuncs = [];\n this.axisType = axisType;\n this.chartController = chartController;\n this.chartAxisOptionsProxy = chartOptionsService.getCartesianAxisOptionsProxy(axisType);\n this.chartAxisThemeOverridesProxy = chartOptionsService.getCartesianAxisThemeOverridesProxy(axisType);\n this.chartAxisAppliedThemeOverridesProxy = chartOptionsService.getCartesianAxisAppliedThemeOverridesProxy(axisType);\n this.chartOptionsSeriesProxy = chartOptionsService.getSeriesOptionsProxy(() => seriesType != null ? seriesType : this.chartController.getChartSeriesType());\n this.chartOptionsService = chartOptionsService;\n this.isExpandedOnInit = isExpandedOnInit;\n }\n init() {\n var _a;\n const labelKey = this.axisType;\n const axisGroupParams = {\n cssIdentifier: \"charts-format-top-level\",\n direction: \"vertical\",\n title: this.translate(labelKey),\n expanded: this.isExpandedOnInit,\n suppressEnabledCheckbox: true\n };\n const chartAxisOptions = this.createManagedBean(new ChartMenuParamsFactory(this.chartAxisOptionsProxy));\n const chartAxisThemeOverrides = this.createManagedBean(new ChartMenuParamsFactory(this.chartAxisThemeOverridesProxy));\n const axisTypeSelectParams = this.getAxisTypeSelectParams(chartAxisOptions, this.chartAxisAppliedThemeOverridesProxy);\n const axisPositionSelectParams = this.getAxisPositionSelectParams(chartAxisOptions);\n const axisTimeFormatSelectParams = this.getAxisTimeFormatSelectParams(chartAxisOptions);\n const axisColorInputParams = this.getAxisColorInputParams(chartAxisThemeOverrides);\n const axisLineWidthSliderParams = this.getAxisLineWidthSliderParams(chartAxisThemeOverrides);\n this.setTemplate(_CartesianAxisPanel2.TEMPLATE, {\n axisGroup: axisGroupParams,\n axisTypeSelect: axisTypeSelectParams != null ? axisTypeSelectParams : void 0,\n axisPositionSelect: axisPositionSelectParams != null ? axisPositionSelectParams : void 0,\n axisTimeFormatSelect: axisTimeFormatSelectParams != null ? axisTimeFormatSelectParams : void 0,\n axisColorInput: axisColorInputParams,\n axisLineWidthSlider: axisLineWidthSliderParams\n });\n this.axisTypeSelect.setDisplayed(!!((_a = axisTypeSelectParams.options) == null ? void 0 : _a.length));\n if (!axisPositionSelectParams)\n this.removeTemplateComponent(this.axisPositionSelect);\n const updateTimeFormatVisibility = () => {\n const isTimeAxis = this.chartAxisOptionsProxy.getValue(\"type\") === \"time\";\n _152.setDisplayed(this.axisTimeFormatSelect.getGui(), isTimeAxis);\n };\n if (!axisTimeFormatSelectParams) {\n this.removeTemplateComponent(this.axisTimeFormatSelect);\n } else {\n updateTimeFormatVisibility();\n this.addManagedListener(this.eventService, Events52.EVENT_CHART_OPTIONS_CHANGED, (e) => {\n updateTimeFormatVisibility();\n });\n }\n this.initGridLines(chartAxisThemeOverrides);\n this.initAxisTicks(chartAxisThemeOverrides);\n this.initAxisLabels(chartAxisThemeOverrides);\n const updateAxisLabelRotations = () => this.axisLabelUpdateFuncs.forEach((func) => func());\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_UPDATED, updateAxisLabelRotations);\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_MODEL_UPDATE, () => setTimeout(() => {\n this.refreshAxisTypeSelect(chartAxisOptions);\n updateTimeFormatVisibility();\n }));\n }\n getAxisTypeSelectParams(chartAxisOptions, chartAxisAppliedThemeOverrides) {\n const chartOptions = chartAxisOptions.getChartOptions();\n const axisTypeSelectOptions = this.getAxisTypeSelectOptions();\n const params = chartAxisOptions.getDefaultSelectParams(\n \"type\",\n \"axisType\",\n axisTypeSelectOptions\n );\n params.onValueChange = (value) => {\n var _a;\n const previousAxisType = chartOptions.getValue(\"type\");\n if (value === previousAxisType)\n return;\n const previousAxisThemeOverrides = chartAxisAppliedThemeOverrides.getValue(\"*\");\n const previousAxisIsTimeAxis = previousAxisType === \"time\";\n const updatedAxisIsTimeAxis = value === \"time\";\n const updatedLabelFormat = previousAxisIsTimeAxis !== updatedAxisIsTimeAxis ? updatedAxisIsTimeAxis ? DEFAULT_TIME_AXIS_FORMAT : void 0 : null;\n this.chartOptionsService.setCartesianCategoryAxisType(this.axisType, value);\n if (updatedLabelFormat !== null) {\n const existingLabel = (_a = chartOptions.getValue(\"label\")) != null ? _a : {};\n chartOptions.setValue(\"label\", __spreadProps3(__spreadValues3({}, existingLabel), { format: updatedLabelFormat }));\n }\n chartAxisAppliedThemeOverrides.setValue(\"*\", previousAxisThemeOverrides);\n };\n return params;\n }\n refreshAxisTypeSelect(chartAxisOptions) {\n const options = this.getAxisTypeSelectOptions();\n const hasOptions = !!options.length;\n this.axisTypeSelect.setDisplayed(hasOptions);\n if (!hasOptions) {\n return;\n }\n this.axisTypeSelect.clearOptions().addOptions(options).setValue(chartAxisOptions.getChartOptions().getValue(\"type\"));\n }\n getAxisTypeSelectOptions() {\n const chartType = this.chartController.getChartType();\n const supportsNumericalAxis = () => {\n const testDatum = this.chartController.getChartData()[0];\n if (!testDatum) {\n return false;\n }\n return this.chartController.getSelectedDimensions().every((col) => !isNaN(parseFloat(testDatum[col.colId])));\n };\n if ([\n \"heatmap\",\n \"histogram\",\n \"boxPlot\",\n \"rangeBar\",\n \"scatter\",\n \"bubble\"\n ].includes(chartType) || this.chartController.isGrouping() || !this.isCategoryAxis() || this.chartController.isCategorySeriesSwitched() || !supportsNumericalAxis()) {\n return [];\n }\n return [\"category\", \"number\", \"time\"].map((value) => ({\n value,\n text: this.translate(value)\n }));\n }\n isCategoryAxis() {\n const isHorizontal = this.chartOptionsSeriesProxy.getValue(\"direction\") === \"horizontal\";\n return isHorizontal && this.axisType === \"yAxis\" || !isHorizontal && this.axisType === \"xAxis\";\n }\n getAxisPositionSelectParams(chartAxisOptions) {\n const axisPositionSelectOptions = ((chartType, axisType) => {\n switch (chartType) {\n case \"heatmap\":\n return null;\n default:\n switch (axisType) {\n case \"xAxis\":\n return [\n { value: \"top\", text: this.translate(\"top\") },\n { value: \"bottom\", text: this.translate(\"bottom\") }\n ];\n case \"yAxis\":\n return [\n { value: \"left\", text: this.translate(\"left\") },\n { value: \"right\", text: this.translate(\"right\") }\n ];\n }\n }\n })(this.chartController.getChartType(), this.axisType);\n if (!axisPositionSelectOptions)\n return null;\n return chartAxisOptions.getDefaultSelectParams(\n \"position\",\n \"position\",\n axisPositionSelectOptions\n );\n }\n getAxisTimeFormatSelectParams(chartAxisOptions) {\n if (!this.isCategoryAxis()) {\n return null;\n }\n const axisTimeFormatSelectOptions = [\n { value: \"%d/%m/%Y\", text: this.translate(\"timeFormatSlashesDDMMYYYY\") },\n { value: \"%m/%d/%Y\", text: this.translate(\"timeFormatSlashesMMDDYYYY\") },\n { value: \"%d/%m/%y\", text: this.translate(\"timeFormatSlashesDDMMYY\") },\n { value: \"%m/%d/%y\", text: this.translate(\"timeFormatSlashesMMDDYY\") },\n { value: \"%d.%e.%y\", text: this.translate(\"timeFormatDotsDDMYY\") },\n { value: \"%e.%d.%y\", text: this.translate(\"timeFormatDotsMDDYY\") },\n { value: \"%Y-%m-%d\", text: this.translate(\"timeFormatDashesYYYYMMDD\") },\n { value: \"%d %B %Y\", text: this.translate(\"timeFormatSpacesDDMMMMYYYY\") },\n { value: \"%H:%M:%S\", text: this.translate(\"timeFormatHHMMSS\") },\n { value: \"%I:%M:%S %p\", text: this.translate(\"timeFormatHHMMSSAmPm\") }\n ];\n return chartAxisOptions.getDefaultSelectParams(\n \"label.format\",\n \"timeFormat\",\n axisTimeFormatSelectOptions\n );\n }\n getAxisColorInputParams(chartAxisThemeOverrides) {\n return chartAxisThemeOverrides.getDefaultColorPickerParams(\"line.color\");\n }\n getAxisLineWidthSliderParams(chartAxisThemeOverrides) {\n var _a;\n const chartOptions = chartAxisThemeOverrides.getChartOptions();\n const getAxisLineWidth = () => {\n const isAxisLineEnabled = chartOptions.getValue(\"line.enabled\");\n if (!isAxisLineEnabled)\n return null;\n return chartOptions.getValue(\"line.width\");\n };\n const setAxisLineWidth = (value) => {\n chartOptions.setValues([\n { expression: \"line.enabled\", value: value != null },\n { expression: \"line.width\", value: value != null ? value : 0 }\n ]);\n };\n const axisLineWidthSliderParams = chartAxisThemeOverrides.getDefaultSliderParamsWithoutValueParams(\n (_a = getAxisLineWidth()) != null ? _a : 0,\n \"thickness\",\n 10\n );\n axisLineWidthSliderParams.onValueChange = (newValue) => {\n setAxisLineWidth(newValue === 0 ? null : newValue);\n };\n return axisLineWidthSliderParams;\n }\n initGridLines(chartAxisThemeOverrides) {\n const chartType = this.chartController.getChartType();\n switch (chartType) {\n case \"heatmap\":\n return;\n default:\n const gridLineComp = this.createBean(new GridLinePanel(chartAxisThemeOverrides));\n this.axisGroup.addItem(gridLineComp);\n this.activePanels.push(gridLineComp);\n }\n }\n initAxisTicks(chartAxisThemeOverrides) {\n if (!this.hasConfigurableAxisTicks())\n return;\n const axisTicksComp = this.createBean(new AxisTicksPanel(chartAxisThemeOverrides));\n this.axisGroup.addItem(axisTicksComp);\n this.activePanels.push(axisTicksComp);\n }\n hasConfigurableAxisTicks() {\n const chartType = this.chartController.getChartType();\n switch (chartType) {\n case \"radarLine\":\n case \"radarArea\":\n case \"rangeBar\":\n case \"boxPlot\":\n case \"waterfall\":\n return false;\n default:\n return true;\n }\n }\n initAxisLabels(chartAxisThemeOverrides) {\n const params = {\n name: this.translate(\"labels\"),\n enabled: true,\n suppressEnabledCheckbox: true,\n chartMenuUtils: chartAxisThemeOverrides,\n keyMapper: (key) => `label.${key}`\n };\n const labelPanelComp = this.createBean(new FontPanel(params));\n this.axisGroup.addItem(labelPanelComp);\n this.activePanels.push(labelPanelComp);\n this.addAdditionalLabelComps(labelPanelComp, chartAxisThemeOverrides);\n }\n addAdditionalLabelComps(labelPanelComp, chartAxisThemeOverrides) {\n this.addLabelPadding(labelPanelComp, chartAxisThemeOverrides);\n const rotationComp = this.createRotationWidget(\"labelRotation\", chartAxisThemeOverrides);\n const autoRotateCb = this.initLabelRotation(rotationComp, chartAxisThemeOverrides);\n labelPanelComp.addCompToPanel(autoRotateCb);\n labelPanelComp.addCompToPanel(rotationComp);\n }\n initLabelRotation(rotationComp, chartAxisThemeOverrides) {\n const chartOptions = chartAxisThemeOverrides.getChartOptions();\n const getLabelRotationValue = () => {\n return chartOptions.getValue(\"label.rotation\");\n };\n const getLabelAutoRotateValue = () => {\n return chartOptions.getValue(\"label.autoRotate\");\n };\n const updateAutoRotate = (autoRotate2) => {\n if (autoRotate2)\n this.prevRotation = getLabelRotationValue();\n chartOptions.setValues([\n { expression: \"label.autoRotate\", value: autoRotate2 },\n // Clear the rotation option when activating auto-rotate, reinstate the previous value when deactivating\n { expression: \"label.rotation\", value: autoRotate2 ? void 0 : this.prevRotation }\n ]);\n rotationComp.setDisabled(autoRotate2);\n };\n const rotation = getLabelRotationValue();\n const autoRotate = typeof rotation === \"number\" ? false : getLabelAutoRotateValue();\n const autoRotateCheckbox = this.createBean(new AgCheckbox5({\n label: this.translate(\"autoRotate\"),\n value: autoRotate,\n onValueChange: updateAutoRotate\n }));\n rotationComp.setDisabled(autoRotate);\n return autoRotateCheckbox;\n }\n createRotationWidget(labelKey, chartAxisThemeOverrides) {\n var _a;\n const chartOptions = chartAxisThemeOverrides.getChartOptions();\n const getLabelRotationValue = () => {\n return chartOptions.getValue(\"label.rotation\");\n };\n const setLabelRotationValue = (value) => {\n return chartOptions.setValue(\"label.rotation\", value);\n };\n const degreesSymbol = String.fromCharCode(176);\n const label = `${this.chartTranslationService.translate(labelKey)} ${degreesSymbol}`;\n const angleSelect = new AgAngleSelect({\n label,\n labelWidth: \"flex\",\n value: (_a = getLabelRotationValue()) != null ? _a : 0,\n onValueChange: setLabelRotationValue\n });\n this.axisLabelUpdateFuncs.push(() => {\n var _a2;\n angleSelect.setValue((_a2 = getLabelRotationValue()) != null ? _a2 : 0);\n });\n return this.createBean(angleSelect);\n }\n addLabelPadding(labelPanelComp, chartAxisThemeOverrides) {\n const labelPaddingSlider = this.createBean(new AgSlider(chartAxisThemeOverrides.getDefaultSliderParams(\n \"label.padding\",\n \"padding\",\n 30\n )));\n labelPanelComp.addCompToPanel(labelPaddingSlider);\n }\n translate(key) {\n return this.chartTranslationService.translate(key);\n }\n removeTemplateComponent(component) {\n _152.removeFromParent(component.getGui());\n this.destroyBean(component);\n }\n destroyActivePanels() {\n this.activePanels.forEach((panel) => {\n _152.removeFromParent(panel.getGui());\n this.destroyBean(panel);\n });\n }\n destroy() {\n this.destroyActivePanels();\n super.destroy();\n }\n};\n_CartesianAxisPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n \n
`;\n__decorateClass4([\n RefSelector33(\"axisGroup\")\n], _CartesianAxisPanel.prototype, \"axisGroup\", 2);\n__decorateClass4([\n RefSelector33(\"axisTypeSelect\")\n], _CartesianAxisPanel.prototype, \"axisTypeSelect\", 2);\n__decorateClass4([\n RefSelector33(\"axisPositionSelect\")\n], _CartesianAxisPanel.prototype, \"axisPositionSelect\", 2);\n__decorateClass4([\n RefSelector33(\"axisTimeFormatSelect\")\n], _CartesianAxisPanel.prototype, \"axisTimeFormatSelect\", 2);\n__decorateClass4([\n Autowired17(\"chartTranslationService\")\n], _CartesianAxisPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct15\n], _CartesianAxisPanel.prototype, \"init\", 1);\nvar CartesianAxisPanel = _CartesianAxisPanel;\nvar _PolarAxisPanel = class _PolarAxisPanel2 extends Component11 {\n constructor({ chartController, chartAxisMenuParamsFactory: chartAxisMenuUtils, isExpandedOnInit = false }) {\n super();\n this.chartController = chartController;\n this.chartMenuUtils = chartAxisMenuUtils;\n this.isExpandedOnInit = isExpandedOnInit;\n }\n init() {\n const axisGroupParams = {\n cssIdentifier: \"charts-format-top-level\",\n direction: \"vertical\",\n title: this.translate(\"polarAxis\"),\n expanded: this.isExpandedOnInit,\n suppressEnabledCheckbox: true\n };\n const axisColorInputParams = this.chartMenuUtils.getDefaultColorPickerParams(\"line.color\");\n const axisLineWidthSliderParams = this.chartMenuUtils.getDefaultSliderParams(\"line.width\", \"thickness\", 10);\n this.setTemplate(_PolarAxisPanel2.TEMPLATE, {\n axisGroup: axisGroupParams,\n axisColorInput: axisColorInputParams,\n axisLineWidthSlider: axisLineWidthSliderParams\n });\n this.initAxis();\n this.initAxisLabels();\n this.initRadiusAxis();\n }\n initAxis() {\n const chartType = this.chartController.getChartType();\n const hasConfigurableAxisShape = [\"radarLine\", \"radarArea\"].includes(chartType);\n if (hasConfigurableAxisShape) {\n const options = [\n { value: \"circle\", text: this.translate(\"circle\") },\n { value: \"polygon\", text: this.translate(\"polygon\") }\n ];\n this.axisGroup.addItem(this.createSelect({\n labelKey: \"shape\",\n options,\n property: \"shape\"\n }));\n }\n if (chartType !== \"pie\") {\n this.axisGroup.addItem(this.createSlider({\n labelKey: \"innerRadius\",\n defaultMaxValue: 1,\n property: \"innerRadiusRatio\"\n }));\n }\n }\n initAxisLabels() {\n const params = {\n name: this.translate(\"labels\"),\n enabled: true,\n suppressEnabledCheckbox: true,\n chartMenuUtils: this.chartMenuUtils,\n keyMapper: (key) => `label.${key}`\n };\n const labelPanelComp = this.createManagedBean(new FontPanel(params));\n const labelOrientationComp = this.createOrientationWidget();\n labelPanelComp.addItemToPanel(labelOrientationComp);\n this.axisGroup.addItem(labelPanelComp);\n }\n createOrientationWidget() {\n const options = [\n { value: \"fixed\", text: this.translate(\"fixed\") },\n { value: \"parallel\", text: this.translate(\"parallel\") },\n { value: \"perpendicular\", text: this.translate(\"perpendicular\") }\n ];\n return this.createSelect({\n labelKey: \"orientation\",\n options,\n property: \"label.orientation\"\n });\n }\n initRadiusAxis() {\n const chartSeriesType = getSeriesType(this.chartController.getChartType());\n if (!isRadial(chartSeriesType))\n return;\n const items = [\n this.createSlider({\n labelKey: \"groupPadding\",\n defaultMaxValue: 1,\n property: \"paddingInner\"\n }),\n this.createSlider({\n labelKey: \"seriesPadding\",\n defaultMaxValue: 1,\n property: \"groupPaddingInner\"\n })\n ];\n const paddingPanelComp = this.createManagedBean(new AgGroupComponent7({\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n enabled: true,\n suppressEnabledCheckbox: true,\n title: this.translate(\"padding\"),\n items\n })).hideEnabledCheckbox(true).hideOpenCloseIcons(true);\n this.axisGroup.addItem(paddingPanelComp);\n }\n createSlider(config) {\n const { labelKey, defaultMaxValue, step = 0.05, property } = config;\n const params = this.chartMenuUtils.getDefaultSliderParams(property, labelKey, defaultMaxValue);\n params.step = step;\n return this.createManagedBean(new AgSlider2(params));\n }\n createSelect(config) {\n const { labelKey: label, options, property } = config;\n return this.createManagedBean(new AgSelect6(this.chartMenuUtils.addValueParams(\n property,\n {\n label: this.chartTranslationService.translate(label),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n options\n }\n )));\n }\n translate(key) {\n return this.chartTranslationService.translate(key);\n }\n};\n_PolarAxisPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n
`;\n__decorateClass4([\n RefSelector42(\"axisGroup\")\n], _PolarAxisPanel.prototype, \"axisGroup\", 2);\n__decorateClass4([\n Autowired18(\"chartTranslationService\")\n], _PolarAxisPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct16\n], _PolarAxisPanel.prototype, \"init\", 1);\nvar PolarAxisPanel = _PolarAxisPanel;\nvar _PaddingPanel = class _PaddingPanel2 extends Component12 {\n constructor(chartMenuUtils, chartController) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n this.chartController = chartController;\n }\n init() {\n const chartPaddingGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"padding\"),\n suppressEnabledCheckbox: true\n };\n const getSliderParams = (property) => this.chartMenuUtils.getDefaultSliderParams(\"padding.\" + property, property, 200);\n this.setTemplate(_PaddingPanel2.TEMPLATE, {\n chartPaddingGroup: chartPaddingGroupParams,\n paddingTopSlider: getSliderParams(\"top\"),\n paddingRightSlider: getSliderParams(\"right\"),\n paddingBottomSlider: getSliderParams(\"bottom\"),\n paddingLeftSlider: getSliderParams(\"left\")\n });\n this.addManagedListener(this.eventService, Events62.EVENT_CHART_OPTIONS_CHANGED, (e) => {\n this.updateTopPadding(e.chartOptions);\n });\n }\n updateTopPadding(chartOptions) {\n const topPadding = [...this.chartController.getChartSeriesTypes(), \"common\"].map((seriesType) => {\n var _a, _b;\n return (_b = (_a = chartOptions[seriesType]) == null ? void 0 : _a.padding) == null ? void 0 : _b.top;\n }).find((value) => value != null);\n if (topPadding != null) {\n this.paddingTopSlider.setValue(`${topPadding}`);\n }\n }\n};\n_PaddingPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n
`;\n__decorateClass4([\n RefSelector52(\"paddingTopSlider\")\n], _PaddingPanel.prototype, \"paddingTopSlider\", 2);\n__decorateClass4([\n Autowired19(\"chartTranslationService\")\n], _PaddingPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct17\n], _PaddingPanel.prototype, \"init\", 1);\nvar PaddingPanel = _PaddingPanel;\nvar _BackgroundPanel = class _BackgroundPanel2 extends Component13 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const chartBackgroundGroupParams = this.chartMenuUtils.addEnableParams(\n \"background.visible\",\n {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"background\"),\n suppressEnabledCheckbox: false\n }\n );\n const colorPickerParams = this.chartMenuUtils.getDefaultColorPickerParams(\"background.fill\");\n this.setTemplate(_BackgroundPanel2.TEMPLATE, {\n chartBackgroundGroup: chartBackgroundGroupParams,\n colorPicker: colorPickerParams\n });\n }\n};\n_BackgroundPanel.TEMPLATE = /* html */\n`
\n \n \n \n
`;\n__decorateClass4([\n Autowired20(\"chartTranslationService\")\n], _BackgroundPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct18\n], _BackgroundPanel.prototype, \"init\", 1);\nvar BackgroundPanel = _BackgroundPanel;\nvar _TitlePanel = class _TitlePanel2 extends Component14 {\n constructor(chartMenuUtils, chartController) {\n super(_TitlePanel2.TEMPLATE);\n this.chartMenuUtils = chartMenuUtils;\n this.chartController = chartController;\n this.activePanels = [];\n this.chartOptions = chartMenuUtils.getChartOptions();\n }\n init() {\n this.initFontPanel();\n this.titlePlaceholder = this.chartTranslationService.translate(\"titlePlaceholder\");\n }\n hasTitle() {\n const title = this.chartOptions.getValue(\"title\");\n return title && title.enabled && title.text && title.text.length > 0;\n }\n initFontPanel() {\n const hasTitle = this.hasTitle();\n const fontPanelParams = {\n name: this.chartTranslationService.translate(\"title\"),\n enabled: hasTitle,\n suppressEnabledCheckbox: false,\n chartMenuUtils: this.chartMenuUtils,\n keyMapper: (key) => `title.${key}`,\n onEnableChange: (enabled) => {\n if (this.chartMenuService.doesChartToolbarExist(this.chartController)) {\n const topPadding = this.chartOptions.getValue(\"padding.top\");\n this.chartOptions.setValue(\"padding.top\", enabled ? topPadding - 20 : topPadding + 20);\n }\n this.chartOptions.setValue(\"title.enabled\", enabled);\n const currentTitleText = this.chartOptions.getValue(\"title.text\");\n const replaceableTitleText = currentTitleText === \"Title\" || (currentTitleText == null ? void 0 : currentTitleText.trim().length) === 0;\n if (enabled && replaceableTitleText) {\n this.chartOptions.setValue(\"title.text\", this.titlePlaceholder);\n }\n }\n };\n const fontPanelComp = this.createBean(new FontPanel(fontPanelParams));\n fontPanelComp.addItemToPanel(this.createSpacingSlicer());\n this.getGui().appendChild(fontPanelComp.getGui());\n this.activePanels.push(fontPanelComp);\n this.addManagedListener(this.eventService, \"chartTitleEdit\", () => {\n fontPanelComp.setEnabled(this.hasTitle());\n });\n }\n createSpacingSlicer() {\n const params = this.chartMenuUtils.getDefaultSliderParams(\"title.spacing\", \"spacing\", 100);\n params.value = \"10\";\n return this.createBean(new AgSlider4(params));\n }\n destroyActivePanels() {\n this.activePanels.forEach((panel) => {\n _17.removeFromParent(panel.getGui());\n this.destroyBean(panel);\n });\n }\n destroy() {\n this.destroyActivePanels();\n super.destroy();\n }\n};\n_TitlePanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired21(\"chartTranslationService\")\n], _TitlePanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired21(\"chartMenuService\")\n], _TitlePanel.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct19\n], _TitlePanel.prototype, \"init\", 1);\nvar TitlePanel = _TitlePanel;\nvar _ChartPanel = class _ChartPanel2 extends Component15 {\n constructor({\n chartController,\n chartMenuParamsFactory,\n isExpandedOnInit = false,\n chartOptionsService,\n seriesType\n }) {\n super();\n this.chartController = chartController;\n this.chartMenuParamsFactory = chartMenuParamsFactory;\n this.chartOptionsSeriesProxy = chartOptionsService.getSeriesOptionsProxy(() => seriesType != null ? seriesType : this.chartController.getChartSeriesType());\n this.isExpandedOnInit = isExpandedOnInit;\n }\n init() {\n this.chartSeriesMenuParamsFactory = this.createManagedBean(new ChartMenuParamsFactory(this.chartOptionsSeriesProxy));\n const chartGroupParams = {\n cssIdentifier: \"charts-format-top-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"chart\"),\n expanded: this.isExpandedOnInit,\n suppressEnabledCheckbox: true,\n items: [\n this.createManagedBean(new TitlePanel(this.chartMenuParamsFactory, this.chartController)),\n this.createManagedBean(new PaddingPanel(this.chartMenuParamsFactory, this.chartController)),\n this.createManagedBean(new BackgroundPanel(this.chartMenuParamsFactory)),\n ...this.createDirectionSelect()\n ]\n };\n this.setTemplate(_ChartPanel2.TEMPLATE, { chartGroup: chartGroupParams });\n this.addManagedListener(this.eventService, Events72.EVENT_CHART_OPTIONS_CHANGED, () => this.refresh());\n }\n refresh() {\n this.updateDirectionSelect();\n }\n createDirectionSelect() {\n const enabled = !this.chartMenuService.isLegacyFormat();\n if (!enabled) {\n return [];\n }\n const options = [\"horizontal\", \"vertical\"].map((value) => ({\n value,\n text: this.chartTranslationService.translate(value)\n }));\n const params = this.chartSeriesMenuParamsFactory.getDefaultSelectParams(\"direction\", \"direction\", options);\n params.labelWidth = \"flex\";\n params.inputWidth = \"flex\";\n const onValueChange = params.onValueChange;\n params.onValueChange = (value) => {\n onValueChange(value);\n this.chartController.raiseChartModelUpdateEvent();\n };\n this.directionSelect = this.createManagedBean(new AgSelect7(params));\n this.updateDirectionSelect();\n return [this.directionSelect];\n }\n updateDirectionSelect() {\n var _a;\n (_a = this.directionSelect) == null ? void 0 : _a.setDisplayed(canSwitchDirection(this.chartController.getChartType()));\n }\n};\n_ChartPanel.TEMPLATE = /* html */\n`
\n \n
`;\n__decorateClass4([\n Autowired222(\"chartTranslationService\")\n], _ChartPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired222(\"chartMenuService\")\n], _ChartPanel.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct20\n], _ChartPanel.prototype, \"init\", 1);\nvar ChartPanel = _ChartPanel;\nvar _ShadowPanel = class _ShadowPanel2 extends Component16 {\n constructor(chartMenuUtils, propertyKey = \"shadow\") {\n super();\n this.chartMenuUtils = chartMenuUtils;\n this.propertyKey = propertyKey;\n }\n init() {\n const propertyNamespace = this.propertyKey;\n const shadowGroupParams = this.chartMenuUtils.addEnableParams(\n `${propertyNamespace}.enabled`,\n {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"shadow\"),\n suppressEnabledCheckbox: false\n }\n );\n const shadowColorPickerParams = this.chartMenuUtils.getDefaultColorPickerParams(`${propertyNamespace}.color`);\n this.setTemplate(_ShadowPanel2.TEMPLATE, {\n shadowGroup: shadowGroupParams,\n shadowColorPicker: shadowColorPickerParams,\n shadowBlurSlider: this.getSliderParams(\"blur\", 0, 20),\n shadowXOffsetSlider: this.getSliderParams(\"xOffset\", -10, 10),\n shadowYOffsetSlider: this.getSliderParams(\"yOffset\", -10, 10)\n });\n }\n getSliderParams(property, minValue, defaultMaxValue) {\n const expression = `${this.propertyKey}.${property}`;\n const params = this.chartMenuUtils.getDefaultSliderParams(\n expression,\n property,\n defaultMaxValue\n );\n params.minValue = minValue;\n return params;\n }\n};\n_ShadowPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired232(\"chartTranslationService\")\n], _ShadowPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct21\n], _ShadowPanel.prototype, \"init\", 1);\nvar ShadowPanel = _ShadowPanel;\nvar _MarkersPanel = class _MarkersPanel2 extends Component17 {\n constructor(chartOptionsService, chartMenuUtils) {\n super();\n this.chartOptionsService = chartOptionsService;\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const chartType = this.chartOptionsService.getChartType();\n const shouldHideEnabledCheckbox = _18.includes([\"scatter\", \"bubble\"], chartType);\n const seriesMarkersGroupParams = this.chartMenuUtils.addEnableParams(\n \"marker.enabled\",\n {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"markers\"),\n suppressEnabledCheckbox: shouldHideEnabledCheckbox,\n suppressOpenCloseIcons: true\n }\n );\n const isBubble = chartType === \"bubble\";\n let seriesMarkerMinSizeSliderParams;\n let seriesMarkerSizeSliderParams;\n if (isBubble) {\n seriesMarkerMinSizeSliderParams = this.getSliderParams(\"marker.maxSize\", \"maxSize\", 60);\n seriesMarkerSizeSliderParams = this.getSliderParams(\"marker.size\", \"minSize\", 60);\n } else {\n seriesMarkerMinSizeSliderParams = {};\n seriesMarkerSizeSliderParams = this.getSliderParams(\"marker.size\", \"size\", 60);\n }\n this.setTemplate(_MarkersPanel2.TEMPLATE, {\n seriesMarkersGroup: seriesMarkersGroupParams,\n seriesMarkerShapeSelect: this.getMarkerShapeSelectParams(),\n seriesMarkerMinSizeSlider: seriesMarkerMinSizeSliderParams,\n seriesMarkerSizeSlider: seriesMarkerSizeSliderParams,\n seriesMarkerStrokeWidthSlider: this.getSliderParams(\"marker.strokeWidth\", \"strokeWidth\", 10)\n });\n if (!isBubble) {\n this.seriesMarkerMinSizeSlider.setDisplayed(false);\n }\n }\n getMarkerShapeSelectParams() {\n const options = [\n {\n value: \"square\",\n text: \"Square\"\n },\n {\n value: \"circle\",\n text: \"Circle\"\n },\n {\n value: \"cross\",\n text: \"Cross\"\n },\n {\n value: \"diamond\",\n text: \"Diamond\"\n },\n {\n value: \"plus\",\n text: \"Plus\"\n },\n {\n value: \"triangle\",\n text: \"Triangle\"\n },\n {\n value: \"heart\",\n text: \"Heart\"\n }\n ];\n return this.chartMenuUtils.addValueParams(\n \"marker.shape\",\n {\n options,\n label: this.chartTranslationService.translate(\"shape\")\n }\n );\n }\n getSliderParams(expression, labelKey, defaultMaxValue) {\n return this.chartMenuUtils.getDefaultSliderParams(\n expression,\n labelKey,\n defaultMaxValue\n );\n }\n};\n_MarkersPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n
`;\n__decorateClass4([\n RefSelector62(\"seriesMarkerMinSizeSlider\")\n], _MarkersPanel.prototype, \"seriesMarkerMinSizeSlider\", 2);\n__decorateClass4([\n Autowired242(\"chartTranslationService\")\n], _MarkersPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct222\n], _MarkersPanel.prototype, \"init\", 1);\nvar MarkersPanel = _MarkersPanel;\nvar _AgColorPanel = class _AgColorPanel2 extends Component18 {\n constructor(config) {\n super(_AgColorPanel2.TEMPLATE);\n this.H = 1;\n this.S = 1;\n this.B = 1;\n this.A = 1;\n this.isSpectrumDragging = false;\n this.isSpectrumHueDragging = false;\n this.isSpectrumAlphaDragging = false;\n this.colorChanged = false;\n this.picker = config.picker;\n }\n postConstruct() {\n this.initTabIndex();\n this.initRecentColors();\n this.addGuiEventListener(\"focus\", () => this.spectrumColor.focus());\n this.addGuiEventListener(\"keydown\", (e) => {\n if (e.key === KeyCode5.ENTER && !e.defaultPrevented) {\n this.destroy();\n }\n });\n this.addManagedListener(this.spectrumColor, \"keydown\", (e) => this.moveDragger(e));\n this.addManagedListener(this.spectrumAlphaSlider, \"keydown\", (e) => this.moveAlphaSlider(e));\n this.addManagedListener(this.spectrumHueSlider, \"keydown\", (e) => this.moveHueSlider(e));\n this.addManagedListener(this.spectrumVal, \"mousedown\", this.onSpectrumDraggerDown.bind(this));\n this.addManagedListener(this.spectrumHue, \"mousedown\", this.onSpectrumHueDown.bind(this));\n this.addManagedListener(this.spectrumAlpha, \"mousedown\", this.onSpectrumAlphaDown.bind(this));\n this.addGuiEventListener(\"mousemove\", (e) => {\n this.onSpectrumDraggerMove(e);\n this.onSpectrumHueMove(e);\n this.onSpectrumAlphaMove(e);\n });\n this.addManagedListener(document, \"mouseup\", this.onMouseUp.bind(this));\n this.addManagedListener(this.recentColors, \"click\", this.onRecentColorClick.bind(this));\n this.addManagedListener(this.recentColors, \"keydown\", (e) => {\n if (e.key === KeyCode5.ENTER || e.key === KeyCode5.SPACE) {\n e.preventDefault();\n this.onRecentColorClick(e);\n }\n });\n }\n initTabIndex() {\n const tabIndex = this.tabIndex = this.gos.get(\"tabIndex\").toString();\n this.spectrumColor.setAttribute(\"tabindex\", tabIndex);\n this.spectrumHueSlider.setAttribute(\"tabindex\", tabIndex);\n this.spectrumAlphaSlider.setAttribute(\"tabindex\", tabIndex);\n }\n refreshSpectrumRect() {\n return this.spectrumValRect = this.spectrumVal.getBoundingClientRect();\n }\n refreshHueRect() {\n return this.spectrumHueRect = this.spectrumHue.getBoundingClientRect();\n }\n refreshAlphaRect() {\n return this.spectrumAlphaRect = this.spectrumAlpha.getBoundingClientRect();\n }\n onSpectrumDraggerDown(e) {\n this.refreshSpectrumRect();\n this.isSpectrumDragging = true;\n this.moveDragger(e);\n }\n onSpectrumDraggerMove(e) {\n if (this.isSpectrumDragging) {\n this.moveDragger(e);\n }\n }\n onSpectrumHueDown(e) {\n this.refreshHueRect();\n this.isSpectrumHueDragging = true;\n this.moveHueSlider(e);\n }\n onSpectrumHueMove(e) {\n if (this.isSpectrumHueDragging) {\n this.moveHueSlider(e);\n }\n }\n onSpectrumAlphaDown(e) {\n this.refreshAlphaRect();\n this.isSpectrumAlphaDragging = true;\n this.moveAlphaSlider(e);\n }\n onSpectrumAlphaMove(e) {\n if (this.isSpectrumAlphaDragging) {\n this.moveAlphaSlider(e);\n }\n }\n onMouseUp() {\n this.isSpectrumDragging = false;\n this.isSpectrumHueDragging = false;\n this.isSpectrumAlphaDragging = false;\n }\n moveDragger(e) {\n const valRect = this.spectrumValRect;\n if (!valRect) {\n return;\n }\n let x;\n let y;\n if (e instanceof MouseEvent) {\n x = e.clientX - valRect.left;\n y = e.clientY - valRect.top;\n } else {\n const isLeft = e.key === KeyCode5.LEFT;\n const isRight = e.key === KeyCode5.RIGHT;\n const isUp = e.key === KeyCode5.UP;\n const isDown = e.key === KeyCode5.DOWN;\n const isVertical = isUp || isDown;\n const isHorizontal = isLeft || isRight;\n if (!isVertical && !isHorizontal) {\n return;\n }\n e.preventDefault();\n const { x: currentX, y: currentY } = this.getSpectrumValue();\n x = currentX + (isHorizontal ? isLeft ? -5 : 5 : 0);\n y = currentY + (isVertical ? isUp ? -5 : 5 : 0);\n }\n x = Math.max(x, 0);\n x = Math.min(x, valRect.width);\n y = Math.max(y, 0);\n y = Math.min(y, valRect.height);\n this.setSpectrumValue(x / valRect.width, 1 - y / valRect.height);\n }\n moveHueSlider(e) {\n const rect = this.spectrumHueRect;\n if (!rect) {\n return;\n }\n const x = this.moveSlider(this.spectrumHueSlider, e);\n if (x == null) {\n return;\n }\n this.H = 1 - x / rect.width;\n this.update();\n }\n moveAlphaSlider(e) {\n const rect = this.spectrumAlphaRect;\n if (!rect) {\n return;\n }\n const x = this.moveSlider(this.spectrumAlphaSlider, e);\n if (x == null) {\n return;\n }\n this.A = x / rect.width;\n this.update();\n }\n moveSlider(slider, e) {\n var _a;\n const sliderRect = slider.getBoundingClientRect();\n const parentRect = (_a = slider.parentElement) == null ? void 0 : _a.getBoundingClientRect();\n if (!slider || !parentRect) {\n return null;\n }\n let x;\n if (e instanceof MouseEvent) {\n x = e.clientX - parentRect.left;\n } else {\n const isLeft = e.key === KeyCode5.LEFT;\n const isRight = e.key === KeyCode5.RIGHT;\n if (!isLeft && !isRight) {\n return null;\n }\n e.preventDefault();\n const diff = isLeft ? -5 : 5;\n x = parseFloat(slider.style.left) - sliderRect.width / 2 + diff;\n }\n x = Math.max(x, 0);\n x = Math.min(x, parentRect.width);\n slider.style.left = x + sliderRect.width / 2 + \"px\";\n return x;\n }\n update() {\n const color = _Util.Color.fromHSB(this.H * 360, this.S, this.B, this.A);\n const spectrumColor = _Util.Color.fromHSB(this.H * 360, 1, 1);\n const rgbaColor = color.toRgbaString();\n const colorPicker = this.picker;\n const existingColor = _Util.Color.fromString(colorPicker.getValue());\n if (existingColor.toRgbaString() !== rgbaColor) {\n this.colorChanged = true;\n }\n colorPicker.setValue(rgbaColor);\n this.spectrumColor.style.backgroundColor = spectrumColor.toRgbaString();\n this.spectrumDragger.style.backgroundColor = rgbaColor;\n }\n /**\n * @param saturation In the [0, 1] interval.\n * @param brightness In the [0, 1] interval.\n */\n setSpectrumValue(saturation, brightness) {\n const valRect = this.spectrumValRect || this.refreshSpectrumRect();\n if (valRect == null) {\n return;\n }\n const dragger = this.spectrumDragger;\n const draggerRect = dragger.getBoundingClientRect();\n saturation = Math.max(0, saturation);\n saturation = Math.min(1, saturation);\n brightness = Math.max(0, brightness);\n brightness = Math.min(1, brightness);\n this.S = saturation;\n this.B = brightness;\n dragger.style.left = saturation * valRect.width - draggerRect.width / 2 + \"px\";\n dragger.style.top = (1 - brightness) * valRect.height - draggerRect.height / 2 + \"px\";\n this.update();\n }\n getSpectrumValue() {\n const dragger = this.spectrumDragger;\n const draggerRect = dragger.getBoundingClientRect();\n const x = parseFloat(dragger.style.left) + draggerRect.width / 2;\n const y = parseFloat(dragger.style.top) + draggerRect.height / 2;\n return { x, y };\n }\n initRecentColors() {\n const recentColors = _AgColorPanel2.recentColors;\n const innerHtml = recentColors.map((color, index) => {\n return (\n /* html */\n `
`\n );\n });\n this.recentColors.innerHTML = innerHtml.join(\"\");\n }\n setValue(val) {\n const color = _Util.Color.fromString(val);\n const [h, s, b] = color.toHSB();\n this.H = (isNaN(h) ? 0 : h) / 360;\n this.A = color.a;\n const spectrumHueRect = this.spectrumHueRect || this.refreshHueRect();\n const spectrumAlphaRect = this.spectrumAlphaRect || this.refreshAlphaRect();\n this.spectrumHueSlider.style.left = `${(this.H - 1) * -spectrumHueRect.width}px`;\n this.spectrumAlphaSlider.style.left = `${this.A * spectrumAlphaRect.width}px`;\n this.setSpectrumValue(s, b);\n }\n onRecentColorClick(e) {\n const target = e.target;\n if (!_19.exists(target.id)) {\n return;\n }\n const id = parseInt(target.id, 10);\n this.setValue(_AgColorPanel2.recentColors[id]);\n this.destroy();\n }\n addRecentColor() {\n const color = _Util.Color.fromHSB(this.H * 360, this.S, this.B, this.A);\n const rgbaColor = color.toRgbaString();\n let recentColors = _AgColorPanel2.recentColors;\n if (!this.colorChanged || recentColors[0] === rgbaColor) {\n return;\n }\n recentColors = recentColors.filter((currentColor) => currentColor != rgbaColor);\n recentColors = [rgbaColor].concat(recentColors);\n if (recentColors.length > _AgColorPanel2.maxRecentColors) {\n recentColors = recentColors.slice(0, _AgColorPanel2.maxRecentColors);\n }\n _AgColorPanel2.recentColors = recentColors;\n }\n destroy() {\n this.addRecentColor();\n super.destroy();\n }\n};\n_AgColorPanel.maxRecentColors = 8;\n_AgColorPanel.recentColors = [];\n_AgColorPanel.TEMPLATE = /* html */\n`
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
`;\n__decorateClass4([\n RefSelector7(\"spectrumColor\")\n], _AgColorPanel.prototype, \"spectrumColor\", 2);\n__decorateClass4([\n RefSelector7(\"spectrumVal\")\n], _AgColorPanel.prototype, \"spectrumVal\", 2);\n__decorateClass4([\n RefSelector7(\"spectrumDragger\")\n], _AgColorPanel.prototype, \"spectrumDragger\", 2);\n__decorateClass4([\n RefSelector7(\"spectrumHue\")\n], _AgColorPanel.prototype, \"spectrumHue\", 2);\n__decorateClass4([\n RefSelector7(\"spectrumHueSlider\")\n], _AgColorPanel.prototype, \"spectrumHueSlider\", 2);\n__decorateClass4([\n RefSelector7(\"spectrumAlpha\")\n], _AgColorPanel.prototype, \"spectrumAlpha\", 2);\n__decorateClass4([\n RefSelector7(\"spectrumAlphaSlider\")\n], _AgColorPanel.prototype, \"spectrumAlphaSlider\", 2);\n__decorateClass4([\n RefSelector7(\"recentColors\")\n], _AgColorPanel.prototype, \"recentColors\", 2);\n__decorateClass4([\n PostConstruct232\n], _AgColorPanel.prototype, \"postConstruct\", 1);\nvar AgColorPanel = _AgColorPanel;\nvar AgColorPicker = class extends AgPickerField {\n constructor(config) {\n super(__spreadValues3({\n pickerAriaLabelKey: \"ariaLabelColorPicker\",\n pickerAriaLabelValue: \"Color Picker\",\n pickerType: \"ag-list\",\n className: \"ag-color-picker\",\n pickerIcon: \"colorPicker\"\n }, config));\n }\n postConstruct() {\n super.postConstruct();\n if (this.value) {\n this.setValue(this.value);\n }\n }\n createPickerComponent() {\n const eGuiRect = this.getGui().getBoundingClientRect();\n const colorDialog = this.createBean(new AgDialog3({\n closable: false,\n modal: true,\n hideTitleBar: true,\n minWidth: 190,\n width: 190,\n height: 250,\n x: eGuiRect.right - 190,\n y: eGuiRect.top - 250\n }));\n return colorDialog;\n }\n renderAndPositionPicker() {\n const pickerComponent = this.pickerComponent;\n const colorPanel = this.createBean(new AgColorPanel({ picker: this }));\n pickerComponent.addCssClass(\"ag-color-dialog\");\n colorPanel.addDestroyFunc(() => {\n if (pickerComponent.isAlive()) {\n this.destroyBean(pickerComponent);\n }\n });\n pickerComponent.setParentComponent(this);\n pickerComponent.setBodyComponent(colorPanel);\n colorPanel.setValue(this.getValue());\n colorPanel.getGui().focus();\n pickerComponent.addDestroyFunc(() => {\n if (!this.isDestroyingPicker) {\n this.beforeHidePicker();\n this.isDestroyingPicker = true;\n if (colorPanel.isAlive()) {\n this.destroyBean(colorPanel);\n }\n if (this.isAlive()) {\n this.getFocusableElement().focus();\n }\n } else {\n this.isDestroyingPicker = false;\n }\n });\n return () => {\n var _a;\n return (_a = this.pickerComponent) == null ? void 0 : _a.close();\n };\n }\n setValue(color) {\n if (this.value === color) {\n return this;\n }\n this.eDisplayField.style.backgroundColor = color;\n return super.setValue(color);\n }\n getValue() {\n return this.value;\n }\n};\nvar _CalloutPanel = class _CalloutPanel2 extends Component19 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const calloutGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"callout\"),\n enabled: true,\n suppressOpenCloseIcons: true,\n suppressEnabledCheckbox: true\n };\n this.setTemplate(_CalloutPanel2.TEMPLATE, {\n calloutGroup: calloutGroupParams,\n calloutLengthSlider: this.chartMenuUtils.getDefaultSliderParams(\"calloutLine.length\", \"length\", 40),\n calloutStrokeWidthSlider: this.chartMenuUtils.getDefaultSliderParams(\"calloutLine.strokeWidth\", \"strokeWidth\", 10),\n labelOffsetSlider: this.chartMenuUtils.getDefaultSliderParams(\"calloutLabel.offset\", \"offset\", 30)\n });\n }\n};\n_CalloutPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired25(\"chartTranslationService\")\n], _CalloutPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct242\n], _CalloutPanel.prototype, \"init\", 1);\nvar CalloutPanel = _CalloutPanel;\nvar _CapsPanel = class _CapsPanel2 extends Component20 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const capsGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"cap\"),\n enabled: true,\n suppressOpenCloseIcons: true,\n suppressEnabledCheckbox: true\n };\n const capLengthRatioSliderParams = this.chartMenuUtils.getDefaultSliderParams(\"cap.lengthRatio\", \"capLengthRatio\", 1);\n capLengthRatioSliderParams.step = 0.05;\n this.setTemplate(_CapsPanel2.TEMPLATE, {\n capsGroup: capsGroupParams,\n capLengthRatioSlider: capLengthRatioSliderParams\n });\n }\n};\n_CapsPanel.TEMPLATE = /* html */\n`
\n \n \n \n
`;\n__decorateClass4([\n Autowired26(\"chartTranslationService\")\n], _CapsPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct25\n], _CapsPanel.prototype, \"init\", 1);\nvar CapsPanel = _CapsPanel;\nvar _ConnectorLinePanel = class _ConnectorLinePanel2 extends Component21 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const lineGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"connectorLine\"),\n enabled: true,\n suppressOpenCloseIcons: true,\n suppressEnabledCheckbox: true\n };\n this.setTemplate(_ConnectorLinePanel2.TEMPLATE, {\n lineGroup: lineGroupParams,\n lineColorPicker: this.chartMenuUtils.getDefaultColorPickerParams(\"line.stroke\"),\n lineStrokeWidthSlider: this.getSliderParams(\"strokeWidth\", 10, \"line.strokeWidth\"),\n lineDashSlider: this.getSliderParams(\"lineDash\", 30, \"line.lineDash\", 1, true),\n lineOpacitySlider: this.getSliderParams(\"strokeOpacity\", 1, \"line.strokeOpacity\", 0.05)\n });\n }\n getSliderParams(labelKey, maxValue, seriesOptionKey, step = 1, isArray = false) {\n const params = this.chartMenuUtils.getDefaultSliderParams(seriesOptionKey, labelKey, maxValue, isArray);\n params.step = step;\n return params;\n }\n};\n_ConnectorLinePanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired27(\"chartTranslationService\")\n], _ConnectorLinePanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct26\n], _ConnectorLinePanel.prototype, \"init\", 1);\nvar ConnectorLinePanel = _ConnectorLinePanel;\nvar _WhiskersPanel = class _WhiskersPanel2 extends Component222 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const whiskersGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"whisker\"),\n enabled: true,\n suppressOpenCloseIcons: true,\n suppressEnabledCheckbox: true\n };\n this.setTemplate(_WhiskersPanel2.TEMPLATE, {\n whiskersGroup: whiskersGroupParams,\n whiskerColorPicker: this.chartMenuUtils.getDefaultColorPickerParams(\"whisker.stroke\"),\n whiskerThicknessSlider: this.chartMenuUtils.getDefaultSliderParams(\"whisker.strokeWidth\", \"strokeWidth\", 10),\n whiskerOpacitySlider: this.chartMenuUtils.getDefaultSliderParams(\"whisker.strokeOpacity\", \"strokeOpacity\", 1),\n whiskerLineDashSlider: this.chartMenuUtils.getDefaultSliderParams(\"whisker.lineDash\", \"lineDash\", 30, true),\n whiskerLineDashOffsetSlider: this.chartMenuUtils.getDefaultSliderParams(\"whisker.lineDashOffset\", \"lineDashOffset\", 30)\n });\n }\n};\n_WhiskersPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired28(\"chartTranslationService\")\n], _WhiskersPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct27\n], _WhiskersPanel.prototype, \"init\", 1);\nvar WhiskersPanel = _WhiskersPanel;\nvar _SeriesItemsPanel = class _SeriesItemsPanel2 extends Component23 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n this.activePanels = [];\n }\n init() {\n const seriesItemsGroupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"seriesItems\"),\n enabled: true,\n suppressOpenCloseIcons: true,\n suppressEnabledCheckbox: true\n };\n this.setTemplate(_SeriesItemsPanel2.TEMPLATE, {\n seriesItemsGroup: seriesItemsGroupParams,\n seriesItemSelect: this.getSeriesItemsParams()\n });\n this.initSeriesControls();\n }\n getSeriesItemsParams() {\n const options = [\n { value: \"positive\", text: this.chartTranslationService.translate(\"seriesItemPositive\") },\n { value: \"negative\", text: this.chartTranslationService.translate(\"seriesItemNegative\") }\n ];\n const seriesItemChangedCallback = (newValue) => {\n this.destroyActivePanels();\n this.initSeriesControls(newValue);\n };\n return {\n label: this.chartTranslationService.translate(\"seriesItemType\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n options,\n value: \"positive\",\n onValueChange: seriesItemChangedCallback\n };\n }\n initSeriesControls(itemType = \"positive\") {\n this.initSlider(\"strokeWidth\", 10, `item.${itemType}.strokeWidth`);\n this.initSlider(\"lineDash\", 30, `item.${itemType}.lineDash`, 1, true);\n this.initSlider(\"strokeOpacity\", 1, `item.${itemType}.strokeOpacity`, 0.05, false);\n this.initSlider(\"fillOpacity\", 1, `item.${itemType}.fillOpacity`, 0.05, false);\n this.initItemLabels(itemType);\n }\n initSlider(labelKey, maxValue, seriesOptionKey, step = 1, isArray = false) {\n const params = this.chartMenuUtils.getDefaultSliderParams(\n seriesOptionKey,\n labelKey,\n maxValue,\n isArray\n );\n params.step = step;\n const itemSlider = this.seriesItemsGroup.createManagedBean(new AgSlider6(params));\n this.seriesItemsGroup.addItem(itemSlider);\n this.activePanels.push(itemSlider);\n }\n initItemLabels(itemType) {\n const sectorParams = this.chartMenuUtils.getDefaultFontPanelParams(`item.${itemType}.label`, \"seriesItemLabels\");\n const labelPanelComp = this.createBean(new FontPanel(sectorParams));\n this.seriesItemsGroup.addItem(labelPanelComp);\n this.activePanels.push(labelPanelComp);\n }\n destroyActivePanels() {\n this.activePanels.forEach((panel) => {\n _21.removeFromParent(panel.getGui());\n this.destroyBean(panel);\n });\n }\n destroy() {\n this.destroyActivePanels();\n super.destroy();\n }\n};\n_SeriesItemsPanel.TEMPLATE = /* html */\n`
\n \n \n \n
`;\n__decorateClass4([\n RefSelector8(\"seriesItemsGroup\")\n], _SeriesItemsPanel.prototype, \"seriesItemsGroup\", 2);\n__decorateClass4([\n Autowired29(\"chartTranslationService\")\n], _SeriesItemsPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct28\n], _SeriesItemsPanel.prototype, \"init\", 1);\nvar SeriesItemsPanel = _SeriesItemsPanel;\nvar _TileSpacingPanel = class _TileSpacingPanel2 extends Component24 {\n constructor(chartMenuUtils) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n }\n init() {\n const groupParams = {\n cssIdentifier: \"charts-format-sub-level\",\n direction: \"vertical\",\n enabled: true,\n suppressOpenCloseIcons: true,\n suppressEnabledCheckbox: true\n };\n this.setTemplate(_TileSpacingPanel2.TEMPLATE, {\n groupSpacing: __spreadProps3(__spreadValues3({}, groupParams), { title: this.chartTranslationService.translate(\"group\") }),\n tileSpacing: __spreadProps3(__spreadValues3({}, groupParams), { title: this.chartTranslationService.translate(\"tile\") }),\n groupPaddingSlider: this.getSliderParams(\"padding\", \"group.padding\"),\n groupSpacingSlider: this.getSliderParams(\"spacing\", \"group.gap\"),\n tilePaddingSlider: this.getSliderParams(\"padding\", \"tile.padding\"),\n tileSpacingSlider: this.getSliderParams(\"spacing\", \"tile.gap\")\n });\n }\n getSliderParams(labelKey, key) {\n return this.chartMenuUtils.getDefaultSliderParams(key, labelKey, 10);\n }\n};\n_TileSpacingPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired30(\"chartTranslationService\")\n], _TileSpacingPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct29\n], _TileSpacingPanel.prototype, \"init\", 1);\nvar TileSpacingPanel = _TileSpacingPanel;\nvar _SeriesPanel = class _SeriesPanel2 extends Component25 {\n constructor({\n chartController,\n chartOptionsService,\n seriesType,\n isExpandedOnInit = false\n }) {\n super();\n this.activePanels = [];\n this.widgetFuncs = {\n lineWidth: () => this.initStrokeWidth(\"lineWidth\"),\n strokeWidth: () => this.initStrokeWidth(\"strokeWidth\"),\n lineColor: () => this.initLineColor(),\n lineDash: () => this.initLineDash(),\n lineOpacity: () => this.initLineOpacity(),\n fillOpacity: () => this.initFillOpacity(),\n markers: () => this.initMarkers(),\n labels: () => this.initLabels(),\n shadow: () => this.initShadow(),\n tooltips: () => this.initTooltips(),\n bins: () => this.initBins(),\n whiskers: () => this.initWhiskers(),\n caps: () => this.initCaps(),\n connectorLine: () => this.initConnectorLine(),\n seriesItems: () => this.initSeriesItemsPanel(),\n tileSpacing: () => this.initTileSpacingPanel(),\n groupType: () => this.initGroupType()\n };\n this.seriesWidgetMappings = {\n bar: [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"shadow\"],\n pie: [\"tooltips\", \"strokeWidth\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"shadow\"],\n donut: [\"tooltips\", \"strokeWidth\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"shadow\"],\n line: [\"tooltips\", \"lineWidth\", \"lineDash\", \"lineOpacity\", \"markers\", \"labels\"],\n scatter: [\"tooltips\", \"markers\", \"labels\"],\n bubble: [\"tooltips\", \"markers\", \"labels\"],\n area: [\"tooltips\", \"lineWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"markers\", \"labels\", \"shadow\"],\n histogram: [\"tooltips\", \"bins\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"shadow\"],\n \"radial-column\": [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"groupType\"],\n \"radial-bar\": [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"groupType\"],\n \"radar-line\": [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"markers\", \"labels\"],\n \"radar-area\": [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"markers\", \"labels\"],\n nightingale: [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"labels\", \"groupType\"],\n \"box-plot\": [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"whiskers\", \"caps\"],\n \"range-bar\": [\"tooltips\", \"strokeWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"labels\"],\n \"range-area\": [\"tooltips\", \"lineWidth\", \"lineDash\", \"lineOpacity\", \"fillOpacity\", \"markers\", \"labels\", \"shadow\"],\n treemap: [\"tooltips\", \"tileSpacing\"],\n sunburst: [\"tooltips\"],\n heatmap: [\"tooltips\", \"labels\", \"lineColor\", \"lineWidth\", \"lineOpacity\"],\n waterfall: [\"tooltips\", \"connectorLine\", \"seriesItems\"]\n };\n this.chartController = chartController;\n this.chartOptionsService = chartOptionsService;\n this.seriesType = seriesType || this.chartController.getChartSeriesType();\n this.isExpandedOnInit = isExpandedOnInit;\n }\n init() {\n const seriesGroupParams = {\n cssIdentifier: \"charts-format-top-level\",\n direction: \"vertical\",\n title: this.translate(\"series\"),\n expanded: this.isExpandedOnInit,\n suppressEnabledCheckbox: true\n };\n this.setTemplate(_SeriesPanel2.TEMPLATE, { seriesGroup: seriesGroupParams });\n this.chartMenuUtils = this.createManagedBean(new ChartMenuParamsFactory(\n this.chartOptionsService.getSeriesOptionsProxy(() => this.seriesType)\n ));\n this.chartOptions = this.chartMenuUtils.getChartOptions();\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_SERIES_CHART_TYPE_CHANGED, this.refreshWidgets.bind(this));\n this.refreshWidgets();\n }\n refreshWidgets() {\n this.destroyActivePanels();\n const chart = this.chartController.getChartProxy().getChart();\n chart.waitForUpdate().then(() => {\n var _a;\n const componentWasRemoved = !this.isAlive();\n if (componentWasRemoved) {\n return;\n }\n if (this.chartController.isComboChart()) {\n this.updateSeriesType();\n this.initSeriesSelect();\n }\n ((_a = this.seriesWidgetMappings[this.seriesType]) != null ? _a : []).forEach((w) => this.widgetFuncs[w]());\n }).catch((e) => console.error(`AG Grid - chart rendering failed`, e));\n }\n initSeriesSelect() {\n const seriesSelect = this.seriesGroup.createManagedBean(new AgSelect8({\n label: this.translate(\"seriesType\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n options: this.getSeriesSelectOptions(),\n value: `${this.seriesType}`,\n onValueChange: (newValue) => {\n this.seriesType = newValue;\n this.refreshWidgets();\n }\n }));\n this.seriesGroup.addItem(seriesSelect);\n this.activePanels.push(seriesSelect);\n }\n initTooltips() {\n const seriesTooltipsToggle = this.createBean(new AgToggleButton4(this.chartMenuUtils.addValueParams(\n \"tooltip.enabled\",\n {\n label: this.translate(\"tooltips\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\"\n }\n )));\n this.addWidget(seriesTooltipsToggle);\n }\n initLineColor() {\n const seriesLineColorPicker = this.createBean(new AgColorPicker(this.chartMenuUtils.getDefaultColorPickerParams(\n \"stroke\",\n \"strokeColor\"\n )));\n this.addWidget(seriesLineColorPicker);\n }\n initStrokeWidth(labelKey) {\n const seriesStrokeWidthSlider = this.createBean(new AgSlider7(this.chartMenuUtils.getDefaultSliderParams(\n \"strokeWidth\",\n labelKey,\n 10\n )));\n this.addWidget(seriesStrokeWidthSlider);\n }\n initLineDash() {\n const seriesLineDashSlider = this.createBean(new AgSlider7(this.chartMenuUtils.getDefaultSliderParams(\n \"lineDash\",\n \"lineDash\",\n 30,\n true\n )));\n this.addWidget(seriesLineDashSlider);\n }\n initLineOpacity() {\n const params = this.chartMenuUtils.getDefaultSliderParams(\n \"strokeOpacity\",\n \"strokeOpacity\",\n 1\n );\n params.step = 0.05;\n const seriesLineOpacitySlider = this.createBean(new AgSlider7(params));\n this.addWidget(seriesLineOpacitySlider);\n }\n initFillOpacity() {\n const params = this.chartMenuUtils.getDefaultSliderParams(\n \"fillOpacity\",\n \"fillOpacity\",\n 1\n );\n params.step = 0.05;\n const seriesFillOpacitySlider = this.createBean(new AgSlider7(params));\n this.addWidget(seriesFillOpacitySlider);\n }\n initLabels() {\n const isPieChart = isPieChartSeries(this.seriesType);\n const seriesOptionLabelProperty = isPieChart ? \"calloutLabel\" : \"label\";\n const labelKey = isPieChart ? \"calloutLabels\" : \"labels\";\n const labelParams = this.chartMenuUtils.getDefaultFontPanelParams(seriesOptionLabelProperty, labelKey);\n const labelPanelComp = this.createBean(new FontPanel(labelParams));\n if (isPieChart) {\n const calloutPanelComp = this.createBean(new CalloutPanel(this.chartMenuUtils));\n labelPanelComp.addCompToPanel(calloutPanelComp);\n this.activePanels.push(calloutPanelComp);\n }\n this.addWidget(labelPanelComp);\n if (isPieChart) {\n const sectorParams = this.chartMenuUtils.getDefaultFontPanelParams(\"sectorLabel\", \"sectorLabels\");\n const sectorPanelComp = this.createBean(new FontPanel(sectorParams));\n const positionRatioComp = this.getSectorLabelPositionRatio();\n sectorPanelComp.addCompToPanel(positionRatioComp);\n this.addWidget(sectorPanelComp);\n }\n if (this.seriesType === \"range-bar\") {\n const options = [\n { value: \"inside\", text: this.translate(\"inside\") },\n { value: \"outside\", text: this.translate(\"outside\") }\n ];\n const placementSelect = labelPanelComp.createManagedBean(new AgSelect8(this.chartMenuUtils.addValueParams(\n \"label.placement\",\n {\n label: this.translate(\"labelPlacement\"),\n labelAlignment: \"left\",\n labelWidth: \"flex\",\n inputWidth: \"flex\",\n options\n }\n )));\n labelPanelComp.addCompToPanel(placementSelect);\n this.activePanels.push(placementSelect);\n const paddingSlider = labelPanelComp.createManagedBean(new AgSlider7(this.chartMenuUtils.getDefaultSliderParams(\n \"label.padding\",\n \"padding\",\n 200\n )));\n labelPanelComp.addCompToPanel(paddingSlider);\n this.activePanels.push(paddingSlider);\n }\n }\n getSectorLabelPositionRatio() {\n const params = this.chartMenuUtils.getDefaultSliderParams(\n \"sectorLabel.positionRatio\",\n \"positionRatio\",\n 1\n );\n params.step = 0.05;\n return this.createBean(new AgSlider7(params));\n }\n initShadow() {\n const shadowPanelComp = this.createBean(new ShadowPanel(this.chartMenuUtils));\n this.addWidget(shadowPanelComp);\n }\n initMarkers() {\n const markersPanelComp = this.createBean(new MarkersPanel(this.chartOptionsService, this.chartMenuUtils));\n this.addWidget(markersPanelComp);\n }\n initBins() {\n var _a;\n const params = this.chartMenuUtils.getDefaultSliderParams(\"binCount\", \"histogramBinCount\", 20);\n const value = ((_a = this.chartOptions.getValue(\"bins\")) != null ? _a : this.chartOptions.getValue(\"calculatedBins\", true)).length;\n params.value = `${value}`;\n params.maxValue = Math.max(value, 20);\n const seriesBinCountSlider = this.createBean(new AgSlider7(params));\n this.addWidget(seriesBinCountSlider);\n }\n initWhiskers() {\n const whiskersPanelComp = this.createBean(new WhiskersPanel(this.chartMenuUtils));\n this.addWidget(whiskersPanelComp);\n }\n initCaps() {\n const capsPanelComp = this.createBean(new CapsPanel(this.chartMenuUtils));\n this.addWidget(capsPanelComp);\n }\n initConnectorLine() {\n const connectorLinePanelComp = this.createBean(new ConnectorLinePanel(this.chartMenuUtils));\n this.addWidget(connectorLinePanelComp);\n }\n initSeriesItemsPanel() {\n const seriesItemsPanelComp = this.createBean(new SeriesItemsPanel(this.chartMenuUtils));\n this.addWidget(seriesItemsPanelComp);\n }\n initTileSpacingPanel() {\n const tileSpacingPanelComp = this.createBean(new TileSpacingPanel(this.chartMenuUtils));\n this.addWidget(tileSpacingPanelComp);\n }\n initGroupType() {\n const groupTypeSelect = this.createBean(new AgSelect8({\n label: this.chartTranslationService.translate(\"seriesGroupType\"),\n options: ChartMappings2.SERIES_GROUP_TYPES.map((value) => ({\n value,\n text: this.chartTranslationService.translate(`${value}SeriesGroupType`)\n })),\n value: this.chartController.getSeriesGroupType(),\n onValueChange: (value) => this.chartController.setSeriesGroupType(value)\n }));\n this.addWidget(groupTypeSelect);\n }\n addWidget(widget) {\n this.seriesGroup.addItem(widget);\n this.activePanels.push(widget);\n }\n getSeriesSelectOptions() {\n const activeSeriesTypes = this.getActiveSeriesTypes();\n return [\"area\", \"bar\", \"line\"].filter((seriesType) => activeSeriesTypes.includes(seriesType)).map((value) => ({ value, text: this.translate(value) }));\n }\n updateSeriesType() {\n const activeSeriesTypes = this.getActiveSeriesTypes();\n const invalidSeriesType = !activeSeriesTypes.includes(this.seriesType);\n if (invalidSeriesType && activeSeriesTypes.length > 0) {\n this.seriesType = activeSeriesTypes[0];\n }\n }\n getActiveSeriesTypes() {\n return this.chartController.getActiveSeriesChartTypes().map((s) => getSeriesType(s.chartType));\n }\n translate(key) {\n return this.chartTranslationService.translate(key);\n }\n destroyActivePanels() {\n this.activePanels.forEach((panel) => {\n _222.removeFromParent(panel.getGui());\n this.destroyBean(panel);\n });\n }\n destroy() {\n this.destroyActivePanels();\n super.destroy();\n }\n};\n_SeriesPanel.TEMPLATE = /* html */\n`
\n \n \n
`;\n__decorateClass4([\n RefSelector9(\"seriesGroup\")\n], _SeriesPanel.prototype, \"seriesGroup\", 2);\n__decorateClass4([\n Autowired31(\"chartTranslationService\")\n], _SeriesPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct30\n], _SeriesPanel.prototype, \"init\", 1);\nvar SeriesPanel = _SeriesPanel;\nvar _GradientLegendPanel = class _GradientLegendPanel2 extends Component26 {\n constructor({ chartMenuParamsFactory: chartMenuUtils, isExpandedOnInit = false }) {\n super();\n this.chartMenuUtils = chartMenuUtils;\n this.isExpandedOnInit = isExpandedOnInit;\n }\n init() {\n const legendGroupParams = this.chartMenuUtils.addEnableParams(\n \"gradientLegend.enabled\",\n {\n cssIdentifier: \"charts-format-top-level\",\n direction: \"vertical\",\n title: this.chartTranslationService.translate(\"legend\"),\n suppressEnabledCheckbox: false,\n suppressToggleExpandOnEnableChange: true,\n expanded: this.isExpandedOnInit,\n items: [this.createLabelPanel()]\n }\n );\n this.setTemplate(_GradientLegendPanel2.TEMPLATE, {\n legendGroup: legendGroupParams,\n legendPositionSelect: this.chartMenuUtils.getDefaultLegendParams(\"gradientLegend.position\"),\n gradientReverseCheckbox: this.getGradientReverseCheckboxParams(),\n gradientThicknessSlider: this.chartMenuUtils.getDefaultSliderParams(\"gradientLegend.gradient.thickness\", \"thickness\", 40),\n gradientPreferredLengthSlider: this.chartMenuUtils.getDefaultSliderParams(\"gradientLegend.gradient.preferredLength\", \"preferredLength\", 300),\n legendSpacingSlider: this.chartMenuUtils.getDefaultSliderParams(\"gradientLegend.spacing\", \"spacing\", 200)\n });\n }\n getGradientReverseCheckboxParams() {\n return this.chartMenuUtils.addValueParams(\n \"gradientLegend.reverseOrder\",\n {\n label: this.chartTranslationService.translate(\"reverseDirection\"),\n labelWidth: \"flex\"\n }\n );\n }\n createLabelPanel() {\n const params = {\n enabled: true,\n suppressEnabledCheckbox: true,\n chartMenuUtils: this.chartMenuUtils,\n keyMapper: (key) => `gradientLegend.scale.label.${key}`\n };\n return this.createManagedBean(new FontPanel(params));\n }\n};\n_GradientLegendPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired322(\"chartTranslationService\")\n], _GradientLegendPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct31\n], _GradientLegendPanel.prototype, \"init\", 1);\nvar GradientLegendPanel = _GradientLegendPanel;\nvar ChartPanelFeature = class extends BeanStub72 {\n constructor(chartController, eGui, cssClass, createPanels) {\n super();\n this.chartController = chartController;\n this.eGui = eGui;\n this.cssClass = cssClass;\n this.createPanels = createPanels;\n this.panels = [];\n }\n postConstruct() {\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_UPDATED, () => this.refreshPanels(true));\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_API_UPDATE, () => this.refreshPanels(false));\n }\n addComponent(component) {\n this.createBean(component);\n this.panels.push(component);\n component.addCssClass(this.cssClass);\n this.eGui.appendChild(component.getGui());\n }\n refreshPanels(reuse) {\n const chartType = this.chartController.getChartType();\n const isGrouping = this.chartController.isGrouping();\n const seriesType = getSeriesType(chartType);\n if (reuse && chartType === this.chartType && isGrouping === this.isGrouping) {\n return;\n }\n this.destroyPanels();\n this.createPanels(chartType, seriesType);\n this.chartType = chartType;\n this.isGrouping = isGrouping;\n }\n destroyPanels() {\n this.panels.forEach((panel) => {\n _242.removeFromParent(panel.getGui());\n this.destroyBean(panel);\n });\n this.panels = [];\n }\n destroy() {\n this.destroyPanels();\n super.destroy();\n }\n};\n__decorateClass4([\n PostConstruct322\n], ChartPanelFeature.prototype, \"postConstruct\", 1);\nvar DefaultFormatPanelDef = {\n groups: [\n { type: \"chart\" },\n { type: \"legend\" },\n { type: \"series\" },\n { type: \"axis\" }\n ]\n};\nvar _FormatPanel = class _FormatPanel2 extends Component28 {\n constructor(chartMenuContext) {\n super(_FormatPanel2.TEMPLATE);\n this.chartMenuContext = chartMenuContext;\n }\n init() {\n this.chartPanelFeature = this.createManagedBean(new ChartPanelFeature(\n this.chartMenuContext.chartController,\n this.getGui(),\n \"ag-chart-format-section\",\n (chartType, seriesType) => this.createPanels(chartType, seriesType)\n ));\n this.chartPanelFeature.refreshPanels();\n }\n createPanels(chartType, seriesType) {\n var _a;\n (_a = this.getFormatPanelDef().groups) == null ? void 0 : _a.forEach((groupDef) => {\n const group = groupDef.type;\n if (!this.isGroupPanelShownInSeries(group, seriesType)) {\n return;\n }\n const opts = __spreadProps3(__spreadValues3({}, this.chartMenuContext), {\n isExpandedOnInit: groupDef.isOpen,\n seriesType\n });\n switch (group) {\n case \"chart\":\n this.chartPanelFeature.addComponent(new ChartPanel(opts));\n break;\n case \"legend\":\n const panel = [\"treemap\", \"sunburst\", \"heatmap\"].includes(chartType) ? new GradientLegendPanel(opts) : new LegendPanel(opts);\n this.chartPanelFeature.addComponent(panel);\n break;\n case \"axis\":\n if (isPolar(seriesType)) {\n this.chartPanelFeature.addComponent(new PolarAxisPanel(opts));\n } else if (isCartesian(seriesType)) {\n this.chartPanelFeature.addComponent(new CartesianAxisPanel(\"xAxis\", opts));\n this.chartPanelFeature.addComponent(new CartesianAxisPanel(\"yAxis\", opts));\n }\n break;\n case \"horizontalAxis\":\n this.chartPanelFeature.addComponent(new CartesianAxisPanel(\"xAxis\", opts));\n break;\n case \"verticalAxis\":\n this.chartPanelFeature.addComponent(new CartesianAxisPanel(\"yAxis\", opts));\n break;\n case \"series\":\n this.chartPanelFeature.addComponent(new SeriesPanel(opts));\n break;\n case \"navigator\":\n _25.warnOnce(`'navigator' is now displayed in the charts advanced settings instead of the format panel, and this setting will be ignored.`);\n default:\n _25.warnOnce(`Invalid charts format panel group name supplied: '${groupDef.type}'`);\n }\n });\n }\n getFormatPanelDef() {\n var _a;\n const userProvidedFormatPanelDef = (_a = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _a.formatPanel;\n return userProvidedFormatPanelDef ? userProvidedFormatPanelDef : DefaultFormatPanelDef;\n }\n isGroupPanelShownInSeries(group, seriesType) {\n return [\"chart\", \"legend\", \"series\"].includes(group) || isCartesian(seriesType) && [\"axis\", \"horizontalAxis\", \"verticalAxis\"].includes(group) || isPolar(seriesType) && group === \"axis\";\n }\n};\n_FormatPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n PostConstruct33\n], _FormatPanel.prototype, \"init\", 1);\nvar FormatPanel = _FormatPanel;\nvar CANVAS_CLASS = \"ag-chart-mini-thumbnail-canvas\";\nvar ERROR_MESSAGE = \"AG Grid - chart update failed\";\nvar MiniChart = class extends Component29 {\n constructor(container, tooltipName) {\n super();\n this.tooltipName = tooltipName;\n this.size = 58;\n this.padding = 5;\n this.root = new _Scene.Group();\n const scene = new _Scene.Scene({\n width: this.size,\n height: this.size\n });\n scene.canvas.element.classList.add(CANVAS_CLASS);\n scene.setRoot(this.root);\n scene.setContainer(container);\n this.scene = scene;\n }\n init() {\n this.scene.canvas.element.title = this.chartTranslationService.translate(this.tooltipName);\n this.scene.render().catch((e) => {\n console.error(`${ERROR_MESSAGE}`, e);\n });\n }\n};\n__decorateClass4([\n Autowired332(\"chartTranslationService\")\n], MiniChart.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct34\n], MiniChart.prototype, \"init\", 1);\nvar MiniChartWithAxes = class extends MiniChart {\n constructor(container, tooltipName) {\n super(container, tooltipName);\n this.stroke = \"gray\";\n this.axisOvershoot = 3;\n }\n addAxes() {\n const size = this.size;\n const padding = this.padding;\n const leftAxis = new _Scene2.Line();\n leftAxis.x1 = padding;\n leftAxis.y1 = padding;\n leftAxis.x2 = padding;\n leftAxis.y2 = size - padding + this.axisOvershoot;\n leftAxis.stroke = this.stroke;\n const bottomAxis = new _Scene2.Line();\n bottomAxis.x1 = padding - this.axisOvershoot + 1;\n bottomAxis.y1 = size - padding;\n bottomAxis.x2 = size - padding + 1;\n bottomAxis.y2 = size - padding;\n bottomAxis.stroke = this.stroke;\n const root = this.root;\n root.append(leftAxis);\n root.append(bottomAxis);\n }\n};\n__decorateClass4([\n PostConstruct35\n], MiniChartWithAxes.prototype, \"addAxes\", 1);\nfunction createColumnRects(params) {\n const { stacked, size, padding, xScalePadding, xScaleDomain, yScaleDomain } = params;\n const xScale = new _Scene3.BandScale();\n xScale.domain = xScaleDomain;\n xScale.range = [padding, size - padding];\n xScale.paddingInner = xScalePadding;\n xScale.paddingOuter = xScalePadding;\n const yScale = new _Scene3.LinearScale();\n yScale.domain = yScaleDomain;\n yScale.range = [size - padding, padding];\n const createBars = (series, xScale2, yScale2) => {\n return series.map((datum, i) => {\n const top = yScale2.convert(datum);\n const rect = new _Scene3.Rect();\n rect.x = xScale2.convert(i);\n rect.y = top;\n rect.width = xScale2.bandwidth;\n rect.height = yScale2.convert(0) - top;\n rect.strokeWidth = 0;\n rect.crisp = true;\n return rect;\n });\n };\n if (stacked) {\n return params.data.map((d) => createBars(d, xScale, yScale));\n }\n return createBars(params.data, xScale, yScale);\n}\nfunction createLinePaths(root, data, size, padding) {\n const xScale = new _Scene3.LinearScale();\n xScale.domain = [0, 4];\n xScale.range = [padding, size - padding];\n const yScale = new _Scene3.LinearScale();\n yScale.domain = [0, 10];\n yScale.range = [size - padding, padding];\n const lines = data.map((series) => {\n const line = new _Scene3.Path();\n line.strokeWidth = 3;\n line.lineCap = \"round\";\n line.fill = void 0;\n series.forEach((datum, i) => {\n line.path[i > 0 ? \"lineTo\" : \"moveTo\"](xScale.convert(i), yScale.convert(datum));\n });\n return line;\n });\n const linesGroup = new _Scene3.Group();\n linesGroup.setClipRectInGroupCoordinateSpace(\n new _Scene3.BBox(padding, padding, size - padding * 2, size - padding * 2)\n );\n linesGroup.append(lines);\n root.append(linesGroup);\n return lines;\n}\nfunction createPolarPaths(root, data, size, radius, innerRadius, markerSize = 0) {\n const angleScale = new _Scene3.LinearScale();\n angleScale.domain = [0, 7];\n angleScale.range = [-Math.PI, Math.PI].map((angle) => angle + Math.PI / 2);\n const radiusScale = new _Scene3.LinearScale();\n radiusScale.domain = [0, 10];\n radiusScale.range = [radius, innerRadius];\n const markers = [];\n const paths = data.map((series) => {\n const path = new _Scene3.Path();\n path.strokeWidth = 1;\n path.strokeOpacity = 0.5;\n path.lineCap = \"round\";\n path.fill = void 0;\n path.fillOpacity = 0.8;\n series.forEach((datum, i) => {\n const angle = angleScale.convert(i);\n const r = radius + innerRadius - radiusScale.convert(datum);\n const x = r * Math.cos(angle);\n const y = r * Math.sin(angle);\n path.path[i > 0 ? \"lineTo\" : \"moveTo\"](x, y);\n if (markerSize > 0) {\n const marker = new _Scene3.Circle();\n marker.x = x;\n marker.y = y;\n marker.size = markerSize;\n markers.push(marker);\n }\n });\n path.path.closePath();\n return path;\n });\n const group = new _Scene3.Group();\n const center = size / 2;\n group.translationX = center;\n group.translationY = center;\n group.append([...paths, ...markers]);\n root.append(group);\n return { paths, markers };\n}\nfunction accumulateData(data) {\n let [min, max] = [Infinity, -Infinity];\n const processedData = data.reduce((acc, curr, currIndex) => {\n var _a;\n const previous = currIndex > 0 ? acc[currIndex - 1] : void 0;\n (_a = acc[currIndex]) != null ? _a : acc[currIndex] = [];\n const current = acc[currIndex];\n curr.forEach((datum, datumIndex) => {\n if (previous) {\n datum += previous[datumIndex];\n }\n current[datumIndex] = datum;\n if (current[datumIndex] < min) {\n min = current[datumIndex];\n }\n if (current[datumIndex] > max) {\n max = current[datumIndex];\n }\n });\n return acc;\n }, []);\n return { processedData, min, max };\n}\nvar MiniColumn = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"groupedColumnTooltip\");\n this.columnData = [2, 3, 4];\n const { root, columnData, size, padding } = this;\n this.columns = createColumnRects({\n stacked: false,\n root,\n data: columnData,\n size,\n padding,\n xScaleDomain: [0, 1, 2],\n yScaleDomain: [0, 4],\n xScalePadding: 0.3\n });\n root.append(this.columns);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.columns.forEach((column, i) => {\n column.fill = fills[i];\n column.stroke = strokes[i];\n });\n }\n};\nMiniColumn.chartType = \"groupedColumn\";\nvar _MiniStackedColumn = class _MiniStackedColumn2 extends MiniChartWithAxes {\n constructor(container, fills, strokes, _themeTemplateParameters, _isCustomTheme, data = _MiniStackedColumn2.data, yScaleDomain = [0, 16], tooltipName = \"stackedColumnTooltip\") {\n super(container, tooltipName);\n const { root, size, padding } = this;\n this.stackedColumns = createColumnRects({\n stacked: true,\n root,\n data,\n size,\n padding,\n xScaleDomain: [0, 1, 2],\n yScaleDomain,\n xScalePadding: 0.3\n });\n root.append([].concat.apply([], this.stackedColumns));\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.stackedColumns.forEach(\n (series, i) => series.forEach((column) => {\n column.fill = fills[i];\n column.stroke = strokes[i];\n })\n );\n }\n};\n_MiniStackedColumn.chartType = \"stackedColumn\";\n_MiniStackedColumn.data = [\n [8, 12, 16],\n [6, 9, 12],\n [2, 3, 4]\n];\nvar MiniStackedColumn = _MiniStackedColumn;\nvar _MiniNormalizedColumn = class _MiniNormalizedColumn2 extends MiniStackedColumn {\n constructor(container, fills, strokes, themeTemplateParameters, isCustomTheme) {\n super(container, fills, strokes, themeTemplateParameters, isCustomTheme, _MiniNormalizedColumn2.data, [0, 10], \"normalizedColumnTooltip\");\n }\n};\n_MiniNormalizedColumn.chartType = \"normalizedColumn\";\n_MiniNormalizedColumn.data = [\n [10, 10, 10],\n [6, 7, 8],\n [2, 4, 6]\n];\nvar MiniNormalizedColumn = _MiniNormalizedColumn;\nvar MiniBar = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"groupedBarTooltip\");\n const padding = this.padding;\n const size = this.size;\n const data = [2, 3, 4];\n const yScale = new _Scene4.BandScale();\n yScale.domain = [0, 1, 2];\n yScale.range = [padding, size - padding];\n yScale.paddingInner = 0.3;\n yScale.paddingOuter = 0.3;\n const xScale = new _Scene4.LinearScale();\n xScale.domain = [0, 4];\n xScale.range = [size - padding, padding];\n const bottom = xScale.convert(0);\n const height = yScale.bandwidth;\n this.bars = data.map((datum, i) => {\n const rect = new _Scene4.Rect();\n rect.x = padding;\n rect.y = yScale.convert(i);\n rect.width = bottom - xScale.convert(datum);\n rect.height = height;\n rect.strokeWidth = 0;\n rect.crisp = true;\n return rect;\n });\n this.updateColors(fills, strokes);\n this.root.append(this.bars);\n }\n updateColors(fills, strokes) {\n this.bars.forEach((bar, i) => {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n }\n};\nMiniBar.chartType = \"groupedBar\";\nvar _MiniStackedBar = class _MiniStackedBar2 extends MiniChartWithAxes {\n constructor(container, fills, strokes, _themeTemplateParameters, _isCustomTheme, data = _MiniStackedBar2.data, xScaleDomain = [0, 16], tooltipName = \"stackedBarTooltip\") {\n super(container, tooltipName);\n const size = this.size;\n const padding = this.padding;\n const yScale = new _Scene5.BandScale();\n yScale.domain = [0, 1, 2];\n yScale.range = [padding, size - padding];\n yScale.paddingInner = 0.3;\n yScale.paddingOuter = 0.3;\n const xScale = new _Scene5.LinearScale();\n xScale.domain = xScaleDomain;\n xScale.range = [size - padding, padding];\n const bottom = xScale.convert(0);\n const height = yScale.bandwidth;\n this.bars = data.map(\n (series) => series.map((datum, i) => {\n const rect = new _Scene5.Rect();\n rect.x = padding;\n rect.y = yScale.convert(i);\n rect.width = bottom - xScale.convert(datum);\n rect.height = height;\n rect.strokeWidth = 0;\n rect.crisp = true;\n return rect;\n })\n );\n this.updateColors(fills, strokes);\n this.root.append([].concat.apply([], this.bars));\n }\n updateColors(fills, strokes) {\n this.bars.forEach(\n (series, i) => series.forEach((bar) => {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n })\n );\n }\n};\n_MiniStackedBar.chartType = \"stackedBar\";\n_MiniStackedBar.data = [\n [8, 12, 16],\n [6, 9, 12],\n [2, 3, 4]\n];\nvar MiniStackedBar = _MiniStackedBar;\nvar _MiniNormalizedBar = class _MiniNormalizedBar2 extends MiniStackedBar {\n constructor(container, fills, strokes, themeTemplateParameters, isCustomTheme) {\n super(container, fills, strokes, themeTemplateParameters, isCustomTheme, _MiniNormalizedBar2.data, [0, 10], \"normalizedBarTooltip\");\n }\n};\n_MiniNormalizedBar.chartType = \"normalizedBar\";\n_MiniNormalizedBar.data = [\n [10, 10, 10],\n [6, 7, 8],\n [2, 4, 6]\n];\nvar MiniNormalizedBar = _MiniNormalizedBar;\nvar toRadians = _Scene6.toRadians;\nvar MiniDonut = class extends MiniChart {\n constructor(container, fills, strokes, _themeTemplateParameters, _isCustomTheme, centerRadiusScaler = 0.6, tooltipName = \"donutTooltip\") {\n super(container, tooltipName);\n const radius = (this.size - this.padding * 2) / 2;\n const center = radius + this.padding;\n const angles = [\n [toRadians(-90), toRadians(30)],\n [toRadians(30), toRadians(120)],\n [toRadians(120), toRadians(180)],\n [toRadians(180), toRadians(210)],\n [toRadians(210), toRadians(240)],\n [toRadians(240), toRadians(270)]\n ];\n this.sectors = angles.map(([startAngle, endAngle]) => {\n const sector = new _Scene6.Sector();\n sector.centerX = center;\n sector.centerY = center;\n sector.innerRadius = radius * centerRadiusScaler;\n sector.outerRadius = radius;\n sector.startAngle = startAngle;\n sector.endAngle = endAngle;\n sector.stroke = void 0;\n sector.strokeWidth = 0;\n sector.inset = 0.75;\n return sector;\n });\n this.updateColors(fills, strokes);\n this.root.append(this.sectors);\n }\n updateColors(fills, strokes) {\n this.sectors.forEach((sector, i) => {\n sector.fill = fills[i % fills.length];\n sector.stroke = strokes[i % strokes.length];\n });\n }\n};\nMiniDonut.chartType = \"donut\";\nvar MiniPie = class extends MiniDonut {\n constructor(container, fills, strokes, themeTemplateParameters, isCustomTheme) {\n super(container, fills, strokes, themeTemplateParameters, isCustomTheme, 0, \"pieTooltip\");\n }\n};\nMiniPie.chartType = \"pie\";\nvar MiniLine = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"lineTooltip\");\n this.data = [\n [9, 7, 8, 5, 6],\n [5, 6, 3, 4, 1],\n [1, 3, 4, 8, 7]\n ];\n this.lines = createLinePaths(this.root, this.data, this.size, this.padding);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.lines.forEach((line, i) => {\n line.stroke = fills[i];\n });\n }\n};\nMiniLine.chartType = \"line\";\nvar MiniScatter = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"scatterTooltip\");\n const size = this.size;\n const padding = this.padding;\n const data = [\n [[0.3, 3], [1.1, 0.9], [2, 0.4], [3.4, 2.4]],\n [[0, 0.3], [1, 2], [2.4, 1.4], [3, 0]]\n ];\n const xScale = new _Scene7.LinearScale();\n xScale.domain = [-0.5, 4];\n xScale.range = [padding * 2, size - padding];\n const yScale = new _Scene7.LinearScale();\n yScale.domain = [-0.5, 3.5];\n yScale.range = [size - padding, padding];\n const points = [];\n data.forEach((series) => {\n series.forEach(([x, y]) => {\n const arc = new _Scene7.Arc();\n arc.strokeWidth = 0;\n arc.centerX = xScale.convert(x);\n arc.centerY = yScale.convert(y);\n arc.radius = 2.5;\n points.push(arc);\n });\n });\n this.points = points;\n this.updateColors(fills, strokes);\n const pointsGroup = new _Scene7.Group();\n pointsGroup.setClipRectInGroupCoordinateSpace(new _Scene7.BBox(padding, padding, size - padding * 2, size - padding * 2));\n pointsGroup.append(this.points);\n this.root.append(pointsGroup);\n }\n updateColors(fills, strokes) {\n this.points.forEach((line, i) => {\n line.stroke = strokes[i % strokes.length];\n line.fill = fills[i % fills.length];\n });\n }\n};\nMiniScatter.chartType = \"scatter\";\nvar MiniBubble = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"bubbleTooltip\");\n const size = this.size;\n const padding = this.padding;\n const data = [\n [[0.1, 0.3, 5], [0.5, 0.4, 7], [0.2, 0.8, 7]],\n [[0.8, 0.7, 5], [0.7, 0.3, 9]]\n ];\n const xScale = new _Scene8.LinearScale();\n xScale.domain = [0, 1];\n xScale.range = [padding * 2, size - padding];\n const yScale = new _Scene8.LinearScale();\n yScale.domain = [0, 1];\n yScale.range = [size - padding, padding];\n const points = [];\n data.forEach((series) => {\n series.forEach(([x, y, radius]) => {\n const arc = new _Scene8.Arc();\n arc.strokeWidth = 0;\n arc.centerX = xScale.convert(x);\n arc.centerY = yScale.convert(y);\n arc.radius = radius;\n arc.fillOpacity = 0.7;\n points.push(arc);\n });\n });\n this.points = points;\n this.updateColors(fills, strokes);\n const pointsGroup = new _Scene8.Group();\n pointsGroup.setClipRectInGroupCoordinateSpace(new _Scene8.BBox(padding, padding, size - padding * 2, size - padding * 2));\n pointsGroup.append(this.points);\n this.root.append(pointsGroup);\n }\n updateColors(fills, strokes) {\n this.points.forEach((line, i) => {\n line.stroke = strokes[i % strokes.length];\n line.fill = fills[i % fills.length];\n });\n }\n};\nMiniBubble.chartType = \"bubble\";\nvar _MiniArea = class _MiniArea2 extends MiniChartWithAxes {\n constructor(container, fills, strokes, _themeTemplateParameters, _isCustomTheme, data = _MiniArea2.data) {\n super(container, \"groupedAreaTooltip\");\n const size = this.size;\n const padding = this.padding;\n const xScale = new _Scene9.BandScale();\n xScale.domain = [0, 1, 2];\n xScale.paddingInner = 1;\n xScale.paddingOuter = 0;\n xScale.range = [padding + 0.5, size - padding - 0.5];\n const yScale = new _Scene9.LinearScale();\n yScale.domain = [0, 6];\n yScale.range = [size - padding + 0.5, padding];\n const xCount = data.length;\n const last = xCount * 2 - 1;\n const pathData = [];\n const bottomY = yScale.convert(0);\n data.forEach((datum, i) => {\n const x = xScale.convert(i);\n datum.forEach((yDatum, j) => {\n const y = yScale.convert(yDatum);\n const points = pathData[j] || (pathData[j] = []);\n points[i] = {\n x,\n y\n };\n points[last - i] = {\n x,\n y: bottomY\n };\n });\n });\n this.areas = pathData.reverse().map((points) => {\n const area = new _Scene9.Path();\n area.strokeWidth = 1;\n area.strokeOpacity = 0.75;\n area.fillOpacity = 0.7;\n const path = area.path;\n path.clear();\n points.forEach((point, i) => path[i > 0 ? \"lineTo\" : \"moveTo\"](point.x, point.y));\n path.closePath();\n return area;\n });\n this.updateColors(fills, strokes);\n this.root.append(this.areas);\n }\n updateColors(fills, strokes) {\n this.areas.forEach((area, i) => {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n }\n};\n_MiniArea.chartType = \"area\";\n_MiniArea.data = [\n [1, 3, 5],\n [2, 6, 4],\n [5, 3, 1]\n];\nvar MiniArea = _MiniArea;\nvar _MiniStackedArea = class _MiniStackedArea2 extends MiniChartWithAxes {\n constructor(container, fills, strokes, _themeTemplateParameters, _isCustomTheme, data = _MiniStackedArea2.data, tooltipName = \"stackedAreaTooltip\") {\n super(container, tooltipName);\n const size = this.size;\n const padding = this.padding;\n const xScale = new _Scene10.BandScale();\n xScale.domain = [0, 1, 2];\n xScale.paddingInner = 1;\n xScale.paddingOuter = 0;\n xScale.range = [padding + 0.5, size - padding - 0.5];\n const yScale = new _Scene10.LinearScale();\n yScale.domain = [0, 16];\n yScale.range = [size - padding + 0.5, padding + 0.5];\n const xCount = data.length;\n const last = xCount * 2 - 1;\n const pathData = [];\n data.forEach((datum, i) => {\n const x = xScale.convert(i);\n let total = 0;\n datum.forEach((yDatum, j) => {\n const y = yScale.convert(total + yDatum);\n const points = pathData[j] || (pathData[j] = []);\n points[i] = {\n x,\n y\n };\n points[last - i] = {\n x,\n y: yScale.convert(total)\n // bottom y\n };\n total += yDatum;\n });\n });\n this.areas = pathData.map((points) => {\n const area = new _Scene10.Path();\n area.strokeWidth = 0;\n const path = area.path;\n path.clear();\n points.forEach((point, i) => path[i > 0 ? \"lineTo\" : \"moveTo\"](point.x, point.y));\n path.closePath();\n return area;\n });\n this.updateColors(fills, strokes);\n this.root.append(this.areas);\n }\n updateColors(fills, strokes) {\n this.areas.forEach((area, i) => {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n }\n};\n_MiniStackedArea.chartType = \"stackedArea\";\n_MiniStackedArea.data = [\n [2, 3, 2],\n [3, 6, 5],\n [6, 2, 2]\n];\nvar MiniStackedArea = _MiniStackedArea;\nvar _MiniNormalizedArea = class _MiniNormalizedArea2 extends MiniStackedArea {\n constructor(container, fills, strokes, themeTemplateParameters, isCustomTheme, data = _MiniNormalizedArea2.data) {\n super(container, fills, strokes, themeTemplateParameters, isCustomTheme, data, \"normalizedAreaTooltip\");\n }\n};\n_MiniNormalizedArea.chartType = \"normalizedArea\";\n_MiniNormalizedArea.data = MiniStackedArea.data.map((stack) => {\n const sum = stack.reduce((p, c) => p + c, 0);\n return stack.map((v) => v / sum * 16);\n});\nvar MiniNormalizedArea = _MiniNormalizedArea;\nvar MiniHistogram = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"histogramTooltip\");\n const padding = this.padding;\n const size = this.size;\n const data = [2, 5, 11, 13, 10, 6, 1];\n const xScale = new _Scene11.LinearScale();\n xScale.domain = [0, data.length];\n xScale.range = [padding, size - padding];\n const yScale = new _Scene11.LinearScale();\n yScale.domain = [0, data.reduce((a, b) => Math.max(a, b), 0)];\n yScale.range = [size - padding, padding];\n const bottom = yScale.convert(0);\n this.bars = data.map((datum, i) => {\n const top = yScale.convert(datum);\n const left = xScale.convert(i);\n const right = xScale.convert(i + 1);\n const rect = new _Scene11.Rect();\n rect.x = left;\n rect.y = top;\n rect.width = right - left;\n rect.height = bottom - top;\n rect.strokeWidth = 1;\n rect.strokeOpacity = 0.75;\n rect.crisp = true;\n return rect;\n });\n this.updateColors(fills, strokes);\n this.root.append(this.bars);\n }\n updateColors([fill], [stroke]) {\n this.bars.forEach((bar) => {\n bar.fill = fill;\n bar.stroke = stroke;\n });\n }\n};\nMiniHistogram.chartType = \"histogram\";\nvar MiniChartWithPolarAxes = class extends MiniChart {\n constructor(container, tooltipName) {\n super(container, tooltipName);\n this.stroke = \"gray\";\n this.showRadiusAxisLine = true;\n this.showAngleAxisLines = true;\n }\n addAxes() {\n const size = this.size;\n const padding = this.padding;\n const combinedPadding = padding * 2;\n const axisLineRadius = (size - combinedPadding) / 2;\n const gridRadii = this.showAngleAxisLines ? [\n axisLineRadius,\n axisLineRadius * 0.8,\n axisLineRadius * 0.6,\n axisLineRadius * 0.4\n ] : [];\n const radiusAxisLine = new _Scene12.Line();\n radiusAxisLine.x1 = size / 2;\n radiusAxisLine.y1 = padding;\n radiusAxisLine.x2 = size / 2;\n radiusAxisLine.y2 = size - padding - axisLineRadius - gridRadii[gridRadii.length - 1];\n radiusAxisLine.stroke = this.stroke;\n radiusAxisLine.strokeOpacity = 0.5;\n radiusAxisLine.fill = void 0;\n radiusAxisLine.visible = this.showRadiusAxisLine;\n const x = padding + axisLineRadius;\n this.gridLines = gridRadii.map((radius, index) => {\n const gridLine = new _Scene12.Path();\n gridLine.path.arc(x, x, radius, 0, 2 * Math.PI);\n gridLine.strokeWidth = 1;\n gridLine.stroke = this.stroke;\n gridLine.strokeOpacity = index === 0 ? 0.5 : 0.2;\n gridLine.fill = void 0;\n return gridLine;\n });\n const root = this.root;\n root.append(radiusAxisLine);\n if (this.gridLines.length > 0)\n root.append(this.gridLines);\n }\n};\n__decorateClass4([\n PostConstruct36\n], MiniChartWithPolarAxes.prototype, \"addAxes\", 1);\nvar MiniRadialColumn = class extends MiniChartWithPolarAxes {\n constructor(container, fills, strokes) {\n super(container, \"radialColumnTooltip\");\n this.data = [\n [6, 8, 10, 2, 6, 5],\n [4, 4, 3, 6, 4, 4],\n [5, 4, 2, 9, 8, 9]\n ];\n this.showRadiusAxisLine = false;\n const { padding, size, data } = this;\n const radius = (size - padding * 2) / 2;\n const innerRadiusRatio = 0.4;\n const axisInnerRadius = radius * innerRadiusRatio;\n const angleScale = new _Scene13.BandScale();\n angleScale.domain = data[0].map((_382, index) => index);\n angleScale.range = [0, 2 * Math.PI];\n angleScale.paddingInner = 0;\n angleScale.paddingOuter = 0;\n const bandwidth = angleScale.bandwidth * 0.7;\n const { processedData, max } = accumulateData(data);\n const radiusScale = new _Scene13.LinearScale();\n radiusScale.domain = [0, max];\n radiusScale.range = [axisInnerRadius, radius];\n const center = this.size / 2;\n this.series = processedData.map((series, seriesIndex) => {\n const firstSeries = seriesIndex === 0;\n const previousSeries = firstSeries ? void 0 : processedData[seriesIndex - 1];\n const seriesGroup = new _Scene13.Group({ zIndex: 1e6 });\n const seriesColumns = series.map((datum, i) => {\n const previousDatum = previousSeries == null ? void 0 : previousSeries[i];\n const outerRadius = radiusScale.convert(datum);\n const innerRadius = radiusScale.convert(previousDatum != null ? previousDatum : 0);\n const startAngle = angleScale.convert(i);\n const endAngle = startAngle + bandwidth;\n const columnWidth = _Scene13.getRadialColumnWidth(startAngle, endAngle, radius, 0.5, 0.5);\n const column = new _Scene13.RadialColumnShape();\n column.scalingCenterX = center;\n column.scalingCenterY = center;\n column.columnWidth = columnWidth;\n column.innerRadius = innerRadius;\n column.outerRadius = outerRadius;\n column.startAngle = startAngle;\n column.endAngle = endAngle;\n column.isBeveled = true;\n column.axisInnerRadius = axisInnerRadius;\n column.axisOuterRadius = radius;\n column.stroke = void 0;\n column.strokeWidth = 0;\n return column;\n });\n seriesGroup.append(seriesColumns);\n seriesGroup.translationX = center;\n seriesGroup.translationY = center;\n return seriesGroup;\n });\n this.root.append(this.series);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.series.forEach((group, i) => {\n var _a;\n (_a = group.children) == null ? void 0 : _a.forEach((sector) => {\n sector.fill = fills[i % fills.length];\n sector.stroke = strokes[i % strokes.length];\n });\n });\n }\n};\nMiniRadialColumn.chartType = \"radialColumn\";\nvar MiniRadialBar = class extends MiniChartWithPolarAxes {\n constructor(container, fills, strokes) {\n super(container, \"radialBarTooltip\");\n this.data = [\n [6, 8, 10],\n [4, 4, 3],\n [5, 4, 2]\n ];\n this.showRadiusAxisLine = false;\n const radius = (this.size - this.padding) / 2;\n const innerRadiusRatio = 0.4;\n const innerRadius = radius * innerRadiusRatio;\n const totalRadius = radius + innerRadius;\n const radiusScale = new _Scene14.BandScale();\n radiusScale.domain = this.data[0].map((_382, index) => index);\n radiusScale.range = [radius, innerRadius];\n radiusScale.paddingInner = 0.5;\n radiusScale.paddingOuter = 0;\n const bandwidth = radiusScale.bandwidth;\n const { processedData, max } = accumulateData(this.data);\n const angleScale = new _Scene14.LinearScale();\n angleScale.domain = [0, Math.ceil(max * 1.5)];\n const start = 3 / 2 * Math.PI;\n const end = start + 2 * Math.PI;\n angleScale.range = [start, end];\n const center = this.size / 2;\n this.series = processedData.map((series, index) => {\n const previousSeries = index < 0 ? void 0 : processedData[index - 1];\n const seriesGroup = new _Scene14.Group({ zIndex: 1e6 });\n const seriesSectors = series.map((datum, i) => {\n var _a;\n const previousDatum = (_a = previousSeries == null ? void 0 : previousSeries[i]) != null ? _a : 0;\n const innerRadius2 = totalRadius - radiusScale.convert(i);\n const outerRadius = innerRadius2 + bandwidth;\n const startAngle = angleScale.convert(previousDatum);\n const endAngle = angleScale.convert(datum);\n const sector = new _Scene14.Sector();\n sector.centerX = center;\n sector.centerY = center;\n sector.innerRadius = innerRadius2;\n sector.outerRadius = outerRadius;\n sector.startAngle = startAngle;\n sector.endAngle = endAngle;\n sector.stroke = void 0;\n sector.strokeWidth = 0;\n return sector;\n });\n seriesGroup.append(seriesSectors);\n return seriesGroup;\n });\n this.root.append(this.series);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.series.forEach((group, i) => {\n var _a;\n (_a = group.children) == null ? void 0 : _a.forEach((sector) => {\n sector.fill = fills[i % fills.length];\n sector.stroke = strokes[i % strokes.length];\n });\n });\n }\n};\nMiniRadialBar.chartType = \"radialBar\";\nvar MiniRadarLine = class extends MiniChartWithPolarAxes {\n constructor(container, fills, strokes) {\n super(container, \"radarLineTooltip\");\n this.markerSize = 4;\n this.data = [\n [8, 7, 8, 7, 8, 8, 7, 8],\n [6, 8, 5, 10, 6, 7, 4, 6],\n [0, 3, 3, 5, 4, 4, 2, 0]\n ];\n this.showRadiusAxisLine = false;\n const radius = (this.size - this.padding * 2) / 2;\n const innerRadius = 0;\n const { paths, markers } = createPolarPaths(this.root, this.data, this.size, radius, innerRadius, this.markerSize);\n this.lines = paths;\n this.markers = markers;\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.lines.forEach((line, i) => {\n const n = this.data[i].length;\n line.stroke = fills[i];\n const startIdx = i * n;\n const endIdx = startIdx + n;\n const markers = this.markers.slice(startIdx, endIdx);\n markers.forEach((marker) => {\n marker.stroke = strokes[i];\n marker.fill = fills[i];\n });\n });\n }\n};\nMiniRadarLine.chartType = \"radarLine\";\nvar MiniRadarArea = class extends MiniChartWithPolarAxes {\n constructor(container, fills, strokes) {\n super(container, \"radarAreaTooltip\");\n this.data = [\n [8, 10, 5, 7, 4, 1, 5, 8],\n [1, 1, 2, 7, 7, 8, 10, 1],\n [4, 5, 9, 9, 4, 2, 3, 4]\n ];\n this.showRadiusAxisLine = false;\n const radius = (this.size - this.padding * 2) / 2;\n const innerRadius = radius - this.size * 0.3;\n this.areas = createPolarPaths(this.root, this.data, this.size, radius, innerRadius).paths;\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.areas.forEach((area, i) => {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n }\n};\nMiniRadarArea.chartType = \"radarArea\";\nvar MiniNightingale = class extends MiniChartWithPolarAxes {\n constructor(container, fills, strokes) {\n super(container, \"nightingaleTooltip\");\n this.data = [\n [6, 10, 9, 8, 7, 8],\n [4, 6, 5, 4, 5, 5],\n [3, 5, 4, 3, 4, 7]\n ];\n this.showRadiusAxisLine = false;\n const radius = (this.size - this.padding * 2) / 2;\n const angleScale = new _Scene15.BandScale();\n angleScale.domain = this.data[0].map((_382, index) => index);\n angleScale.range = [-Math.PI, Math.PI];\n angleScale.paddingInner = 0;\n angleScale.paddingOuter = 0;\n const bandwidth = angleScale.bandwidth * 0.7;\n const { processedData, max } = accumulateData(this.data);\n const radiusScale = new _Scene15.LinearScale();\n radiusScale.domain = [0, max];\n radiusScale.range = [0, radius];\n const center = this.size / 2;\n this.series = processedData.map((series, index) => {\n const previousSeries = index < 0 ? void 0 : processedData[index - 1];\n const seriesGroup = new _Scene15.Group({ zIndex: 1e6 });\n const seriesSectors = series.map((datum, i) => {\n const previousDatum = previousSeries == null ? void 0 : previousSeries[i];\n const outerRadius = radiusScale.convert(datum);\n const innerRadius = radiusScale.convert(previousDatum != null ? previousDatum : 0);\n const startAngle = angleScale.convert(i);\n const endAngle = startAngle + bandwidth;\n const sector = new _Scene15.Sector();\n sector.centerX = center;\n sector.centerY = center;\n sector.innerRadius = innerRadius;\n sector.outerRadius = outerRadius;\n sector.startAngle = startAngle;\n sector.endAngle = endAngle;\n sector.stroke = void 0;\n sector.strokeWidth = 0;\n return sector;\n });\n seriesGroup.append(seriesSectors);\n return seriesGroup;\n });\n this.root.append(this.series);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.series.forEach((group, i) => {\n var _a;\n (_a = group.children) == null ? void 0 : _a.forEach((sector) => {\n sector.fill = fills[i % fills.length];\n sector.stroke = strokes[i % strokes.length];\n });\n });\n }\n};\nMiniNightingale.chartType = \"nightingale\";\nvar MiniRangeBar = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"rangeBarTooltip\");\n const data = [3, 3.5, 3];\n this.bars = this.createRangeBar(this.root, data, this.size, this.padding, \"vertical\");\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.bars.forEach((bar, i) => {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n }\n createRangeBar(root, data, size, padding, direction) {\n const barAlongX = direction === \"horizontal\";\n const scalePadding = 2 * padding;\n const xScale = new _Scene16.BandScale();\n xScale.domain = data.map((_382, index) => index);\n xScale.range = [padding, size - padding];\n xScale.paddingInner = 0.3;\n xScale.paddingOuter = 0.3;\n const lowRatio = 0.7;\n const highRatio = 1.3;\n const yScale = new _Scene16.LinearScale();\n yScale.domain = [\n data.reduce((a, b) => Math.min(a, b), Infinity) * lowRatio,\n data.reduce((a, b) => Math.max(a, b), 0) * highRatio\n ];\n yScale.range = [scalePadding, size - scalePadding];\n const width = xScale.bandwidth;\n const bars = data.map((datum, i) => {\n const [low, high] = [datum * lowRatio, datum * highRatio];\n const x = xScale.convert(i);\n const y = yScale.convert(low);\n const height = yScale.convert(high) - y;\n const rect = new _Scene16.Rect();\n rect.x = barAlongX ? y : x;\n rect.y = barAlongX ? x : y;\n rect.width = barAlongX ? height : width;\n rect.height = barAlongX ? width : height;\n rect.strokeWidth = 0;\n rect.crisp = true;\n return rect;\n });\n root.append(bars);\n return bars;\n }\n};\nMiniRangeBar.chartType = \"rangeBar\";\nvar MiniRangeArea = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"rangeAreaTooltip\");\n const period = 4;\n const dataSeriesMidpoints = [\n zigzag({ offset: 0.375 * period, length: period, pattern: { low: 3, high: 5, period } }),\n zigzag({ offset: 0.375 * period, length: period, pattern: { low: 2.25, high: 4.25, period } }),\n zigzag({ offset: 0.75 * period, length: period, pattern: { low: 2.5, high: 4.5, period } })\n ];\n const dataSeriesWidth = 1.75;\n const data = dataSeriesMidpoints.map(\n (series) => series.map(([x, y]) => ({\n x,\n low: y - 0.5 * dataSeriesWidth,\n high: y + 0.5 * dataSeriesWidth\n }))\n );\n const { lines, areas } = this.createRangeArea(this.root, data, this.size, this.padding);\n this.lines = lines;\n this.areas = areas;\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n fills = swapArrayItems(fills, 1, 2);\n strokes = swapArrayItems(strokes, 1, 2);\n this.lines.forEach(([highLine, lowLine], i) => {\n highLine.fill = void 0;\n highLine.stroke = strokes[i];\n lowLine.fill = void 0;\n lowLine.stroke = strokes[i];\n });\n this.areas.forEach((area, i) => {\n area.fill = fills[i];\n });\n }\n createRangeArea(root, data, size, padding) {\n const xMin = data.reduce((acc, series) => series.reduce((acc2, { x }) => Math.min(acc2, x), acc), Infinity);\n const xMax = data.reduce((acc, series) => series.reduce((acc2, { x }) => Math.max(acc2, x), acc), -Infinity);\n const yMin = data.reduce((acc, series) => series.reduce((acc2, { low }) => Math.min(acc2, low), acc), Infinity);\n const yMax = data.reduce((acc, series) => series.reduce((acc2, { high }) => Math.max(acc2, high), acc), -Infinity);\n const xScale = new _Scene17.LinearScale();\n xScale.domain = [xMin, xMax];\n xScale.range = [padding, size - padding];\n const scalePadding = 2 * padding;\n const yScale = new _Scene17.LinearScale();\n yScale.domain = [yMin, yMax];\n yScale.range = [size - scalePadding, scalePadding];\n const lines = [];\n const areas = [];\n const lowPoints = data.map((series) => {\n const highLine = new _Scene17.Path();\n const lowLine = new _Scene17.Path();\n const area = new _Scene17.Path();\n lines.push([highLine, lowLine]);\n areas.push(area);\n highLine.strokeWidth = 0;\n lowLine.strokeWidth = 0;\n area.strokeWidth = 0;\n area.fillOpacity = 0.8;\n highLine.path.clear();\n lowLine.path.clear();\n area.path.clear();\n return series.map((datum, datumIndex) => {\n const { x, low, high } = datum;\n const scaledX = xScale.convert(x);\n const yLow = yScale.convert(low);\n const yHigh = yScale.convert(high);\n const command = datumIndex > 0 ? \"lineTo\" : \"moveTo\";\n highLine.path[command](scaledX, yHigh);\n lowLine.path[command](scaledX, yLow);\n area.path[command](scaledX, yHigh);\n return [scaledX, yLow];\n });\n });\n lowPoints.forEach((seriesLowPoints, seriesIndex) => {\n const n = seriesLowPoints.length - 1;\n const area = areas[seriesIndex];\n for (let datumIndex = n; datumIndex >= 0; datumIndex--) {\n const [x, y] = seriesLowPoints[datumIndex];\n area.path[\"lineTo\"](x, y);\n }\n });\n root.append(areas.concat(...lines));\n return { lines, areas };\n }\n};\nMiniRangeArea.chartType = \"rangeArea\";\nfunction zigzag(options) {\n const { offset, length, pattern } = options;\n const points = getZigzagInflectionPoints(offset, length, pattern);\n const xMin = 0;\n const xMax = length;\n if (points.length === 0 || points[0][0] !== xMin)\n points.unshift(getZigzagPoint(xMin, offset, pattern));\n if (points[points.length - 1][0] !== xMax)\n points.push(getZigzagPoint(xMax, offset, pattern));\n return points;\n function getZigzagInflectionPoints(offset2, length2, pattern2) {\n const { period } = pattern2;\n const scaledOffset = offset2 / period;\n const patternInflectionPoints = [0, 0.5];\n const inflectionPoints = patternInflectionPoints.map((x) => x - scaledOffset).map(getRemainderAbs).sort((a, b) => a - b);\n const repeatedPoints = Array.from(\n { length: Math.floor(inflectionPoints.length * (period / length2)) },\n (_382, i) => inflectionPoints[i % inflectionPoints.length] + Math.floor(i / inflectionPoints.length)\n );\n return repeatedPoints.map((x) => x * period).map((x) => getZigzagPoint(x, offset2, pattern2));\n }\n function getZigzagPoint(x, offset2, pattern2) {\n return [x, getZigzagValue(offset2 + x, pattern2)];\n }\n function getZigzagValue(x, pattern2) {\n const { low, high, period } = pattern2;\n const scaledX = getRemainderAbs(x / period);\n const y = scaledX > 0.5 ? 1 - 2 * (scaledX - 0.5) : 2 * scaledX;\n return low + (high - low) * y;\n }\n}\nfunction getRemainderAbs(value) {\n const remainder = value % 1;\n return remainder < 0 ? remainder + 1 : remainder;\n}\nfunction swapArrayItems(items, leftIndex, rightIndex) {\n const results = [...items];\n const temp = results[leftIndex];\n results[leftIndex] = results[rightIndex];\n results[rightIndex] = temp;\n return results;\n}\nvar MiniBoxPlot = class extends MiniChartWithAxes {\n constructor(container, fills, strokes, themeTemplateParameters, isCustomTheme) {\n super(container, \"boxPlotTooltip\");\n const padding = this.padding;\n const size = this.size;\n const data = [11, 11.5, 10.5];\n const maxRatio = 1.2;\n const q3Ratio = 1.1;\n const q1Ratio = 0.9;\n const minRatio = 0.8;\n const yScale = new _Scene18.LinearScale();\n yScale.domain = [\n data.reduce((a, b) => Math.min(a, b), Infinity) * minRatio,\n data.reduce((a, b) => Math.max(a, b), 0) * maxRatio\n ];\n yScale.range = [size - 1.5 * padding, padding];\n const xScale = new _Scene18.BandScale();\n xScale.domain = data.map((_382, index) => index);\n xScale.range = [padding, size - padding];\n xScale.paddingInner = 0.4;\n xScale.paddingOuter = 0.2;\n const bandwidth = Math.round(xScale.bandwidth);\n const halfBandWidth = Math.round(xScale.bandwidth / 2);\n this.boxPlotGroups = data.map((datum, i) => {\n let [minValue, q1Value, q3Value, maxValue] = [\n datum * minRatio,\n datum * q1Ratio,\n datum * q3Ratio,\n datum * maxRatio\n ];\n const top = Math.round(yScale.convert(q3Value));\n const left = Math.round(xScale.convert(i));\n const right = Math.round(left + bandwidth);\n const bottom = Math.round(yScale.convert(q1Value));\n const min = Math.round(yScale.convert(minValue));\n const mid = Math.round(yScale.convert(datum));\n const max = Math.round(yScale.convert(maxValue));\n const whiskerX = left + halfBandWidth;\n const boxPlotGroup = new _Scene18.Group();\n const box = new _Scene18.Rect();\n const median = new _Scene18.Line();\n const topWhisker = new _Scene18.Line();\n const bottomWhisker = new _Scene18.Line();\n const topCap = new _Scene18.Line();\n const bottomCap = new _Scene18.Line();\n box.x = left;\n box.y = top;\n box.width = bandwidth;\n box.height = bottom - top;\n box.strokeWidth = 1;\n box.strokeOpacity = 0.75;\n box.crisp = true;\n this.setLineProperties(median, left, right, mid, mid);\n this.setLineProperties(topWhisker, whiskerX, whiskerX, max, top);\n this.setLineProperties(bottomWhisker, whiskerX, whiskerX, min, bottom);\n this.setLineProperties(topCap, left, right, max, max);\n this.setLineProperties(bottomCap, left, right, min, min);\n boxPlotGroup.append([box, median, topWhisker, bottomWhisker, topCap, bottomCap]);\n return boxPlotGroup;\n });\n this.updateColors(fills, strokes, themeTemplateParameters, isCustomTheme);\n this.root.append(this.boxPlotGroups);\n }\n updateColors(fills, strokes, themeTemplateParameters, isCustomTheme) {\n var _a;\n const themeBackgroundColor = themeTemplateParameters == null ? void 0 : themeTemplateParameters.properties.get(_Theme4.DEFAULT_BACKGROUND_COLOUR);\n const backgroundFill = (_a = Array.isArray(themeBackgroundColor) ? themeBackgroundColor[0] : themeBackgroundColor) != null ? _a : \"white\";\n this.boxPlotGroups.forEach((group, i) => {\n var _a2;\n (_a2 = group.children) == null ? void 0 : _a2.forEach((node) => {\n const fill = fills[i % fills.length];\n node.fill = isCustomTheme ? fill : _Util3.Color.interpolate(fill, backgroundFill)(0.7);\n node.stroke = strokes[i % strokes.length];\n });\n });\n }\n setLineProperties(line, x1, x2, y1, y2) {\n line.x1 = x1;\n line.x2 = x2;\n line.y1 = y1;\n line.y2 = y2;\n line.strokeOpacity = 0.75;\n }\n};\nMiniBoxPlot.chartType = \"boxPlot\";\nvar MiniTreemap = class extends MiniChart {\n constructor(container, fills, strokes, themeTemplate, isCustomTheme) {\n super(container, \"treemapTooltip\");\n const { size, padding } = this;\n const data = [\n [1, 1],\n [3, 2, 1]\n ];\n const treeSize = data.length;\n const treePadding = treeSize % 2 === 0 ? 0.3 : 0.2;\n const range = [padding, size - padding];\n const columns = data.length;\n const columnParts = columns * (columns + 1) / 2;\n const columnPadding = treePadding / (columns - 1);\n const availableRange = range[1] - range[0];\n const availableWidth = availableRange - treePadding;\n let previousX = range[0];\n this.rects = data.reduce((rects, d, columnIndex) => {\n rects != null ? rects : rects = [];\n const widthRatio = (columns - columnIndex) / columnParts;\n const width = availableWidth * widthRatio;\n const rows = d.length;\n const rowParts = d.reduce((parts, ratio) => parts += ratio, 0);\n const rowPadding = treePadding / (rows - 1 || 1);\n const availableHeight = rows > 1 ? availableRange - treePadding : availableRange;\n let previousY = range[0];\n const xRects = d.map((ratio) => {\n const rect = new _Scene19.Rect();\n const height = availableHeight * ratio / rowParts;\n rect.x = previousX;\n rect.y = previousY;\n rect.width = width;\n rect.height = height;\n rect.strokeWidth = 0.75;\n rect.crisp = true;\n previousY += height + rowPadding;\n return rect;\n });\n previousX += width + columnPadding;\n rects.push(...xRects);\n return rects;\n }, []);\n this.updateColors(fills, strokes, themeTemplate, isCustomTheme);\n const rectGroup = new _Scene19.Group();\n rectGroup.setClipRectInGroupCoordinateSpace(new _Scene19.BBox(padding, padding, size - padding, size - padding));\n rectGroup.append(this.rects);\n this.root.append(rectGroup);\n }\n updateColors(fills, strokes, themeTemplate, isCustomTheme) {\n var _a;\n const { properties } = themeTemplate != null ? themeTemplate : {};\n const defaultBackgroundColor = properties == null ? void 0 : properties.get(_Theme5.DEFAULT_BACKGROUND_COLOUR);\n const backgroundFill = (_a = Array.isArray(defaultBackgroundColor) ? defaultBackgroundColor[0] : defaultBackgroundColor) != null ? _a : \"white\";\n this.rects.forEach((rect, i) => {\n rect.fill = fills[i % strokes.length];\n rect.stroke = isCustomTheme ? strokes[i % strokes.length] : backgroundFill;\n });\n }\n};\nMiniTreemap.chartType = \"treemap\";\nvar MiniSunburst = class extends MiniChartWithPolarAxes {\n constructor(container, fills, strokes) {\n super(container, \"sunburstTooltip\");\n this.data = [\n [[], []],\n [[], []],\n [[], []]\n ];\n this.angleOffset = -Math.PI / 2;\n this.innerRadiusRatio = 0;\n this.showRadiusAxisLine = false;\n this.showAngleAxisLines = false;\n const { data, size, padding, angleOffset, innerRadiusRatio } = this;\n const radius = (size - padding * 2) / 2;\n const angleRange = [angleOffset + 0, angleOffset + 2 * Math.PI];\n const angleExtent = Math.abs(angleRange[1] - angleRange[0]);\n const radiusRange = [radius * innerRadiusRatio, radius];\n const radiusExtent = Math.abs(radiusRange[1] - radiusRange[0]);\n let maxDepth = 0;\n const findMaxDepth = (data2, parentDepth) => {\n data2.forEach((child) => {\n const depth = parentDepth + 1;\n maxDepth = Math.max(maxDepth, depth);\n findMaxDepth(child, depth);\n });\n };\n findMaxDepth(data, 0);\n const radiusRatio = radiusExtent / maxDepth;\n const center = this.size / 2;\n const startAngle = angleRange[0];\n this.series = [];\n const createSectors = (data2, depth, startAngle2, availableAngle, group) => {\n const isArray = Array.isArray(data2);\n if (!isArray) {\n return;\n }\n const childDepth = depth + 1;\n let previousAngle = startAngle2;\n data2.forEach((child, childIndex, children) => {\n let childGroup = group;\n if (!childGroup) {\n childGroup = new _Scene20.Group();\n this.series.push(childGroup);\n }\n const innerRadius = radiusRange[0] + depth * radiusRatio;\n const outerRadius = radiusRange[0] + childDepth * radiusRatio;\n const angleRatio = 1 / children.length;\n const start = previousAngle;\n const end = start + availableAngle * angleRatio;\n const sector = new _Scene20.Sector();\n sector.centerX = center;\n sector.centerY = center;\n sector.innerRadius = innerRadius;\n sector.outerRadius = outerRadius;\n sector.startAngle = start;\n sector.endAngle = end;\n sector.stroke = void 0;\n sector.strokeWidth = 0;\n sector.inset = 0.75;\n previousAngle = end;\n childGroup.append(sector);\n createSectors(child, childDepth, start, Math.abs(end - start), childGroup);\n });\n };\n createSectors(data, 0, startAngle, angleExtent);\n this.root.append(this.series);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.series.forEach((group, i) => {\n var _a;\n (_a = group.children) == null ? void 0 : _a.forEach((sector) => {\n sector.fill = fills[i % fills.length];\n sector.stroke = strokes[i % strokes.length];\n });\n });\n }\n};\nMiniSunburst.chartType = \"sunburst\";\nvar MiniHeatmap = class extends MiniChart {\n constructor(container, fills, strokes, themeTemplate, isCustomTheme) {\n var _a, _b;\n super(container, \"heatmapTooltip\");\n const { size, padding } = this;\n const heatmapSize = 3;\n const data = Array.from(\n { length: heatmapSize },\n (_382, __) => Array.from({ length: heatmapSize }, (_392, yIndex) => yIndex)\n );\n const domain = data.map((_382, index) => index);\n const xScale = new _Scene21.BandScale();\n xScale.domain = domain;\n xScale.range = [padding, size - padding];\n xScale.paddingInner = 0.01;\n xScale.paddingOuter = 0.1;\n const yScale = new _Scene21.BandScale();\n yScale.domain = domain;\n yScale.range = [padding, size - padding];\n yScale.paddingInner = 0.01;\n yScale.paddingOuter = 0.1;\n const width = (_a = xScale.bandwidth) != null ? _a : 0;\n const height = (_b = yScale.bandwidth) != null ? _b : 0;\n this.rects = data.reduce((rects, d, index) => {\n rects != null ? rects : rects = [];\n const xRects = d.map((_382, yIndex) => {\n const rect = new _Scene21.Rect();\n rect.x = xScale.convert(index);\n rect.y = yScale.convert(yIndex);\n rect.width = width;\n rect.height = height;\n rect.strokeWidth = 0;\n rect.crisp = true;\n return rect;\n });\n rects.push(...xRects);\n return rects;\n }, []);\n this.updateColors(fills, strokes, themeTemplate, isCustomTheme);\n const rectGroup = new _Scene21.Group();\n rectGroup.setClipRectInGroupCoordinateSpace(new _Scene21.BBox(padding, padding, size - padding, size - padding));\n rectGroup.append(this.rects);\n this.root.append(rectGroup);\n }\n updateColors(fills, strokes, themeTemplate, isCustomTheme) {\n var _a;\n const { properties } = themeTemplate != null ? themeTemplate : {};\n const defaultColorRange = properties == null ? void 0 : properties.get(_Theme6.DEFAULT_DIVERGING_SERIES_COLOUR_RANGE);\n const defaultBackgroundColor = properties == null ? void 0 : properties.get(_Theme6.DEFAULT_BACKGROUND_COLOUR);\n const backgroundFill = (_a = Array.isArray(defaultBackgroundColor) ? defaultBackgroundColor[0] : defaultBackgroundColor) != null ? _a : \"white\";\n const colorRange = isCustomTheme ? [fills[0], fills[1]] : defaultColorRange;\n const stroke = isCustomTheme ? strokes[0] : backgroundFill;\n this.rects.forEach((rect, i) => {\n rect.fill = _Util5.Color.interpolate(colorRange[0], colorRange[1])(i * 0.2);\n rect.stroke = stroke;\n });\n }\n};\nMiniHeatmap.chartType = \"heatmap\";\nvar MiniWaterfall = class extends MiniChartWithAxes {\n constructor(container, fills, strokes, themeTemplate, isCustomTheme) {\n super(container, \"waterfallTooltip\");\n this.data = [4, 3, -3, 6, -3];\n this.bars = this.createWaterfall(this.root, this.data, this.size, this.padding, \"vertical\").bars;\n this.updateColors(fills, strokes, themeTemplate, isCustomTheme);\n }\n updateColors(fills, strokes, themeTemplate, isCustomTheme) {\n var _a, _b;\n const { data } = this;\n const { properties } = themeTemplate != null ? themeTemplate : {};\n const palettePositive = {\n fill: fills[0],\n stroke: strokes[0]\n };\n const paletteNegative = {\n fill: fills[1],\n stroke: strokes[1]\n };\n const positive = isCustomTheme ? palettePositive : (_a = properties == null ? void 0 : properties.get(_Theme7.DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS)) != null ? _a : palettePositive;\n const negative = isCustomTheme ? paletteNegative : (_b = properties == null ? void 0 : properties.get(_Theme7.DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS)) != null ? _b : paletteNegative;\n this.bars.forEach((bar, i) => {\n const isPositive = data[i] >= 0;\n bar.fill = isPositive ? positive.fill : negative.fill;\n bar.stroke = isPositive ? positive.stroke : negative.stroke;\n });\n }\n createWaterfall(root, data, size, padding, direction) {\n const scalePadding = 2 * padding;\n const { processedData, min, max } = accumulateData(data.map((d) => [d]));\n const flatData = processedData.reduce((flat, d) => flat.concat(d), []);\n const yScale = new _Scene22.LinearScale();\n yScale.domain = [Math.min(min, 0), max];\n yScale.range = [size - scalePadding, scalePadding];\n const xScale = new _Scene22.BandScale();\n xScale.domain = data.map((_382, index) => index);\n xScale.range = [padding, size - padding];\n xScale.paddingInner = 0.2;\n xScale.paddingOuter = 0.3;\n const width = xScale.bandwidth;\n const connectorLine = new _Scene22.Path();\n connectorLine.stroke = \"#575757\";\n connectorLine.strokeWidth = 0;\n const pixelAlignmentOffset = Math.floor(connectorLine.strokeWidth) % 2 / 2;\n const connectorPath = connectorLine.path;\n connectorPath.clear();\n const barAlongX = direction === \"horizontal\";\n const bars = flatData.map((datum, i) => {\n const previousDatum = i > 0 ? flatData[i - 1] : 0;\n const rawValue = data[i];\n const isPositive = rawValue > 0;\n const currY = Math.round(yScale.convert(datum));\n const trailY = Math.round(yScale.convert(previousDatum));\n const y = (isPositive ? currY : trailY) - pixelAlignmentOffset;\n const bottomY = (isPositive ? trailY : currY) + pixelAlignmentOffset;\n const height = Math.abs(bottomY - y);\n const x = xScale.convert(i);\n const rect = new _Scene22.Rect();\n rect.x = barAlongX ? y : x;\n rect.y = barAlongX ? x : y;\n rect.width = barAlongX ? height : width;\n rect.height = barAlongX ? width : height;\n rect.strokeWidth = 0;\n rect.crisp = true;\n const moveTo = currY + pixelAlignmentOffset;\n const lineTo = trailY + pixelAlignmentOffset;\n if (i > 0) {\n const lineToX = barAlongX ? lineTo : rect.x;\n const lineToY = barAlongX ? rect.y : lineTo;\n connectorPath.lineTo(lineToX, lineToY);\n }\n const moveToX = barAlongX ? moveTo : rect.x;\n const moveToY = barAlongX ? rect.y : moveTo;\n connectorPath.moveTo(moveToX, moveToY);\n return rect;\n });\n root.append([connectorLine, ...bars]);\n return { bars };\n }\n};\nMiniWaterfall.chartType = \"waterfall\";\nvar MiniColumnLineCombo = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"columnLineComboTooltip\");\n this.columnData = [3, 4];\n this.lineData = [\n [5, 4, 6, 5, 4]\n ];\n const { root, columnData, lineData, size, padding } = this;\n this.columns = createColumnRects({\n stacked: false,\n root,\n data: columnData,\n size,\n padding,\n xScaleDomain: [0, 1],\n yScaleDomain: [0, 4],\n xScalePadding: 0.5\n });\n root.append(this.columns);\n this.lines = createLinePaths(root, lineData, size, padding);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.columns.forEach((bar, i) => {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n this.lines.forEach((line, i) => {\n line.stroke = fills[i + 2];\n });\n }\n};\nMiniColumnLineCombo.chartType = \"columnLineCombo\";\nvar MiniAreaColumnCombo = class extends MiniChartWithAxes {\n constructor(container, fills, strokes) {\n super(container, \"areaColumnComboTooltip\");\n this.columnData = [3, 4.5];\n this.areaData = [\n [5, 4, 6, 5, 4]\n ];\n const { root, columnData, areaData, size, padding } = this;\n this.columns = createColumnRects({\n stacked: false,\n root,\n data: columnData,\n size,\n padding,\n xScaleDomain: [0, 1],\n yScaleDomain: [0, 6],\n xScalePadding: 0.5\n });\n const xScale = new _Scene23.BandScale();\n xScale.range = [padding, size - padding];\n xScale.domain = [0, 1, 2, 3, 4];\n xScale.paddingInner = 1;\n xScale.paddingOuter = 0;\n const yScale = new _Scene23.LinearScale();\n yScale.range = [size - padding, padding];\n yScale.domain = [0, 6];\n const pathData = [];\n const yZero = yScale.convert(0);\n const firstX = xScale.convert(0);\n areaData.forEach((series, i) => {\n const points = pathData[i] || (pathData[i] = []);\n series.forEach((data, j) => {\n const yDatum = data;\n const xDatum = j;\n const x = xScale.convert(xDatum);\n const y = yScale.convert(yDatum);\n points[j] = { x, y };\n });\n const lastX = xScale.convert(series.length - 1);\n pathData[i].push({\n x: lastX,\n y: yZero\n }, {\n x: firstX,\n y: yZero\n });\n });\n this.areas = pathData.map((points) => {\n const area = new _Scene23.Path();\n area.strokeWidth = 0;\n area.fillOpacity = 0.8;\n const path = area.path;\n points.forEach((point, i) => path[i > 0 ? \"lineTo\" : \"moveTo\"](point.x, point.y));\n return area;\n });\n root.append(this.areas);\n root.append([].concat.apply([], this.columns));\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.areas.forEach((area, i) => {\n area.fill = fills[i];\n area.stroke = strokes[i];\n });\n this.columns.forEach((bar, i) => {\n bar.fill = fills[i + 1];\n bar.stroke = strokes[i + 1];\n });\n }\n};\nMiniAreaColumnCombo.chartType = \"areaColumnCombo\";\nvar MiniCustomCombo = class extends MiniChart {\n constructor(container, fills, strokes) {\n super(container, \"customComboTooltip\");\n this.columnData = [3, 4];\n this.lineData = [[5, 4, 6, 5, 4]];\n const { root, columnData, lineData, size, padding } = this;\n this.columns = createColumnRects({\n stacked: false,\n root,\n data: columnData,\n size,\n padding,\n xScaleDomain: [0, 1],\n yScaleDomain: [0, 4],\n xScalePadding: 0.5\n });\n root.append(this.columns);\n this.lines = createLinePaths(root, lineData, size, padding);\n const axisStroke = \"grey\";\n const axisOvershoot = 3;\n const leftAxis = new _Scene24.Line();\n leftAxis.x1 = padding;\n leftAxis.y1 = padding;\n leftAxis.x2 = padding;\n leftAxis.y2 = size - padding + axisOvershoot;\n leftAxis.stroke = axisStroke;\n const bottomAxis = new _Scene24.Line();\n bottomAxis.x1 = padding - axisOvershoot + 1;\n bottomAxis.y1 = size - padding;\n bottomAxis.x2 = size - padding + 1;\n bottomAxis.y2 = size - padding;\n bottomAxis.stroke = axisStroke;\n const penIcon = new _Scene24.Path();\n this.buildPenIconPath(penIcon);\n penIcon.fill = \"whitesmoke\";\n penIcon.stroke = \"darkslategrey\";\n penIcon.strokeWidth = 1;\n root.append([bottomAxis, leftAxis, penIcon]);\n this.updateColors(fills, strokes);\n }\n updateColors(fills, strokes) {\n this.columns.forEach((bar, i) => {\n bar.fill = fills[i];\n bar.stroke = strokes[i];\n });\n this.lines.forEach((line, i) => {\n line.stroke = fills[i + 2];\n });\n }\n buildPenIconPath(penIcon) {\n const { path } = penIcon;\n path.moveTo(25.76, 43.46);\n path.lineTo(31.27, 48.53);\n path.moveTo(49.86, 22);\n path.lineTo(49.86, 22);\n path.cubicCurveTo(49.01994659053345, 21.317514933510974, 47.89593834348529, 21.09645997825817, 46.86, 21.41);\n path.lineTo(46.86, 21.41);\n path.cubicCurveTo(45.55460035985361, 21.77260167850787, 44.38777081121966, 22.517979360321792, 43.51, 23.55);\n path.lineTo(25.51, 43.8);\n path.lineTo(25.43, 43.89);\n path.lineTo(23.01, 51.89);\n path.lineTo(22.83, 52.46);\n path.lineTo(31.02, 48.86);\n path.lineTo(49.02, 28.52);\n path.lineTo(49.02, 28.52);\n path.cubicCurveTo(49.940716461596224, 27.521914221246085, 50.54302631059587, 26.2720342455763, 50.75, 24.93);\n path.lineTo(50.75, 24.93);\n path.cubicCurveTo(50.95363374988308, 23.866379846512814, 50.62080640232334, 22.77066734274871, 49.86, 22);\n path.closePath();\n path.moveTo(41.76, 25.5);\n path.lineTo(47.34, 30.5);\n path.moveTo(40.74, 26.65);\n path.lineTo(46.25, 31.71);\n }\n};\nMiniCustomCombo.chartType = \"customCombo\";\nvar miniChartMapping = {\n columnGroup: {\n column: { range: true, pivot: true, enterprise: false, icon: MiniColumn },\n stackedColumn: { range: true, pivot: true, enterprise: false, icon: MiniStackedColumn },\n normalizedColumn: { range: true, pivot: true, enterprise: false, icon: MiniNormalizedColumn }\n },\n barGroup: {\n bar: { range: true, pivot: true, enterprise: false, icon: MiniBar },\n stackedBar: { range: true, pivot: true, enterprise: false, icon: MiniStackedBar },\n normalizedBar: { range: true, pivot: true, enterprise: false, icon: MiniNormalizedBar }\n },\n pieGroup: {\n pie: { range: true, pivot: true, enterprise: false, icon: MiniPie },\n donut: { range: true, pivot: true, enterprise: false, icon: MiniDonut },\n doughnut: { range: true, pivot: true, enterprise: false, icon: MiniDonut }\n },\n lineGroup: { line: { range: true, pivot: true, enterprise: false, icon: MiniLine } },\n scatterGroup: {\n scatter: { range: true, pivot: true, enterprise: false, icon: MiniScatter },\n bubble: { range: true, pivot: true, enterprise: false, icon: MiniBubble }\n },\n areaGroup: {\n area: { range: true, pivot: true, enterprise: false, icon: MiniArea },\n stackedArea: { range: true, pivot: true, enterprise: false, icon: MiniStackedArea },\n normalizedArea: { range: true, pivot: true, enterprise: false, icon: MiniNormalizedArea }\n },\n polarGroup: {\n radarLine: { range: true, pivot: false, enterprise: true, icon: MiniRadarLine },\n radarArea: { range: true, pivot: false, enterprise: true, icon: MiniRadarArea },\n nightingale: { range: true, pivot: false, enterprise: true, icon: MiniNightingale },\n radialColumn: { range: true, pivot: false, enterprise: true, icon: MiniRadialColumn },\n radialBar: { range: true, pivot: false, enterprise: true, icon: MiniRadialBar }\n },\n statisticalGroup: {\n boxPlot: { range: true, pivot: false, enterprise: true, icon: MiniBoxPlot },\n histogram: { range: true, pivot: false, enterprise: false, icon: MiniHistogram },\n rangeBar: { range: true, pivot: false, enterprise: true, icon: MiniRangeBar },\n rangeArea: { range: true, pivot: false, enterprise: true, icon: MiniRangeArea }\n },\n hierarchicalGroup: {\n treemap: { range: true, pivot: true, enterprise: true, icon: MiniTreemap },\n sunburst: { range: true, pivot: true, enterprise: true, icon: MiniSunburst }\n },\n specializedGroup: {\n heatmap: { range: true, pivot: false, enterprise: true, icon: MiniHeatmap },\n waterfall: { range: true, pivot: false, enterprise: true, icon: MiniWaterfall }\n },\n combinationGroup: {\n columnLineCombo: { range: true, pivot: true, enterprise: false, icon: MiniColumnLineCombo },\n areaColumnCombo: { range: true, pivot: true, enterprise: false, icon: MiniAreaColumnCombo },\n customCombo: { range: true, pivot: true, enterprise: false, icon: MiniCustomCombo }\n }\n};\nvar DEFAULT_CHART_GROUPS = {\n columnGroup: [\n \"column\",\n \"stackedColumn\",\n \"normalizedColumn\"\n ],\n barGroup: [\n \"bar\",\n \"stackedBar\",\n \"normalizedBar\"\n ],\n pieGroup: [\n \"pie\",\n \"donut\"\n ],\n lineGroup: [\n \"line\"\n ],\n scatterGroup: [\n \"scatter\",\n \"bubble\"\n ],\n areaGroup: [\n \"area\",\n \"stackedArea\",\n \"normalizedArea\"\n ],\n polarGroup: [\n \"radarLine\",\n \"radarArea\",\n \"nightingale\",\n \"radialColumn\",\n \"radialBar\"\n ],\n statisticalGroup: [\n \"boxPlot\",\n \"histogram\",\n \"rangeBar\",\n \"rangeArea\"\n ],\n hierarchicalGroup: [\n \"treemap\",\n \"sunburst\"\n ],\n specializedGroup: [\n \"heatmap\",\n \"waterfall\"\n ],\n combinationGroup: [\n \"columnLineCombo\",\n \"areaColumnCombo\",\n \"customCombo\"\n ]\n};\nvar _MiniChartsContainer = class _MiniChartsContainer2 extends Component30 {\n constructor(chartController, fills, strokes, themeTemplateParameters, isCustomTheme, chartGroups = DEFAULT_CHART_GROUPS) {\n super(_MiniChartsContainer2.TEMPLATE);\n this.wrappers = {};\n this.chartController = chartController;\n this.fills = fills;\n this.strokes = strokes;\n this.themeTemplateParameters = themeTemplateParameters;\n this.isCustomTheme = isCustomTheme;\n this.chartGroups = __spreadValues3({}, chartGroups);\n }\n init() {\n if (!this.chartController.customComboExists() && this.chartGroups.combinationGroup) {\n this.chartGroups.combinationGroup = this.chartGroups.combinationGroup.filter((chartType) => chartType !== \"customCombo\");\n }\n const eGui = this.getGui();\n const isEnterprise = this.chartController.isEnterprise();\n const isPivotChart = this.chartController.isPivotChart();\n const isRangeChart = !isPivotChart;\n const displayedMenuGroups = Object.keys(this.chartGroups).map((group) => {\n var _a;\n const menuGroup = group in miniChartMapping ? miniChartMapping[group] : void 0;\n if (!menuGroup) {\n _26.warnOnce(`invalid chartGroupsDef config '${group}'`);\n return null;\n }\n const chartGroupValues = (_a = this.chartGroups[group]) != null ? _a : [];\n const menuItems = chartGroupValues.map((chartType) => {\n const menuItem = chartType in menuGroup ? menuGroup[chartType] : void 0;\n if (!menuItem) {\n _26.warnOnce(`invalid chartGroupsDef config '${group}.${chartType}'`);\n return null;\n }\n if (!isEnterprise && menuItem.enterprise) {\n return null;\n }\n if (isRangeChart && menuItem.range)\n return menuItem;\n if (isPivotChart && menuItem.pivot)\n return menuItem;\n return null;\n }).filter((menuItem) => menuItem != null);\n if (menuItems.length === 0)\n return null;\n return {\n label: this.chartTranslationService.translate(group),\n items: menuItems\n };\n }).filter((menuGroup) => menuGroup != null);\n for (const { label, items } of displayedMenuGroups) {\n const groupComponent = this.createBean(\n new AgGroupComponent10({\n title: label,\n suppressEnabledCheckbox: true,\n enabled: true,\n suppressOpenCloseIcons: true,\n cssIdentifier: \"charts-settings\",\n direction: \"horizontal\"\n })\n );\n for (const menuItem of items) {\n const MiniClass = menuItem.icon;\n const miniWrapper = document.createElement(\"div\");\n miniWrapper.classList.add(\"ag-chart-mini-thumbnail\");\n const miniClassChartType = MiniClass.chartType;\n this.addManagedListener(miniWrapper, \"click\", () => {\n this.chartController.setChartType(miniClassChartType);\n this.updateSelectedMiniChart();\n });\n this.wrappers[miniClassChartType] = miniWrapper;\n this.createBean(new MiniClass(miniWrapper, this.fills, this.strokes, this.themeTemplateParameters, this.isCustomTheme));\n groupComponent.addItem(miniWrapper);\n }\n eGui.appendChild(groupComponent.getGui());\n }\n this.updateSelectedMiniChart();\n }\n updateSelectedMiniChart() {\n const selectedChartType = this.chartController.getChartType();\n for (const miniChartType in this.wrappers) {\n const miniChart = this.wrappers[miniChartType];\n const selected = miniChartType === selectedChartType;\n miniChart.classList.toggle(\"ag-selected\", selected);\n }\n }\n};\n_MiniChartsContainer.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired342(\"chartTranslationService\")\n], _MiniChartsContainer.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct37\n], _MiniChartsContainer.prototype, \"init\", 1);\nvar MiniChartsContainer = _MiniChartsContainer;\nvar _ChartSettingsPanel = class _ChartSettingsPanel2 extends Component31 {\n constructor(chartController) {\n super(_ChartSettingsPanel2.TEMPLATE);\n this.chartController = chartController;\n this.miniChartsContainers = [];\n this.cardItems = [];\n this.activePaletteIndex = 0;\n this.palettes = [];\n this.themes = [];\n }\n postConstruct() {\n this.resetPalettes();\n this.ePrevBtn.insertAdjacentElement(\"afterbegin\", _27.createIconNoSpan(\"previous\", this.gos));\n this.eNextBtn.insertAdjacentElement(\"afterbegin\", _27.createIconNoSpan(\"next\", this.gos));\n this.addManagedListener(this.ePrevBtn, \"click\", () => this.setActivePalette(this.getPrev(), \"left\"));\n this.addManagedListener(this.eNextBtn, \"click\", () => this.setActivePalette(this.getNext(), \"right\"));\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_TYPE_CHANGED, () => this.resetPalettes(true));\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_API_UPDATE, () => this.resetPalettes(true));\n this.scrollSelectedIntoView();\n }\n scrollSelectedIntoView() {\n setTimeout(() => {\n const isMiniChartsContainerVisible = (miniChartsContainers) => {\n return !miniChartsContainers.getGui().classList.contains(\"ag-hidden\");\n };\n const currentMiniChartContainer = this.miniChartsContainers.find(isMiniChartsContainerVisible);\n const currentChart = currentMiniChartContainer.getGui().querySelector(\".ag-selected\");\n if (currentChart) {\n const parent = currentChart.offsetParent;\n if (parent) {\n this.eMiniChartsContainer.scrollTo(0, parent.offsetTop);\n }\n }\n }, 250);\n }\n resetPalettes(forceReset) {\n var _a, _b;\n const palettes = this.chartController.getPalettes();\n const themeTemplateParameters = this.chartController.getThemeTemplateParameters();\n const chartGroups = (_b = (_a = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _a.settingsPanel) == null ? void 0 : _b.chartGroupsDef;\n if (_27.shallowCompare(palettes, this.palettes) && !forceReset || this.isAnimating) {\n return;\n }\n this.palettes = palettes;\n this.themes = this.chartController.getThemeNames();\n this.activePaletteIndex = this.themes.findIndex((name) => name === this.chartController.getChartThemeName());\n this.cardItems = [];\n _27.clearElement(this.eCardSelector);\n this.destroyMiniCharts();\n const { themes } = this;\n this.palettes.forEach((palette, index) => {\n const isActivePalette = this.activePaletteIndex === index;\n const { fills, strokes } = palette;\n const themeName = themes[index];\n const isCustomTheme = !isStockTheme(themeName);\n const miniChartsContainer = this.createBean(\n new MiniChartsContainer(\n this.chartController,\n fills,\n strokes,\n themeTemplateParameters[index],\n isCustomTheme,\n chartGroups\n )\n );\n this.miniChartsContainers.push(miniChartsContainer);\n this.eMiniChartsContainer.appendChild(miniChartsContainer.getGui());\n this.addCardLink(index);\n if (isActivePalette) {\n miniChartsContainer.updateSelectedMiniChart();\n } else {\n miniChartsContainer.setDisplayed(false);\n }\n });\n _27.setDisplayed(this.eNavBar, this.palettes.length > 1);\n _27.radioCssClass(this.cardItems[this.activePaletteIndex], \"ag-selected\", \"ag-not-selected\");\n }\n addCardLink(index) {\n const link = document.createElement(\"div\");\n link.classList.add(\"ag-chart-settings-card-item\");\n this.addManagedListener(link, \"click\", () => {\n this.setActivePalette(index, index < this.activePaletteIndex ? \"left\" : \"right\");\n });\n this.eCardSelector.appendChild(link);\n this.cardItems.push(link);\n }\n getPrev() {\n let prev = this.activePaletteIndex - 1;\n if (prev < 0) {\n prev = this.palettes.length - 1;\n }\n return prev;\n }\n getNext() {\n let next = this.activePaletteIndex + 1;\n if (next >= this.palettes.length) {\n next = 0;\n }\n return next;\n }\n setActivePalette(index, animationDirection) {\n if (this.isAnimating || this.activePaletteIndex === index) {\n return;\n }\n _27.radioCssClass(this.cardItems[index], \"ag-selected\", \"ag-not-selected\");\n const currentPalette = this.miniChartsContainers[this.activePaletteIndex];\n const currentGui = currentPalette.getGui();\n const futurePalette = this.miniChartsContainers[index];\n const nextGui = futurePalette.getGui();\n currentPalette.updateSelectedMiniChart();\n futurePalette.updateSelectedMiniChart();\n const multiplier = animationDirection === \"left\" ? -1 : 1;\n const final = nextGui.style.left = `${_27.getAbsoluteWidth(this.getGui()) * multiplier}px`;\n this.activePaletteIndex = index;\n this.isAnimating = true;\n const animatingClass = \"ag-animating\";\n futurePalette.setDisplayed(true);\n currentPalette.addCssClass(animatingClass);\n futurePalette.addCssClass(animatingClass);\n this.chartController.setChartThemeName(this.themes[index]);\n window.setTimeout(() => {\n currentGui.style.left = `${-parseFloat(final)}px`;\n nextGui.style.left = \"0px\";\n }, 0);\n window.setTimeout(() => {\n this.isAnimating = false;\n currentPalette.removeCssClass(animatingClass);\n futurePalette.removeCssClass(animatingClass);\n currentPalette.setDisplayed(false);\n }, 300);\n }\n destroyMiniCharts() {\n _27.clearElement(this.eMiniChartsContainer);\n this.miniChartsContainers = this.destroyBeans(this.miniChartsContainers);\n }\n destroy() {\n this.destroyMiniCharts();\n super.destroy();\n }\n};\n_ChartSettingsPanel.TEMPLATE = /* html */\n`
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
`;\n__decorateClass4([\n RefSelector10(\"eMiniChartsContainer\")\n], _ChartSettingsPanel.prototype, \"eMiniChartsContainer\", 2);\n__decorateClass4([\n RefSelector10(\"eNavBar\")\n], _ChartSettingsPanel.prototype, \"eNavBar\", 2);\n__decorateClass4([\n RefSelector10(\"eCardSelector\")\n], _ChartSettingsPanel.prototype, \"eCardSelector\", 2);\n__decorateClass4([\n RefSelector10(\"ePrevBtn\")\n], _ChartSettingsPanel.prototype, \"ePrevBtn\", 2);\n__decorateClass4([\n RefSelector10(\"eNextBtn\")\n], _ChartSettingsPanel.prototype, \"eNextBtn\", 2);\n__decorateClass4([\n PostConstruct38\n], _ChartSettingsPanel.prototype, \"postConstruct\", 1);\nvar ChartSettingsPanel = _ChartSettingsPanel;\nvar _TabbedChartMenu = class _TabbedChartMenu2 extends Component32 {\n constructor(panels, chartMenuContext) {\n super();\n this.panels = panels;\n this.chartMenuContext = chartMenuContext;\n this.tabs = [];\n }\n init() {\n this.panels.forEach((panel) => {\n const panelType = panel.replace(\"chart\", \"\").toLowerCase();\n const panelComp = this.createPanel(panelType);\n const tabItem = this.createTab(panel, panelType, panelComp);\n this.tabs.push(tabItem);\n this.addDestroyFunc(() => this.destroyBean(panelComp));\n });\n this.tabbedLayout = new TabbedLayout({\n items: this.tabs,\n cssClass: \"ag-chart-tabbed-menu\",\n keepScrollPosition: true,\n suppressFocusBodyOnOpen: true,\n suppressTrapFocus: true,\n enableCloseButton: !this.chartMenuService.isLegacyFormat(),\n closeButtonAriaLabel: this.chartTranslationService.translate(\"ariaChartMenuClose\"),\n onCloseClicked: () => {\n var _a;\n (_a = this.eventSource) == null ? void 0 : _a.focus({ preventScroll: true });\n this.dispatchEvent({ type: _TabbedChartMenu2.EVENT_CLOSED });\n }\n });\n this.getContext().createBean(this.tabbedLayout);\n }\n createTab(name, title, panelComp) {\n const eWrapperDiv = document.createElement(\"div\");\n eWrapperDiv.classList.add(\"ag-chart-tab\", `ag-chart-${title}`);\n this.getContext().createBean(panelComp);\n eWrapperDiv.appendChild(panelComp.getGui());\n const titleEl = document.createElement(\"div\");\n const translatedTitle = this.chartTranslationService.translate(title);\n titleEl.innerText = translatedTitle;\n return {\n title: titleEl,\n titleLabel: translatedTitle,\n bodyPromise: AgPromise.resolve(eWrapperDiv),\n getScrollableContainer: () => {\n const scrollableContainer = eWrapperDiv.querySelector(\".ag-scrollable-container\");\n return scrollableContainer || eWrapperDiv;\n },\n name\n };\n }\n showTab(tab) {\n const tabItem = this.tabs[tab];\n this.tabbedLayout.showItem(tabItem);\n }\n getGui() {\n return this.tabbedLayout && this.tabbedLayout.getGui();\n }\n showMenu(eventSource, suppressFocus) {\n var _a;\n this.eventSource = eventSource;\n if (!suppressFocus) {\n (_a = this.tabbedLayout) == null ? void 0 : _a.focusHeader(true);\n }\n }\n destroy() {\n if (this.parentComponent && this.parentComponent.isAlive()) {\n this.destroyBean(this.parentComponent);\n }\n super.destroy();\n }\n createPanel(panelType) {\n const { chartController, chartOptionsService } = this.chartMenuContext;\n switch (panelType) {\n case _TabbedChartMenu2.TAB_DATA:\n return new ChartDataPanel(chartController, chartOptionsService);\n case _TabbedChartMenu2.TAB_FORMAT:\n return new FormatPanel(this.chartMenuContext);\n default:\n return new ChartSettingsPanel(chartController);\n }\n }\n};\n_TabbedChartMenu.EVENT_CLOSED = \"closed\";\n_TabbedChartMenu.TAB_DATA = \"data\";\n_TabbedChartMenu.TAB_FORMAT = \"format\";\n__decorateClass4([\n Autowired35(\"chartTranslationService\")\n], _TabbedChartMenu.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired35(\"chartMenuService\")\n], _TabbedChartMenu.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct39\n], _TabbedChartMenu.prototype, \"init\", 1);\nvar TabbedChartMenu = _TabbedChartMenu;\nvar ChartToolbar = class extends Component332 {\n constructor() {\n super(\n /* html */\n `
`\n );\n this.buttonListenersDestroyFuncs = [];\n }\n updateParams(params) {\n const { buttons } = params;\n this.createButtons(buttons);\n }\n createButtons(buttons) {\n this.buttonListenersDestroyFuncs.forEach((func) => func == null ? void 0 : func());\n this.buttonListenersDestroyFuncs = [];\n const menuEl = this.eMenu;\n _28.clearElement(menuEl);\n buttons.forEach((buttonConfig) => {\n const { buttonName, iconName, callback } = buttonConfig;\n const buttonEl = this.createButton(iconName);\n const tooltipTitle = this.chartTranslationService.translate(buttonName + \"ToolbarTooltip\");\n if (tooltipTitle && buttonEl instanceof HTMLElement) {\n buttonEl.title = tooltipTitle;\n }\n this.buttonListenersDestroyFuncs.push(\n this.addManagedListener(buttonEl, \"click\", (event) => callback(event.target))\n );\n menuEl.appendChild(buttonEl);\n });\n }\n createButton(iconName) {\n let buttonEl = _28.createIconNoSpan(\n iconName,\n this.gos,\n void 0,\n true\n );\n buttonEl.classList.add(\"ag-chart-menu-icon\");\n if (!this.chartMenuService.isLegacyFormat()) {\n buttonEl = this.wrapButton(buttonEl);\n }\n return buttonEl;\n }\n wrapButton(buttonEl) {\n const wrapperEl = this.gos.getDocument().createElement(\"button\");\n wrapperEl.appendChild(buttonEl);\n wrapperEl.classList.add(\"ag-chart-menu-toolbar-button\");\n return wrapperEl;\n }\n destroy() {\n this.buttonListenersDestroyFuncs = [];\n super.destroy();\n }\n};\n__decorateClass4([\n Autowired36(\"chartTranslationService\")\n], ChartToolbar.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired36(\"chartMenuService\")\n], ChartToolbar.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n RefSelector11(\"eMenu\")\n], ChartToolbar.prototype, \"eMenu\", 2);\nvar _ChartMenu = class _ChartMenu2 extends Component34 {\n constructor(eChartContainer, eMenuPanelContainer, chartMenuContext) {\n super(_ChartMenu2.TEMPLATE);\n this.eChartContainer = eChartContainer;\n this.eMenuPanelContainer = eMenuPanelContainer;\n this.chartMenuContext = chartMenuContext;\n this.buttons = {\n chartSettings: { iconName: \"menu\", callback: () => this.showMenu({ panel: this.defaultPanel }) },\n chartData: { iconName: \"menu\", callback: () => this.showMenu({ panel: \"chartData\" }) },\n chartFormat: { iconName: \"menu\", callback: () => this.showMenu({ panel: \"chartFormat\" }) },\n chartLink: { iconName: \"linked\", callback: () => this.chartMenuService.toggleLinked(this.chartMenuContext) },\n chartUnlink: { iconName: \"unlinked\", callback: () => this.chartMenuService.toggleLinked(this.chartMenuContext) },\n chartDownload: { iconName: \"save\", callback: () => this.chartMenuService.downloadChart(this.chartMenuContext) },\n chartMenu: { iconName: \"menuAlt\", callback: (eventSource) => this.showMenuList(eventSource) }\n };\n this.panels = [];\n this.menuVisible = false;\n this.chartController = chartMenuContext.chartController;\n }\n postConstruct() {\n this.legacyFormat = this.chartMenuService.isLegacyFormat();\n this.chartToolbar = this.createManagedBean(new ChartToolbar());\n this.getGui().appendChild(this.chartToolbar.getGui());\n if (this.legacyFormat) {\n this.createLegacyToggleButton();\n }\n this.refreshToolbarAndPanels();\n this.addManagedListener(this.eventService, Events8.EVENT_CHART_CREATED, (e) => {\n var _a;\n if (e.chartId === this.chartController.getChartId()) {\n const showDefaultToolPanel = Boolean((_a = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _a.defaultToolPanel);\n if (showDefaultToolPanel) {\n this.showMenu({ panel: this.defaultPanel, animate: false, suppressFocus: true });\n }\n }\n });\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_LINKED_CHANGED, this.refreshToolbarAndPanels.bind(this));\n this.refreshMenuClasses();\n if (this.legacyFormat && !this.gos.get(\"suppressChartToolPanelsButton\") && this.panels.length > 0) {\n this.getGui().classList.add(\"ag-chart-tool-panel-button-enable\");\n if (this.eHideButton) {\n this.addManagedListener(this.eHideButton, \"click\", this.toggleMenu.bind(this));\n }\n }\n if (!this.legacyFormat) {\n this.getGui().classList.add(\"ag-chart-menu-wrapper\");\n }\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_API_UPDATE, this.refreshToolbarAndPanels.bind(this));\n }\n isVisible() {\n return this.menuVisible;\n }\n getExtraPaddingDirections() {\n const topItems = [\"chartMenu\", \"chartLink\", \"chartUnlink\", \"chartDownload\"];\n const rightItems = [\"chartSettings\", \"chartData\", \"chartFormat\"];\n const result = [];\n if (topItems.some((v) => this.chartToolbarOptions.includes(v))) {\n result.push(\"top\");\n }\n if (rightItems.some((v) => this.chartToolbarOptions.includes(v))) {\n result.push(this.gos.get(\"enableRtl\") ? \"left\" : \"right\");\n }\n return result;\n }\n createLegacyToggleButton() {\n const eDocument = this.gos.getDocument();\n this.eHideButton = eDocument.createElement(\"button\");\n this.eHideButton.classList.add(\"ag-button\", \"ag-chart-menu-close\");\n this.eHideButtonIcon = eDocument.createElement(\"span\");\n this.eHideButtonIcon.classList.add(\"ag-icon\", \"ag-icon-contracted\");\n this.eHideButton.appendChild(this.eHideButtonIcon);\n this.getGui().appendChild(this.eHideButton);\n }\n refreshToolbarAndPanels() {\n this.initToolbarOptionsAndPanels();\n this.updateToolbar();\n }\n initToolbarOptionsAndPanels() {\n const {\n panels,\n defaultPanel,\n chartToolbarOptions\n } = this.chartMenuService.getToolbarOptionsAndPanels(this.chartController);\n this.panels = panels;\n this.defaultPanel = defaultPanel;\n this.chartToolbarOptions = chartToolbarOptions;\n }\n updateToolbar() {\n const buttons = this.chartToolbarOptions.map((buttonName) => {\n const { iconName, callback } = this.buttons[buttonName];\n return {\n buttonName,\n iconName,\n callback\n };\n });\n this.chartToolbar.updateParams({ buttons });\n }\n createMenuPanel(defaultTab) {\n const width = this.environment.chartMenuPanelWidth();\n const menuPanel = this.menuPanel = this.createBean(new AgPanel({\n minWidth: width,\n width,\n height: \"100%\",\n closable: true,\n hideTitleBar: true,\n cssIdentifier: \"chart-menu\"\n }));\n menuPanel.setParentComponent(this);\n this.eMenuPanelContainer.appendChild(menuPanel.getGui());\n this.tabbedMenu = this.createBean(new TabbedChartMenu(\n this.panels,\n this.chartMenuContext\n ));\n this.addManagedListener(this.tabbedMenu, TabbedChartMenu.EVENT_CLOSED, () => {\n this.hideMenu(false);\n });\n this.addManagedListener(\n menuPanel,\n Component34.EVENT_DESTROYED,\n () => this.destroyBean(this.tabbedMenu)\n );\n return new AgPromise2((res) => {\n window.setTimeout(() => {\n menuPanel.setBodyComponent(this.tabbedMenu);\n this.tabbedMenu.showTab(defaultTab);\n res(menuPanel);\n if (this.legacyFormat) {\n this.addManagedListener(\n this.eChartContainer,\n \"click\",\n (event) => {\n if (this.getGui().contains(event.target)) {\n return;\n }\n if (this.menuVisible) {\n this.hideMenu();\n }\n }\n );\n }\n }, 100);\n });\n }\n showContainer(eventSource, suppressFocus) {\n if (!this.menuPanel) {\n return;\n }\n this.menuVisible = true;\n this.showParent(this.menuPanel.getWidth());\n this.refreshMenuClasses();\n this.tabbedMenu.showMenu(eventSource, suppressFocus);\n }\n toggleMenu() {\n this.menuVisible ? this.hideMenu(this.legacyFormat) : this.showMenu({ animate: this.legacyFormat });\n }\n showMenu(params) {\n const { panel, animate = true, eventSource, suppressFocus } = params;\n if (!animate) {\n this.eMenuPanelContainer.classList.add(\"ag-no-transition\");\n }\n if (this.menuPanel && !panel) {\n this.showContainer(eventSource, suppressFocus);\n } else {\n const menuPanel = panel || this.defaultPanel;\n let tab = this.panels.indexOf(menuPanel);\n if (tab < 0) {\n console.warn(`AG Grid: '${panel}' is not a valid Chart Tool Panel name`);\n tab = this.panels.indexOf(this.defaultPanel);\n }\n if (this.menuPanel) {\n this.tabbedMenu.showTab(tab);\n this.showContainer(eventSource, suppressFocus);\n } else {\n this.createMenuPanel(tab).then(() => this.showContainer(eventSource, suppressFocus));\n }\n }\n if (!animate) {\n setTimeout(() => {\n if (!this.isAlive()) {\n return;\n }\n this.eMenuPanelContainer.classList.remove(\"ag-no-transition\");\n }, 500);\n }\n }\n hideMenu(animate = true) {\n if (!animate) {\n this.eMenuPanelContainer.classList.add(\"ag-no-transition\");\n }\n this.hideParent();\n window.setTimeout(() => {\n this.menuVisible = false;\n this.refreshMenuClasses();\n if (!animate) {\n this.eMenuPanelContainer.classList.remove(\"ag-no-transition\");\n }\n }, 500);\n }\n refreshMenuClasses() {\n this.eChartContainer.classList.toggle(\"ag-chart-menu-visible\", this.menuVisible);\n this.eChartContainer.classList.toggle(\"ag-chart-menu-hidden\", !this.menuVisible);\n if (this.legacyFormat && !this.gos.get(\"suppressChartToolPanelsButton\")) {\n this.eHideButtonIcon.classList.toggle(\"ag-icon-contracted\", this.menuVisible);\n this.eHideButtonIcon.classList.toggle(\"ag-icon-expanded\", !this.menuVisible);\n }\n }\n showParent(width) {\n this.eMenuPanelContainer.style.minWidth = `${width}px`;\n }\n hideParent() {\n this.eMenuPanelContainer.style.minWidth = \"0\";\n }\n showMenuList(eventSource) {\n this.chartMenuListFactory.showMenuList({\n eventSource,\n showMenu: () => this.showMenu({ animate: false, eventSource }),\n chartMenuContext: this.chartMenuContext\n });\n }\n destroy() {\n super.destroy();\n if (this.menuPanel && this.menuPanel.isAlive()) {\n this.destroyBean(this.menuPanel);\n }\n if (this.tabbedMenu && this.tabbedMenu.isAlive()) {\n this.destroyBean(this.tabbedMenu);\n }\n }\n};\n_ChartMenu.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired37(\"chartMenuService\")\n], _ChartMenu.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n Autowired37(\"chartMenuListFactory\")\n], _ChartMenu.prototype, \"chartMenuListFactory\", 2);\n__decorateClass4([\n PostConstruct40\n], _ChartMenu.prototype, \"postConstruct\", 1);\nvar ChartMenu = _ChartMenu;\nvar _TitleEdit = class _TitleEdit2 extends Component35 {\n constructor(chartMenu) {\n super(_TitleEdit2.TEMPLATE);\n this.chartMenu = chartMenu;\n this.destroyableChartListeners = [];\n this.editing = false;\n }\n init() {\n this.addManagedListener(this.getGui(), \"keydown\", (e) => {\n if (this.editing && e.key === \"Enter\" && !e.shiftKey) {\n this.handleEndEditing();\n e.preventDefault();\n }\n });\n this.addManagedListener(this.getGui(), \"input\", () => {\n if (this.editing) {\n this.updateHeight();\n }\n });\n this.addManagedListener(this.getGui(), \"blur\", () => this.endEditing());\n }\n /* should be called when the containing component changes to a new chart proxy */\n refreshTitle(chartMenuContext) {\n this.chartController = chartMenuContext.chartController;\n this.chartOptionsService = chartMenuContext.chartOptionsService;\n this.chartMenuUtils = chartMenuContext.chartMenuParamsFactory.getChartOptions();\n for (const destroyFn of this.destroyableChartListeners) {\n destroyFn();\n }\n this.destroyableChartListeners = [];\n const chartProxy = this.chartController.getChartProxy();\n const chart = chartProxy.getChart();\n const canvas = chart.canvasElement;\n const destroyDbleClickListener = this.addManagedListener(canvas, \"dblclick\", (event) => {\n const { title } = chart;\n if (title && title.node.containsPoint(event.offsetX, event.offsetY)) {\n const bbox = title.node.computeBBox();\n const xy = title.node.inverseTransformPoint(bbox.x, bbox.y);\n this.startEditing(__spreadValues3(__spreadValues3({}, bbox), xy), canvas.width);\n }\n });\n let wasInTitle = false;\n const destroyMouseMoveListener = this.addManagedListener(canvas, \"mousemove\", (event) => {\n const { title } = chart;\n const inTitle = !!(title && title.enabled && title.node.containsPoint(event.offsetX, event.offsetY));\n if (wasInTitle !== inTitle) {\n canvas.style.cursor = inTitle ? \"pointer\" : \"\";\n }\n wasInTitle = inTitle;\n });\n this.destroyableChartListeners = [\n destroyDbleClickListener,\n destroyMouseMoveListener\n ];\n }\n startEditing(titleBBox, canvasWidth) {\n if (this.chartMenuService.isLegacyFormat() && this.chartMenu && this.chartMenu.isVisible()) {\n return;\n }\n if (this.editing) {\n return;\n }\n this.editing = true;\n const minimumTargetInputWidth = 300;\n const inputWidth = Math.max(Math.min(titleBBox.width + 20, canvasWidth), minimumTargetInputWidth);\n const element = this.getGui();\n element.classList.add(\"currently-editing\");\n const inputStyle = element.style;\n inputStyle.fontFamily = this.chartMenuUtils.getValue(\"title.fontFamily\");\n inputStyle.fontWeight = this.chartMenuUtils.getValue(\"title.fontWeight\");\n inputStyle.fontStyle = this.chartMenuUtils.getValue(\"title.fontStyle\");\n inputStyle.fontSize = this.chartMenuUtils.getValue(\"title.fontSize\") + \"px\";\n inputStyle.color = this.chartMenuUtils.getValue(\"title.color\");\n const oldTitle = this.chartMenuUtils.getValue(\"title.text\");\n const isTitlePlaceholder = oldTitle === this.chartTranslationService.translate(\"titlePlaceholder\");\n element.value = isTitlePlaceholder ? \"\" : oldTitle;\n const oldTitleLines = oldTitle.split(/\\r?\\n/g).length;\n inputStyle.left = Math.round(titleBBox.x + titleBBox.width / 2 - inputWidth / 2 - 1) + \"px\";\n inputStyle.top = Math.round(titleBBox.y + titleBBox.height / 2 - oldTitleLines * this.getLineHeight() / 2 - 2) + \"px\";\n inputStyle.width = Math.round(inputWidth) + \"px\";\n inputStyle.lineHeight = this.getLineHeight() + \"px\";\n this.updateHeight();\n element.focus();\n }\n updateHeight() {\n const element = this.getGui();\n const oldTitleLines = this.chartMenuUtils.getValue(\"title.text\").split(/\\r?\\n/g).length;\n const currentTitleLines = element.value.split(/\\r?\\n/g).length;\n element.style.height = Math.round(Math.max(oldTitleLines, currentTitleLines) * this.getLineHeight()) + 4 + \"px\";\n }\n getLineHeight() {\n const fixedLineHeight = this.chartMenuUtils.getValue(\"title.lineHeight\");\n if (fixedLineHeight) {\n return parseInt(fixedLineHeight);\n }\n return Math.round(parseInt(this.chartMenuUtils.getValue(\"title.fontSize\")) * 1.2);\n }\n handleEndEditing() {\n const titleColor = this.chartMenuUtils.getValue(\"title.color\");\n const transparentColor = \"rgba(0, 0, 0, 0)\";\n this.chartMenuUtils.setValue(\"title.color\", transparentColor);\n this.chartOptionsService.awaitChartOptionUpdate(() => this.endEditing());\n this.chartOptionsService.awaitChartOptionUpdate(() => {\n this.chartMenuUtils.setValue(\"title.color\", titleColor);\n });\n }\n endEditing() {\n if (!this.editing) {\n return;\n }\n this.editing = false;\n const value = this.getGui().value;\n if (value && value.trim() !== \"\") {\n this.chartMenuUtils.setValue(\"title.text\", value);\n this.chartMenuUtils.setValue(\"title.enabled\", true);\n } else {\n this.chartMenuUtils.setValue(\"title.text\", \"\");\n this.chartMenuUtils.setValue(\"title.enabled\", false);\n }\n this.getGui().classList.remove(\"currently-editing\");\n this.chartOptionsService.awaitChartOptionUpdate(() => {\n this.eventService.dispatchEvent({ type: \"chartTitleEdit\" });\n });\n }\n};\n_TitleEdit.TEMPLATE = /* html */\n`\n `;\n__decorateClass4([\n Autowired38(\"chartTranslationService\")\n], _TitleEdit.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired38(\"chartMenuService\")\n], _TitleEdit.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n PostConstruct41\n], _TitleEdit.prototype, \"init\", 1);\nvar TitleEdit = _TitleEdit;\nfunction deproxy(chartOrProxy) {\n if (chartOrProxy.chart != null) {\n return chartOrProxy.chart;\n }\n return chartOrProxy;\n}\nvar ChartProxy = class {\n constructor(chartProxyParams) {\n this.chartProxyParams = chartProxyParams;\n this.clearThemeOverrides = false;\n this.isEnterpriseCharts = _ModuleSupport4.enterpriseModule.isEnterprise;\n this.chart = chartProxyParams.chartInstance;\n this.chartType = chartProxyParams.chartType;\n this.crossFiltering = chartProxyParams.crossFiltering;\n this.crossFilterCallback = chartProxyParams.crossFilterCallback;\n this.standaloneChartType = getSeriesType(this.chartType);\n if (this.chart == null) {\n this.chart = AgCharts.create(this.getCommonChartOptions());\n } else {\n this.clearThemeOverrides = true;\n }\n }\n crossFilteringReset() {\n }\n update(params) {\n AgCharts.update(this.getChartRef(), this.getUpdateOptions(params, this.getCommonChartOptions(params.updatedOverrides)));\n }\n updateThemeOverrides(themeOverrides) {\n AgCharts.updateDelta(this.getChartRef(), { theme: { overrides: themeOverrides } });\n }\n getChart() {\n return deproxy(this.chart);\n }\n getChartRef() {\n return this.chart;\n }\n downloadChart(dimensions, fileName, fileFormat) {\n const { chart } = this;\n const rawChart = deproxy(chart);\n const imageFileName = fileName || (rawChart.title ? rawChart.title.text : \"chart\");\n const { width, height } = dimensions || {};\n AgCharts.download(chart, { width, height, fileName: imageFileName, fileFormat });\n }\n getChartImageDataURL(type) {\n return this.getChart().getCanvasDataURL(type);\n }\n getChartOptions() {\n return this.chart.getOptions();\n }\n getChartThemeOverrides() {\n var _a;\n const chartOptionsTheme = this.getChartOptions().theme;\n return (_a = chartOptionsTheme.overrides) != null ? _a : {};\n }\n getChartPalette() {\n return _Theme8.getChartTheme(this.getChartOptions().theme).palette;\n }\n setPaired(paired) {\n const seriesType = getSeriesType(this.chartProxyParams.chartType);\n AgCharts.updateDelta(this.chart, { theme: { overrides: { [seriesType]: { paired } } } });\n }\n isPaired() {\n const seriesType = getSeriesType(this.chartProxyParams.chartType);\n return get(this.getChartThemeOverrides(), `${seriesType}.paired`, true);\n }\n lookupCustomChartTheme(themeName) {\n return lookupCustomChartTheme(this.chartProxyParams, themeName);\n }\n getSeriesGroupType() {\n return void 0;\n }\n transformCategoryData(data, categoryKey) {\n return data.map((d, index) => {\n const value = d[categoryKey];\n const valueString = value && value.toString ? value.toString() : \"\";\n const datum = __spreadValues3({}, d);\n datum[categoryKey] = { id: index, value, toString: () => valueString };\n return datum;\n });\n }\n getCommonChartOptions(updatedOverrides) {\n var _a, _b;\n const existingOptions = this.clearThemeOverrides ? {} : (_b = (_a = this.chart) == null ? void 0 : _a.getOptions()) != null ? _b : {};\n const formattingPanelOverrides = this.chart != null ? this.getActiveFormattingPanelOverrides() : void 0;\n this.clearThemeOverrides = false;\n const theme = createAgChartTheme(\n this.chartProxyParams,\n this,\n this.isEnterpriseCharts,\n this.getChartThemeDefaults(),\n updatedOverrides != null ? updatedOverrides : formattingPanelOverrides\n );\n const newOptions = __spreadProps3(__spreadValues3({}, existingOptions), {\n mode: \"integrated\"\n });\n newOptions.theme = theme;\n newOptions.container = this.chartProxyParams.parentElement;\n return newOptions;\n }\n getChartThemeDefaults() {\n const seriesOverrides = this.getSeriesChartThemeDefaults();\n const seriesChartOptions = seriesOverrides ? {\n [this.standaloneChartType]: seriesOverrides\n } : {};\n const crosshair = {\n enabled: true,\n snap: true,\n label: {\n enabled: false\n }\n };\n return __spreadValues3({\n common: {\n navigator: {\n enabled: false\n },\n zoom: {\n enabled: true\n },\n animation: {\n enabled: true,\n duration: 500\n },\n axes: {\n number: { crosshair },\n category: { crosshair },\n log: { crosshair },\n time: { crosshair }\n }\n }\n }, seriesChartOptions);\n }\n getSeriesChartThemeDefaults() {\n return void 0;\n }\n getActiveFormattingPanelOverrides() {\n var _a, _b;\n if (this.clearThemeOverrides) {\n return {};\n }\n const inUseTheme = (_a = this.chart) == null ? void 0 : _a.getOptions().theme;\n return (_b = inUseTheme == null ? void 0 : inUseTheme.overrides) != null ? _b : {};\n }\n destroy({ keepChartInstance = false } = {}) {\n if (keepChartInstance) {\n this.chart.resetAnimations();\n return this.chart;\n }\n this.destroyChart();\n }\n destroyChart() {\n if (this.chart) {\n this.chart.destroy();\n this.chart = void 0;\n }\n }\n};\nvar CartesianChartProxy = class extends ChartProxy {\n constructor(params) {\n super(params);\n this.crossFilteringAllPoints = /* @__PURE__ */ new Set();\n this.crossFilteringSelectedPoints = [];\n }\n getUpdateOptions(params, commonChartOptions) {\n const axes = this.getAxes(params, commonChartOptions);\n return __spreadProps3(__spreadValues3({}, commonChartOptions), {\n data: this.getData(params, axes),\n axes,\n series: this.getSeries(params)\n });\n }\n getData(params, axes) {\n const supportsCrossFiltering = [\"area\", \"line\"].includes(this.standaloneChartType);\n return this.crossFiltering && supportsCrossFiltering ? this.getCrossFilterData(params) : this.getDataTransformedData(params, axes);\n }\n getDataTransformedData(params, axes) {\n const xAxisType = axes[0].type;\n const { categories, data } = params;\n const [category] = categories;\n switch (xAxisType) {\n case \"category\":\n return this.transformCategoryData(data, category.id);\n case \"time\":\n return this.transformTimeData(data, category.id);\n default:\n return data;\n }\n }\n getXAxisType(params) {\n if (params.grouping) {\n return \"grouped-category\";\n } else if (this.isXAxisOfType(params, \"time\", (value) => value instanceof Date)) {\n return \"time\";\n } else if (this.isXAxisOfType(params, \"number\")) {\n return \"number\";\n }\n return \"category\";\n }\n isXAxisOfType(params, type, isInstance) {\n const [category] = params.categories;\n if (category == null ? void 0 : category.chartDataType) {\n return category.chartDataType === type;\n }\n if (!isInstance) {\n return false;\n }\n const testDatum = params.data[0];\n if (!testDatum) {\n return false;\n }\n return isInstance(testDatum[category.id]);\n }\n transformTimeData(data, categoryKey) {\n var _a;\n const firstValue = (_a = data[0]) == null ? void 0 : _a[categoryKey];\n if (firstValue instanceof Date) {\n return data;\n }\n return data.map((datum) => {\n const value = datum[categoryKey];\n return typeof value === \"string\" ? __spreadProps3(__spreadValues3({}, datum), {\n [categoryKey]: new Date(value)\n }) : datum;\n });\n }\n crossFilteringReset() {\n this.crossFilteringSelectedPoints = [];\n this.crossFilteringAllPoints.clear();\n }\n crossFilteringPointSelected(point) {\n return this.crossFilteringSelectedPoints.length == 0 || this.crossFilteringSelectedPoints.includes(point);\n }\n crossFilteringDeselectedPoints() {\n return this.crossFilteringSelectedPoints.length > 0 && this.crossFilteringAllPoints.size !== this.crossFilteringSelectedPoints.length;\n }\n extractLineAreaCrossFilterSeries(series, params) {\n const [category] = params.categories;\n const getYKey = (yKey) => {\n if (this.standaloneChartType === \"area\") {\n const lastSelectedChartId = params.getCrossFilteringContext().lastSelectedChartId;\n return lastSelectedChartId === params.chartId ? yKey + \"-total\" : yKey;\n }\n return yKey + \"-total\";\n };\n return series.map((s) => {\n s.yKey = getYKey(s.yKey);\n s.listeners = {\n nodeClick: (e) => {\n const value = e.datum[s.xKey];\n const multiSelection = e.event.metaKey || e.event.ctrlKey;\n this.crossFilteringAddSelectedPoint(multiSelection, value);\n this.crossFilterCallback(e);\n }\n };\n s.marker = {\n formatter: (p) => {\n const value = p.datum[category.id];\n return {\n fill: p.highlighted ? \"yellow\" : p.fill,\n size: p.highlighted ? 14 : this.crossFilteringPointSelected(value) ? 8 : 0\n };\n }\n };\n if (this.standaloneChartType === \"area\") {\n s.fillOpacity = this.crossFilteringDeselectedPoints() ? 0.3 : 1;\n }\n if (this.standaloneChartType === \"line\") {\n s.strokeOpacity = this.crossFilteringDeselectedPoints() ? 0.3 : 1;\n }\n return s;\n });\n }\n getCrossFilterData(params) {\n this.crossFilteringAllPoints.clear();\n const [category] = params.categories;\n const colId = params.fields[0].colId;\n const filteredOutColId = `${colId}-filtered-out`;\n const lastSelectedChartId = params.getCrossFilteringContext().lastSelectedChartId;\n return params.data.map((d) => {\n const value = d[category.id];\n this.crossFilteringAllPoints.add(value);\n const pointSelected = this.crossFilteringPointSelected(value);\n if (this.standaloneChartType === \"area\" && lastSelectedChartId === params.chartId) {\n d[`${colId}-total`] = pointSelected ? d[colId] : d[colId] + d[filteredOutColId];\n }\n if (this.standaloneChartType === \"line\") {\n d[`${colId}-total`] = pointSelected ? d[colId] : d[colId] + d[filteredOutColId];\n }\n return d;\n });\n }\n crossFilteringAddSelectedPoint(multiSelection, value) {\n multiSelection ? this.crossFilteringSelectedPoints.push(value) : this.crossFilteringSelectedPoints = [value];\n }\n isHorizontal(commonChartOptions) {\n const seriesType = this.standaloneChartType;\n if (seriesType !== \"waterfall\" && seriesType !== \"box-plot\" && seriesType !== \"range-bar\") {\n return false;\n }\n const theme = commonChartOptions.theme;\n const isHorizontal = (theme2) => {\n var _a, _b, _c;\n const direction = (_c = (_b = (_a = theme2 == null ? void 0 : theme2.overrides) == null ? void 0 : _a[seriesType]) == null ? void 0 : _b.series) == null ? void 0 : _c.direction;\n if (direction != null) {\n return direction === \"horizontal\";\n }\n if (typeof (theme2 == null ? void 0 : theme2.baseTheme) === \"object\") {\n return isHorizontal(theme2.baseTheme);\n }\n return false;\n };\n return isHorizontal(theme);\n }\n};\nfunction hexToRGBA(hex, alpha) {\n const r = parseInt(hex.slice(1, 3), 16);\n const g = parseInt(hex.slice(3, 5), 16);\n const b = parseInt(hex.slice(5, 7), 16);\n return alpha ? `rgba(${r}, ${g}, ${b}, ${alpha})` : `rgba(${r}, ${g}, ${b})`;\n}\nfunction changeOpacity(fills, alpha) {\n return fills.map((fill) => {\n const c = _Util6.Color.fromString(fill);\n return new _Util6.Color(c.r, c.g, c.b, alpha).toHexString();\n });\n}\nvar HORIZONTAL_CHART_TYPES = /* @__PURE__ */ new Set([\"bar\", \"groupedBar\", \"stackedBar\", \"normalizedBar\"]);\nvar BarChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(params) {\n const axes = [\n {\n type: this.getXAxisType(params),\n position: this.isHorizontal() ? \"left\" : \"bottom\"\n },\n {\n type: \"number\",\n position: this.isHorizontal() ? \"bottom\" : \"left\"\n }\n ];\n if (this.isNormalised()) {\n const numberAxis = axes[1];\n numberAxis.label = __spreadProps3(__spreadValues3({}, numberAxis.label), { formatter: (params2) => Math.round(params2.value) + \"%\" });\n }\n return axes;\n }\n getSeries(params) {\n const [category] = params.categories;\n const series = params.fields.map((f) => ({\n type: this.standaloneChartType,\n direction: this.isHorizontal() ? \"horizontal\" : \"vertical\",\n stacked: this.crossFiltering || isStacked(this.chartType),\n normalizedTo: this.isNormalised() ? 100 : void 0,\n xKey: category.id,\n xName: category.name,\n yKey: f.colId,\n yName: f.displayName\n }));\n return this.crossFiltering ? this.extractCrossFilterSeries(series) : series;\n }\n extractCrossFilterSeries(series) {\n const palette = this.getChartPalette();\n const updatePrimarySeries = (seriesOptions, index) => {\n return __spreadProps3(__spreadValues3({}, seriesOptions), {\n highlightStyle: { item: { fill: void 0 } },\n fill: palette == null ? void 0 : palette.fills[index],\n stroke: palette == null ? void 0 : palette.strokes[index],\n listeners: {\n nodeClick: this.crossFilterCallback\n }\n });\n };\n const updateFilteredOutSeries = (seriesOptions) => {\n const yKey = seriesOptions.yKey + \"-filtered-out\";\n return __spreadProps3(__spreadValues3({}, deepMerge({}, seriesOptions)), {\n yKey,\n fill: hexToRGBA(seriesOptions.fill, \"0.3\"),\n stroke: hexToRGBA(seriesOptions.stroke, \"0.3\"),\n showInLegend: false\n });\n };\n const allSeries = [];\n for (let i = 0; i < series.length; i++) {\n const primarySeries = updatePrimarySeries(series[i], i);\n allSeries.push(primarySeries);\n allSeries.push(updateFilteredOutSeries(primarySeries));\n }\n return allSeries;\n }\n isNormalised() {\n const normalisedCharts = [\"normalizedColumn\", \"normalizedBar\"];\n return !this.crossFiltering && _30.includes(normalisedCharts, this.chartType);\n }\n isHorizontal() {\n return HORIZONTAL_CHART_TYPES.has(this.chartType);\n }\n};\nvar AreaChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(params) {\n const axes = [\n {\n type: this.getXAxisType(params),\n position: \"bottom\"\n },\n {\n type: \"number\",\n position: \"left\"\n }\n ];\n if (this.isNormalised()) {\n const numberAxis = axes[1];\n numberAxis.label = __spreadProps3(__spreadValues3({}, numberAxis.label), { formatter: (params2) => Math.round(params2.value) + \"%\" });\n }\n return axes;\n }\n getSeries(params) {\n const [category] = params.categories;\n const series = params.fields.map((f) => ({\n type: this.standaloneChartType,\n xKey: category.id,\n xName: category.name,\n yKey: f.colId,\n yName: f.displayName,\n normalizedTo: this.chartType === \"normalizedArea\" ? 100 : void 0,\n stacked: [\"normalizedArea\", \"stackedArea\"].includes(this.chartType)\n }));\n return this.crossFiltering ? this.extractLineAreaCrossFilterSeries(series, params) : series;\n }\n isNormalised() {\n return !this.crossFiltering && this.chartType === \"normalizedArea\";\n }\n};\nvar LineChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(params) {\n return [\n {\n type: this.getXAxisType(params),\n position: \"bottom\"\n },\n {\n type: \"number\",\n position: \"left\"\n }\n ];\n }\n getSeries(params) {\n const [category] = params.categories;\n const series = params.fields.map((f) => ({\n type: this.standaloneChartType,\n xKey: category.id,\n xName: category.name,\n yKey: f.colId,\n yName: f.displayName\n }));\n return this.crossFiltering ? this.extractLineAreaCrossFilterSeries(series, params) : series;\n }\n};\nvar PolarChartProxy = class extends ChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(_382) {\n const radialBar = this.standaloneChartType === \"radial-bar\";\n return [\n { type: radialBar ? \"angle-number\" : \"angle-category\" },\n { type: radialBar ? \"radius-category\" : \"radius-number\" }\n ];\n }\n getSeries(params) {\n const { fields, categories, seriesGroupType } = params;\n const [category] = categories;\n const radialBar = this.standaloneChartType === \"radial-bar\";\n const seriesGroupTypeOptions = this.getSeriesGroupTypeOptions(seriesGroupType);\n return fields.map((f) => {\n var _a, _b;\n return __spreadValues3({\n type: this.standaloneChartType,\n angleKey: radialBar ? f.colId : category.id,\n angleName: radialBar ? (_a = f.displayName) != null ? _a : void 0 : category.name,\n radiusKey: radialBar ? category.id : f.colId,\n radiusName: radialBar ? category.name : (_b = f.displayName) != null ? _b : void 0\n }, seriesGroupTypeOptions);\n });\n }\n getSeriesGroupType() {\n var _a, _b;\n const standaloneChartType = this.standaloneChartType;\n if (![\"nightingale\", \"radial-bar\", \"radial-column\"].includes(standaloneChartType)) {\n return void 0;\n }\n const firstSeriesProperties = (_b = (_a = this.getChart().series) == null ? void 0 : _a[0]) == null ? void 0 : _b.properties.toJson();\n const getStackedValue = () => firstSeriesProperties.normalizedTo ? \"normalized\" : \"stacked\";\n if (standaloneChartType === \"nightingale\") {\n return firstSeriesProperties.grouped ? \"grouped\" : getStackedValue();\n } else {\n return firstSeriesProperties.stacked ? getStackedValue() : \"grouped\";\n }\n }\n getUpdateOptions(params, commonChartOptions) {\n const axes = this.getAxes(params);\n return __spreadProps3(__spreadValues3({}, commonChartOptions), {\n data: this.getData(params, axes),\n axes,\n series: this.getSeries(params)\n });\n }\n getData(params, axes) {\n const isCategoryAxis = axes.some((axis) => axis.type === \"angle-category\" || axis.type === \"radius-category\");\n if (isCategoryAxis) {\n const [category] = params.categories;\n return this.transformCategoryData(params.data, category.id);\n } else {\n return params.data;\n }\n }\n getSeriesGroupTypeOptions(seriesGroupType) {\n if (!seriesGroupType) {\n return {};\n }\n return {\n grouped: seriesGroupType === \"grouped\" || void 0,\n stacked: seriesGroupType !== \"grouped\" || void 0,\n normalizedTo: seriesGroupType === \"normalized\" ? 100 : void 0\n };\n }\n};\nvar PieChartProxy = class _PieChartProxy extends ChartProxy {\n constructor(params) {\n super(params);\n }\n getUpdateOptions(params, commonChartOptions) {\n return __spreadProps3(__spreadValues3({}, commonChartOptions), {\n data: this.crossFiltering ? this.getCrossFilterData(params) : params.data,\n series: this.getSeries(params)\n });\n }\n getSeries(params) {\n const [category] = params.categories;\n const numFields = params.fields.length;\n const offset = {\n currentOffset: 0,\n offsetAmount: numFields > 1 ? 20 : 40\n };\n const series = this.getFields(params).map((f) => {\n var _a;\n const options = {\n type: this.standaloneChartType,\n angleKey: f.colId,\n angleName: f.displayName,\n sectorLabelKey: f.colId,\n calloutLabelName: category.name,\n calloutLabelKey: category.id\n };\n if (this.chartType === \"donut\" || this.chartType === \"doughnut\") {\n const { outerRadiusOffset, innerRadiusOffset } = _PieChartProxy.calculateOffsets(offset);\n const title = f.displayName ? {\n title: { text: f.displayName, showInLegend: numFields > 1 }\n } : void 0;\n return __spreadProps3(__spreadValues3(__spreadProps3(__spreadValues3({}, options), {\n type: \"donut\",\n outerRadiusOffset,\n innerRadiusOffset\n }), title), {\n calloutLine: {\n colors: (_a = this.getChartPalette()) == null ? void 0 : _a.strokes\n }\n });\n }\n return options;\n });\n return this.crossFiltering ? this.extractCrossFilterSeries(series) : series;\n }\n getCrossFilterData(params) {\n const colId = params.fields[0].colId;\n const filteredOutColId = `${colId}-filtered-out`;\n return params.data.map((d) => {\n const total = d[colId] + d[filteredOutColId];\n d[`${colId}-total`] = total;\n d[filteredOutColId] = 1;\n d[colId] = d[colId] / total;\n return d;\n });\n }\n extractCrossFilterSeries(series) {\n const palette = this.getChartPalette();\n const primaryOptions = (seriesOptions) => {\n return __spreadProps3(__spreadValues3({}, seriesOptions), {\n legendItemKey: seriesOptions.calloutLabelKey,\n calloutLabel: { enabled: false },\n // hide labels on primary series\n highlightStyle: { item: { fill: void 0 } },\n radiusKey: seriesOptions.angleKey,\n angleKey: seriesOptions.angleKey + \"-total\",\n radiusMin: 0,\n radiusMax: 1,\n listeners: {\n nodeClick: this.crossFilterCallback\n }\n });\n };\n const filteredOutOptions = (seriesOptions, angleKey2) => {\n var _a, _b;\n return __spreadProps3(__spreadValues3({}, deepMerge({}, primaryOpts)), {\n radiusKey: angleKey2 + \"-filtered-out\",\n fills: changeOpacity((_a = seriesOptions.fills) != null ? _a : palette.fills, 0.3),\n strokes: changeOpacity((_b = seriesOptions.strokes) != null ? _b : palette.strokes, 0.3),\n showInLegend: false\n });\n };\n const primarySeries = series[0];\n const angleKey = primarySeries.angleKey;\n const primaryOpts = primaryOptions(primarySeries);\n return [\n filteredOutOptions(primarySeries, angleKey),\n primaryOpts\n ];\n }\n static calculateOffsets(offset) {\n const outerRadiusOffset = offset.currentOffset;\n offset.currentOffset -= offset.offsetAmount;\n const innerRadiusOffset = offset.currentOffset;\n offset.currentOffset -= offset.offsetAmount;\n return { outerRadiusOffset, innerRadiusOffset };\n }\n getFields(params) {\n return this.chartType === \"pie\" ? params.fields.slice(0, 1) : params.fields;\n }\n};\nvar ScatterChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(_params) {\n return [\n {\n type: \"number\",\n position: \"bottom\"\n },\n {\n type: \"number\",\n position: \"left\"\n }\n ];\n }\n getSeries(params) {\n const [category] = params.categories;\n const paired = this.isPaired();\n const seriesDefinitions = this.getSeriesDefinitions(params.fields, paired);\n const labelFieldDefinition = category.id === ChartDataModel.DEFAULT_CATEGORY ? void 0 : category;\n const series = seriesDefinitions.map((seriesDefinition) => {\n var _a, _b, _c, _d, _e;\n if (seriesDefinition == null ? void 0 : seriesDefinition.sizeField) {\n const opts2 = {\n type: \"bubble\",\n xKey: seriesDefinition.xField.colId,\n xName: (_a = seriesDefinition.xField.displayName) != null ? _a : void 0,\n yKey: seriesDefinition.yField.colId,\n yName: (_b = seriesDefinition.yField.displayName) != null ? _b : void 0,\n title: `${seriesDefinition.yField.displayName} vs ${seriesDefinition.xField.displayName}`,\n sizeKey: seriesDefinition.sizeField.colId,\n sizeName: (_c = seriesDefinition.sizeField.displayName) != null ? _c : \"\",\n labelKey: labelFieldDefinition ? labelFieldDefinition.id : seriesDefinition.yField.colId,\n labelName: labelFieldDefinition ? labelFieldDefinition.name : void 0\n };\n return opts2;\n }\n const opts = {\n type: \"scatter\",\n xKey: seriesDefinition.xField.colId,\n xName: (_d = seriesDefinition.xField.displayName) != null ? _d : void 0,\n yKey: seriesDefinition.yField.colId,\n yName: (_e = seriesDefinition.yField.displayName) != null ? _e : void 0,\n title: `${seriesDefinition.yField.displayName} vs ${seriesDefinition.xField.displayName}`,\n labelKey: labelFieldDefinition ? labelFieldDefinition.id : seriesDefinition.yField.colId,\n labelName: labelFieldDefinition ? labelFieldDefinition.name : void 0\n };\n return opts;\n });\n return this.crossFiltering ? this.extractCrossFilterSeries(series, params) : series;\n }\n extractCrossFilterSeries(series, params) {\n const { data } = params;\n const palette = this.getChartPalette();\n const filteredOutKey = (key) => `${key}-filtered-out`;\n const calcMarkerDomain = (data2, sizeKey) => {\n var _a;\n const markerDomain = [Infinity, -Infinity];\n if (sizeKey != null) {\n for (const datum of data2) {\n const value = (_a = datum[sizeKey]) != null ? _a : datum[filteredOutKey(sizeKey)];\n if (value < markerDomain[0]) {\n markerDomain[0] = value;\n }\n if (value > markerDomain[1]) {\n markerDomain[1] = value;\n }\n }\n }\n if (markerDomain[0] <= markerDomain[1]) {\n return markerDomain;\n }\n return void 0;\n };\n const updatePrimarySeries = (series2, idx) => {\n const fill = palette == null ? void 0 : palette.fills[idx];\n const stroke = palette == null ? void 0 : palette.strokes[idx];\n let markerDomain = void 0;\n if (series2.type === \"bubble\") {\n const { sizeKey } = series2;\n markerDomain = calcMarkerDomain(data, sizeKey);\n }\n const marker = __spreadProps3(__spreadValues3({}, series2.marker), {\n fill,\n stroke,\n domain: markerDomain\n });\n return __spreadProps3(__spreadValues3({}, series2), {\n marker,\n highlightStyle: { item: { fill: \"yellow\" } },\n listeners: __spreadProps3(__spreadValues3({}, series2.listeners), {\n nodeClick: this.crossFilterCallback\n })\n });\n };\n const updateFilteredOutSeries = (series2) => {\n let { yKey, xKey } = series2;\n let alteredSizeKey = {};\n if (series2.type === \"bubble\") {\n alteredSizeKey = { sizeKey: filteredOutKey(series2.sizeKey) };\n }\n return __spreadProps3(__spreadValues3(__spreadValues3({}, series2), alteredSizeKey), {\n yKey: filteredOutKey(yKey),\n xKey: filteredOutKey(xKey),\n marker: __spreadProps3(__spreadValues3({}, series2.marker), {\n fillOpacity: 0.3,\n strokeOpacity: 0.3\n }),\n showInLegend: false,\n listeners: __spreadProps3(__spreadValues3({}, series2.listeners), {\n nodeClick: (e) => {\n const value = e.datum[filteredOutKey(xKey)];\n const filterableEvent = __spreadProps3(__spreadValues3({}, e), {\n xKey,\n datum: __spreadProps3(__spreadValues3({}, e.datum), { [xKey]: value })\n });\n this.crossFilterCallback(filterableEvent);\n }\n })\n });\n };\n const updatedSeries = series.map(updatePrimarySeries);\n return [\n ...updatedSeries,\n ...updatedSeries.map(updateFilteredOutSeries)\n ];\n }\n getSeriesDefinitions(fields, paired) {\n if (fields.length < 2) {\n return [];\n }\n const isBubbleChart = this.chartType === \"bubble\";\n if (paired) {\n if (isBubbleChart) {\n return fields.map((currentXField, i) => i % 3 === 0 ? {\n xField: currentXField,\n yField: fields[i + 1],\n sizeField: fields[i + 2]\n } : null).filter((x) => x && x.yField && x.sizeField);\n }\n return fields.map((currentXField, i) => i % 2 === 0 ? {\n xField: currentXField,\n yField: fields[i + 1]\n } : null).filter((x) => x && x.yField);\n }\n const xField = fields[0];\n if (isBubbleChart) {\n return fields.map((yField, i) => i % 2 === 1 ? {\n xField,\n yField,\n sizeField: fields[i + 1]\n } : null).filter((x) => x && x.sizeField);\n }\n return fields.filter((value, i) => i > 0).map((yField) => ({ xField, yField }));\n }\n};\nvar StatisticalChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(params, commonChartOptions) {\n return [\n {\n type: this.getXAxisType(params),\n position: this.isHorizontal(commonChartOptions) ? \"left\" : \"bottom\"\n },\n {\n type: \"number\",\n position: this.isHorizontal(commonChartOptions) ? \"bottom\" : \"left\"\n }\n ];\n }\n computeSeriesStatistics(params, computeStatsFn) {\n const { data, fields } = params;\n const [category] = params.categories;\n const categoryKey = category.id || ChartDataModel.DEFAULT_CATEGORY;\n const groupedData = this.groupDataByCategory(categoryKey, data);\n return Array.from(groupedData).map(([categoryValue, categoryData]) => {\n const categoryResult = { [category.id]: categoryValue };\n fields.forEach((field, seriesIndex) => {\n const seriesValues = categoryData.map((datum) => datum[field.colId]).filter((value) => typeof value === \"number\" && !isNaN(value));\n Object.entries(computeStatsFn(seriesValues)).forEach(([statKey, value]) => {\n const propertyKey = `${statKey}:${seriesIndex}`;\n categoryResult[propertyKey] = seriesValues.length > 0 ? value : null;\n });\n });\n return categoryResult;\n });\n }\n groupDataByCategory(categoryKey, data) {\n const getCategory = (datum) => {\n if (categoryKey === ChartDataModel.DEFAULT_CATEGORY) {\n return 1;\n }\n const categoryValue = datum[categoryKey];\n if (categoryValue === null || categoryValue === void 0) {\n return \"\";\n }\n return categoryValue instanceof Date ? categoryValue.getTime() : categoryValue;\n };\n return data.reduce((acc, datum) => {\n let category = getCategory(datum);\n const existingCategoryData = acc.get(category);\n if (existingCategoryData) {\n existingCategoryData.push(datum);\n } else {\n acc.set(category, [datum]);\n }\n return acc;\n }, /* @__PURE__ */ new Map());\n }\n};\nvar RangeChartProxy = class extends StatisticalChartProxy {\n constructor(params) {\n super(params);\n }\n getSeries(params) {\n const [category] = params.categories;\n return params.fields.map(\n (field, seriesIndex) => {\n var _a;\n return {\n type: this.standaloneChartType,\n // xKey/xName refer to category buckets\n xKey: category.id,\n xName: category.name,\n // yName is used to label the series\n yName: (_a = field.displayName) != null ? _a : void 0,\n // custom field labels shown in the tooltip\n yLowName: \"Min\",\n yHighName: \"Max\",\n // generated 'synthetic fields' from getData()\n yLowKey: `min:${seriesIndex}`,\n yHighKey: `max:${seriesIndex}`\n };\n }\n );\n }\n getData(params) {\n return this.computeSeriesStatistics(params, (seriesValues) => {\n return {\n min: Math.min(...seriesValues),\n max: Math.max(...seriesValues)\n };\n });\n }\n};\nvar HistogramChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getSeries(params) {\n const firstField = params.fields[0];\n return [\n {\n type: this.standaloneChartType,\n xKey: firstField.colId,\n xName: firstField.displayName,\n yName: this.chartProxyParams.translate(\"histogramFrequency\"),\n areaPlot: false\n // only constant width is supported via integrated charts\n }\n ];\n }\n getAxes(_params) {\n return [\n {\n type: \"number\",\n position: \"bottom\"\n },\n {\n type: \"number\",\n position: \"left\"\n }\n ];\n }\n};\nvar BoxPlotChartProxy = class extends StatisticalChartProxy {\n constructor(params) {\n super(params);\n }\n getSeries(params) {\n const [category] = params.categories;\n return params.fields.map(\n (field, seriesIndex) => {\n var _a;\n return {\n type: this.standaloneChartType,\n // xKey/xName refer to category buckets\n xKey: category.id,\n xName: category.name,\n // yName is used to label the series\n yName: (_a = field.displayName) != null ? _a : void 0,\n // custom field labels shown in the tooltip\n minName: \"Min\",\n q1Name: \"Q1\",\n medianName: \"Median\",\n q3Name: \"Q3\",\n maxName: \"Max\",\n // generated 'synthetic fields' from getData()\n minKey: `min:${seriesIndex}`,\n q1Key: `q1:${seriesIndex}`,\n medianKey: `median:${seriesIndex}`,\n q3Key: `q3:${seriesIndex}`,\n maxKey: `max:${seriesIndex}`\n };\n }\n );\n }\n getData(params) {\n return this.computeSeriesStatistics(params, (seriesValues) => {\n const sortedValues = seriesValues.sort((a, b) => a - b);\n return {\n min: sortedValues[0],\n q1: this.quantile(sortedValues, 0.25),\n median: this.quantile(sortedValues, 0.5),\n q3: this.quantile(sortedValues, 0.75),\n max: sortedValues[sortedValues.length - 1]\n };\n });\n }\n quantile(sortedValues, q) {\n const position = (sortedValues.length - 1) * q;\n const indexBelow = Math.floor(position);\n const aboveValue = position - indexBelow;\n if (sortedValues[indexBelow + 1] !== void 0) {\n return sortedValues[indexBelow] + aboveValue * (sortedValues[indexBelow + 1] - sortedValues[indexBelow]);\n }\n return sortedValues[indexBelow];\n }\n};\nfunction flatMap(items, iteratee) {\n return items.reduce((acc, item, index, array) => acc.concat(iteratee(item, index, array)), new Array());\n}\nvar HEATMAP_CATEGORY_KEY = \"AG-GRID-DEFAULT-HEATMAP-CATEGORY-KEY\";\nvar HEATMAP_SERIES_KEY = \"AG-GRID-DEFAULT-HEATMAP-SERIES-KEY\";\nvar HEATMAP_VALUE_KEY = \"AG-GRID-DEFAULT-HEATMAP-VALUE-KEY\";\nvar HeatmapChartProxy = class extends ChartProxy {\n constructor(params) {\n super(params);\n }\n getUpdateOptions(params, commonChartOptions) {\n const xSeriesKey = HEATMAP_SERIES_KEY;\n const xValueKey = HEATMAP_VALUE_KEY;\n const yKey = HEATMAP_CATEGORY_KEY;\n return __spreadProps3(__spreadValues3({}, commonChartOptions), {\n series: this.getSeries(params, xSeriesKey, xValueKey, yKey),\n data: this.getData(params, xSeriesKey, xValueKey, yKey)\n });\n }\n getSeries(params, xSeriesKey, xValueKey, yKey) {\n const [category] = params.categories;\n return [\n {\n type: this.standaloneChartType,\n // The axis keys reference synthetic fields based on the category values and series column names\n yKey,\n xKey: xSeriesKey,\n // The color key references a synthetic field based on the series column value for a specific cell\n colorKey: xValueKey,\n yName: category.name,\n // We don't know how to label the 'x' series, as it is a synthetic series created from the set of all input columns\n // In future releases we may want to consider inferring the series label from column groupings etc\n xName: void 0,\n colorName: void 0\n }\n ];\n }\n getData(params, xSeriesKey, xValueKey, yKey) {\n const [category] = params.categories;\n return flatMap(\n params.data,\n (datum, index) => {\n const value = datum[category.id];\n const valueString = value == null ? \"\" : String(value);\n const yValue = { id: index, value, toString: () => valueString };\n return params.fields.map(({ colId, displayName }) => __spreadProps3(__spreadValues3({}, datum), {\n [xSeriesKey]: displayName,\n [xValueKey]: datum[colId],\n [yKey]: yValue\n }));\n }\n );\n }\n getSeriesChartThemeDefaults() {\n return {\n gradientLegend: {\n gradient: {\n preferredLength: 200\n }\n },\n series: {\n tooltip: {\n renderer: renderHeatmapTooltip\n }\n }\n };\n }\n};\nfunction renderHeatmapTooltip(params) {\n const { xKey, yKey, colorKey, yName, datum } = params;\n const table = [\n { label: yName, value: datum[yKey] },\n { label: datum[xKey], value: colorKey && datum[colorKey] }\n ];\n const html = table.map(({ label, value }) => `${sanitizeHtml(String(label))}: ${sanitizeHtml(String(value))}`).join(\"
\");\n return {\n title: \"\",\n content: html\n };\n}\nfunction sanitizeHtml(input) {\n const ESCAPED_CHARS = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\"\n };\n const characterClass = `[${Object.keys(ESCAPED_CHARS).join(\"\")}]`;\n const pattern = new RegExp(characterClass, \"g\");\n return input.replace(pattern, (char) => ESCAPED_CHARS[char]);\n}\nvar WaterfallChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(params, commonChartOptions) {\n return [\n {\n type: this.getXAxisType(params),\n position: this.isHorizontal(commonChartOptions) ? \"left\" : \"bottom\"\n },\n {\n type: \"number\",\n position: this.isHorizontal(commonChartOptions) ? \"bottom\" : \"left\"\n }\n ];\n }\n getSeries(params) {\n var _a;\n const [category] = params.categories;\n const [firstField] = params.fields;\n const firstSeries = {\n type: this.standaloneChartType,\n xKey: category.id,\n xName: category.name,\n yKey: firstField.colId,\n yName: (_a = firstField.displayName) != null ? _a : void 0\n };\n return [firstSeries];\n }\n};\nvar CARTESIAN_AXIS_TYPES = [\"number\", \"category\", \"time\", \"grouped-category\"];\nvar POLAR_AXIS_TYPES = [\"angle-category\", \"angle-number\", \"radius-category\", \"radius-number\"];\nvar VALID_AXIS_TYPES = [...CARTESIAN_AXIS_TYPES, ...POLAR_AXIS_TYPES];\nvar ChartOptionsService = class _ChartOptionsService extends BeanStub8 {\n constructor(chartController) {\n super();\n this.chartController = chartController;\n }\n getChartThemeOverridesProxy() {\n return {\n getValue: (expression) => this.getChartOption(expression),\n setValue: (expression, value) => this.setChartThemeOverrides([{ expression, value }]),\n setValues: (properties) => this.setChartThemeOverrides(properties)\n };\n }\n getAxisThemeOverridesProxy() {\n return {\n getValue: (expression) => this.getAxisProperty(expression),\n setValue: (expression, value) => this.setAxisThemeOverrides([{ expression, value }]),\n setValues: (properties) => this.setAxisThemeOverrides(properties)\n };\n }\n getCartesianAxisOptionsProxy(axisType) {\n return {\n getValue: (expression) => this.getCartesianAxisProperty(axisType, expression),\n setValue: (expression, value) => this.setCartesianAxisOptions(axisType, [{ expression, value }]),\n setValues: (properties) => this.setCartesianAxisOptions(axisType, properties)\n };\n }\n getCartesianAxisThemeOverridesProxy(axisType) {\n return {\n getValue: (expression) => this.getCartesianAxisProperty(axisType, expression),\n setValue: (expression, value) => this.setCartesianAxisThemeOverrides(axisType, [{ expression, value }]),\n setValues: (properties) => this.setCartesianAxisThemeOverrides(axisType, properties)\n };\n }\n getCartesianAxisAppliedThemeOverridesProxy(axisType) {\n return {\n getValue: (expression) => this.getCartesianAxisThemeOverride(\n axisType,\n // Allow the caller to specify a wildcard expression to retrieve the whole set of overrides\n expression === \"*\" ? null : expression\n ),\n setValue: (expression, value) => this.setCartesianAxisThemeOverrides(\n axisType,\n // Allow the caller to specify a wildcard expression to set the whole set of overrides\n [{ expression: expression === \"*\" ? null : expression, value }]\n ),\n setValues: (properties) => this.setCartesianAxisThemeOverrides(axisType, properties)\n };\n }\n getSeriesOptionsProxy(getSelectedSeries) {\n return {\n getValue: (expression, calculated) => this.getSeriesOption(getSelectedSeries(), expression, calculated),\n setValue: (expression, value) => this.setSeriesOptions(getSelectedSeries(), [{ expression, value }]),\n setValues: (properties) => this.setSeriesOptions(getSelectedSeries(), properties)\n };\n }\n /**\n * Determine the set of theme overrides that should be retained when transitioning from one chart type to another.\n */\n getPersistedChartThemeOverrides(existingChartOptions, existingAxes, existingChartType, targetChartType) {\n const retainedThemeOverrideKeys = this.getRetainedChartThemeOverrideKeys(existingChartType, targetChartType);\n const retainedChartAxisThemeOverrideKeys = this.getRetainedChartAxisThemeOverrideKeys(null, existingChartType, targetChartType);\n const targetChartOptions = this.createChartOptions();\n for (const expression of retainedThemeOverrideKeys) {\n const value = this.retrieveChartOptionsThemeOverride(existingChartOptions, existingChartType, expression);\n if (value !== void 0) {\n this.assignChartOptionsThemeOverride(targetChartOptions, targetChartType, expression, value);\n }\n }\n if (existingAxes) {\n this.assignPersistedAxisOverrides({\n existingAxes,\n retainedChartAxisThemeOverrideKeys,\n existingChartOptions,\n targetChartOptions,\n existingChartType,\n targetChartType\n });\n }\n return targetChartOptions.theme.overrides;\n }\n assignPersistedAxisOverrides(params) {\n const { existingAxes, retainedChartAxisThemeOverrideKeys, existingChartOptions, targetChartOptions, existingChartType, targetChartType } = params;\n for (const { expression, targetAxisTypes } of retainedChartAxisThemeOverrideKeys) {\n for (const existingAxisType of existingAxes.map((axis) => axis.type)) {\n const value = this.retrieveChartOptionsThemeOverride(\n existingChartOptions,\n existingChartType,\n [\"axes\", existingAxisType, expression].join(\".\")\n );\n if (value !== void 0) {\n for (const targetAxisType of targetAxisTypes) {\n this.assignChartOptionsThemeOverride(\n targetChartOptions,\n targetChartType,\n [\"axes\", targetAxisType, expression].join(\".\"),\n value\n );\n }\n }\n }\n }\n }\n getRetainedChartThemeOverrideKeys(existingChartType, targetChartType) {\n const UNIVERSAL_PERSISTED_THEME_OVERRIDES = [\"animation\"];\n const PERSISTED_CARTESIAN_CHART_THEME_OVERRIDES = [\"zoom\", \"navigator\"];\n const chartSpecificThemeOverrideKeys = ((previousChartType, updatedChartType) => {\n const expressions = new Array();\n if (isCartesian(getSeriesType(previousChartType)) && isCartesian(getSeriesType(updatedChartType))) {\n expressions.push(...PERSISTED_CARTESIAN_CHART_THEME_OVERRIDES);\n }\n return expressions;\n })(existingChartType, targetChartType);\n return [\n ...UNIVERSAL_PERSISTED_THEME_OVERRIDES,\n ...chartSpecificThemeOverrideKeys\n ];\n }\n getRetainedChartAxisThemeOverrideKeys(axisType, existingChartType, targetChartType) {\n if (isCartesian(getSeriesType(existingChartType)) && isCartesian(getSeriesType(targetChartType))) {\n const retainedKeys = this.getRetainedCartesianAxisThemeOverrideKeys(axisType);\n return retainedKeys.map((expression) => ({ expression, targetAxisTypes: CARTESIAN_AXIS_TYPES }));\n }\n return [];\n }\n getRetainedCartesianAxisThemeOverrideKeys(axisType) {\n const axisPositionSuffixes = axisType === \"xAxis\" ? [\"\", \".top\", \".bottom\"] : axisType === \"yAxis\" ? [\"\", \".left\", \".right\"] : [\"\", \".left\", \".right\", \".top\", \".bottom\"];\n const PERSISTED_CARTESIAN_AXIS_THEME_OVERRIDES = [\"crosshair\"];\n const expressions = new Array();\n for (const expression of PERSISTED_CARTESIAN_AXIS_THEME_OVERRIDES) {\n for (const axisPositionSuffix of axisPositionSuffixes) {\n expressions.push(`${expression}${axisPositionSuffix}`);\n }\n }\n return expressions;\n }\n getChartOption(expression) {\n return get(this.getChart(), expression, void 0);\n }\n setChartThemeOverrides(properties) {\n const chartType = this.getChartType();\n const chartOptions = this.createChartOptions();\n for (const { expression, value } of properties) {\n this.assignChartOptionsThemeOverride(chartOptions, chartType, expression, value);\n }\n this.applyChartOptions(chartOptions);\n }\n applyChartOptions(chartOptions, options) {\n if (Object.keys(chartOptions).length === 0)\n return;\n this.updateChart(chartOptions);\n const shouldRaiseEvent = !(options == null ? void 0 : options.silent);\n if (shouldRaiseEvent)\n this.raiseChartOptionsChangedEvent();\n }\n awaitChartOptionUpdate(func) {\n const chart = this.chartController.getChartProxy().getChart();\n chart.waitForUpdate().then(() => func()).catch((e) => console.error(`AG Grid - chart update failed`, e));\n }\n getAxisProperty(expression) {\n var _a;\n return get((_a = this.getChart().axes) == null ? void 0 : _a[0], expression, void 0);\n }\n setAxisThemeOverrides(properties) {\n var _a;\n const chart = this.getChart();\n const chartType = this.getChartType();\n let chartOptions = this.createChartOptions();\n for (const { expression, value } of properties) {\n const relevantAxes = (_a = chart.axes) == null ? void 0 : _a.filter((axis) => {\n const parts = expression.split(\".\");\n let current = axis;\n for (const part of parts) {\n if (!(part in current)) {\n return false;\n }\n current = current[part];\n }\n return true;\n });\n if (!relevantAxes)\n continue;\n for (const axis of relevantAxes) {\n if (!this.isValidAxisType(axis))\n continue;\n this.assignChartAxisThemeOverride(chartOptions, chartType, axis.type, null, expression, value);\n }\n }\n this.applyChartOptions(chartOptions);\n }\n getCartesianAxisProperty(axisType, expression) {\n const axes = this.getChartAxes();\n const axis = this.getCartesianAxis(axes, axisType);\n return get(axis, expression, void 0);\n }\n getCartesianAxisThemeOverride(axisType, expression) {\n const axes = this.getChartAxes();\n const chartAxis = this.getCartesianAxis(axes, axisType);\n if (!chartAxis || !this.isValidAxisType(chartAxis))\n return void 0;\n const chartType = this.getChartType();\n const chartOptions = this.getChart().getOptions();\n return this.retrieveChartAxisThemeOverride(\n chartOptions,\n chartType,\n chartAxis.type,\n axisType === \"yAxis\" ? [\"left\", \"right\"] : [\"bottom\", \"top\"],\n expression\n );\n }\n setCartesianAxisThemeOverrides(axisType, properties) {\n const axes = this.getChartAxes();\n const chartAxis = this.getCartesianAxis(axes, axisType);\n if (!chartAxis || !this.isValidAxisType(chartAxis))\n return;\n const chartType = this.getChartType();\n let chartOptions = this.createChartOptions();\n for (const { expression, value } of properties) {\n this.assignChartAxisThemeOverride(\n chartOptions,\n chartType,\n chartAxis.type,\n axisType === \"yAxis\" ? [\"left\", \"right\"] : [\"bottom\", \"top\"],\n expression,\n value\n );\n }\n this.applyChartOptions(chartOptions);\n }\n setCartesianAxisOptions(axisType, properties) {\n this.updateCartesianAxisOptions(axisType, (chartOptions, axes, chartAxis) => {\n const axisIndex = axes.indexOf(chartAxis);\n for (const { expression, value } of properties) {\n this.assignChartOption(chartOptions, `axes.${axisIndex}.${expression}`, value);\n }\n });\n }\n updateCartesianAxisOptions(axisType, updateFunc) {\n const existingChartOptions = this.getChart().getOptions();\n const axisOptions = \"axes\" in existingChartOptions ? existingChartOptions.axes : void 0;\n if (!existingChartOptions || !axisOptions)\n return;\n const axes = this.getChartAxes();\n const chartAxis = this.getCartesianAxis(axes, axisType);\n if (!chartAxis)\n return;\n let chartOptions = this.createChartOptions();\n chartOptions.axes = axisOptions;\n updateFunc(chartOptions, axes, chartAxis, existingChartOptions);\n this.applyChartOptions(chartOptions);\n }\n setCartesianCategoryAxisType(axisType, value) {\n this.updateCartesianAxisOptions(axisType, (chartOptions, _axes, chartAxis, existingChartOptions) => {\n const chartType = this.getChartType();\n this.assignPersistedAxisOverrides({\n existingAxes: [chartAxis],\n retainedChartAxisThemeOverrideKeys: this.getRetainedChartAxisThemeOverrideKeys(axisType, chartType, chartType),\n existingChartOptions,\n targetChartOptions: chartOptions,\n existingChartType: chartType,\n targetChartType: chartType\n });\n this.assignChartOption(chartOptions, `axes.0.type`, value);\n this.chartController.setCategoryAxisType(value);\n });\n }\n getCartesianAxis(axes, axisType) {\n if (axes.length < 2) {\n return void 0;\n }\n switch (axisType) {\n case \"xAxis\":\n return axes[0].direction === \"x\" ? axes[0] : axes[1];\n case \"yAxis\":\n return axes[1].direction === \"y\" ? axes[1] : axes[0];\n }\n }\n getSeriesOption(seriesType, expression, calculated) {\n const series = this.getChart().series.find((s) => _ChartOptionsService.isMatchingSeries(seriesType, s));\n return get(calculated ? series : series == null ? void 0 : series.properties.toJson(), expression, void 0);\n }\n setSeriesOptions(seriesType, properties) {\n let chartOptions = this.createChartOptions();\n for (const { expression, value } of properties) {\n this.assignChartOptionsSeriesThemeOverride(\n chartOptions,\n seriesType,\n `series.${expression}`,\n value\n );\n }\n this.applyChartOptions(chartOptions);\n }\n getPairedMode() {\n return this.chartController.getChartProxy().isPaired();\n }\n setPairedMode(paired) {\n this.chartController.getChartProxy().setPaired(paired);\n }\n getChartAxes() {\n var _a;\n const chart = this.getChart();\n return (_a = chart.axes) != null ? _a : [];\n }\n retrieveChartAxisThemeOverride(chartOptions, chartType, axisType, axisPositions, expression) {\n if (axisPositions) {\n for (const axisPosition of axisPositions) {\n const value = this.retrieveChartOptionsThemeOverride(\n chartOptions,\n chartType,\n [\"axes\", axisType, axisPosition, ...expression ? [expression] : []].join(\".\")\n );\n if (value === void 0)\n continue;\n return value;\n }\n } else {\n return this.retrieveChartOptionsThemeOverride(\n chartOptions,\n chartType,\n [\"axes\", axisType, ...expression ? [expression] : []].join(\".\")\n );\n }\n }\n assignChartAxisThemeOverride(chartOptions, chartType, axisType, axisPositions, expression, value) {\n if (axisPositions) {\n for (const axisPosition of axisPositions) {\n this.assignChartOptionsThemeOverride(\n chartOptions,\n chartType,\n [\"axes\", axisType, axisPosition, ...expression ? [expression] : []].join(\".\"),\n value\n );\n }\n } else {\n this.assignChartOptionsThemeOverride(\n chartOptions,\n chartType,\n [\"axes\", axisType, ...expression ? [expression] : []].join(\".\"),\n value\n );\n }\n }\n isValidAxisType(chartAxis) {\n return VALID_AXIS_TYPES.includes(chartAxis.type);\n }\n getChartType() {\n return this.chartController.getChartType();\n }\n getChart() {\n return this.chartController.getChartProxy().getChart();\n }\n updateChart(chartOptions) {\n const chartRef = this.chartController.getChartProxy().getChartRef();\n chartRef.skipAnimations();\n AgCharts2.updateDelta(chartRef, chartOptions);\n }\n createChartOptions() {\n const chartOptions = {\n theme: {\n overrides: {}\n }\n };\n return chartOptions;\n }\n retrieveChartOptionsThemeOverride(chartOptions, chartType, expression) {\n const chartSeriesTypes = this.getChartThemeOverridesSeriesTypeKeys(chartType);\n for (const seriesType of chartSeriesTypes) {\n const value = this.retrieveChartOptionsSeriesThemeOverride(chartOptions, seriesType, expression);\n if (value === void 0)\n continue;\n return value;\n }\n return void 0;\n }\n assignChartOptionsThemeOverride(chartOptions, chartType, expression, value) {\n const chartSeriesTypes = this.getChartThemeOverridesSeriesTypeKeys(chartType);\n for (const seriesType of chartSeriesTypes) {\n this.assignChartOptionsSeriesThemeOverride(chartOptions, seriesType, expression, value);\n }\n }\n retrieveChartOptionsSeriesThemeOverride(chartOptions, seriesType, expression) {\n return this.retrieveChartOption(\n chartOptions,\n [\"theme\", \"overrides\", seriesType, ...expression ? [expression] : []].join(\".\")\n );\n }\n assignChartOptionsSeriesThemeOverride(chartOptions, seriesType, expression, value) {\n this.assignChartOption(\n chartOptions,\n [\"theme\", \"overrides\", seriesType, ...expression ? [expression] : []].join(\".\"),\n value\n );\n }\n getChartThemeOverridesSeriesTypeKeys(chartType) {\n const chartSeriesTypes = this.chartController.getChartSeriesTypes(chartType);\n if (this.chartController.isComboChart()) {\n chartSeriesTypes.push(\"common\");\n }\n return chartSeriesTypes;\n }\n retrieveChartOption(chartOptions, expression) {\n return get(chartOptions, expression, void 0);\n }\n assignChartOption(chartOptions, expression, value) {\n set(chartOptions, expression, value);\n }\n raiseChartOptionsChangedEvent() {\n const chartModel = this.chartController.getChartModel();\n const event = {\n type: Events92.EVENT_CHART_OPTIONS_CHANGED,\n chartId: chartModel.chartId,\n chartType: chartModel.chartType,\n chartThemeName: this.chartController.getChartThemeName(),\n chartOptions: chartModel.chartOptions\n };\n this.eventService.dispatchEvent(event);\n }\n static isMatchingSeries(seriesType, series) {\n return isSeriesType(seriesType) && series.type === seriesType;\n }\n destroy() {\n super.destroy();\n }\n};\nvar ComboChartProxy = class extends CartesianChartProxy {\n constructor(params) {\n super(params);\n }\n getAxes(params) {\n const fields = params ? params.fields : [];\n const fieldsMap = new Map(fields.map((f) => [f.colId, f]));\n const { primaryYKeys, secondaryYKeys } = this.getYKeys(fields, params.seriesChartTypes);\n const axes = [\n {\n type: this.getXAxisType(params),\n position: \"bottom\"\n }\n ];\n if (primaryYKeys.length > 0) {\n axes.push({\n type: \"number\",\n keys: primaryYKeys,\n position: \"left\"\n });\n }\n if (secondaryYKeys.length > 0) {\n secondaryYKeys.forEach((secondaryYKey) => {\n const field = fieldsMap.get(secondaryYKey);\n const secondaryAxisIsVisible = field && field.colId === secondaryYKey;\n if (!secondaryAxisIsVisible) {\n return;\n }\n const secondaryAxisOptions = {\n type: \"number\",\n keys: [secondaryYKey],\n position: \"right\"\n };\n axes.push(secondaryAxisOptions);\n });\n }\n return axes;\n }\n getSeries(params) {\n const { fields, seriesChartTypes } = params;\n const [category] = params.categories;\n return fields.map((field) => {\n const seriesChartType = seriesChartTypes.find((s) => s.colId === field.colId);\n if (seriesChartType) {\n const chartType = seriesChartType.chartType;\n const grouped = [\"groupedColumn\", \"groupedBar\"].includes(chartType);\n const groupedOpts = grouped ? { grouped: true } : {};\n return __spreadValues3({\n type: getSeriesType(chartType),\n xKey: category.id,\n yKey: field.colId,\n yName: field.displayName,\n stacked: [\"stackedArea\", \"stackedColumn\"].includes(chartType)\n }, groupedOpts);\n }\n });\n }\n getYKeys(fields, seriesChartTypes) {\n const primaryYKeys = [];\n const secondaryYKeys = [];\n fields.forEach((field) => {\n const colId = field.colId;\n const seriesChartType = seriesChartTypes.find((s) => s.colId === colId);\n if (seriesChartType) {\n seriesChartType.secondaryAxis ? secondaryYKeys.push(colId) : primaryYKeys.push(colId);\n }\n });\n return { primaryYKeys, secondaryYKeys };\n }\n};\nvar CHART_TOOL_PANEL_ALLOW_LIST = [\n \"chartSettings\",\n \"chartData\",\n \"chartFormat\"\n];\nvar CHART_TOOLBAR_ALLOW_LIST = [\n \"chartUnlink\",\n \"chartLink\",\n \"chartDownload\"\n];\nvar CHART_TOOL_PANEL_MENU_OPTIONS = {\n settings: \"chartSettings\",\n data: \"chartData\",\n format: \"chartFormat\"\n};\nvar ChartMenuService = class extends BeanStub9 {\n isLegacyFormat() {\n return !this.chartService.isEnterprise();\n }\n downloadChart(chartMenuContext, dimensions, fileName, fileFormat) {\n chartMenuContext.chartController.getChartProxy().downloadChart(dimensions, fileName, fileFormat);\n }\n toggleLinked(chartMenuContext) {\n chartMenuContext.chartController.detachChartRange();\n }\n openAdvancedSettings(chartMenuContext, eventSource) {\n this.advancedSettingsMenuFactory.showMenu(chartMenuContext, eventSource);\n }\n hideAdvancedSettings() {\n this.advancedSettingsMenuFactory.hideMenu();\n }\n getToolbarOptionsAndPanels(chartController) {\n var _a, _b, _c;\n const legacyFormat = this.isLegacyFormat();\n const useChartToolPanelCustomisation = Boolean(this.gos.get(\"chartToolPanelsDef\")) || !legacyFormat;\n let panels;\n let defaultPanel;\n let chartToolbarOptions;\n if (useChartToolPanelCustomisation) {\n const defaultChartToolbarOptions = legacyFormat ? [\n chartController.isChartLinked() ? \"chartLink\" : \"chartUnlink\",\n \"chartDownload\"\n ] : [\n \"chartMenu\"\n ];\n const toolbarItemsFunc = this.gos.getCallback(\"getChartToolbarItems\");\n const params = {\n defaultItems: defaultChartToolbarOptions\n };\n chartToolbarOptions = toolbarItemsFunc ? toolbarItemsFunc(params).filter((option) => {\n if (!(legacyFormat ? CHART_TOOLBAR_ALLOW_LIST : [...CHART_TOOLBAR_ALLOW_LIST, \"chartMenu\"]).includes(option)) {\n let msg;\n if (CHART_TOOL_PANEL_ALLOW_LIST.includes(option)) {\n msg = `'${option}' is a Chart Tool Panel option and will be ignored since 'chartToolPanelsDef' is used. Please use 'chartToolPanelsDef.panels' grid option instead`;\n } else if (option === \"chartMenu\") {\n msg = `'chartMenu' is only allowed as a Chart Toolbar Option when using AG Charts Enterprise`;\n } else {\n msg = `'${option}' is not a valid Chart Toolbar Option`;\n }\n _322.warnOnce(msg);\n return false;\n }\n return true;\n }) : defaultChartToolbarOptions;\n const panelsOverride = (_b = (_a = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _a.panels) == null ? void 0 : _b.map((panel) => {\n const menuOption = CHART_TOOL_PANEL_MENU_OPTIONS[panel];\n if (!menuOption) {\n _322.warnOnce(`Invalid panel in chartToolPanelsDef.panels: '${panel}'`);\n }\n return menuOption;\n }).filter((panel) => Boolean(panel));\n panels = panelsOverride ? panelsOverride : Object.values(CHART_TOOL_PANEL_MENU_OPTIONS);\n if (chartController.isPivotChart()) {\n panels = panels.filter((panel) => panel !== \"chartData\");\n }\n const defaultToolPanel = (_c = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _c.defaultToolPanel;\n defaultPanel = defaultToolPanel && CHART_TOOL_PANEL_MENU_OPTIONS[defaultToolPanel] || panels[0];\n if (legacyFormat) {\n chartToolbarOptions = panels.length > 0 ? [panels[0], ...chartToolbarOptions] : chartToolbarOptions;\n }\n } else {\n let tabOptions = [\n \"chartSettings\",\n \"chartData\",\n \"chartFormat\",\n chartController.isChartLinked() ? \"chartLink\" : \"chartUnlink\",\n \"chartDownload\"\n ];\n const toolbarItemsFunc = this.gos.getCallback(\"getChartToolbarItems\");\n if (toolbarItemsFunc) {\n const isLegacyToolbar = this.gos.get(\"suppressChartToolPanelsButton\");\n const params = {\n defaultItems: isLegacyToolbar ? tabOptions : CHART_TOOLBAR_ALLOW_LIST\n };\n tabOptions = toolbarItemsFunc(params).filter((option) => {\n if (!CHART_TOOL_PANEL_ALLOW_LIST.includes(option) && !CHART_TOOLBAR_ALLOW_LIST.includes(option)) {\n _322.warnOnce(`'${option}' is not a valid Chart Toolbar Option`);\n return false;\n } else if (!isLegacyToolbar && CHART_TOOL_PANEL_ALLOW_LIST.includes(option)) {\n const msg = `'${option}' is a Chart Tool Panel option and will be ignored. Please use 'chartToolPanelsDef.panels' grid option instead`;\n _322.warnOnce(msg);\n return false;\n }\n return true;\n });\n if (!isLegacyToolbar) {\n tabOptions = tabOptions.concat(CHART_TOOL_PANEL_ALLOW_LIST);\n }\n }\n if (chartController.isPivotChart()) {\n tabOptions = tabOptions.filter((option) => option !== \"chartData\");\n }\n const ignoreOptions = [\"chartUnlink\", \"chartLink\", \"chartDownload\"];\n panels = tabOptions.filter((option) => ignoreOptions.indexOf(option) === -1);\n defaultPanel = panels[0];\n chartToolbarOptions = tabOptions.filter(\n (value) => ignoreOptions.indexOf(value) !== -1 || panels.length && value === panels[0]\n );\n }\n return {\n panels,\n defaultPanel,\n chartToolbarOptions\n };\n }\n doesChartToolbarExist(chartController) {\n const { chartToolbarOptions } = this.getToolbarOptionsAndPanels(chartController);\n return [\"chartMenu\", ...CHART_TOOLBAR_ALLOW_LIST].some((option) => chartToolbarOptions.includes(option));\n }\n doChartToolPanelsExist(chartController) {\n const { panels } = this.getToolbarOptionsAndPanels(chartController);\n return panels.length > 0;\n }\n};\n__decorateClass4([\n Autowired39(\"chartService\")\n], ChartMenuService.prototype, \"chartService\", 2);\n__decorateClass4([\n Autowired39(\"advancedSettingsMenuFactory\")\n], ChartMenuService.prototype, \"advancedSettingsMenuFactory\", 2);\nChartMenuService = __decorateClass4([\n Bean24(\"chartMenuService\")\n], ChartMenuService);\nvar CATEGORY_LABEL_KEY = \"AG-GRID-DEFAULT-LABEL-KEY\";\nfunction createCategoryHierarchy(data, categoryKeys) {\n const hierarchy = buildNestedHierarchy(data, getItemDepth, getItemCategoryLabel);\n return formatCategoryHierarchy(hierarchy);\n function getItemDepth(item) {\n return categoryKeys.length;\n }\n function getItemCategoryLabel(item, categoryIndex) {\n const categoryKey = categoryKeys[categoryIndex];\n const categoryValue = item[categoryKey];\n return getCategoryLabel(categoryValue);\n }\n function getCategoryLabel(value) {\n if (value == null)\n return null;\n return String(value);\n }\n}\nfunction createAutoGroupHierarchy(data, getItemLabels) {\n const hierarchy = buildNestedHierarchy(data, getItemDepth, getItemGroupLabel);\n return formatCategoryHierarchy(hierarchy);\n function getItemDepth(item) {\n var _a, _b;\n return (_b = (_a = getItemLabels(item)) == null ? void 0 : _a.length) != null ? _b : 0;\n }\n function getItemGroupLabel(item, groupIndex) {\n const labels = getItemLabels(item);\n if (!labels)\n return null;\n const labelIndex = labels.length - 1 - groupIndex;\n return labels[labelIndex];\n }\n}\nfunction formatCategoryHierarchy(hierarchy, key = null, isChild) {\n const { depth, rootValues, value, children: inputChildren } = hierarchy;\n if (rootValues) {\n return rootValues.map((item) => __spreadValues3({ [CATEGORY_LABEL_KEY]: key }, item));\n } else if (depth === 0) {\n return [__spreadValues3({ [CATEGORY_LABEL_KEY]: key }, value)];\n }\n const children = [];\n for (const [childKey, childHierarchy] of inputChildren.entries()) {\n children.push(...formatCategoryHierarchy(childHierarchy, childKey, true));\n }\n return isChild ? [__spreadValues3({\n [CATEGORY_LABEL_KEY]: key,\n children\n }, value != null ? value : {})] : children;\n}\nfunction buildNestedHierarchy(data, getItemDepth, getItemGroupKey) {\n const hierarchy = { depth: 0, children: /* @__PURE__ */ new Map() };\n data.forEach((item) => {\n const itemDepth = getItemDepth(item);\n createNestedItemHierarchy(item, itemDepth, getItemGroupKey, 0, hierarchy);\n });\n return hierarchy;\n function createNestedItemHierarchy(item, itemDepth, getItemGroupKey2, currentDepth, hierarchy2) {\n if (currentDepth === itemDepth) {\n if (currentDepth === 0) {\n if (!hierarchy2.rootValues) {\n hierarchy2.rootValues = [];\n }\n hierarchy2.rootValues.push(item);\n } else {\n hierarchy2.value = item;\n }\n return hierarchy2;\n } else {\n const key = getItemGroupKey2(item, currentDepth);\n const existingChildHierarchy = hierarchy2.children.get(key);\n const childHierarchy = createNestedItemHierarchy(\n item,\n itemDepth,\n getItemGroupKey2,\n currentDepth + 1,\n existingChildHierarchy || { depth: 0, children: /* @__PURE__ */ new Map() }\n );\n hierarchy2.children.set(key, childHierarchy);\n hierarchy2.depth = Math.max(1 + childHierarchy.depth, hierarchy2.depth);\n return hierarchy2;\n }\n }\n}\nvar HierarchicalChartProxy = class extends ChartProxy {\n constructor(chartProxyParams) {\n super(chartProxyParams);\n }\n getUpdateOptions(params, commonChartOptions) {\n const { fields } = params;\n const [sizeField, colorField] = fields;\n return __spreadProps3(__spreadValues3({}, commonChartOptions), {\n series: this.getSeries(sizeField, colorField),\n data: this.getData(params, sizeField, colorField)\n });\n }\n getSeriesChartThemeDefaults() {\n return {\n gradientLegend: {\n gradient: {\n preferredLength: 200\n }\n }\n };\n }\n getSeries(sizeField, colorField) {\n var _a, _b;\n return [\n {\n type: this.standaloneChartType,\n labelKey: CATEGORY_LABEL_KEY,\n // Size and color fields are inferred from the range data\n sizeKey: sizeField == null ? void 0 : sizeField.colId,\n sizeName: (_a = sizeField == null ? void 0 : sizeField.displayName) != null ? _a : void 0,\n colorKey: colorField == null ? void 0 : colorField.colId,\n colorName: (_b = colorField == null ? void 0 : colorField.displayName) != null ? _b : void 0\n }\n ];\n }\n getData(params, sizeField, colorField) {\n var _a;\n const { categories, data, groupData, grouping: isGrouped } = params;\n if (isGrouped) {\n const processedData = colorField ? data.concat(\n (_a = groupData == null ? void 0 : groupData.map((groupDatum) => {\n const newDatum = __spreadValues3({}, groupDatum);\n delete newDatum[sizeField.colId];\n return newDatum;\n })) != null ? _a : []\n ) : data;\n return createAutoGroupHierarchy(processedData, (item) => {\n var _a2, _b;\n return (_b = (_a2 = item[GROUP_AUTO_COLUMN_ID]) == null ? void 0 : _a2.labels) != null ? _b : null;\n });\n } else {\n const categoryKeys = categories.map(({ id }) => id);\n return createCategoryHierarchy(data, categoryKeys);\n }\n }\n};\nvar _GridChartComp = class _GridChartComp2 extends Component36 {\n constructor(params) {\n super(_GridChartComp2.TEMPLATE);\n this.params = params;\n }\n init() {\n const modelParams = __spreadProps3(__spreadValues3({}, this.params), {\n chartType: getCanonicalChartType(this.params.chartType),\n chartThemeName: this.getThemeName()\n });\n const isRtl = this.gos.get(\"enableRtl\");\n this.addCssClass(isRtl ? \"ag-rtl\" : \"ag-ltr\");\n const model = this.createBean(new ChartDataModel(modelParams));\n this.chartController = this.createManagedBean(new ChartController(model));\n this.chartOptionsService = this.createManagedBean(new ChartOptionsService(this.chartController));\n this.validateCustomThemes();\n this.createChart();\n if (this.params.insideDialog) {\n this.addDialog();\n }\n this.addMenu();\n this.addTitleEditComp();\n this.addManagedListener(this.getGui(), \"focusin\", this.setActiveChartCellRange.bind(this));\n this.addManagedListener(this.chartController, ChartController.EVENT_CHART_MODEL_UPDATE, this.update.bind(this));\n this.addManagedPropertyListeners([\"chartThemeOverrides\", \"chartThemes\"], this.reactivePropertyUpdate.bind(this));\n this.update();\n this.raiseChartCreatedEvent();\n }\n createChart() {\n var _a;\n let chartInstance = void 0;\n if (this.chartProxy) {\n chartInstance = this.chartProxy.destroy({ keepChartInstance: true });\n }\n const crossFilterCallback = (event, reset) => {\n const ctx = this.params.crossFilteringContext;\n ctx.lastSelectedChartId = reset ? \"\" : this.chartController.getChartId();\n if (reset) {\n this.params.crossFilteringResetCallback();\n }\n this.crossFilterService.filter(event, reset);\n };\n const chartType = this.chartController.getChartType();\n const chartProxyParams = {\n chartType,\n chartInstance,\n getChartThemeName: this.getChartThemeName.bind(this),\n getChartThemes: this.getChartThemes.bind(this),\n customChartThemes: this.gos.get(\"customChartThemes\"),\n getGridOptionsChartThemeOverrides: () => this.getGridOptionsChartThemeOverrides(),\n getExtraPaddingDirections: () => {\n var _a2, _b;\n return (_b = (_a2 = this.chartMenu) == null ? void 0 : _a2.getExtraPaddingDirections()) != null ? _b : [];\n },\n apiChartThemeOverrides: this.params.chartThemeOverrides,\n crossFiltering: (_a = this.params.crossFiltering) != null ? _a : false,\n crossFilterCallback,\n parentElement: this.eChart,\n grouping: this.chartController.isGrouping(),\n chartThemeToRestore: this.params.chartThemeName,\n chartOptionsToRestore: this.params.chartOptionsToRestore,\n chartPaletteToRestore: this.params.chartPaletteToRestore,\n seriesChartTypes: this.chartController.getSeriesChartTypes(),\n translate: (toTranslate) => this.chartTranslationService.translate(toTranslate)\n };\n this.params.chartOptionsToRestore = void 0;\n this.chartType = chartType;\n this.chartProxy = _GridChartComp2.createChartProxy(chartProxyParams);\n if (!this.chartProxy) {\n console.warn(\"AG Grid: invalid chart type supplied: \", chartProxyParams.chartType);\n return;\n }\n const canvas = this.eChart.querySelector(\"canvas\");\n if (canvas) {\n canvas.classList.add(\"ag-charts-canvas\");\n }\n this.chartController.setChartProxy(this.chartProxy);\n this.createMenuContext();\n this.titleEdit && this.titleEdit.refreshTitle(this.chartMenuContext);\n }\n createMenuContext() {\n if (this.chartMenuContext) {\n return;\n }\n const chartMenuParamsFactory = this.createManagedBean(new ChartMenuParamsFactory(this.chartOptionsService.getChartThemeOverridesProxy()));\n const chartAxisMenuParamsFactory = this.createManagedBean(new ChartMenuParamsFactory(this.chartOptionsService.getAxisThemeOverridesProxy()));\n this.chartMenuContext = {\n chartController: this.chartController,\n chartOptionsService: this.chartOptionsService,\n chartMenuParamsFactory,\n chartAxisMenuParamsFactory\n };\n }\n getChartThemeName() {\n return this.chartController.getChartThemeName();\n }\n getChartThemes() {\n return this.chartController.getThemeNames();\n }\n getGridOptionsChartThemeOverrides() {\n return this.gos.get(\"chartThemeOverrides\");\n }\n static createChartProxy(chartProxyParams) {\n switch (chartProxyParams.chartType) {\n case \"column\":\n case \"bar\":\n case \"groupedColumn\":\n case \"stackedColumn\":\n case \"normalizedColumn\":\n case \"groupedBar\":\n case \"stackedBar\":\n case \"normalizedBar\":\n return new BarChartProxy(chartProxyParams);\n case \"pie\":\n case \"donut\":\n case \"doughnut\":\n return new PieChartProxy(chartProxyParams);\n case \"area\":\n case \"stackedArea\":\n case \"normalizedArea\":\n return new AreaChartProxy(chartProxyParams);\n case \"line\":\n return new LineChartProxy(chartProxyParams);\n case \"scatter\":\n case \"bubble\":\n return new ScatterChartProxy(chartProxyParams);\n case \"histogram\":\n return new HistogramChartProxy(chartProxyParams);\n case \"radarLine\":\n case \"radarArea\":\n case \"nightingale\":\n case \"radialColumn\":\n case \"radialBar\":\n return new PolarChartProxy(chartProxyParams);\n case \"rangeBar\":\n case \"rangeArea\":\n return new RangeChartProxy(chartProxyParams);\n case \"boxPlot\":\n return new BoxPlotChartProxy(chartProxyParams);\n case \"treemap\":\n case \"sunburst\":\n return new HierarchicalChartProxy(chartProxyParams);\n case \"heatmap\":\n return new HeatmapChartProxy(chartProxyParams);\n case \"waterfall\":\n return new WaterfallChartProxy(chartProxyParams);\n case \"columnLineCombo\":\n case \"areaColumnCombo\":\n case \"customCombo\":\n return new ComboChartProxy(chartProxyParams);\n default:\n throw `AG Grid: Unable to create chart as an invalid chartType = '${chartProxyParams.chartType}' was supplied.`;\n }\n }\n addDialog() {\n const title = this.chartTranslationService.translate(this.params.pivotChart ? \"pivotChartTitle\" : \"rangeChartTitle\");\n const { width, height } = this.getBestDialogSize();\n this.chartDialog = new AgDialog2({\n resizable: true,\n movable: true,\n maximizable: true,\n title,\n width,\n height,\n component: this,\n centered: true,\n closable: true\n });\n this.getContext().createBean(this.chartDialog);\n this.chartDialog.addEventListener(AgDialog2.EVENT_DESTROYED, () => {\n this.destroy();\n this.chartMenuService.hideAdvancedSettings();\n });\n }\n getBestDialogSize() {\n const popupParent = this.popupService.getPopupParent();\n const maxWidth = _33.getAbsoluteWidth(popupParent) * 0.75;\n const maxHeight = _33.getAbsoluteHeight(popupParent) * 0.75;\n const ratio = 0.553;\n const chart = this.chartProxy.getChart();\n let width = this.params.insideDialog ? 850 : chart.width;\n let height = this.params.insideDialog ? 470 : chart.height;\n if (width > maxWidth || height > maxHeight) {\n width = Math.min(width, maxWidth);\n height = Math.round(width * ratio);\n if (height > maxHeight) {\n height = maxHeight;\n width = Math.min(width, Math.round(height / ratio));\n }\n }\n return { width, height };\n }\n addMenu() {\n if (!this.params.crossFiltering) {\n this.chartMenu = this.createBean(new ChartMenu(\n this.eChartContainer,\n this.eMenuContainer,\n this.chartMenuContext\n ));\n this.eChartContainer.appendChild(this.chartMenu.getGui());\n }\n }\n addTitleEditComp() {\n this.titleEdit = this.createBean(new TitleEdit(this.chartMenu));\n this.eTitleEditContainer.appendChild(this.titleEdit.getGui());\n if (this.chartProxy) {\n this.titleEdit.refreshTitle(this.chartMenuContext);\n }\n }\n update(params) {\n if (params == null ? void 0 : params.chartId) {\n const validUpdate = this.chartController.update(params);\n if (!validUpdate) {\n return;\n }\n }\n const updatedChartType = this.chartTypeChanged(params);\n const persistedThemeOverrides = updatedChartType || this.chartEmpty ? ((updatedChartType2) => {\n const currentChartType = this.chartType;\n const targetChartType = updatedChartType2;\n const existingChartInstance = this.chartProxy.getChart();\n const existingChartOptions = existingChartInstance == null ? void 0 : existingChartInstance.getOptions();\n const existingAxes = existingChartInstance == null ? void 0 : existingChartInstance.axes;\n return this.chartOptionsService.getPersistedChartThemeOverrides(\n existingChartOptions,\n existingAxes,\n currentChartType,\n targetChartType != null ? targetChartType : currentChartType\n );\n })(updatedChartType) : void 0;\n if (updatedChartType)\n this.createChart();\n const updatedThemeOverrides = persistedThemeOverrides && (params == null ? void 0 : params.chartThemeOverrides) ? deepMerge(persistedThemeOverrides, params.chartThemeOverrides) : persistedThemeOverrides || (params == null ? void 0 : params.chartThemeOverrides);\n this.updateChart(updatedThemeOverrides);\n if (params == null ? void 0 : params.chartId) {\n this.chartProxy.getChart().waitForUpdate().then(() => {\n this.chartController.raiseChartApiUpdateEvent();\n });\n }\n }\n updateChart(updatedOverrides) {\n const { chartProxy } = this;\n const selectedCols = this.chartController.getSelectedValueColState();\n const data = this.chartController.getChartData();\n const chartEmpty = this.handleEmptyChart(data, selectedCols.length);\n this.chartEmpty = chartEmpty;\n if (chartEmpty) {\n if (updatedOverrides)\n this.chartController.updateThemeOverrides(updatedOverrides);\n return;\n }\n let chartUpdateParams = this.chartController.getChartUpdateParams(updatedOverrides);\n chartProxy.update(chartUpdateParams);\n this.chartProxy.getChart().waitForUpdate().then(() => {\n this.chartController.raiseChartUpdatedEvent();\n });\n this.titleEdit.refreshTitle(this.chartMenuContext);\n }\n chartTypeChanged(updateParams) {\n const [currentType, updatedChartType] = [this.chartController.getChartType(), updateParams == null ? void 0 : updateParams.chartType];\n const targetChartType = updatedChartType ? getCanonicalChartType(updatedChartType) : void 0;\n if (this.chartType !== currentType)\n return targetChartType != null ? targetChartType : currentType;\n if (targetChartType && currentType !== targetChartType)\n return targetChartType;\n return null;\n }\n getChartModel() {\n return this.chartController.getChartModel();\n }\n getChartImageDataURL(fileFormat) {\n return this.chartProxy.getChartImageDataURL(fileFormat);\n }\n handleEmptyChart(data, numFields) {\n const pivotModeDisabled = this.chartController.isPivotChart() && !this.chartController.isPivotMode();\n const chartType = this.chartController.getChartType();\n let minFieldsRequired = 1;\n if (this.chartController.isActiveXYChart()) {\n minFieldsRequired = chartType === \"bubble\" ? 3 : 2;\n } else if (isHierarchical(getSeriesType(chartType))) {\n minFieldsRequired = 0;\n }\n const isEmptyChart = numFields < minFieldsRequired || data.length === 0;\n if (this.eChart) {\n const isEmpty = pivotModeDisabled || isEmptyChart;\n _33.setDisplayed(this.eChart, !isEmpty);\n _33.setDisplayed(this.eEmpty, isEmpty);\n }\n if (pivotModeDisabled) {\n this.eEmpty.innerText = this.chartTranslationService.translate(\"pivotChartRequiresPivotMode\");\n return true;\n }\n if (isEmptyChart) {\n this.eEmpty.innerText = this.chartTranslationService.translate(\"noDataToChart\");\n return true;\n }\n return false;\n }\n downloadChart(dimensions, fileName, fileFormat) {\n this.chartProxy.downloadChart(dimensions, fileName, fileFormat);\n }\n openChartToolPanel(panel) {\n const menuPanel = panel ? CHART_TOOL_PANEL_MENU_OPTIONS[panel] : panel;\n this.chartMenu.showMenu({ panel: menuPanel });\n }\n closeChartToolPanel() {\n this.chartMenu.hideMenu();\n }\n getChartId() {\n return this.chartController.getChartId();\n }\n getUnderlyingChart() {\n return this.chartProxy.getChartRef();\n }\n crossFilteringReset() {\n this.chartProxy.crossFilteringReset();\n }\n setActiveChartCellRange(focusEvent) {\n if (this.getGui().contains(focusEvent.relatedTarget)) {\n return;\n }\n this.chartController.setChartRange(true);\n this.focusService.clearFocusedCell();\n }\n getThemeName() {\n const availableChartThemes = this.gos.get(\"chartThemes\") || DEFAULT_THEMES;\n if (availableChartThemes.length === 0) {\n throw new Error(\"Cannot create chart: no chart themes available.\");\n }\n const { chartThemeName } = this.params;\n return _33.includes(availableChartThemes, chartThemeName) ? chartThemeName : availableChartThemes[0];\n }\n getAllKeysInObjects(objects) {\n const allValues = {};\n objects.filter((obj) => obj != null).forEach((obj) => {\n Object.keys(obj).forEach((key) => allValues[key] = null);\n });\n return Object.keys(allValues);\n }\n validateCustomThemes() {\n const suppliedThemes = this.getChartThemes();\n const customChartThemes = this.gos.get(\"customChartThemes\");\n if (customChartThemes) {\n this.getAllKeysInObjects([customChartThemes]).forEach((customThemeName) => {\n if (!_33.includes(suppliedThemes, customThemeName)) {\n console.warn(\"AG Grid: a custom chart theme with the name '\" + customThemeName + \"' has been supplied but not added to the 'chartThemes' list\");\n }\n });\n }\n }\n reactivePropertyUpdate() {\n this.chartController.setChartThemeName(this.getThemeName(), true);\n const chartId = this.getChartId();\n const modelType = this.chartController.isCrossFilterChart() ? \"crossFilter\" : this.getChartModel().modelType;\n const chartThemeOverrides = this.gos.get(\"chartThemeOverrides\") || {};\n this.update({\n type: `${modelType}ChartUpdate`,\n chartId,\n chartThemeOverrides\n });\n }\n raiseChartCreatedEvent() {\n const event = {\n type: Events10.EVENT_CHART_CREATED,\n chartId: this.chartController.getChartId()\n };\n this.chartProxy.getChart().waitForUpdate().then(() => {\n this.eventService.dispatchEvent(event);\n });\n }\n raiseChartDestroyedEvent() {\n const event = {\n type: Events10.EVENT_CHART_DESTROYED,\n chartId: this.chartController.getChartId()\n };\n this.eventService.dispatchEvent(event);\n }\n destroy() {\n var _a;\n super.destroy();\n if (this.chartProxy) {\n this.chartProxy.destroy();\n }\n this.destroyBean(this.chartMenu);\n this.destroyBean(this.titleEdit);\n if (this.chartDialog && this.chartDialog.isAlive()) {\n this.destroyBean(this.chartDialog);\n }\n (_a = this.onDestroyColorSchemeChangeListener) == null ? void 0 : _a.call(this);\n const eGui = this.getGui();\n _33.clearElement(eGui);\n _33.removeFromParent(eGui);\n this.raiseChartDestroyedEvent();\n }\n};\n_GridChartComp.TEMPLATE = /* html */\n`
\n
\n
\n
\n
\n
\n
\n
`;\n__decorateClass4([\n RefSelector12(\"eChart\")\n], _GridChartComp.prototype, \"eChart\", 2);\n__decorateClass4([\n RefSelector12(\"eChartContainer\")\n], _GridChartComp.prototype, \"eChartContainer\", 2);\n__decorateClass4([\n RefSelector12(\"eMenuContainer\")\n], _GridChartComp.prototype, \"eMenuContainer\", 2);\n__decorateClass4([\n RefSelector12(\"eEmpty\")\n], _GridChartComp.prototype, \"eEmpty\", 2);\n__decorateClass4([\n RefSelector12(\"eTitleEditContainer\")\n], _GridChartComp.prototype, \"eTitleEditContainer\", 2);\n__decorateClass4([\n Autowired40(\"chartCrossFilterService\")\n], _GridChartComp.prototype, \"crossFilterService\", 2);\n__decorateClass4([\n Autowired40(\"chartTranslationService\")\n], _GridChartComp.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n Autowired40(\"chartMenuService\")\n], _GridChartComp.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n Autowired40(\"focusService\")\n], _GridChartComp.prototype, \"focusService\", 2);\n__decorateClass4([\n Autowired40(\"popupService\")\n], _GridChartComp.prototype, \"popupService\", 2);\n__decorateClass4([\n PostConstruct42\n], _GridChartComp.prototype, \"init\", 1);\nvar GridChartComp = _GridChartComp;\nvar VERSION4 = \"31.3.2\";\nvar DEBUG = false;\nfunction upgradeChartModel(model) {\n const originalVersion = model.version;\n if (model.version == null) {\n model.version = heuristicVersionDetection(model);\n }\n model = migrateIfBefore(\"23.0.0\", model, migrateV23);\n model = migrateIfBefore(\"24.0.0\", model, migrateV24);\n model = migrateIfBefore(\"25.1.0\", model, migrateV25_1);\n model = migrateIfBefore(\"26.0.0\", model, migrateV26);\n model = migrateIfBefore(\"26.1.0\", model, migrateV26_1);\n model = migrateIfBefore(\"26.2.0\", model, migrateV26_2);\n model = migrateIfBefore(\"28.0.0\", model, migrateV28);\n model = migrateIfBefore(\"28.2.0\", model, migrateV28_2);\n model = migrateIfBefore(\"29.0.0\", model, migrateV29);\n model = migrateIfBefore(\"29.1.0\", model, migrateV29_1);\n model = migrateIfBefore(\"29.2.0\", model, migrateV29_2);\n model = migrateIfBefore(\"30.0.0\", model, migrateV30);\n model = migrateIfBefore(\"31.0.0\", model, migrateV31);\n model = cleanup(model);\n model = migrateIfBefore(VERSION4, model, (m) => m);\n if (DEBUG && originalVersion !== model.version) {\n console.log(\"AG Grid: ChartModel migration complete\", { model });\n }\n return model;\n}\nfunction migrateV23(model) {\n model = jsonRename(\"chartOptions.legend.item.marker.type\", \"shape\", model);\n model = jsonRename(\"chartOptions.seriesDefaults.marker.type\", \"shape\", model);\n model = jsonRename(\"chartOptions.legend.padding\", \"spacing\", model);\n return model;\n}\nfunction migrateV24(model) {\n var _d;\n model = jsonDelete(\"chartOptions.seriesDefaults.marker.minSize\", model);\n const _a = model, {\n chartType,\n chartPalette,\n chartOptions: _b\n } = _a, _c = _b, { xAxis, yAxis } = _c, chartOptions = __objRest(_c, [\"xAxis\", \"yAxis\"]), chartModel = __objRest(_a, [\n \"chartType\",\n \"chartPalette\",\n // Migrate.\n \"chartOptions\"\n ]);\n const axesTypes = getLegacyAxisType(chartType);\n const axes = axesTypes == null ? void 0 : axesTypes.map((type, i) => __spreadValues3({\n type\n }, i === 0 ? xAxis : yAxis));\n const LEGACY_PALETTES = {\n borneo: \"ag-default\",\n material: \"ag-material\",\n bright: \"ag-vivid\"\n };\n return __spreadValues3({\n chartType,\n chartThemeName: (_d = LEGACY_PALETTES[chartPalette]) != null ? _d : \"ag-default\",\n chartOptions: __spreadProps3(__spreadValues3({}, chartOptions), {\n axes,\n xAxis,\n yAxis\n })\n }, chartModel);\n}\nfunction migrateV25_1(model) {\n model = jsonRename(\"chartOptions.seriesDefaults.label.minRequiredAngle\", \"minAngle\", model);\n return model;\n}\nfunction migrateV26(model) {\n const highlightOptUpdate = (_a) => {\n var _b = _a, { dimOpacity } = _b, opts = __objRest(_b, [\"dimOpacity\"]);\n return __spreadValues3(__spreadValues3({}, opts), dimOpacity != null ? { series: { dimOpacity } } : {});\n };\n model = jsonMutate(\"chartOptions.seriesDefaults.highlightStyle\", model, highlightOptUpdate);\n model = jsonDelete(\"chart\", model);\n model = jsonDelete(\"chartOptions.seriesDefaults.tooltipClass\", model);\n model = jsonDelete(\"chartOptions.seriesDefaults.tooltipTracking\", model);\n model = jsonDeleteDefault(\"chartOptions.axes[].label.rotation\", 0, model);\n model = jsonDeleteDefault(\"chartOptions.axes[].label.rotation\", 335, model);\n return model;\n}\nfunction migrateV26_1(model) {\n const highlightOptUpdate = (_a) => {\n var _b = _a, { item, series } = _b, opts = __objRest(_b, [\"item\", \"series\"]);\n return __spreadValues3({\n item: __spreadValues3(__spreadValues3({}, opts), item)\n }, series ? { series } : {});\n };\n model = jsonMutate(\"chartOptions.seriesDefaults.highlightStyle\", model, highlightOptUpdate);\n model = jsonMutate(\"chartOptions.series[].highlightStyle\", model, highlightOptUpdate);\n return model;\n}\nfunction migrateV26_2(model) {\n model = jsonMove(\"chartOptions.seriesDefaults.fill.opacity\", \"chartOptions.seriesDefaults.fillOpacity\", model);\n model = jsonMove(\"chartOptions.seriesDefaults.stroke.opacity\", \"chartOptions.seriesDefaults.strokeOpacity\", model);\n model = jsonMove(\"chartOptions.seriesDefaults.stroke.width\", \"chartOptions.seriesDefaults.strokeWidth\", model);\n model = jsonDelete(\"chartOptions.seriesDefaults.fill\", model);\n model = jsonDelete(\"chartOptions.seriesDefaults.stroke\", model);\n model = jsonDelete(\"chartOptions.seriesDefaults.callout.colors\", model);\n model = jsonDelete(\"chartOptions.xAxis\", model);\n model = jsonDelete(\"chartOptions.yAxis\", model);\n const _a = model, {\n chartType: providedChartType,\n chartOptions: _b\n } = _a, _c = _b, { axes, series, seriesDefaults } = _c, otherChartOptions = __objRest(_c, [\"axes\", \"series\", \"seriesDefaults\"]), otherModelProps = __objRest(_a, [\n \"chartType\",\n \"chartOptions\"\n ]);\n const chartType = getCanonicalChartType(providedChartType);\n const seriesType = getSeriesType(chartType);\n const seriesTypes = [seriesType];\n const chartTypeMixin = {};\n if (!isPieChartSeries(seriesType)) {\n const minimalAxis = { top: {}, bottom: {}, left: {}, right: {} };\n const updatedAxes = axes.map((_d) => {\n var _e = _d, { type } = _e, axisProps = __objRest(_e, [\"type\"]);\n return {\n [type]: __spreadValues3(__spreadValues3({}, minimalAxis), axisProps)\n };\n }).reduce(merge, {});\n ALL_AXIS_TYPES.filter((v) => updatedAxes[v] == null).forEach((v) => {\n updatedAxes[v] = __spreadValues3({}, minimalAxis);\n });\n chartTypeMixin.axes = updatedAxes;\n }\n const updatedChartOptions = seriesTypes.map((t) => ({\n [t]: __spreadValues3(__spreadProps3(__spreadValues3({}, chartTypeMixin), {\n series: seriesDefaults\n }), otherChartOptions)\n })).reduce(merge, {});\n model = __spreadProps3(__spreadValues3({}, otherModelProps), {\n chartType,\n chartOptions: updatedChartOptions\n });\n return model;\n}\nfunction migrateV28(model) {\n model = jsonDelete(\"chartOptions.*.title.padding\", model);\n model = jsonDelete(\"chartOptions.*.subtitle.padding\", model);\n model = jsonDelete(\"chartOptions.*.axes.*.title.padding\", model);\n model = jsonBackfill(\"chartOptions.*.axes.*.title.enabled\", false, model);\n return model;\n}\nfunction migrateV28_2(model) {\n model = jsonRename(\"chartOptions.pie.series.callout\", \"calloutLine\", model);\n model = jsonRename(\"chartOptions.pie.series.label\", \"calloutLabel\", model);\n model = jsonRename(\"chartOptions.pie.series.labelKey\", \"sectorLabelKey\", model);\n model = jsonRename(\"chartOptions.pie.series.labelName\", \"sectorLabelName\", model);\n model = jsonRename(\"chartOptions.donut.series.callout\", \"calloutLine\", model);\n model = jsonRename(\"chartOptions.donut.series.label\", \"calloutLabel\", model);\n model = jsonRename(\"chartOptions.donut.series.labelKey\", \"sectorLabelKey\", model);\n model = jsonRename(\"chartOptions.donut.series.labelName\", \"sectorLabelName\", model);\n return model;\n}\nfunction migrateV29(model) {\n model = jsonMoveIfMissing(\"chartOptions.scatter.series.fill\", \"chartOptions.scatter.series.marker.fill\", model);\n model = jsonMoveIfMissing(\n \"chartOptions.scatter.series.fillOpacity\",\n \"chartOptions.scatter.series.marker.fillOpacity\",\n model\n );\n model = jsonMoveIfMissing(\"chartOptions.scatter.series.stroke\", \"chartOptions.scatter.series.marker.stroke\", model);\n model = jsonMoveIfMissing(\n \"chartOptions.scatter.series.strokeOpacity\",\n \"chartOptions.scatter.series.marker.strokeOpacity\",\n model\n );\n model = jsonMoveIfMissing(\n \"chartOptions.scatter.series.strokeWidth\",\n \"chartOptions.scatter.series.marker.strokeWidth\",\n model\n );\n model = jsonMove(\"chartOptions.scatter.series.paired\", \"chartOptions.scatter.paired\", model);\n return model;\n}\nfunction migrateV29_1(model) {\n model = jsonDelete(\"chartOptions.axes[].tick.count\", model);\n return model;\n}\nfunction migrateV29_2(model) {\n const tooltipOptUpdate = (_a) => {\n var _b = _a, { tracking } = _b, opts = __objRest(_b, [\"tracking\"]);\n var _a2, _b2, _c, _d;\n const output = __spreadValues3({}, opts);\n if (tracking === false) {\n (_a2 = output.position) != null ? _a2 : output.position = { type: \"pointer\" };\n (_b2 = output.range) != null ? _b2 : output.range = \"nearest\";\n } else if (tracking === true) {\n (_c = output.position) != null ? _c : output.position = { type: \"node\" };\n (_d = output.range) != null ? _d : output.range = \"nearest\";\n }\n return output;\n };\n model = jsonMutate(\"chartOptions.*.tooltip\", model, tooltipOptUpdate);\n return model;\n}\nfunction migrateV30(model) {\n model = jsonRename(\"chartOptions.pie.series.labelKey\", \"sectorLabelKey\", model);\n model = jsonRename(\"chartOptions.pie.series.labelName\", \"sectorLabelName\", model);\n model = migrateV29_1(model);\n model = migrateV29_2(model);\n model = jsonDelete(\"chartOptions.*.series.flipXY\", model);\n model = jsonAdd(\"chartOptions.common.legend.enabled\", true, model);\n model = jsonBackfill(\"chartOptions.common.legend.position\", \"right\", model);\n return model;\n}\nfunction migrateV31(model) {\n const V30_LEGACY_PALETTES = {\n \"ag-pastel\": \"ag-sheets\",\n \"ag-solar\": \"ag-polychroma\"\n };\n const updatedModel = jsonRename(\"chartOptions.column\", \"bar\", model);\n const chartThemeName = V30_LEGACY_PALETTES[updatedModel.chartThemeName] || updatedModel.chartThemeName;\n return __spreadProps3(__spreadValues3({}, updatedModel), {\n chartThemeName\n });\n}\nfunction cleanup(model) {\n model = jsonDelete(\"chartOptions.*.width\", model);\n model = jsonDelete(\"chartOptions.*.height\", model);\n model = jsonBackfill(\"chartOptions.*.axes.category.label.autoRotate\", true, model);\n return model;\n}\nfunction heuristicVersionDetection(model) {\n var _a, _b;\n const modelAny = model;\n if (model.version != null) {\n return model.version;\n }\n const hasKey = (obj, ...keys) => {\n return Object.keys(obj || {}).some((k) => keys.includes(k));\n };\n const chartOptions = modelAny.chartOptions;\n const seriesOptions = hasKey(chartOptions, \"seriesDefaults\") ? chartOptions == null ? void 0 : chartOptions.seriesDefaults : chartOptions == null ? void 0 : chartOptions[Object.keys(chartOptions)[0]];\n const hints = {\n \"27.0.0\": hasKey(modelAny, \"seriesChartTypes\"),\n \"26.2.0\": !hasKey(chartOptions, \"seriesDefaults\"),\n \"26.1.0\": hasKey(seriesOptions == null ? void 0 : seriesOptions.highlightStyle, \"item\"),\n \"26.0.0\": hasKey(seriesOptions == null ? void 0 : seriesOptions.highlightStyle, \"series\"),\n // '26.0.0': modelAny.chart === undefined,\n \"25.1.0\": hasKey(seriesOptions == null ? void 0 : seriesOptions.label, \"minAngle\"),\n \"25.0.0\": hasKey(modelAny, \"modelType\", \"aggFunc\", \"unlinkChart\", \"suppressChartRanges\") || hasKey(seriesOptions, \"lineDash\", \"lineDashOffset\"),\n \"24.0.0\": hasKey(modelAny, \"chartThemeName\", \"chart\") || hasKey(chartOptions, \"series\"),\n \"23.2.0\": hasKey(chartOptions, \"navigator\"),\n \"23.0.0\": hasKey((_b = (_a = chartOptions == null ? void 0 : chartOptions.legend) == null ? void 0 : _a.item) == null ? void 0 : _b.marker, \"shape\"),\n \"22.1.0\": hasKey(modelAny, \"chartPalette\", \"chartType\")\n };\n const defaultVersion = \"27.1.0\";\n const matchingHints = Object.entries(hints).filter(([_382, match]) => match);\n if (DEBUG)\n console.log(\"AG Grid: ChartModel migration\", { heuristicVersionCandidates: matchingHints });\n const [heuristicVersion = defaultVersion] = matchingHints[0];\n if (DEBUG)\n console.log(\"AG Grid: ChartModel migration\", { heuristicVersion });\n return heuristicVersion;\n}\nfunction migrateIfBefore(maxVersion, model, migration) {\n if (versionNumber(maxVersion) > versionNumber(model.version)) {\n if (DEBUG)\n console.log(\"AG Grid: ChartModel migration\", { migratingTo: maxVersion });\n const result = migration(model);\n result.version = maxVersion;\n if (DEBUG)\n console.log(\"AG Grid: ChartModel migration\", { migratedTo: maxVersion, result });\n return result;\n }\n return model;\n}\nfunction versionParts(version) {\n const split = typeof version === \"string\" ? version.split(\".\").map((v) => Number(v)) : [];\n if (split.length !== 3 || split.some((v) => isNaN(v))) {\n throw new Error(\"AG Grid - Illegal version string: \" + version);\n }\n return {\n major: split[0],\n minor: split[1],\n patch: split[2]\n };\n}\nfunction versionNumber(version) {\n const { major, minor, patch } = versionParts(version);\n return major * 1e4 + minor * 100 + patch;\n}\nfunction jsonDeleteDefault(path, defaultValue, json) {\n return jsonMutateProperty(path, true, json, (parent, prop) => {\n if (parent[prop] === defaultValue) {\n delete parent[prop];\n }\n });\n}\nfunction jsonBackfill(path, defaultValue, json) {\n return jsonMutateProperty(path, false, json, (parent, prop) => {\n if (parent[prop] == null) {\n parent[prop] = defaultValue;\n }\n });\n}\nfunction jsonAdd(path, value, json) {\n var _a;\n if (typeof path === \"string\") {\n path = path.split(\".\");\n }\n const nextPath = path[0];\n if (path.length > 1) {\n json[nextPath] = jsonAdd(path.slice(1), value, (_a = json[nextPath]) != null ? _a : {});\n }\n const hasProperty = Object.keys(json).includes(nextPath);\n if (!hasProperty) {\n json[nextPath] = value;\n }\n return json;\n}\nfunction jsonMove(from, to, json) {\n let valueToMove = void 0;\n let valueFound = false;\n json = jsonMutateProperty(from, true, json, (parent, prop) => {\n valueFound = true;\n valueToMove = parent[prop];\n delete parent[prop];\n });\n if (!valueFound) {\n return json;\n }\n return jsonMutateProperty(to, false, json, (parent, prop) => {\n parent[prop] = valueToMove;\n });\n}\nfunction jsonMoveIfMissing(from, to, json) {\n let valueToMove = void 0;\n let valueFound = false;\n json = jsonMutateProperty(from, true, json, (parent, prop) => {\n valueFound = true;\n valueToMove = parent[prop];\n delete parent[prop];\n });\n if (!valueFound) {\n return json;\n }\n return jsonMutateProperty(to, false, json, (parent, prop) => {\n if (parent[prop] === void 0) {\n parent[prop] = valueToMove;\n }\n });\n}\nfunction jsonRename(path, renameTo, json) {\n return jsonMutateProperty(path, true, json, (parent, prop) => {\n parent[renameTo] = parent[prop];\n delete parent[prop];\n });\n}\nfunction jsonDelete(path, json) {\n return jsonMutateProperty(path, true, json, (parent, prop) => delete parent[prop]);\n}\nfunction jsonMutateProperty(path, skipMissing, json, mutator) {\n const pathElements = path instanceof Array ? path : path.split(\".\");\n const parentPathElements = pathElements.slice(0, pathElements.length - 1);\n const targetName = pathElements[pathElements.length - 1];\n return jsonMutate(parentPathElements, json, (parent) => {\n const hasProperty = Object.keys(parent).includes(targetName);\n if (skipMissing && !hasProperty) {\n return parent;\n }\n const result = __spreadValues3({}, parent);\n mutator(result, targetName);\n return result;\n });\n}\nfunction jsonMutate(path, json, mutator) {\n const pathElements = path instanceof Array ? path : path.split(\".\");\n json = __spreadValues3({}, json);\n if (pathElements.length === 0) {\n return mutator(json);\n } else if (pathElements[0].startsWith(\"{\")) {\n const pathOptions = pathElements[0].substring(1, pathElements[0].lastIndexOf(\"}\")).split(\",\");\n for (const pathOption of pathOptions) {\n if (json[pathOption] != null) {\n json[pathOption] = jsonMutate(pathElements.slice(1), json[pathOption], mutator);\n }\n }\n } else if (pathElements[0].endsWith(\"[]\")) {\n const arrayName = pathElements[0].substring(0, path[0].indexOf(\"[\"));\n if (json[arrayName] instanceof Array) {\n json[arrayName] = json[arrayName].map((v) => jsonMutate(pathElements.slice(1), v, mutator));\n }\n } else if (pathElements[0] === \"*\") {\n for (const jsonProp in json) {\n json[jsonProp] = jsonMutate(pathElements.slice(1), json[jsonProp], mutator);\n }\n } else if (json[pathElements[0]] != null) {\n json[pathElements[0]] = jsonMutate(pathElements.slice(1), json[pathElements[0]], mutator);\n }\n return json;\n}\nvar merge = (r, n) => __spreadValues3(__spreadValues3({}, r), n);\nvar ChartService = class extends BeanStub10 {\n constructor() {\n super(...arguments);\n this.activeCharts = /* @__PURE__ */ new Set();\n this.activeChartComps = /* @__PURE__ */ new Set();\n this.crossFilteringContext = {\n lastSelectedChartId: \"\"\n };\n this.isEnterprise = () => _ModuleSupport5.enterpriseModule.isEnterprise;\n }\n updateChart(params) {\n if (this.activeChartComps.size === 0) {\n console.warn(`AG Grid - No active charts to update.`);\n return;\n }\n const chartComp = [...this.activeChartComps].find((chartComp2) => chartComp2.getChartId() === params.chartId);\n if (!chartComp) {\n console.warn(`AG Grid - Unable to update chart. No active chart found with ID: ${params.chartId}.`);\n return;\n }\n chartComp.update(params);\n }\n getChartModels() {\n const models = [];\n const versionedModel = (c) => {\n return __spreadProps3(__spreadValues3({}, c), { version: VERSION4 });\n };\n this.activeChartComps.forEach((c) => models.push(versionedModel(c.getChartModel())));\n return models;\n }\n getChartRef(chartId) {\n let chartRef;\n this.activeCharts.forEach((cr) => {\n if (cr.chartId === chartId) {\n chartRef = cr;\n }\n });\n return chartRef;\n }\n getChartComp(chartId) {\n let chartComp;\n this.activeChartComps.forEach((comp) => {\n if (comp.getChartId() === chartId) {\n chartComp = comp;\n }\n });\n return chartComp;\n }\n getChartImageDataURL(params) {\n let url;\n this.activeChartComps.forEach((c) => {\n if (c.getChartId() === params.chartId) {\n url = c.getChartImageDataURL(params.fileFormat);\n }\n });\n return url;\n }\n downloadChart(params) {\n const chartComp = Array.from(this.activeChartComps).find((c) => c.getChartId() === params.chartId);\n chartComp == null ? void 0 : chartComp.downloadChart(params.dimensions, params.fileName, params.fileFormat);\n }\n openChartToolPanel(params) {\n const chartComp = Array.from(this.activeChartComps).find((c) => c.getChartId() === params.chartId);\n chartComp == null ? void 0 : chartComp.openChartToolPanel(params.panel);\n }\n closeChartToolPanel(chartId) {\n const chartComp = Array.from(this.activeChartComps).find((c) => c.getChartId() === chartId);\n chartComp == null ? void 0 : chartComp.closeChartToolPanel();\n }\n createChartFromCurrentRange(chartType = \"groupedColumn\") {\n const cellRange = this.getSelectedRange();\n return this.createChart({ cellRange, chartType });\n }\n restoreChart(model, chartContainer) {\n if (!model) {\n console.warn(\"AG Grid - unable to restore chart as no chart model is provided\");\n return;\n }\n if (model.version !== VERSION4) {\n model = upgradeChartModel(model);\n }\n let cellRange;\n let pivotChart;\n let suppressChartRanges;\n let chartPaletteToRestore;\n if (model.modelType === \"pivot\") {\n this.gos.updateGridOptions({ options: { pivotMode: true }, source: \"pivotChart\" });\n cellRange = this.createCellRange(void 0, true);\n pivotChart = true;\n suppressChartRanges = true;\n } else {\n cellRange = this.createCellRange(model.cellRange);\n chartPaletteToRestore = model.chartPalette;\n }\n if (!cellRange) {\n return;\n }\n return this.createChart(__spreadProps3(__spreadValues3({}, model), {\n cellRange,\n pivotChart,\n suppressChartRanges,\n chartContainer,\n chartOptionsToRestore: model.chartOptions,\n chartPaletteToRestore\n }));\n }\n createRangeChart(params) {\n const cellRange = this.createCellRange(params.cellRange);\n if (!cellRange) {\n return;\n }\n return this.createChart(__spreadProps3(__spreadValues3({}, params), {\n cellRange\n }));\n }\n createPivotChart(params) {\n this.gos.updateGridOptions({ options: { pivotMode: true }, source: \"pivotChart\" });\n const cellRange = this.createCellRange(void 0, true);\n if (!cellRange) {\n return;\n }\n return this.createChart(__spreadProps3(__spreadValues3({}, params), {\n cellRange,\n pivotChart: true,\n suppressChartRanges: true\n }));\n }\n createCrossFilterChart(params) {\n const cellRange = this.createCellRange(params.cellRange);\n if (!cellRange) {\n return;\n }\n const suppressChartRangesSupplied = typeof params.suppressChartRanges !== \"undefined\" && params.suppressChartRanges !== null;\n const suppressChartRanges = suppressChartRangesSupplied ? params.suppressChartRanges : true;\n return this.createChart(__spreadProps3(__spreadValues3({}, params), {\n cellRange,\n suppressChartRanges,\n crossFiltering: true\n }));\n }\n createChart(params) {\n const validationResult = ChartParamsValidator.validateCreateParams(params);\n if (!validationResult) {\n return void 0;\n }\n params = validationResult === true ? params : validationResult;\n const { chartType, chartContainer } = params;\n const createChartContainerFunc = this.gos.getCallback(\"createChartContainer\");\n const gridChartParams = __spreadProps3(__spreadValues3({}, params), {\n chartId: this.generateId(),\n chartType: getCanonicalChartType(chartType),\n insideDialog: !(chartContainer || createChartContainerFunc),\n crossFilteringContext: this.crossFilteringContext,\n crossFilteringResetCallback: () => this.activeChartComps.forEach((c) => c.crossFilteringReset())\n });\n const chartComp = new GridChartComp(gridChartParams);\n this.context.createBean(chartComp);\n const chartRef = this.createChartRef(chartComp);\n if (chartContainer) {\n chartContainer.appendChild(chartComp.getGui());\n const theme = this.environment.getTheme();\n if (theme.el && !theme.el.contains(chartContainer)) {\n chartContainer.classList.add(theme.theme);\n }\n } else if (createChartContainerFunc) {\n createChartContainerFunc(chartRef);\n } else {\n chartComp.addEventListener(\n GridChartComp.EVENT_DESTROYED,\n () => {\n this.activeChartComps.delete(chartComp);\n this.activeCharts.delete(chartRef);\n }\n );\n }\n return chartRef;\n }\n createChartRef(chartComp) {\n const chartRef = {\n destroyChart: () => {\n if (this.activeCharts.has(chartRef)) {\n this.context.destroyBean(chartComp);\n this.activeChartComps.delete(chartComp);\n this.activeCharts.delete(chartRef);\n }\n },\n chartElement: chartComp.getGui(),\n chart: chartComp.getUnderlyingChart(),\n chartId: chartComp.getChartModel().chartId\n };\n this.activeCharts.add(chartRef);\n this.activeChartComps.add(chartComp);\n return chartRef;\n }\n getSelectedRange() {\n var _a, _b;\n const ranges = (_b = (_a = this.rangeService) == null ? void 0 : _a.getCellRanges()) != null ? _b : [];\n return ranges.length > 0 ? ranges[0] : { columns: [] };\n }\n generateId() {\n return `id-${Math.random().toString(36).substring(2, 18)}`;\n }\n createCellRange(cellRangeParams, allRange) {\n var _a;\n const rangeParams = allRange ? {\n rowStartIndex: null,\n rowStartPinned: void 0,\n rowEndIndex: null,\n rowEndPinned: void 0,\n columns: this.columnModel.getAllDisplayedColumns().map((col) => col.getColId())\n } : cellRangeParams;\n const cellRange = rangeParams && ((_a = this.rangeService) == null ? void 0 : _a.createPartialCellRangeFromRangeParams(rangeParams, true));\n if (!cellRange) {\n console.warn(`AG Grid - unable to create chart as ${allRange ? \"there are no columns in the grid\" : \"no range is selected\"}.`);\n }\n return cellRange;\n }\n destroyAllActiveCharts() {\n this.activeCharts.forEach((chart) => chart.destroyChart());\n }\n};\nChartService.CHARTS_VERSION = CHARTS_VERSION;\n__decorateClass4([\n Autowired41(\"columnModel\")\n], ChartService.prototype, \"columnModel\", 2);\n__decorateClass4([\n Optional2(\"rangeService\")\n], ChartService.prototype, \"rangeService\", 2);\n__decorateClass4([\n PreDestroy\n], ChartService.prototype, \"destroyAllActiveCharts\", 1);\nChartService = __decorateClass4([\n Bean32(\"chartService\")\n], ChartService);\nvar ChartTranslationService = class extends BeanStub11 {\n translate(toTranslate) {\n const translate = this.localeService.getLocaleTextFunc();\n const defaultTranslation = ChartTranslationService.DEFAULT_TRANSLATIONS[toTranslate];\n return translate(toTranslate, defaultTranslation);\n }\n};\nChartTranslationService.DEFAULT_TRANSLATIONS = {\n pivotChartTitle: \"Pivot Chart\",\n rangeChartTitle: \"Range Chart\",\n settings: \"Chart\",\n data: \"Data\",\n format: \"Format\",\n categories: \"Categories\",\n defaultCategory: \"(None)\",\n series: \"Series\",\n switchCategorySeries: \"Switch Category / Series\",\n categoryValues: \"Category Values\",\n seriesLabels: \"Series Labels\",\n aggregate: \"Aggregate\",\n xyValues: \"X Y Values\",\n paired: \"Paired Mode\",\n axis: \"Axis\",\n xAxis: \"Horizontal Axis\",\n yAxis: \"Vertical Axis\",\n polarAxis: \"Polar Axis\",\n radiusAxis: \"Radius Axis\",\n navigator: \"Navigator\",\n zoom: \"Zoom\",\n animation: \"Animation\",\n crosshair: \"Crosshair\",\n color: \"Color\",\n thickness: \"Thickness\",\n preferredLength: \"Preferred Length\",\n xType: \"X Type\",\n axisType: \"Axis Type\",\n automatic: \"Automatic\",\n category: \"Category\",\n number: \"Number\",\n time: \"Time\",\n timeFormat: \"Time Format\",\n autoRotate: \"Auto Rotate\",\n labelRotation: \"Rotation\",\n circle: \"Circle\",\n orientation: \"Orientation\",\n polygon: \"Polygon\",\n fixed: \"Fixed\",\n parallel: \"Parallel\",\n perpendicular: \"Perpendicular\",\n radiusAxisPosition: \"Position\",\n ticks: \"Ticks\",\n gridLines: \"Grid Lines\",\n width: \"Width\",\n height: \"Height\",\n length: \"Length\",\n padding: \"Padding\",\n spacing: \"Spacing\",\n chart: \"Chart\",\n title: \"Title\",\n titlePlaceholder: \"Chart title - double click to edit\",\n background: \"Background\",\n font: \"Font\",\n top: \"Top\",\n right: \"Right\",\n bottom: \"Bottom\",\n left: \"Left\",\n labels: \"Labels\",\n calloutLabels: \"Callout Labels\",\n sectorLabels: \"Sector Labels\",\n positionRatio: \"Position Ratio\",\n size: \"Size\",\n shape: \"Shape\",\n minSize: \"Minimum Size\",\n maxSize: \"Maximum Size\",\n legend: \"Legend\",\n position: \"Position\",\n markerSize: \"Marker Size\",\n markerStroke: \"Marker Stroke\",\n markerPadding: \"Marker Padding\",\n itemSpacing: \"Item Spacing\",\n itemPaddingX: \"Item Padding X\",\n itemPaddingY: \"Item Padding Y\",\n layoutHorizontalSpacing: \"Horizontal Spacing\",\n layoutVerticalSpacing: \"Vertical Spacing\",\n strokeWidth: \"Stroke Width\",\n offset: \"Offset\",\n offsets: \"Offsets\",\n tooltips: \"Tooltips\",\n callout: \"Callout\",\n markers: \"Markers\",\n shadow: \"Shadow\",\n blur: \"Blur\",\n xOffset: \"X Offset\",\n yOffset: \"Y Offset\",\n lineWidth: \"Line Width\",\n lineDash: \"Line Dash\",\n lineDashOffset: \"Dash Offset\",\n scrollingZoom: \"Scrolling\",\n scrollingStep: \"Scrolling Step\",\n selectingZoom: \"Selecting\",\n durationMillis: \"Duration (ms)\",\n crosshairLabel: \"Label\",\n crosshairSnap: \"Snap to Node\",\n normal: \"Normal\",\n bold: \"Bold\",\n italic: \"Italic\",\n boldItalic: \"Bold Italic\",\n predefined: \"Predefined\",\n fillOpacity: \"Fill Opacity\",\n strokeColor: \"Line Color\",\n strokeOpacity: \"Line Opacity\",\n miniChart: \"Mini-Chart\",\n histogramBinCount: \"Bin count\",\n connectorLine: \"Connector Line\",\n seriesItems: \"Series Items\",\n seriesItemType: \"Item Type\",\n seriesItemPositive: \"Positive\",\n seriesItemNegative: \"Negative\",\n seriesItemLabels: \"Item Labels\",\n columnGroup: \"Column\",\n barGroup: \"Bar\",\n pieGroup: \"Pie\",\n lineGroup: \"Line\",\n scatterGroup: \"X Y (Scatter)\",\n areaGroup: \"Area\",\n polarGroup: \"Polar\",\n statisticalGroup: \"Statistical\",\n hierarchicalGroup: \"Hierarchical\",\n specializedGroup: \"Specialized\",\n combinationGroup: \"Combination\",\n groupedColumnTooltip: \"Grouped\",\n stackedColumnTooltip: \"Stacked\",\n normalizedColumnTooltip: \"100% Stacked\",\n groupedBarTooltip: \"Grouped\",\n stackedBarTooltip: \"Stacked\",\n normalizedBarTooltip: \"100% Stacked\",\n pieTooltip: \"Pie\",\n donutTooltip: \"Donut\",\n lineTooltip: \"Line\",\n groupedAreaTooltip: \"Area\",\n stackedAreaTooltip: \"Stacked\",\n normalizedAreaTooltip: \"100% Stacked\",\n scatterTooltip: \"Scatter\",\n bubbleTooltip: \"Bubble\",\n histogramTooltip: \"Histogram\",\n radialColumnTooltip: \"Radial Column\",\n radialBarTooltip: \"Radial Bar\",\n radarLineTooltip: \"Radar Line\",\n radarAreaTooltip: \"Radar Area\",\n nightingaleTooltip: \"Nightingale\",\n rangeBarTooltip: \"Range Bar\",\n rangeAreaTooltip: \"Range Area\",\n boxPlotTooltip: \"Box Plot\",\n treemapTooltip: \"Treemap\",\n sunburstTooltip: \"Sunburst\",\n heatmapTooltip: \"Heatmap\",\n waterfallTooltip: \"Waterfall\",\n columnLineComboTooltip: \"Column & Line\",\n areaColumnComboTooltip: \"Area & Column\",\n customComboTooltip: \"Custom Combination\",\n innerRadius: \"Inner Radius\",\n startAngle: \"Start Angle\",\n endAngle: \"End Angle\",\n reverseDirection: \"Reverse Direction\",\n groupPadding: \"Group Padding\",\n seriesPadding: \"Series Padding\",\n group: \"Group\",\n tile: \"Tile\",\n whisker: \"Whisker\",\n cap: \"Cap\",\n capLengthRatio: \"Length Ratio\",\n labelPlacement: \"Placement\",\n inside: \"Inside\",\n outside: \"Outside\",\n noDataToChart: \"No data available to be charted.\",\n pivotChartRequiresPivotMode: \"Pivot Chart requires Pivot Mode enabled.\",\n chartSettingsToolbarTooltip: \"Menu\",\n chartLinkToolbarTooltip: \"Linked to Grid\",\n chartUnlinkToolbarTooltip: \"Unlinked from Grid\",\n chartDownloadToolbarTooltip: \"Download Chart\",\n chartMenuToolbarTooltip: \"Menu\",\n chartEdit: \"Edit Chart\",\n chartAdvancedSettings: \"Advanced Settings\",\n chartLink: \"Link to Grid\",\n chartUnlink: \"Unlink from Grid\",\n chartDownload: \"Download Chart\",\n histogramFrequency: \"Frequency\",\n seriesChartType: \"Series Chart Type\",\n seriesType: \"Series Type\",\n secondaryAxis: \"Secondary Axis\",\n seriesAdd: \"Add a series\",\n categoryAdd: \"Add a category\",\n area: \"Area\",\n bar: \"Bar\",\n column: \"Column\",\n line: \"Line\",\n scatter: \"Scatter\",\n histogram: \"Histogram\",\n radialColumn: \"Radial Column\",\n radialBar: \"Radial Bar\",\n radarLine: \"Radar Line\",\n radarArea: \"Radar Area\",\n nightingale: \"Nightingale\",\n rangeBar: \"Range Bar\",\n rangeArea: \"Range Area\",\n treemap: \"Treemap\",\n sunburst: \"Sunburst\",\n waterfall: \"Waterfall\",\n boxPlot: \"Box Plot\",\n pie: \"Pie\",\n donut: \"Donut\",\n stackedArea: \"StackedArea\",\n groupedColumn: \"Grouped Column\",\n stackedColumn: \"Stacked Column\",\n advancedSettings: \"Advanced Settings\",\n ariaChartMenuClose: \"Close Chart Edit Menu\",\n timeFormatSlashesDDMMYYYY: \"DD/MM/YYYY\",\n timeFormatSlashesMMDDYYYY: \"MM/DD/YYYY\",\n timeFormatSlashesDDMMYY: \"DD/MM/YY\",\n timeFormatSlashesMMDDYY: \"MM/DD/YY\",\n timeFormatDotsDDMYY: \"DD.M.YY\",\n timeFormatDotsMDDYY: \"M.DD.YY\",\n timeFormatDashesYYYYMMDD: \"YYYY-MM-DD\",\n timeFormatSpacesDDMMMMYYYY: \"DD MMMM YYYY\",\n timeFormatHHMMSS: \"HH:MM:SS\",\n timeFormatHHMMSSAmPm: \"HH:MM:SS AM/PM\",\n sum: \"Sum\",\n first: \"First\",\n last: \"Last\",\n min: \"Min\",\n max: \"Max\",\n count: \"Count\",\n avg: \"Average\",\n direction: \"Direction\",\n horizontal: \"Horizontal\",\n vertical: \"Vertical\",\n seriesGroupType: \"Group Type\",\n groupedSeriesGroupType: \"Grouped\",\n stackedSeriesGroupType: \"Stacked\",\n normalizedSeriesGroupType: \"100% Stacked\"\n};\nChartTranslationService = __decorateClass4([\n Bean42(\"chartTranslationService\")\n], ChartTranslationService);\nvar ChartCrossFilterService = class extends BeanStub12 {\n filter(event, reset = false) {\n const filterModel = this.gridApi.getFilterModel();\n if (reset) {\n this.resetFilters(filterModel);\n return;\n }\n let colId = ChartCrossFilterService.extractFilterColId(event);\n if (this.isValidColumnFilter(colId)) {\n this.updateFilters(filterModel, event, colId);\n } else {\n console.warn(\"AG Grid: cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '\" + colId + \"'\");\n }\n }\n resetFilters(filterModel) {\n const filtersExist = Object.keys(filterModel).length > 0;\n if (filtersExist) {\n this.gridApi.setFilterModel(null);\n this.gridApi.onFilterChanged();\n }\n }\n updateFilters(filterModel, event, colId) {\n let dataKey = ChartCrossFilterService.extractFilterColId(event);\n let rawValue = event.datum[dataKey];\n if (rawValue === void 0) {\n return;\n }\n let selectedValue = rawValue.toString();\n if (event.event.metaKey || event.event.ctrlKey) {\n const existingGridValues = this.getCurrentGridValuesForCategory(colId);\n const valueAlreadyExists = _35.includes(existingGridValues, selectedValue);\n let updatedValues;\n if (valueAlreadyExists) {\n updatedValues = existingGridValues.filter((v) => v !== selectedValue);\n } else {\n updatedValues = existingGridValues;\n updatedValues.push(selectedValue);\n }\n filterModel[colId] = this.getUpdatedFilterModel(colId, updatedValues);\n } else {\n const updatedValues = [selectedValue];\n filterModel = { [colId]: this.getUpdatedFilterModel(colId, updatedValues) };\n }\n this.gridApi.setFilterModel(filterModel);\n }\n getUpdatedFilterModel(colId, updatedValues) {\n let columnFilterType = this.getColumnFilterType(colId);\n if (columnFilterType === \"agMultiColumnFilter\") {\n return { filterType: \"multi\", filterModels: [null, { filterType: \"set\", values: updatedValues }] };\n }\n return { filterType: \"set\", values: updatedValues };\n }\n getCurrentGridValuesForCategory(colId) {\n let filteredValues = [];\n const column = this.getColumnById(colId);\n this.gridApi.forEachNodeAfterFilter((rowNode) => {\n if (column && !rowNode.group) {\n const value = this.valueService.getValue(column, rowNode) + \"\";\n if (!filteredValues.includes(value)) {\n filteredValues.push(value);\n }\n }\n });\n return filteredValues;\n }\n static extractFilterColId(event) {\n return event.xKey || event.calloutLabelKey;\n }\n isValidColumnFilter(colId) {\n if (colId.indexOf(\"-filtered-out\")) {\n colId = colId.replace(\"-filtered-out\", \"\");\n }\n let filterType = this.getColumnFilterType(colId);\n if (typeof filterType === \"boolean\") {\n return filterType;\n }\n return _35.includes([\"agSetColumnFilter\", \"agMultiColumnFilter\"], filterType);\n }\n getColumnFilterType(colId) {\n let gridColumn = this.getColumnById(colId);\n if (gridColumn) {\n const colDef = gridColumn.getColDef();\n return colDef.filter;\n }\n }\n getColumnById(colId) {\n return this.columnModel.getGridColumn(colId);\n }\n};\n__decorateClass4([\n Autowired422(\"gridApi\")\n], ChartCrossFilterService.prototype, \"gridApi\", 2);\n__decorateClass4([\n Autowired422(\"columnModel\")\n], ChartCrossFilterService.prototype, \"columnModel\", 2);\n__decorateClass4([\n Autowired422(\"valueService\")\n], ChartCrossFilterService.prototype, \"valueService\", 2);\nChartCrossFilterService = __decorateClass4([\n Bean5(\"chartCrossFilterService\")\n], ChartCrossFilterService);\nvar VERSION_CHECKING_FIRST_GRID_MAJOR_VERSION = 28;\nvar VERSION_CHECKING_FIRST_CHARTS_MAJOR_VERSION = 6;\nfunction isValidVersion(version) {\n return version && version.match(/\\d+\\.\\d+\\.\\d+/);\n}\nfunction isValidMajorVersion({ gridMajorVersion, chartsMajorVersion }) {\n const gridMajor = parseInt(gridMajorVersion, 10);\n const chartsMajor = parseInt(chartsMajorVersion, 10);\n const gridMajorDifference = gridMajor - VERSION_CHECKING_FIRST_GRID_MAJOR_VERSION;\n const chartsMajorDifference = chartsMajor - VERSION_CHECKING_FIRST_CHARTS_MAJOR_VERSION;\n const isFirstOrAfterVersion = gridMajorDifference >= 0;\n return gridMajorDifference === chartsMajorDifference && isFirstOrAfterVersion;\n}\nfunction gridChartVersion(gridVersion) {\n if (!gridVersion || !isValidVersion(gridVersion)) {\n return void 0;\n }\n const [gridMajor, gridMinor] = gridVersion.split(\".\") || [];\n const gridMajorMinor = `${gridMajor}.${gridMinor}.x`;\n const gridMajorNumber = parseInt(gridMajor, 10);\n const chartsMajor = gridMajorNumber - VERSION_CHECKING_FIRST_GRID_MAJOR_VERSION + VERSION_CHECKING_FIRST_CHARTS_MAJOR_VERSION;\n if (chartsMajor < 0) {\n return void 0;\n }\n const chartsMinor = gridMinor;\n const chartsMajorMinor = `${chartsMajor}.${chartsMinor}.x`;\n return {\n gridMajorMinor,\n chartsMajorMinor\n };\n}\nfunction validGridChartsVersionErrorMessage({ type, gridVersion, chartsVersion }) {\n const invalidMessage = \"AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.\";\n if (!gridVersion) {\n return invalidMessage;\n }\n const version = gridChartVersion(gridVersion);\n if (!version) {\n return invalidMessage;\n }\n const { gridMajorMinor, chartsMajorMinor } = version;\n if (type === \"incompatible\") {\n return `AG Grid version ${gridVersion} and AG Charts version ${chartsVersion} is not supported. AG Grid version ${gridMajorMinor} should be used with AG Chart ${chartsMajorMinor}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`;\n } else if (type === \"invalidCharts\") {\n return `AG Grid version ${gridMajorMinor} should be used with AG Chart ${chartsMajorMinor}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`;\n }\n return invalidMessage;\n}\nfunction validGridChartsVersion({ gridVersion, chartsVersion }) {\n if (!isValidVersion(chartsVersion)) {\n return {\n isValid: false,\n message: validGridChartsVersionErrorMessage({ type: \"invalidCharts\", gridVersion, chartsVersion })\n };\n }\n if (!isValidVersion(gridVersion)) {\n return {\n isValid: false,\n message: validGridChartsVersionErrorMessage({ type: \"invalidGrid\", gridVersion, chartsVersion })\n };\n }\n const [gridMajor, gridMinor] = gridVersion.split(\".\") || [];\n const [chartsMajor, chartsMinor, chartsPatch] = chartsVersion.split(\".\") || [];\n const isValidMajor = isValidMajorVersion({\n gridMajorVersion: gridMajor,\n chartsMajorVersion: chartsMajor\n });\n if (isValidMajor && gridMinor === chartsMinor || chartsPatch.includes(\"beta\")) {\n return {\n isValid: true\n };\n } else if (!isValidMajor || gridMinor !== chartsMinor) {\n return {\n isValid: false,\n message: validGridChartsVersionErrorMessage({ type: \"incompatible\", gridVersion, chartsVersion })\n };\n }\n return {\n isValid: false,\n message: validGridChartsVersionErrorMessage({ type: \"invalid\", gridVersion, chartsVersion })\n };\n}\nvar ChartMenuListFactory = class extends BeanStub13 {\n showMenuList(params) {\n const { eventSource, showMenu, chartMenuContext } = params;\n const areChartToolPanelsEnabled = this.chartMenuService.doChartToolPanelsExist(chartMenuContext.chartController);\n const menuItems = this.mapWithStockItems(\n this.getMenuItems(chartMenuContext.chartController, areChartToolPanelsEnabled),\n chartMenuContext,\n showMenu,\n eventSource,\n areChartToolPanelsEnabled\n );\n if (!menuItems.length) {\n return;\n }\n const chartMenuList = this.createBean(new ChartMenuList(menuItems));\n this.activeChartMenuList = chartMenuList;\n let multiplier = -1;\n let alignSide = \"left\";\n if (this.gos.get(\"enableRtl\")) {\n multiplier = 1;\n alignSide = \"right\";\n }\n const eGui = chartMenuList.getGui();\n this.popupService.addPopup({\n modal: true,\n eChild: eGui,\n closeOnEsc: true,\n closedCallback: () => {\n this.destroyBean(chartMenuList);\n this.activeChartMenuList = void 0;\n const eDocument = this.gos.getDocument();\n const activeEl = this.gos.getActiveDomElement();\n if (!activeEl || activeEl === eDocument.body) {\n eventSource.focus({ preventScroll: true });\n }\n },\n afterGuiAttached: (params2) => chartMenuList.afterGuiAttached(params2),\n positionCallback: () => {\n {\n this.popupService.positionPopupByComponent({\n type: \"chartMenu\",\n eventSource,\n ePopup: eGui,\n alignSide,\n nudgeX: 4 * multiplier,\n nudgeY: 4,\n position: \"under\",\n keepWithinBounds: true\n });\n }\n },\n ariaLabel: \"Chart Menu\"\n });\n }\n getMenuItems(chartController, areChartToolPanelsEnabled) {\n const defaultItems = [\n ...areChartToolPanelsEnabled ? [\"chartEdit\"] : [],\n ...chartController.isEnterprise() ? [\"chartAdvancedSettings\"] : [],\n chartController.isChartLinked() ? \"chartUnlink\" : \"chartLink\",\n \"chartDownload\"\n ];\n const chartMenuItems = this.gos.get(\"chartMenuItems\");\n if (!chartMenuItems) {\n return defaultItems;\n } else if (Array.isArray(chartMenuItems)) {\n return chartMenuItems;\n } else {\n return chartMenuItems(this.gos.addGridCommonParams({\n defaultItems\n }));\n }\n }\n mapWithStockItems(originalList, chartMenuContext, showMenu, eventSource, areChartToolPanelsEnabled) {\n if (!originalList) {\n return [];\n }\n const resultList = [];\n originalList.forEach((menuItemOrString) => {\n let result;\n if (typeof menuItemOrString === \"string\") {\n result = this.getStockMenuItem(menuItemOrString, chartMenuContext, showMenu, eventSource, areChartToolPanelsEnabled);\n } else {\n result = __spreadValues3({}, menuItemOrString);\n }\n if (!result) {\n return;\n }\n const { subMenu } = result;\n if (Array.isArray(subMenu)) {\n result.subMenu = this.mapWithStockItems(subMenu, chartMenuContext, showMenu, eventSource, areChartToolPanelsEnabled);\n }\n resultList.push(result);\n });\n return resultList;\n }\n getStockMenuItem(key, chartMenuContext, showMenu, eventSource, areChartToolPanelsEnabled) {\n switch (key) {\n case \"chartEdit\":\n return areChartToolPanelsEnabled ? this.createMenuItem(this.chartTranslationService.translate(\"chartEdit\"), \"chartsMenuEdit\", showMenu) : null;\n case \"chartAdvancedSettings\":\n return this.createMenuItem(\n this.chartTranslationService.translate(\"chartAdvancedSettings\"),\n \"chartsMenuAdvancedSettings\",\n () => this.chartMenuService.openAdvancedSettings(chartMenuContext, eventSource)\n );\n case \"chartUnlink\":\n return chartMenuContext.chartController.isChartLinked() ? this.createMenuItem(\n this.chartTranslationService.translate(\"chartUnlink\"),\n \"unlinked\",\n () => this.chartMenuService.toggleLinked(chartMenuContext)\n ) : null;\n case \"chartLink\":\n return !chartMenuContext.chartController.isChartLinked() ? this.createMenuItem(\n this.chartTranslationService.translate(\"chartLink\"),\n \"linked\",\n () => this.chartMenuService.toggleLinked(chartMenuContext)\n ) : null;\n case \"chartDownload\":\n return this.createMenuItem(\n this.chartTranslationService.translate(\"chartDownload\"),\n \"save\",\n () => this.chartMenuService.downloadChart(chartMenuContext)\n );\n }\n return null;\n }\n createMenuItem(name, iconName, action) {\n return {\n name,\n icon: _36.createIconNoSpan(iconName, this.gos, null),\n action\n };\n }\n destroy() {\n this.destroyBean(this.activeChartMenuList);\n super.destroy();\n }\n};\n__decorateClass4([\n Autowired43(\"popupService\")\n], ChartMenuListFactory.prototype, \"popupService\", 2);\n__decorateClass4([\n Autowired43(\"chartMenuService\")\n], ChartMenuListFactory.prototype, \"chartMenuService\", 2);\n__decorateClass4([\n Autowired43(\"chartTranslationService\")\n], ChartMenuListFactory.prototype, \"chartTranslationService\", 2);\nChartMenuListFactory = __decorateClass4([\n Bean6(\"chartMenuListFactory\")\n], ChartMenuListFactory);\nvar ChartMenuList = class extends Component37 {\n constructor(menuItems) {\n super(\n /* html */\n `\n
\n `\n );\n this.menuItems = menuItems;\n }\n init() {\n this.mainMenuList = this.createManagedBean(new AgMenuList(0));\n this.mainMenuList.addMenuItems(this.menuItems);\n this.mainMenuList.addEventListener(AgMenuItemComponent.EVENT_CLOSE_MENU, this.onHidePopup.bind(this));\n this.eChartsMenu.appendChild(this.mainMenuList.getGui());\n }\n onHidePopup() {\n var _a;\n (_a = this.hidePopupFunc) == null ? void 0 : _a.call(this);\n }\n afterGuiAttached({ hidePopup }) {\n if (hidePopup) {\n this.hidePopupFunc = hidePopup;\n this.addDestroyFunc(hidePopup);\n }\n this.focusService.focusInto(this.mainMenuList.getGui());\n }\n};\n__decorateClass4([\n Autowired43(\"focusService\")\n], ChartMenuList.prototype, \"focusService\", 2);\n__decorateClass4([\n RefSelector13(\"eChartsMenu\")\n], ChartMenuList.prototype, \"eChartsMenu\", 2);\n__decorateClass4([\n PostConstruct432\n], ChartMenuList.prototype, \"init\", 1);\nvar _AnimationPanel = class _AnimationPanel2 extends Component38 {\n constructor(chartMenuParamsFactory) {\n super();\n this.chartMenuParamsFactory = chartMenuParamsFactory;\n }\n init() {\n const animationGroupParams = this.chartMenuParamsFactory.addEnableParams(\n \"animation.enabled\",\n {\n cssIdentifier: \"charts-advanced-settings-top-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"animation\"),\n suppressEnabledCheckbox: true,\n useToggle: true\n }\n );\n const animationHeightInputParams = this.chartMenuParamsFactory.getDefaultNumberInputParams(\"animation.duration\", \"durationMillis\", {\n min: 0\n });\n this.setTemplate(_AnimationPanel2.TEMPLATE, {\n animationGroup: animationGroupParams,\n animationHeightInput: animationHeightInputParams\n });\n }\n};\n_AnimationPanel.TEMPLATE = /* html */\n`
\n \n \n \n
`;\n__decorateClass4([\n Autowired44(\"chartTranslationService\")\n], _AnimationPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct44\n], _AnimationPanel.prototype, \"init\", 1);\nvar AnimationPanel = _AnimationPanel;\nvar _CrosshairPanel = class _CrosshairPanel2 extends Component39 {\n constructor(chartMenuParamsFactory) {\n super();\n this.chartMenuParamsFactory = chartMenuParamsFactory;\n }\n init() {\n const crosshairGroupParams = this.chartMenuParamsFactory.addEnableParams(\"crosshair.enabled\", {\n cssIdentifier: \"charts-advanced-settings-top-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"crosshair\"),\n suppressEnabledCheckbox: true,\n useToggle: true\n });\n const crosshairLabelCheckboxParams = this.chartMenuParamsFactory.getDefaultCheckboxParams(\n \"crosshair.label.enabled\",\n \"crosshairLabel\"\n );\n const crosshairSnapCheckboxParams = this.chartMenuParamsFactory.getDefaultCheckboxParams(\n \"crosshair.snap\",\n \"crosshairSnap\"\n );\n const crosshairStrokeColorPickerParams = this.chartMenuParamsFactory.getDefaultColorPickerParams(\n \"crosshair.stroke\",\n \"color\"\n );\n this.setTemplate(_CrosshairPanel2.TEMPLATE, {\n crosshairGroup: crosshairGroupParams,\n crosshairLabelCheckbox: crosshairLabelCheckboxParams,\n crosshairSnapCheckbox: crosshairSnapCheckboxParams,\n crosshairStrokeColorPicker: crosshairStrokeColorPickerParams\n });\n }\n};\n_CrosshairPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired45(\"chartTranslationService\")\n], _CrosshairPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct45\n], _CrosshairPanel.prototype, \"init\", 1);\nvar CrosshairPanel = _CrosshairPanel;\nvar _NavigatorPanel = class _NavigatorPanel2 extends Component40 {\n constructor(chartMenuParamsFactory) {\n super();\n this.chartMenuParamsFactory = chartMenuParamsFactory;\n }\n init() {\n const navigatorGroupParams = this.chartMenuParamsFactory.addEnableParams(\n \"navigator.enabled\",\n {\n cssIdentifier: \"charts-advanced-settings-top-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"navigator\"),\n suppressEnabledCheckbox: true,\n useToggle: true\n }\n );\n const navigatorHeightSliderParams = this.chartMenuParamsFactory.getDefaultSliderParams(\"navigator.height\", \"height\", 60);\n navigatorHeightSliderParams.minValue = 10;\n const navigatorMiniChartCheckboxParams = this.chartMenuParamsFactory.getDefaultCheckboxParams(\"navigator.miniChart.enabled\", \"miniChart\");\n this.setTemplate(_NavigatorPanel2.TEMPLATE, {\n navigatorGroup: navigatorGroupParams,\n navigatorHeightSlider: navigatorHeightSliderParams,\n navigatorMiniChartCheckbox: navigatorMiniChartCheckboxParams\n });\n }\n};\n_NavigatorPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n
`;\n__decorateClass4([\n Autowired46(\"chartTranslationService\")\n], _NavigatorPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n PostConstruct46\n], _NavigatorPanel.prototype, \"init\", 1);\nvar NavigatorPanel = _NavigatorPanel;\nvar _ZoomPanel = class _ZoomPanel2 extends Component41 {\n constructor(chartMenuParamsFactory) {\n super();\n this.chartMenuParamsFactory = chartMenuParamsFactory;\n }\n init() {\n const zoomGroupParams = this.chartMenuParamsFactory.addEnableParams(\"zoom.enabled\", {\n cssIdentifier: \"charts-advanced-settings-top-level\",\n direction: \"vertical\",\n suppressOpenCloseIcons: true,\n title: this.chartTranslationService.translate(\"zoom\"),\n suppressEnabledCheckbox: true,\n useToggle: true\n });\n const zoomScrollingCheckboxParams = this.chartMenuParamsFactory.getDefaultCheckboxParams(\n \"zoom.enableScrolling\",\n \"scrollingZoom\"\n );\n const zoomScrollingStepSliderParams = this.chartMenuParamsFactory.getDefaultSliderParams(\n \"zoom.scrollingStep\",\n \"scrollingStep\",\n 1\n );\n zoomScrollingStepSliderParams.step = 0.01;\n zoomScrollingStepSliderParams.minValue = zoomScrollingStepSliderParams.step;\n const zoomSelectingCheckboxParams = this.chartMenuParamsFactory.getDefaultCheckboxParams(\n \"zoom.enableSelecting\",\n \"selectingZoom\"\n );\n zoomScrollingCheckboxParams.onValueChange = /* @__PURE__ */ ((onValueChange) => (value) => {\n if (!onValueChange)\n return;\n onValueChange(value);\n this.zoomScrollingStepInput.setDisabled(!value);\n })(zoomScrollingCheckboxParams.onValueChange);\n this.setTemplate(_ZoomPanel2.TEMPLATE, {\n zoomGroup: zoomGroupParams,\n zoomScrollingCheckbox: zoomScrollingCheckboxParams,\n zoomScrollingStepInput: zoomScrollingStepSliderParams,\n zoomSelectingCheckbox: zoomSelectingCheckboxParams\n });\n this.zoomScrollingStepInput.setDisabled(!zoomScrollingCheckboxParams.value);\n }\n};\n_ZoomPanel.TEMPLATE = /* html */\n`
\n \n \n \n \n \n
`;\n__decorateClass4([\n Autowired47(\"chartTranslationService\")\n], _ZoomPanel.prototype, \"chartTranslationService\", 2);\n__decorateClass4([\n RefSelector14(\"zoomScrollingStepInput\")\n], _ZoomPanel.prototype, \"zoomScrollingStepInput\", 2);\n__decorateClass4([\n PostConstruct47\n], _ZoomPanel.prototype, \"init\", 1);\nvar ZoomPanel = _ZoomPanel;\nvar INTERACTIVITY_GROUPS = [\"navigator\", \"zoom\", \"animation\", \"crosshair\"];\nvar _AdvancedSettingsPanel = class _AdvancedSettingsPanel2 extends Component422 {\n constructor(chartMenuContext) {\n super(_AdvancedSettingsPanel2.TEMPLATE);\n this.chartMenuContext = chartMenuContext;\n }\n postConstruct() {\n this.chartPanelFeature = this.createManagedBean(new ChartPanelFeature(\n this.chartMenuContext.chartController,\n this.getGui(),\n \"ag-chart-advanced-settings-section\",\n (chartType, seriesType) => this.createPanels(chartType, seriesType)\n ));\n this.chartPanelFeature.refreshPanels();\n }\n createPanels(chartType, seriesType) {\n INTERACTIVITY_GROUPS.forEach((group) => {\n if (!this.isGroupPanelShownForSeries(group, seriesType)) {\n return;\n }\n const comp = this.createPanel(group);\n this.chartPanelFeature.addComponent(comp);\n });\n }\n isGroupPanelShownForSeries(group, seriesType) {\n return group === \"animation\" || isCartesian(seriesType);\n }\n createPanel(group) {\n const { chartMenuParamsFactory, chartAxisMenuParamsFactory } = this.chartMenuContext;\n switch (group) {\n case \"navigator\":\n return new NavigatorPanel(chartMenuParamsFactory);\n case \"zoom\":\n return new ZoomPanel(chartMenuParamsFactory);\n case \"animation\":\n return new AnimationPanel(chartMenuParamsFactory);\n case \"crosshair\":\n return new CrosshairPanel(chartAxisMenuParamsFactory);\n }\n }\n};\n_AdvancedSettingsPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n PostConstruct48\n], _AdvancedSettingsPanel.prototype, \"postConstruct\", 1);\nvar AdvancedSettingsPanel = _AdvancedSettingsPanel;\nvar AdvancedSettingsMenuFactory = class extends BeanStub14 {\n showMenu(chartMenuContext, eventSource) {\n this.hideMenu();\n const menu = this.createBean(new AdvancedSettingsMenu(chartMenuContext));\n this.activeDialog = this.createBean(new AgDialog32({\n title: this.chartTranslationService.translate(\"advancedSettings\"),\n component: menu,\n width: 300,\n height: 400,\n resizable: true,\n movable: true,\n centered: true,\n closable: true,\n afterGuiAttached: () => {\n var _a;\n (_a = this.focusService.findFocusableElements(menu.getGui())[0]) == null ? void 0 : _a.focus();\n },\n closedCallback: () => {\n this.activeMenu = this.destroyBean(this.activeMenu);\n this.activeDialog = void 0;\n eventSource == null ? void 0 : eventSource.focus({ preventScroll: true });\n }\n }));\n this.activeMenu = menu;\n }\n hideMenu() {\n if (this.activeDialog) {\n this.destroyBean(this.activeDialog);\n }\n }\n destroy() {\n this.activeMenu = this.destroyBean(this.activeMenu);\n this.activeDialog = this.destroyBean(this.activeDialog);\n super.destroy();\n }\n};\n__decorateClass4([\n Autowired48(\"focusService\")\n], AdvancedSettingsMenuFactory.prototype, \"focusService\", 2);\n__decorateClass4([\n Autowired48(\"chartTranslationService\")\n], AdvancedSettingsMenuFactory.prototype, \"chartTranslationService\", 2);\nAdvancedSettingsMenuFactory = __decorateClass4([\n Bean7(\"advancedSettingsMenuFactory\")\n], AdvancedSettingsMenuFactory);\nvar _AdvancedSettingsMenu = class _AdvancedSettingsMenu2 extends TabGuardComp2 {\n constructor(chartMenuContext) {\n super(_AdvancedSettingsMenu2.TEMPLATE);\n this.chartMenuContext = chartMenuContext;\n }\n postConstruct() {\n this.advancedSettingsPanel = this.createManagedBean(new AdvancedSettingsPanel(this.chartMenuContext));\n this.getGui().appendChild(this.advancedSettingsPanel.getGui());\n this.initialiseTabGuard({\n onTabKeyDown: this.onTabKeyDown.bind(this),\n focusTrapActive: true\n });\n }\n onTabKeyDown(e) {\n if (e.defaultPrevented) {\n return;\n }\n e.preventDefault();\n const backwards = e.shiftKey;\n const panelGui = this.advancedSettingsPanel.getGui();\n const nextEl = this.focusService.findNextFocusableElement(panelGui, false, backwards);\n if (nextEl) {\n nextEl.focus();\n } else {\n const focusableElements = this.focusService.findFocusableElements(panelGui);\n if (focusableElements.length) {\n focusableElements[backwards ? focusableElements.length - 1 : 0].focus();\n }\n }\n }\n};\n_AdvancedSettingsMenu.TEMPLATE = /* html */\n`
`;\n__decorateClass4([\n Autowired48(\"focusService\")\n], _AdvancedSettingsMenu.prototype, \"focusService\", 2);\n__decorateClass4([\n PostConstruct49\n], _AdvancedSettingsMenu.prototype, \"postConstruct\", 1);\nvar AdvancedSettingsMenu = _AdvancedSettingsMenu;\nvar GridChartsModule = {\n version: VERSION4,\n validate: () => {\n return validGridChartsVersion({\n gridVersion: VERSION4,\n chartsVersion: ChartService.CHARTS_VERSION\n });\n },\n moduleName: ModuleNames22.GridChartsModule,\n beans: [\n ChartService,\n ChartTranslationService,\n ChartCrossFilterService,\n ChartMenuListFactory,\n ChartMenuService,\n AdvancedSettingsMenuFactory\n ],\n agStackComponents: [\n { componentName: \"AgColorPicker\", componentClass: AgColorPicker },\n { componentName: \"AgAngleSelect\", componentClass: AgAngleSelect },\n { componentName: \"AgPillSelect\", componentClass: AgPillSelect }\n ],\n dependantModules: [\n RangeSelectionModule,\n EnterpriseCoreModule\n ]\n};\nvar __FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT = 0;\nvar agCharts = {\n time,\n AgChart\n};\n\n// enterprise-modules/clipboard/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames5 } from \"ag-grid-community\";\nimport { CsvExportModule } from \"ag-grid-community\";\nimport {\n _ as _16,\n Autowired as Autowired49,\n Bean as Bean8,\n BeanStub as BeanStub15,\n ChangedPath,\n Events as Events11,\n PostConstruct as PostConstruct50,\n Optional as Optional3\n} from \"ag-grid-community\";\nvar __defProp5 = Object.defineProperty;\nvar __getOwnPropDesc5 = Object.getOwnPropertyDescriptor;\nvar __decorateClass5 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc5(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp5(target, key, result);\n return result;\n};\nvar SOURCE_PASTE = \"paste\";\nvar EXPORT_TYPE_DRAG_COPY = \"dragCopy\";\nvar EXPORT_TYPE_CLIPBOARD = \"clipboard\";\nvar apiError = (method) => `AG Grid: Unable to use the Clipboard API (navigator.clipboard.${method}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`;\nvar ClipboardService = class extends BeanStub15 {\n constructor() {\n super(...arguments);\n this.lastPasteOperationTime = 0;\n this.navigatorApiFailed = false;\n }\n init() {\n this.logger = this.loggerFactory.create(\"ClipboardService\");\n if (this.rowModel.getType() === \"clientSide\") {\n this.clientSideRowModel = this.rowModel;\n }\n this.ctrlsService.whenReady((p) => {\n this.gridCtrl = p.gridCtrl;\n });\n }\n pasteFromClipboard() {\n this.logger.log(\"pasteFromClipboard\");\n const allowNavigator = !this.gos.get(\"suppressClipboardApi\");\n if (allowNavigator && !this.navigatorApiFailed && navigator.clipboard && navigator.clipboard.readText) {\n navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch((e) => {\n _16.doOnce(() => {\n console.warn(e);\n console.warn(apiError(\"readText\"));\n }, \"clipboardApiError\");\n this.navigatorApiFailed = true;\n this.pasteFromClipboardLegacy();\n });\n } else {\n this.pasteFromClipboardLegacy();\n }\n }\n pasteFromClipboardLegacy() {\n let defaultPrevented = false;\n const handlePasteEvent = (e) => {\n const currentPastOperationTime = (/* @__PURE__ */ new Date()).getTime();\n if (currentPastOperationTime - this.lastPasteOperationTime < 50) {\n defaultPrevented = true;\n e.preventDefault();\n }\n this.lastPasteOperationTime = currentPastOperationTime;\n };\n this.executeOnTempElement(\n (textArea) => {\n textArea.addEventListener(\"paste\", handlePasteEvent);\n textArea.focus({ preventScroll: true });\n },\n (element) => {\n const data = element.value;\n if (!defaultPrevented) {\n this.processClipboardData(data);\n } else {\n this.refocusLastFocusedCell();\n }\n element.removeEventListener(\"paste\", handlePasteEvent);\n }\n );\n }\n refocusLastFocusedCell() {\n const focusedCell = this.focusService.getFocusedCell();\n if (focusedCell) {\n this.focusService.setFocusedCell({\n rowIndex: focusedCell.rowIndex,\n column: focusedCell.column,\n rowPinned: focusedCell.rowPinned,\n forceBrowserFocus: true\n });\n }\n }\n getClipboardDelimiter() {\n const delimiter = this.gos.get(\"clipboardDelimiter\");\n return _16.exists(delimiter) ? delimiter : \"\t\";\n }\n processClipboardData(data) {\n if (data == null) {\n return;\n }\n let parsedData = ClipboardService.stringToArray(data, this.getClipboardDelimiter());\n const userFunc = this.gos.getCallback(\"processDataFromClipboard\");\n if (userFunc) {\n parsedData = userFunc({ data: parsedData });\n }\n if (parsedData == null) {\n return;\n }\n if (this.gos.get(\"suppressLastEmptyLineOnPaste\")) {\n this.removeLastLineIfBlank(parsedData);\n }\n const pasteOperation = (cellsToFlash, updatedRowNodes, focusedCell, changedPath) => {\n var _a;\n const rangeActive = (_a = this.rangeService) == null ? void 0 : _a.isMoreThanOneCell();\n const pasteIntoRange = rangeActive && !this.hasOnlyOneValueToPaste(parsedData);\n if (pasteIntoRange) {\n this.pasteIntoActiveRange(this.rangeService, parsedData, cellsToFlash, updatedRowNodes, changedPath);\n } else {\n this.pasteStartingFromFocusedCell(parsedData, cellsToFlash, updatedRowNodes, focusedCell, changedPath);\n }\n };\n this.doPasteOperation(pasteOperation);\n }\n // This will parse a delimited string into an array of arrays.\n static stringToArray(strData, delimiter = \",\") {\n const data = [];\n const isNewline = (char) => char === \"\\r\" || char === \"\\n\";\n let insideQuotedField = false;\n if (strData === \"\") {\n return [[\"\"]];\n }\n for (let row = 0, column = 0, position = 0; position < strData.length; position++) {\n const previousChar = strData[position - 1];\n const currentChar = strData[position];\n const nextChar = strData[position + 1];\n const ensureDataExists = () => {\n if (!data[row]) {\n data[row] = [];\n }\n if (!data[row][column]) {\n data[row][column] = \"\";\n }\n };\n ensureDataExists();\n if (currentChar === '\"') {\n if (insideQuotedField) {\n if (nextChar === '\"') {\n data[row][column] += '\"';\n position++;\n } else {\n insideQuotedField = false;\n }\n } else if (previousChar === void 0 || previousChar === delimiter || isNewline(previousChar)) {\n insideQuotedField = true;\n }\n }\n if (!insideQuotedField && currentChar !== '\"') {\n if (currentChar === delimiter) {\n column++;\n ensureDataExists();\n continue;\n } else if (isNewline(currentChar)) {\n column = 0;\n row++;\n ensureDataExists();\n if (currentChar === \"\\r\" && nextChar === \"\\n\") {\n position++;\n }\n continue;\n }\n }\n data[row][column] += currentChar;\n }\n return data;\n }\n // common code to paste operations, e.g. paste to cell, paste to range, and copy range down\n doPasteOperation(pasteOperationFunc) {\n const source = \"clipboard\";\n this.eventService.dispatchEvent({\n type: Events11.EVENT_PASTE_START,\n source\n });\n let changedPath;\n if (this.clientSideRowModel) {\n const onlyChangedColumns = this.gos.get(\"aggregateOnlyChangedColumns\");\n changedPath = new ChangedPath(onlyChangedColumns, this.clientSideRowModel.getRootNode());\n }\n const cellsToFlash = {};\n const updatedRowNodes = [];\n const focusedCell = this.focusService.getFocusedCell();\n pasteOperationFunc(cellsToFlash, updatedRowNodes, focusedCell, changedPath);\n const nodesToRefresh = [...updatedRowNodes];\n if (changedPath) {\n this.clientSideRowModel.doAggregate(changedPath);\n changedPath.forEachChangedNodeDepthFirst((rowNode) => {\n nodesToRefresh.push(rowNode);\n });\n }\n this.rowRenderer.refreshCells({ rowNodes: nodesToRefresh });\n this.dispatchFlashCells(cellsToFlash);\n this.fireRowChanged(updatedRowNodes);\n this.refocusLastFocusedCell();\n const event = {\n type: Events11.EVENT_PASTE_END,\n source\n };\n this.eventService.dispatchEvent(event);\n }\n pasteIntoActiveRange(rangeService, clipboardData, cellsToFlash, updatedRowNodes, changedPath) {\n const abortRepeatingPasteIntoRows = this.getRangeSize(rangeService) % clipboardData.length != 0;\n let indexOffset = 0;\n let dataRowIndex = 0;\n const rowCallback = (currentRow, rowNode, columns, index) => {\n const atEndOfClipboardData = index - indexOffset >= clipboardData.length;\n if (atEndOfClipboardData) {\n if (abortRepeatingPasteIntoRows) {\n return;\n }\n indexOffset += dataRowIndex;\n dataRowIndex = 0;\n }\n const currentRowData = clipboardData[index - indexOffset];\n updatedRowNodes.push(rowNode);\n const processCellFromClipboardFunc = this.gos.getCallback(\"processCellFromClipboard\");\n columns.forEach((column, idx) => {\n if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {\n return;\n }\n if (idx >= currentRowData.length) {\n idx = idx % currentRowData.length;\n }\n const newValue = this.processCell(\n rowNode,\n column,\n currentRowData[idx],\n EXPORT_TYPE_DRAG_COPY,\n processCellFromClipboardFunc,\n true\n );\n rowNode.setDataValue(column, newValue, SOURCE_PASTE);\n if (changedPath) {\n changedPath.addParentNode(rowNode.parent, [column]);\n }\n const { rowIndex, rowPinned } = currentRow;\n const cellId = this.cellPositionUtils.createIdFromValues({ rowIndex, column, rowPinned });\n cellsToFlash[cellId] = true;\n });\n dataRowIndex++;\n };\n this.iterateActiveRanges(false, rowCallback);\n }\n getDisplayedColumnsStartingAt(column) {\n let currentColumn = column;\n const columns = [];\n while (currentColumn != null) {\n columns.push(currentColumn);\n currentColumn = this.columnModel.getDisplayedColAfter(currentColumn);\n }\n return columns;\n }\n pasteStartingFromFocusedCell(parsedData, cellsToFlash, updatedRowNodes, focusedCell, changedPath) {\n if (!focusedCell) {\n return;\n }\n const currentRow = { rowIndex: focusedCell.rowIndex, rowPinned: focusedCell.rowPinned };\n const columnsToPasteInto = this.getDisplayedColumnsStartingAt(focusedCell.column);\n if (this.isPasteSingleValueIntoRange(parsedData)) {\n this.pasteSingleValueIntoRange(parsedData, updatedRowNodes, cellsToFlash, changedPath);\n } else {\n this.pasteMultipleValues(\n parsedData,\n currentRow,\n updatedRowNodes,\n columnsToPasteInto,\n cellsToFlash,\n EXPORT_TYPE_CLIPBOARD,\n changedPath\n );\n }\n }\n // if range is active, and only one cell, then we paste this cell into all cells in the active range.\n isPasteSingleValueIntoRange(parsedData) {\n return this.hasOnlyOneValueToPaste(parsedData) && this.rangeService != null && !this.rangeService.isEmpty();\n }\n pasteSingleValueIntoRange(parsedData, updatedRowNodes, cellsToFlash, changedPath) {\n const value = parsedData[0][0];\n const rowCallback = (currentRow, rowNode, columns) => {\n updatedRowNodes.push(rowNode);\n columns.forEach((column) => this.updateCellValue(rowNode, column, value, cellsToFlash, EXPORT_TYPE_CLIPBOARD, changedPath));\n };\n this.iterateActiveRanges(false, rowCallback);\n }\n hasOnlyOneValueToPaste(parsedData) {\n return parsedData.length === 1 && parsedData[0].length === 1;\n }\n copyRangeDown() {\n if (!this.rangeService || this.rangeService.isEmpty()) {\n return;\n }\n const firstRowValues = [];\n const pasteOperation = (cellsToFlash, updatedRowNodes, focusedCell, changedPath) => {\n const processCellForClipboardFunc = this.gos.getCallback(\"processCellForClipboard\");\n const processCellFromClipboardFunc = this.gos.getCallback(\"processCellFromClipboard\");\n const rowCallback = (currentRow, rowNode, columns) => {\n if (!firstRowValues.length) {\n columns.forEach((column) => {\n const value = this.processCell(\n rowNode,\n column,\n this.valueService.getValue(column, rowNode),\n EXPORT_TYPE_DRAG_COPY,\n processCellForClipboardFunc,\n false,\n true\n );\n firstRowValues.push(value);\n });\n } else {\n updatedRowNodes.push(rowNode);\n columns.forEach((column, index) => {\n if (!column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {\n return;\n }\n const firstRowValue = this.processCell(\n rowNode,\n column,\n firstRowValues[index],\n EXPORT_TYPE_DRAG_COPY,\n processCellFromClipboardFunc,\n true\n );\n rowNode.setDataValue(column, firstRowValue, SOURCE_PASTE);\n if (changedPath) {\n changedPath.addParentNode(rowNode.parent, [column]);\n }\n const { rowIndex, rowPinned } = currentRow;\n const cellId = this.cellPositionUtils.createIdFromValues({ rowIndex, column, rowPinned });\n cellsToFlash[cellId] = true;\n });\n }\n };\n this.iterateActiveRanges(true, rowCallback);\n };\n this.doPasteOperation(pasteOperation);\n }\n removeLastLineIfBlank(parsedData) {\n const lastLine = _16.last(parsedData);\n const lastLineIsBlank = lastLine && lastLine.length === 1 && lastLine[0] === \"\";\n if (lastLineIsBlank) {\n if (parsedData.length === 1) {\n return;\n }\n _16.removeFromArray(parsedData, lastLine);\n }\n }\n fireRowChanged(rowNodes) {\n if (this.gos.get(\"editType\") !== \"fullRow\") {\n return;\n }\n rowNodes.forEach((rowNode) => {\n const event = {\n type: Events11.EVENT_ROW_VALUE_CHANGED,\n node: rowNode,\n data: rowNode.data,\n rowIndex: rowNode.rowIndex,\n rowPinned: rowNode.rowPinned\n };\n this.eventService.dispatchEvent(event);\n });\n }\n pasteMultipleValues(clipboardGridData, currentRow, updatedRowNodes, columnsToPasteInto, cellsToFlash, type, changedPath) {\n let rowPointer = currentRow;\n const skipGroupRows = this.clientSideRowModel != null && !this.gos.get(\"enableGroupEdit\") && !this.gos.get(\"treeData\");\n const getNextGoodRowNode = () => {\n while (true) {\n if (!rowPointer) {\n return null;\n }\n const res = this.rowPositionUtils.getRowNode(rowPointer);\n rowPointer = this.cellNavigationService.getRowBelow({ rowPinned: rowPointer.rowPinned, rowIndex: rowPointer.rowIndex });\n if (res == null) {\n return null;\n }\n const skipRow = res.detail || res.footer || skipGroupRows && res.group;\n if (!skipRow) {\n return res;\n }\n }\n };\n clipboardGridData.forEach((clipboardRowData) => {\n const rowNode = getNextGoodRowNode();\n if (!rowNode) {\n return;\n }\n clipboardRowData.forEach((value, index) => this.updateCellValue(rowNode, columnsToPasteInto[index], value, cellsToFlash, type, changedPath));\n updatedRowNodes.push(rowNode);\n });\n }\n updateCellValue(rowNode, column, value, cellsToFlash, type, changedPath) {\n if (!rowNode || !column || !column.isCellEditable(rowNode) || column.isSuppressPaste(rowNode)) {\n return;\n }\n if (rowNode.group && column.isValueActive()) {\n return;\n }\n const processedValue = this.processCell(rowNode, column, value, type, this.gos.getCallback(\"processCellFromClipboard\"), true);\n rowNode.setDataValue(column, processedValue, SOURCE_PASTE);\n const { rowIndex, rowPinned } = rowNode;\n const cellId = this.cellPositionUtils.createIdFromValues({ rowIndex, column, rowPinned });\n cellsToFlash[cellId] = true;\n if (changedPath) {\n changedPath.addParentNode(rowNode.parent, [column]);\n }\n }\n copyToClipboard(params = {}) {\n this.copyOrCutToClipboard(params);\n }\n cutToClipboard(params = {}, source = \"api\") {\n if (this.gos.get(\"suppressCutToClipboard\")) {\n return;\n }\n const startEvent = {\n type: Events11.EVENT_CUT_START,\n source\n };\n this.eventService.dispatchEvent(startEvent);\n this.copyOrCutToClipboard(params, true);\n const endEvent = {\n type: Events11.EVENT_CUT_END,\n source\n };\n this.eventService.dispatchEvent(endEvent);\n }\n copyOrCutToClipboard(params, cut) {\n let { includeHeaders, includeGroupHeaders } = params;\n this.logger.log(`copyToClipboard: includeHeaders = ${includeHeaders}`);\n if (includeHeaders == null) {\n includeHeaders = this.gos.get(\"copyHeadersToClipboard\");\n }\n if (includeGroupHeaders == null) {\n includeGroupHeaders = this.gos.get(\"copyGroupHeadersToClipboard\");\n }\n const copyParams = { includeHeaders, includeGroupHeaders };\n const shouldCopyRows = !this.gos.get(\"suppressCopyRowsToClipboard\");\n let cellClearType = null;\n if (this.rangeService && !this.rangeService.isEmpty() && !this.shouldSkipSingleCellRange(this.rangeService)) {\n this.copySelectedRangeToClipboard(copyParams);\n cellClearType = 0;\n } else if (shouldCopyRows && !this.selectionService.isEmpty()) {\n this.copySelectedRowsToClipboard(copyParams);\n cellClearType = 1;\n } else if (this.focusService.isAnyCellFocused()) {\n this.copyFocusedCellToClipboard(copyParams);\n cellClearType = 2;\n }\n if (cut && cellClearType !== null) {\n this.clearCellsAfterCopy(cellClearType);\n }\n }\n clearCellsAfterCopy(type) {\n this.eventService.dispatchEvent({ type: Events11.EVENT_KEY_SHORTCUT_CHANGED_CELL_START });\n if (type === 0) {\n this.rangeService.clearCellRangeCellValues({ cellEventSource: \"clipboardService\" });\n } else if (type === 1) {\n this.clearSelectedRows();\n } else {\n const focusedCell = this.focusService.getFocusedCell();\n if (focusedCell == null) {\n return;\n }\n const rowNode = this.rowPositionUtils.getRowNode(focusedCell);\n if (rowNode) {\n this.clearCellValue(rowNode, focusedCell.column);\n }\n }\n this.eventService.dispatchEvent({ type: Events11.EVENT_KEY_SHORTCUT_CHANGED_CELL_END });\n }\n clearSelectedRows() {\n const selected = this.selectionService.getSelectedNodes();\n const columns = this.columnModel.getAllDisplayedColumns();\n for (const row of selected) {\n for (const col of columns) {\n this.clearCellValue(row, col);\n }\n }\n }\n clearCellValue(rowNode, column) {\n var _a;\n if (!column.isCellEditable(rowNode)) {\n return;\n }\n const emptyValue = (_a = this.valueService.parseValue(column, rowNode, \"\", rowNode.getValueFromValueService(column))) != null ? _a : null;\n rowNode.setDataValue(column, emptyValue, \"clipboardService\");\n }\n shouldSkipSingleCellRange(rangeService) {\n return this.gos.get(\"suppressCopySingleCellRanges\") && !rangeService.isMoreThanOneCell();\n }\n iterateActiveRanges(onlyFirst, rowCallback, columnCallback) {\n if (!this.rangeService || this.rangeService.isEmpty()) {\n return;\n }\n const cellRanges = this.rangeService.getCellRanges();\n if (onlyFirst) {\n this.iterateActiveRange(cellRanges[0], rowCallback, columnCallback, true);\n } else {\n cellRanges.forEach((range, idx) => this.iterateActiveRange(range, rowCallback, columnCallback, idx === cellRanges.length - 1));\n }\n }\n iterateActiveRange(range, rowCallback, columnCallback, isLastRange) {\n if (!this.rangeService) {\n return;\n }\n let currentRow = this.rangeService.getRangeStartRow(range);\n const lastRow = this.rangeService.getRangeEndRow(range);\n if (columnCallback && range.columns) {\n columnCallback(range.columns);\n }\n let rangeIndex = 0;\n let isLastRow = false;\n while (!isLastRow && currentRow != null) {\n const rowNode = this.rowPositionUtils.getRowNode(currentRow);\n isLastRow = this.rowPositionUtils.sameRow(currentRow, lastRow);\n rowCallback(currentRow, rowNode, range.columns, rangeIndex++, isLastRow && isLastRange);\n currentRow = this.cellNavigationService.getRowBelow(currentRow);\n }\n }\n copySelectedRangeToClipboard(params = {}) {\n if (!this.rangeService || this.rangeService.isEmpty()) {\n return;\n }\n const allRangesMerge = this.rangeService.areAllRangesAbleToMerge();\n const { data, cellsToFlash } = allRangesMerge ? this.buildDataFromMergedRanges(this.rangeService, params) : this.buildDataFromRanges(this.rangeService, params);\n this.copyDataToClipboard(data);\n this.dispatchFlashCells(cellsToFlash);\n }\n buildDataFromMergedRanges(rangeService, params) {\n const columnsSet = /* @__PURE__ */ new Set();\n const ranges = rangeService.getCellRanges();\n const rowPositionsMap = /* @__PURE__ */ new Map();\n const allRowPositions = [];\n const allCellsToFlash = {};\n ranges.forEach((range) => {\n range.columns.forEach((col) => columnsSet.add(col));\n const { rowPositions, cellsToFlash } = this.getRangeRowPositionsAndCellsToFlash(rangeService, range);\n rowPositions.forEach((rowPosition) => {\n const rowPositionAsString = `${rowPosition.rowIndex}-${rowPosition.rowPinned || \"null\"}`;\n if (!rowPositionsMap.get(rowPositionAsString)) {\n rowPositionsMap.set(rowPositionAsString, true);\n allRowPositions.push(rowPosition);\n }\n });\n Object.assign(allCellsToFlash, cellsToFlash);\n });\n const allColumns = this.columnModel.getAllDisplayedColumns();\n const exportedColumns = Array.from(columnsSet);\n exportedColumns.sort((a, b) => {\n const posA = allColumns.indexOf(a);\n const posB = allColumns.indexOf(b);\n return posA - posB;\n });\n const data = this.buildExportParams({\n columns: exportedColumns,\n rowPositions: allRowPositions,\n includeHeaders: params.includeHeaders,\n includeGroupHeaders: params.includeGroupHeaders\n });\n return { data, cellsToFlash: allCellsToFlash };\n }\n buildDataFromRanges(rangeService, params) {\n const ranges = rangeService.getCellRanges();\n const data = [];\n const allCellsToFlash = {};\n ranges.forEach((range) => {\n const { rowPositions, cellsToFlash } = this.getRangeRowPositionsAndCellsToFlash(rangeService, range);\n Object.assign(allCellsToFlash, cellsToFlash);\n data.push(this.buildExportParams({\n columns: range.columns,\n rowPositions,\n includeHeaders: params.includeHeaders,\n includeGroupHeaders: params.includeGroupHeaders\n }));\n });\n return { data: data.join(\"\\n\"), cellsToFlash: allCellsToFlash };\n }\n getRangeRowPositionsAndCellsToFlash(rangeService, range) {\n const rowPositions = [];\n const cellsToFlash = {};\n const startRow = rangeService.getRangeStartRow(range);\n const lastRow = rangeService.getRangeEndRow(range);\n let node = startRow;\n while (node) {\n rowPositions.push(node);\n range.columns.forEach((column) => {\n const { rowIndex, rowPinned } = node;\n const cellId = this.cellPositionUtils.createIdFromValues({ rowIndex, column, rowPinned });\n cellsToFlash[cellId] = true;\n });\n if (this.rowPositionUtils.sameRow(node, lastRow)) {\n break;\n }\n node = this.cellNavigationService.getRowBelow(node);\n }\n return { rowPositions, cellsToFlash };\n }\n getCellsToFlashFromRowNodes(rowNodes) {\n const allDisplayedColumns = this.columnModel.getAllDisplayedColumns();\n const cellsToFlash = {};\n for (let i = 0; i < rowNodes.length; i++) {\n const { rowIndex, rowPinned } = rowNodes[i];\n if (rowIndex == null) {\n continue;\n }\n for (let j = 0; j < allDisplayedColumns.length; j++) {\n const column = allDisplayedColumns[j];\n const cellId = this.cellPositionUtils.createIdFromValues({ rowIndex, column, rowPinned });\n cellsToFlash[cellId] = true;\n }\n }\n return cellsToFlash;\n }\n copyFocusedCellToClipboard(params = {}) {\n const focusedCell = this.focusService.getFocusedCell();\n if (focusedCell == null) {\n return;\n }\n const cellId = this.cellPositionUtils.createId(focusedCell);\n const currentRow = { rowPinned: focusedCell.rowPinned, rowIndex: focusedCell.rowIndex };\n const column = focusedCell.column;\n const data = this.buildExportParams({\n columns: [column],\n rowPositions: [currentRow],\n includeHeaders: params.includeHeaders,\n includeGroupHeaders: params.includeGroupHeaders\n });\n this.copyDataToClipboard(data);\n this.dispatchFlashCells({ [cellId]: true });\n }\n copySelectedRowsToClipboard(params = {}) {\n const { columnKeys, includeHeaders, includeGroupHeaders } = params;\n const data = this.buildExportParams({\n columns: columnKeys,\n includeHeaders,\n includeGroupHeaders\n });\n this.copyDataToClipboard(data);\n const rowNodes = this.selectionService.getSelectedNodes() || [];\n this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(rowNodes));\n }\n buildExportParams(params) {\n const { columns, rowPositions, includeHeaders = false, includeGroupHeaders = false } = params;\n const exportParams = {\n columnKeys: columns,\n rowPositions,\n skipColumnHeaders: !includeHeaders,\n skipColumnGroupHeaders: !includeGroupHeaders,\n suppressQuotes: true,\n columnSeparator: this.getClipboardDelimiter(),\n onlySelected: !rowPositions,\n processCellCallback: this.gos.getCallback(\"processCellForClipboard\"),\n processRowGroupCallback: (params2) => this.processRowGroupCallback(params2),\n processHeaderCallback: this.gos.getCallback(\"processHeaderForClipboard\"),\n processGroupHeaderCallback: this.gos.getCallback(\"processGroupHeaderForClipboard\")\n };\n return this.csvCreator.getDataAsCsv(exportParams, true);\n }\n processRowGroupCallback(params) {\n const { node, column } = params;\n const isTreeData = this.gos.get(\"treeData\");\n const isSuppressGroupMaintainValueType = this.gos.get(\"suppressGroupMaintainValueType\");\n const getValueFromNode = () => {\n var _a, _b;\n if (isTreeData || isSuppressGroupMaintainValueType || !column) {\n return node.key;\n }\n const value2 = (_a = node.groupData) == null ? void 0 : _a[column.getId()];\n if (!value2 || !node.rowGroupColumn || node.rowGroupColumn.getColDef().useValueFormatterForExport === false) {\n return value2;\n }\n return (_b = this.valueService.formatValue(node.rowGroupColumn, node, value2)) != null ? _b : value2;\n };\n let value = getValueFromNode();\n if (params.node.footer) {\n let suffix = \"\";\n if (value && value.length) {\n suffix = ` ${value}`;\n }\n value = `Total${suffix}`;\n }\n const processCellForClipboard = this.gos.getCallback(\"processCellForClipboard\");\n if (processCellForClipboard) {\n let column2 = node.rowGroupColumn;\n if (!column2 && node.footer && node.level === -1) {\n column2 = this.columnModel.getRowGroupColumns()[0];\n }\n return processCellForClipboard({\n value,\n node,\n column: column2,\n type: \"clipboard\",\n formatValue: (valueToFormat) => {\n var _a;\n return (_a = this.valueService.formatValue(column2, node, valueToFormat)) != null ? _a : valueToFormat;\n },\n parseValue: (valueToParse) => this.valueService.parseValue(column2, node, valueToParse, this.valueService.getValue(column2, node))\n });\n }\n return value;\n }\n dispatchFlashCells(cellsToFlash) {\n window.setTimeout(() => {\n const event = {\n type: Events11.EVENT_FLASH_CELLS,\n cells: cellsToFlash\n };\n this.eventService.dispatchEvent(event);\n }, 0);\n }\n processCell(rowNode, column, value, type, func, canParse, canFormat) {\n var _a;\n if (func) {\n const params = {\n column,\n node: rowNode,\n value,\n type,\n formatValue: (valueToFormat) => {\n var _a2;\n return (_a2 = this.valueService.formatValue(column, rowNode != null ? rowNode : null, valueToFormat)) != null ? _a2 : valueToFormat;\n },\n parseValue: (valueToParse) => this.valueService.parseValue(column, rowNode != null ? rowNode : null, valueToParse, this.valueService.getValue(column, rowNode))\n };\n return func(params);\n }\n if (canParse && column.getColDef().useValueParserForImport !== false) {\n return this.valueService.parseValue(column, rowNode != null ? rowNode : null, value, this.valueService.getValue(column, rowNode));\n }\n if (canFormat && column.getColDef().useValueFormatterForExport !== false) {\n return (_a = this.valueService.formatValue(column, rowNode != null ? rowNode : null, value)) != null ? _a : value;\n }\n return value;\n }\n copyDataToClipboard(data) {\n const userProvidedFunc = this.gos.getCallback(\"sendToClipboard\");\n if (userProvidedFunc) {\n userProvidedFunc({ data });\n return;\n }\n const allowNavigator = !this.gos.get(\"suppressClipboardApi\");\n if (allowNavigator && navigator.clipboard) {\n navigator.clipboard.writeText(data).catch((e) => {\n _16.doOnce(() => {\n console.warn(e);\n console.warn(apiError(\"writeText\"));\n }, \"clipboardApiError\");\n this.copyDataToClipboardLegacy(data);\n });\n return;\n }\n this.copyDataToClipboardLegacy(data);\n }\n copyDataToClipboardLegacy(data) {\n this.executeOnTempElement((element) => {\n const eDocument = this.gos.getDocument();\n const focusedElementBefore = this.gos.getActiveDomElement();\n element.value = data || \" \";\n element.select();\n element.focus({ preventScroll: true });\n const result = eDocument.execCommand(\"copy\");\n if (!result) {\n console.warn(\"AG Grid: Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.\");\n }\n if (focusedElementBefore != null && focusedElementBefore.focus != null) {\n focusedElementBefore.focus({ preventScroll: true });\n }\n });\n }\n executeOnTempElement(callbackNow, callbackAfter) {\n const eDoc = this.gos.getDocument();\n const eTempInput = eDoc.createElement(\"textarea\");\n eTempInput.style.width = \"1px\";\n eTempInput.style.height = \"1px\";\n eTempInput.style.top = eDoc.documentElement.scrollTop + \"px\";\n eTempInput.style.left = eDoc.documentElement.scrollLeft + \"px\";\n eTempInput.style.position = \"absolute\";\n eTempInput.style.opacity = \"0\";\n const guiRoot = this.gridCtrl.getGui();\n guiRoot.appendChild(eTempInput);\n try {\n callbackNow(eTempInput);\n } catch (err) {\n console.warn(\"AG Grid: Browser does not support document.execCommand('copy') for clipboard operations\");\n }\n if (callbackAfter) {\n window.setTimeout(() => {\n callbackAfter(eTempInput);\n guiRoot.removeChild(eTempInput);\n }, 100);\n } else {\n guiRoot.removeChild(eTempInput);\n }\n }\n getRangeSize(rangeService) {\n const ranges = rangeService.getCellRanges();\n let startRangeIndex = 0;\n let endRangeIndex = 0;\n if (ranges.length > 0) {\n startRangeIndex = rangeService.getRangeStartRow(ranges[0]).rowIndex;\n endRangeIndex = rangeService.getRangeEndRow(ranges[0]).rowIndex;\n }\n return startRangeIndex - endRangeIndex + 1;\n }\n};\n__decorateClass5([\n Autowired49(\"csvCreator\")\n], ClipboardService.prototype, \"csvCreator\", 2);\n__decorateClass5([\n Autowired49(\"loggerFactory\")\n], ClipboardService.prototype, \"loggerFactory\", 2);\n__decorateClass5([\n Autowired49(\"selectionService\")\n], ClipboardService.prototype, \"selectionService\", 2);\n__decorateClass5([\n Autowired49(\"rowModel\")\n], ClipboardService.prototype, \"rowModel\", 2);\n__decorateClass5([\n Autowired49(\"ctrlsService\")\n], ClipboardService.prototype, \"ctrlsService\", 2);\n__decorateClass5([\n Autowired49(\"valueService\")\n], ClipboardService.prototype, \"valueService\", 2);\n__decorateClass5([\n Autowired49(\"focusService\")\n], ClipboardService.prototype, \"focusService\", 2);\n__decorateClass5([\n Autowired49(\"rowRenderer\")\n], ClipboardService.prototype, \"rowRenderer\", 2);\n__decorateClass5([\n Autowired49(\"columnModel\")\n], ClipboardService.prototype, \"columnModel\", 2);\n__decorateClass5([\n Autowired49(\"cellNavigationService\")\n], ClipboardService.prototype, \"cellNavigationService\", 2);\n__decorateClass5([\n Autowired49(\"cellPositionUtils\")\n], ClipboardService.prototype, \"cellPositionUtils\", 2);\n__decorateClass5([\n Autowired49(\"rowPositionUtils\")\n], ClipboardService.prototype, \"rowPositionUtils\", 2);\n__decorateClass5([\n Optional3(\"rangeService\")\n], ClipboardService.prototype, \"rangeService\", 2);\n__decorateClass5([\n PostConstruct50\n], ClipboardService.prototype, \"init\", 1);\nClipboardService = __decorateClass5([\n Bean8(\"clipboardService\")\n], ClipboardService);\nvar VERSION5 = \"31.3.2\";\nvar ClipboardModule = {\n version: VERSION5,\n moduleName: ModuleNames5.ClipboardModule,\n beans: [ClipboardService],\n dependantModules: [\n EnterpriseCoreModule,\n CsvExportModule\n ]\n};\n\n// enterprise-modules/column-tool-panel/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames24 } from \"ag-grid-community\";\nimport {\n _ as _39,\n Autowired as Autowired55,\n Events as Events14,\n RefSelector as RefSelector17,\n KeyCode as KeyCode8,\n PostConstruct as PostConstruct56,\n Component as Component46\n} from \"ag-grid-community\";\nimport {\n _ as _64,\n Autowired as Autowired64,\n Component as Component54,\n Events as Events54,\n ProvidedColumnGroup as ProvidedColumnGroup5,\n VirtualList as VirtualList2,\n PreDestroy as PreDestroy3\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired412,\n BeanStub as BeanStub18,\n DragSourceType as DragSourceType24,\n Events as Events34,\n ProvidedColumnGroup as ProvidedColumnGroup4,\n PostConstruct as PostConstruct412,\n VirtualListDragFeature as VirtualListDragFeature2\n} from \"ag-grid-community\";\nimport {\n _ as _310,\n Autowired as Autowired312,\n Column as Column3,\n Component as Component312,\n CssClassApplier,\n DragAndDropService as DragAndDropService6,\n DragSourceType as DragSourceType5,\n Events as Events26,\n KeyCode as KeyCode23,\n PostConstruct as PostConstruct312,\n RefSelector as RefSelector25,\n TouchListener\n} from \"ag-grid-community\";\nimport {\n EventService\n} from \"ag-grid-community\";\nimport {\n AgMenuItemComponent as AgMenuItemComponent2,\n AgMenuList as AgMenuList2,\n Autowired as Autowired212,\n Column as Column2,\n Component as Component211,\n PostConstruct as PostConstruct212,\n ProvidedColumnGroup as ProvidedColumnGroup2,\n _ as _211\n} from \"ag-grid-community\";\nimport {\n _ as _54,\n Autowired as Autowired56,\n Column as Column5,\n Component as Component47,\n CssClassApplier as CssClassApplier2,\n DragAndDropService as DragAndDropService23,\n DragSourceType as DragSourceType32,\n Events as Events44,\n KeyCode as KeyCode32,\n PostConstruct as PostConstruct57,\n RefSelector as RefSelector35\n} from \"ag-grid-community\";\nimport {\n _ as _73,\n Component as Component83,\n Events as Events74,\n ModuleNames as ModuleNames8,\n ModuleRegistry as ModuleRegistry3\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired74,\n Component as Component63,\n Events as Events64,\n PreConstruct as PreConstruct2,\n RefSelector as RefSelector43\n} from \"ag-grid-community\";\n\n// enterprise-modules/row-grouping/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames6 } from \"ag-grid-community\";\nimport {\n Bean as Bean9,\n BeanStub as BeanStub16,\n Autowired as Autowired50,\n _ as _20\n} from \"ag-grid-community\";\nimport {\n _ as _29,\n Autowired as Autowired210,\n Bean as Bean25,\n BeanStub as BeanStub25,\n RowNode as RowNode2\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired310,\n Bean as Bean33,\n BeanStub as BeanStub33,\n PostConstruct as PostConstruct51,\n _ as _37\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired410,\n Bean as Bean43,\n BeanStub as BeanStub43,\n Events as Events12,\n _ as _44\n} from \"ag-grid-community\";\nimport {\n Bean as Bean52,\n BeanStub as BeanStub53,\n PostConstruct as PostConstruct210,\n _ as _53\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired73,\n Component as Component27,\n Events as Events63,\n PostConstruct as PostConstruct53,\n _ as _103\n} from \"ag-grid-community\";\nimport {\n _ as _83,\n DragAndDropService as DragAndDropService22,\n Events as Events43,\n PostConstruct as PostConstruct310\n} from \"ag-grid-community\";\nimport {\n PillDropZonePanel as PillDropZonePanel2,\n Autowired as Autowired63,\n Events as Events33,\n DragSourceType as DragSourceType23\n} from \"ag-grid-community\";\nimport {\n Component as Component43,\n Autowired as Autowired53,\n Events as Events24,\n Column as Column6,\n RefSelector as RefSelector15,\n Optional as Optional4,\n VirtualList,\n KeyCode as KeyCode6,\n _ as _63,\n PillDragComp as PillDragComp2,\n DragSourceType as DragSourceType4,\n DragAndDropService as DragAndDropService5\n} from \"ag-grid-community\";\nimport {\n _ as _93,\n DragAndDropService as DragAndDropService32,\n Events as Events53,\n PostConstruct as PostConstruct410\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired83,\n Bean as Bean62,\n BeanStub as BeanStub63\n} from \"ag-grid-community\";\nimport {\n _ as _113,\n AgPromise as AgPromise3,\n AgSelect as AgSelect5,\n Autowired as Autowired93,\n Events as Events73,\n PostConstruct as PostConstruct63,\n RefSelector as RefSelector23,\n TabGuardComp as TabGuardComp3,\n FilterWrapperComp\n} from \"ag-grid-community\";\nimport {\n _ as _123,\n AgInputTextField as AgInputTextField2,\n AgPromise as AgPromise22,\n Autowired as Autowired103,\n Column as Column11,\n Component as Component310,\n RefSelector as RefSelector34\n} from \"ag-grid-community\";\nimport {\n _ as _132,\n DragAndDropService as DragAndDropService42,\n Events as Events82,\n PostConstruct as PostConstruct73\n} from \"ag-grid-community\";\nvar __defProp6 = Object.defineProperty;\nvar __defProps4 = Object.defineProperties;\nvar __getOwnPropDesc6 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp4 = (obj, key, value) => key in obj ? __defProp6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp5.call(b, prop))\n __defNormalProp4(a, prop, b[prop]);\n if (__getOwnPropSymbols4)\n for (var prop of __getOwnPropSymbols4(b)) {\n if (__propIsEnum4.call(b, prop))\n __defNormalProp4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps4 = (a, b) => __defProps4(a, __getOwnPropDescs4(b));\nvar __decorateClass6 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc6(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp6(target, key, result);\n return result;\n};\nvar AggregationStage = class extends BeanStub16 {\n // it's possible to recompute the aggregate without doing the other parts\n // + api.refreshClientSideRowModel('aggregate')\n execute(params) {\n const noValueColumns = _20.missingOrEmpty(this.columnModel.getValueColumns());\n const noUserAgg = !this.gos.getCallback(\"getGroupRowAgg\");\n const changedPathActive = params.changedPath && params.changedPath.isActive();\n if (noValueColumns && noUserAgg && changedPathActive) {\n return;\n }\n const aggDetails = this.createAggDetails(params);\n this.recursivelyCreateAggData(aggDetails);\n }\n createAggDetails(params) {\n const pivotActive = this.columnModel.isPivotActive();\n const measureColumns = this.columnModel.getValueColumns();\n const pivotColumns = pivotActive ? this.columnModel.getPivotColumns() : [];\n const aggDetails = {\n alwaysAggregateAtRootLevel: this.gos.get(\"alwaysAggregateAtRootLevel\"),\n groupIncludeTotalFooter: !!this.gos.getGrandTotalRow(),\n changedPath: params.changedPath,\n valueColumns: measureColumns,\n pivotColumns,\n filteredOnly: !this.isSuppressAggFilteredOnly(),\n userAggFunc: this.gos.getCallback(\"getGroupRowAgg\")\n };\n return aggDetails;\n }\n isSuppressAggFilteredOnly() {\n const isGroupAggFiltering = this.gos.getGroupAggFiltering() !== void 0;\n return isGroupAggFiltering || this.gos.get(\"suppressAggFilteredOnly\");\n }\n recursivelyCreateAggData(aggDetails) {\n const callback = (rowNode) => {\n const hasNoChildren = !rowNode.hasChildren();\n if (hasNoChildren) {\n if (rowNode.aggData) {\n rowNode.setAggData(null);\n }\n return;\n }\n const isRootNode = rowNode.level === -1;\n if (isRootNode && !aggDetails.groupIncludeTotalFooter) {\n const notPivoting = !this.columnModel.isPivotMode();\n if (!aggDetails.alwaysAggregateAtRootLevel && notPivoting) {\n rowNode.setAggData(null);\n return;\n }\n }\n this.aggregateRowNode(rowNode, aggDetails);\n };\n aggDetails.changedPath.forEachChangedNodeDepthFirst(callback, true);\n }\n aggregateRowNode(rowNode, aggDetails) {\n const measureColumnsMissing = aggDetails.valueColumns.length === 0;\n const pivotColumnsMissing = aggDetails.pivotColumns.length === 0;\n let aggResult;\n if (aggDetails.userAggFunc) {\n aggResult = aggDetails.userAggFunc({ nodes: rowNode.childrenAfterFilter });\n } else if (measureColumnsMissing) {\n aggResult = null;\n } else if (pivotColumnsMissing) {\n aggResult = this.aggregateRowNodeUsingValuesOnly(rowNode, aggDetails);\n } else {\n aggResult = this.aggregateRowNodeUsingValuesAndPivot(rowNode);\n }\n rowNode.setAggData(aggResult);\n if (rowNode.sibling) {\n rowNode.sibling.setAggData(aggResult);\n }\n }\n aggregateRowNodeUsingValuesAndPivot(rowNode) {\n var _a, _b;\n const result = {};\n const secondaryColumns = (_a = this.columnModel.getSecondaryColumns()) != null ? _a : [];\n let canSkipTotalColumns = true;\n for (let i = 0; i < secondaryColumns.length; i++) {\n const secondaryCol = secondaryColumns[i];\n const colDef = secondaryCol.getColDef();\n if (colDef.pivotTotalColumnIds != null) {\n canSkipTotalColumns = false;\n continue;\n }\n const keys = (_b = colDef.pivotKeys) != null ? _b : [];\n let values;\n if (rowNode.leafGroup) {\n values = this.getValuesFromMappedSet(rowNode.childrenMapped, keys, colDef.pivotValueColumn);\n } else {\n values = this.getValuesPivotNonLeaf(rowNode, colDef.colId);\n }\n result[colDef.colId] = this.aggregateValues(values, colDef.pivotValueColumn.getAggFunc(), colDef.pivotValueColumn, rowNode, secondaryCol);\n }\n if (!canSkipTotalColumns) {\n for (let i = 0; i < secondaryColumns.length; i++) {\n const secondaryCol = secondaryColumns[i];\n const colDef = secondaryCol.getColDef();\n if (colDef.pivotTotalColumnIds == null || !colDef.pivotTotalColumnIds.length) {\n continue;\n }\n const aggResults = colDef.pivotTotalColumnIds.map((currentColId) => result[currentColId]);\n result[colDef.colId] = this.aggregateValues(aggResults, colDef.pivotValueColumn.getAggFunc(), colDef.pivotValueColumn, rowNode, secondaryCol);\n }\n }\n return result;\n }\n aggregateRowNodeUsingValuesOnly(rowNode, aggDetails) {\n const result = {};\n const changedValueColumns = aggDetails.changedPath.isActive() ? aggDetails.changedPath.getValueColumnsForNode(rowNode, aggDetails.valueColumns) : aggDetails.valueColumns;\n const notChangedValueColumns = aggDetails.changedPath.isActive() ? aggDetails.changedPath.getNotValueColumnsForNode(rowNode, aggDetails.valueColumns) : null;\n const values2d = this.getValuesNormal(rowNode, changedValueColumns, aggDetails.filteredOnly);\n const oldValues = rowNode.aggData;\n changedValueColumns.forEach((valueColumn, index) => {\n result[valueColumn.getId()] = this.aggregateValues(values2d[index], valueColumn.getAggFunc(), valueColumn, rowNode);\n });\n if (notChangedValueColumns && oldValues) {\n notChangedValueColumns.forEach((valueColumn) => {\n result[valueColumn.getId()] = oldValues[valueColumn.getId()];\n });\n }\n return result;\n }\n getValuesPivotNonLeaf(rowNode, colId) {\n return rowNode.childrenAfterFilter.map((childNode) => childNode.aggData[colId]);\n }\n getValuesFromMappedSet(mappedSet, keys, valueColumn) {\n let mapPointer = mappedSet;\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n mapPointer = mapPointer ? mapPointer[key] : null;\n }\n if (!mapPointer) {\n return [];\n }\n return mapPointer.map((rowNode) => this.valueService.getValue(valueColumn, rowNode));\n }\n getValuesNormal(rowNode, valueColumns, filteredOnly) {\n const values = [];\n valueColumns.forEach(() => values.push([]));\n const valueColumnCount = valueColumns.length;\n const nodeList = filteredOnly ? rowNode.childrenAfterFilter : rowNode.childrenAfterGroup;\n const rowCount = nodeList.length;\n for (let i = 0; i < rowCount; i++) {\n const childNode = nodeList[i];\n for (let j = 0; j < valueColumnCount; j++) {\n const valueColumn = valueColumns[j];\n const value = this.valueService.getValue(valueColumn, childNode);\n values[j].push(value);\n }\n }\n return values;\n }\n aggregateValues(values, aggFuncOrString, column, rowNode, pivotResultColumn) {\n const aggFunc = typeof aggFuncOrString === \"string\" ? this.aggFuncService.getAggFunc(aggFuncOrString) : aggFuncOrString;\n if (typeof aggFunc !== \"function\") {\n console.error(`AG Grid: unrecognised aggregation function ${aggFuncOrString}`);\n return null;\n }\n const aggFuncAny = aggFunc;\n const params = this.gos.addGridCommonParams({\n values,\n column,\n colDef: column ? column.getColDef() : void 0,\n pivotResultColumn,\n rowNode,\n data: rowNode ? rowNode.data : void 0\n });\n return aggFuncAny(params);\n }\n};\n__decorateClass6([\n Autowired50(\"columnModel\")\n], AggregationStage.prototype, \"columnModel\", 2);\n__decorateClass6([\n Autowired50(\"valueService\")\n], AggregationStage.prototype, \"valueService\", 2);\n__decorateClass6([\n Autowired50(\"aggFuncService\")\n], AggregationStage.prototype, \"aggFuncService\", 2);\nAggregationStage = __decorateClass6([\n Bean9(\"aggregationStage\")\n], AggregationStage);\nvar BatchRemover = class {\n constructor() {\n this.allSets = {};\n this.allParents = [];\n }\n removeFromChildrenAfterGroup(parent, child) {\n const set2 = this.getSet(parent);\n set2.removeFromChildrenAfterGroup[child.id] = true;\n }\n isRemoveFromAllLeafChildren(parent, child) {\n const set2 = this.getSet(parent);\n return !!set2.removeFromAllLeafChildren[child.id];\n }\n preventRemoveFromAllLeafChildren(parent, child) {\n const set2 = this.getSet(parent);\n delete set2.removeFromAllLeafChildren[child.id];\n }\n removeFromAllLeafChildren(parent, child) {\n const set2 = this.getSet(parent);\n set2.removeFromAllLeafChildren[child.id] = true;\n }\n getSet(parent) {\n if (!this.allSets[parent.id]) {\n this.allSets[parent.id] = {\n removeFromAllLeafChildren: {},\n removeFromChildrenAfterGroup: {}\n };\n this.allParents.push(parent);\n }\n return this.allSets[parent.id];\n }\n getAllParents() {\n return this.allParents;\n }\n flush() {\n this.allParents.forEach((parent) => {\n const nodeDetails = this.allSets[parent.id];\n parent.childrenAfterGroup = parent.childrenAfterGroup.filter(\n (child) => !nodeDetails.removeFromChildrenAfterGroup[child.id]\n );\n parent.allLeafChildren = parent.allLeafChildren.filter(\n (child) => !nodeDetails.removeFromAllLeafChildren[child.id]\n );\n parent.updateHasChildren();\n if (parent.sibling) {\n parent.sibling.childrenAfterGroup = parent.childrenAfterGroup;\n parent.sibling.allLeafChildren = parent.allLeafChildren;\n }\n });\n this.allSets = {};\n this.allParents.length = 0;\n }\n};\nvar GroupStage = class extends BeanStub25 {\n execute(params) {\n const details = this.createGroupingDetails(params);\n if (details.transactions) {\n this.handleTransaction(details);\n } else {\n const afterColsChanged = params.afterColumnsChanged === true;\n this.shotgunResetEverything(details, afterColsChanged);\n }\n if (!details.usingTreeData) {\n this.positionLeafsAndGroups(params.changedPath);\n this.orderGroups(details);\n }\n this.selectableService.updateSelectableAfterGrouping();\n }\n positionLeafsAndGroups(changedPath) {\n changedPath.forEachChangedNodeDepthFirst((group) => {\n if (group.childrenAfterGroup) {\n const leafNodes = [];\n const groupNodes = [];\n let unbalancedNode;\n group.childrenAfterGroup.forEach((row) => {\n var _a;\n if (!((_a = row.childrenAfterGroup) == null ? void 0 : _a.length)) {\n leafNodes.push(row);\n } else {\n if (row.key === \"\" && !unbalancedNode) {\n unbalancedNode = row;\n } else {\n groupNodes.push(row);\n }\n }\n });\n if (unbalancedNode) {\n groupNodes.push(unbalancedNode);\n }\n group.childrenAfterGroup = [...leafNodes, ...groupNodes];\n }\n }, false);\n }\n createGroupingDetails(params) {\n var _a;\n const { rowNode, changedPath, rowNodeTransactions, rowNodeOrder } = params;\n const usingTreeData = this.gos.get(\"treeData\");\n const groupedCols = usingTreeData ? null : this.columnModel.getRowGroupColumns();\n const details = {\n // someone complained that the parent attribute was causing some change detection\n // to break in an angular add-on. Taking the parent out breaks a cyclic dependency, hence this flag got introduced.\n includeParents: !this.gos.get(\"suppressParentsInRowNodes\"),\n expandByDefault: this.gos.get(\"groupDefaultExpanded\"),\n groupedCols,\n rootNode: rowNode,\n pivotMode: this.columnModel.isPivotMode(),\n groupedColCount: usingTreeData || !groupedCols ? 0 : groupedCols.length,\n rowNodeOrder,\n transactions: rowNodeTransactions,\n // if no transaction, then it's shotgun, changed path would be 'not active' at this point anyway\n changedPath,\n groupAllowUnbalanced: this.gos.get(\"groupAllowUnbalanced\"),\n isGroupOpenByDefault: this.gos.getCallback(\"isGroupOpenByDefault\"),\n initialGroupOrderComparator: this.gos.getCallback(\"initialGroupOrderComparator\"),\n usingTreeData,\n suppressGroupMaintainValueType: this.gos.get(\"suppressGroupMaintainValueType\"),\n getDataPath: usingTreeData ? this.gos.get(\"getDataPath\") : void 0,\n keyCreators: (_a = groupedCols == null ? void 0 : groupedCols.map((column) => column.getColDef().keyCreator)) != null ? _a : []\n };\n return details;\n }\n handleTransaction(details) {\n details.transactions.forEach((tran) => {\n const batchRemover = !details.usingTreeData ? new BatchRemover() : void 0;\n if (_29.existsAndNotEmpty(tran.remove)) {\n this.removeNodes(tran.remove, details, batchRemover);\n }\n if (_29.existsAndNotEmpty(tran.update)) {\n this.moveNodesInWrongPath(tran.update, details, batchRemover);\n }\n if (_29.existsAndNotEmpty(tran.add)) {\n this.insertNodes(tran.add, details, false);\n }\n if (batchRemover) {\n const parentsWithChildrenRemoved = batchRemover.getAllParents().slice();\n batchRemover.flush();\n this.removeEmptyGroups(parentsWithChildrenRemoved, details);\n }\n });\n if (details.rowNodeOrder) {\n this.sortChildren(details);\n }\n }\n // this is used when doing delta updates, eg Redux, keeps nodes in right order\n sortChildren(details) {\n details.changedPath.forEachChangedNodeDepthFirst((node) => {\n if (!node.childrenAfterGroup) {\n return;\n }\n const didSort = _29.sortRowNodesByOrder(node.childrenAfterGroup, details.rowNodeOrder);\n if (didSort) {\n details.changedPath.addParentNode(node);\n }\n }, false, true);\n }\n orderGroups(details) {\n const comparator = details.initialGroupOrderComparator;\n if (_29.exists(comparator)) {\n recursiveSort(details.rootNode);\n }\n function recursiveSort(rowNode) {\n const doSort = _29.exists(rowNode.childrenAfterGroup) && // we only want to sort groups, so we do not sort leafs (a leaf group has leafs as children)\n !rowNode.leafGroup;\n if (doSort) {\n rowNode.childrenAfterGroup.sort((nodeA, nodeB) => comparator({ nodeA, nodeB }));\n rowNode.childrenAfterGroup.forEach((childNode) => recursiveSort(childNode));\n }\n }\n }\n getExistingPathForNode(node, details) {\n const res = [];\n let pointer = details.usingTreeData ? node : node.parent;\n while (pointer && pointer !== details.rootNode) {\n res.push({\n key: pointer.key,\n rowGroupColumn: pointer.rowGroupColumn,\n field: pointer.field\n });\n pointer = pointer.parent;\n }\n res.reverse();\n return res;\n }\n moveNodesInWrongPath(childNodes, details, batchRemover) {\n childNodes.forEach((childNode) => {\n if (details.changedPath.isActive()) {\n details.changedPath.addParentNode(childNode.parent);\n }\n const infoToKeyMapper = (item) => item.key;\n const oldPath = this.getExistingPathForNode(childNode, details).map(infoToKeyMapper);\n const newPath = this.getGroupInfo(childNode, details).map(infoToKeyMapper);\n const nodeInCorrectPath = _29.areEqual(oldPath, newPath);\n if (!nodeInCorrectPath) {\n this.moveNode(childNode, details, batchRemover);\n }\n });\n }\n moveNode(childNode, details, batchRemover) {\n this.removeNodesInStages([childNode], details, batchRemover);\n this.insertOneNode(childNode, details, true, batchRemover);\n childNode.setData(childNode.data);\n if (details.changedPath.isActive()) {\n const newParent = childNode.parent;\n details.changedPath.addParentNode(newParent);\n }\n }\n removeNodes(leafRowNodes, details, batchRemover) {\n this.removeNodesInStages(leafRowNodes, details, batchRemover);\n if (details.changedPath.isActive()) {\n leafRowNodes.forEach((rowNode) => details.changedPath.addParentNode(rowNode.parent));\n }\n }\n removeNodesInStages(leafRowNodes, details, batchRemover) {\n this.removeNodesFromParents(leafRowNodes, details, batchRemover);\n if (details.usingTreeData) {\n this.postRemoveCreateFillerNodes(leafRowNodes, details);\n const nodeParents = leafRowNodes.map((n) => n.parent);\n this.removeEmptyGroups(nodeParents, details);\n }\n }\n forEachParentGroup(details, group, callback) {\n let pointer = group;\n while (pointer && pointer !== details.rootNode) {\n callback(pointer);\n pointer = pointer.parent;\n }\n }\n removeNodesFromParents(nodesToRemove, details, provided) {\n const batchRemoverIsLocal = provided == null;\n const batchRemoverToUse = provided ? provided : new BatchRemover();\n nodesToRemove.forEach((nodeToRemove) => {\n this.removeFromParent(nodeToRemove, batchRemoverToUse);\n this.forEachParentGroup(details, nodeToRemove.parent, (parentNode) => {\n batchRemoverToUse.removeFromAllLeafChildren(parentNode, nodeToRemove);\n });\n });\n if (batchRemoverIsLocal) {\n batchRemoverToUse.flush();\n }\n }\n postRemoveCreateFillerNodes(nodesToRemove, details) {\n nodesToRemove.forEach((nodeToRemove) => {\n const replaceWithGroup = nodeToRemove.hasChildren();\n if (replaceWithGroup) {\n const oldPath = this.getExistingPathForNode(nodeToRemove, details);\n const newGroupNode = this.findParentForNode(nodeToRemove, oldPath, details);\n newGroupNode.expanded = nodeToRemove.expanded;\n newGroupNode.allLeafChildren = nodeToRemove.allLeafChildren;\n newGroupNode.childrenAfterGroup = nodeToRemove.childrenAfterGroup;\n newGroupNode.childrenMapped = nodeToRemove.childrenMapped;\n newGroupNode.updateHasChildren();\n newGroupNode.childrenAfterGroup.forEach((rowNode) => rowNode.parent = newGroupNode);\n }\n });\n }\n removeEmptyGroups(possibleEmptyGroups, details) {\n let checkAgain = true;\n const groupShouldBeRemoved = (rowNode) => {\n const mapKey = this.getChildrenMappedKey(rowNode.key, rowNode.rowGroupColumn);\n const parentRowNode = rowNode.parent;\n const groupAlreadyRemoved = parentRowNode && parentRowNode.childrenMapped ? !parentRowNode.childrenMapped[mapKey] : true;\n if (groupAlreadyRemoved) {\n return false;\n }\n return !!rowNode.isEmptyRowGroupNode();\n };\n while (checkAgain) {\n checkAgain = false;\n const batchRemover = new BatchRemover();\n possibleEmptyGroups.forEach((possibleEmptyGroup) => {\n this.forEachParentGroup(details, possibleEmptyGroup, (rowNode) => {\n if (groupShouldBeRemoved(rowNode)) {\n checkAgain = true;\n this.removeFromParent(rowNode, batchRemover);\n rowNode.setSelectedParams({ newValue: false, source: \"rowGroupChanged\" });\n }\n });\n });\n batchRemover.flush();\n }\n }\n // removes the node from the parent by:\n // a) removing from childrenAfterGroup (using batchRemover if present, otherwise immediately)\n // b) removing from childrenMapped (immediately)\n // c) setRowTop(null) - as the rowRenderer uses this to know the RowNode is no longer needed\n // d) setRowIndex(null) - as the rowNode will no longer be displayed.\n removeFromParent(child, batchRemover) {\n if (child.parent) {\n if (batchRemover) {\n batchRemover.removeFromChildrenAfterGroup(child.parent, child);\n } else {\n _29.removeFromArray(child.parent.childrenAfterGroup, child);\n child.parent.updateHasChildren();\n }\n }\n const mapKey = this.getChildrenMappedKey(child.key, child.rowGroupColumn);\n if (child.parent && child.parent.childrenMapped) {\n child.parent.childrenMapped[mapKey] = void 0;\n }\n child.setRowTop(null);\n child.setRowIndex(null);\n }\n addToParent(child, parent) {\n const mapKey = this.getChildrenMappedKey(child.key, child.rowGroupColumn);\n if (parent) {\n const children = parent.childrenMapped != null;\n if (children) {\n parent.childrenMapped[mapKey] = child;\n }\n parent.childrenAfterGroup.push(child);\n parent.updateHasChildren();\n }\n }\n areGroupColsEqual(d1, d2) {\n if (d1 == null || d2 == null || d1.pivotMode !== d2.pivotMode) {\n return false;\n }\n return _29.areEqual(d1.groupedCols, d2.groupedCols) && _29.areEqual(d1.keyCreators, d2.keyCreators);\n }\n checkAllGroupDataAfterColsChanged(details) {\n const recurse = (rowNodes) => {\n if (!rowNodes) {\n return;\n }\n rowNodes.forEach((rowNode) => {\n const isLeafNode = !details.usingTreeData && !rowNode.group;\n if (isLeafNode) {\n return;\n }\n const groupInfo = {\n field: rowNode.field,\n key: rowNode.key,\n rowGroupColumn: rowNode.rowGroupColumn,\n leafNode: rowNode.allLeafChildren[0]\n };\n this.setGroupData(rowNode, groupInfo, details);\n recurse(rowNode.childrenAfterGroup);\n });\n };\n recurse(details.rootNode.childrenAfterGroup);\n }\n shotgunResetEverything(details, afterColumnsChanged) {\n if (this.noChangeInGroupingColumns(details, afterColumnsChanged)) {\n return;\n }\n this.selectionService.filterFromSelection((node) => node && !node.group);\n const { rootNode, groupedCols } = details;\n rootNode.leafGroup = details.usingTreeData ? false : groupedCols.length === 0;\n rootNode.childrenAfterGroup = [];\n rootNode.childrenMapped = {};\n rootNode.updateHasChildren();\n const sibling = rootNode.sibling;\n if (sibling) {\n sibling.childrenAfterGroup = rootNode.childrenAfterGroup;\n sibling.childrenMapped = rootNode.childrenMapped;\n }\n this.insertNodes(rootNode.allLeafChildren, details, false);\n }\n noChangeInGroupingColumns(details, afterColumnsChanged) {\n let noFurtherProcessingNeeded = false;\n const groupDisplayColumns = this.columnModel.getGroupDisplayColumns();\n const newGroupDisplayColIds = groupDisplayColumns ? groupDisplayColumns.map((c) => c.getId()).join(\"-\") : \"\";\n if (afterColumnsChanged) {\n noFurtherProcessingNeeded = details.usingTreeData || this.areGroupColsEqual(details, this.oldGroupingDetails);\n if (this.oldGroupDisplayColIds !== newGroupDisplayColIds) {\n this.checkAllGroupDataAfterColsChanged(details);\n }\n }\n this.oldGroupingDetails = details;\n this.oldGroupDisplayColIds = newGroupDisplayColIds;\n return noFurtherProcessingNeeded;\n }\n insertNodes(newRowNodes, details, isMove) {\n newRowNodes.forEach((rowNode) => {\n this.insertOneNode(rowNode, details, isMove);\n if (details.changedPath.isActive()) {\n details.changedPath.addParentNode(rowNode.parent);\n }\n });\n }\n insertOneNode(childNode, details, isMove, batchRemover) {\n const path = this.getGroupInfo(childNode, details);\n const parentGroup = this.findParentForNode(childNode, path, details, batchRemover);\n if (!parentGroup.group) {\n console.warn(\n `AG Grid: duplicate group keys for row data, keys should be unique`,\n [parentGroup.data, childNode.data]\n );\n }\n if (details.usingTreeData) {\n this.swapGroupWithUserNode(parentGroup, childNode, isMove);\n } else {\n childNode.parent = parentGroup;\n childNode.level = path.length;\n parentGroup.childrenAfterGroup.push(childNode);\n parentGroup.updateHasChildren();\n }\n }\n findParentForNode(childNode, path, details, batchRemover) {\n let nextNode = details.rootNode;\n path.forEach((groupInfo, level) => {\n nextNode = this.getOrCreateNextNode(nextNode, groupInfo, level, details);\n if (!(batchRemover == null ? void 0 : batchRemover.isRemoveFromAllLeafChildren(nextNode, childNode))) {\n nextNode.allLeafChildren.push(childNode);\n } else {\n batchRemover == null ? void 0 : batchRemover.preventRemoveFromAllLeafChildren(nextNode, childNode);\n }\n });\n return nextNode;\n }\n swapGroupWithUserNode(fillerGroup, userGroup, isMove) {\n userGroup.parent = fillerGroup.parent;\n userGroup.key = fillerGroup.key;\n userGroup.field = fillerGroup.field;\n userGroup.groupData = fillerGroup.groupData;\n userGroup.level = fillerGroup.level;\n if (!isMove) {\n userGroup.expanded = fillerGroup.expanded;\n }\n userGroup.leafGroup = fillerGroup.leafGroup;\n userGroup.rowGroupIndex = fillerGroup.rowGroupIndex;\n userGroup.allLeafChildren = fillerGroup.allLeafChildren;\n userGroup.childrenAfterGroup = fillerGroup.childrenAfterGroup;\n userGroup.childrenMapped = fillerGroup.childrenMapped;\n userGroup.sibling = fillerGroup.sibling;\n userGroup.updateHasChildren();\n this.removeFromParent(fillerGroup);\n userGroup.childrenAfterGroup.forEach((rowNode) => rowNode.parent = userGroup);\n this.addToParent(userGroup, fillerGroup.parent);\n }\n getOrCreateNextNode(parentGroup, groupInfo, level, details) {\n const key = this.getChildrenMappedKey(groupInfo.key, groupInfo.rowGroupColumn);\n let nextNode = parentGroup.childrenMapped ? parentGroup.childrenMapped[key] : void 0;\n if (!nextNode) {\n nextNode = this.createGroup(groupInfo, parentGroup, level, details);\n this.addToParent(nextNode, parentGroup);\n }\n return nextNode;\n }\n createGroup(groupInfo, parent, level, details) {\n const groupNode = new RowNode2(this.beans);\n groupNode.group = true;\n groupNode.field = groupInfo.field;\n groupNode.rowGroupColumn = groupInfo.rowGroupColumn;\n this.setGroupData(groupNode, groupInfo, details);\n groupNode.key = groupInfo.key;\n groupNode.id = this.createGroupId(groupNode, parent, details.usingTreeData, level);\n groupNode.level = level;\n groupNode.leafGroup = details.usingTreeData ? false : level === details.groupedColCount - 1;\n groupNode.allLeafChildren = [];\n groupNode.setAllChildrenCount(0);\n groupNode.rowGroupIndex = details.usingTreeData ? null : level;\n groupNode.childrenAfterGroup = [];\n groupNode.childrenMapped = {};\n groupNode.updateHasChildren();\n groupNode.parent = details.includeParents ? parent : null;\n this.setExpandedInitialValue(details, groupNode);\n return groupNode;\n }\n createGroupId(node, parent, usingTreeData, level) {\n let createGroupId;\n if (usingTreeData) {\n createGroupId = (node2, parent2, level2) => {\n if (level2 < 0) {\n return null;\n }\n const parentId = parent2 ? createGroupId(parent2, parent2.parent, level2 - 1) : null;\n return `${parentId == null ? \"\" : parentId + \"-\"}${level2}-${node2.key}`;\n };\n } else {\n createGroupId = (node2, parent2) => {\n if (!node2.rowGroupColumn) {\n return null;\n }\n const parentId = parent2 ? createGroupId(parent2, parent2.parent, 0) : null;\n return `${parentId == null ? \"\" : parentId + \"-\"}${node2.rowGroupColumn.getColId()}-${node2.key}`;\n };\n }\n return RowNode2.ID_PREFIX_ROW_GROUP + createGroupId(node, parent, level);\n }\n setGroupData(groupNode, groupInfo, details) {\n groupNode.groupData = {};\n const groupDisplayCols = this.columnModel.getGroupDisplayColumns();\n groupDisplayCols.forEach((col) => {\n const isTreeData = details.usingTreeData;\n if (isTreeData) {\n groupNode.groupData[col.getColId()] = groupInfo.key;\n return;\n }\n const groupColumn = groupNode.rowGroupColumn;\n const isRowGroupDisplayed = groupColumn !== null && col.isRowGroupDisplayed(groupColumn.getId());\n if (isRowGroupDisplayed) {\n if (details.suppressGroupMaintainValueType) {\n groupNode.groupData[col.getColId()] = groupInfo.key;\n } else {\n groupNode.groupData[col.getColId()] = this.valueService.getValue(groupColumn, groupInfo.leafNode);\n }\n }\n });\n }\n getChildrenMappedKey(key, rowGroupColumn) {\n if (rowGroupColumn) {\n return rowGroupColumn.getId() + \"-\" + key;\n }\n return key;\n }\n setExpandedInitialValue(details, groupNode) {\n if (details.pivotMode && groupNode.leafGroup) {\n groupNode.expanded = false;\n return;\n }\n const userCallback = details.isGroupOpenByDefault;\n if (userCallback) {\n const params = {\n rowNode: groupNode,\n field: groupNode.field,\n key: groupNode.key,\n level: groupNode.level,\n rowGroupColumn: groupNode.rowGroupColumn\n };\n groupNode.expanded = userCallback(params) == true;\n return;\n }\n const { expandByDefault } = details;\n if (details.expandByDefault === -1) {\n groupNode.expanded = true;\n return;\n }\n groupNode.expanded = groupNode.level < expandByDefault;\n }\n getGroupInfo(rowNode, details) {\n if (details.usingTreeData) {\n return this.getGroupInfoFromCallback(rowNode, details);\n }\n return this.getGroupInfoFromGroupColumns(rowNode, details);\n }\n getGroupInfoFromCallback(rowNode, details) {\n const keys = details.getDataPath ? details.getDataPath(rowNode.data) : null;\n if (keys === null || keys === void 0 || keys.length === 0) {\n _29.warnOnce(`getDataPath() should not return an empty path for data ${rowNode.data}`);\n }\n const groupInfoMapper = (key) => ({ key, field: null, rowGroupColumn: null });\n return keys ? keys.map(groupInfoMapper) : [];\n }\n getGroupInfoFromGroupColumns(rowNode, details) {\n const res = [];\n details.groupedCols.forEach((groupCol) => {\n let key = this.valueService.getKeyForNode(groupCol, rowNode);\n let keyExists = key !== null && key !== void 0 && key !== \"\";\n const createGroupForEmpty = details.pivotMode || !details.groupAllowUnbalanced;\n if (createGroupForEmpty && !keyExists) {\n key = \"\";\n keyExists = true;\n }\n if (keyExists) {\n const item = {\n key,\n field: groupCol.getColDef().field,\n rowGroupColumn: groupCol,\n leafNode: rowNode\n };\n res.push(item);\n }\n });\n return res;\n }\n};\n__decorateClass6([\n Autowired210(\"columnModel\")\n], GroupStage.prototype, \"columnModel\", 2);\n__decorateClass6([\n Autowired210(\"selectableService\")\n], GroupStage.prototype, \"selectableService\", 2);\n__decorateClass6([\n Autowired210(\"valueService\")\n], GroupStage.prototype, \"valueService\", 2);\n__decorateClass6([\n Autowired210(\"beans\")\n], GroupStage.prototype, \"beans\", 2);\n__decorateClass6([\n Autowired210(\"selectionService\")\n], GroupStage.prototype, \"selectionService\", 2);\nGroupStage = __decorateClass6([\n Bean25(\"groupStage\")\n], GroupStage);\nvar PivotColDefService = class extends BeanStub33 {\n init() {\n const getFieldSeparator = () => {\n var _a;\n return (_a = this.gos.get(\"serverSidePivotResultFieldSeparator\")) != null ? _a : \"_\";\n };\n this.fieldSeparator = getFieldSeparator();\n this.addManagedPropertyListener(\"serverSidePivotResultFieldSeparator\", () => {\n this.fieldSeparator = getFieldSeparator();\n });\n const getPivotDefaultExpanded = () => this.gos.get(\"pivotDefaultExpanded\");\n this.pivotDefaultExpanded = getPivotDefaultExpanded();\n this.addManagedPropertyListener(\"pivotDefaultExpanded\", () => {\n this.pivotDefaultExpanded = getPivotDefaultExpanded();\n });\n }\n createPivotColumnDefs(uniqueValues) {\n const pivotColumnGroupDefs = this.createPivotColumnsFromUniqueValues(uniqueValues);\n function extractColDefs(input, arr = []) {\n input.forEach((def) => {\n if (def.children !== void 0) {\n extractColDefs(def.children, arr);\n } else {\n arr.push(def);\n }\n });\n return arr;\n }\n const pivotColumnDefs = extractColDefs(pivotColumnGroupDefs);\n this.addRowGroupTotals(pivotColumnGroupDefs, pivotColumnDefs);\n this.addExpandablePivotGroups(pivotColumnGroupDefs, pivotColumnDefs);\n this.addPivotTotalsToGroups(pivotColumnGroupDefs, pivotColumnDefs);\n const pivotColumnDefsClone = pivotColumnDefs.map((colDef) => _37.cloneObject(colDef));\n return {\n pivotColumnGroupDefs,\n pivotColumnDefs: pivotColumnDefsClone\n };\n }\n createPivotColumnsFromUniqueValues(uniqueValues) {\n const pivotColumns = this.columnModel.getPivotColumns();\n const maxDepth = pivotColumns.length;\n const pivotColumnGroupDefs = this.recursivelyBuildGroup(0, uniqueValues, [], maxDepth, pivotColumns);\n return pivotColumnGroupDefs;\n }\n recursivelyBuildGroup(index, uniqueValue, pivotKeys, maxDepth, primaryPivotColumns) {\n const measureColumns = this.columnModel.getValueColumns();\n if (index >= maxDepth) {\n return this.buildMeasureCols(pivotKeys);\n }\n const primaryPivotColumnDefs = primaryPivotColumns[index].getColDef();\n const comparator = this.headerNameComparator.bind(this, primaryPivotColumnDefs.pivotComparator);\n if (measureColumns.length === 1 && this.gos.get(\"removePivotHeaderRowWhenSingleValueColumn\") && index === maxDepth - 1) {\n const leafCols = [];\n _37.iterateObject(uniqueValue, (key) => {\n const newPivotKeys = [...pivotKeys, key];\n const colDef = this.createColDef(measureColumns[0], key, newPivotKeys);\n colDef.columnGroupShow = \"open\";\n leafCols.push(colDef);\n });\n leafCols.sort(comparator);\n return leafCols;\n }\n const groups = [];\n _37.iterateObject(uniqueValue, (key, value) => {\n const openByDefault = this.pivotDefaultExpanded === -1 || index < this.pivotDefaultExpanded;\n const newPivotKeys = [...pivotKeys, key];\n groups.push({\n children: this.recursivelyBuildGroup(index + 1, value, newPivotKeys, maxDepth, primaryPivotColumns),\n headerName: key,\n pivotKeys: newPivotKeys,\n columnGroupShow: \"open\",\n openByDefault,\n groupId: this.generateColumnGroupId(newPivotKeys)\n });\n });\n groups.sort(comparator);\n return groups;\n }\n buildMeasureCols(pivotKeys) {\n const measureColumns = this.columnModel.getValueColumns();\n if (measureColumns.length === 0) {\n return [this.createColDef(null, \"-\", pivotKeys)];\n }\n return measureColumns.map((measureCol) => {\n const columnName = this.columnModel.getDisplayNameForColumn(measureCol, \"header\");\n return __spreadProps4(__spreadValues4({}, this.createColDef(measureCol, columnName, pivotKeys)), {\n columnGroupShow: \"open\"\n });\n });\n }\n addExpandablePivotGroups(pivotColumnGroupDefs, pivotColumnDefs) {\n if (this.gos.get(\"suppressExpandablePivotGroups\") || this.gos.get(\"pivotColumnGroupTotals\")) {\n return;\n }\n const recursivelyAddSubTotals = (groupDef, currentPivotColumnDefs, acc) => {\n const group = groupDef;\n if (group.children) {\n const childAcc = /* @__PURE__ */ new Map();\n group.children.forEach((grp) => {\n recursivelyAddSubTotals(grp, currentPivotColumnDefs, childAcc);\n });\n const firstGroup = !group.children.some((child) => child.children);\n this.columnModel.getValueColumns().forEach((valueColumn) => {\n const columnName = this.columnModel.getDisplayNameForColumn(valueColumn, \"header\");\n const totalColDef = this.createColDef(valueColumn, columnName, groupDef.pivotKeys);\n totalColDef.pivotTotalColumnIds = childAcc.get(valueColumn.getColId());\n totalColDef.columnGroupShow = \"closed\";\n totalColDef.aggFunc = valueColumn.getAggFunc();\n if (!firstGroup) {\n const children = groupDef.children;\n children.push(totalColDef);\n currentPivotColumnDefs.push(totalColDef);\n }\n });\n this.merge(acc, childAcc);\n } else {\n const def = groupDef;\n if (!def.pivotValueColumn) {\n return;\n }\n const pivotValueColId = def.pivotValueColumn.getColId();\n const arr = acc.has(pivotValueColId) ? acc.get(pivotValueColId) : [];\n arr.push(def.colId);\n acc.set(pivotValueColId, arr);\n }\n };\n pivotColumnGroupDefs.forEach((groupDef) => {\n recursivelyAddSubTotals(groupDef, pivotColumnDefs, /* @__PURE__ */ new Map());\n });\n }\n addPivotTotalsToGroups(pivotColumnGroupDefs, pivotColumnDefs) {\n if (!this.gos.get(\"pivotColumnGroupTotals\")) {\n return;\n }\n const insertAfter = this.gos.get(\"pivotColumnGroupTotals\") === \"after\";\n const valueCols = this.columnModel.getValueColumns();\n const aggFuncs = valueCols.map((valueCol) => valueCol.getAggFunc());\n if (!aggFuncs || aggFuncs.length < 1 || !this.sameAggFuncs(aggFuncs)) {\n return;\n }\n const valueColumn = valueCols[0];\n pivotColumnGroupDefs.forEach((groupDef) => {\n this.recursivelyAddPivotTotal(groupDef, pivotColumnDefs, valueColumn, insertAfter);\n });\n }\n recursivelyAddPivotTotal(groupDef, pivotColumnDefs, valueColumn, insertAfter) {\n const group = groupDef;\n if (!group.children) {\n const def = groupDef;\n return def.colId ? [def.colId] : null;\n }\n let colIds = [];\n group.children.forEach((grp) => {\n const childColIds = this.recursivelyAddPivotTotal(grp, pivotColumnDefs, valueColumn, insertAfter);\n if (childColIds) {\n colIds = colIds.concat(childColIds);\n }\n });\n if (group.children.length > 1) {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const headerName = localeTextFunc(\"pivotColumnGroupTotals\", \"Total\");\n const totalColDef = this.createColDef(valueColumn, headerName, groupDef.pivotKeys, true);\n totalColDef.pivotTotalColumnIds = colIds;\n totalColDef.aggFunc = valueColumn.getAggFunc();\n const children = groupDef.children;\n insertAfter ? children.push(totalColDef) : children.unshift(totalColDef);\n pivotColumnDefs.push(totalColDef);\n }\n return colIds;\n }\n addRowGroupTotals(pivotColumnGroupDefs, pivotColumnDefs) {\n if (!this.gos.get(\"pivotRowTotals\")) {\n return;\n }\n const insertAfter = this.gos.get(\"pivotRowTotals\") === \"after\";\n const valueColumns = this.columnModel.getValueColumns();\n const valueCols = insertAfter ? valueColumns.slice() : valueColumns.slice().reverse();\n for (let i = 0; i < valueCols.length; i++) {\n const valueCol = valueCols[i];\n let colIds = [];\n pivotColumnGroupDefs.forEach((groupDef) => {\n colIds = colIds.concat(this.extractColIdsForValueColumn(groupDef, valueCol));\n });\n const withGroup = valueCols.length > 1 || !this.gos.get(\"removePivotHeaderRowWhenSingleValueColumn\");\n this.createRowGroupTotal(pivotColumnGroupDefs, pivotColumnDefs, valueCol, colIds, insertAfter, withGroup);\n }\n }\n extractColIdsForValueColumn(groupDef, valueColumn) {\n const group = groupDef;\n if (!group.children) {\n const colDef = group;\n return colDef.pivotValueColumn === valueColumn && colDef.colId ? [colDef.colId] : [];\n }\n let colIds = [];\n group.children.forEach((grp) => {\n this.extractColIdsForValueColumn(grp, valueColumn);\n const childColIds = this.extractColIdsForValueColumn(grp, valueColumn);\n colIds = colIds.concat(childColIds);\n });\n return colIds;\n }\n createRowGroupTotal(parentChildren, pivotColumnDefs, valueColumn, colIds, insertAfter, addGroup) {\n const measureColumns = this.columnModel.getValueColumns();\n let colDef;\n if (measureColumns.length === 0) {\n colDef = this.createColDef(null, \"-\", []);\n } else {\n const columnName = this.columnModel.getDisplayNameForColumn(valueColumn, \"header\");\n colDef = this.createColDef(valueColumn, columnName, []);\n colDef.pivotTotalColumnIds = colIds;\n }\n colDef.colId = PivotColDefService.PIVOT_ROW_TOTAL_PREFIX + colDef.colId;\n pivotColumnDefs.push(colDef);\n const valueGroup = addGroup ? {\n children: [colDef],\n pivotKeys: [],\n groupId: `${PivotColDefService.PIVOT_ROW_TOTAL_PREFIX}_pivotGroup_${valueColumn.getColId()}`\n } : colDef;\n insertAfter ? parentChildren.push(valueGroup) : parentChildren.unshift(valueGroup);\n }\n createColDef(valueColumn, headerName, pivotKeys, totalColumn = false) {\n const colDef = {};\n if (valueColumn) {\n const colDefToCopy = valueColumn.getColDef();\n Object.assign(colDef, colDefToCopy);\n colDef.hide = false;\n }\n colDef.headerName = headerName;\n colDef.colId = this.generateColumnId(pivotKeys || [], valueColumn && !totalColumn ? valueColumn.getColId() : \"\");\n colDef.field = colDef.colId;\n colDef.valueGetter = (params) => {\n var _a;\n return (_a = params.data) == null ? void 0 : _a[params.colDef.field];\n };\n colDef.pivotKeys = pivotKeys;\n colDef.pivotValueColumn = valueColumn;\n if (colDef.filter === true) {\n colDef.filter = \"agNumberColumnFilter\";\n }\n return colDef;\n }\n sameAggFuncs(aggFuncs) {\n if (aggFuncs.length == 1) {\n return true;\n }\n for (let i = 1; i < aggFuncs.length; i++) {\n if (aggFuncs[i] !== aggFuncs[0]) {\n return false;\n }\n }\n return true;\n }\n headerNameComparator(userComparator, a, b) {\n if (userComparator) {\n return userComparator(a.headerName, b.headerName);\n } else {\n if (a.headerName && !b.headerName) {\n return 1;\n } else if (!a.headerName && b.headerName) {\n return -1;\n }\n if (!a.headerName || !b.headerName) {\n return 0;\n }\n if (a.headerName < b.headerName) {\n return -1;\n }\n if (a.headerName > b.headerName) {\n return 1;\n }\n return 0;\n }\n }\n merge(m1, m2) {\n m2.forEach((value, key, map) => {\n const existingList = m1.has(key) ? m1.get(key) : [];\n const updatedList = [...existingList, ...value];\n m1.set(key, updatedList);\n });\n }\n generateColumnGroupId(pivotKeys) {\n const pivotCols = this.columnModel.getPivotColumns().map((col) => col.getColId());\n return `pivotGroup_${pivotCols.join(\"-\")}_${pivotKeys.join(\"-\")}`;\n }\n generateColumnId(pivotKeys, measureColumnId) {\n const pivotCols = this.columnModel.getPivotColumns().map((col) => col.getColId());\n return `pivot_${pivotCols.join(\"-\")}_${pivotKeys.join(\"-\")}_${measureColumnId}`;\n }\n /**\n * Used by the SSRM to create secondary columns from provided fields\n * @param fields \n */\n createColDefsFromFields(fields) {\n ;\n const uniqueValues = {};\n for (let i = 0; i < fields.length; i++) {\n const field = fields[i];\n const parts = field.split(this.fieldSeparator);\n let level = uniqueValues;\n for (let p = 0; p < parts.length; p++) {\n const part = parts[p];\n if (level[part] == null) {\n level[part] = {};\n }\n level = level[part];\n }\n }\n const uniqueValuesToGroups = (id, key, uniqueValues2, depth) => {\n var _a;\n const children = [];\n for (let key2 in uniqueValues2) {\n const item = uniqueValues2[key2];\n const child = uniqueValuesToGroups(`${id}${this.fieldSeparator}${key2}`, key2, item, depth + 1);\n children.push(child);\n }\n if (children.length === 0) {\n const potentialAggCol = this.columnModel.getPrimaryColumn(key);\n if (potentialAggCol) {\n const headerName = (_a = this.columnModel.getDisplayNameForColumn(potentialAggCol, \"header\")) != null ? _a : key;\n const colDef = this.createColDef(potentialAggCol, headerName, void 0, false);\n colDef.colId = id;\n colDef.aggFunc = potentialAggCol.getAggFunc();\n colDef.valueGetter = (params) => {\n var _a2;\n return (_a2 = params.data) == null ? void 0 : _a2[id];\n };\n return colDef;\n }\n const col = {\n colId: id,\n headerName: key,\n // this is to support using pinned rows, normally the data will be extracted from the aggData object using the colId\n // however pinned rows still access the data object by field, this prevents values with dots from being treated as complex objects\n valueGetter: (params) => {\n var _a2;\n return (_a2 = params.data) == null ? void 0 : _a2[id];\n }\n };\n return col;\n }\n const collapseSingleChildren = this.gos.get(\"removePivotHeaderRowWhenSingleValueColumn\");\n if (collapseSingleChildren && children.length === 1 && \"colId\" in children[0]) {\n children[0].headerName = key;\n return children[0];\n }\n const group = {\n openByDefault: this.pivotDefaultExpanded === -1 || depth < this.pivotDefaultExpanded,\n groupId: id,\n headerName: key,\n children\n };\n return group;\n };\n const res = [];\n for (let key in uniqueValues) {\n const item = uniqueValues[key];\n const col = uniqueValuesToGroups(key, key, item, 0);\n res.push(col);\n }\n return res;\n }\n};\nPivotColDefService.PIVOT_ROW_TOTAL_PREFIX = \"PivotRowTotal_\";\n__decorateClass6([\n Autowired310(\"columnModel\")\n], PivotColDefService.prototype, \"columnModel\", 2);\n__decorateClass6([\n PostConstruct51\n], PivotColDefService.prototype, \"init\", 1);\nPivotColDefService = __decorateClass6([\n Bean33(\"pivotColDefService\")\n], PivotColDefService);\nvar PivotStage = class extends BeanStub43 {\n constructor() {\n super(...arguments);\n this.uniqueValues = {};\n this.lastTimeFailed = false;\n this.maxUniqueValues = -1;\n this.currentUniqueCount = 0;\n }\n execute(params) {\n const changedPath = params.changedPath;\n if (this.columnModel.isPivotActive()) {\n this.executePivotOn(changedPath);\n } else {\n this.executePivotOff(changedPath);\n }\n }\n executePivotOff(changedPath) {\n this.aggregationColumnsHashLastTime = null;\n this.uniqueValues = {};\n if (this.columnModel.isSecondaryColumnsPresent()) {\n this.columnModel.setSecondaryColumns(null, \"rowModelUpdated\");\n if (changedPath) {\n changedPath.setInactive();\n }\n }\n }\n executePivotOn(changedPath) {\n var _a;\n const numberOfAggregationColumns = (_a = this.columnModel.getValueColumns().length) != null ? _a : 1;\n const configuredMaxCols = this.gos.get(\"pivotMaxGeneratedColumns\");\n this.maxUniqueValues = configuredMaxCols === -1 ? -1 : configuredMaxCols / numberOfAggregationColumns;\n let uniqueValues;\n try {\n uniqueValues = this.bucketUpRowNodes(changedPath);\n } catch (e) {\n if (e.message === PivotStage.EXCEEDED_MAX_UNIQUE_VALUES) {\n this.columnModel.setSecondaryColumns([], \"rowModelUpdated\");\n const event = {\n type: Events12.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED,\n message: e.message\n };\n this.eventService.dispatchEvent(event);\n this.lastTimeFailed = true;\n return;\n }\n throw e;\n }\n const uniqueValuesChanged = this.setUniqueValues(uniqueValues);\n const aggregationColumns = this.columnModel.getValueColumns();\n const aggregationColumnsHash = aggregationColumns.map((column) => `${column.getId()}-${column.getColDef().headerName}`).join(\"#\");\n const aggregationFuncsHash = aggregationColumns.map((column) => column.getAggFunc().toString()).join(\"#\");\n const aggregationColumnsChanged = this.aggregationColumnsHashLastTime !== aggregationColumnsHash;\n const aggregationFuncsChanged = this.aggregationFuncsHashLastTime !== aggregationFuncsHash;\n this.aggregationColumnsHashLastTime = aggregationColumnsHash;\n this.aggregationFuncsHashLastTime = aggregationFuncsHash;\n const groupColumnsHash = this.columnModel.getRowGroupColumns().map((column) => column.getId()).join(\"#\");\n const groupColumnsChanged = groupColumnsHash !== this.groupColumnsHashLastTime;\n this.groupColumnsHashLastTime = groupColumnsHash;\n const pivotRowTotals = this.gos.get(\"pivotRowTotals\");\n const pivotColumnGroupTotals = this.gos.get(\"pivotColumnGroupTotals\");\n const suppressExpandablePivotGroups = this.gos.get(\"suppressExpandablePivotGroups\");\n const removePivotHeaderRowWhenSingleValueColumn = this.gos.get(\"removePivotHeaderRowWhenSingleValueColumn\");\n const anyGridOptionsChanged = pivotRowTotals !== this.pivotRowTotalsLastTime || pivotColumnGroupTotals !== this.pivotColumnGroupTotalsLastTime || suppressExpandablePivotGroups !== this.suppressExpandablePivotGroupsLastTime || removePivotHeaderRowWhenSingleValueColumn !== this.removePivotHeaderRowWhenSingleValueColumnLastTime;\n this.pivotRowTotalsLastTime = pivotRowTotals;\n this.pivotColumnGroupTotalsLastTime = pivotColumnGroupTotals;\n this.suppressExpandablePivotGroupsLastTime = suppressExpandablePivotGroups;\n this.removePivotHeaderRowWhenSingleValueColumnLastTime = removePivotHeaderRowWhenSingleValueColumn;\n if (this.lastTimeFailed || uniqueValuesChanged || aggregationColumnsChanged || groupColumnsChanged || aggregationFuncsChanged || anyGridOptionsChanged) {\n const { pivotColumnGroupDefs, pivotColumnDefs } = this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);\n this.pivotColumnDefs = pivotColumnDefs;\n this.columnModel.setSecondaryColumns(pivotColumnGroupDefs, \"rowModelUpdated\");\n if (changedPath) {\n changedPath.setInactive();\n }\n }\n this.lastTimeFailed = false;\n }\n setUniqueValues(newValues) {\n const json1 = JSON.stringify(newValues);\n const json2 = JSON.stringify(this.uniqueValues);\n const uniqueValuesChanged = json1 !== json2;\n if (uniqueValuesChanged) {\n this.uniqueValues = newValues;\n return true;\n } else {\n return false;\n }\n }\n bucketUpRowNodes(changedPath) {\n this.currentUniqueCount = 0;\n const uniqueValues = {};\n changedPath.forEachChangedNodeDepthFirst((node) => {\n if (node.leafGroup) {\n node.childrenMapped = null;\n }\n });\n const recursivelyBucketFilteredChildren = (node) => {\n var _a;\n if (node.leafGroup) {\n this.bucketRowNode(node, uniqueValues);\n } else {\n (_a = node.childrenAfterFilter) == null ? void 0 : _a.forEach(recursivelyBucketFilteredChildren);\n }\n };\n changedPath.executeFromRootNode(recursivelyBucketFilteredChildren);\n return uniqueValues;\n }\n bucketRowNode(rowNode, uniqueValues) {\n const pivotColumns = this.columnModel.getPivotColumns();\n if (pivotColumns.length === 0) {\n rowNode.childrenMapped = null;\n } else {\n rowNode.childrenMapped = this.bucketChildren(rowNode.childrenAfterFilter, pivotColumns, 0, uniqueValues);\n }\n if (rowNode.sibling) {\n rowNode.sibling.childrenMapped = rowNode.childrenMapped;\n }\n }\n bucketChildren(children, pivotColumns, pivotIndex, uniqueValues) {\n const mappedChildren = {};\n const pivotColumn = pivotColumns[pivotIndex];\n children.forEach((child) => {\n let key = this.valueService.getKeyForNode(pivotColumn, child);\n if (_44.missing(key)) {\n key = \"\";\n }\n if (!uniqueValues[key]) {\n this.currentUniqueCount += 1;\n uniqueValues[key] = {};\n const doesGeneratedColMaxExist = this.maxUniqueValues !== -1;\n const hasExceededColMax = this.currentUniqueCount > this.maxUniqueValues;\n if (doesGeneratedColMaxExist && hasExceededColMax) {\n throw Error(PivotStage.EXCEEDED_MAX_UNIQUE_VALUES);\n }\n }\n if (!mappedChildren[key]) {\n mappedChildren[key] = [];\n }\n mappedChildren[key].push(child);\n });\n if (pivotIndex === pivotColumns.length - 1) {\n return mappedChildren;\n } else {\n const result = {};\n _44.iterateObject(mappedChildren, (key, value) => {\n result[key] = this.bucketChildren(value, pivotColumns, pivotIndex + 1, uniqueValues[key]);\n });\n return result;\n }\n }\n getPivotColumnDefs() {\n return this.pivotColumnDefs;\n }\n};\nPivotStage.EXCEEDED_MAX_UNIQUE_VALUES = \"Exceeded maximum allowed pivot column count.\";\n__decorateClass6([\n Autowired410(\"valueService\")\n], PivotStage.prototype, \"valueService\", 2);\n__decorateClass6([\n Autowired410(\"columnModel\")\n], PivotStage.prototype, \"columnModel\", 2);\n__decorateClass6([\n Autowired410(\"pivotColDefService\")\n], PivotStage.prototype, \"pivotColDefService\", 2);\nPivotStage = __decorateClass6([\n Bean43(\"pivotStage\")\n], PivotStage);\nvar defaultAggFuncNames = {\n sum: \"Sum\",\n first: \"First\",\n last: \"Last\",\n min: \"Min\",\n max: \"Max\",\n count: \"Count\",\n avg: \"Average\"\n};\nvar AggFuncService = class extends BeanStub53 {\n constructor() {\n super(...arguments);\n this.aggFuncsMap = {};\n this.initialised = false;\n }\n init() {\n if (this.initialised) {\n return;\n }\n this.initialiseWithDefaultAggregations();\n this.addAggFuncs(this.gos.get(\"aggFuncs\"));\n }\n initialiseWithDefaultAggregations() {\n this.aggFuncsMap[AggFuncService.AGG_SUM] = aggSum;\n this.aggFuncsMap[AggFuncService.AGG_FIRST] = aggFirst;\n this.aggFuncsMap[AggFuncService.AGG_LAST] = aggLast;\n this.aggFuncsMap[AggFuncService.AGG_MIN] = aggMin;\n this.aggFuncsMap[AggFuncService.AGG_MAX] = aggMax;\n this.aggFuncsMap[AggFuncService.AGG_COUNT] = aggCount;\n this.aggFuncsMap[AggFuncService.AGG_AVG] = aggAvg;\n this.initialised = true;\n }\n isAggFuncPossible(column, func) {\n const allKeys = this.getFuncNames(column);\n const allowed = _53.includes(allKeys, func);\n const funcExists = _53.exists(this.aggFuncsMap[func]);\n return allowed && funcExists;\n }\n getDefaultFuncLabel(fctName) {\n var _a;\n return (_a = defaultAggFuncNames[fctName]) != null ? _a : fctName;\n }\n getDefaultAggFunc(column) {\n const defaultAgg = column.getColDef().defaultAggFunc;\n if (_53.exists(defaultAgg) && this.isAggFuncPossible(column, defaultAgg)) {\n return defaultAgg;\n }\n if (this.isAggFuncPossible(column, AggFuncService.AGG_SUM)) {\n return AggFuncService.AGG_SUM;\n }\n const allKeys = this.getFuncNames(column);\n return _53.existsAndNotEmpty(allKeys) ? allKeys[0] : null;\n }\n addAggFuncs(aggFuncs) {\n this.init();\n _53.iterateObject(aggFuncs, (key, aggFunc) => {\n this.aggFuncsMap[key] = aggFunc;\n });\n }\n getAggFunc(name) {\n this.init();\n return this.aggFuncsMap[name];\n }\n getFuncNames(column) {\n const userAllowedFuncs = column.getColDef().allowedAggFuncs;\n return userAllowedFuncs == null ? Object.keys(this.aggFuncsMap).sort() : userAllowedFuncs;\n }\n clear() {\n this.aggFuncsMap = {};\n }\n};\nAggFuncService.AGG_SUM = \"sum\";\nAggFuncService.AGG_FIRST = \"first\";\nAggFuncService.AGG_LAST = \"last\";\nAggFuncService.AGG_MIN = \"min\";\nAggFuncService.AGG_MAX = \"max\";\nAggFuncService.AGG_COUNT = \"count\";\nAggFuncService.AGG_AVG = \"avg\";\n__decorateClass6([\n PostConstruct210\n], AggFuncService.prototype, \"init\", 1);\nAggFuncService = __decorateClass6([\n Bean52(\"aggFuncService\")\n], AggFuncService);\nfunction aggSum(params) {\n const { values } = params;\n let result = null;\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if (typeof value === \"number\") {\n if (result === null) {\n result = value;\n } else {\n result += typeof result === \"number\" ? value : BigInt(value);\n }\n } else if (typeof value === \"bigint\") {\n if (result === null) {\n result = value;\n } else {\n result = (typeof result === \"bigint\" ? result : BigInt(result)) + value;\n }\n }\n }\n return result;\n}\nfunction aggFirst(params) {\n return params.values.length > 0 ? params.values[0] : null;\n}\nfunction aggLast(params) {\n return params.values.length > 0 ? _53.last(params.values) : null;\n}\nfunction aggMin(params) {\n const { values } = params;\n let result = null;\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if ((typeof value === \"number\" || typeof value === \"bigint\") && (result === null || result > value)) {\n result = value;\n }\n }\n return result;\n}\nfunction aggMax(params) {\n const { values } = params;\n let result = null;\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if ((typeof value === \"number\" || typeof value === \"bigint\") && (result === null || result < value)) {\n result = value;\n }\n }\n return result;\n}\nfunction aggCount(params) {\n var _a, _b;\n const { values } = params;\n let result = 0;\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n result += value != null && typeof value.value === \"number\" ? value.value : 1;\n }\n const existingAggData = (_b = (_a = params.rowNode) == null ? void 0 : _a.aggData) == null ? void 0 : _b[params.column.getColId()];\n if (existingAggData && existingAggData.value === result) {\n return existingAggData;\n }\n return {\n value: result,\n toString: function() {\n return this.value.toString();\n },\n // used for sorting\n toNumber: function() {\n return this.value;\n }\n };\n}\nfunction aggAvg(params) {\n var _a, _b, _c;\n const { values } = params;\n let sum = 0;\n let count = 0;\n for (let i = 0; i < values.length; i++) {\n const currentValue = values[i];\n let valueToAdd = null;\n if (typeof currentValue === \"number\" || typeof currentValue === \"bigint\") {\n valueToAdd = currentValue;\n count++;\n } else if (currentValue != null && (typeof currentValue.value === \"number\" || typeof currentValue.value === \"bigint\") && typeof currentValue.count === \"number\") {\n valueToAdd = currentValue.value * (typeof currentValue.value === \"number\" ? currentValue.count : BigInt(currentValue.count));\n count += currentValue.count;\n }\n if (typeof valueToAdd === \"number\") {\n sum += typeof sum === \"number\" ? valueToAdd : BigInt(valueToAdd);\n } else if (typeof valueToAdd === \"bigint\") {\n sum = (typeof sum === \"bigint\" ? sum : BigInt(sum)) + valueToAdd;\n }\n }\n let value = null;\n if (count > 0) {\n value = sum / (typeof sum === \"number\" ? count : BigInt(count));\n }\n const existingAggData = (_c = (_a = params.rowNode) == null ? void 0 : _a.aggData) == null ? void 0 : _c[(_b = params.column) == null ? void 0 : _b.getColId()];\n if (existingAggData && existingAggData.count === count && existingAggData.value === value) {\n return existingAggData;\n }\n return {\n count,\n value,\n // the grid by default uses toString to render values for an object, so this\n // is a trick to get the default cellRenderer to display the avg value\n toString: function() {\n return typeof this.value === \"number\" || typeof this.value === \"bigint\" ? this.value.toString() : \"\";\n },\n // used for sorting\n toNumber: function() {\n return this.value;\n }\n };\n}\nvar DropZoneColumnComp = class extends PillDragComp2 {\n constructor(column, dragSourceDropTarget, ghost, dropZonePurpose, horizontal) {\n super(\n dragSourceDropTarget,\n ghost,\n horizontal,\n /* html */\n `\n \n \n \n \n \n \n `\n );\n this.column = column;\n this.dropZonePurpose = dropZonePurpose;\n this.popupShowing = false;\n }\n init() {\n this.displayName = this.columnModel.getDisplayNameForColumn(this.column, \"columnDrop\");\n super.init();\n this.setupSort();\n this.addManagedListener(this.eventService, Column6.EVENT_SORT_CHANGED, () => {\n this.setupAria();\n });\n if (this.isGroupingZone()) {\n this.addManagedPropertyListener(\"groupLockGroupColumns\", () => {\n this.refreshRemove();\n this.refreshDraggable();\n this.setupAria();\n });\n }\n }\n getItem() {\n return this.column;\n }\n getDisplayName() {\n return this.displayName;\n }\n getTooltip() {\n return this.column.getColDef().headerTooltip;\n }\n addAdditionalAriaInstructions(ariaInstructions, translate) {\n const isSortSuppressed = this.gos.get(\"rowGroupPanelSuppressSort\");\n const isFunctionsReadOnly = this.gos.get(\"functionsReadOnly\");\n if (this.isAggregationZone() && !isFunctionsReadOnly) {\n const aggregationMenuAria = translate(\"ariaDropZoneColumnValueItemDescription\", \"Press ENTER to change the aggregation type\");\n ariaInstructions.push(aggregationMenuAria);\n }\n if (this.isGroupingZone() && this.column.isSortable() && !isSortSuppressed) {\n const sortProgressAria = translate(\"ariaDropZoneColumnGroupItemDescription\", \"Press ENTER to sort\");\n ariaInstructions.push(sortProgressAria);\n }\n super.addAdditionalAriaInstructions(ariaInstructions, translate);\n }\n isDraggable() {\n return this.isReadOnly();\n }\n isRemovable() {\n return this.isReadOnly();\n }\n isReadOnly() {\n return !this.isGroupingAndLocked() && !this.gos.get(\"functionsReadOnly\");\n }\n getAriaDisplayName() {\n const translate = this.localeService.getLocaleTextFunc();\n const { name, aggFuncName } = this.getColumnAndAggFuncName();\n const aggSeparator = translate(\"ariaDropZoneColumnComponentAggFuncSeparator\", \" of \");\n const sortDirection = {\n asc: translate(\"ariaDropZoneColumnComponentSortAscending\", \"ascending\"),\n desc: translate(\"ariaDropZoneColumnComponentSortDescending\", \"descending\")\n };\n const columnSort = this.column.getSort();\n const isSortSuppressed = this.gos.get(\"rowGroupPanelSuppressSort\");\n return [\n aggFuncName && `${aggFuncName}${aggSeparator}`,\n name,\n this.isGroupingZone() && !isSortSuppressed && columnSort && `, ${sortDirection[columnSort]}`\n ].filter((part) => !!part).join(\"\");\n }\n getColumnAndAggFuncName() {\n const name = this.displayName;\n let aggFuncName = \"\";\n if (this.isAggregationZone()) {\n const aggFunc = this.column.getAggFunc();\n const aggFuncString = typeof aggFunc === \"string\" ? aggFunc : \"agg\";\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n aggFuncName = localeTextFunc(aggFuncString, aggFuncString);\n }\n return { name, aggFuncName };\n }\n setupSort() {\n const canSort = this.column.isSortable();\n const isGroupingZone = this.isGroupingZone();\n if (!canSort || !isGroupingZone) {\n return;\n }\n if (!this.gos.get(\"rowGroupPanelSuppressSort\")) {\n this.eSortIndicator.setupSort(this.column, true);\n const performSort = (event) => {\n event.preventDefault();\n const sortUsingCtrl = this.gos.get(\"multiSortKey\") === \"ctrl\";\n const multiSort = sortUsingCtrl ? event.ctrlKey || event.metaKey : event.shiftKey;\n this.sortController.progressSort(this.column, multiSort, \"uiColumnSorted\");\n };\n this.addGuiEventListener(\"click\", performSort);\n this.addGuiEventListener(\"keydown\", (e) => {\n const isEnter = e.key === KeyCode6.ENTER;\n if (isEnter && this.isGroupingZone()) {\n performSort(e);\n }\n });\n }\n }\n getDefaultIconName() {\n return DragAndDropService5.ICON_HIDE;\n }\n createGetDragItem() {\n const { column } = this;\n return () => {\n const visibleState = {};\n visibleState[column.getId()] = column.isVisible();\n return {\n columns: [column],\n visibleState\n };\n };\n }\n setupComponents() {\n super.setupComponents();\n if (this.isAggregationZone() && !this.gos.get(\"functionsReadOnly\")) {\n this.addGuiEventListener(\"click\", this.onShowAggFuncSelection.bind(this));\n }\n }\n onKeyDown(e) {\n super.onKeyDown(e);\n const isEnter = e.key === KeyCode6.ENTER;\n if (isEnter && this.isAggregationZone() && !this.gos.get(\"functionsReadOnly\")) {\n e.preventDefault();\n this.onShowAggFuncSelection();\n }\n }\n getDisplayValue() {\n const { name, aggFuncName } = this.getColumnAndAggFuncName();\n return this.isAggregationZone() ? `${aggFuncName}(${name})` : name;\n }\n onShowAggFuncSelection() {\n if (this.popupShowing) {\n return;\n }\n this.popupShowing = true;\n const virtualList = new VirtualList({ cssIdentifier: \"select-agg-func\" });\n const rows = this.aggFuncService.getFuncNames(this.column);\n const eGui = this.getGui();\n const virtualListGui = virtualList.getGui();\n virtualList.setModel({\n getRow: function(index) {\n return rows[index];\n },\n getRowCount: function() {\n return rows.length;\n }\n });\n this.getContext().createBean(virtualList);\n const ePopup = _63.loadTemplate(\n /* html*/\n `
`\n );\n ePopup.style.top = \"0px\";\n ePopup.style.left = \"0px\";\n ePopup.appendChild(virtualListGui);\n ePopup.style.width = `${eGui.clientWidth}px`;\n const focusoutListener = this.addManagedListener(ePopup, \"focusout\", (e) => {\n if (!ePopup.contains(e.relatedTarget) && addPopupRes) {\n addPopupRes.hideFunc();\n }\n });\n const popupHiddenFunc = (callbackEvent) => {\n this.destroyBean(virtualList);\n this.popupShowing = false;\n if ((callbackEvent == null ? void 0 : callbackEvent.key) === \"Escape\") {\n eGui.focus();\n }\n if (focusoutListener) {\n focusoutListener();\n }\n };\n const translate = this.localeService.getLocaleTextFunc();\n const addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: ePopup,\n closeOnEsc: true,\n closedCallback: popupHiddenFunc,\n ariaLabel: translate(\"ariaLabelAggregationFunction\", \"Aggregation Function\")\n });\n if (addPopupRes) {\n virtualList.setComponentCreator(\n this.createAggSelect.bind(this, addPopupRes.hideFunc)\n );\n }\n virtualList.addGuiEventListener(\"keydown\", (e) => {\n if (e.key === KeyCode6.ENTER || e.key === KeyCode6.SPACE) {\n const row = virtualList.getLastFocusedRow();\n if (row == null) {\n return;\n }\n const comp = virtualList.getComponentAt(row);\n if (comp) {\n comp.selectItem();\n }\n }\n });\n this.popupService.positionPopupByComponent({\n type: \"aggFuncSelect\",\n eventSource: eGui,\n ePopup,\n keepWithinBounds: true,\n column: this.column,\n position: \"under\"\n });\n virtualList.refresh();\n let rowToFocus = rows.findIndex((r) => r === this.column.getAggFunc());\n if (rowToFocus === -1) {\n rowToFocus = 0;\n }\n virtualList.focusRow(rowToFocus);\n }\n createAggSelect(hidePopup, value) {\n const itemSelected = () => {\n hidePopup();\n if (this.gos.get(\"functionsPassive\")) {\n const event = {\n type: Events24.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,\n columns: [this.column],\n aggFunc: value\n };\n this.eventService.dispatchEvent(event);\n } else {\n this.columnModel.setColumnAggFunc(this.column, value, \"toolPanelDragAndDrop\");\n }\n };\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const aggFuncString = value.toString();\n const aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);\n const comp = new AggItemComp(itemSelected, aggFuncStringTranslated);\n return comp;\n }\n isGroupingAndLocked() {\n return this.isGroupingZone() && this.columnModel.isColumnGroupingLocked(this.column);\n }\n isAggregationZone() {\n return this.dropZonePurpose === \"aggregation\";\n }\n isGroupingZone() {\n return this.dropZonePurpose === \"rowGroup\";\n }\n getDragSourceType() {\n return DragSourceType4.ToolPanel;\n }\n destroy() {\n super.destroy();\n this.column = null;\n }\n};\n__decorateClass6([\n Autowired53(\"popupService\")\n], DropZoneColumnComp.prototype, \"popupService\", 2);\n__decorateClass6([\n Autowired53(\"sortController\")\n], DropZoneColumnComp.prototype, \"sortController\", 2);\n__decorateClass6([\n Autowired53(\"columnModel\")\n], DropZoneColumnComp.prototype, \"columnModel\", 2);\n__decorateClass6([\n Optional4(\"aggFuncService\")\n], DropZoneColumnComp.prototype, \"aggFuncService\", 2);\n__decorateClass6([\n RefSelector15(\"eSortIndicator\")\n], DropZoneColumnComp.prototype, \"eSortIndicator\", 2);\nvar AggItemComp = class extends Component43 {\n constructor(itemSelected, value) {\n super(\n /* html */\n `
`\n );\n this.selectItem = itemSelected;\n this.getGui().innerText = value;\n this.addGuiEventListener(\"click\", this.selectItem);\n }\n};\nvar BaseDropZonePanel = class extends PillDropZonePanel2 {\n constructor(horizontal, dropZonePurpose) {\n super(horizontal);\n this.dropZonePurpose = dropZonePurpose;\n }\n init(params) {\n super.init(params);\n this.addManagedListener(this.eventService, Events33.EVENT_NEW_COLUMNS_LOADED, this.refreshGui.bind(this));\n this.addManagedPropertyListeners([\"functionsReadOnly\", \"rowGroupPanelSuppressSort\", \"groupLockGroupColumns\"], this.refreshGui.bind(this));\n }\n getItems(dragItem) {\n var _a;\n return (_a = dragItem.columns) != null ? _a : [];\n }\n isInterestedIn(type) {\n return type === DragSourceType23.HeaderCell || type === DragSourceType23.ToolPanel;\n }\n minimumAllowedNewInsertIndex() {\n const numberOfLockedCols = this.gos.get(\"groupLockGroupColumns\");\n const numberOfGroupCols = this.columnModel.getRowGroupColumns().length;\n if (numberOfLockedCols === -1) {\n return numberOfGroupCols;\n }\n return Math.min(numberOfLockedCols, numberOfGroupCols);\n }\n showOrHideColumnOnExit(draggingEvent) {\n return this.isRowGroupPanel() && !this.gos.get(\"suppressRowGroupHidesColumns\") && !draggingEvent.fromNudge;\n }\n handleDragEnterEnd(draggingEvent) {\n const hideColumnOnExit = this.showOrHideColumnOnExit(draggingEvent);\n if (hideColumnOnExit) {\n const dragItem = draggingEvent.dragSource.getDragItem();\n const columns = dragItem.columns;\n this.setColumnsVisible(columns, false, \"uiColumnDragged\");\n }\n }\n handleDragLeaveEnd(draggingEvent) {\n const showColumnOnExit = this.showOrHideColumnOnExit(draggingEvent);\n if (showColumnOnExit) {\n const dragItem = draggingEvent.dragSource.getDragItem();\n this.setColumnsVisible(dragItem.columns, true, \"uiColumnDragged\");\n }\n }\n setColumnsVisible(columns, visible, source) {\n if (columns) {\n const allowedCols = columns.filter((c) => !c.getColDef().lockVisible);\n this.columnModel.setColumnsVisible(allowedCols, visible, source);\n }\n }\n isRowGroupPanel() {\n return this.dropZonePurpose === \"rowGroup\";\n }\n refreshOnDragStop() {\n return !this.gos.get(\"functionsPassive\");\n }\n createPillComponent(column, dropTarget, ghost, horizontal) {\n return new DropZoneColumnComp(column, dropTarget, ghost, this.dropZonePurpose, horizontal);\n }\n};\n__decorateClass6([\n Autowired63(\"columnModel\")\n], BaseDropZonePanel.prototype, \"columnModel\", 2);\nvar RowGroupDropZonePanel = class extends BaseDropZonePanel {\n constructor(horizontal) {\n super(horizontal, \"rowGroup\");\n }\n passBeansUp() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const emptyMessage = localeTextFunc(\"rowGroupColumnsEmptyMessage\", \"Drag here to set row groups\");\n const title = localeTextFunc(\"groups\", \"Row Groups\");\n super.init({\n icon: _83.createIconNoSpan(\"rowGroupPanel\", this.gos, null),\n emptyMessage,\n title\n });\n this.addManagedListener(this.eventService, Events43.EVENT_COLUMN_ROW_GROUP_CHANGED, this.refreshGui.bind(this));\n }\n getAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const label = translate(\"ariaRowGroupDropZonePanelLabel\", \"Row Groups\");\n return label;\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"rowGroupColumnsList\";\n return res;\n }\n isItemDroppable(column, draggingEvent) {\n if (this.gos.get(\"functionsReadOnly\") || !column.isPrimary()) {\n return false;\n }\n return column.isAllowRowGroup() && (!column.isRowGroupActive() || this.isSourceEventFromTarget(draggingEvent));\n }\n updateItems(columns) {\n if (this.gos.get(\"functionsPassive\")) {\n const event = {\n type: Events43.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,\n columns\n };\n this.eventService.dispatchEvent(event);\n } else {\n this.columnModel.setRowGroupColumns(columns, \"toolPanelUi\");\n }\n }\n getIconName() {\n return this.isPotentialDndItems() ? DragAndDropService22.ICON_GROUP : DragAndDropService22.ICON_NOT_ALLOWED;\n }\n getExistingItems() {\n return this.columnModel.getRowGroupColumns();\n }\n};\n__decorateClass6([\n PostConstruct310\n], RowGroupDropZonePanel.prototype, \"passBeansUp\", 1);\nvar PivotDropZonePanel = class extends BaseDropZonePanel {\n constructor(horizontal) {\n super(horizontal, \"pivot\");\n }\n passBeansUp() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const emptyMessage = localeTextFunc(\"pivotColumnsEmptyMessage\", \"Drag here to set column labels\");\n const title = localeTextFunc(\"pivots\", \"Column Labels\");\n super.init({\n icon: _93.createIconNoSpan(\"pivotPanel\", this.gos, null),\n emptyMessage,\n title\n });\n this.addManagedListener(this.eventService, Events53.EVENT_NEW_COLUMNS_LOADED, this.refresh.bind(this));\n this.addManagedListener(this.eventService, Events53.EVENT_COLUMN_PIVOT_CHANGED, this.refresh.bind(this));\n this.addManagedListener(this.eventService, Events53.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.checkVisibility.bind(this));\n this.refresh();\n }\n getAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const label = translate(\"ariaPivotDropZonePanelLabel\", \"Column Labels\");\n return label;\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"pivotColumnsList\";\n return res;\n }\n refresh() {\n this.checkVisibility();\n this.refreshGui();\n }\n checkVisibility() {\n const pivotMode = this.columnModel.isPivotMode();\n if (this.isHorizontal()) {\n switch (this.gos.get(\"pivotPanelShow\")) {\n case \"always\":\n this.setDisplayed(pivotMode);\n break;\n case \"onlyWhenPivoting\":\n const pivotActive = this.columnModel.isPivotActive();\n this.setDisplayed(pivotMode && pivotActive);\n break;\n default:\n this.setDisplayed(false);\n break;\n }\n } else {\n this.setDisplayed(pivotMode);\n }\n }\n isItemDroppable(column, draggingEvent) {\n if (this.gos.get(\"functionsReadOnly\") || !column.isPrimary()) {\n return false;\n }\n return column.isAllowPivot() && (!column.isPivotActive() || this.isSourceEventFromTarget(draggingEvent));\n }\n updateItems(columns) {\n if (this.gos.get(\"functionsPassive\")) {\n const event = {\n type: Events53.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,\n columns\n };\n this.eventService.dispatchEvent(event);\n } else {\n this.columnModel.setPivotColumns(columns, \"toolPanelUi\");\n }\n }\n getIconName() {\n return this.isPotentialDndItems() ? DragAndDropService32.ICON_PIVOT : DragAndDropService32.ICON_NOT_ALLOWED;\n }\n getExistingItems() {\n return this.columnModel.getPivotColumns();\n }\n};\n__decorateClass6([\n PostConstruct410\n], PivotDropZonePanel.prototype, \"passBeansUp\", 1);\nvar GridHeaderDropZones = class extends Component27 {\n constructor() {\n super();\n }\n postConstruct() {\n this.setGui(this.createNorthPanel());\n this.addManagedListener(this.eventService, Events63.EVENT_COLUMN_ROW_GROUP_CHANGED, () => this.onRowGroupChanged());\n this.addManagedListener(this.eventService, Events63.EVENT_NEW_COLUMNS_LOADED, () => this.onRowGroupChanged());\n this.addManagedPropertyListener(\"rowGroupPanelShow\", () => this.onRowGroupChanged());\n this.addManagedPropertyListener(\"pivotPanelShow\", () => this.onPivotPanelShow());\n this.onRowGroupChanged();\n }\n createNorthPanel() {\n const topPanelGui = document.createElement(\"div\");\n topPanelGui.classList.add(\"ag-column-drop-wrapper\");\n _103.setAriaRole(topPanelGui, \"presentation\");\n this.rowGroupComp = new RowGroupDropZonePanel(true);\n this.createManagedBean(this.rowGroupComp);\n this.pivotComp = new PivotDropZonePanel(true);\n this.createManagedBean(this.pivotComp);\n topPanelGui.appendChild(this.rowGroupComp.getGui());\n topPanelGui.appendChild(this.pivotComp.getGui());\n this.addManagedListener(this.rowGroupComp, Component27.EVENT_DISPLAYED_CHANGED, () => this.onDropPanelVisible());\n this.addManagedListener(this.pivotComp, Component27.EVENT_DISPLAYED_CHANGED, () => this.onDropPanelVisible());\n this.onDropPanelVisible();\n return topPanelGui;\n }\n onDropPanelVisible() {\n const bothDisplayed = this.rowGroupComp.isDisplayed() && this.pivotComp.isDisplayed();\n this.rowGroupComp.addOrRemoveCssClass(\"ag-column-drop-horizontal-half-width\", bothDisplayed);\n this.pivotComp.addOrRemoveCssClass(\"ag-column-drop-horizontal-half-width\", bothDisplayed);\n }\n onRowGroupChanged() {\n if (!this.rowGroupComp) {\n return;\n }\n const rowGroupPanelShow = this.gos.get(\"rowGroupPanelShow\");\n if (rowGroupPanelShow === \"always\") {\n this.rowGroupComp.setDisplayed(true);\n } else if (rowGroupPanelShow === \"onlyWhenGrouping\") {\n const grouping = !this.columnModel.isRowGroupEmpty();\n this.rowGroupComp.setDisplayed(grouping);\n } else {\n this.rowGroupComp.setDisplayed(false);\n }\n }\n onPivotPanelShow() {\n if (!this.pivotComp) {\n return;\n }\n const pivotPanelShow = this.gos.get(\"pivotPanelShow\");\n if (pivotPanelShow === \"always\") {\n this.pivotComp.setDisplayed(true);\n } else if (pivotPanelShow === \"onlyWhenPivoting\") {\n const pivoting = this.columnModel.isPivotActive();\n this.pivotComp.setDisplayed(pivoting);\n } else {\n this.pivotComp.setDisplayed(false);\n }\n }\n};\n__decorateClass6([\n Autowired73(\"columnModel\")\n], GridHeaderDropZones.prototype, \"columnModel\", 2);\n__decorateClass6([\n PostConstruct53\n], GridHeaderDropZones.prototype, \"postConstruct\", 1);\nvar FilterAggregatesStage = class extends BeanStub63 {\n execute(params) {\n const isPivotMode = this.columnModel.isPivotMode();\n const isAggFilterActive = this.filterManager.isAggregateFilterPresent() || this.filterManager.isAggregateQuickFilterPresent();\n const defaultPrimaryColumnPredicate = (params2) => !params2.node.group;\n const defaultSecondaryColumnPredicate = (params2) => params2.node.leafGroup;\n const applyFilterToNode = this.gos.getGroupAggFiltering() || (isPivotMode ? defaultSecondaryColumnPredicate : defaultPrimaryColumnPredicate);\n const { changedPath } = params;\n const preserveChildren = (node, recursive = false) => {\n if (node.childrenAfterFilter) {\n node.childrenAfterAggFilter = node.childrenAfterFilter;\n if (recursive) {\n node.childrenAfterAggFilter.forEach((child) => preserveChildren(child, recursive));\n }\n this.setAllChildrenCount(node);\n }\n if (node.sibling) {\n node.sibling.childrenAfterAggFilter = node.childrenAfterAggFilter;\n }\n };\n const filterChildren = (node) => {\n var _a;\n node.childrenAfterAggFilter = ((_a = node.childrenAfterFilter) == null ? void 0 : _a.filter((child) => {\n var _a2;\n const shouldFilterRow = applyFilterToNode({ node: child });\n if (shouldFilterRow) {\n const doesNodePassFilter = this.filterManager.doesRowPassAggregateFilters({ rowNode: child });\n if (doesNodePassFilter) {\n preserveChildren(child, true);\n return true;\n }\n }\n const hasChildPassed = (_a2 = child.childrenAfterAggFilter) == null ? void 0 : _a2.length;\n return hasChildPassed;\n })) || null;\n this.setAllChildrenCount(node);\n if (node.sibling) {\n node.sibling.childrenAfterAggFilter = node.childrenAfterAggFilter;\n }\n };\n changedPath.forEachChangedNodeDepthFirst(\n isAggFilterActive ? filterChildren : preserveChildren,\n true\n );\n }\n setAllChildrenCountTreeData(rowNode) {\n let allChildrenCount = 0;\n rowNode.childrenAfterAggFilter.forEach((child) => {\n allChildrenCount++;\n allChildrenCount += child.allChildrenCount;\n });\n rowNode.setAllChildrenCount(allChildrenCount);\n }\n setAllChildrenCountGridGrouping(rowNode) {\n let allChildrenCount = 0;\n rowNode.childrenAfterAggFilter.forEach((child) => {\n if (child.group) {\n allChildrenCount += child.allChildrenCount;\n } else {\n allChildrenCount++;\n }\n });\n rowNode.setAllChildrenCount(allChildrenCount);\n }\n setAllChildrenCount(rowNode) {\n if (!rowNode.hasChildren()) {\n rowNode.setAllChildrenCount(null);\n return;\n }\n if (this.gos.get(\"treeData\")) {\n this.setAllChildrenCountTreeData(rowNode);\n } else {\n this.setAllChildrenCountGridGrouping(rowNode);\n }\n }\n};\n__decorateClass6([\n Autowired83(\"filterManager\")\n], FilterAggregatesStage.prototype, \"filterManager\", 2);\n__decorateClass6([\n Autowired83(\"columnModel\")\n], FilterAggregatesStage.prototype, \"columnModel\", 2);\nFilterAggregatesStage = __decorateClass6([\n Bean62(\"filterAggregatesStage\")\n], FilterAggregatesStage);\nvar VERSION6 = \"31.3.2\";\nvar _GroupFilter = class _GroupFilter2 extends TabGuardComp3 {\n constructor() {\n super(\n /* html */\n `\n
\n
\n
\n
\n `\n );\n }\n postConstruct() {\n this.initialiseTabGuard({});\n }\n init(params) {\n this.params = params;\n this.validateParams();\n return this.updateGroups().then(() => {\n this.addManagedListener(this.eventService, Events73.EVENT_COLUMN_ROW_GROUP_CHANGED, () => this.onColumnRowGroupChanged());\n });\n }\n validateParams() {\n const { colDef } = this.params;\n if (colDef.field) {\n _113.warnOnce('Group Column Filter does not work with the colDef property \"field\". This property will be ignored.');\n }\n if (colDef.filterValueGetter) {\n _113.warnOnce('Group Column Filter does not work with the colDef property \"filterValueGetter\". This property will be ignored.');\n }\n if (colDef.filterParams) {\n _113.warnOnce('Group Column Filter does not work with the colDef property \"filterParams\". This property will be ignored.');\n }\n }\n updateGroups() {\n const sourceColumns = this.updateGroupField();\n return this.getUnderlyingFilters(sourceColumns);\n }\n getSourceColumns() {\n this.groupColumn = this.params.column;\n if (this.gos.get(\"treeData\")) {\n _113.warnOnce(\"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.\");\n return [];\n }\n const sourceColumns = this.columnModel.getSourceColumnsForGroupColumn(this.groupColumn);\n if (!sourceColumns) {\n _113.warnOnce(\"Group Column Filter only works on group columns. Please use a different filter.\");\n return [];\n }\n return sourceColumns;\n }\n updateGroupField() {\n _113.clearElement(this.eGroupField);\n if (this.eGroupFieldSelect) {\n this.destroyBean(this.eGroupFieldSelect);\n }\n const allSourceColumns = this.getSourceColumns();\n const sourceColumns = allSourceColumns.filter((sourceColumn) => sourceColumn.isFilterAllowed());\n if (!sourceColumns.length) {\n this.selectedColumn = void 0;\n _113.setDisplayed(this.eGroupField, false);\n return null;\n }\n if (allSourceColumns.length === 1) {\n this.selectedColumn = sourceColumns[0];\n _113.setDisplayed(this.eGroupField, false);\n } else {\n if (!this.selectedColumn || !sourceColumns.some((column) => column.getId() === this.selectedColumn.getId())) {\n this.selectedColumn = sourceColumns[0];\n }\n this.createGroupFieldSelectElement(sourceColumns);\n this.eGroupField.appendChild(this.eGroupFieldSelect.getGui());\n this.eGroupField.appendChild(_113.loadTemplate(\n /* html */\n `
`\n ));\n _113.setDisplayed(this.eGroupField, true);\n }\n return sourceColumns;\n }\n createGroupFieldSelectElement(sourceColumns) {\n this.eGroupFieldSelect = this.createManagedBean(new AgSelect5());\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n this.eGroupFieldSelect.setLabel(localeTextFunc(\"groupFilterSelect\", \"Select field:\"));\n this.eGroupFieldSelect.setLabelAlignment(\"top\");\n this.eGroupFieldSelect.addOptions(sourceColumns.map((sourceColumn) => {\n var _a;\n return {\n value: sourceColumn.getId(),\n text: (_a = this.columnModel.getDisplayNameForColumn(sourceColumn, \"groupFilter\", false)) != null ? _a : void 0\n };\n }));\n this.eGroupFieldSelect.setValue(this.selectedColumn.getId());\n this.eGroupFieldSelect.onValueChange((newValue) => this.updateSelectedColumn(newValue));\n this.eGroupFieldSelect.addCssClass(\"ag-group-filter-field-select-wrapper\");\n if (sourceColumns.length === 1) {\n this.eGroupFieldSelect.setDisabled(true);\n }\n }\n getUnderlyingFilters(sourceColumns) {\n if (!sourceColumns) {\n this.filterColumnPairs = void 0;\n this.selectedFilter = void 0;\n this.groupColumn.setFilterActive(false, \"columnRowGroupChanged\");\n return AgPromise3.resolve();\n }\n const filterPromises = [];\n const filterColumnPairs = [];\n sourceColumns.forEach((column) => {\n const filterWrapper = this.filterManager.getOrCreateFilterWrapper(column, \"COLUMN_MENU\");\n if (filterWrapper == null ? void 0 : filterWrapper.filterPromise) {\n filterPromises.push(filterWrapper.filterPromise.then((filter) => {\n if (filter) {\n filterColumnPairs.push({\n filter,\n column\n });\n }\n if (column.getId() === this.selectedColumn.getId()) {\n this.selectedFilter = filter != null ? filter : void 0;\n }\n return filter;\n }));\n }\n });\n return AgPromise3.all(filterPromises).then(() => {\n this.filterColumnPairs = filterColumnPairs;\n this.groupColumn.setFilterActive(this.isFilterActive(), \"columnRowGroupChanged\");\n });\n }\n addUnderlyingFilterElement() {\n var _a, _b;\n _113.clearElement(this.eUnderlyingFilter);\n if (!this.selectedColumn) {\n return AgPromise3.resolve();\n }\n const comp = this.createManagedBean(new FilterWrapperComp(this.selectedColumn, \"COLUMN_MENU\"));\n this.filterWrapperComp = comp;\n if (!comp.hasFilter()) {\n return AgPromise3.resolve();\n }\n this.eUnderlyingFilter.appendChild(comp.getGui());\n return (_b = (_a = comp.getFilter()) == null ? void 0 : _a.then(() => {\n var _a2, _b2;\n (_a2 = comp.afterGuiAttached) == null ? void 0 : _a2.call(comp, this.afterGuiAttachedParams);\n if (!((_b2 = this.afterGuiAttachedParams) == null ? void 0 : _b2.suppressFocus) && this.eGroupFieldSelect && !this.eGroupFieldSelect.isDisabled()) {\n this.eGroupFieldSelect.getFocusableElement().focus();\n }\n })) != null ? _b : AgPromise3.resolve();\n }\n updateSelectedColumn(columnId) {\n var _a;\n if (!columnId) {\n return;\n }\n (_a = this.filterWrapperComp) == null ? void 0 : _a.afterGuiDetached();\n this.destroyBean(this.filterWrapperComp);\n const selectedFilterColumnPair = this.getFilterColumnPair(columnId);\n this.selectedColumn = selectedFilterColumnPair == null ? void 0 : selectedFilterColumnPair.column;\n this.selectedFilter = selectedFilterColumnPair == null ? void 0 : selectedFilterColumnPair.filter;\n this.dispatchEvent({\n type: _GroupFilter2.EVENT_SELECTED_COLUMN_CHANGED\n });\n this.addUnderlyingFilterElement();\n }\n isFilterActive() {\n var _a;\n return !!((_a = this.filterColumnPairs) == null ? void 0 : _a.some(({ filter }) => filter.isFilterActive()));\n }\n doesFilterPass() {\n return true;\n }\n getModel() {\n return null;\n }\n setModel() {\n return AgPromise3.resolve();\n }\n afterGuiAttached(params) {\n this.afterGuiAttachedParams = params;\n this.addUnderlyingFilterElement();\n }\n afterGuiDetached() {\n var _a, _b;\n _113.clearElement(this.eUnderlyingFilter);\n (_b = (_a = this.selectedFilter) == null ? void 0 : _a.afterGuiDetached) == null ? void 0 : _b.call(_a);\n }\n onColumnRowGroupChanged() {\n this.updateGroups().then(() => {\n this.dispatchEvent({\n type: _GroupFilter2.EVENT_COLUMN_ROW_GROUP_CHANGED\n });\n this.eventService.dispatchEvent({\n type: \"filterAllowedUpdated\"\n });\n });\n }\n getFilterColumnPair(columnId) {\n var _a;\n if (!columnId) {\n return void 0;\n }\n return (_a = this.filterColumnPairs) == null ? void 0 : _a.find(({ column }) => column.getId() === columnId);\n }\n getSelectedFilter() {\n return this.selectedFilter;\n }\n getSelectedColumn() {\n return this.selectedColumn;\n }\n isFilterAllowed() {\n return !!this.selectedColumn;\n }\n destroy() {\n super.destroy();\n }\n};\n_GroupFilter.EVENT_COLUMN_ROW_GROUP_CHANGED = \"columnRowGroupChanged\";\n_GroupFilter.EVENT_SELECTED_COLUMN_CHANGED = \"selectedColumnChanged\";\n__decorateClass6([\n Autowired93(\"filterManager\")\n], _GroupFilter.prototype, \"filterManager\", 2);\n__decorateClass6([\n Autowired93(\"columnModel\")\n], _GroupFilter.prototype, \"columnModel\", 2);\n__decorateClass6([\n RefSelector23(\"eGroupField\")\n], _GroupFilter.prototype, \"eGroupField\", 2);\n__decorateClass6([\n RefSelector23(\"eUnderlyingFilter\")\n], _GroupFilter.prototype, \"eUnderlyingFilter\", 2);\n__decorateClass6([\n PostConstruct63\n], _GroupFilter.prototype, \"postConstruct\", 1);\nvar GroupFilter = _GroupFilter;\nvar GroupFloatingFilterComp = class extends Component310 {\n constructor() {\n super(\n /* html */\n `\n
\n `\n );\n this.haveAddedColumnListeners = false;\n }\n init(params) {\n this.params = params;\n const canShowUnderlyingFloatingFilter = this.gos.get(\"groupDisplayType\") === \"multipleColumns\";\n return new AgPromise22((resolve) => {\n this.params.parentFilterInstance((parentFilterInstance) => {\n this.parentFilterInstance = parentFilterInstance;\n if (canShowUnderlyingFloatingFilter) {\n this.setupUnderlyingFloatingFilterElement().then(() => resolve());\n } else {\n this.setupReadOnlyFloatingFilterElement();\n resolve();\n }\n });\n }).then(() => {\n this.addManagedListener(this.parentFilterInstance, GroupFilter.EVENT_SELECTED_COLUMN_CHANGED, () => this.onSelectedColumnChanged());\n this.addManagedListener(this.parentFilterInstance, GroupFilter.EVENT_COLUMN_ROW_GROUP_CHANGED, () => this.onColumnRowGroupChanged());\n });\n }\n onParamsUpdated(params) {\n this.refresh(params);\n }\n refresh(params) {\n this.params = params;\n this.setParams();\n }\n setParams() {\n var _a;\n const displayName = this.columnModel.getDisplayNameForColumn(this.params.column, \"header\", true);\n const translate = this.localeService.getLocaleTextFunc();\n (_a = this.eFloatingFilterText) == null ? void 0 : _a.setInputAriaLabel(`${displayName} ${translate(\"ariaFilterInput\", \"Filter Input\")}`);\n }\n setupReadOnlyFloatingFilterElement() {\n if (!this.eFloatingFilterText) {\n this.eFloatingFilterText = this.createManagedBean(new AgInputTextField2());\n this.eFloatingFilterText.setDisabled(true).addGuiEventListener(\"click\", () => this.params.showParentFilter());\n this.setParams();\n }\n this.updateDisplayedValue();\n this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui());\n }\n setupUnderlyingFloatingFilterElement() {\n this.showingUnderlyingFloatingFilter = false;\n this.underlyingFloatingFilter = void 0;\n _123.clearElement(this.eFloatingFilter);\n const column = this.parentFilterInstance.getSelectedColumn();\n if (column && !column.isVisible()) {\n const compDetails = this.filterManager.getFloatingFilterCompDetails(column, this.params.showParentFilter);\n if (compDetails) {\n this.compDetails = compDetails;\n if (!this.haveAddedColumnListeners) {\n this.haveAddedColumnListeners = true;\n this.addManagedListener(column, Column11.EVENT_VISIBLE_CHANGED, this.onColumnVisibleChanged.bind(this));\n this.addManagedListener(column, Column11.EVENT_COL_DEF_CHANGED, this.onColDefChanged.bind(this));\n }\n return compDetails.newAgStackInstance().then((floatingFilter) => {\n var _a, _b;\n this.underlyingFloatingFilter = floatingFilter;\n (_b = this.underlyingFloatingFilter) == null ? void 0 : _b.onParentModelChanged((_a = this.parentFilterInstance.getSelectedFilter()) == null ? void 0 : _a.getModel());\n this.appendChild(floatingFilter.getGui());\n this.showingUnderlyingFloatingFilter = true;\n });\n }\n }\n this.setupReadOnlyFloatingFilterElement();\n return AgPromise22.resolve();\n }\n onColumnVisibleChanged() {\n this.setupUnderlyingFloatingFilterElement();\n }\n onColDefChanged(event) {\n var _a, _b, _c;\n if (!event.column) {\n return;\n }\n const compDetails = this.filterManager.getFloatingFilterCompDetails(event.column, this.params.showParentFilter);\n if (compDetails) {\n if ((_a = this.underlyingFloatingFilter) == null ? void 0 : _a.refresh) {\n this.underlyingFloatingFilter.refresh(compDetails.params);\n } else {\n (_c = (_b = this.underlyingFloatingFilter) == null ? void 0 : _b.onParamsUpdated) == null ? void 0 : _c.call(_b, compDetails.params);\n }\n }\n }\n onParentModelChanged(_model, event) {\n var _a, _b;\n if (this.showingUnderlyingFloatingFilter) {\n (_b = this.underlyingFloatingFilter) == null ? void 0 : _b.onParentModelChanged((_a = this.parentFilterInstance.getSelectedFilter()) == null ? void 0 : _a.getModel(), event);\n } else {\n this.updateDisplayedValue();\n }\n }\n updateDisplayedValue() {\n if (!this.parentFilterInstance || !this.eFloatingFilterText) {\n return;\n }\n const selectedFilter = this.parentFilterInstance.getSelectedFilter();\n if (!selectedFilter) {\n this.eFloatingFilterText.setValue(\"\");\n this.eFloatingFilterText.setDisplayed(false);\n return;\n }\n this.eFloatingFilterText.setDisplayed(true);\n if (selectedFilter.getModelAsString) {\n const filterModel = selectedFilter.getModel();\n this.eFloatingFilterText.setValue(filterModel == null ? \"\" : selectedFilter.getModelAsString(filterModel));\n } else {\n this.eFloatingFilterText.setValue(\"\");\n }\n }\n onSelectedColumnChanged() {\n if (!this.showingUnderlyingFloatingFilter) {\n this.updateDisplayedValue();\n }\n }\n onColumnRowGroupChanged() {\n if (!this.showingUnderlyingFloatingFilter) {\n this.updateDisplayedValue();\n }\n }\n destroy() {\n super.destroy();\n }\n};\n__decorateClass6([\n Autowired103(\"columnModel\")\n], GroupFloatingFilterComp.prototype, \"columnModel\", 2);\n__decorateClass6([\n Autowired103(\"filterManager\")\n], GroupFloatingFilterComp.prototype, \"filterManager\", 2);\n__decorateClass6([\n RefSelector34(\"eFloatingFilter\")\n], GroupFloatingFilterComp.prototype, \"eFloatingFilter\", 2);\nvar RowGroupingModule = {\n version: VERSION6,\n moduleName: ModuleNames6.RowGroupingModule,\n beans: [AggregationStage, FilterAggregatesStage, GroupStage, PivotColDefService, PivotStage, AggFuncService],\n agStackComponents: [\n { componentName: \"AgGridHeaderDropZones\", componentClass: GridHeaderDropZones }\n ],\n userComponents: [\n { componentName: \"agGroupColumnFilter\", componentClass: GroupFilter },\n { componentName: \"agGroupColumnFloatingFilter\", componentClass: GroupFloatingFilterComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\nvar ValuesDropZonePanel = class extends BaseDropZonePanel {\n constructor(horizontal) {\n super(horizontal, \"aggregation\");\n }\n passBeansUp() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const emptyMessage = localeTextFunc(\"valueColumnsEmptyMessage\", \"Drag here to aggregate\");\n const title = localeTextFunc(\"values\", \"Values\");\n super.init({\n icon: _132.createIconNoSpan(\"valuePanel\", this.gos, null),\n emptyMessage,\n title\n });\n this.addManagedListener(this.eventService, Events82.EVENT_COLUMN_VALUE_CHANGED, this.refreshGui.bind(this));\n }\n getAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const label = translate(\"ariaValuesDropZonePanelLabel\", \"Values\");\n return label;\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"valueColumnsList\";\n return res;\n }\n getIconName() {\n return this.isPotentialDndItems() ? DragAndDropService42.ICON_AGGREGATE : DragAndDropService42.ICON_NOT_ALLOWED;\n }\n isItemDroppable(column, draggingEvent) {\n if (this.gos.get(\"functionsReadOnly\") || !column.isPrimary()) {\n return false;\n }\n return column.isAllowValue() && (!column.isValueActive() || this.isSourceEventFromTarget(draggingEvent));\n }\n updateItems(columns) {\n if (this.gos.get(\"functionsPassive\")) {\n const event = {\n type: Events82.EVENT_COLUMN_VALUE_CHANGE_REQUEST,\n columns\n };\n this.eventService.dispatchEvent(event);\n } else {\n this.columnModel.setValueColumns(columns, \"toolPanelUi\");\n }\n }\n getExistingItems() {\n return this.columnModel.getValueColumns();\n }\n};\n__decorateClass6([\n PostConstruct73\n], ValuesDropZonePanel.prototype, \"passBeansUp\", 1);\n\n// enterprise-modules/column-tool-panel/dist/package/main.esm.mjs\nimport {\n Component as Component73,\n RefSelector as RefSelector53,\n PositionableFeature\n} from \"ag-grid-community\";\n\n// enterprise-modules/side-bar/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames23 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired51,\n Component as Component44,\n PostConstruct as PostConstruct54,\n Events as Events13\n} from \"ag-grid-community\";\nimport {\n _ as _38,\n Component as Component53,\n Events as Events25,\n ModuleNames as ModuleNames7,\n ModuleRegistry as ModuleRegistry2,\n PostConstruct as PostConstruct55,\n RefSelector as RefSelector24,\n Autowired as Autowired411,\n ManagedFocusFeature,\n KeyCode as KeyCode22\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired211,\n Component as Component311,\n PostConstruct as PostConstruct311,\n PreDestroy as PreDestroy2,\n _ as _210,\n KeyCode as KeyCode7\n} from \"ag-grid-community\";\nimport {\n Component as Component210,\n PostConstruct as PostConstruct211,\n RefSelector as RefSelector16,\n _ as _31\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired311,\n Component as Component45,\n PostConstruct as PostConstruct411\n} from \"ag-grid-community\";\nimport {\n _ as _45,\n Autowired as Autowired54,\n Bean as Bean10,\n BeanStub as BeanStub17,\n ProvidedColumnGroup\n} from \"ag-grid-community\";\nimport { Bean as Bean26, BeanStub as BeanStub26 } from \"ag-grid-community\";\nvar __defProp7 = Object.defineProperty;\nvar __defProps5 = Object.defineProperties;\nvar __getOwnPropDesc7 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp5 = (obj, key, value) => key in obj ? __defProp7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp6.call(b, prop))\n __defNormalProp5(a, prop, b[prop]);\n if (__getOwnPropSymbols5)\n for (var prop of __getOwnPropSymbols5(b)) {\n if (__propIsEnum5.call(b, prop))\n __defNormalProp5(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps5 = (a, b) => __defProps5(a, __getOwnPropDescs5(b));\nvar __decorateClass7 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc7(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp7(target, key, result);\n return result;\n};\nvar HorizontalResizeComp = class extends Component44 {\n constructor() {\n super(\n /* html */\n `
`\n );\n this.minWidth = 100;\n this.maxWidth = null;\n }\n setElementToResize(elementToResize) {\n this.elementToResize = elementToResize;\n }\n postConstruct() {\n const finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({\n eResizeBar: this.getGui(),\n dragStartPixels: 1,\n onResizeStart: this.onResizeStart.bind(this),\n onResizing: this.onResizing.bind(this),\n onResizeEnd: this.onResizeEnd.bind(this)\n });\n this.addDestroyFunc(finishedWithResizeFunc);\n this.setInverted(this.gos.get(\"enableRtl\"));\n }\n dispatchResizeEvent(start, end, width) {\n const event = {\n type: Events13.EVENT_TOOL_PANEL_SIZE_CHANGED,\n width,\n started: start,\n ended: end\n };\n this.eventService.dispatchEvent(event);\n }\n onResizeStart() {\n this.startingWidth = this.elementToResize.offsetWidth;\n this.dispatchResizeEvent(true, false, this.startingWidth);\n }\n onResizeEnd(delta) {\n return this.onResizing(delta, true);\n }\n onResizing(delta, isEnd = false) {\n const direction = this.inverted ? -1 : 1;\n let newWidth = Math.max(this.minWidth, Math.floor(this.startingWidth - delta * direction));\n if (this.maxWidth != null) {\n newWidth = Math.min(this.maxWidth, newWidth);\n }\n this.elementToResize.style.width = `${newWidth}px`;\n this.dispatchResizeEvent(false, isEnd, newWidth);\n }\n setInverted(inverted) {\n this.inverted = inverted;\n }\n setMaxWidth(value) {\n this.maxWidth = value;\n }\n setMinWidth(value) {\n if (value != null) {\n this.minWidth = value;\n } else {\n this.minWidth = 100;\n }\n }\n};\n__decorateClass7([\n Autowired51(\"horizontalResizeService\")\n], HorizontalResizeComp.prototype, \"horizontalResizeService\", 2);\n__decorateClass7([\n PostConstruct54\n], HorizontalResizeComp.prototype, \"postConstruct\", 1);\nvar _SideBarButtonComp = class _SideBarButtonComp2 extends Component210 {\n constructor(toolPanelDef) {\n super();\n this.toolPanelDef = toolPanelDef;\n }\n getToolPanelId() {\n return this.toolPanelDef.id;\n }\n postConstruct() {\n const template = this.createTemplate();\n this.setTemplate(template);\n this.setLabel();\n this.setIcon();\n this.addManagedListener(this.eToggleButton, \"click\", this.onButtonPressed.bind(this));\n this.eToggleButton.setAttribute(\"id\", `ag-${this.getCompId()}-button`);\n }\n createTemplate() {\n const res = (\n /* html */\n `
\n \n
`\n );\n return res;\n }\n setLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const def = this.toolPanelDef;\n const label = translate(def.labelKey, def.labelDefault);\n this.eLabel.innerText = label;\n }\n setIcon() {\n this.eIconWrapper.insertAdjacentElement(\"afterbegin\", _31.createIconNoSpan(this.toolPanelDef.iconKey, this.gos));\n }\n onButtonPressed() {\n this.dispatchEvent({ type: _SideBarButtonComp2.EVENT_TOGGLE_BUTTON_CLICKED });\n }\n setSelected(selected) {\n this.addOrRemoveCssClass(\"ag-selected\", selected);\n _31.setAriaExpanded(this.eToggleButton, selected);\n }\n getButtonElement() {\n return this.eToggleButton;\n }\n};\n_SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED = \"toggleButtonClicked\";\n__decorateClass7([\n RefSelector16(\"eToggleButton\")\n], _SideBarButtonComp.prototype, \"eToggleButton\", 2);\n__decorateClass7([\n RefSelector16(\"eIconWrapper\")\n], _SideBarButtonComp.prototype, \"eIconWrapper\", 2);\n__decorateClass7([\n RefSelector16(\"eLabel\")\n], _SideBarButtonComp.prototype, \"eLabel\", 2);\n__decorateClass7([\n PostConstruct211\n], _SideBarButtonComp.prototype, \"postConstruct\", 1);\nvar SideBarButtonComp = _SideBarButtonComp;\nvar _SideBarButtonsComp = class _SideBarButtonsComp2 extends Component311 {\n constructor() {\n super(_SideBarButtonsComp2.TEMPLATE);\n this.buttonComps = [];\n }\n postConstruct() {\n this.addManagedListener(this.getFocusableElement(), \"keydown\", this.handleKeyDown.bind(this));\n }\n handleKeyDown(e) {\n if (e.key !== KeyCode7.TAB || !e.shiftKey) {\n return;\n }\n const lastColumn = _210.last(this.columnModel.getAllDisplayedColumns());\n if (this.focusService.focusGridView(lastColumn, true)) {\n e.preventDefault();\n }\n }\n setActiveButton(id) {\n this.buttonComps.forEach((comp) => {\n comp.setSelected(id === comp.getToolPanelId());\n });\n }\n addButtonComp(def) {\n const buttonComp = this.createBean(new SideBarButtonComp(def));\n this.buttonComps.push(buttonComp);\n this.appendChild(buttonComp);\n buttonComp.addEventListener(SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED, () => {\n this.dispatchEvent({\n type: _SideBarButtonsComp2.EVENT_SIDE_BAR_BUTTON_CLICKED,\n toolPanelId: def.id\n });\n });\n return buttonComp;\n }\n clearButtons() {\n this.buttonComps = this.destroyBeans(this.buttonComps);\n _210.clearElement(this.getGui());\n }\n};\n_SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED = \"sideBarButtonClicked\";\n_SideBarButtonsComp.TEMPLATE = /* html */\n`
`;\n__decorateClass7([\n Autowired211(\"focusService\")\n], _SideBarButtonsComp.prototype, \"focusService\", 2);\n__decorateClass7([\n Autowired211(\"columnModel\")\n], _SideBarButtonsComp.prototype, \"columnModel\", 2);\n__decorateClass7([\n PostConstruct311\n], _SideBarButtonsComp.prototype, \"postConstruct\", 1);\n__decorateClass7([\n PreDestroy2\n], _SideBarButtonsComp.prototype, \"clearButtons\", 1);\nvar SideBarButtonsComp = _SideBarButtonsComp;\nvar _SideBarDefParser = class _SideBarDefParser2 {\n static parse(toParse) {\n if (!toParse) {\n return void 0;\n }\n if (toParse === true) {\n return {\n toolPanels: [\n _SideBarDefParser2.DEFAULT_COLUMN_COMP,\n _SideBarDefParser2.DEFAULT_FILTER_COMP\n ],\n defaultToolPanel: \"columns\"\n };\n }\n if (typeof toParse === \"string\") {\n return _SideBarDefParser2.parse([toParse]);\n }\n if (Array.isArray(toParse)) {\n const comps = [];\n toParse.forEach((key) => {\n const lookupResult = _SideBarDefParser2.DEFAULT_BY_KEY[key];\n if (!lookupResult) {\n console.warn(`AG Grid: the key ${key} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(_SideBarDefParser2.DEFAULT_BY_KEY).join(\",\")}`);\n return;\n }\n comps.push(lookupResult);\n });\n if (comps.length === 0) {\n return void 0;\n }\n return {\n toolPanels: comps,\n defaultToolPanel: comps[0].id\n };\n }\n const result = {\n toolPanels: _SideBarDefParser2.parseComponents(toParse.toolPanels),\n defaultToolPanel: toParse.defaultToolPanel,\n hiddenByDefault: toParse.hiddenByDefault,\n position: toParse.position\n };\n return result;\n }\n static parseComponents(from) {\n const result = [];\n if (!from) {\n return result;\n }\n from.forEach((it) => {\n let toAdd = null;\n if (typeof it === \"string\") {\n const lookupResult = _SideBarDefParser2.DEFAULT_BY_KEY[it];\n if (!lookupResult) {\n console.warn(`AG Grid: the key ${it} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(_SideBarDefParser2.DEFAULT_BY_KEY).join(\",\")}`);\n return;\n }\n toAdd = lookupResult;\n } else {\n toAdd = it;\n }\n result.push(toAdd);\n });\n return result;\n }\n};\n_SideBarDefParser.DEFAULT_COLUMN_COMP = {\n id: \"columns\",\n labelDefault: \"Columns\",\n labelKey: \"columns\",\n iconKey: \"columns\",\n toolPanel: \"agColumnsToolPanel\"\n};\n_SideBarDefParser.DEFAULT_FILTER_COMP = {\n id: \"filters\",\n labelDefault: \"Filters\",\n labelKey: \"filters\",\n iconKey: \"filter\",\n toolPanel: \"agFiltersToolPanel\"\n};\n_SideBarDefParser.DEFAULT_BY_KEY = {\n columns: _SideBarDefParser.DEFAULT_COLUMN_COMP,\n filters: _SideBarDefParser.DEFAULT_FILTER_COMP\n};\nvar SideBarDefParser = _SideBarDefParser;\nvar _ToolPanelWrapper = class _ToolPanelWrapper2 extends Component45 {\n constructor() {\n super(_ToolPanelWrapper2.TEMPLATE);\n }\n setupResize() {\n const eGui = this.getGui();\n const resizeBar = this.resizeBar = this.createManagedBean(new HorizontalResizeComp());\n eGui.setAttribute(\"id\", `ag-${this.getCompId()}`);\n resizeBar.setElementToResize(eGui);\n this.appendChild(resizeBar);\n }\n getToolPanelId() {\n return this.toolPanelId;\n }\n setToolPanelDef(toolPanelDef, params) {\n const { id, minWidth, maxWidth, width } = toolPanelDef;\n this.toolPanelId = id;\n this.width = width;\n const compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);\n const componentPromise = compDetails.newAgStackInstance();\n this.params = compDetails.params;\n if (componentPromise == null) {\n console.warn(`AG Grid: error processing tool panel component ${id}. You need to specify 'toolPanel'`);\n return;\n }\n componentPromise.then(this.setToolPanelComponent.bind(this));\n if (minWidth != null) {\n this.resizeBar.setMinWidth(minWidth);\n }\n if (maxWidth != null) {\n this.resizeBar.setMaxWidth(maxWidth);\n }\n }\n setToolPanelComponent(compInstance) {\n this.toolPanelCompInstance = compInstance;\n this.appendChild(compInstance.getGui());\n this.addDestroyFunc(() => {\n this.destroyBean(compInstance);\n });\n if (this.width) {\n this.getGui().style.width = `${this.width}px`;\n }\n }\n getToolPanelInstance() {\n return this.toolPanelCompInstance;\n }\n setResizerSizerSide(side) {\n const isRtl = this.gos.get(\"enableRtl\");\n const isLeft = side === \"left\";\n const inverted = isRtl ? isLeft : !isLeft;\n this.resizeBar.setInverted(inverted);\n }\n refresh() {\n this.toolPanelCompInstance.refresh(this.params);\n }\n};\n_ToolPanelWrapper.TEMPLATE = /* html */\n`
`;\n__decorateClass7([\n Autowired311(\"userComponentFactory\")\n], _ToolPanelWrapper.prototype, \"userComponentFactory\", 2);\n__decorateClass7([\n PostConstruct411\n], _ToolPanelWrapper.prototype, \"setupResize\", 1);\nvar ToolPanelWrapper = _ToolPanelWrapper;\nvar _SideBarComp = class _SideBarComp2 extends Component53 {\n constructor() {\n super(_SideBarComp2.TEMPLATE);\n this.toolPanelWrappers = [];\n }\n postConstruct() {\n var _a;\n this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));\n const { sideBar: sideBarState } = (_a = this.gos.get(\"initialState\")) != null ? _a : {};\n this.setSideBarDef({\n sideBarDef: SideBarDefParser.parse(this.gos.get(\"sideBar\")),\n sideBarState\n });\n this.addManagedPropertyListener(\"sideBar\", this.onSideBarUpdated.bind(this));\n this.sideBarService.registerSideBarComp(this);\n this.createManagedBean(new ManagedFocusFeature(\n this.getFocusableElement(),\n {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this)\n }\n ));\n }\n onTabKeyDown(e) {\n if (e.defaultPrevented) {\n return;\n }\n const { focusService, sideBarButtonsComp } = this;\n const eGui = this.getGui();\n const sideBarGui = sideBarButtonsComp.getGui();\n const activeElement = this.gos.getActiveDomElement();\n const openPanel = eGui.querySelector(\".ag-tool-panel-wrapper:not(.ag-hidden)\");\n const target = e.target;\n if (!openPanel) {\n return;\n }\n if (sideBarGui.contains(activeElement)) {\n if (focusService.focusInto(openPanel, e.shiftKey)) {\n e.preventDefault();\n }\n return;\n }\n if (!e.shiftKey) {\n return;\n }\n let nextEl = null;\n if (openPanel.contains(activeElement)) {\n nextEl = this.focusService.findNextFocusableElement(openPanel, void 0, true);\n } else if (focusService.isTargetUnderManagedComponent(openPanel, target) && e.shiftKey) {\n nextEl = this.focusService.findFocusableElementBeforeTabGuard(openPanel, target);\n }\n if (!nextEl) {\n nextEl = sideBarGui.querySelector(\".ag-selected button\");\n }\n if (nextEl && nextEl !== e.target) {\n e.preventDefault();\n nextEl.focus();\n }\n }\n handleKeyDown(e) {\n const currentButton = this.gos.getActiveDomElement();\n if (!this.sideBarButtonsComp.getGui().contains(currentButton)) {\n return;\n }\n const sideBarGui = this.sideBarButtonsComp.getGui();\n const buttons = Array.prototype.slice.call(sideBarGui.querySelectorAll(\".ag-side-button\"));\n const currentPos = buttons.findIndex((button) => button.contains(currentButton));\n let nextPos = null;\n switch (e.key) {\n case KeyCode22.LEFT:\n case KeyCode22.UP:\n nextPos = Math.max(0, currentPos - 1);\n break;\n case KeyCode22.RIGHT:\n case KeyCode22.DOWN:\n nextPos = Math.min(currentPos + 1, buttons.length - 1);\n break;\n }\n if (nextPos === null) {\n return;\n }\n const innerButton = buttons[nextPos].querySelector(\"button\");\n if (innerButton) {\n innerButton.focus();\n e.preventDefault();\n }\n }\n onToolPanelButtonClicked(event) {\n const id = event.toolPanelId;\n const openedItem = this.openedItem();\n if (openedItem === id) {\n this.openToolPanel(void 0, \"sideBarButtonClicked\");\n } else {\n this.openToolPanel(id, \"sideBarButtonClicked\");\n }\n }\n clearDownUi() {\n this.sideBarButtonsComp.clearButtons();\n this.destroyToolPanelWrappers();\n }\n setSideBarDef({\n sideBarDef,\n sideBarState,\n existingToolPanelWrappers\n }) {\n this.setDisplayed(false);\n this.sideBar = sideBarDef;\n if (!!this.sideBar && !!this.sideBar.toolPanels) {\n const toolPanelDefs = this.sideBar.toolPanels;\n this.createToolPanelsAndSideButtons(toolPanelDefs, sideBarState, existingToolPanelWrappers);\n if (!this.toolPanelWrappers.length) {\n return;\n }\n const shouldDisplaySideBar = sideBarState ? sideBarState.visible : !this.sideBar.hiddenByDefault;\n this.setDisplayed(shouldDisplaySideBar);\n this.setSideBarPosition(sideBarState ? sideBarState.position : this.sideBar.position);\n if (shouldDisplaySideBar) {\n if (sideBarState) {\n const { openToolPanel } = sideBarState;\n if (openToolPanel) {\n this.openToolPanel(openToolPanel, \"sideBarInitializing\");\n }\n } else {\n this.openToolPanel(this.sideBar.defaultToolPanel, \"sideBarInitializing\");\n }\n }\n }\n }\n getDef() {\n return this.sideBar;\n }\n setSideBarPosition(position) {\n if (!position) {\n position = \"right\";\n }\n this.position = position;\n const isLeft = position === \"left\";\n const resizerSide = isLeft ? \"right\" : \"left\";\n this.addOrRemoveCssClass(\"ag-side-bar-left\", isLeft);\n this.addOrRemoveCssClass(\"ag-side-bar-right\", !isLeft);\n this.toolPanelWrappers.forEach((wrapper) => {\n wrapper.setResizerSizerSide(resizerSide);\n });\n this.eventService.dispatchEvent({ type: Events25.EVENT_SIDE_BAR_UPDATED });\n return this;\n }\n setDisplayed(displayed, options) {\n super.setDisplayed(displayed, options);\n this.eventService.dispatchEvent({ type: Events25.EVENT_SIDE_BAR_UPDATED });\n }\n getState() {\n const toolPanels = {};\n this.toolPanelWrappers.forEach((wrapper) => {\n var _a, _b;\n toolPanels[wrapper.getToolPanelId()] = (_b = (_a = wrapper.getToolPanelInstance()) == null ? void 0 : _a.getState) == null ? void 0 : _b.call(_a);\n });\n return {\n visible: this.isDisplayed(),\n position: this.position,\n openToolPanel: this.openedItem(),\n toolPanels\n };\n }\n createToolPanelsAndSideButtons(defs, sideBarState, existingToolPanelWrappers) {\n var _a;\n for (const def of defs) {\n this.createToolPanelAndSideButton(def, (_a = sideBarState == null ? void 0 : sideBarState.toolPanels) == null ? void 0 : _a[def.id], existingToolPanelWrappers == null ? void 0 : existingToolPanelWrappers[def.id]);\n }\n }\n validateDef(def) {\n if (def.id == null) {\n console.warn(`AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id`);\n return false;\n }\n if (def.toolPanel === \"agColumnsToolPanel\") {\n const moduleMissing = !ModuleRegistry2.__assertRegistered(ModuleNames7.ColumnsToolPanelModule, \"Column Tool Panel\", this.context.getGridId());\n if (moduleMissing) {\n return false;\n }\n }\n if (def.toolPanel === \"agFiltersToolPanel\") {\n const moduleMissing = !ModuleRegistry2.__assertRegistered(ModuleNames7.FiltersToolPanelModule, \"Filters Tool Panel\", this.context.getGridId());\n if (moduleMissing) {\n return false;\n }\n if (this.filterManager.isAdvancedFilterEnabled()) {\n _38.warnOnce(\"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.\");\n return false;\n }\n }\n return true;\n }\n createToolPanelAndSideButton(def, initialState, existingToolPanelWrapper) {\n if (!this.validateDef(def)) {\n return;\n }\n const button = this.sideBarButtonsComp.addButtonComp(def);\n let wrapper;\n if (existingToolPanelWrapper) {\n wrapper = existingToolPanelWrapper;\n } else {\n wrapper = this.getContext().createBean(new ToolPanelWrapper());\n wrapper.setToolPanelDef(def, {\n initialState,\n onStateUpdated: () => this.eventService.dispatchEvent({ type: Events25.EVENT_SIDE_BAR_UPDATED })\n });\n }\n wrapper.setDisplayed(false);\n const wrapperGui = wrapper.getGui();\n this.appendChild(wrapperGui);\n this.toolPanelWrappers.push(wrapper);\n _38.setAriaControls(button.getButtonElement(), wrapperGui);\n }\n refresh() {\n this.toolPanelWrappers.forEach((wrapper) => wrapper.refresh());\n }\n openToolPanel(key, source = \"api\") {\n const currentlyOpenedKey = this.openedItem();\n if (currentlyOpenedKey === key) {\n return;\n }\n this.toolPanelWrappers.forEach((wrapper) => {\n const show = key === wrapper.getToolPanelId();\n wrapper.setDisplayed(show);\n });\n const newlyOpenedKey = this.openedItem();\n const openToolPanelChanged = currentlyOpenedKey !== newlyOpenedKey;\n if (openToolPanelChanged) {\n this.sideBarButtonsComp.setActiveButton(key);\n this.raiseToolPanelVisibleEvent(key, currentlyOpenedKey != null ? currentlyOpenedKey : void 0, source);\n }\n }\n getToolPanelInstance(key) {\n const toolPanelWrapper = this.toolPanelWrappers.filter((toolPanel) => toolPanel.getToolPanelId() === key)[0];\n if (!toolPanelWrapper) {\n console.warn(`AG Grid: unable to lookup Tool Panel as invalid key supplied: ${key}`);\n return;\n }\n return toolPanelWrapper.getToolPanelInstance();\n }\n raiseToolPanelVisibleEvent(key, previousKey, source) {\n const switchingToolPanel = !!key && !!previousKey;\n if (previousKey) {\n const event = {\n type: Events25.EVENT_TOOL_PANEL_VISIBLE_CHANGED,\n source,\n key: previousKey,\n visible: false,\n switchingToolPanel\n };\n this.eventService.dispatchEvent(event);\n }\n if (key) {\n const event = {\n type: Events25.EVENT_TOOL_PANEL_VISIBLE_CHANGED,\n source,\n key,\n visible: true,\n switchingToolPanel\n };\n this.eventService.dispatchEvent(event);\n }\n }\n close(source = \"api\") {\n this.openToolPanel(void 0, source);\n }\n isToolPanelShowing() {\n return !!this.openedItem();\n }\n openedItem() {\n let activeToolPanel = null;\n this.toolPanelWrappers.forEach((wrapper) => {\n if (wrapper.isDisplayed()) {\n activeToolPanel = wrapper.getToolPanelId();\n }\n });\n return activeToolPanel;\n }\n onSideBarUpdated() {\n var _a;\n const sideBarDef = SideBarDefParser.parse(this.gos.get(\"sideBar\"));\n let existingToolPanelWrappers = {};\n if (sideBarDef && this.sideBar) {\n (_a = sideBarDef.toolPanels) == null ? void 0 : _a.forEach((toolPanelDef) => {\n var _a2, _b;\n const { id } = toolPanelDef;\n if (!id) {\n return;\n }\n const existingToolPanelDef = (_a2 = this.sideBar.toolPanels) == null ? void 0 : _a2.find(\n (toolPanelDefToCheck) => toolPanelDefToCheck.id === id\n );\n if (!existingToolPanelDef || toolPanelDef.toolPanel !== existingToolPanelDef.toolPanel) {\n return;\n }\n const toolPanelWrapper = this.toolPanelWrappers.find((toolPanel) => toolPanel.getToolPanelId() === id);\n if (!toolPanelWrapper) {\n return;\n }\n const params = this.gos.addGridCommonParams(__spreadProps5(__spreadValues5({}, (_b = toolPanelDef.toolPanelParams) != null ? _b : {}), {\n onStateUpdated: () => this.eventService.dispatchEvent({ type: Events25.EVENT_SIDE_BAR_UPDATED })\n }));\n const hasRefreshed = toolPanelWrapper.getToolPanelInstance().refresh(params);\n if (hasRefreshed !== true) {\n return;\n }\n this.toolPanelWrappers = this.toolPanelWrappers.filter((toolPanel) => toolPanel !== toolPanelWrapper);\n _38.removeFromParent(toolPanelWrapper.getGui());\n existingToolPanelWrappers[id] = toolPanelWrapper;\n });\n }\n this.clearDownUi();\n this.setSideBarDef({ sideBarDef, existingToolPanelWrappers });\n }\n destroyToolPanelWrappers() {\n this.toolPanelWrappers.forEach((wrapper) => {\n _38.removeFromParent(wrapper.getGui());\n this.destroyBean(wrapper);\n });\n this.toolPanelWrappers.length = 0;\n }\n destroy() {\n this.destroyToolPanelWrappers();\n super.destroy();\n }\n};\n_SideBarComp.TEMPLATE = /* html */\n`
\n \n
`;\n__decorateClass7([\n Autowired411(\"focusService\")\n], _SideBarComp.prototype, \"focusService\", 2);\n__decorateClass7([\n Autowired411(\"filterManager\")\n], _SideBarComp.prototype, \"filterManager\", 2);\n__decorateClass7([\n Autowired411(\"sideBarService\")\n], _SideBarComp.prototype, \"sideBarService\", 2);\n__decorateClass7([\n RefSelector24(\"sideBarButtons\")\n], _SideBarComp.prototype, \"sideBarButtonsComp\", 2);\n__decorateClass7([\n PostConstruct55\n], _SideBarComp.prototype, \"postConstruct\", 1);\nvar SideBarComp = _SideBarComp;\nvar ToolPanelColDefService = class extends BeanStub17 {\n constructor() {\n super(...arguments);\n this.isColGroupDef = (colDef) => colDef && typeof colDef.children !== \"undefined\";\n this.getId = (colDef) => {\n return this.isColGroupDef(colDef) ? colDef.groupId : colDef.colId;\n };\n }\n createColumnTree(colDefs) {\n const invalidColIds = [];\n const createDummyColGroup = (abstractColDef, depth) => {\n if (this.isColGroupDef(abstractColDef)) {\n const groupDef = abstractColDef;\n const groupId = typeof groupDef.groupId !== \"undefined\" ? groupDef.groupId : groupDef.headerName;\n const group = new ProvidedColumnGroup(groupDef, groupId, false, depth);\n const children = [];\n groupDef.children.forEach((def) => {\n const child = createDummyColGroup(def, depth + 1);\n if (child) {\n children.push(child);\n }\n });\n group.setChildren(children);\n return group;\n } else {\n const colDef = abstractColDef;\n const key = colDef.colId ? colDef.colId : colDef.field;\n const column = this.columnModel.getPrimaryColumn(key);\n if (!column) {\n invalidColIds.push(colDef);\n }\n return column;\n }\n };\n const mappedResults = [];\n colDefs.forEach((colDef) => {\n const result = createDummyColGroup(colDef, 0);\n if (result) {\n mappedResults.push(result);\n }\n });\n if (invalidColIds.length > 0) {\n console.warn(\"AG Grid: unable to find grid columns for the supplied colDef(s):\", invalidColIds);\n }\n return mappedResults;\n }\n syncLayoutWithGrid(syncLayoutCallback) {\n const leafPathTrees = this.getLeafPathTrees();\n const mergedColumnTrees = this.mergeLeafPathTrees(leafPathTrees);\n syncLayoutCallback(mergedColumnTrees);\n }\n getLeafPathTrees() {\n const getLeafPathTree = (node, childDef) => {\n let leafPathTree;\n if (node instanceof ProvidedColumnGroup) {\n if (node.isPadding()) {\n leafPathTree = childDef;\n } else {\n const groupDef = Object.assign({}, node.getColGroupDef());\n groupDef.groupId = node.getGroupId();\n groupDef.children = [childDef];\n leafPathTree = groupDef;\n }\n } else {\n const colDef = Object.assign({}, node.getColDef());\n colDef.colId = node.getColId();\n leafPathTree = colDef;\n }\n const parent = node.getOriginalParent();\n if (parent) {\n return getLeafPathTree(parent, leafPathTree);\n } else {\n return leafPathTree;\n }\n };\n const allGridColumns = this.columnModel.getAllGridColumns();\n const allPrimaryGridColumns = allGridColumns.filter((column) => {\n const colDef = column.getColDef();\n return column.isPrimary() && !colDef.showRowGroup;\n });\n return allPrimaryGridColumns.map((col) => getLeafPathTree(col, col.getColDef()));\n }\n mergeLeafPathTrees(leafPathTrees) {\n const matchingRootGroupIds = (pathA, pathB) => {\n const bothPathsAreGroups = this.isColGroupDef(pathA) && this.isColGroupDef(pathB);\n return bothPathsAreGroups && this.getId(pathA) === this.getId(pathB);\n };\n const mergeTrees = (treeA, treeB) => {\n if (!this.isColGroupDef(treeB)) {\n return treeA;\n }\n const mergeResult = treeA;\n const groupToMerge = treeB;\n if (groupToMerge.children && groupToMerge.groupId) {\n const added = this.addChildrenToGroup(mergeResult, groupToMerge.groupId, groupToMerge.children[0]);\n if (added) {\n return mergeResult;\n }\n }\n groupToMerge.children.forEach((child) => mergeTrees(mergeResult, child));\n return mergeResult;\n };\n const mergeColDefs = [];\n for (let i = 1; i <= leafPathTrees.length; i++) {\n const first = leafPathTrees[i - 1];\n const second = leafPathTrees[i];\n if (matchingRootGroupIds(first, second)) {\n leafPathTrees[i] = mergeTrees(first, second);\n } else {\n mergeColDefs.push(first);\n }\n }\n return mergeColDefs;\n }\n addChildrenToGroup(tree, groupId, colDef) {\n const subGroupIsSplit = (currentSubGroup, currentSubGroupToAdd) => {\n const existingChildIds = currentSubGroup.children.map(this.getId);\n const childGroupAlreadyExists = _45.includes(existingChildIds, this.getId(currentSubGroupToAdd));\n const lastChild = _45.last(currentSubGroup.children);\n const lastChildIsDifferent = lastChild && this.getId(lastChild) !== this.getId(currentSubGroupToAdd);\n return childGroupAlreadyExists && lastChildIsDifferent;\n };\n if (!this.isColGroupDef(tree)) {\n return true;\n }\n const currentGroup = tree;\n const groupToAdd = colDef;\n if (subGroupIsSplit(currentGroup, groupToAdd)) {\n currentGroup.children.push(groupToAdd);\n return true;\n }\n if (currentGroup.groupId === groupId) {\n const existingChildIds = currentGroup.children.map(this.getId);\n const colDefAlreadyPresent = _45.includes(existingChildIds, this.getId(groupToAdd));\n if (!colDefAlreadyPresent) {\n currentGroup.children.push(groupToAdd);\n return true;\n }\n }\n currentGroup.children.forEach((subGroup) => this.addChildrenToGroup(subGroup, groupId, colDef));\n return false;\n }\n};\n__decorateClass7([\n Autowired54(\"columnModel\")\n], ToolPanelColDefService.prototype, \"columnModel\", 2);\nToolPanelColDefService = __decorateClass7([\n Bean10(\"toolPanelColDefService\")\n], ToolPanelColDefService);\nvar VERSION7 = \"31.3.2\";\nvar SideBarService = class extends BeanStub26 {\n registerSideBarComp(sideBarComp) {\n this.sideBarComp = sideBarComp;\n }\n getSideBarComp() {\n return this.sideBarComp;\n }\n};\nSideBarService = __decorateClass7([\n Bean26(\"sideBarService\")\n], SideBarService);\nvar SideBarModule = {\n version: VERSION7,\n moduleName: ModuleNames23.SideBarModule,\n beans: [ToolPanelColDefService, SideBarService],\n agStackComponents: [\n { componentName: \"AgHorizontalResize\", componentClass: HorizontalResizeComp },\n { componentName: \"AgSideBar\", componentClass: SideBarComp },\n { componentName: \"AgSideBarButtons\", componentClass: SideBarButtonsComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/column-tool-panel/dist/package/main.esm.mjs\nimport {\n Events as Events83,\n Bean as Bean11,\n Autowired as Autowired84,\n _ as _84\n} from \"ag-grid-community\";\nvar __defProp8 = Object.defineProperty;\nvar __getOwnPropDesc8 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropSymbols6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp6 = (obj, key, value) => key in obj ? __defProp8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp7.call(b, prop))\n __defNormalProp6(a, prop, b[prop]);\n if (__getOwnPropSymbols6)\n for (var prop of __getOwnPropSymbols6(b)) {\n if (__propIsEnum6.call(b, prop))\n __defNormalProp6(a, prop, b[prop]);\n }\n return a;\n};\nvar __decorateClass8 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc8(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp8(target, key, result);\n return result;\n};\nvar _PrimaryColsHeaderPanel = class _PrimaryColsHeaderPanel2 extends Component46 {\n constructor() {\n super(_PrimaryColsHeaderPanel2.TEMPLATE);\n }\n postConstruct() {\n this.createExpandIcons();\n this.addManagedListener(this.eExpand, \"click\", this.onExpandClicked.bind(this));\n this.addManagedListener(this.eExpand, \"keydown\", (e) => {\n if (e.key === KeyCode8.SPACE) {\n e.preventDefault();\n this.onExpandClicked();\n }\n });\n this.addManagedListener(this.eSelect.getInputElement(), \"click\", this.onSelectClicked.bind(this));\n this.addManagedPropertyListener(\"functionsReadOnly\", () => this.onFunctionsReadOnlyPropChanged());\n this.eFilterTextField.setAutoComplete(false).onValueChange(() => this.onFilterTextChanged());\n this.addManagedListener(\n this.eFilterTextField.getInputElement(),\n \"keydown\",\n this.onMiniFilterKeyDown.bind(this)\n );\n this.addManagedListener(this.eventService, Events14.EVENT_NEW_COLUMNS_LOADED, this.showOrHideOptions.bind(this));\n const translate = this.localeService.getLocaleTextFunc();\n this.eSelect.setInputAriaLabel(translate(\"ariaColumnSelectAll\", \"Toggle Select All Columns\"));\n this.eFilterTextField.setInputAriaLabel(translate(\"ariaFilterColumnsInput\", \"Filter Columns Input\"));\n this.activateTabIndex([this.eExpand]);\n }\n onFunctionsReadOnlyPropChanged() {\n const readOnly = this.gos.get(\"functionsReadOnly\");\n this.eSelect.setReadOnly(readOnly);\n this.eSelect.addOrRemoveCssClass(\"ag-column-select-column-readonly\", readOnly);\n }\n init(params) {\n this.params = params;\n const readOnly = this.gos.get(\"functionsReadOnly\");\n this.eSelect.setReadOnly(readOnly);\n this.eSelect.addOrRemoveCssClass(\"ag-column-select-column-readonly\", readOnly);\n if (this.columnModel.isReady()) {\n this.showOrHideOptions();\n }\n }\n createExpandIcons() {\n this.eExpand.appendChild(this.eExpandChecked = _39.createIconNoSpan(\"columnSelectOpen\", this.gos));\n this.eExpand.appendChild(this.eExpandUnchecked = _39.createIconNoSpan(\"columnSelectClosed\", this.gos));\n this.eExpand.appendChild(this.eExpandIndeterminate = _39.createIconNoSpan(\"columnSelectIndeterminate\", this.gos));\n this.setExpandState(\n 0\n /* EXPANDED */\n );\n }\n // we only show expand / collapse if we are showing columns\n showOrHideOptions() {\n const showFilter = !this.params.suppressColumnFilter;\n const showSelect = !this.params.suppressColumnSelectAll;\n const showExpand = !this.params.suppressColumnExpandAll;\n const groupsPresent = this.columnModel.isPrimaryColumnGroupsPresent();\n const translate = this.localeService.getLocaleTextFunc();\n this.eFilterTextField.setInputPlaceholder(translate(\"searchOoo\", \"Search...\"));\n _39.setDisplayed(this.eFilterTextField.getGui(), showFilter);\n _39.setDisplayed(this.eSelect.getGui(), showSelect);\n _39.setDisplayed(this.eExpand, showExpand && groupsPresent);\n }\n onFilterTextChanged() {\n if (!this.onFilterTextChangedDebounced) {\n this.onFilterTextChangedDebounced = _39.debounce(() => {\n const filterText = this.eFilterTextField.getValue();\n this.dispatchEvent({ type: \"filterChanged\", filterText });\n }, _PrimaryColsHeaderPanel2.DEBOUNCE_DELAY);\n }\n this.onFilterTextChangedDebounced();\n }\n onMiniFilterKeyDown(e) {\n if (e.key === KeyCode8.ENTER) {\n setTimeout(() => this.onSelectClicked(), _PrimaryColsHeaderPanel2.DEBOUNCE_DELAY);\n }\n }\n onSelectClicked() {\n this.dispatchEvent({ type: this.selectState ? \"unselectAll\" : \"selectAll\" });\n }\n onExpandClicked() {\n this.dispatchEvent({ type: this.expandState === 0 ? \"collapseAll\" : \"expandAll\" });\n }\n setExpandState(state) {\n this.expandState = state;\n _39.setDisplayed(\n this.eExpandChecked,\n this.expandState === 0\n /* EXPANDED */\n );\n _39.setDisplayed(\n this.eExpandUnchecked,\n this.expandState === 1\n /* COLLAPSED */\n );\n _39.setDisplayed(\n this.eExpandIndeterminate,\n this.expandState === 2\n /* INDETERMINATE */\n );\n }\n setSelectionState(state) {\n this.selectState = state;\n this.eSelect.setValue(this.selectState);\n }\n};\n_PrimaryColsHeaderPanel.DEBOUNCE_DELAY = 300;\n_PrimaryColsHeaderPanel.TEMPLATE = /* html */\n`
\n
\n \n \n
`;\n__decorateClass8([\n Autowired55(\"columnModel\")\n], _PrimaryColsHeaderPanel.prototype, \"columnModel\", 2);\n__decorateClass8([\n RefSelector17(\"eExpand\")\n], _PrimaryColsHeaderPanel.prototype, \"eExpand\", 2);\n__decorateClass8([\n RefSelector17(\"eSelect\")\n], _PrimaryColsHeaderPanel.prototype, \"eSelect\", 2);\n__decorateClass8([\n RefSelector17(\"eFilterTextField\")\n], _PrimaryColsHeaderPanel.prototype, \"eFilterTextField\", 2);\n__decorateClass8([\n PostConstruct56\n], _PrimaryColsHeaderPanel.prototype, \"postConstruct\", 1);\nvar PrimaryColsHeaderPanel = _PrimaryColsHeaderPanel;\nvar _ColumnModelItem = class _ColumnModelItem2 {\n constructor(displayName, columnOrGroup, dept, group = false, expanded) {\n this.eventService = new EventService();\n this.displayName = displayName;\n this.dept = dept;\n this.group = group;\n if (group) {\n this.columnGroup = columnOrGroup;\n this.expanded = expanded;\n this.children = [];\n } else {\n this.column = columnOrGroup;\n }\n }\n isGroup() {\n return this.group;\n }\n getDisplayName() {\n return this.displayName;\n }\n getColumnGroup() {\n return this.columnGroup;\n }\n getColumn() {\n return this.column;\n }\n getDept() {\n return this.dept;\n }\n isExpanded() {\n return !!this.expanded;\n }\n getChildren() {\n return this.children;\n }\n isPassesFilter() {\n return this.passesFilter;\n }\n setExpanded(expanded) {\n if (expanded === this.expanded) {\n return;\n }\n this.expanded = expanded;\n this.eventService.dispatchEvent({ type: _ColumnModelItem2.EVENT_EXPANDED_CHANGED });\n }\n setPassesFilter(passesFilter) {\n this.passesFilter = passesFilter;\n }\n addEventListener(eventType, listener) {\n this.eventService.addEventListener(eventType, listener);\n }\n removeEventListener(eventType, listener) {\n this.eventService.removeEventListener(eventType, listener);\n }\n};\n_ColumnModelItem.EVENT_EXPANDED_CHANGED = \"expandedChanged\";\nvar ColumnModelItem = _ColumnModelItem;\nvar ToolPanelContextMenu = class extends Component211 {\n constructor(column, mouseEvent, parentEl) {\n super(\n /* html */\n `
`\n );\n this.column = column;\n this.mouseEvent = mouseEvent;\n this.parentEl = parentEl;\n this.displayName = null;\n }\n postConstruct() {\n this.initializeProperties(this.column);\n this.buildMenuItemMap();\n if (this.column instanceof Column2) {\n this.displayName = this.columnModel.getDisplayNameForColumn(this.column, \"columnToolPanel\");\n } else {\n this.displayName = this.columnModel.getDisplayNameForProvidedColumnGroup(null, this.column, \"columnToolPanel\");\n }\n if (this.isActive()) {\n this.mouseEvent.preventDefault();\n const menuItemsMapped = this.getMappedMenuItems();\n if (menuItemsMapped.length === 0) {\n return;\n }\n this.displayContextMenu(menuItemsMapped);\n }\n }\n initializeProperties(column) {\n if (column instanceof ProvidedColumnGroup2) {\n this.columns = column.getLeafColumns();\n } else {\n this.columns = [column];\n }\n this.allowGrouping = this.columns.some((col) => col.isPrimary() && col.isAllowRowGroup());\n this.allowValues = this.columns.some((col) => col.isPrimary() && col.isAllowValue());\n this.allowPivoting = this.columnModel.isPivotMode() && this.columns.some((col) => col.isPrimary() && col.isAllowPivot());\n }\n buildMenuItemMap() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n this.menuItemMap = /* @__PURE__ */ new Map();\n this.menuItemMap.set(\"rowGroup\", {\n allowedFunction: (col) => col.isPrimary() && col.isAllowRowGroup() && !this.columnModel.isColumnGroupingLocked(col),\n activeFunction: (col) => col.isRowGroupActive(),\n activateLabel: () => `${localeTextFunc(\"groupBy\", \"Group by\")} ${this.displayName}`,\n deactivateLabel: () => `${localeTextFunc(\"ungroupBy\", \"Un-Group by\")} ${this.displayName}`,\n activateFunction: () => {\n const groupedColumns = this.columnModel.getRowGroupColumns();\n this.columnModel.setRowGroupColumns(this.addColumnsToList(groupedColumns), \"toolPanelUi\");\n },\n deActivateFunction: () => {\n const groupedColumns = this.columnModel.getRowGroupColumns();\n this.columnModel.setRowGroupColumns(this.removeColumnsFromList(groupedColumns), \"toolPanelUi\");\n },\n addIcon: \"menuAddRowGroup\",\n removeIcon: \"menuRemoveRowGroup\"\n });\n this.menuItemMap.set(\"value\", {\n allowedFunction: (col) => col.isPrimary() && col.isAllowValue(),\n activeFunction: (col) => col.isValueActive(),\n activateLabel: () => localeTextFunc(\"addToValues\", `Add ${this.displayName} to values`, [this.displayName]),\n deactivateLabel: () => localeTextFunc(\"removeFromValues\", `Remove ${this.displayName} from values`, [this.displayName]),\n activateFunction: () => {\n const valueColumns = this.columnModel.getValueColumns();\n this.columnModel.setValueColumns(this.addColumnsToList(valueColumns), \"toolPanelUi\");\n },\n deActivateFunction: () => {\n const valueColumns = this.columnModel.getValueColumns();\n this.columnModel.setValueColumns(this.removeColumnsFromList(valueColumns), \"toolPanelUi\");\n },\n addIcon: \"valuePanel\",\n removeIcon: \"valuePanel\"\n });\n this.menuItemMap.set(\"pivot\", {\n allowedFunction: (col) => this.columnModel.isPivotMode() && col.isPrimary() && col.isAllowPivot(),\n activeFunction: (col) => col.isPivotActive(),\n activateLabel: () => localeTextFunc(\"addToLabels\", `Add ${this.displayName} to labels`, [this.displayName]),\n deactivateLabel: () => localeTextFunc(\"removeFromLabels\", `Remove ${this.displayName} from labels`, [this.displayName]),\n activateFunction: () => {\n const pivotColumns = this.columnModel.getPivotColumns();\n this.columnModel.setPivotColumns(this.addColumnsToList(pivotColumns), \"toolPanelUi\");\n },\n deActivateFunction: () => {\n const pivotColumns = this.columnModel.getPivotColumns();\n this.columnModel.setPivotColumns(this.removeColumnsFromList(pivotColumns), \"toolPanelUi\");\n },\n addIcon: \"pivotPanel\",\n removeIcon: \"pivotPanel\"\n });\n }\n addColumnsToList(columnList) {\n return [...columnList].concat(this.columns.filter((col) => columnList.indexOf(col) === -1));\n }\n removeColumnsFromList(columnList) {\n return columnList.filter((col) => this.columns.indexOf(col) === -1);\n }\n displayContextMenu(menuItemsMapped) {\n const eGui = this.getGui();\n const menuList = this.createBean(new AgMenuList2());\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n let hideFunc = () => {\n };\n eGui.appendChild(menuList.getGui());\n menuList.addMenuItems(menuItemsMapped);\n menuList.addManagedListener(menuList, AgMenuItemComponent2.EVENT_CLOSE_MENU, () => {\n this.parentEl.focus();\n hideFunc();\n });\n const addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eGui,\n closeOnEsc: true,\n afterGuiAttached: () => this.focusService.focusInto(menuList.getGui()),\n ariaLabel: localeTextFunc(\"ariaLabelContextMenu\", \"Context Menu\"),\n closedCallback: (e) => {\n if (e instanceof KeyboardEvent) {\n this.parentEl.focus();\n }\n this.destroyBean(menuList);\n }\n });\n if (addPopupRes) {\n hideFunc = addPopupRes.hideFunc;\n }\n this.popupService.positionPopupUnderMouseEvent({\n type: \"columnContextMenu\",\n mouseEvent: this.mouseEvent,\n ePopup: eGui\n });\n }\n isActive() {\n return this.allowGrouping || this.allowValues || this.allowPivoting;\n }\n getMappedMenuItems() {\n const ret = [];\n for (const val of this.menuItemMap.values()) {\n const isInactive = this.columns.some((col) => val.allowedFunction(col) && !val.activeFunction(col));\n const isActive = this.columns.some((col) => val.allowedFunction(col) && val.activeFunction(col));\n if (isInactive) {\n ret.push({\n name: val.activateLabel(this.displayName),\n icon: _211.createIconNoSpan(val.addIcon, this.gos, null),\n action: () => val.activateFunction()\n });\n }\n if (isActive) {\n ret.push({\n name: val.deactivateLabel(this.displayName),\n icon: _211.createIconNoSpan(val.removeIcon, this.gos, null),\n action: () => val.deActivateFunction()\n });\n }\n }\n return ret;\n }\n};\n__decorateClass8([\n Autowired212(\"columnModel\")\n], ToolPanelContextMenu.prototype, \"columnModel\", 2);\n__decorateClass8([\n Autowired212(\"popupService\")\n], ToolPanelContextMenu.prototype, \"popupService\", 2);\n__decorateClass8([\n Autowired212(\"focusService\")\n], ToolPanelContextMenu.prototype, \"focusService\", 2);\n__decorateClass8([\n PostConstruct212\n], ToolPanelContextMenu.prototype, \"postConstruct\", 1);\nvar _ToolPanelColumnGroupComp = class _ToolPanelColumnGroupComp2 extends Component312 {\n constructor(modelItem, allowDragging, eventType, focusWrapper) {\n super();\n this.modelItem = modelItem;\n this.allowDragging = allowDragging;\n this.eventType = eventType;\n this.focusWrapper = focusWrapper;\n this.processingColumnStateChange = false;\n this.modelItem = modelItem;\n this.columnGroup = modelItem.getColumnGroup();\n this.columnDept = modelItem.getDept();\n this.displayName = modelItem.getDisplayName();\n this.allowDragging = allowDragging;\n }\n init() {\n this.setTemplate(_ToolPanelColumnGroupComp2.TEMPLATE);\n this.eDragHandle = _310.createIconNoSpan(\"columnDrag\", this.gos);\n this.eDragHandle.classList.add(\"ag-drag-handle\", \"ag-column-select-column-group-drag-handle\");\n const checkboxGui = this.cbSelect.getGui();\n const checkboxInput = this.cbSelect.getInputElement();\n checkboxGui.insertAdjacentElement(\"afterend\", this.eDragHandle);\n checkboxInput.setAttribute(\"tabindex\", \"-1\");\n this.eLabel.innerHTML = this.displayName ? this.displayName : \"\";\n this.setupExpandContract();\n this.addCssClass(\"ag-column-select-indent-\" + this.columnDept);\n this.addManagedListener(this.eventService, Events26.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.eLabel, \"click\", this.onLabelClicked.bind(this));\n this.addManagedListener(this.cbSelect, Events26.EVENT_FIELD_VALUE_CHANGED, this.onCheckboxChanged.bind(this));\n this.addManagedListener(this.modelItem, ColumnModelItem.EVENT_EXPANDED_CHANGED, this.onExpandChanged.bind(this));\n this.addManagedListener(this.focusWrapper, \"keydown\", this.handleKeyDown.bind(this));\n this.addManagedListener(this.focusWrapper, \"contextmenu\", this.onContextMenu.bind(this));\n this.setOpenClosedIcons();\n this.setupDragging();\n this.onColumnStateChanged();\n this.addVisibilityListenersToAllChildren();\n this.refreshAriaExpanded();\n this.refreshAriaLabel();\n this.setupTooltip();\n const classes = CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(), this.gos, null, this.columnGroup);\n classes.forEach((c) => this.addOrRemoveCssClass(c, true));\n }\n getColumns() {\n return this.columnGroup.getLeafColumns();\n }\n setupTooltip() {\n const colGroupDef = this.columnGroup.getColGroupDef();\n if (!colGroupDef) {\n return;\n }\n const isTooltipWhenTruncated = this.gos.get(\"tooltipShowMode\") === \"whenTruncated\";\n let shouldDisplayTooltip;\n if (isTooltipWhenTruncated) {\n shouldDisplayTooltip = () => this.eLabel.scrollWidth > this.eLabel.clientWidth;\n }\n const refresh = () => {\n const newTooltipText = colGroupDef.headerTooltip;\n this.setTooltip({ newTooltipText, location: \"columnToolPanelColumnGroup\", shouldDisplayTooltip });\n };\n refresh();\n this.addManagedListener(this.eventService, Events26.EVENT_NEW_COLUMNS_LOADED, refresh);\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"columnToolPanelColumnGroup\";\n return res;\n }\n handleKeyDown(e) {\n switch (e.key) {\n case KeyCode23.LEFT:\n e.preventDefault();\n this.modelItem.setExpanded(false);\n break;\n case KeyCode23.RIGHT:\n e.preventDefault();\n this.modelItem.setExpanded(true);\n break;\n case KeyCode23.SPACE:\n e.preventDefault();\n if (this.isSelectable()) {\n this.onSelectAllChanged(!this.isSelected());\n }\n break;\n }\n }\n onContextMenu(e) {\n const { columnGroup, gos } = this;\n if (gos.get(\"functionsReadOnly\")) {\n return;\n }\n const contextMenu = this.createBean(new ToolPanelContextMenu(columnGroup, e, this.focusWrapper));\n this.addDestroyFunc(() => {\n if (contextMenu.isAlive()) {\n this.destroyBean(contextMenu);\n }\n });\n }\n addVisibilityListenersToAllChildren() {\n this.columnGroup.getLeafColumns().forEach((column) => {\n this.addManagedListener(column, Column3.EVENT_VISIBLE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(column, Column3.EVENT_VALUE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(column, Column3.EVENT_PIVOT_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(column, Column3.EVENT_ROW_GROUP_CHANGED, this.onColumnStateChanged.bind(this));\n });\n }\n setupDragging() {\n if (!this.allowDragging) {\n _310.setDisplayed(this.eDragHandle, false);\n return;\n }\n let hideColumnOnExit = !this.gos.get(\"suppressDragLeaveHidesColumns\");\n const dragSource = {\n type: DragSourceType5.ToolPanel,\n eElement: this.eDragHandle,\n dragItemName: this.displayName,\n getDefaultIconName: () => hideColumnOnExit ? DragAndDropService6.ICON_HIDE : DragAndDropService6.ICON_NOT_ALLOWED,\n getDragItem: () => this.createDragItem(),\n onDragStarted: () => {\n hideColumnOnExit = !this.gos.get(\"suppressDragLeaveHidesColumns\");\n const event = {\n type: Events26.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n column: this.columnGroup\n };\n this.eventService.dispatchEvent(event);\n },\n onDragStopped: () => {\n const event = {\n type: Events26.EVENT_COLUMN_PANEL_ITEM_DRAG_END\n };\n this.eventService.dispatchEvent(event);\n },\n onGridEnter: (dragItem) => {\n if (hideColumnOnExit) {\n this.modelItemUtils.updateColumns({\n columns: this.columnGroup.getLeafColumns(),\n visibleState: dragItem == null ? void 0 : dragItem.visibleState,\n pivotState: dragItem == null ? void 0 : dragItem.pivotState,\n eventType: this.eventType\n });\n }\n },\n onGridExit: () => {\n if (hideColumnOnExit) {\n this.onChangeCommon(false);\n }\n }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(() => this.dragAndDropService.removeDragSource(dragSource));\n }\n createDragItem() {\n const columns = this.columnGroup.getLeafColumns();\n const visibleState = {};\n const pivotState = {};\n columns.forEach((col) => {\n const colId = col.getId();\n visibleState[colId] = col.isVisible();\n pivotState[colId] = this.modelItemUtils.createPivotState(col);\n });\n return {\n columns,\n visibleState,\n pivotState\n };\n }\n setupExpandContract() {\n this.eGroupClosedIcon.appendChild(_310.createIcon(\"columnSelectClosed\", this.gos, null));\n this.eGroupOpenedIcon.appendChild(_310.createIcon(\"columnSelectOpen\", this.gos, null));\n this.addManagedListener(this.eGroupClosedIcon, \"click\", this.onExpandOrContractClicked.bind(this));\n this.addManagedListener(this.eGroupOpenedIcon, \"click\", this.onExpandOrContractClicked.bind(this));\n const touchListener = new TouchListener(this.eColumnGroupIcons, true);\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, this.onExpandOrContractClicked.bind(this));\n this.addDestroyFunc(touchListener.destroy.bind(touchListener));\n }\n onLabelClicked() {\n const nextState = !this.cbSelect.getValue();\n this.onChangeCommon(nextState);\n }\n onCheckboxChanged(event) {\n this.onChangeCommon(event.selected);\n }\n getVisibleLeafColumns() {\n const childColumns = [];\n const extractCols = (children) => {\n children.forEach((child) => {\n if (!child.isPassesFilter()) {\n return;\n }\n if (child.isGroup()) {\n extractCols(child.getChildren());\n } else {\n childColumns.push(child.getColumn());\n }\n });\n };\n extractCols(this.modelItem.getChildren());\n return childColumns;\n }\n onChangeCommon(nextState) {\n this.refreshAriaLabel();\n if (this.processingColumnStateChange) {\n return;\n }\n this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(), nextState, this.eventType);\n }\n refreshAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const columnLabel = translate(\"ariaColumnGroup\", \"Column Group\");\n const checkboxValue = this.cbSelect.getValue();\n const state = checkboxValue === void 0 ? translate(\"ariaIndeterminate\", \"indeterminate\") : checkboxValue ? translate(\"ariaVisible\", \"visible\") : translate(\"ariaHidden\", \"hidden\");\n const visibilityLabel = translate(\"ariaToggleVisibility\", \"Press SPACE to toggle visibility\");\n _310.setAriaLabel(this.focusWrapper, `${this.displayName} ${columnLabel}`);\n this.cbSelect.setInputAriaLabel(`${visibilityLabel} (${state})`);\n _310.setAriaDescribedBy(this.focusWrapper, this.cbSelect.getInputElement().id);\n }\n onColumnStateChanged() {\n const selectedValue = this.workOutSelectedValue();\n const readOnlyValue = this.workOutReadOnlyValue();\n this.processingColumnStateChange = true;\n this.cbSelect.setValue(selectedValue);\n this.cbSelect.setReadOnly(readOnlyValue);\n this.addOrRemoveCssClass(\"ag-column-select-column-group-readonly\", readOnlyValue);\n this.processingColumnStateChange = false;\n }\n workOutSelectedValue() {\n const pivotMode = this.columnModel.isPivotMode();\n const visibleLeafColumns = this.getVisibleLeafColumns();\n let checkedCount = 0;\n let uncheckedCount = 0;\n visibleLeafColumns.forEach((column) => {\n if (!pivotMode && column.getColDef().lockVisible) {\n return;\n }\n if (this.isColumnChecked(column, pivotMode)) {\n checkedCount++;\n } else {\n uncheckedCount++;\n }\n });\n if (checkedCount > 0 && uncheckedCount > 0) {\n return void 0;\n }\n return checkedCount > 0;\n }\n workOutReadOnlyValue() {\n const pivotMode = this.columnModel.isPivotMode();\n let colsThatCanAction = 0;\n this.columnGroup.getLeafColumns().forEach((col) => {\n if (pivotMode) {\n if (col.isAnyFunctionAllowed()) {\n colsThatCanAction++;\n }\n } else {\n if (!col.getColDef().lockVisible) {\n colsThatCanAction++;\n }\n }\n });\n return colsThatCanAction === 0;\n }\n isColumnChecked(column, pivotMode) {\n if (pivotMode) {\n const pivoted = column.isPivotActive();\n const grouped = column.isRowGroupActive();\n const aggregated = column.isValueActive();\n return pivoted || grouped || aggregated;\n }\n return column.isVisible();\n }\n onExpandOrContractClicked() {\n const oldState = this.modelItem.isExpanded();\n this.modelItem.setExpanded(!oldState);\n }\n onExpandChanged() {\n this.setOpenClosedIcons();\n this.refreshAriaExpanded();\n }\n setOpenClosedIcons() {\n const folderOpen = this.modelItem.isExpanded();\n _310.setDisplayed(this.eGroupClosedIcon, !folderOpen);\n _310.setDisplayed(this.eGroupOpenedIcon, folderOpen);\n }\n refreshAriaExpanded() {\n _310.setAriaExpanded(this.focusWrapper, this.modelItem.isExpanded());\n }\n getDisplayName() {\n return this.displayName;\n }\n onSelectAllChanged(value) {\n const cbValue = this.cbSelect.getValue();\n const readOnly = this.cbSelect.isReadOnly();\n if (!readOnly && (value && !cbValue || !value && cbValue)) {\n this.cbSelect.toggle();\n }\n }\n isSelected() {\n return this.cbSelect.getValue();\n }\n isSelectable() {\n return !this.cbSelect.isReadOnly();\n }\n setSelected(selected) {\n this.cbSelect.setValue(selected, true);\n }\n};\n_ToolPanelColumnGroupComp.TEMPLATE = /* html */\n`
\n \n \n \n \n \n \n
`;\n__decorateClass8([\n Autowired312(\"columnModel\")\n], _ToolPanelColumnGroupComp.prototype, \"columnModel\", 2);\n__decorateClass8([\n Autowired312(\"dragAndDropService\")\n], _ToolPanelColumnGroupComp.prototype, \"dragAndDropService\", 2);\n__decorateClass8([\n Autowired312(\"modelItemUtils\")\n], _ToolPanelColumnGroupComp.prototype, \"modelItemUtils\", 2);\n__decorateClass8([\n RefSelector25(\"cbSelect\")\n], _ToolPanelColumnGroupComp.prototype, \"cbSelect\", 2);\n__decorateClass8([\n RefSelector25(\"eLabel\")\n], _ToolPanelColumnGroupComp.prototype, \"eLabel\", 2);\n__decorateClass8([\n RefSelector25(\"eGroupOpenedIcon\")\n], _ToolPanelColumnGroupComp.prototype, \"eGroupOpenedIcon\", 2);\n__decorateClass8([\n RefSelector25(\"eGroupClosedIcon\")\n], _ToolPanelColumnGroupComp.prototype, \"eGroupClosedIcon\", 2);\n__decorateClass8([\n RefSelector25(\"eColumnGroupIcons\")\n], _ToolPanelColumnGroupComp.prototype, \"eColumnGroupIcons\", 2);\n__decorateClass8([\n PostConstruct312\n], _ToolPanelColumnGroupComp.prototype, \"init\", 1);\nvar ToolPanelColumnGroupComp = _ToolPanelColumnGroupComp;\nvar PrimaryColsListPanelItemDragFeature = class extends BeanStub18 {\n constructor(comp, virtualList) {\n super();\n this.comp = comp;\n this.virtualList = virtualList;\n }\n postConstruct() {\n this.createManagedBean(new VirtualListDragFeature2(\n this.comp,\n this.virtualList,\n {\n dragSourceType: DragSourceType24.ToolPanel,\n listItemDragStartEvent: Events34.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n listItemDragEndEvent: Events34.EVENT_COLUMN_PANEL_ITEM_DRAG_END,\n eventSource: this.eventService,\n getCurrentDragValue: (listItemDragStartEvent) => this.getCurrentDragValue(listItemDragStartEvent),\n isMoveBlocked: (currentDragValue) => this.isMoveBlocked(currentDragValue),\n getNumRows: (comp) => comp.getDisplayedColsList().length,\n moveItem: (currentDragValue, lastHoveredListItem) => this.moveItem(currentDragValue, lastHoveredListItem)\n }\n ));\n }\n getCurrentDragValue(listItemDragStartEvent) {\n return listItemDragStartEvent.column;\n }\n isMoveBlocked(currentDragValue) {\n const preventMoving = this.gos.get(\"suppressMovableColumns\");\n if (preventMoving) {\n return true;\n }\n const currentColumns = this.getCurrentColumns(currentDragValue);\n const hasNotMovable = currentColumns.find((col) => {\n const colDef = col.getColDef();\n return !!colDef.suppressMovable || !!colDef.lockPosition;\n });\n return !!hasNotMovable;\n }\n moveItem(currentDragValue, lastHoveredListItem) {\n const targetIndex = this.getTargetIndex(currentDragValue, lastHoveredListItem);\n const columnsToMove = this.getCurrentColumns(currentDragValue);\n if (targetIndex != null) {\n this.columnModel.moveColumns(columnsToMove, targetIndex, \"toolPanelUi\");\n }\n }\n getMoveDiff(currentDragValue, end) {\n const allColumns = this.columnModel.getAllGridColumns();\n const currentColumns = this.getCurrentColumns(currentDragValue);\n const currentColumn = currentColumns[0];\n const span = currentColumns.length;\n const currentIndex = allColumns.indexOf(currentColumn);\n if (currentIndex < end) {\n return span;\n }\n return 0;\n }\n getCurrentColumns(currentDragValue) {\n if (currentDragValue instanceof ProvidedColumnGroup4) {\n return currentDragValue.getLeafColumns();\n }\n return [currentDragValue];\n }\n getTargetIndex(currentDragValue, lastHoveredListItem) {\n if (!lastHoveredListItem) {\n return null;\n }\n const columnItemComponent = lastHoveredListItem.component;\n let isBefore = lastHoveredListItem.position === \"top\";\n let targetColumn;\n if (columnItemComponent instanceof ToolPanelColumnGroupComp) {\n const columns = columnItemComponent.getColumns();\n targetColumn = columns[0];\n isBefore = true;\n } else {\n targetColumn = columnItemComponent.getColumn();\n }\n const movingCols = this.getCurrentColumns(currentDragValue);\n if (movingCols.indexOf(targetColumn) !== -1) {\n return null;\n }\n const targetColumnIndex = this.columnModel.getAllGridColumns().indexOf(targetColumn);\n const adjustedTarget = isBefore ? targetColumnIndex : targetColumnIndex + 1;\n const diff = this.getMoveDiff(currentDragValue, adjustedTarget);\n return adjustedTarget - diff;\n }\n};\n__decorateClass8([\n Autowired412(\"columnModel\")\n], PrimaryColsListPanelItemDragFeature.prototype, \"columnModel\", 2);\n__decorateClass8([\n PostConstruct412\n], PrimaryColsListPanelItemDragFeature.prototype, \"postConstruct\", 1);\nvar _ToolPanelColumnComp = class _ToolPanelColumnComp2 extends Component47 {\n constructor(modelItem, allowDragging, groupsExist, focusWrapper) {\n super();\n this.allowDragging = allowDragging;\n this.groupsExist = groupsExist;\n this.focusWrapper = focusWrapper;\n this.processingColumnStateChange = false;\n this.column = modelItem.getColumn();\n this.columnDept = modelItem.getDept();\n this.displayName = modelItem.getDisplayName();\n }\n init() {\n this.setTemplate(_ToolPanelColumnComp2.TEMPLATE);\n this.eDragHandle = _54.createIconNoSpan(\"columnDrag\", this.gos);\n this.eDragHandle.classList.add(\"ag-drag-handle\", \"ag-column-select-column-drag-handle\");\n const checkboxGui = this.cbSelect.getGui();\n const checkboxInput = this.cbSelect.getInputElement();\n checkboxGui.insertAdjacentElement(\"afterend\", this.eDragHandle);\n checkboxInput.setAttribute(\"tabindex\", \"-1\");\n const displayNameSanitised = _54.escapeString(this.displayName);\n this.eLabel.innerHTML = displayNameSanitised;\n const indent = this.columnDept;\n if (this.groupsExist) {\n this.addCssClass(\"ag-column-select-add-group-indent\");\n }\n this.addCssClass(`ag-column-select-indent-${indent}`);\n this.setupDragging();\n this.addManagedListener(this.eventService, Events44.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column5.EVENT_VALUE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column5.EVENT_PIVOT_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column5.EVENT_ROW_GROUP_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.column, Column5.EVENT_VISIBLE_CHANGED, this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.focusWrapper, \"keydown\", this.handleKeyDown.bind(this));\n this.addManagedListener(this.focusWrapper, \"contextmenu\", this.onContextMenu.bind(this));\n this.addManagedPropertyListener(\"functionsReadOnly\", this.onColumnStateChanged.bind(this));\n this.addManagedListener(this.cbSelect, Events44.EVENT_FIELD_VALUE_CHANGED, this.onCheckboxChanged.bind(this));\n this.addManagedListener(this.eLabel, \"click\", this.onLabelClicked.bind(this));\n this.onColumnStateChanged();\n this.refreshAriaLabel();\n this.setupTooltip();\n const classes = CssClassApplier2.getToolPanelClassesFromColDef(this.column.getColDef(), this.gos, this.column, null);\n classes.forEach((c) => this.addOrRemoveCssClass(c, true));\n }\n getColumn() {\n return this.column;\n }\n setupTooltip() {\n const isTooltipWhenTruncated = this.gos.get(\"tooltipShowMode\") === \"whenTruncated\";\n let shouldDisplayTooltip;\n if (isTooltipWhenTruncated) {\n shouldDisplayTooltip = () => this.eLabel.scrollWidth > this.eLabel.clientWidth;\n }\n const refresh = () => {\n const newTooltipText = this.column.getColDef().headerTooltip;\n this.setTooltip({ newTooltipText, location: \"columnToolPanelColumn\", shouldDisplayTooltip });\n };\n refresh();\n this.addManagedListener(this.eventService, Events44.EVENT_NEW_COLUMNS_LOADED, refresh);\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"columnToolPanelColumn\";\n res.colDef = this.column.getColDef();\n return res;\n }\n onContextMenu(e) {\n const { column, gos } = this;\n if (gos.get(\"functionsReadOnly\")) {\n return;\n }\n const contextMenu = this.createBean(new ToolPanelContextMenu(column, e, this.focusWrapper));\n this.addDestroyFunc(() => {\n if (contextMenu.isAlive()) {\n this.destroyBean(contextMenu);\n }\n });\n }\n handleKeyDown(e) {\n if (e.key === KeyCode32.SPACE) {\n e.preventDefault();\n if (this.isSelectable()) {\n this.onSelectAllChanged(!this.isSelected());\n }\n }\n }\n onLabelClicked() {\n if (this.gos.get(\"functionsReadOnly\")) {\n return;\n }\n const nextState = !this.cbSelect.getValue();\n this.onChangeCommon(nextState);\n }\n onCheckboxChanged(event) {\n this.onChangeCommon(event.selected);\n }\n onChangeCommon(nextState) {\n if (this.cbSelect.isReadOnly()) {\n return;\n }\n this.refreshAriaLabel();\n if (this.processingColumnStateChange) {\n return;\n }\n this.modelItemUtils.setColumn(this.column, nextState, \"toolPanelUi\");\n }\n refreshAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const columnLabel = translate(\"ariaColumn\", \"Column\");\n const state = this.cbSelect.getValue() ? translate(\"ariaVisible\", \"visible\") : translate(\"ariaHidden\", \"hidden\");\n const visibilityLabel = translate(\"ariaToggleVisibility\", \"Press SPACE to toggle visibility\");\n _54.setAriaLabel(this.focusWrapper, `${this.displayName} ${columnLabel}`);\n this.cbSelect.setInputAriaLabel(`${visibilityLabel} (${state})`);\n _54.setAriaDescribedBy(this.focusWrapper, this.cbSelect.getInputElement().id);\n }\n setupDragging() {\n if (!this.allowDragging) {\n _54.setDisplayed(this.eDragHandle, false);\n return;\n }\n let hideColumnOnExit = !this.gos.get(\"suppressDragLeaveHidesColumns\");\n const dragSource = {\n type: DragSourceType32.ToolPanel,\n eElement: this.eDragHandle,\n dragItemName: this.displayName,\n getDefaultIconName: () => hideColumnOnExit ? DragAndDropService23.ICON_HIDE : DragAndDropService23.ICON_NOT_ALLOWED,\n getDragItem: () => this.createDragItem(),\n onDragStarted: () => {\n hideColumnOnExit = !this.gos.get(\"suppressDragLeaveHidesColumns\");\n const event = {\n type: Events44.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n column: this.column\n };\n this.eventService.dispatchEvent(event);\n },\n onDragStopped: () => {\n const event = {\n type: Events44.EVENT_COLUMN_PANEL_ITEM_DRAG_END\n };\n this.eventService.dispatchEvent(event);\n },\n onGridEnter: (dragItem) => {\n if (hideColumnOnExit) {\n this.modelItemUtils.updateColumns({\n columns: [this.column],\n visibleState: dragItem == null ? void 0 : dragItem.visibleState,\n pivotState: dragItem == null ? void 0 : dragItem.pivotState,\n eventType: \"toolPanelUi\"\n });\n }\n },\n onGridExit: () => {\n if (hideColumnOnExit) {\n this.onChangeCommon(false);\n }\n }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(() => this.dragAndDropService.removeDragSource(dragSource));\n }\n createDragItem() {\n const colId = this.column.getColId();\n const visibleState = { [colId]: this.column.isVisible() };\n const pivotState = { [colId]: this.modelItemUtils.createPivotState(this.column) };\n return {\n columns: [this.column],\n visibleState,\n pivotState\n };\n }\n onColumnStateChanged() {\n this.processingColumnStateChange = true;\n const isPivotMode = this.columnModel.isPivotMode();\n if (isPivotMode) {\n const anyFunctionActive = this.column.isAnyFunctionActive();\n this.cbSelect.setValue(anyFunctionActive);\n } else {\n this.cbSelect.setValue(this.column.isVisible());\n }\n let canBeToggled = true;\n let canBeDragged = true;\n if (isPivotMode) {\n const functionsReadOnly = this.gos.get(\"functionsReadOnly\");\n const noFunctionsAllowed = !this.column.isAnyFunctionAllowed();\n canBeToggled = !functionsReadOnly && !noFunctionsAllowed;\n canBeDragged = canBeToggled;\n } else {\n const { enableRowGroup, enableValue, lockPosition, suppressMovable, lockVisible } = this.column.getColDef();\n const forceDraggable = !!enableRowGroup || !!enableValue;\n const disableDraggable = !!lockPosition || !!suppressMovable;\n canBeToggled = !lockVisible;\n canBeDragged = forceDraggable || !disableDraggable;\n }\n this.cbSelect.setReadOnly(!canBeToggled);\n this.eDragHandle.classList.toggle(\"ag-column-select-column-readonly\", !canBeDragged);\n this.addOrRemoveCssClass(\"ag-column-select-column-readonly\", !canBeDragged && !canBeToggled);\n const checkboxPassive = isPivotMode && this.gos.get(\"functionsPassive\");\n this.cbSelect.setPassive(checkboxPassive);\n this.processingColumnStateChange = false;\n }\n getDisplayName() {\n return this.displayName;\n }\n onSelectAllChanged(value) {\n if (value !== this.cbSelect.getValue()) {\n if (!this.cbSelect.isReadOnly()) {\n this.cbSelect.toggle();\n }\n }\n }\n isSelected() {\n return this.cbSelect.getValue();\n }\n isSelectable() {\n return !this.cbSelect.isReadOnly();\n }\n isExpandable() {\n return false;\n }\n setExpanded(value) {\n console.warn(\"AG Grid: can not expand a column item that does not represent a column group header\");\n }\n};\n_ToolPanelColumnComp.TEMPLATE = /* html */\n`
\n \n \n
`;\n__decorateClass8([\n Autowired56(\"columnModel\")\n], _ToolPanelColumnComp.prototype, \"columnModel\", 2);\n__decorateClass8([\n Autowired56(\"dragAndDropService\")\n], _ToolPanelColumnComp.prototype, \"dragAndDropService\", 2);\n__decorateClass8([\n Autowired56(\"modelItemUtils\")\n], _ToolPanelColumnComp.prototype, \"modelItemUtils\", 2);\n__decorateClass8([\n RefSelector35(\"eLabel\")\n], _ToolPanelColumnComp.prototype, \"eLabel\", 2);\n__decorateClass8([\n RefSelector35(\"cbSelect\")\n], _ToolPanelColumnComp.prototype, \"cbSelect\", 2);\n__decorateClass8([\n PostConstruct57\n], _ToolPanelColumnComp.prototype, \"init\", 1);\nvar ToolPanelColumnComp = _ToolPanelColumnComp;\nvar UIColumnModel = class {\n constructor(items) {\n this.items = items;\n }\n getRowCount() {\n return this.items.length;\n }\n getRow(index) {\n return this.items[index];\n }\n};\nvar PRIMARY_COLS_LIST_PANEL_CLASS = \"ag-column-select-list\";\nvar _PrimaryColsListPanel = class _PrimaryColsListPanel2 extends Component54 {\n constructor() {\n super(_PrimaryColsListPanel2.TEMPLATE);\n this.destroyColumnItemFuncs = [];\n this.hasLoadedInitialState = false;\n this.isInitialState = false;\n }\n destroyColumnTree() {\n this.allColsTree = [];\n this.destroyColumnItemFuncs.forEach((f) => f());\n this.destroyColumnItemFuncs = [];\n }\n init(params, allowDragging, eventType) {\n this.params = params;\n this.allowDragging = allowDragging;\n this.eventType = eventType;\n if (!this.params.suppressSyncLayoutWithGrid) {\n this.addManagedListener(this.eventService, Events54.EVENT_COLUMN_MOVED, this.onColumnsChanged.bind(this));\n }\n this.addManagedListener(this.eventService, Events54.EVENT_NEW_COLUMNS_LOADED, this.onColumnsChanged.bind(this));\n const eventsImpactingCheckedState = [\n Events54.EVENT_COLUMN_PIVOT_CHANGED,\n Events54.EVENT_COLUMN_PIVOT_MODE_CHANGED,\n Events54.EVENT_COLUMN_ROW_GROUP_CHANGED,\n Events54.EVENT_COLUMN_VALUE_CHANGED,\n Events54.EVENT_COLUMN_VISIBLE,\n Events54.EVENT_NEW_COLUMNS_LOADED\n ];\n eventsImpactingCheckedState.forEach((event) => {\n this.addManagedListener(this.eventService, event, this.fireSelectionChangedEvent.bind(this));\n });\n this.expandGroupsByDefault = !this.params.contractColumnSelection;\n this.virtualList = this.createManagedBean(new VirtualList2({\n cssIdentifier: \"column-select\",\n ariaRole: \"tree\"\n }));\n this.appendChild(this.virtualList.getGui());\n this.virtualList.setComponentCreator(\n (item, listItemElement) => {\n _64.setAriaLevel(listItemElement, item.getDept() + 1);\n return this.createComponentFromItem(item, listItemElement);\n }\n );\n if (this.columnModel.isReady()) {\n this.onColumnsChanged();\n }\n if (this.params.suppressColumnMove) {\n return;\n }\n this.createManagedBean(\n new PrimaryColsListPanelItemDragFeature(this, this.virtualList)\n );\n }\n createComponentFromItem(item, listItemElement) {\n if (item.isGroup()) {\n const renderedGroup = new ToolPanelColumnGroupComp(item, this.allowDragging, this.eventType, listItemElement);\n this.getContext().createBean(renderedGroup);\n return renderedGroup;\n }\n const columnComp = new ToolPanelColumnComp(item, this.allowDragging, this.groupsExist, listItemElement);\n this.getContext().createBean(columnComp);\n return columnComp;\n }\n onColumnsChanged() {\n if (!this.hasLoadedInitialState) {\n this.hasLoadedInitialState = true;\n this.isInitialState = !!this.params.initialState;\n }\n const expandedStates = this.getExpandedStates();\n const pivotModeActive = this.columnModel.isPivotMode();\n const shouldSyncColumnLayoutWithGrid = !this.params.suppressSyncLayoutWithGrid && !pivotModeActive;\n if (shouldSyncColumnLayoutWithGrid) {\n this.buildTreeFromWhatGridIsDisplaying();\n } else {\n this.buildTreeFromProvidedColumnDefs();\n }\n this.setExpandedStates(expandedStates);\n this.markFilteredColumns();\n this.flattenAndFilterModel();\n this.isInitialState = false;\n }\n getDisplayedColsList() {\n return this.displayedColsList;\n }\n getExpandedStates() {\n const res = {};\n if (this.isInitialState) {\n const { expandedGroupIds } = this.params.initialState;\n expandedGroupIds.forEach((id) => {\n res[id] = true;\n });\n return res;\n }\n if (!this.allColsTree) {\n return {};\n }\n this.forEachItem((item) => {\n if (!item.isGroup()) {\n return;\n }\n const colGroup = item.getColumnGroup();\n if (colGroup) {\n res[colGroup.getId()] = item.isExpanded();\n }\n });\n return res;\n }\n setExpandedStates(states) {\n if (!this.allColsTree) {\n return;\n }\n const { isInitialState } = this;\n this.forEachItem((item) => {\n if (!item.isGroup()) {\n return;\n }\n const colGroup = item.getColumnGroup();\n if (colGroup) {\n const expanded = states[colGroup.getId()];\n const groupExistedLastTime = expanded != null;\n if (groupExistedLastTime || isInitialState) {\n item.setExpanded(!!expanded);\n }\n }\n });\n }\n buildTreeFromWhatGridIsDisplaying() {\n this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this));\n }\n setColumnLayout(colDefs) {\n const columnTree = this.colDefService.createColumnTree(colDefs);\n this.buildListModel(columnTree);\n this.groupsExist = colDefs.some((colDef) => {\n return colDef && typeof colDef.children !== \"undefined\";\n });\n this.markFilteredColumns();\n this.flattenAndFilterModel();\n }\n buildTreeFromProvidedColumnDefs() {\n this.buildListModel(this.columnModel.getPrimaryColumnTree());\n this.groupsExist = this.columnModel.isPrimaryColumnGroupsPresent();\n }\n buildListModel(columnTree) {\n const columnExpandedListener = this.onColumnExpanded.bind(this);\n const addListeners = (item) => {\n item.addEventListener(ColumnModelItem.EVENT_EXPANDED_CHANGED, columnExpandedListener);\n const removeFunc = item.removeEventListener.bind(item, ColumnModelItem.EVENT_EXPANDED_CHANGED, columnExpandedListener);\n this.destroyColumnItemFuncs.push(removeFunc);\n };\n const recursivelyBuild = (tree, dept, parentList) => {\n tree.forEach((child) => {\n if (child instanceof ProvidedColumnGroup5) {\n createGroupItem(child, dept, parentList);\n } else {\n createColumnItem(child, dept, parentList);\n }\n });\n };\n const createGroupItem = (columnGroup, dept, parentList) => {\n const columnGroupDef = columnGroup.getColGroupDef();\n const skipThisGroup = columnGroupDef && columnGroupDef.suppressColumnsToolPanel;\n if (skipThisGroup) {\n return;\n }\n if (columnGroup.isPadding()) {\n recursivelyBuild(columnGroup.getChildren(), dept, parentList);\n return;\n }\n const displayName = this.columnModel.getDisplayNameForProvidedColumnGroup(null, columnGroup, \"columnToolPanel\");\n const item = new ColumnModelItem(displayName, columnGroup, dept, true, this.expandGroupsByDefault);\n parentList.push(item);\n addListeners(item);\n recursivelyBuild(columnGroup.getChildren(), dept + 1, item.getChildren());\n };\n const createColumnItem = (column, dept, parentList) => {\n const skipThisColumn = column.getColDef() && column.getColDef().suppressColumnsToolPanel;\n if (skipThisColumn) {\n return;\n }\n const displayName = this.columnModel.getDisplayNameForColumn(column, \"columnToolPanel\");\n parentList.push(new ColumnModelItem(displayName, column, dept));\n };\n this.destroyColumnTree();\n recursivelyBuild(columnTree, 0, this.allColsTree);\n }\n onColumnExpanded() {\n this.flattenAndFilterModel();\n }\n flattenAndFilterModel() {\n this.displayedColsList = [];\n const recursiveFunc = (item) => {\n if (!item.isPassesFilter()) {\n return;\n }\n this.displayedColsList.push(item);\n if (item.isGroup() && item.isExpanded()) {\n item.getChildren().forEach(recursiveFunc);\n }\n };\n this.allColsTree.forEach(recursiveFunc);\n this.virtualList.setModel(new UIColumnModel(this.displayedColsList));\n const focusedRow = this.virtualList.getLastFocusedRow();\n this.virtualList.refresh();\n if (focusedRow != null) {\n this.focusRowIfAlive(focusedRow);\n }\n this.notifyListeners();\n this.refreshAriaLabel();\n }\n refreshAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const columnListName = translate(\"ariaColumnPanelList\", \"Column List\");\n const localeColumns = translate(\"columns\", \"Columns\");\n const items = this.displayedColsList.length;\n _64.setAriaLabel(this.virtualList.getAriaElement(), `${columnListName} ${items} ${localeColumns}`);\n }\n focusRowIfAlive(rowIndex) {\n window.setTimeout(() => {\n if (this.isAlive()) {\n this.virtualList.focusRow(rowIndex);\n }\n }, 0);\n }\n forEachItem(callback) {\n const recursiveFunc = (items) => {\n items.forEach((item) => {\n callback(item);\n if (item.isGroup()) {\n recursiveFunc(item.getChildren());\n }\n });\n };\n if (!this.allColsTree) {\n return;\n }\n recursiveFunc(this.allColsTree);\n }\n doSetExpandedAll(value) {\n this.forEachItem((item) => {\n if (item.isGroup()) {\n item.setExpanded(value);\n }\n });\n }\n setGroupsExpanded(expand, groupIds) {\n if (!groupIds) {\n this.doSetExpandedAll(expand);\n return;\n }\n const expandedGroupIds = [];\n this.forEachItem((item) => {\n if (!item.isGroup()) {\n return;\n }\n const groupId = item.getColumnGroup().getId();\n if (groupIds.indexOf(groupId) >= 0) {\n item.setExpanded(expand);\n expandedGroupIds.push(groupId);\n }\n });\n const unrecognisedGroupIds = groupIds.filter((groupId) => !_64.includes(expandedGroupIds, groupId));\n if (unrecognisedGroupIds.length > 0) {\n console.warn(\"AG Grid: unable to find group(s) for supplied groupIds:\", unrecognisedGroupIds);\n }\n }\n getExpandState() {\n let expandedCount = 0;\n let notExpandedCount = 0;\n this.forEachItem((item) => {\n if (!item.isGroup()) {\n return;\n }\n if (item.isExpanded()) {\n expandedCount++;\n } else {\n notExpandedCount++;\n }\n });\n if (expandedCount > 0 && notExpandedCount > 0) {\n return 2;\n }\n if (notExpandedCount > 0) {\n return 1;\n }\n return 0;\n }\n doSetSelectedAll(selectAllChecked) {\n this.modelItemUtils.selectAllChildren(this.allColsTree, selectAllChecked, this.eventType);\n }\n getSelectionState() {\n let checkedCount = 0;\n let uncheckedCount = 0;\n const pivotMode = this.columnModel.isPivotMode();\n this.forEachItem((item) => {\n if (item.isGroup()) {\n return;\n }\n if (!item.isPassesFilter()) {\n return;\n }\n const column = item.getColumn();\n const colDef = column.getColDef();\n let checked;\n if (pivotMode) {\n const noPivotModeOptionsAllowed = !column.isAllowPivot() && !column.isAllowRowGroup() && !column.isAllowValue();\n if (noPivotModeOptionsAllowed) {\n return;\n }\n checked = column.isValueActive() || column.isPivotActive() || column.isRowGroupActive();\n } else {\n if (colDef.lockVisible) {\n return;\n }\n checked = column.isVisible();\n }\n checked ? checkedCount++ : uncheckedCount++;\n });\n if (checkedCount > 0 && uncheckedCount > 0) {\n return void 0;\n }\n return !(checkedCount === 0 || uncheckedCount > 0);\n }\n setFilterText(filterText) {\n this.filterText = _64.exists(filterText) ? filterText.toLowerCase() : null;\n this.markFilteredColumns();\n this.flattenAndFilterModel();\n }\n markFilteredColumns() {\n const passesFilter = (item) => {\n if (!_64.exists(this.filterText)) {\n return true;\n }\n const displayName = item.getDisplayName();\n return displayName == null || displayName.toLowerCase().indexOf(this.filterText) !== -1;\n };\n const recursivelyCheckFilter = (item, parentPasses) => {\n let atLeastOneChildPassed = false;\n if (item.isGroup()) {\n const groupPasses = passesFilter(item);\n item.getChildren().forEach((child) => {\n const childPasses = recursivelyCheckFilter(child, groupPasses || parentPasses);\n if (childPasses) {\n atLeastOneChildPassed = childPasses;\n }\n });\n }\n const filterPasses = parentPasses || atLeastOneChildPassed ? true : passesFilter(item);\n item.setPassesFilter(filterPasses);\n return filterPasses;\n };\n this.allColsTree.forEach((item) => recursivelyCheckFilter(item, false));\n }\n notifyListeners() {\n this.fireGroupExpandedEvent();\n this.fireSelectionChangedEvent();\n }\n fireGroupExpandedEvent() {\n const expandState = this.getExpandState();\n this.dispatchEvent({ type: \"groupExpanded\", state: expandState });\n }\n fireSelectionChangedEvent() {\n if (!this.allColsTree) {\n return;\n }\n const selectionState = this.getSelectionState();\n this.dispatchEvent({ type: \"selectionChanged\", state: selectionState });\n }\n getExpandedGroups() {\n const expandedGroupIds = [];\n if (!this.allColsTree) {\n return expandedGroupIds;\n }\n this.forEachItem((item) => {\n if (item.isGroup() && item.isExpanded()) {\n expandedGroupIds.push(item.getColumnGroup().getId());\n }\n });\n return expandedGroupIds;\n }\n};\n_PrimaryColsListPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass8([\n Autowired64(\"columnModel\")\n], _PrimaryColsListPanel.prototype, \"columnModel\", 2);\n__decorateClass8([\n Autowired64(\"toolPanelColDefService\")\n], _PrimaryColsListPanel.prototype, \"colDefService\", 2);\n__decorateClass8([\n Autowired64(\"modelItemUtils\")\n], _PrimaryColsListPanel.prototype, \"modelItemUtils\", 2);\n__decorateClass8([\n PreDestroy3\n], _PrimaryColsListPanel.prototype, \"destroyColumnTree\", 1);\nvar PrimaryColsListPanel = _PrimaryColsListPanel;\nvar PivotModePanel = class extends Component63 {\n createTemplate() {\n return (\n /* html */\n `
\n \n
`\n );\n }\n init() {\n this.setTemplate(this.createTemplate());\n this.cbPivotMode.setValue(this.columnModel.isPivotMode());\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n this.cbPivotMode.setLabel(localeTextFunc(\"pivotMode\", \"Pivot Mode\"));\n this.addManagedListener(this.cbPivotMode, Events64.EVENT_FIELD_VALUE_CHANGED, this.onBtPivotMode.bind(this));\n this.addManagedListener(this.eventService, Events64.EVENT_NEW_COLUMNS_LOADED, this.onPivotModeChanged.bind(this));\n this.addManagedListener(this.eventService, Events64.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));\n }\n onBtPivotMode() {\n const newValue = !!this.cbPivotMode.getValue();\n if (newValue !== this.columnModel.isPivotMode()) {\n this.gos.updateGridOptions({ options: { pivotMode: newValue }, source: \"toolPanelUi\" });\n const { api } = this;\n if (api) {\n api.refreshHeader();\n }\n }\n }\n onPivotModeChanged() {\n const pivotModeActive = this.columnModel.isPivotMode();\n this.cbPivotMode.setValue(pivotModeActive);\n }\n};\n__decorateClass8([\n Autowired74(\"columnModel\")\n], PivotModePanel.prototype, \"columnModel\", 2);\n__decorateClass8([\n Autowired74(\"gridApi\")\n], PivotModePanel.prototype, \"api\", 2);\n__decorateClass8([\n RefSelector43(\"cbPivotMode\")\n], PivotModePanel.prototype, \"cbPivotMode\", 2);\n__decorateClass8([\n PreConstruct2\n], PivotModePanel.prototype, \"init\", 1);\nvar _PrimaryColsPanel = class _PrimaryColsPanel2 extends Component73 {\n constructor() {\n super(_PrimaryColsPanel2.TEMPLATE);\n }\n // we allow dragging in the toolPanel, but not when this component appears in the column menu\n init(allowDragging, params, eventType) {\n this.allowDragging = allowDragging;\n this.params = params;\n this.eventType = eventType;\n this.primaryColsHeaderPanel.init(this.params);\n const hideFilter = this.params.suppressColumnFilter;\n const hideSelect = this.params.suppressColumnSelectAll;\n const hideExpand = this.params.suppressColumnExpandAll;\n if (hideExpand && hideFilter && hideSelect) {\n this.primaryColsHeaderPanel.setDisplayed(false);\n }\n this.addManagedListener(this.primaryColsListPanel, \"groupExpanded\", this.onGroupExpanded.bind(this));\n this.addManagedListener(this.primaryColsListPanel, \"selectionChanged\", this.onSelectionChange.bind(this));\n this.primaryColsListPanel.init(this.params, this.allowDragging, this.eventType);\n this.addManagedListener(this.primaryColsHeaderPanel, \"expandAll\", this.onExpandAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, \"collapseAll\", this.onCollapseAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, \"selectAll\", this.onSelectAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, \"unselectAll\", this.onUnselectAll.bind(this));\n this.addManagedListener(this.primaryColsHeaderPanel, \"filterChanged\", this.onFilterChanged.bind(this));\n this.positionableFeature = new PositionableFeature(this.getGui(), { minHeight: 100 });\n this.createManagedBean(this.positionableFeature);\n }\n toggleResizable(resizable) {\n this.positionableFeature.setResizable(resizable ? { bottom: true } : false);\n }\n onExpandAll() {\n this.primaryColsListPanel.doSetExpandedAll(true);\n }\n onCollapseAll() {\n this.primaryColsListPanel.doSetExpandedAll(false);\n }\n expandGroups(groupIds) {\n this.primaryColsListPanel.setGroupsExpanded(true, groupIds);\n }\n collapseGroups(groupIds) {\n this.primaryColsListPanel.setGroupsExpanded(false, groupIds);\n }\n setColumnLayout(colDefs) {\n this.primaryColsListPanel.setColumnLayout(colDefs);\n }\n onFilterChanged(event) {\n this.primaryColsListPanel.setFilterText(event.filterText);\n }\n syncLayoutWithGrid() {\n this.primaryColsListPanel.onColumnsChanged();\n }\n onSelectAll() {\n this.primaryColsListPanel.doSetSelectedAll(true);\n }\n onUnselectAll() {\n this.primaryColsListPanel.doSetSelectedAll(false);\n }\n onGroupExpanded(event) {\n this.primaryColsHeaderPanel.setExpandState(event.state);\n this.params.onStateUpdated();\n }\n onSelectionChange(event) {\n this.primaryColsHeaderPanel.setSelectionState(event.state);\n }\n getExpandedGroups() {\n return this.primaryColsListPanel.getExpandedGroups();\n }\n};\n_PrimaryColsPanel.TEMPLATE = /* html */\n`
\n \n \n
`;\n__decorateClass8([\n RefSelector53(\"primaryColsHeaderPanel\")\n], _PrimaryColsPanel.prototype, \"primaryColsHeaderPanel\", 2);\n__decorateClass8([\n RefSelector53(\"primaryColsListPanel\")\n], _PrimaryColsPanel.prototype, \"primaryColsListPanel\", 2);\nvar PrimaryColsPanel = _PrimaryColsPanel;\nvar _ColumnToolPanel = class _ColumnToolPanel2 extends Component83 {\n constructor() {\n super(_ColumnToolPanel2.TEMPLATE);\n this.initialised = false;\n this.childDestroyFuncs = [];\n }\n // lazy initialise the panel\n setVisible(visible) {\n super.setDisplayed(visible);\n if (visible && !this.initialised) {\n this.init(this.params);\n }\n }\n init(params) {\n const defaultParams = this.gos.addGridCommonParams({\n suppressColumnMove: false,\n suppressColumnSelectAll: false,\n suppressColumnFilter: false,\n suppressColumnExpandAll: false,\n contractColumnSelection: false,\n suppressPivotMode: false,\n suppressRowGroups: false,\n suppressValues: false,\n suppressPivots: false,\n suppressSyncLayoutWithGrid: false\n });\n this.params = __spreadValues6(__spreadValues6({}, defaultParams), params);\n if (this.isRowGroupingModuleLoaded() && !this.params.suppressPivotMode) {\n this.pivotModePanel = this.createBean(new PivotModePanel());\n this.childDestroyFuncs.push(() => this.destroyBean(this.pivotModePanel));\n this.appendChild(this.pivotModePanel);\n }\n this.primaryColsPanel = this.createBean(new PrimaryColsPanel());\n this.childDestroyFuncs.push(() => this.destroyBean(this.primaryColsPanel));\n this.primaryColsPanel.init(true, this.params, \"toolPanelUi\");\n this.primaryColsPanel.addCssClass(\"ag-column-panel-column-select\");\n this.appendChild(this.primaryColsPanel);\n if (this.isRowGroupingModuleLoaded()) {\n if (!this.params.suppressRowGroups) {\n this.rowGroupDropZonePanel = this.createBean(new RowGroupDropZonePanel(false));\n this.childDestroyFuncs.push(() => this.destroyBean(this.rowGroupDropZonePanel));\n this.appendChild(this.rowGroupDropZonePanel);\n }\n if (!this.params.suppressValues) {\n this.valuesDropZonePanel = this.createBean(new ValuesDropZonePanel(false));\n this.childDestroyFuncs.push(() => this.destroyBean(this.valuesDropZonePanel));\n this.appendChild(this.valuesDropZonePanel);\n }\n if (!this.params.suppressPivots) {\n this.pivotDropZonePanel = this.createBean(new PivotDropZonePanel(false));\n this.childDestroyFuncs.push(() => this.destroyBean(this.pivotDropZonePanel));\n this.appendChild(this.pivotDropZonePanel);\n }\n this.setLastVisible();\n const pivotModeListener = this.addManagedListener(this.eventService, Events74.EVENT_COLUMN_PIVOT_MODE_CHANGED, () => {\n this.resetChildrenHeight();\n this.setLastVisible();\n });\n this.childDestroyFuncs.push(() => pivotModeListener());\n }\n this.initialised = true;\n }\n setPivotModeSectionVisible(visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.pivotModePanel) {\n this.pivotModePanel.setDisplayed(visible);\n } else if (visible) {\n this.pivotModePanel = this.createBean(new PivotModePanel());\n this.getGui().insertBefore(this.pivotModePanel.getGui(), this.getGui().firstChild);\n this.childDestroyFuncs.push(() => this.destroyBean(this.pivotModePanel));\n }\n this.setLastVisible();\n }\n setRowGroupsSectionVisible(visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.rowGroupDropZonePanel) {\n this.rowGroupDropZonePanel.setDisplayed(visible);\n } else if (visible) {\n this.rowGroupDropZonePanel = this.createManagedBean(new RowGroupDropZonePanel(false));\n this.appendChild(this.rowGroupDropZonePanel);\n }\n this.setLastVisible();\n }\n setValuesSectionVisible(visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.valuesDropZonePanel) {\n this.valuesDropZonePanel.setDisplayed(visible);\n } else if (visible) {\n this.valuesDropZonePanel = this.createManagedBean(new ValuesDropZonePanel(false));\n this.appendChild(this.valuesDropZonePanel);\n }\n this.setLastVisible();\n }\n setPivotSectionVisible(visible) {\n if (!this.isRowGroupingModuleLoaded()) {\n return;\n }\n if (this.pivotDropZonePanel) {\n this.pivotDropZonePanel.setDisplayed(visible);\n } else if (visible) {\n this.pivotDropZonePanel = this.createManagedBean(new PivotDropZonePanel(false));\n this.appendChild(this.pivotDropZonePanel);\n this.pivotDropZonePanel.setDisplayed(visible);\n }\n this.setLastVisible();\n }\n setResizers() {\n [\n this.primaryColsPanel,\n this.rowGroupDropZonePanel,\n this.valuesDropZonePanel,\n this.pivotDropZonePanel\n ].forEach((panel) => {\n if (!panel) {\n return;\n }\n const eGui = panel.getGui();\n panel.toggleResizable(!eGui.classList.contains(\"ag-last-column-drop\") && !eGui.classList.contains(\"ag-hidden\"));\n });\n }\n setLastVisible() {\n const eGui = this.getGui();\n const columnDrops = Array.prototype.slice.call(eGui.querySelectorAll(\".ag-column-drop\"));\n columnDrops.forEach((columnDrop) => columnDrop.classList.remove(\"ag-last-column-drop\"));\n const columnDropEls = eGui.querySelectorAll(\".ag-column-drop:not(.ag-hidden)\");\n const lastVisible = _73.last(columnDropEls);\n if (lastVisible) {\n lastVisible.classList.add(\"ag-last-column-drop\");\n }\n this.setResizers();\n }\n resetChildrenHeight() {\n const eGui = this.getGui();\n const children = eGui.children;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n child.style.removeProperty(\"height\");\n child.style.removeProperty(\"flex\");\n }\n }\n isRowGroupingModuleLoaded() {\n return ModuleRegistry3.__assertRegistered(ModuleNames8.RowGroupingModule, \"Row Grouping\", this.context.getGridId());\n }\n expandColumnGroups(groupIds) {\n this.primaryColsPanel.expandGroups(groupIds);\n }\n collapseColumnGroups(groupIds) {\n this.primaryColsPanel.collapseGroups(groupIds);\n }\n setColumnLayout(colDefs) {\n this.primaryColsPanel.setColumnLayout(colDefs);\n }\n syncLayoutWithGrid() {\n this.primaryColsPanel.syncLayoutWithGrid();\n }\n destroyChildren() {\n this.childDestroyFuncs.forEach((func) => func());\n this.childDestroyFuncs.length = 0;\n _73.clearElement(this.getGui());\n }\n refresh(params) {\n this.destroyChildren();\n this.init(params);\n return true;\n }\n getState() {\n return {\n expandedGroupIds: this.primaryColsPanel.getExpandedGroups()\n };\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so this must be public.\n destroy() {\n this.destroyChildren();\n super.destroy();\n }\n};\n_ColumnToolPanel.TEMPLATE = `
`;\nvar ColumnToolPanel = _ColumnToolPanel;\nvar ModelItemUtils = class {\n selectAllChildren(colTree, selectAllChecked, eventType) {\n const cols = this.extractAllLeafColumns(colTree);\n this.setAllColumns(cols, selectAllChecked, eventType);\n }\n setColumn(col, selectAllChecked, eventType) {\n this.setAllColumns([col], selectAllChecked, eventType);\n }\n setAllColumns(cols, selectAllChecked, eventType) {\n if (this.columnModel.isPivotMode()) {\n this.setAllPivot(cols, selectAllChecked, eventType);\n } else {\n this.setAllVisible(cols, selectAllChecked, eventType);\n }\n }\n extractAllLeafColumns(allItems) {\n const res = [];\n const recursiveFunc = (items) => {\n items.forEach((item) => {\n if (!item.isPassesFilter()) {\n return;\n }\n if (item.isGroup()) {\n recursiveFunc(item.getChildren());\n } else {\n res.push(item.getColumn());\n }\n });\n };\n recursiveFunc(allItems);\n return res;\n }\n setAllVisible(columns, visible, eventType) {\n const colStateItems = [];\n columns.forEach((col) => {\n if (col.getColDef().lockVisible) {\n return;\n }\n if (col.isVisible() != visible) {\n colStateItems.push({\n colId: col.getId(),\n hide: !visible\n });\n }\n });\n if (colStateItems.length > 0) {\n this.columnModel.applyColumnState({ state: colStateItems }, eventType);\n }\n }\n setAllPivot(columns, value, eventType) {\n if (this.gos.get(\"functionsPassive\")) {\n this.setAllPivotPassive(columns, value);\n } else {\n this.setAllPivotActive(columns, value, eventType);\n }\n }\n setAllPivotPassive(columns, value) {\n const copyOfPivotColumns = this.columnModel.getPivotColumns().slice();\n const copyOfValueColumns = this.columnModel.getValueColumns().slice();\n const copyOfRowGroupColumns = this.columnModel.getRowGroupColumns().slice();\n let pivotChanged = false;\n let valueChanged = false;\n let rowGroupChanged = false;\n const turnOnAction = (col) => {\n if (col.isAnyFunctionActive()) {\n return;\n }\n if (col.isAllowValue()) {\n copyOfValueColumns.push(col);\n valueChanged = true;\n } else if (col.isAllowRowGroup()) {\n copyOfRowGroupColumns.push(col);\n pivotChanged = true;\n } else if (col.isAllowPivot()) {\n copyOfPivotColumns.push(col);\n rowGroupChanged = true;\n }\n };\n const turnOffAction = (col) => {\n if (!col.isAnyFunctionActive()) {\n return;\n }\n if (copyOfPivotColumns.indexOf(col) >= 0) {\n _84.removeFromArray(copyOfPivotColumns, col);\n pivotChanged = true;\n }\n if (copyOfValueColumns.indexOf(col) >= 0) {\n _84.removeFromArray(copyOfValueColumns, col);\n valueChanged = true;\n }\n if (copyOfRowGroupColumns.indexOf(col) >= 0) {\n _84.removeFromArray(copyOfRowGroupColumns, col);\n rowGroupChanged = true;\n }\n };\n const action = value ? turnOnAction : turnOffAction;\n columns.forEach(action);\n if (pivotChanged) {\n const event = {\n type: Events83.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,\n columns: copyOfPivotColumns\n };\n this.eventService.dispatchEvent(event);\n }\n if (rowGroupChanged) {\n const event = {\n type: Events83.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,\n columns: copyOfRowGroupColumns\n };\n this.eventService.dispatchEvent(event);\n }\n if (valueChanged) {\n const event = {\n type: Events83.EVENT_COLUMN_VALUE_CHANGE_REQUEST,\n columns: copyOfRowGroupColumns\n };\n this.eventService.dispatchEvent(event);\n }\n }\n setAllPivotActive(columns, value, eventType) {\n const colStateItems = [];\n const turnOnAction = (col) => {\n if (col.isAnyFunctionActive()) {\n return;\n }\n if (col.isAllowValue()) {\n const aggFunc = typeof col.getAggFunc() === \"string\" ? col.getAggFunc() : this.aggFuncService.getDefaultAggFunc(col);\n colStateItems.push({\n colId: col.getId(),\n aggFunc\n });\n } else if (col.isAllowRowGroup()) {\n colStateItems.push({\n colId: col.getId(),\n rowGroup: true\n });\n } else if (col.isAllowPivot()) {\n colStateItems.push({\n colId: col.getId(),\n pivot: true\n });\n }\n };\n const turnOffAction = (col) => {\n const isActive = col.isPivotActive() || col.isRowGroupActive() || col.isValueActive();\n if (isActive) {\n colStateItems.push({\n colId: col.getId(),\n pivot: false,\n rowGroup: false,\n aggFunc: null\n });\n }\n };\n const action = value ? turnOnAction : turnOffAction;\n columns.forEach(action);\n if (colStateItems.length > 0) {\n this.columnModel.applyColumnState({ state: colStateItems }, eventType);\n }\n }\n updateColumns(params) {\n const { columns, visibleState, pivotState, eventType } = params;\n const state = columns.map((column) => {\n const colId = column.getColId();\n if (this.columnModel.isPivotMode()) {\n const pivotStateForColumn = pivotState == null ? void 0 : pivotState[colId];\n return {\n colId,\n pivot: pivotStateForColumn == null ? void 0 : pivotStateForColumn.pivot,\n rowGroup: pivotStateForColumn == null ? void 0 : pivotStateForColumn.rowGroup,\n aggFunc: pivotStateForColumn == null ? void 0 : pivotStateForColumn.aggFunc\n };\n } else {\n return {\n colId,\n hide: !(visibleState == null ? void 0 : visibleState[colId])\n };\n }\n });\n this.columnModel.applyColumnState({ state }, eventType);\n }\n createPivotState(column) {\n return {\n pivot: column.isPivotActive(),\n rowGroup: column.isRowGroupActive(),\n aggFunc: column.isValueActive() ? column.getAggFunc() : void 0\n };\n }\n};\n__decorateClass8([\n Autowired84(\"aggFuncService\")\n], ModelItemUtils.prototype, \"aggFuncService\", 2);\n__decorateClass8([\n Autowired84(\"columnModel\")\n], ModelItemUtils.prototype, \"columnModel\", 2);\n__decorateClass8([\n Autowired84(\"gridOptionsService\")\n], ModelItemUtils.prototype, \"gos\", 2);\n__decorateClass8([\n Autowired84(\"eventService\")\n], ModelItemUtils.prototype, \"eventService\", 2);\nModelItemUtils = __decorateClass8([\n Bean11(\"modelItemUtils\")\n], ModelItemUtils);\nvar VERSION8 = \"31.3.2\";\nvar ColumnsToolPanelModule = {\n version: VERSION8,\n moduleName: ModuleNames24.ColumnsToolPanelModule,\n beans: [ModelItemUtils],\n agStackComponents: [\n { componentName: \"AgPrimaryColsHeader\", componentClass: PrimaryColsHeaderPanel },\n { componentName: \"AgPrimaryColsList\", componentClass: PrimaryColsListPanel },\n { componentName: \"AgPrimaryCols\", componentClass: PrimaryColsPanel }\n ],\n userComponents: [\n { componentName: \"agColumnsToolPanel\", componentClass: ColumnToolPanel }\n ],\n dependantModules: [\n EnterpriseCoreModule,\n RowGroupingModule,\n SideBarModule\n ]\n};\n\n// enterprise-modules/excel-export/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames9 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired57,\n Bean as Bean12,\n PostConstruct as PostConstruct58,\n CssClassApplier as CssClassApplier3\n} from \"ag-grid-community\";\nimport {\n ExcelFactoryMode,\n _ as _55\n} from \"ag-grid-community\";\nimport { XmlFactory } from \"ag-grid-community\";\nimport { _ as _40 } from \"ag-grid-community\";\nimport { _ as _212 } from \"ag-grid-community\";\nimport {\n _ as _46\n} from \"ag-grid-community\";\nimport { _ as _311 } from \"ag-grid-community\";\nimport { BaseCreator, Downloader, RowType as RowType2, ZipContainer } from \"ag-grid-community\";\nimport {\n _ as _65\n} from \"ag-grid-community\";\nimport {\n BaseGridSerializingSession,\n RowType\n} from \"ag-grid-community\";\nimport { CsvCreator, GridSerializer as GridSerializer2 } from \"ag-grid-community\";\nimport { CsvExportModule as CsvExportModule2 } from \"ag-grid-community\";\nvar __defProp9 = Object.defineProperty;\nvar __defProps6 = Object.defineProperties;\nvar __getOwnPropDesc9 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum7 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp7 = (obj, key, value) => key in obj ? __defProp9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp8.call(b, prop))\n __defNormalProp7(a, prop, b[prop]);\n if (__getOwnPropSymbols7)\n for (var prop of __getOwnPropSymbols7(b)) {\n if (__propIsEnum7.call(b, prop))\n __defNormalProp7(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps6 = (a, b) => __defProps6(a, __getOwnPropDescs6(b));\nvar __decorateClass9 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc9(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp9(target, key, result);\n return result;\n};\nvar coreFactory = {\n getTemplate(author) {\n const dt = /* @__PURE__ */ new Date();\n const jsonDate = dt.toJSON();\n return {\n name: \"cp:coreProperties\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n cp: \"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\",\n dc: \"http://purl.org/dc/elements/1.1/\",\n dcterms: \"http://purl.org/dc/terms/\",\n dcmitype: \"http://purl.org/dc/dcmitype/\",\n xsi: \"http://www.w3.org/2001/XMLSchema-instance\"\n }\n }]\n },\n children: [{\n name: \"dc:creator\",\n textNode: author\n }, {\n name: \"dc:title\",\n textNode: \"Workbook\"\n }, {\n name: \"dcterms:created\",\n properties: {\n rawMap: {\n \"xsi:type\": \"dcterms:W3CDTF\"\n }\n },\n textNode: jsonDate\n }, {\n name: \"dcterms:modified\",\n properties: {\n rawMap: {\n \"xsi:type\": \"dcterms:W3CDTF\"\n }\n },\n textNode: jsonDate\n }]\n };\n }\n};\nvar core_default = coreFactory;\nvar contentTypeFactory = {\n getTemplate(config) {\n const { name, ContentType, Extension, PartName } = config;\n return {\n name,\n properties: {\n rawMap: {\n Extension,\n PartName,\n ContentType\n }\n }\n };\n }\n};\nvar contentType_default = contentTypeFactory;\nvar contentTypesFactory = {\n getTemplate(sheetLen) {\n const worksheets = new Array(sheetLen).fill(void 0).map((v, i) => ({\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\",\n PartName: `/xl/worksheets/sheet${i + 1}.xml`\n }));\n const sheetsWithImages = ExcelXlsxFactory.worksheetImages.size;\n const headerFooterImages = ExcelXlsxFactory.worksheetHeaderFooterImages.size;\n const sheetsWithTables = ExcelXlsxFactory.worksheetDataTables.size;\n const imageTypesObject = {};\n ExcelXlsxFactory.workbookImageIds.forEach((v) => {\n const type = v.type === \"jpg\" ? \"jpeg\" : v.type;\n imageTypesObject[type] = true;\n });\n const imageDocs = new Array(sheetsWithImages).fill(void 0).map((v, i) => ({\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.drawing+xml\",\n PartName: `/xl/drawings/drawing${i + 1}.xml`\n }));\n const tableDocs = new Array(sheetsWithTables).fill(void 0).map((v, i) => ({\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\",\n PartName: `/xl/tables/${ExcelXlsxFactory.getTableNameFromIndex(i)}.xml`\n }));\n const imageTypes = Object.keys(imageTypesObject).map((ext) => ({\n name: \"Default\",\n ContentType: `image/${ext}`,\n Extension: ext\n }));\n if (headerFooterImages) {\n imageTypes.push({\n name: \"Default\",\n Extension: \"vml\",\n ContentType: \"application/vnd.openxmlformats-officedocument.vmlDrawing\"\n });\n }\n const children = [\n ...imageTypes,\n {\n name: \"Default\",\n Extension: \"rels\",\n ContentType: \"application/vnd.openxmlformats-package.relationships+xml\"\n },\n {\n name: \"Default\",\n ContentType: \"application/xml\",\n Extension: \"xml\"\n },\n {\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\",\n PartName: \"/xl/workbook.xml\"\n },\n ...worksheets,\n {\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.theme+xml\",\n PartName: \"/xl/theme/theme1.xml\"\n },\n {\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\",\n PartName: \"/xl/styles.xml\"\n },\n {\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\",\n PartName: \"/xl/sharedStrings.xml\"\n },\n ...imageDocs,\n ...tableDocs,\n {\n name: \"Override\",\n ContentType: \"application/vnd.openxmlformats-package.core-properties+xml\",\n PartName: \"/docProps/core.xml\"\n }\n ].map((contentType) => contentType_default.getTemplate(contentType));\n return {\n name: \"Types\",\n properties: {\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/package/2006/content-types\"\n }\n },\n children\n };\n }\n};\nvar contentTypes_default = contentTypesFactory;\nvar INCH_TO_EMU = 9525;\nvar numberFormatMap = {\n \"0\": 1,\n \"0.00\": 2,\n \"#,##0\": 3,\n \"#,##0.00\": 4,\n \"0%\": 9,\n \"0.00%\": 10,\n \"0.00E+00\": 11,\n \"# ?/?\": 12,\n \"# ??/??\": 13,\n \"mm-dd-yy\": 14,\n \"d-mmm-yy\": 15,\n \"d-mmm\": 16,\n \"mmm-yy\": 17,\n \"h:mm AM/PM\": 18,\n \"h:mm:ss AM/PM\": 19,\n \"h:mm\": 20,\n \"h:mm:ss\": 21,\n \"m/d/yy h:mm\": 22,\n \"#,##0 ;(#,##0)\": 37,\n \"#,##0 ;[Red](#,##0)\": 38,\n \"#,##0.00;(#,##0.00)\": 39,\n \"#,##0.00;[Red](#,##0.00)\": 40,\n \"mm:ss\": 45,\n \"[h]:mm:ss\": 46,\n \"mmss.0\": 47,\n \"##0.0E+0\": 48,\n \"@\": 49\n};\nvar pixelsToPoint = (pixels) => {\n return Math.round(pixels * 72 / 96);\n};\nvar pointsToPixel = (points) => {\n return Math.round(points * 96 / 72);\n};\nvar pixelsToEMU = (value) => {\n return Math.ceil(value * INCH_TO_EMU);\n};\nvar getFontFamilyId = (name) => {\n if (name === void 0) {\n return;\n }\n const families = [\"Automatic\", \"Roman\", \"Swiss\", \"Modern\", \"Script\", \"Decorative\"];\n const pos = families.indexOf(name || \"Automatic\");\n return Math.max(pos, 0);\n};\nvar getHeightFromProperty = (rowIndex, height) => {\n if (!height) {\n return;\n }\n let finalHeight;\n if (typeof height === \"number\") {\n finalHeight = height;\n } else {\n const heightFunc = height;\n finalHeight = heightFunc({ rowIndex });\n }\n return pixelsToPoint(finalHeight);\n};\nvar setExcelImageTotalWidth = (image, columnsToExport) => {\n const { colSpan, column } = image.position;\n if (!image.width) {\n return;\n }\n if (colSpan) {\n const columnsInSpan = columnsToExport.slice(column - 1, column + colSpan - 1);\n let totalWidth = 0;\n for (let i = 0; i < columnsInSpan.length; i++) {\n const colWidth = columnsInSpan[i].getActualWidth();\n if (image.width < totalWidth + colWidth) {\n image.position.colSpan = i + 1;\n image.totalWidth = image.width;\n image.width = image.totalWidth - totalWidth;\n break;\n }\n totalWidth += colWidth;\n }\n } else {\n image.totalWidth = image.width;\n }\n};\nvar setExcelImageTotalHeight = (image, rowHeight) => {\n const { rowSpan, row } = image.position;\n if (!image.height) {\n return;\n }\n if (rowSpan) {\n let totalHeight = 0;\n let counter = 0;\n for (let i = row; i < row + rowSpan; i++) {\n const nextRowHeight = pointsToPixel(getHeightFromProperty(i, rowHeight) || 20);\n if (image.height < totalHeight + nextRowHeight) {\n image.position.rowSpan = counter + 1;\n image.totalHeight = image.height;\n image.height = image.totalHeight - totalHeight;\n break;\n }\n totalHeight += nextRowHeight;\n counter++;\n }\n } else {\n image.totalHeight = image.height;\n }\n};\nvar createXmlPart = (body, skipHeader) => {\n const header = XmlFactory.createHeader({\n encoding: \"UTF-8\",\n standalone: \"yes\"\n });\n const xmlBody = XmlFactory.createXml(body);\n if (skipHeader) {\n return xmlBody;\n }\n return `${header}${xmlBody}`;\n};\nvar getExcelColumnName = (colIdx) => {\n const startCode = 65;\n const tableWidth = 26;\n const fromCharCode = String.fromCharCode;\n const pos = Math.floor(colIdx / tableWidth);\n const tableIdx = colIdx % tableWidth;\n if (!pos || colIdx === tableWidth) {\n return fromCharCode(startCode + colIdx - 1);\n }\n if (!tableIdx) {\n return getExcelColumnName(pos - 1) + \"Z\";\n }\n if (pos < tableWidth) {\n return fromCharCode(startCode + pos - 1) + fromCharCode(startCode + tableIdx - 1);\n }\n return getExcelColumnName(pos) + fromCharCode(startCode + tableIdx - 1);\n};\nvar getAnchor = (name, imageAnchor) => ({\n name: `xdr:${name}`,\n children: [{\n name: \"xdr:col\",\n textNode: imageAnchor.col.toString()\n }, {\n name: \"xdr:colOff\",\n textNode: imageAnchor.offsetX.toString()\n }, {\n name: \"xdr:row\",\n textNode: imageAnchor.row.toString()\n }, {\n name: \"xdr:rowOff\",\n textNode: imageAnchor.offsetY.toString()\n }]\n});\nvar getExt = (image) => {\n const children = [{\n name: \"a:ext\",\n properties: {\n rawMap: {\n uri: \"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}\"\n }\n },\n children: [{\n name: \"a16:creationId\",\n properties: {\n rawMap: {\n \"id\": \"{822E6D20-D7BC-2841-A643-D49A6EF008A2}\",\n \"xmlns:a16\": \"http://schemas.microsoft.com/office/drawing/2014/main\"\n }\n }\n }]\n }];\n const recolor = image.recolor && image.recolor.toLowerCase();\n switch (recolor) {\n case \"grayscale\":\n case \"sepia\":\n case \"washout\":\n children.push({\n name: \"a:ext\",\n properties: {\n rawMap: {\n uri: \"{C183D7F6-B498-43B3-948B-1728B52AA6E4}\"\n }\n },\n children: [{\n name: \"adec:decorative\",\n properties: {\n rawMap: {\n \"val\": \"0\",\n \"xmlns:adec\": \"http://schemas.microsoft.com/office/drawing/2017/decorative\"\n }\n }\n }]\n });\n }\n return {\n name: \"a:extLst\",\n children\n };\n};\nvar getNvPicPr = (image, index) => ({\n name: \"xdr:nvPicPr\",\n children: [{\n name: \"xdr:cNvPr\",\n properties: {\n rawMap: {\n id: index,\n name: image.id,\n descr: image.altText != null ? image.altText : void 0\n }\n },\n children: [getExt(image)]\n }, {\n name: \"xdr:cNvPicPr\",\n properties: {\n rawMap: {\n preferRelativeResize: \"0\"\n }\n },\n children: [{\n name: \"a:picLocks\"\n }]\n }]\n});\nvar getColorDetails = (color) => {\n if (!color.saturation && !color.tint) {\n return;\n }\n const ret = [];\n if (color.saturation) {\n ret.push({\n name: \"a:satMod\",\n properties: {\n rawMap: {\n val: color.saturation * 1e3\n }\n }\n });\n }\n if (color.tint) {\n ret.push({\n name: \"a:tint\",\n properties: {\n rawMap: {\n val: color.tint * 1e3\n }\n }\n });\n }\n return ret;\n};\nvar getDuoTone = (primaryColor, secondaryColor) => {\n return {\n name: \"a:duotone\",\n children: [{\n name: \"a:prstClr\",\n properties: {\n rawMap: {\n val: primaryColor.color\n }\n },\n children: getColorDetails(primaryColor)\n }, {\n name: \"a:srgbClr\",\n properties: {\n rawMap: {\n val: secondaryColor.color\n }\n },\n children: getColorDetails(secondaryColor)\n }]\n };\n};\nvar getBlipFill = (image, index) => {\n let blipChildren;\n if (image.transparency) {\n const transparency = Math.min(Math.max(image.transparency, 0), 100);\n blipChildren = [{\n name: \"a:alphaModFix\",\n properties: {\n rawMap: {\n amt: 1e5 - Math.round(transparency * 1e3)\n }\n }\n }];\n }\n if (image.recolor) {\n if (!blipChildren) {\n blipChildren = [];\n }\n switch (image.recolor.toLocaleLowerCase()) {\n case \"grayscale\":\n blipChildren.push({ name: \"a:grayscl\" });\n break;\n case \"sepia\":\n blipChildren.push(getDuoTone({ color: \"black\" }, { color: \"D9C3A5\", tint: 50, saturation: 180 }));\n break;\n case \"washout\":\n blipChildren.push({\n name: \"a:lum\",\n properties: {\n rawMap: {\n bright: \"70000\",\n contrast: \"-70000\"\n }\n }\n });\n break;\n default:\n }\n }\n return {\n name: \"xdr:blipFill\",\n children: [{\n name: \"a:blip\",\n properties: {\n rawMap: {\n \"cstate\": \"print\",\n \"r:embed\": `rId${index}`,\n \"xmlns:r\": \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n }\n },\n children: blipChildren\n }, {\n name: \"a:stretch\",\n children: [{\n name: \"a:fillRect\"\n }]\n }]\n };\n};\nvar getSpPr = (image, imageBoxSize) => {\n const xfrm = {\n name: \"a:xfrm\",\n children: [{\n name: \"a:off\",\n properties: {\n rawMap: {\n x: 0,\n y: 0\n }\n }\n }, {\n name: \"a:ext\",\n properties: {\n rawMap: {\n cx: imageBoxSize.width,\n cy: imageBoxSize.height\n }\n }\n }]\n };\n if (image.rotation) {\n const rotation = image.rotation;\n xfrm.properties = {\n rawMap: {\n rot: Math.min(Math.max(rotation, 0), 360) * 6e4\n }\n };\n }\n const prstGeom = {\n name: \"a:prstGeom\",\n properties: {\n rawMap: {\n prst: \"rect\"\n }\n },\n children: [{ name: \"a:avLst\" }]\n };\n const ret = {\n name: \"xdr:spPr\",\n children: [xfrm, prstGeom]\n };\n return ret;\n};\nvar getImageBoxSize = (image) => {\n image.fitCell = !!image.fitCell || (!image.width || !image.height);\n const { position = {}, fitCell, width = 0, height = 0, totalHeight, totalWidth } = image;\n const { offsetX = 0, offsetY = 0, row = 1, rowSpan = 1, column = 1, colSpan = 1 } = position;\n return {\n from: {\n row: row - 1,\n col: column - 1,\n offsetX: pixelsToEMU(offsetX),\n offsetY: pixelsToEMU(offsetY)\n },\n to: {\n row: row - 1 + (fitCell ? 1 : rowSpan - 1),\n col: column - 1 + (fitCell ? 1 : colSpan - 1),\n offsetX: pixelsToEMU(width + offsetX),\n offsetY: pixelsToEMU(height + offsetY)\n },\n height: pixelsToEMU(totalHeight || height),\n width: pixelsToEMU(totalWidth || width)\n };\n};\nvar getPicture = (image, currentIndex, worksheetImageIndex, imageBoxSize) => {\n return {\n name: \"xdr:pic\",\n children: [\n getNvPicPr(image, currentIndex + 1),\n getBlipFill(image, worksheetImageIndex + 1),\n getSpPr(image, imageBoxSize)\n ]\n };\n};\nvar drawingFactory = {\n getTemplate(config) {\n const { sheetIndex } = config;\n const sheetImages = ExcelXlsxFactory.worksheetImages.get(sheetIndex);\n const sheetImageIds = ExcelXlsxFactory.worksheetImageIds.get(sheetIndex);\n const children = sheetImages.map((image, idx) => {\n const boxSize = getImageBoxSize(image);\n return {\n name: \"xdr:twoCellAnchor\",\n properties: {\n rawMap: {\n editAs: \"absolute\"\n }\n },\n children: [\n getAnchor(\"from\", boxSize.from),\n getAnchor(\"to\", boxSize.to),\n getPicture(image, idx, sheetImageIds.get(image.id).index, boxSize),\n { name: \"xdr:clientData\" }\n ]\n };\n });\n return {\n name: \"xdr:wsDr\",\n properties: {\n rawMap: {\n \"xmlns:a\": \"http://schemas.openxmlformats.org/drawingml/2006/main\",\n \"xmlns:xdr\": \"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\"\n }\n },\n children\n };\n }\n};\nvar drawing_default = drawingFactory;\nvar tableFactory = {\n getTemplate(dataTable, idx) {\n const {\n name,\n columns,\n rowCount,\n displayName,\n headerRowIndex,\n showRowStripes,\n showColumnStripes,\n showFilterButtons,\n highlightFirstColumn,\n highlightLastColumn\n } = dataTable || {};\n if (!dataTable || !name || !Array.isArray(columns) || !columns.length || !rowCount) {\n return { name: \"table\" };\n }\n const filterColumns = columns.map((col, idx2) => ({\n name: \"filterColumn\",\n properties: {\n rawMap: {\n colId: idx2.toString(),\n // For filters, this should start with 0\n hiddenButton: showFilterButtons[idx2] ? 0 : 1\n }\n }\n }));\n const firstRow = headerRowIndex + 1;\n const id = (idx + 1).toString();\n const firstCell = `A${firstRow}`;\n const lastCell = `${String.fromCharCode(64 + columns.length)}${firstRow + rowCount}`;\n const ref = `${firstCell}:${lastCell}`;\n const displayNameToUse = idx ? `${displayName}_${idx + 1}` : displayName;\n return {\n name: \"table\",\n properties: {\n rawMap: {\n \"xmlns\": \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\n \"xmlns:mc\": \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n \"mc:Ignorable\": \"xr xr3\",\n \"xmlns:xr\": \"http://schemas.microsoft.com/office/spreadsheetml/2014/revision\",\n \"xmlns:xr3\": \"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3\",\n \"name\": name,\n \"displayName\": displayNameToUse,\n \"ref\": ref,\n \"totalsRowShown\": 0,\n \"id\": id\n }\n },\n children: [\n {\n name: \"autoFilter\",\n properties: {\n rawMap: {\n ref\n }\n },\n children: filterColumns\n },\n {\n name: \"tableColumns\",\n properties: {\n rawMap: {\n count: columns.length\n }\n },\n children: columns.map((col, idx2) => ({\n name: \"tableColumn\",\n properties: {\n rawMap: {\n id: (idx2 + 1).toString(),\n name: col,\n dataCellStyle: \"Normal\"\n }\n }\n }))\n },\n {\n name: \"tableStyleInfo\",\n properties: {\n rawMap: {\n name: \"TableStyleLight1\",\n showFirstColumn: highlightFirstColumn ? 1 : 0,\n showLastColumn: highlightLastColumn ? 1 : 0,\n showRowStripes: showRowStripes ? 1 : 0,\n showColumnStripes: showColumnStripes ? 1 : 0\n }\n }\n }\n ]\n };\n }\n};\nvar table_default = tableFactory;\nvar getColorChildren = (props) => {\n const [type, innerType, val, lastClr] = props;\n return {\n name: `a:${type}`,\n children: [{\n name: `a:${innerType}`,\n properties: {\n rawMap: {\n val,\n lastClr\n }\n }\n }]\n };\n};\nvar colorScheme = {\n getTemplate() {\n return {\n name: \"a:clrScheme\",\n properties: {\n rawMap: {\n name: \"Office\"\n }\n },\n children: [\n getColorChildren([\"dk1\", \"sysClr\", \"windowText\", \"000000\"]),\n getColorChildren([\"lt1\", \"sysClr\", \"window\", \"FFFFFF\"]),\n getColorChildren([\"dk2\", \"srgbClr\", \"44546A\"]),\n getColorChildren([\"lt2\", \"srgbClr\", \"E7E6E6\"]),\n getColorChildren([\"accent1\", \"srgbClr\", \"4472C4\"]),\n getColorChildren([\"accent2\", \"srgbClr\", \"ED7D31\"]),\n getColorChildren([\"accent3\", \"srgbClr\", \"A5A5A5\"]),\n getColorChildren([\"accent4\", \"srgbClr\", \"FFC000\"]),\n getColorChildren([\"accent5\", \"srgbClr\", \"5B9BD5\"]),\n getColorChildren([\"accent6\", \"srgbClr\", \"70AD47\"]),\n getColorChildren([\"hlink\", \"srgbClr\", \"0563C1\"]),\n getColorChildren([\"folHlink\", \"srgbClr\", \"954F72\"])\n ]\n };\n }\n};\nvar colorScheme_default = colorScheme;\nvar getFont = (props) => {\n const [type, typeface, script, panose] = props;\n return {\n name: `a:${type}`,\n properties: {\n rawMap: {\n script,\n typeface,\n panose\n }\n }\n };\n};\nvar fontScheme = {\n getTemplate() {\n return {\n name: \"a:fontScheme\",\n properties: {\n rawMap: {\n name: \"Office\"\n }\n },\n children: [{\n name: \"a:majorFont\",\n children: [\n getFont([\"latin\", \"Calibri Light\", void 0, \"020F0302020204030204\"]),\n getFont([\"ea\", \"\"]),\n getFont([\"cs\", \"\"]),\n getFont([\"font\", \"\\u6E38\\u30B4\\u30B7\\u30C3\\u30AF Light\", \"Jpan\"]),\n getFont([\"font\", \"\\uB9D1\\uC740 \\uACE0\\uB515\", \"Hang\"]),\n getFont([\"font\", \"\\u7B49\\u7EBF Light\", \"Hans\"]),\n getFont([\"font\", \"\\u65B0\\u7D30\\u660E\\u9AD4\", \"Hant\"]),\n getFont([\"font\", \"Times New Roman\", \"Arab\"]),\n getFont([\"font\", \"Times New Roman\", \"Hebr\"]),\n getFont([\"font\", \"Tahoma\", \"Thai\"]),\n getFont([\"font\", \"Nyala\", \"Ethi\"]),\n getFont([\"font\", \"Vrinda\", \"Beng\"]),\n getFont([\"font\", \"Shruti\", \"Gujr\"]),\n getFont([\"font\", \"MoolBoran\", \"Khmr\"]),\n getFont([\"font\", \"Tunga\", \"Knda\"]),\n getFont([\"font\", \"Raavi\", \"Guru\"]),\n getFont([\"font\", \"Euphemia\", \"Cans\"]),\n getFont([\"font\", \"Plantagenet Cherokee\", \"Cher\"]),\n getFont([\"font\", \"Microsoft Yi Baiti\", \"Yiii\"]),\n getFont([\"font\", \"Microsoft Himalaya\", \"Tibt\"]),\n getFont([\"font\", \"MV Boli\", \"Thaa\"]),\n getFont([\"font\", \"Mangal\", \"Deva\"]),\n getFont([\"font\", \"Gautami\", \"Telu\"]),\n getFont([\"font\", \"Latha\", \"Taml\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syrc\"]),\n getFont([\"font\", \"Kalinga\", \"Orya\"]),\n getFont([\"font\", \"Kartika\", \"Mlym\"]),\n getFont([\"font\", \"DokChampa\", \"Laoo\"]),\n getFont([\"font\", \"Iskoola Pota\", \"Sinh\"]),\n getFont([\"font\", \"Mongolian Baiti\", \"Mong\"]),\n getFont([\"font\", \"Times New Roman\", \"Viet\"]),\n getFont([\"font\", \"Microsoft Uighur\", \"Uigh\"]),\n getFont([\"font\", \"Sylfaen\", \"Geor\"]),\n getFont([\"font\", \"Arial\", \"Armn\"]),\n getFont([\"font\", \"Leelawadee UI\", \"Bugi\"]),\n getFont([\"font\", \"Microsoft JhengHei\", \"Bopo\"]),\n getFont([\"font\", \"Javanese Text\", \"Java\"]),\n getFont([\"font\", \"Segoe UI\", \"Lisu\"]),\n getFont([\"font\", \"Myanmar Text\", \"Mymr\"]),\n getFont([\"font\", \"Ebrima\", \"Nkoo\"]),\n getFont([\"font\", \"Nirmala UI\", \"Olck\"]),\n getFont([\"font\", \"Ebrima\", \"Osma\"]),\n getFont([\"font\", \"Phagspa\", \"Phag\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syrn\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syrj\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syre\"]),\n getFont([\"font\", \"Nirmala UI\", \"Sora\"]),\n getFont([\"font\", \"Microsoft Tai Le\", \"Tale\"]),\n getFont([\"font\", \"Microsoft New Tai Lue\", \"Talu\"]),\n getFont([\"font\", \"Ebrima\", \"Tfng\"])\n ]\n }, {\n name: \"a:minorFont\",\n children: [\n getFont([\"latin\", \"Calibri\", void 0, \"020F0502020204030204\"]),\n getFont([\"ea\", \"\"]),\n getFont([\"cs\", \"\"]),\n getFont([\"font\", \"\\u6E38\\u30B4\\u30B7\\u30C3\\u30AF\", \"Jpan\"]),\n getFont([\"font\", \"\\uB9D1\\uC740 \\uACE0\\uB515\", \"Hang\"]),\n getFont([\"font\", \"\\u7B49\\u7EBF\", \"Hans\"]),\n getFont([\"font\", \"\\u65B0\\u7D30\\u660E\\u9AD4\", \"Hant\"]),\n getFont([\"font\", \"Arial\", \"Arab\"]),\n getFont([\"font\", \"Arial\", \"Hebr\"]),\n getFont([\"font\", \"Tahoma\", \"Thai\"]),\n getFont([\"font\", \"Nyala\", \"Ethi\"]),\n getFont([\"font\", \"Vrinda\", \"Beng\"]),\n getFont([\"font\", \"Shruti\", \"Gujr\"]),\n getFont([\"font\", \"DaunPenh\", \"Khmr\"]),\n getFont([\"font\", \"Tunga\", \"Knda\"]),\n getFont([\"font\", \"Raavi\", \"Guru\"]),\n getFont([\"font\", \"Euphemia\", \"Cans\"]),\n getFont([\"font\", \"Plantagenet Cherokee\", \"Cher\"]),\n getFont([\"font\", \"Microsoft Yi Baiti\", \"Yiii\"]),\n getFont([\"font\", \"Microsoft Himalaya\", \"Tibt\"]),\n getFont([\"font\", \"MV Boli\", \"Thaa\"]),\n getFont([\"font\", \"Mangal\", \"Deva\"]),\n getFont([\"font\", \"Gautami\", \"Telu\"]),\n getFont([\"font\", \"Latha\", \"Taml\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syrc\"]),\n getFont([\"font\", \"Kalinga\", \"Orya\"]),\n getFont([\"font\", \"Kartika\", \"Mlym\"]),\n getFont([\"font\", \"DokChampa\", \"Laoo\"]),\n getFont([\"font\", \"Iskoola Pota\", \"Sinh\"]),\n getFont([\"font\", \"Mongolian Baiti\", \"Mong\"]),\n getFont([\"font\", \"Arial\", \"Viet\"]),\n getFont([\"font\", \"Microsoft Uighur\", \"Uigh\"]),\n getFont([\"font\", \"Sylfaen\", \"Geor\"]),\n getFont([\"font\", \"Arial\", \"Armn\"]),\n getFont([\"font\", \"Leelawadee UI\", \"Bugi\"]),\n getFont([\"font\", \"Microsoft JhengHei\", \"Bopo\"]),\n getFont([\"font\", \"Javanese Text\", \"Java\"]),\n getFont([\"font\", \"Segoe UI\", \"Lisu\"]),\n getFont([\"font\", \"Myanmar Text\", \"Mymr\"]),\n getFont([\"font\", \"Ebrima\", \"Nkoo\"]),\n getFont([\"font\", \"Nirmala UI\", \"Olck\"]),\n getFont([\"font\", \"Ebrima\", \"Osma\"]),\n getFont([\"font\", \"Phagspa\", \"Phag\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syrn\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syrj\"]),\n getFont([\"font\", \"Estrangelo Edessa\", \"Syre\"]),\n getFont([\"font\", \"Nirmala UI\", \"Sora\"]),\n getFont([\"font\", \"Microsoft Tai Le\", \"Tale\"]),\n getFont([\"font\", \"Microsoft New Tai Lue\", \"Talu\"]),\n getFont([\"font\", \"Ebrima\", \"Tfng\"])\n ]\n }]\n };\n }\n};\nvar fontScheme_default = fontScheme;\nvar getPropertyVal = (name, val, children) => ({\n name: `a:${name}`,\n properties: {\n rawMap: {\n val\n }\n },\n children\n});\nvar getGs = (props) => {\n const [pos, schemeColor, satMod, lumMod, tint, shade] = props;\n const children = [];\n children.push(getPropertyVal(\"satMod\", satMod));\n if (lumMod) {\n children.push(getPropertyVal(\"lumMod\", lumMod));\n }\n if (tint) {\n children.push(getPropertyVal(\"tint\", tint));\n }\n if (shade) {\n children.push(getPropertyVal(\"shade\", shade));\n }\n return {\n name: \"a:gs\",\n properties: {\n rawMap: {\n pos\n }\n },\n children: [{\n name: \"a:schemeClr\",\n properties: {\n rawMap: {\n val: schemeColor\n }\n },\n children\n }]\n };\n};\nvar getSolidFill = (val, children) => ({\n name: \"a:solidFill\",\n children: [getPropertyVal(\"schemeClr\", val, children)]\n});\nvar getGradFill = (props) => {\n const [rotWithShape, gs1, gs2, gs3, lin] = props;\n const [ang, scaled] = lin;\n return {\n name: \"a:gradFill\",\n properties: {\n rawMap: {\n rotWithShape\n }\n },\n children: [{\n name: \"a:gsLst\",\n children: [\n getGs(gs1),\n getGs(gs2),\n getGs(gs3)\n ]\n }, {\n name: \"a:lin\",\n properties: {\n rawMap: {\n ang,\n scaled\n }\n }\n }]\n };\n};\nvar getLine = (props) => {\n const [w, cap, cmpd, algn] = props;\n return {\n name: \"a:ln\",\n properties: {\n rawMap: { w, cap, cmpd, algn }\n },\n children: [\n getSolidFill(\"phClr\"),\n getPropertyVal(\"prstDash\", \"solid\"),\n {\n name: \"a:miter\",\n properties: {\n rawMap: {\n lim: \"800000\"\n }\n }\n }\n ]\n };\n};\nvar getEffectStyle = (shadow) => {\n const children = [];\n if (shadow) {\n const [blurRad, dist, dir, algn, rotWithShape] = shadow;\n children.push({\n name: \"a:outerShdw\",\n properties: {\n rawMap: { blurRad, dist, dir, algn, rotWithShape }\n },\n children: [\n getPropertyVal(\"srgbClr\", \"000000\", [getPropertyVal(\"alpha\", \"63000\")])\n ]\n });\n }\n return {\n name: \"a:effectStyle\",\n children: [Object.assign({}, {\n name: \"a:effectLst\"\n }, children.length ? { children } : {})]\n };\n};\nvar getFillStyleList = () => ({\n name: \"a:fillStyleLst\",\n children: [\n getSolidFill(\"phClr\"),\n getGradFill([\n \"1\",\n [\"0\", \"phClr\", \"105000\", \"110000\", \"67000\"],\n [\"50000\", \"phClr\", \"103000\", \"105000\", \"73000\"],\n [\"100000\", \"phClr\", \"109000\", \"105000\", \"81000\"],\n [\"5400000\", \"0\"]\n ]),\n getGradFill([\n \"1\",\n [\"0\", \"phClr\", \"103000\", \"102000\", \"94000\"],\n [\"50000\", \"phClr\", \"110000\", \"100000\", void 0, \"100000\"],\n [\"100000\", \"phClr\", \"120000\", \"99000\", void 0, \"78000\"],\n [\"5400000\", \"0\"]\n ])\n ]\n});\nvar getLineStyleList = () => ({\n name: \"a:lnStyleLst\",\n children: [\n getLine([\"6350\", \"flat\", \"sng\", \"ctr\"]),\n getLine([\"12700\", \"flat\", \"sng\", \"ctr\"]),\n getLine([\"19050\", \"flat\", \"sng\", \"ctr\"])\n ]\n});\nvar getEffectStyleList = () => ({\n name: \"a:effectStyleLst\",\n children: [\n getEffectStyle(),\n getEffectStyle(),\n getEffectStyle([\"57150\", \"19050\", \"5400000\", \"ctr\", \"0\"])\n ]\n});\nvar getBgFillStyleList = () => ({\n name: \"a:bgFillStyleLst\",\n children: [\n getSolidFill(\"phClr\"),\n getSolidFill(\"phClr\", [\n getPropertyVal(\"tint\", \"95000\"),\n getPropertyVal(\"satMod\", \"170000\")\n ]),\n getGradFill([\n \"1\",\n [\"0\", \"phClr\", \"150000\", \"102000\", \"93000\", \"98000\"],\n [\"50000\", \"phClr\", \"130000\", \"103000\", \"98000\", \"90000\"],\n [\"100000\", \"phClr\", \"120000\", void 0, void 0, \"63000\"],\n [\"5400000\", \"0\"]\n ])\n ]\n});\nvar formatScheme = {\n getTemplate() {\n return {\n name: \"a:fmtScheme\",\n properties: {\n rawMap: {\n name: \"Office\"\n }\n },\n children: [\n getFillStyleList(),\n getLineStyleList(),\n getEffectStyleList(),\n getBgFillStyleList()\n ]\n };\n }\n};\nvar formatScheme_default = formatScheme;\nvar themeElements = {\n getTemplate() {\n return {\n name: \"a:themeElements\",\n children: [\n colorScheme_default.getTemplate(),\n fontScheme_default.getTemplate(),\n formatScheme_default.getTemplate()\n ]\n };\n }\n};\nvar themeElements_default = themeElements;\nvar officeTheme = {\n getTemplate() {\n return {\n name: \"a:theme\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n a: \"http://schemas.openxmlformats.org/drawingml/2006/main\"\n }\n }],\n rawMap: {\n name: \"Office Theme\"\n }\n },\n children: [\n themeElements_default.getTemplate(),\n {\n name: \"a:objectDefaults\"\n },\n {\n name: \"a:extraClrSchemeLst\"\n }\n ]\n };\n }\n};\nvar office_default = officeTheme;\nvar buildSharedString = (strMap) => {\n const ret = [];\n for (const key of strMap.keys()) {\n const textNode = key.toString();\n const child = {\n name: \"t\",\n textNode: _40.escapeString(textNode)\n };\n const preserveSpaces = textNode.trim().length !== textNode.length;\n if (preserveSpaces) {\n child.properties = {\n rawMap: {\n \"xml:space\": \"preserve\"\n }\n };\n }\n ret.push({\n name: \"si\",\n children: [child]\n });\n }\n return ret;\n};\nvar sharedStrings = {\n getTemplate(strings) {\n return {\n name: \"sst\",\n properties: {\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\n count: strings.size,\n uniqueCount: strings.size\n }\n },\n children: buildSharedString(strings)\n };\n }\n};\nvar sharedStrings_default = sharedStrings;\nfunction prepareString(str) {\n const split = str.split(/(\\[[^\\]]*\\])/);\n for (let i = 0; i < split.length; i++) {\n let currentString = split[i];\n if (!currentString.length) {\n continue;\n }\n if (!currentString.startsWith(\"[\")) {\n currentString = currentString.replace(/\\$/g, '\"$\"');\n }\n split[i] = _212.escapeString(currentString);\n }\n return split.join(\"\");\n}\nvar numberFormatFactory = {\n getTemplate(numberFormat) {\n let { formatCode, numFmtId } = numberFormat;\n if (formatCode.length) {\n formatCode = prepareString(formatCode);\n }\n return {\n name: \"numFmt\",\n properties: {\n rawMap: {\n formatCode,\n numFmtId\n }\n }\n };\n }\n};\nvar numberFormat_default = numberFormatFactory;\nvar numberFormatsFactory = {\n getTemplate(numberFormats) {\n return {\n name: \"numFmts\",\n properties: {\n rawMap: {\n count: numberFormats.length\n }\n },\n children: numberFormats.map((numberFormat) => numberFormat_default.getTemplate(numberFormat))\n };\n }\n};\nvar numberFormats_default = numberFormatsFactory;\nvar fontFactory = {\n getTemplate(font) {\n const {\n size,\n colorTheme,\n color = \"FF000000\",\n fontName = \"Calibri\",\n family,\n scheme,\n italic,\n bold,\n strikeThrough,\n outline,\n shadow,\n underline,\n verticalAlign\n } = font;\n const children = [\n { name: \"sz\", properties: { rawMap: { val: size } } },\n { name: \"color\", properties: { rawMap: { theme: colorTheme, rgb: color } } },\n { name: \"name\", properties: { rawMap: { val: fontName } } }\n ];\n if (family) {\n children.push({ name: \"family\", properties: { rawMap: { val: family } } });\n }\n if (scheme) {\n children.push({ name: \"scheme\", properties: { rawMap: { val: scheme } } });\n }\n if (italic) {\n children.push({ name: \"i\" });\n }\n if (bold) {\n children.push({ name: \"b\" });\n }\n if (strikeThrough) {\n children.push({ name: \"strike\" });\n }\n if (outline) {\n children.push({ name: \"outline\" });\n }\n if (shadow) {\n children.push({ name: \"shadow\" });\n }\n if (underline) {\n children.push({ name: \"u\", properties: { rawMap: { val: underline } } });\n }\n if (verticalAlign) {\n children.push({ name: \"vertAlign\", properties: { rawMap: { val: verticalAlign } } });\n }\n return { name: \"font\", children };\n }\n};\nvar font_default = fontFactory;\nvar fontsFactory = {\n getTemplate(fonts) {\n return {\n name: \"fonts\",\n properties: {\n rawMap: {\n count: fonts.length\n }\n },\n children: fonts.map((font) => font_default.getTemplate(font))\n };\n }\n};\nvar fonts_default = fontsFactory;\nvar fillFactory = {\n getTemplate(fill) {\n const { patternType, fgTheme, fgTint, fgRgb, bgRgb, bgIndexed } = fill;\n const pf = {\n name: \"patternFill\",\n properties: {\n rawMap: {\n patternType\n }\n }\n };\n if (fgTheme || fgTint || fgRgb) {\n pf.children = [{\n name: \"fgColor\",\n properties: {\n rawMap: {\n theme: fgTheme,\n tint: fgTint,\n rgb: fgRgb\n }\n }\n }];\n }\n if (bgIndexed || bgRgb) {\n if (!pf.children) {\n pf.children = [];\n }\n pf.children.push({\n name: \"bgColor\",\n properties: {\n rawMap: {\n indexed: bgIndexed,\n rgb: bgRgb\n }\n }\n });\n }\n return {\n name: \"fill\",\n children: [pf]\n };\n }\n};\nvar fill_default = fillFactory;\nvar fillsFactory = {\n getTemplate(fills) {\n return {\n name: \"fills\",\n properties: {\n rawMap: {\n count: fills.length\n }\n },\n children: fills.map((fill) => fill_default.getTemplate(fill))\n };\n }\n};\nvar fills_default = fillsFactory;\nvar getWeightName = (value) => {\n switch (value) {\n case 1:\n return \"thin\";\n case 2:\n return \"medium\";\n case 3:\n return \"thick\";\n default:\n return \"hair\";\n }\n};\nvar mappedBorderNames = {\n None: \"None\",\n Dot: \"Dotted\",\n Dash: \"Dashed\",\n Double: \"Double\",\n DashDot: \"DashDot\",\n DashDotDot: \"DashDotDot\",\n SlantDashDot: \"SlantDashDot\"\n};\nvar mediumBorders = [\"Dashed\", \"DashDot\", \"DashDotDot\"];\nvar colorMap = {\n None: \"none\",\n Solid: \"solid\",\n Gray50: \"mediumGray\",\n Gray75: \"darkGray\",\n Gray25: \"lightGray\",\n HorzStripe: \"darkHorizontal\",\n VertStripe: \"darkVertical\",\n ReverseDiagStripe: \"darkDown\",\n DiagStripe: \"darkUp\",\n DiagCross: \"darkGrid\",\n ThickDiagCross: \"darkTrellis\",\n ThinHorzStripe: \"lightHorizontal\",\n ThinVertStripe: \"lightVertical\",\n ThinReverseDiagStripe: \"lightDown\",\n ThinDiagStripe: \"lightUp\",\n ThinHorzCross: \"lightGrid\",\n ThinDiagCross: \"lightTrellis\",\n Gray125: \"gray125\",\n Gray0625: \"gray0625\"\n};\nvar horizontalAlignmentMap = {\n Automatic: \"general\",\n Left: \"left\",\n Center: \"center\",\n Right: \"right\",\n Fill: \"fill\",\n Justify: \"justify\",\n CenterAcrossSelection: \"centerContinuous\",\n Distributed: \"distributed\",\n JustifyDistributed: \"justify\"\n};\nvar verticalAlignmentMap = {\n Automatic: void 0,\n Top: \"top\",\n Bottom: \"bottom\",\n Center: \"center\",\n Justify: \"justify\",\n Distributed: \"distributed\",\n JustifyDistributed: \"justify\"\n};\nvar convertLegacyPattern = (name) => {\n if (!name) {\n return \"none\";\n }\n return colorMap[name] || name;\n};\nvar convertLegacyColor = (color) => {\n if (color == void 0) {\n return color;\n }\n if (color.charAt(0) === \"#\") {\n color = color.substring(1);\n }\n return color.length === 6 ? \"FF\" + color : color;\n};\nvar convertLegacyBorder = (type, weight) => {\n if (!type) {\n return \"thin\";\n }\n const namedWeight = getWeightName(weight);\n const mappedName = mappedBorderNames[type];\n if (type === \"Continuous\") {\n return namedWeight;\n }\n if (namedWeight === \"medium\" && mediumBorders.indexOf(mappedName) !== -1) {\n return `medium${mappedName}`;\n }\n return mappedName.charAt(0).toLowerCase() + mappedName.substring(1);\n};\nvar convertLegacyHorizontalAlignment = (alignment) => {\n return horizontalAlignmentMap[alignment] || \"general\";\n};\nvar convertLegacyVerticalAlignment = (alignment) => {\n return verticalAlignmentMap[alignment] || void 0;\n};\nvar getBorderColor = (color) => {\n return {\n name: \"color\",\n properties: {\n rawMap: {\n rgb: convertLegacyColor(color || \"#000000\")\n }\n }\n };\n};\nvar borderFactory = {\n getTemplate(border) {\n const { left, right, top, bottom, diagonal } = border;\n const leftChildren = left ? [getBorderColor(left.color)] : void 0;\n const rightChildren = right ? [getBorderColor(right.color)] : void 0;\n const topChildren = top ? [getBorderColor(top.color)] : void 0;\n const bottomChildren = bottom ? [getBorderColor(bottom.color)] : void 0;\n const diagonalChildren = diagonal ? [getBorderColor(diagonal.color)] : void 0;\n return {\n name: \"border\",\n children: [{\n name: \"left\",\n properties: { rawMap: { style: left && left.style } },\n children: leftChildren\n }, {\n name: \"right\",\n properties: { rawMap: { style: right && right.style } },\n children: rightChildren\n }, {\n name: \"top\",\n properties: { rawMap: { style: top && top.style } },\n children: topChildren\n }, {\n name: \"bottom\",\n properties: { rawMap: { style: bottom && bottom.style } },\n children: bottomChildren\n }, {\n name: \"diagonal\",\n properties: { rawMap: { style: diagonal && diagonal.style } },\n children: diagonalChildren\n }]\n };\n }\n};\nvar border_default = borderFactory;\nvar bordersFactory = {\n getTemplate(borders) {\n return {\n name: \"borders\",\n properties: {\n rawMap: {\n count: borders.length\n }\n },\n children: borders.map((border) => border_default.getTemplate(border))\n };\n }\n};\nvar borders_default = bordersFactory;\nvar getReadingOrderId = (readingOrder) => {\n const order = [\"Context\", \"LeftToRight\", \"RightToLeft\"];\n const pos = order.indexOf(readingOrder);\n return Math.max(pos, 0);\n};\nvar alignmentFactory = {\n getTemplate(alignment) {\n const { horizontal, indent, readingOrder, rotate, shrinkToFit, vertical, wrapText } = alignment;\n return {\n name: \"alignment\",\n properties: {\n rawMap: {\n horizontal: horizontal && convertLegacyHorizontalAlignment(horizontal),\n indent,\n readingOrder: readingOrder && getReadingOrderId(readingOrder),\n textRotation: rotate,\n shrinkToFit,\n vertical: vertical && convertLegacyVerticalAlignment(vertical),\n wrapText\n }\n }\n };\n }\n};\nvar alignment_default = alignmentFactory;\nvar protectionFactory = {\n getTemplate(protection) {\n const locked = protection.protected === false ? 0 : 1;\n const hidden = protection.hideFormula === true ? 1 : 0;\n return {\n name: \"protection\",\n properties: {\n rawMap: {\n hidden,\n locked\n }\n }\n };\n }\n};\nvar protection_default = protectionFactory;\nvar xfFactory = {\n getTemplate(xf) {\n const { alignment, borderId, fillId, fontId, numFmtId, protection, quotePrefix, xfId } = xf;\n const children = [];\n if (alignment) {\n children.push(alignment_default.getTemplate(alignment));\n }\n if (protection) {\n children.push(protection_default.getTemplate(protection));\n }\n return {\n name: \"xf\",\n properties: {\n rawMap: {\n applyAlignment: alignment ? 1 : void 0,\n applyProtection: protection ? 1 : void 0,\n applyBorder: borderId ? 1 : void 0,\n applyFill: fillId ? 1 : void 0,\n borderId,\n fillId,\n applyFont: fontId ? 1 : void 0,\n fontId,\n applyNumberFormat: numFmtId ? 1 : void 0,\n numFmtId,\n quotePrefix: quotePrefix ? 1 : void 0,\n xfId\n }\n },\n children: children.length ? children : void 0\n };\n }\n};\nvar xf_default = xfFactory;\nvar cellStylesXfsFactory = {\n getTemplate(xfs) {\n return {\n name: \"cellStyleXfs\",\n properties: {\n rawMap: {\n count: xfs.length\n }\n },\n children: xfs.map((xf) => xf_default.getTemplate(xf))\n };\n }\n};\nvar cellStyleXfs_default = cellStylesXfsFactory;\nvar cellXfsFactory = {\n getTemplate(xfs) {\n return {\n name: \"cellXfs\",\n properties: {\n rawMap: {\n count: xfs.length\n }\n },\n children: xfs.map((xf) => xf_default.getTemplate(xf))\n };\n }\n};\nvar cellXfs_default = cellXfsFactory;\nvar borderFactory2 = {\n getTemplate(cellStyle) {\n const { builtinId, name, xfId } = cellStyle;\n return {\n name: \"cellStyle\",\n properties: {\n rawMap: {\n builtinId,\n name,\n xfId\n }\n }\n };\n }\n};\nvar cellStyle_default = borderFactory2;\nvar cellStylesFactory = {\n getTemplate(cellStyles) {\n return {\n name: \"cellStyles\",\n properties: {\n rawMap: {\n count: cellStyles.length\n }\n },\n children: cellStyles.map((cellStyle) => cellStyle_default.getTemplate(cellStyle))\n };\n }\n};\nvar cellStyles_default = cellStylesFactory;\nvar stylesMap;\nvar registeredNumberFmts;\nvar registeredFonts;\nvar registeredFills;\nvar registeredBorders;\nvar registeredCellStyleXfs;\nvar registeredCellXfs;\nvar registeredCellStyles;\nvar currentSheet;\nvar getStyleName = (name, currentSheet2) => {\n if (name.indexOf(\"mixedStyle\") !== -1 && currentSheet2 > 1) {\n name += `_${currentSheet2}`;\n }\n return name;\n};\nvar resetStylesheetValues = () => {\n stylesMap = { base: 0 };\n registeredNumberFmts = [];\n registeredFonts = [{ fontName: \"Calibri\", colorTheme: \"1\", family: \"2\", scheme: \"minor\" }];\n registeredFills = [{ patternType: \"none\" }, { patternType: \"gray125\" }];\n registeredBorders = [{ left: void 0, right: void 0, top: void 0, bottom: void 0, diagonal: void 0 }];\n registeredCellStyleXfs = [{ borderId: 0, fillId: 0, fontId: 0, numFmtId: 0 }];\n registeredCellXfs = [{ borderId: 0, fillId: 0, fontId: 0, numFmtId: 0, xfId: 0 }];\n registeredCellStyles = [{ builtinId: 0, name: \"Normal\", xfId: 0 }];\n};\nvar registerFill = (fill) => {\n const convertedPattern = convertLegacyPattern(fill.pattern);\n const convertedFillColor = convertLegacyColor(fill.color);\n const convertedPatternColor = convertLegacyColor(fill.patternColor);\n let pos = registeredFills.findIndex((currentFill) => {\n const { patternType, fgRgb, bgRgb } = currentFill;\n if (patternType != convertedPattern || fgRgb != convertedFillColor || bgRgb != convertedPatternColor) {\n return false;\n }\n return true;\n });\n if (pos === -1) {\n pos = registeredFills.length;\n registeredFills.push({ patternType: convertedPattern, fgRgb: convertedFillColor, bgRgb: convertedPatternColor });\n }\n return pos;\n};\nvar registerNumberFmt = (format) => {\n if (numberFormatMap[format]) {\n return numberFormatMap[format];\n }\n let pos = registeredNumberFmts.findIndex((currentFormat) => currentFormat.formatCode === format);\n if (pos === -1) {\n pos = registeredNumberFmts.length + 164;\n registeredNumberFmts.push({ formatCode: format, numFmtId: pos });\n } else {\n pos = registeredNumberFmts[pos].numFmtId;\n }\n return pos;\n};\nvar registerBorders = (borders) => {\n const { borderBottom, borderTop, borderLeft, borderRight } = borders;\n let bottomStyle;\n let topStyle;\n let leftStyle;\n let rightStyle;\n let bottomColor;\n let topColor;\n let leftColor;\n let rightColor;\n if (borderLeft) {\n leftStyle = convertLegacyBorder(borderLeft.lineStyle, borderLeft.weight);\n leftColor = convertLegacyColor(borderLeft.color);\n }\n if (borderRight) {\n rightStyle = convertLegacyBorder(borderRight.lineStyle, borderRight.weight);\n rightColor = convertLegacyColor(borderRight.color);\n }\n if (borderBottom) {\n bottomStyle = convertLegacyBorder(borderBottom.lineStyle, borderBottom.weight);\n bottomColor = convertLegacyColor(borderBottom.color);\n }\n if (borderTop) {\n topStyle = convertLegacyBorder(borderTop.lineStyle, borderTop.weight);\n topColor = convertLegacyColor(borderTop.color);\n }\n let pos = registeredBorders.findIndex((currentBorder) => {\n const { left, right, top, bottom } = currentBorder;\n if (!left && (leftStyle || leftColor)) {\n return false;\n }\n if (!right && (rightStyle || rightColor)) {\n return false;\n }\n if (!top && (topStyle || topColor)) {\n return false;\n }\n if (!bottom && (bottomStyle || bottomColor)) {\n return false;\n }\n const { style: clS, color: clC } = left || {};\n const { style: crS, color: crC } = right || {};\n const { style: ctS, color: ctC } = top || {};\n const { style: cbS, color: cbC } = bottom || {};\n if (clS != leftStyle || clC != leftColor) {\n return false;\n }\n if (crS != rightStyle || crC != rightColor) {\n return false;\n }\n if (ctS != topStyle || ctC != topColor) {\n return false;\n }\n if (cbS != bottomStyle || cbC != bottomColor) {\n return false;\n }\n return true;\n });\n if (pos === -1) {\n pos = registeredBorders.length;\n registeredBorders.push({\n left: {\n style: leftStyle,\n color: leftColor\n },\n right: {\n style: rightStyle,\n color: rightColor\n },\n top: {\n style: topStyle,\n color: topColor\n },\n bottom: {\n style: bottomStyle,\n color: bottomColor\n },\n diagonal: {\n style: void 0,\n color: void 0\n }\n });\n }\n return pos;\n};\nvar registerFont = (font) => {\n const { fontName: name = \"Calibri\", color, size, bold, italic, outline, shadow, strikeThrough, underline, family, verticalAlign } = font;\n const convertedColor = convertLegacyColor(color);\n const familyId = getFontFamilyId(family);\n const convertedUnderline = underline ? underline.toLocaleLowerCase() : void 0;\n const convertedVerticalAlign = verticalAlign ? verticalAlign.toLocaleLowerCase() : void 0;\n let pos = registeredFonts.findIndex((currentFont) => {\n if (currentFont.fontName != name || currentFont.color != convertedColor || currentFont.size != size || currentFont.bold != bold || currentFont.italic != italic || currentFont.outline != outline || currentFont.shadow != shadow || currentFont.strikeThrough != strikeThrough || currentFont.underline != convertedUnderline || currentFont.verticalAlign != convertedVerticalAlign || // @ts-ignore\n currentFont.family != familyId) {\n return false;\n }\n return true;\n });\n if (pos === -1) {\n pos = registeredFonts.length;\n registeredFonts.push({\n fontName: name,\n color: convertedColor,\n size,\n bold,\n italic,\n outline,\n shadow,\n strikeThrough,\n underline: convertedUnderline,\n verticalAlign: convertedVerticalAlign,\n family: familyId != null ? familyId.toString() : void 0\n });\n }\n return pos;\n};\nvar registerStyle = (config) => {\n const { alignment, borders, font, interior, numberFormat, protection, quotePrefix } = config;\n let { id } = config;\n let currentFill = 0;\n let currentBorder = 0;\n let currentFont = 0;\n let currentNumberFmt = 0;\n if (!id) {\n return;\n }\n id = getStyleName(id, currentSheet);\n if (stylesMap[id] != void 0) {\n return;\n }\n if (interior) {\n currentFill = registerFill(interior);\n }\n if (borders) {\n currentBorder = registerBorders(borders);\n }\n if (font) {\n currentFont = registerFont(font);\n }\n if (numberFormat) {\n currentNumberFmt = registerNumberFmt(numberFormat.format);\n }\n stylesMap[id] = registeredCellXfs.length;\n registeredCellXfs.push({\n alignment,\n borderId: currentBorder || 0,\n fillId: currentFill || 0,\n fontId: currentFont || 0,\n numFmtId: currentNumberFmt || 0,\n protection,\n quotePrefix,\n xfId: 0\n });\n};\nvar stylesheetFactory = {\n getTemplate(defaultFontSize) {\n const numberFormats = numberFormats_default.getTemplate(registeredNumberFmts);\n const fonts = fonts_default.getTemplate(registeredFonts.map((font) => __spreadProps6(__spreadValues7({}, font), { size: font.size != null ? font.size : defaultFontSize })));\n const fills = fills_default.getTemplate(registeredFills);\n const borders = borders_default.getTemplate(registeredBorders);\n const cellStylesXfs = cellStyleXfs_default.getTemplate(registeredCellStyleXfs);\n const cellXfs = cellXfs_default.getTemplate(registeredCellXfs);\n const cellStyles = cellStyles_default.getTemplate(registeredCellStyles);\n resetStylesheetValues();\n return {\n name: \"styleSheet\",\n properties: {\n rawMap: {\n \"mc:Ignorable\": \"x14ac x16r2 xr\",\n \"xmlns\": \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\n \"xmlns:mc\": \"http://schemas.openxmlformats.org/markup-compatibility/2006\",\n \"xmlns:x14ac\": \"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\",\n \"xmlns:x16r2\": \"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main\",\n \"xmlns:xr\": \"http://schemas.microsoft.com/office/spreadsheetml/2014/revision\"\n }\n },\n children: [\n numberFormats,\n fonts,\n fills,\n borders,\n cellStylesXfs,\n cellXfs,\n cellStyles,\n {\n name: \"tableStyles\",\n properties: {\n rawMap: {\n count: 0,\n defaultPivotStyle: \"PivotStyleLight16\",\n defaultTableStyle: \"TableStyleMedium2\"\n }\n }\n }\n ]\n };\n }\n};\nvar getStyleId = (name, currentSheet2) => {\n return stylesMap[getStyleName(name, currentSheet2)] || 0;\n};\nvar registerStyles = (styles, _currentSheet) => {\n currentSheet = _currentSheet;\n if (currentSheet === 1) {\n resetStylesheetValues();\n }\n styles.forEach(registerStyle);\n};\nvar stylesheet_default = stylesheetFactory;\nvar sheetFactory = {\n getTemplate(name, idx) {\n const sheetId = (idx + 1).toString();\n return {\n name: \"sheet\",\n properties: {\n rawMap: {\n \"name\": name,\n \"sheetId\": sheetId,\n \"r:id\": `rId${sheetId}`\n }\n }\n };\n }\n};\nvar sheet_default = sheetFactory;\nvar sheetsFactory = {\n getTemplate(names) {\n return {\n name: \"sheets\",\n children: names.map((sheet, idx) => sheet_default.getTemplate(sheet, idx))\n };\n }\n};\nvar sheets_default = sheetsFactory;\nvar workbookFactory = {\n getTemplate(names) {\n return {\n name: \"workbook\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n r: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n }\n }],\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"\n }\n },\n children: [sheets_default.getTemplate(names)]\n };\n }\n};\nvar workbook_default = workbookFactory;\nvar getExcelCellWidth = (width) => Math.ceil((width - 12) / 7 + 1);\nvar columnFactory = {\n getTemplate(config) {\n const { min, max, outlineLevel, s, width, hidden, bestFit } = config;\n let excelWidth = 1;\n let customWidth = \"0\";\n if (width > 1) {\n excelWidth = getExcelCellWidth(width);\n customWidth = \"1\";\n }\n return {\n name: \"col\",\n properties: {\n rawMap: {\n min,\n max,\n outlineLevel: outlineLevel != null ? outlineLevel : void 0,\n width: excelWidth,\n style: s,\n hidden: hidden ? \"1\" : \"0\",\n bestFit: bestFit ? \"1\" : \"0\",\n customWidth\n }\n }\n };\n }\n};\nvar column_default = columnFactory;\nvar convertLegacyType = (type) => {\n const t = type.charAt(0).toLowerCase();\n return t === \"s\" ? \"inlineStr\" : t;\n};\nvar cellFactory = {\n getTemplate(config, idx, currentSheet2) {\n const { ref, data, styleId } = config;\n const { type, value } = data || { type: \"empty\", value: null };\n let convertedType = type;\n if (type === \"f\") {\n convertedType = \"str\";\n } else if (type.charAt(0) === type.charAt(0).toUpperCase()) {\n convertedType = convertLegacyType(type);\n }\n const obj = {\n name: \"c\",\n properties: {\n rawMap: {\n r: ref,\n t: convertedType === \"empty\" ? void 0 : convertedType,\n s: styleId ? getStyleId(styleId, currentSheet2) : void 0\n }\n }\n };\n if (convertedType === \"empty\") {\n return obj;\n }\n let children;\n if (convertedType === \"str\" && type === \"f\") {\n children = [{\n name: \"f\",\n textNode: _311.escapeString(value)\n }];\n } else if (convertedType === \"inlineStr\") {\n children = [{\n name: \"is\",\n children: [{\n name: \"t\",\n textNode: _311.escapeString(value)\n }]\n }];\n } else {\n children = [{\n name: \"v\",\n textNode: value\n }];\n }\n return Object.assign({}, obj, { children });\n }\n};\nvar cell_default = cellFactory;\nvar addEmptyCells = (cells, rowIdx) => {\n const mergeMap = [];\n let posCounter = 0;\n for (let i = 0; i < cells.length; i++) {\n const cell = cells[i];\n if (cell.mergeAcross) {\n mergeMap.push({\n pos: i,\n excelPos: posCounter\n });\n posCounter += cell.mergeAcross;\n }\n posCounter++;\n }\n if (mergeMap.length) {\n for (let i = mergeMap.length - 1; i >= 0; i--) {\n const mergedCells = [];\n const cell = cells[mergeMap[i].pos];\n for (let j = 1; j <= cell.mergeAcross; j++) {\n mergedCells.push({\n ref: `${getExcelColumnName(mergeMap[i].excelPos + 1 + j)}${rowIdx + 1}`,\n styleId: cell.styleId,\n data: { type: \"empty\", value: null }\n });\n }\n if (mergedCells.length) {\n cells.splice(mergeMap[i].pos + 1, 0, ...mergedCells);\n }\n }\n }\n};\nvar shouldDisplayCell = (cell) => {\n var _a;\n return ((_a = cell.data) == null ? void 0 : _a.value) !== \"\" || cell.styleId !== void 0;\n};\nvar rowFactory = {\n getTemplate(config, idx, currentSheet2) {\n const { collapsed, hidden, height, outlineLevel, cells = [] } = config;\n addEmptyCells(cells, idx);\n const children = cells.filter(shouldDisplayCell).map((cell, idx2) => cell_default.getTemplate(cell, idx2, currentSheet2));\n return {\n name: \"row\",\n properties: {\n rawMap: {\n r: idx + 1,\n collapsed: collapsed ? \"1\" : \"0\",\n hidden: hidden ? \"1\" : \"0\",\n ht: height,\n customHeight: height != null ? \"1\" : \"0\",\n spans: \"1:1\",\n outlineLevel: outlineLevel || void 0\n }\n },\n children\n };\n }\n};\nvar row_default = rowFactory;\nvar mergeCellFactory = {\n getTemplate(ref) {\n return {\n name: \"mergeCell\",\n properties: {\n rawMap: {\n ref\n }\n }\n };\n }\n};\nvar mergeCell_default = mergeCellFactory;\nvar getMergedCellsAndAddColumnGroups = (rows, cols, suppressColumnOutline) => {\n const mergedCells = [];\n const cellsWithCollapsibleGroups = [];\n rows.forEach((currentRow, rowIdx) => {\n const cells = currentRow.cells;\n let merges = 0;\n let lastCol;\n cells.forEach((currentCell, cellIdx) => {\n const min = cellIdx + merges + 1;\n const start = getExcelColumnName(min);\n const outputRow = rowIdx + 1;\n if (currentCell.mergeAcross) {\n merges += currentCell.mergeAcross;\n const end = getExcelColumnName(cellIdx + merges + 1);\n mergedCells.push(`${start}${outputRow}:${end}${outputRow}`);\n }\n if (!cols[min - 1]) {\n cols[min - 1] = {};\n }\n const { collapsibleRanges } = currentCell;\n if (collapsibleRanges) {\n collapsibleRanges.forEach((range) => {\n cellsWithCollapsibleGroups.push([min + range[0], min + range[1]]);\n });\n }\n lastCol = cols[min - 1];\n lastCol.min = min;\n lastCol.max = min;\n currentCell.ref = `${start}${outputRow}`;\n });\n });\n cellsWithCollapsibleGroups.sort((a, b) => {\n if (a[0] !== b[0]) {\n return a[0] - b[0];\n }\n return b[1] - a[1];\n });\n const rangeMap = /* @__PURE__ */ new Map();\n const outlineLevel = /* @__PURE__ */ new Map();\n cellsWithCollapsibleGroups.filter((currentRange) => {\n const rangeString = currentRange.toString();\n const inMap = rangeMap.get(rangeString);\n if (inMap) {\n return false;\n }\n rangeMap.set(rangeString, true);\n return true;\n }).forEach((range) => {\n const refCol = cols.find((col) => col.min == range[0] && col.max == range[1]);\n const currentOutlineLevel = outlineLevel.get(range[0]);\n cols.push({\n min: range[0],\n max: range[1],\n outlineLevel: suppressColumnOutline ? void 0 : currentOutlineLevel || 1,\n width: (refCol || { width: 100 }).width\n });\n outlineLevel.set(range[0], (currentOutlineLevel || 0) + 1);\n });\n return mergedCells;\n};\nvar getPageOrientation = (orientation) => {\n if (!orientation || orientation !== \"Portrait\" && orientation !== \"Landscape\") {\n return \"portrait\";\n }\n return orientation.toLocaleLowerCase();\n};\nvar getPageSize = (pageSize) => {\n if (pageSize == null) {\n return 1;\n }\n const positions = [\"Letter\", \"Letter Small\", \"Tabloid\", \"Ledger\", \"Legal\", \"Statement\", \"Executive\", \"A3\", \"A4\", \"A4 Small\", \"A5\", \"A6\", \"B4\", \"B5\", \"Folio\", \"Envelope\", \"Envelope DL\", \"Envelope C5\", \"Envelope B5\", \"Envelope C3\", \"Envelope C4\", \"Envelope C6\", \"Envelope Monarch\", \"Japanese Postcard\", \"Japanese Double Postcard\"];\n const pos = positions.indexOf(pageSize);\n return pos === -1 ? 1 : pos + 1;\n};\nvar addColumns = (columns) => {\n return (params) => {\n if (columns.length) {\n params.children.push({\n name: \"cols\",\n children: columns.map((column) => column_default.getTemplate(column))\n });\n }\n return params;\n };\n};\nvar addSheetData = (rows, sheetNumber) => {\n return (params) => {\n if (rows.length) {\n params.children.push({\n name: \"sheetData\",\n children: rows.map((row, idx) => row_default.getTemplate(row, idx, sheetNumber))\n });\n }\n return params;\n };\n};\nvar addMergeCells = (mergeCells) => {\n return (params) => {\n if (mergeCells.length) {\n params.children.push({\n name: \"mergeCells\",\n properties: {\n rawMap: {\n count: mergeCells.length\n }\n },\n children: mergeCells.map((mergedCell) => mergeCell_default.getTemplate(mergedCell))\n });\n }\n return params;\n };\n};\nvar addPageMargins = (margins) => {\n return (params) => {\n const { top = 0.75, right = 0.7, bottom = 0.75, left = 0.7, header = 0.3, footer = 0.3 } = margins;\n params.children.push({\n name: \"pageMargins\",\n properties: {\n rawMap: { bottom, footer, header, left, right, top }\n }\n });\n return params;\n };\n};\nvar addPageSetup = (pageSetup) => {\n return (params) => {\n if (pageSetup) {\n params.children.push({\n name: \"pageSetup\",\n properties: {\n rawMap: {\n horizontalDpi: 0,\n verticalDpi: 0,\n orientation: getPageOrientation(pageSetup.orientation),\n paperSize: getPageSize(pageSetup.pageSize)\n }\n }\n });\n }\n return params;\n };\n};\nvar replaceHeaderFooterTokens = (value) => {\n const map = {\n \"&[Page]\": \"&P\",\n \"&[Pages]\": \"&N\",\n \"&[Date]\": \"&D\",\n \"&[Time]\": \"&T\",\n \"&[Tab]\": \"&A\",\n \"&[Path]\": \"&Z\",\n \"&[File]\": \"&F\",\n \"&[Picture]\": \"&G\"\n };\n _46.iterateObject(map, (key, val) => {\n value = value.replace(key, val);\n });\n return value;\n};\nvar getHeaderPosition = (position) => {\n if (position === \"Center\") {\n return \"C\";\n }\n if (position === \"Right\") {\n return \"R\";\n }\n return \"L\";\n};\nvar applyHeaderFontStyle = (headerString, font) => {\n if (!font) {\n return headerString;\n }\n headerString += \"&"\";\n headerString += font.fontName || \"Calibri\";\n if (font.bold !== font.italic) {\n headerString += font.bold ? \",Bold\" : \",Italic\";\n } else if (font.bold) {\n headerString += \",Bold Italic\";\n } else {\n headerString += \",Regular\";\n }\n headerString += \""\";\n if (font.size) {\n headerString += `&${font.size}`;\n }\n if (font.strikeThrough) {\n headerString += \"&S\";\n }\n if (font.underline) {\n headerString += `&${font.underline === \"Double\" ? \"E\" : \"U\"}`;\n }\n if (font.color) {\n headerString += `&K${font.color.replace(\"#\", \"\").toUpperCase()}`;\n }\n return headerString;\n};\nvar processHeaderFooterContent = (content, location, rule) => content.reduce((prev, curr, idx) => {\n const pos = getHeaderPosition(curr.position);\n const output = applyHeaderFontStyle(`${prev}&${pos}`, curr.font);\n const PositionMap = [\"Left\", \"Center\", \"Right\"];\n if (!curr.position) {\n curr.position = PositionMap[idx];\n }\n const { image } = curr;\n if (curr.value === \"&[Picture]\" && image) {\n const imagePosition = `${pos}${location}${rule}`;\n ExcelXlsxFactory.addHeaderFooterImageToMap(image, imagePosition);\n }\n return `${output}${_46.escapeString(replaceHeaderFooterTokens(curr.value))}`;\n}, \"\");\nvar buildHeaderFooter = (headerFooterConfig) => {\n const rules = [\"all\", \"first\", \"even\"];\n const headersAndFooters = [];\n rules.forEach((rule) => {\n const headerFooter = headerFooterConfig[rule];\n const namePrefix = rule === \"all\" ? \"odd\" : rule;\n if (!headerFooter) {\n return;\n }\n for (const [key, value] of Object.entries(headerFooter)) {\n const nameSuffix = `${key.charAt(0).toUpperCase()}${key.slice(1)}`;\n const location = key[0].toUpperCase();\n if (value) {\n const normalizedRule = rule === \"all\" ? \"\" : rule.toUpperCase();\n headersAndFooters.push({\n name: `${namePrefix}${nameSuffix}`,\n properties: {\n rawMap: { \"xml:space\": \"preserve\" }\n },\n textNode: processHeaderFooterContent(value, location, normalizedRule)\n });\n }\n }\n });\n return headersAndFooters;\n};\nvar addHeaderFooter = (headerFooterConfig) => {\n return (params) => {\n if (!headerFooterConfig) {\n return params;\n }\n const differentFirst = headerFooterConfig.first != null ? 1 : 0;\n const differentOddEven = headerFooterConfig.even != null ? 1 : 0;\n params.children.push({\n name: \"headerFooter\",\n properties: {\n rawMap: {\n differentFirst,\n differentOddEven\n }\n },\n children: buildHeaderFooter(headerFooterConfig)\n });\n return params;\n };\n};\nvar addExcelTableRel = (excelTable) => {\n return (params) => {\n if (excelTable) {\n params.children.push({\n name: \"tableParts\",\n properties: {\n rawMap: {\n count: \"1\"\n }\n },\n children: [{\n name: \"tablePart\",\n properties: {\n rawMap: {\n \"r:id\": `rId${++params.rIdCounter}`\n }\n }\n }]\n });\n }\n return params;\n };\n};\nvar addDrawingRel = (currentSheet2) => {\n return (params) => {\n const worksheetImages = ExcelXlsxFactory.worksheetImages.get(currentSheet2);\n if (worksheetImages == null ? void 0 : worksheetImages.length) {\n params.children.push({\n name: \"drawing\",\n properties: {\n rawMap: {\n \"r:id\": `rId${++params.rIdCounter}`\n }\n }\n });\n }\n return params;\n };\n};\nvar addVmlDrawingRel = (currentSheet2) => {\n return (params) => {\n if (ExcelXlsxFactory.worksheetHeaderFooterImages.get(currentSheet2)) {\n params.children.push({\n name: \"legacyDrawingHF\",\n properties: {\n rawMap: {\n \"r:id\": `rId${++params.rIdCounter}`\n }\n }\n });\n }\n return params;\n };\n};\nvar addSheetPr = () => {\n return (params) => {\n params.children.push({\n name: \"sheetPr\",\n children: [{\n name: \"outlinePr\",\n properties: {\n rawMap: {\n summaryBelow: 0\n }\n }\n }]\n });\n return params;\n };\n};\nvar addSheetFormatPr = (rows) => {\n return (params) => {\n const maxOutline = rows.reduce((prev, row) => {\n if (row.outlineLevel && row.outlineLevel > prev) {\n return row.outlineLevel;\n }\n return prev;\n }, 0);\n params.children.push({\n name: \"sheetFormatPr\",\n properties: {\n rawMap: {\n baseColWidth: 10,\n defaultRowHeight: 16,\n outlineLevelRow: maxOutline ? maxOutline : void 0\n }\n }\n });\n return params;\n };\n};\nvar worksheetFactory = {\n getTemplate(params) {\n const { worksheet, currentSheet: currentSheet2, config } = params;\n const { margins = {}, pageSetup, headerFooterConfig, suppressColumnOutline } = config;\n const { table } = worksheet;\n const { rows, columns } = table;\n const mergedCells = columns && columns.length ? getMergedCellsAndAddColumnGroups(rows, columns, !!suppressColumnOutline) : [];\n const { worksheetDataTables } = ExcelXlsxFactory;\n const worksheetExcelTables = worksheetDataTables.get(currentSheet2);\n const createWorksheetChildren = _46.compose(\n addSheetPr(),\n addSheetFormatPr(rows),\n addColumns(columns),\n addSheetData(rows, currentSheet2 + 1),\n addMergeCells(mergedCells),\n addPageMargins(margins),\n addPageSetup(pageSetup),\n addHeaderFooter(headerFooterConfig),\n addDrawingRel(currentSheet2),\n addVmlDrawingRel(currentSheet2),\n addExcelTableRel(worksheetExcelTables)\n );\n const { children } = createWorksheetChildren({ children: [], rIdCounter: 0 });\n return {\n name: \"worksheet\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n r: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\n }\n }],\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"\n }\n },\n children\n };\n }\n};\nvar worksheet_default = worksheetFactory;\nvar relationshipFactory = {\n getTemplate(config) {\n const { Id, Type, Target } = config;\n return {\n name: \"Relationship\",\n properties: {\n rawMap: {\n Id,\n Type,\n Target\n }\n }\n };\n }\n};\nvar relationship_default = relationshipFactory;\nvar relationshipsFactory = {\n getTemplate(c) {\n const children = c.map((relationship) => relationship_default.getTemplate(relationship));\n return {\n name: \"Relationships\",\n properties: {\n rawMap: {\n xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\"\n }\n },\n children\n };\n }\n};\nvar relationships_default = relationshipsFactory;\nvar getShapeLayout = () => ({\n name: \"o:shapelayout\",\n properties: {\n prefixedAttributes: [{\n prefix: \"v:\",\n map: {\n ext: \"edit\"\n }\n }]\n },\n children: [\n {\n name: \"o:idmap\",\n properties: {\n prefixedAttributes: [{\n prefix: \"v:\",\n map: {\n ext: \"edit\"\n }\n }],\n rawMap: {\n data: \"1\"\n }\n }\n }\n ]\n});\nvar getStroke = () => ({\n name: \"v:stroke\",\n properties: {\n rawMap: {\n joinstyle: \"miter\"\n }\n }\n});\nvar getFormulas = (formulas) => ({\n name: \"v:formulas\",\n children: formulas.map((formula) => ({\n name: \"v:f\",\n properties: {\n rawMap: {\n eqn: formula\n }\n }\n }))\n});\nvar getPath = () => ({\n name: \"v:path\",\n properties: {\n prefixedAttributes: [{\n prefix: \"o:\",\n map: {\n connecttype: \"rect\",\n extrusionok: \"f\"\n }\n }],\n rawMap: {\n gradientshapeok: \"t\"\n }\n }\n});\nvar getLock = (params) => {\n const { aspectratio, rotation } = params || {};\n const rawMap = {};\n if (aspectratio) {\n rawMap.aspectratio = \"t\";\n }\n if (rotation) {\n rawMap.rotation = \"t\";\n }\n return {\n name: \"o:lock\",\n properties: {\n prefixedAttributes: [{\n prefix: \"v:\",\n map: {\n ext: \"edit\"\n }\n }],\n rawMap\n }\n };\n};\nfunction mapNumber(value, startSource, endSource, startTarget, endTarget) {\n return (value - startSource) / (endSource - startSource) * (endTarget - startTarget) + startTarget;\n}\nvar gainMap = {\n 0: \"0\",\n 5: \"6554f\",\n 10: \"13107f\",\n 15: \"19661f\",\n 20: \"26214f\",\n 25: \".5\",\n 30: \"39322f\",\n 35: \"45875f\",\n 40: \"52429f\",\n 45: \"58982f\",\n 50: \"1\",\n 55: \"72818f\",\n 60: \"1.25\",\n 65: \"93623f\",\n 70: \"109227f\",\n 75: \"2\",\n 80: \"2.5\",\n 85: \"3.4\",\n 90: \"5\",\n 95: \"10\",\n 96: \"12.5\",\n 97: \"1092267f\",\n 98: \"25\",\n 99: \"50\",\n 100: \"2147483647f\"\n};\nvar getImageData = (image, idx) => {\n var _a;\n let rawMap;\n const { recolor, brightness, contrast, id } = image;\n if (recolor) {\n rawMap = {};\n if (recolor === \"Washout\" || recolor === \"Grayscale\") {\n rawMap.gain = \"19661f\";\n rawMap.blacklevel = \"22938f\";\n }\n if (recolor === \"Black & White\" || recolor === \"Grayscale\") {\n rawMap.grayscale = \"t\";\n if (recolor === \"Black & White\") {\n rawMap.bilevel = \"t\";\n }\n }\n }\n if (!recolor || recolor === \"Grayscale\") {\n if (!rawMap) {\n rawMap = {};\n }\n if (contrast != null && contrast !== 50) {\n rawMap.gain = (_a = gainMap[contrast]) != null ? _a : \"1\";\n }\n if (brightness != null && brightness !== 50) {\n rawMap.blacklevel = mapNumber(brightness, 0, 100, -0.5, 0.5).toString();\n }\n }\n return {\n name: \"v:imagedata\",\n properties: {\n prefixedAttributes: [{\n prefix: \"o:\",\n map: {\n relid: `rId${idx}`,\n title: id\n }\n }],\n rawMap\n }\n };\n};\nvar getShapeType = () => {\n const formulas = [\n \"if lineDrawn pixelLineWidth 0\",\n \"sum @0 1 0\",\n \"sum 0 0 @1\",\n \"prod @2 1 2\",\n \"prod @3 21600 pixelWidth\",\n \"prod @3 21600 pixelHeight\",\n \"sum @0 0 1\",\n \"prod @6 1 2\",\n \"prod @7 21600 pixelWidth\",\n \"sum @8 21600 0\",\n \"prod @7 21600 pixelHeight\",\n \"sum @10 21600 0\"\n ];\n return {\n name: \"v:shapetype\",\n properties: {\n prefixedAttributes: [{\n prefix: \"o:\",\n map: {\n spt: \"75\",\n preferrelative: \"t\"\n }\n }],\n rawMap: {\n coordsize: \"21600,21600\",\n filled: \"f\",\n id: \"_x0000_t75\",\n path: \"m@4@5l@4@11@9@11@9@5xe\",\n stroked: \"f\"\n }\n },\n children: [\n getStroke(),\n getFormulas(formulas),\n getPath(),\n getLock({ aspectratio: true })\n ]\n };\n};\nvar pixelToPoint = (value) => Math.floor((value != null ? value : 0) * 0.74999943307122);\nvar getShape = (image, idx) => {\n const { width = 0, height = 0, altText } = image;\n const imageWidth = pixelToPoint(width);\n const imageHeight = pixelToPoint(height);\n return {\n name: \"v:shape\",\n properties: {\n rawMap: {\n id: image.headerFooterPosition,\n \"o:spid\": \"_x0000_s1025\",\n style: `position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${imageWidth}pt; height: ${imageHeight}pt; z-index: ${idx + 1}`,\n type: \"#_x0000_t75\",\n alt: altText\n }\n },\n children: [\n getImageData(image, idx + 1),\n getLock({ rotation: true })\n ]\n };\n};\nvar vmlDrawingFactory = {\n getTemplate(params) {\n const headerFooterImages = ExcelXlsxFactory.worksheetHeaderFooterImages.get(params.sheetIndex) || [];\n const children = [getShapeLayout(), getShapeType(), ...headerFooterImages.map((img, idx) => getShape(img, idx))];\n return {\n name: \"xml\",\n properties: {\n prefixedAttributes: [{\n prefix: \"xmlns:\",\n map: {\n v: \"urn:schemas-microsoft-com:vml\",\n o: \"urn:schemas-microsoft-com:office:office\",\n x: \"urn:schemas-microsoft-com:office:excel\"\n }\n }]\n },\n children\n };\n }\n};\nvar vmlDrawing_default = vmlDrawingFactory;\nvar _ExcelXlsxFactory = class _ExcelXlsxFactory2 {\n static createExcel(styles, worksheet, config) {\n this.addSheetName(worksheet);\n registerStyles(styles, this.sheetNames.length);\n let newConfig = Object.assign({}, config);\n if (config.exportAsExcelTable) {\n if (config.columnModel.isPivotActive()) {\n this.showExcelTableNonCompatibleFeaturesWarning(\"pivot mode\");\n newConfig.exportAsExcelTable = false;\n }\n if (config.gos.get(\"masterDetail\")) {\n this.showExcelTableNonCompatibleFeaturesWarning(\"master/detail\");\n newConfig.exportAsExcelTable = false;\n }\n }\n this.processTableConfig(worksheet, newConfig);\n return this.createWorksheet(worksheet, newConfig);\n }\n static showExcelTableNonCompatibleFeaturesWarning(featureName) {\n console.warn(\n `AG Grid: Excel table export does not work with ${featureName}. The exported Excel file will not contain any Excel tables.\nPlease turn off ${featureName} to enable Excel table exports.`\n );\n }\n static getTableNameFromIndex(idx) {\n return `table${idx + 1}`;\n }\n static getSanitizedTableName(name) {\n return name.replace(/^[^a-zA-Z_]+/, \"_\").replace(/\\s/g, \"_\").replace(/[^a-zA-Z0-9_]/g, \"_\");\n }\n static addTableToSheet(sheetIndex, table) {\n if (this.worksheetDataTables.has(sheetIndex)) {\n console.warn(\"Unable to add data table to Excel sheet: A table already exists.\");\n return;\n }\n this.worksheetDataTables.set(sheetIndex, table);\n }\n static processTableConfig(worksheet, config) {\n var _a;\n if (!config.exportAsExcelTable) {\n return;\n }\n const tableConfig = typeof config.exportAsExcelTable === \"boolean\" ? {} : config.exportAsExcelTable;\n const {\n name: nameFromConfig,\n showColumnStripes,\n showRowStripes,\n showFilterButton,\n highlightFirstColumn,\n highlightLastColumn\n } = tableConfig;\n const tableName = this.getSanitizedTableName(\n nameFromConfig || _ExcelXlsxFactory2.defaultTableDisplayName\n );\n const sheetIndex = this.sheetNames.length - 1;\n const { table } = worksheet;\n const { rows, columns } = table;\n const headerRowCount = config.columnModel.getHeaderRowCount();\n const tableHeaderRowIndex = headerRowCount - 1;\n const tableRowCount = rows.length;\n const tableColCount = columns.length;\n const tableColumns = [];\n const showFilterButtons = [];\n for (let i = 0; i < tableColCount; i++) {\n const col = columns[i];\n tableColumns.push(col.displayName || \"\");\n showFilterButtons.push(\n showFilterButton === \"match\" || showFilterButton === void 0 ? (_a = col.filterAllowed) != null ? _a : false : showFilterButton\n );\n }\n if (!tableColumns || !tableColumns.length || !tableRowCount || !tableName) {\n console.warn(\"Unable to add data table to Excel sheet: Missing required parameters.\");\n return;\n }\n this.addTableToSheet(sheetIndex, {\n name: this.getTableNameFromIndex(sheetIndex),\n displayName: tableName,\n columns: tableColumns,\n showFilterButtons,\n headerRowIndex: tableHeaderRowIndex,\n rowCount: tableRowCount - headerRowCount,\n showRowStripes: showRowStripes != null ? showRowStripes : true,\n showColumnStripes: showColumnStripes != null ? showColumnStripes : false,\n highlightFirstColumn: highlightFirstColumn != null ? highlightFirstColumn : false,\n highlightLastColumn: highlightLastColumn != null ? highlightLastColumn : false\n });\n }\n static addHeaderFooterImageToMap(image, position) {\n const sheetIndex = this.sheetNames.length - 1;\n const headerFooterImage = image;\n headerFooterImage.headerFooterPosition = position;\n this.buildImageMap({ imageToAdd: headerFooterImage, idx: sheetIndex });\n let headerFooterImagesForSheet = this.worksheetHeaderFooterImages.get(sheetIndex);\n if (!headerFooterImagesForSheet) {\n headerFooterImagesForSheet = [];\n this.worksheetHeaderFooterImages.set(sheetIndex, headerFooterImagesForSheet);\n }\n if (!headerFooterImagesForSheet.find((img) => img.id === image.id)) {\n headerFooterImagesForSheet.push(image);\n }\n }\n static addBodyImageToMap(image, rowIndex, col, columnsToExport, rowHeight) {\n let sheetIndex = this.sheetNames.length;\n const { row, column } = image.position || {};\n const calculatedImage = image;\n if (columnsToExport) {\n if (rowIndex != null && col != null && (!row || !column)) {\n if (!image.position) {\n image.position = {};\n }\n image.position = Object.assign({}, image.position, {\n row: rowIndex,\n column: columnsToExport.indexOf(col) + 1\n });\n }\n setExcelImageTotalWidth(calculatedImage, columnsToExport);\n setExcelImageTotalHeight(calculatedImage, rowHeight);\n }\n this.buildImageMap({ imageToAdd: calculatedImage, idx: sheetIndex });\n let worksheetImageIdMap = this.worksheetImageIds.get(sheetIndex);\n if (!worksheetImageIdMap) {\n worksheetImageIdMap = /* @__PURE__ */ new Map();\n this.worksheetImageIds.set(sheetIndex, worksheetImageIdMap);\n }\n const sheetImages = this.worksheetImages.get(sheetIndex);\n if (!sheetImages) {\n this.worksheetImages.set(sheetIndex, [calculatedImage]);\n } else {\n sheetImages.push(calculatedImage);\n }\n if (!worksheetImageIdMap.get(image.id)) {\n worksheetImageIdMap.set(image.id, { index: worksheetImageIdMap.size, type: image.imageType });\n }\n }\n static buildImageMap(params) {\n const { imageToAdd, idx } = params;\n const mappedImagesToSheet = this.images.get(imageToAdd.id);\n if (mappedImagesToSheet) {\n const currentSheetImages = mappedImagesToSheet.find((currentImage) => currentImage.sheetId === idx);\n if (currentSheetImages) {\n currentSheetImages.image.push(imageToAdd);\n } else {\n mappedImagesToSheet.push({\n sheetId: idx,\n image: [imageToAdd]\n });\n }\n } else {\n this.images.set(imageToAdd.id, [{ sheetId: idx, image: [imageToAdd] }]);\n this.workbookImageIds.set(imageToAdd.id, { type: imageToAdd.imageType, index: this.workbookImageIds.size });\n }\n }\n static addSheetName(worksheet) {\n const name = _55.escapeString(worksheet.name) || \"\";\n let append = \"\";\n while (this.sheetNames.indexOf(`${name}${append}`) !== -1) {\n if (append === \"\") {\n append = \"_1\";\n } else {\n const curr = parseInt(append.slice(1), 10);\n append = `_${curr + 1}`;\n }\n }\n worksheet.name = `${name}${append}`;\n this.sheetNames.push(worksheet.name);\n }\n static getStringPosition(str) {\n if (this.sharedStrings.has(str)) {\n return this.sharedStrings.get(str);\n }\n this.sharedStrings.set(str, this.sharedStrings.size);\n return this.sharedStrings.size - 1;\n }\n static resetFactory() {\n this.sharedStrings = /* @__PURE__ */ new Map();\n this.images = /* @__PURE__ */ new Map();\n this.worksheetImages = /* @__PURE__ */ new Map();\n this.worksheetHeaderFooterImages = /* @__PURE__ */ new Map();\n this.workbookImageIds = /* @__PURE__ */ new Map();\n this.worksheetImageIds = /* @__PURE__ */ new Map();\n this.worksheetDataTables = /* @__PURE__ */ new Map();\n this.sheetNames = [];\n this.factoryMode = ExcelFactoryMode.SINGLE_SHEET;\n }\n static createWorkbook() {\n return createXmlPart(workbook_default.getTemplate(this.sheetNames));\n }\n static createStylesheet(defaultFontSize) {\n return createXmlPart(stylesheet_default.getTemplate(defaultFontSize));\n }\n static createSharedStrings() {\n return createXmlPart(sharedStrings_default.getTemplate(this.sharedStrings));\n }\n static createCore(author) {\n return createXmlPart(core_default.getTemplate(author));\n }\n static createContentTypes(sheetLen) {\n return createXmlPart(contentTypes_default.getTemplate(sheetLen));\n }\n static createRels() {\n const rs = relationships_default.getTemplate([{\n Id: \"rId1\",\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",\n Target: \"xl/workbook.xml\"\n }, {\n Id: \"rId2\",\n Type: \"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\",\n Target: \"docProps/core.xml\"\n }]);\n return createXmlPart(rs);\n }\n static createTheme() {\n return createXmlPart(office_default.getTemplate());\n }\n static createTable(dataTable, index) {\n return createXmlPart(table_default.getTemplate(dataTable, index));\n }\n static createWorkbookRels(sheetLen) {\n const worksheets = new Array(sheetLen).fill(void 0).map((v, i) => ({\n Id: `rId${i + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\",\n Target: `worksheets/sheet${i + 1}.xml`\n }));\n const rs = relationships_default.getTemplate([\n ...worksheets,\n {\n Id: `rId${sheetLen + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\",\n Target: \"theme/theme1.xml\"\n },\n {\n Id: `rId${sheetLen + 2}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\",\n Target: \"styles.xml\"\n },\n {\n Id: `rId${sheetLen + 3}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\",\n Target: \"sharedStrings.xml\"\n }\n ]);\n return createXmlPart(rs);\n }\n static createDrawing(sheetIndex) {\n return createXmlPart(drawing_default.getTemplate({ sheetIndex }));\n }\n static createDrawingRel(sheetIndex) {\n const worksheetImageIds = this.worksheetImageIds.get(sheetIndex) || [];\n const XMLArr = [];\n for (const [key, value] of worksheetImageIds) {\n XMLArr.push({\n Id: `rId${value.index + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n Target: `../media/image${this.workbookImageIds.get(key).index + 1}.${value.type}`\n });\n }\n return createXmlPart(relationships_default.getTemplate(XMLArr));\n }\n static createVmlDrawing(sheetIndex) {\n return createXmlPart(vmlDrawing_default.getTemplate({ sheetIndex }), true);\n }\n static createVmlDrawingRel(sheetIndex) {\n const worksheetHeaderFooterImages = this.worksheetHeaderFooterImages.get(sheetIndex) || [];\n const XMLArr = [];\n for (let i = 0; i < worksheetHeaderFooterImages.length; i++) {\n const headerFooterImage = worksheetHeaderFooterImages[i];\n const workbookImage = this.workbookImageIds.get(headerFooterImage.id);\n if (!workbookImage) {\n continue;\n }\n const { index, type } = workbookImage;\n const imageType = type === \"jpg\" ? \"jpeg\" : type;\n XMLArr.push({\n Id: `rId${i + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n Target: `../media/image${index + 1}.${imageType}`\n });\n }\n return createXmlPart(relationships_default.getTemplate(XMLArr));\n }\n static createRelationships({\n drawingIndex,\n vmlDrawingIndex,\n tableIndex\n } = {}) {\n if (drawingIndex === void 0 && vmlDrawingIndex === void 0 && tableIndex === void 0) {\n return \"\";\n }\n const config = [];\n if (drawingIndex != null) {\n config.push({\n Id: `rId${config.length + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing\",\n Target: `../drawings/drawing${drawingIndex + 1}.xml`\n });\n }\n if (vmlDrawingIndex != null) {\n config.push({\n Id: `rId${config.length + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing\",\n Target: `../drawings/vmlDrawing${vmlDrawingIndex + 1}.vml`\n });\n }\n if (tableIndex != null) {\n config.push({\n Id: `rId${config.length + 1}`,\n Type: \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table\",\n Target: `../tables/${this.getTableNameFromIndex(tableIndex)}.xml`\n });\n }\n const rs = relationships_default.getTemplate(config);\n return createXmlPart(rs);\n }\n static createWorksheet(worksheet, config) {\n return createXmlPart(worksheet_default.getTemplate({\n worksheet,\n currentSheet: this.sheetNames.length - 1,\n config\n }));\n }\n};\n_ExcelXlsxFactory.sharedStrings = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.sheetNames = [];\n_ExcelXlsxFactory.images = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.worksheetImages = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.worksheetHeaderFooterImages = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.workbookImageIds = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.worksheetImageIds = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.worksheetDataTables = /* @__PURE__ */ new Map();\n_ExcelXlsxFactory.defaultTableDisplayName = \"AG-GRID-TABLE\";\n_ExcelXlsxFactory.factoryMode = ExcelFactoryMode.SINGLE_SHEET;\nvar ExcelXlsxFactory = _ExcelXlsxFactory;\nvar ExcelSerializingSession = class extends BaseGridSerializingSession {\n constructor(config) {\n super(config);\n this.mixedStyles = {};\n this.mixedStyleCounter = 0;\n this.rows = [];\n this.config = Object.assign({}, config);\n this.stylesByIds = {};\n this.config.baseExcelStyles.forEach((style) => {\n this.stylesByIds[style.id] = style;\n });\n this.excelStyles = [...this.config.baseExcelStyles, { id: \"_quotePrefix\", quotePrefix: 1 }];\n }\n addCustomContent(customContent) {\n customContent.forEach((row) => {\n const rowLen = this.rows.length + 1;\n let outlineLevel;\n if (!this.config.suppressRowOutline && row.outlineLevel != null) {\n outlineLevel = row.outlineLevel;\n }\n const rowObj = {\n height: getHeightFromProperty(rowLen, row.height || this.config.rowHeight),\n cells: (row.cells || []).map((cell, idx) => {\n var _a, _b, _c;\n const image = this.addImage(rowLen, this.columnsToExport[idx], (_a = cell.data) == null ? void 0 : _a.value);\n let excelStyles = null;\n if (cell.styleId) {\n excelStyles = typeof cell.styleId === \"string\" ? [cell.styleId] : cell.styleId;\n }\n const excelStyleId = this.getStyleId(excelStyles);\n if (image) {\n return this.createCell(excelStyleId, this.getDataTypeForValue(image.value), image.value == null ? \"\" : image.value);\n }\n const value = (_c = (_b = cell.data) == null ? void 0 : _b.value) != null ? _c : \"\";\n const type = this.getDataTypeForValue(value);\n if (cell.mergeAcross) {\n return this.createMergedCell(excelStyleId, type, value, cell.mergeAcross);\n }\n return this.createCell(excelStyleId, type, value);\n }),\n outlineLevel\n };\n if (row.collapsed != null) {\n rowObj.collapsed = row.collapsed;\n }\n if (row.hidden != null) {\n rowObj.hidden = row.hidden;\n }\n this.rows.push(rowObj);\n });\n }\n onNewHeaderGroupingRow() {\n const currentCells = [];\n this.rows.push({\n cells: currentCells,\n height: getHeightFromProperty(this.rows.length + 1, this.config.headerRowHeight)\n });\n return {\n onColumn: (columnGroup, header, index, span, collapsibleRanges) => {\n const styleIds = this.config.styleLinker({ rowType: RowType.HEADER_GROUPING, rowIndex: 1, value: `grouping-${header}`, columnGroup });\n currentCells.push(__spreadProps6(__spreadValues7({}, this.createMergedCell(this.getStyleId(styleIds), this.getDataTypeForValue(\"string\"), header, span)), {\n collapsibleRanges\n }));\n }\n };\n }\n onNewHeaderRow() {\n return this.onNewRow(this.onNewHeaderColumn, this.config.headerRowHeight);\n }\n onNewBodyRow(node) {\n const rowAccumulator = this.onNewRow(this.onNewBodyColumn, this.config.rowHeight);\n if (node) {\n this.addRowOutlineIfNecessary(node);\n }\n return rowAccumulator;\n }\n prepare(columnsToExport) {\n super.prepare(columnsToExport);\n this.columnsToExport = [...columnsToExport];\n this.cols = columnsToExport.map((col, i) => this.convertColumnToExcel(col, i));\n }\n parse() {\n const longestRow = this.rows.reduce((a, b) => Math.max(a, b.cells.length), 0);\n while (this.cols.length < longestRow) {\n this.cols.push(this.convertColumnToExcel(null, this.cols.length + 1));\n }\n const data = {\n name: this.config.sheetName,\n table: {\n columns: this.cols,\n rows: this.rows\n }\n };\n return this.createExcel(data);\n }\n addRowOutlineIfNecessary(node) {\n const { gos, suppressRowOutline, rowGroupExpandState = \"expanded\" } = this.config;\n const isGroupHideOpenParents = gos.get(\"groupHideOpenParents\");\n if (isGroupHideOpenParents || suppressRowOutline || node.level == null) {\n return;\n }\n const padding = node.footer ? 1 : 0;\n const currentRow = _65.last(this.rows);\n currentRow.outlineLevel = node.level + padding;\n if (rowGroupExpandState === \"expanded\") {\n return;\n }\n const collapseAll = rowGroupExpandState === \"collapsed\";\n if (node.isExpandable()) {\n const isExpanded = !collapseAll && node.expanded;\n currentRow.collapsed = !isExpanded;\n }\n currentRow.hidden = // always show the node if there is no parent to be expanded\n !!node.parent && // or if it is a child of the root node\n node.parent.level !== -1 && (collapseAll || this.isAnyParentCollapsed(node.parent));\n }\n isAnyParentCollapsed(node) {\n while (node && node.level !== -1) {\n if (!node.expanded) {\n return true;\n }\n node = node.parent;\n }\n return false;\n }\n convertColumnToExcel(column, index) {\n const columnWidth = this.config.columnWidth;\n const headerValue = column ? this.extractHeaderValue(column) : void 0;\n const displayName = headerValue != null ? headerValue : \"\";\n const filterAllowed = column ? column.isFilterAllowed() : false;\n if (columnWidth) {\n if (typeof columnWidth === \"number\") {\n return { width: columnWidth, displayName, filterAllowed };\n }\n return { width: columnWidth({ column, index }), displayName, filterAllowed };\n }\n if (column) {\n const smallestUsefulWidth = 75;\n return { width: Math.max(column.getActualWidth(), smallestUsefulWidth), displayName, filterAllowed };\n }\n return {\n displayName,\n filterAllowed\n };\n }\n onNewHeaderColumn(rowIndex, currentCells) {\n return (column) => {\n const nameForCol = this.extractHeaderValue(column);\n const styleIds = this.config.styleLinker({ rowType: RowType.HEADER, rowIndex, value: nameForCol, column });\n currentCells.push(this.createCell(this.getStyleId(styleIds), this.getDataTypeForValue(\"string\"), nameForCol));\n };\n }\n onNewBodyColumn(rowIndex, currentCells) {\n let skipCols = 0;\n return (column, index, node) => {\n if (skipCols > 0) {\n skipCols -= 1;\n return;\n }\n const { value: valueForCell, valueFormatted } = this.extractRowCellValue(column, index, rowIndex, \"excel\", node);\n const styleIds = this.config.styleLinker({ rowType: RowType.BODY, rowIndex, value: valueForCell, column, node });\n const excelStyleId = this.getStyleId(styleIds);\n const colSpan = column.getColSpan(node);\n const addedImage = this.addImage(rowIndex, column, valueForCell);\n if (addedImage) {\n currentCells.push(this.createCell(excelStyleId, this.getDataTypeForValue(addedImage.value), addedImage.value == null ? \"\" : addedImage.value));\n } else if (colSpan > 1) {\n skipCols = colSpan - 1;\n currentCells.push(this.createMergedCell(excelStyleId, this.getDataTypeForValue(valueForCell), valueForCell, colSpan - 1));\n } else {\n currentCells.push(this.createCell(excelStyleId, this.getDataTypeForValue(valueForCell), valueForCell, valueFormatted));\n }\n };\n }\n onNewRow(onNewColumnAccumulator, height) {\n const currentCells = [];\n this.rows.push({\n cells: currentCells,\n height: getHeightFromProperty(this.rows.length + 1, height)\n });\n return {\n onColumn: onNewColumnAccumulator.bind(this, this.rows.length, currentCells)()\n };\n }\n createExcel(data) {\n const { excelStyles, config } = this;\n return ExcelXlsxFactory.createExcel(\n excelStyles,\n data,\n config\n );\n }\n getDataTypeForValue(valueForCell) {\n if (valueForCell === void 0) {\n return \"empty\";\n }\n return this.isNumerical(valueForCell) ? \"n\" : \"s\";\n }\n getTypeFromStyle(style, value) {\n if (this.isFormula(value)) {\n return \"f\";\n }\n if (style && style.dataType) {\n switch (style.dataType.toLocaleLowerCase()) {\n case \"formula\":\n return \"f\";\n case \"string\":\n return \"s\";\n case \"number\":\n return \"n\";\n case \"datetime\":\n return \"d\";\n case \"error\":\n return \"e\";\n case \"boolean\":\n return \"b\";\n default:\n console.warn(`AG Grid: Unrecognized data type for excel export [${style.id}.dataType=${style.dataType}]`);\n }\n }\n return null;\n }\n addImage(rowIndex, column, value) {\n if (!this.config.addImageToCell) {\n return;\n }\n const addedImage = this.config.addImageToCell(rowIndex, column, value);\n if (!addedImage) {\n return;\n }\n ExcelXlsxFactory.addBodyImageToMap(addedImage.image, rowIndex, column, this.columnsToExport, this.config.rowHeight);\n return addedImage;\n }\n createCell(styleId, type, value, valueFormatted) {\n const actualStyle = this.getStyleById(styleId);\n if (!(actualStyle == null ? void 0 : actualStyle.dataType) && type === \"s\" && valueFormatted) {\n value = valueFormatted;\n }\n const processedType = this.getTypeFromStyle(actualStyle, value) || type;\n const { value: processedValue, escaped } = this.getCellValue(processedType, value);\n const styles = [];\n if (actualStyle) {\n styles.push(styleId);\n }\n if (escaped) {\n styles.push(\"_quotePrefix\");\n }\n styleId = this.getStyleId(styles) || void 0;\n return {\n styleId,\n data: {\n type: processedType,\n value: processedValue\n }\n };\n }\n createMergedCell(styleId, type, value, numOfCells) {\n const valueToUse = value == null ? \"\" : value;\n return {\n styleId: !!this.getStyleById(styleId) ? styleId : void 0,\n data: {\n type,\n value: type === \"s\" ? ExcelXlsxFactory.getStringPosition(valueToUse).toString() : value\n },\n mergeAcross: numOfCells\n };\n }\n getCellValue(type, value) {\n let escaped = false;\n if (value == null) {\n type = \"s\";\n value = \"\";\n }\n if (type === \"s\") {\n if (value && value[0] === \"'\") {\n escaped = true;\n value = value.slice(1);\n }\n value = ExcelXlsxFactory.getStringPosition(value).toString();\n } else if (type === \"f\") {\n value = value.slice(1);\n } else if (type === \"n\") {\n const numberValue = Number(value);\n if (isNaN(numberValue)) {\n value = \"\";\n } else if (value !== \"\") {\n value = numberValue.toString();\n }\n }\n return { value, escaped };\n }\n getStyleId(styleIds) {\n if (!styleIds || !styleIds.length) {\n return null;\n }\n if (styleIds.length === 1) {\n return styleIds[0];\n }\n const key = styleIds.join(\"-\");\n if (!this.mixedStyles[key]) {\n this.addNewMixedStyle(styleIds);\n }\n return this.mixedStyles[key].excelID;\n }\n deepCloneObject(object) {\n return JSON.parse(JSON.stringify(object));\n }\n addNewMixedStyle(styleIds) {\n this.mixedStyleCounter += 1;\n const excelId = `mixedStyle${this.mixedStyleCounter}`;\n const resultantStyle = {};\n for (const styleId of styleIds) {\n for (const excelStyle of this.excelStyles) {\n if (excelStyle.id === styleId) {\n _65.mergeDeep(resultantStyle, this.deepCloneObject(excelStyle));\n }\n }\n }\n resultantStyle.id = excelId;\n resultantStyle.name = excelId;\n const key = styleIds.join(\"-\");\n this.mixedStyles[key] = {\n excelID: excelId,\n key,\n result: resultantStyle\n };\n this.excelStyles.push(resultantStyle);\n this.stylesByIds[excelId] = resultantStyle;\n }\n isFormula(value) {\n if (value == null) {\n return false;\n }\n return this.config.autoConvertFormulas && value.toString().startsWith(\"=\");\n }\n isNumerical(value) {\n if (typeof value === \"bigint\") {\n return true;\n }\n return isFinite(value) && value !== \"\" && !isNaN(parseFloat(value));\n }\n getStyleById(styleId) {\n if (styleId == null) {\n return null;\n }\n return this.stylesByIds[styleId] || null;\n }\n};\nvar createExcelXMLCoreFolderStructure = () => {\n ZipContainer.addFolders([\n \"_rels/\",\n \"docProps/\",\n \"xl/\",\n \"xl/theme/\",\n \"xl/_rels/\",\n \"xl/worksheets/\"\n ]);\n const { images } = ExcelXlsxFactory;\n if (!images.size) {\n return;\n }\n ZipContainer.addFolders([\n \"xl/worksheets/_rels\",\n \"xl/drawings/\",\n \"xl/drawings/_rels\",\n \"xl/media/\"\n ]);\n let imgCounter = 0;\n images.forEach((value) => {\n const firstImage = value[0].image[0];\n const { base64, imageType } = firstImage;\n const ext = imageType === \"jpg\" ? \"jpeg\" : imageType;\n ZipContainer.addFile(`xl/media/image${++imgCounter}.${ext}`, base64, true);\n });\n};\nvar createExcelXmlWorksheets = (data) => {\n let imageRelationCounter = 0;\n let headerFooterImageCounter = 0;\n let tableRelationCounter = 0;\n const { images, worksheetDataTables, worksheetImages, worksheetHeaderFooterImages } = ExcelXlsxFactory;\n for (let i = 0; i < data.length; i++) {\n const value = data[i];\n ZipContainer.addFile(`xl/worksheets/sheet${i + 1}.xml`, value, false);\n const hasImages = images.size > 0 && worksheetImages.has(i);\n const hasTables = worksheetDataTables.size > 0 && worksheetDataTables.has(i);\n const hasHeaderFooterImages = images.size && worksheetHeaderFooterImages.has(i);\n if (!hasImages && !hasTables && !hasHeaderFooterImages) {\n continue;\n }\n let tableIndex;\n let drawingIndex;\n let vmlDrawingIndex;\n if (hasImages) {\n createExcelXmlDrawings(i, imageRelationCounter);\n drawingIndex = imageRelationCounter;\n imageRelationCounter++;\n }\n if (hasHeaderFooterImages) {\n createExcelVmlDrawings(i, headerFooterImageCounter);\n vmlDrawingIndex = headerFooterImageCounter;\n headerFooterImageCounter++;\n }\n if (hasTables) {\n tableIndex = tableRelationCounter++;\n }\n const worksheetRelFile = `xl/worksheets/_rels/sheet${i + 1}.xml.rels`;\n ZipContainer.addFile(\n worksheetRelFile,\n ExcelXlsxFactory.createRelationships({\n tableIndex,\n drawingIndex,\n vmlDrawingIndex\n })\n );\n }\n};\nvar createExcelXmlDrawings = (sheetIndex, drawingIndex) => {\n const drawingFolder = \"xl/drawings\";\n const drawingFileName = `${drawingFolder}/drawing${drawingIndex + 1}.xml`;\n const relFileName = `${drawingFolder}/_rels/drawing${drawingIndex + 1}.xml.rels`;\n ZipContainer.addFile(relFileName, ExcelXlsxFactory.createDrawingRel(sheetIndex));\n ZipContainer.addFile(drawingFileName, ExcelXlsxFactory.createDrawing(sheetIndex));\n};\nvar createExcelVmlDrawings = (sheetIndex, drawingIndex) => {\n const drawingFolder = \"xl/drawings\";\n const drawingFileName = `${drawingFolder}/vmlDrawing${drawingIndex + 1}.vml`;\n const relFileName = `${drawingFolder}/_rels/vmlDrawing${drawingIndex + 1}.vml.rels`;\n ZipContainer.addFile(drawingFileName, ExcelXlsxFactory.createVmlDrawing(sheetIndex));\n ZipContainer.addFile(relFileName, ExcelXlsxFactory.createVmlDrawingRel(sheetIndex));\n};\nvar createExcelXmlTables = () => {\n const { worksheetDataTables } = ExcelXlsxFactory;\n const tablesDataByWorksheet = worksheetDataTables;\n const worksheetKeys = Array.from(tablesDataByWorksheet.keys());\n for (let i = 0; i < worksheetKeys.length; i++) {\n const sheetIndex = worksheetKeys[i];\n const dataTable = tablesDataByWorksheet.get(sheetIndex);\n if (!dataTable) {\n continue;\n }\n ZipContainer.addFile(\n `xl/tables/${dataTable.name}.xml`,\n ExcelXlsxFactory.createTable(dataTable, i)\n );\n }\n};\nvar createExcelXmlCoreSheets = (fontSize, author, sheetLen) => {\n ZipContainer.addFile(\"xl/workbook.xml\", ExcelXlsxFactory.createWorkbook());\n ZipContainer.addFile(\"xl/styles.xml\", ExcelXlsxFactory.createStylesheet(fontSize));\n ZipContainer.addFile(\"xl/sharedStrings.xml\", ExcelXlsxFactory.createSharedStrings());\n ZipContainer.addFile(\"xl/theme/theme1.xml\", ExcelXlsxFactory.createTheme());\n ZipContainer.addFile(\"xl/_rels/workbook.xml.rels\", ExcelXlsxFactory.createWorkbookRels(sheetLen));\n ZipContainer.addFile(\"docProps/core.xml\", ExcelXlsxFactory.createCore(author));\n ZipContainer.addFile(\"[Content_Types].xml\", ExcelXlsxFactory.createContentTypes(sheetLen));\n ZipContainer.addFile(\"_rels/.rels\", ExcelXlsxFactory.createRels());\n};\nvar createExcelFileForExcel = (data, options = {}) => {\n if (!data || data.length === 0) {\n console.warn(\"AG Grid: Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.\");\n ExcelXlsxFactory.resetFactory();\n return false;\n }\n const {\n fontSize = 11,\n author = \"AG Grid\"\n } = options;\n createExcelXMLCoreFolderStructure();\n createExcelXmlTables();\n createExcelXmlWorksheets(data);\n createExcelXmlCoreSheets(fontSize, author, data.length);\n ExcelXlsxFactory.resetFactory();\n return true;\n};\nvar getMultipleSheetsAsExcelCompressed = (params) => {\n const { data, fontSize, author } = params;\n const mimeType = params.mimeType || \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n if (!createExcelFileForExcel(data, {\n author,\n fontSize\n })) {\n return Promise.resolve(void 0);\n }\n return ZipContainer.getZipFile(mimeType);\n};\nvar getMultipleSheetsAsExcel = (params) => {\n const { data, fontSize, author } = params;\n const mimeType = params.mimeType || \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n if (!createExcelFileForExcel(data, {\n author,\n fontSize\n })) {\n return;\n }\n return ZipContainer.getUncompressedZipFile(mimeType);\n};\nvar exportMultipleSheetsAsExcel = (params) => {\n const { fileName = \"export.xlsx\" } = params;\n getMultipleSheetsAsExcelCompressed(params).then((contents) => {\n if (contents) {\n const downloadFileName = typeof fileName === \"function\" ? fileName() : fileName;\n Downloader.download(downloadFileName, contents);\n }\n });\n};\nvar ExcelCreator = class extends BaseCreator {\n postConstruct() {\n this.setBeans({\n gridSerializer: this.gridSerializer,\n gos: this.gos\n });\n }\n getMergedParams(params) {\n const baseParams = this.gos.get(\"defaultExcelExportParams\");\n return Object.assign({}, baseParams, params);\n }\n export(userParams) {\n if (this.isExportSuppressed()) {\n console.warn(`AG Grid: Export cancelled. Export is not allowed as per your configuration.`);\n return;\n }\n const mergedParams = this.getMergedParams(userParams);\n const data = this.getData(mergedParams);\n const exportParams = {\n data: [data],\n fontSize: mergedParams.fontSize,\n author: mergedParams.author,\n mimeType: mergedParams.mimeType\n };\n this.packageCompressedFile(exportParams).then((packageFile) => {\n if (packageFile) {\n const { fileName } = mergedParams;\n const providedFileName = typeof fileName === \"function\" ? fileName(this.gos.getGridCommonParams()) : fileName;\n Downloader.download(this.getFileName(providedFileName), packageFile);\n }\n });\n }\n exportDataAsExcel(params) {\n this.export(params);\n }\n getDataAsExcel(params) {\n const mergedParams = this.getMergedParams(params);\n const data = this.getData(mergedParams);\n const exportParams = {\n data: [data],\n fontSize: mergedParams.fontSize,\n author: mergedParams.author,\n mimeType: mergedParams.mimeType\n };\n return this.packageFile(exportParams);\n }\n setFactoryMode(factoryMode) {\n ExcelXlsxFactory.factoryMode = factoryMode;\n }\n getFactoryMode() {\n return ExcelXlsxFactory.factoryMode;\n }\n getSheetDataForExcel(params) {\n const mergedParams = this.getMergedParams(params);\n return this.getData(mergedParams);\n }\n getMultipleSheetsAsExcel(params) {\n return getMultipleSheetsAsExcel(params);\n }\n exportMultipleSheetsAsExcel(params) {\n exportMultipleSheetsAsExcel(params);\n }\n getDefaultFileExtension() {\n return \"xlsx\";\n }\n createSerializingSession(params) {\n const { columnModel, valueService, gos } = this;\n let sheetName;\n if (params.sheetName != null) {\n const { sheetName: sheetNameParam } = params;\n const sheetNameValue = typeof sheetNameParam === \"function\" ? sheetNameParam(this.gos.getGridCommonParams()) : sheetNameParam;\n sheetName = String(sheetNameValue).substring(0, 31);\n } else {\n sheetName = \"ag-grid\";\n }\n const config = __spreadProps6(__spreadValues7({}, params), {\n sheetName,\n columnModel,\n valueService,\n gos,\n suppressRowOutline: params.suppressRowOutline || params.skipRowGroups,\n headerRowHeight: params.headerRowHeight || params.rowHeight,\n baseExcelStyles: this.gos.get(\"excelStyles\") || [],\n styleLinker: this.styleLinker.bind(this)\n });\n return new ExcelSerializingSession(config);\n }\n styleLinker(params) {\n const { rowType, rowIndex, value, column, columnGroup, node } = params;\n const isHeader = rowType === RowType2.HEADER;\n const isGroupHeader = rowType === RowType2.HEADER_GROUPING;\n const col = isHeader ? column : columnGroup;\n let headerClasses = [];\n if (isHeader || isGroupHeader) {\n headerClasses.push(\"header\");\n if (isGroupHeader) {\n headerClasses.push(\"headerGroup\");\n }\n if (col) {\n headerClasses = headerClasses.concat(CssClassApplier3.getHeaderClassesFromColDef(\n col.getDefinition(),\n this.gos,\n column || null,\n columnGroup || null\n ));\n }\n return headerClasses;\n }\n const styles = this.gos.get(\"excelStyles\");\n const applicableStyles = [\"cell\"];\n if (!styles || !styles.length) {\n return applicableStyles;\n }\n const styleIds = styles.map((it) => {\n return it.id;\n });\n this.stylingService.processAllCellClasses(\n column.getDefinition(),\n this.gos.addGridCommonParams({\n value,\n data: node.data,\n node,\n colDef: column.getDefinition(),\n column,\n rowIndex\n }),\n (className) => {\n if (styleIds.indexOf(className) > -1) {\n applicableStyles.push(className);\n }\n }\n );\n return applicableStyles.sort((left, right) => {\n return styleIds.indexOf(left) < styleIds.indexOf(right) ? -1 : 1;\n });\n }\n isExportSuppressed() {\n return this.gos.get(\"suppressExcelExport\");\n }\n packageCompressedFile(params) {\n return getMultipleSheetsAsExcelCompressed(params);\n }\n packageFile(params) {\n return getMultipleSheetsAsExcel(params);\n }\n};\n__decorateClass9([\n Autowired57(\"columnModel\")\n], ExcelCreator.prototype, \"columnModel\", 2);\n__decorateClass9([\n Autowired57(\"valueService\")\n], ExcelCreator.prototype, \"valueService\", 2);\n__decorateClass9([\n Autowired57(\"stylingService\")\n], ExcelCreator.prototype, \"stylingService\", 2);\n__decorateClass9([\n Autowired57(\"gridSerializer\")\n], ExcelCreator.prototype, \"gridSerializer\", 2);\n__decorateClass9([\n Autowired57(\"gridOptionsService\")\n], ExcelCreator.prototype, \"gos\", 2);\n__decorateClass9([\n PostConstruct58\n], ExcelCreator.prototype, \"postConstruct\", 1);\nExcelCreator = __decorateClass9([\n Bean12(\"excelCreator\")\n], ExcelCreator);\nvar VERSION9 = \"31.3.2\";\nvar ExcelExportModule = {\n version: VERSION9,\n moduleName: ModuleNames9.ExcelExportModule,\n beans: [\n // beans in this module\n ExcelCreator,\n // these beans are part of CSV Export module\n GridSerializer2,\n CsvCreator\n ],\n dependantModules: [\n CsvExportModule2,\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/filter-tool-panel/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames10 } from \"ag-grid-community\";\nimport {\n _ as _41,\n Autowired as Autowired58,\n Component as Component48,\n Events as Events15,\n PostConstruct as PostConstruct59,\n PreConstruct as PreConstruct3,\n RefSelector as RefSelector18\n} from \"ag-grid-community\";\nimport {\n _ as _47,\n Autowired as Autowired413,\n Component as Component49,\n Events as Events45,\n ProvidedColumnGroup as ProvidedColumnGroup22\n} from \"ag-grid-community\";\nimport {\n _ as _213,\n Autowired as Autowired213,\n Column as Column22,\n Component as Component212,\n Events as Events27,\n KeyCode as KeyCode9,\n PostConstruct as PostConstruct213,\n RefSelector as RefSelector26,\n FilterWrapperComp as FilterWrapperComp2\n} from \"ag-grid-community\";\nimport {\n _ as _312,\n AgGroupComponent,\n Autowired as Autowired313,\n Column as Column32,\n Component as Component313,\n Events as Events35,\n ProvidedColumnGroup as ProvidedColumnGroup3,\n PostConstruct as PostConstruct313,\n PreConstruct as PreConstruct22,\n RefSelector as RefSelector36\n} from \"ag-grid-community\";\nimport {\n Component as Component55,\n RefSelector as RefSelector44\n} from \"ag-grid-community\";\nvar __defProp10 = Object.defineProperty;\nvar __getOwnPropDesc10 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropSymbols8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp8 = (obj, key, value) => key in obj ? __defProp10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp9.call(b, prop))\n __defNormalProp8(a, prop, b[prop]);\n if (__getOwnPropSymbols8)\n for (var prop of __getOwnPropSymbols8(b)) {\n if (__propIsEnum8.call(b, prop))\n __defNormalProp8(a, prop, b[prop]);\n }\n return a;\n};\nvar __decorateClass10 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc10(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp10(target, key, result);\n return result;\n};\nvar FiltersToolPanelHeaderPanel = class extends Component48 {\n preConstruct() {\n this.setTemplate(\n /* html */\n `
\n
\n \n
`\n );\n }\n postConstruct() {\n const translate = this.localeService.getLocaleTextFunc();\n this.eFilterTextField.setAutoComplete(false).setInputAriaLabel(translate(\"ariaFilterColumnsInput\", \"Filter Columns Input\")).onValueChange(this.onSearchTextChanged.bind(this));\n this.createExpandIcons();\n this.setExpandState(\n 0\n /* EXPANDED */\n );\n this.addManagedListener(this.eExpand, \"click\", this.onExpandClicked.bind(this));\n this.addManagedListener(this.eventService, Events15.EVENT_NEW_COLUMNS_LOADED, this.showOrHideOptions.bind(this));\n }\n init(params) {\n this.params = params;\n if (this.columnModel.isReady()) {\n this.showOrHideOptions();\n }\n }\n createExpandIcons() {\n this.eExpand.appendChild(this.eExpandChecked = _41.createIconNoSpan(\"columnSelectOpen\", this.gos));\n this.eExpand.appendChild(this.eExpandUnchecked = _41.createIconNoSpan(\"columnSelectClosed\", this.gos));\n this.eExpand.appendChild(this.eExpandIndeterminate = _41.createIconNoSpan(\"columnSelectIndeterminate\", this.gos));\n }\n // we only show expand / collapse if we are showing filters\n showOrHideOptions() {\n const showFilterSearch = !this.params.suppressFilterSearch;\n const showExpand = !this.params.suppressExpandAll;\n const translate = this.localeService.getLocaleTextFunc();\n this.eFilterTextField.setInputPlaceholder(translate(\"searchOoo\", \"Search...\"));\n const isFilterGroupPresent = (col) => col.getOriginalParent() && col.isFilterAllowed();\n const filterGroupsPresent = this.columnModel.getAllGridColumns().some(isFilterGroupPresent);\n _41.setDisplayed(this.eFilterTextField.getGui(), showFilterSearch);\n _41.setDisplayed(this.eExpand, showExpand && filterGroupsPresent);\n }\n onSearchTextChanged() {\n if (!this.onSearchTextChangedDebounced) {\n this.onSearchTextChangedDebounced = _41.debounce(() => {\n this.dispatchEvent({ type: \"searchChanged\", searchText: this.eFilterTextField.getValue() });\n }, 300);\n }\n this.onSearchTextChangedDebounced();\n }\n onExpandClicked() {\n const event = this.currentExpandState === 0 ? { type: \"collapseAll\" } : { type: \"expandAll\" };\n this.dispatchEvent(event);\n }\n setExpandState(state) {\n this.currentExpandState = state;\n _41.setDisplayed(\n this.eExpandChecked,\n this.currentExpandState === 0\n /* EXPANDED */\n );\n _41.setDisplayed(\n this.eExpandUnchecked,\n this.currentExpandState === 1\n /* COLLAPSED */\n );\n _41.setDisplayed(\n this.eExpandIndeterminate,\n this.currentExpandState === 2\n /* INDETERMINATE */\n );\n }\n};\n__decorateClass10([\n Autowired58(\"columnModel\")\n], FiltersToolPanelHeaderPanel.prototype, \"columnModel\", 2);\n__decorateClass10([\n RefSelector18(\"eExpand\")\n], FiltersToolPanelHeaderPanel.prototype, \"eExpand\", 2);\n__decorateClass10([\n RefSelector18(\"eFilterTextField\")\n], FiltersToolPanelHeaderPanel.prototype, \"eFilterTextField\", 2);\n__decorateClass10([\n PreConstruct3\n], FiltersToolPanelHeaderPanel.prototype, \"preConstruct\", 1);\n__decorateClass10([\n PostConstruct59\n], FiltersToolPanelHeaderPanel.prototype, \"postConstruct\", 1);\nvar _ToolPanelFilterComp = class _ToolPanelFilterComp2 extends Component212 {\n constructor(hideHeader, expandedCallback) {\n super(_ToolPanelFilterComp2.TEMPLATE);\n this.expandedCallback = expandedCallback;\n this.expanded = false;\n this.hideHeader = hideHeader;\n }\n postConstruct() {\n this.eExpandChecked = _213.createIconNoSpan(\"columnSelectOpen\", this.gos);\n this.eExpandUnchecked = _213.createIconNoSpan(\"columnSelectClosed\", this.gos);\n this.eExpand.appendChild(this.eExpandChecked);\n this.eExpand.appendChild(this.eExpandUnchecked);\n }\n setColumn(column) {\n this.column = column;\n this.eFilterName.innerText = this.columnModel.getDisplayNameForColumn(this.column, \"filterToolPanel\", false) || \"\";\n this.addManagedListener(this.eFilterToolPanelHeader, \"click\", this.toggleExpanded.bind(this));\n this.addManagedListener(this.eFilterToolPanelHeader, \"keydown\", this.onKeyDown.bind(this));\n this.addManagedListener(this.eventService, Events27.EVENT_FILTER_OPENED, this.onFilterOpened.bind(this));\n this.addInIcon(\"filter\", this.eFilterIcon, this.column);\n _213.setDisplayed(this.eFilterIcon, this.isFilterActive(), { skipAriaHidden: true });\n _213.setDisplayed(this.eExpandChecked, false);\n if (this.hideHeader) {\n _213.setDisplayed(this.eFilterToolPanelHeader, false);\n this.eFilterToolPanelHeader.removeAttribute(\"tabindex\");\n } else {\n this.eFilterToolPanelHeader.setAttribute(\"tabindex\", \"0\");\n }\n this.addManagedListener(this.column, Column22.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n }\n onKeyDown(e) {\n const { key } = e;\n const { ENTER, SPACE, LEFT, RIGHT } = KeyCode9;\n if (key !== ENTER && key !== SPACE && key !== LEFT && key !== RIGHT) {\n return;\n }\n e.preventDefault();\n if (key === ENTER || key === SPACE) {\n this.toggleExpanded();\n } else if (key === KeyCode9.LEFT) {\n this.collapse();\n } else {\n this.expand();\n }\n }\n getColumn() {\n return this.column;\n }\n getColumnFilterName() {\n return this.columnModel.getDisplayNameForColumn(this.column, \"filterToolPanel\", false);\n }\n addCssClassToTitleBar(cssClass) {\n this.eFilterToolPanelHeader.classList.add(cssClass);\n }\n addInIcon(iconName, eParent, column) {\n if (eParent == null) {\n return;\n }\n const eIcon = _213.createIconNoSpan(iconName, this.gos, column);\n eParent.appendChild(eIcon);\n }\n isFilterActive() {\n return this.filterManager.isFilterActive(this.column);\n }\n onFilterChanged() {\n _213.setDisplayed(this.eFilterIcon, this.isFilterActive(), { skipAriaHidden: true });\n this.dispatchEvent({ type: Column22.EVENT_FILTER_CHANGED });\n }\n toggleExpanded() {\n this.expanded ? this.collapse() : this.expand();\n }\n expand() {\n if (this.expanded) {\n return;\n }\n this.expanded = true;\n _213.setAriaExpanded(this.eFilterToolPanelHeader, true);\n _213.setDisplayed(this.eExpandChecked, true);\n _213.setDisplayed(this.eExpandUnchecked, false);\n this.addFilterElement();\n this.expandedCallback();\n }\n addFilterElement(suppressFocus) {\n var _a;\n const filterPanelWrapper = _213.loadTemplate(\n /* html */\n `
`\n );\n const comp = this.createManagedBean(new FilterWrapperComp2(this.column, \"TOOLBAR\"));\n this.filterWrapperComp = comp;\n if (!comp.hasFilter()) {\n return;\n }\n (_a = comp.getFilter()) == null ? void 0 : _a.then((filter) => {\n this.underlyingFilter = filter;\n if (!filter) {\n return;\n }\n filterPanelWrapper.appendChild(comp.getGui());\n this.agFilterToolPanelBody.appendChild(filterPanelWrapper);\n comp.afterGuiAttached({ container: \"toolPanel\", suppressFocus });\n });\n }\n collapse() {\n var _a;\n if (!this.expanded) {\n return;\n }\n this.expanded = false;\n _213.setAriaExpanded(this.eFilterToolPanelHeader, false);\n this.removeFilterElement();\n _213.setDisplayed(this.eExpandChecked, false);\n _213.setDisplayed(this.eExpandUnchecked, true);\n (_a = this.filterWrapperComp) == null ? void 0 : _a.afterGuiDetached();\n this.destroyBean(this.filterWrapperComp);\n this.expandedCallback();\n }\n removeFilterElement() {\n _213.clearElement(this.agFilterToolPanelBody);\n }\n isExpanded() {\n return this.expanded;\n }\n refreshFilter(isDisplayed) {\n var _a;\n if (!this.expanded) {\n return;\n }\n const filter = this.underlyingFilter;\n if (!filter) {\n return;\n }\n if (isDisplayed) {\n if (typeof filter.refreshVirtualList === \"function\") {\n filter.refreshVirtualList();\n }\n } else {\n (_a = filter.afterGuiDetached) == null ? void 0 : _a.call(filter);\n }\n }\n onFilterOpened(event) {\n if (event.source !== \"COLUMN_MENU\") {\n return;\n }\n if (event.column !== this.column) {\n return;\n }\n if (!this.expanded) {\n return;\n }\n this.collapse();\n }\n};\n_ToolPanelFilterComp.TEMPLATE = /* html */\n`\n
\n
\n
\n \n \n
\n
\n
`;\n__decorateClass10([\n RefSelector26(\"eFilterToolPanelHeader\")\n], _ToolPanelFilterComp.prototype, \"eFilterToolPanelHeader\", 2);\n__decorateClass10([\n RefSelector26(\"eFilterName\")\n], _ToolPanelFilterComp.prototype, \"eFilterName\", 2);\n__decorateClass10([\n RefSelector26(\"agFilterToolPanelBody\")\n], _ToolPanelFilterComp.prototype, \"agFilterToolPanelBody\", 2);\n__decorateClass10([\n RefSelector26(\"eFilterIcon\")\n], _ToolPanelFilterComp.prototype, \"eFilterIcon\", 2);\n__decorateClass10([\n RefSelector26(\"eExpand\")\n], _ToolPanelFilterComp.prototype, \"eExpand\", 2);\n__decorateClass10([\n Autowired213(\"filterManager\")\n], _ToolPanelFilterComp.prototype, \"filterManager\", 2);\n__decorateClass10([\n Autowired213(\"columnModel\")\n], _ToolPanelFilterComp.prototype, \"columnModel\", 2);\n__decorateClass10([\n PostConstruct213\n], _ToolPanelFilterComp.prototype, \"postConstruct\", 1);\nvar ToolPanelFilterComp = _ToolPanelFilterComp;\nvar _ToolPanelFilterGroupComp = class _ToolPanelFilterGroupComp2 extends Component313 {\n constructor(columnGroup, childFilterComps, expandedCallback, depth, showingColumn) {\n super();\n this.columnGroup = columnGroup;\n this.childFilterComps = childFilterComps;\n this.depth = depth;\n this.expandedCallback = expandedCallback;\n this.showingColumn = showingColumn;\n }\n preConstruct() {\n const groupParams = {\n cssIdentifier: \"filter-toolpanel\",\n direction: \"vertical\"\n };\n this.setTemplate(_ToolPanelFilterGroupComp2.TEMPLATE, { filterGroupComp: groupParams });\n }\n init() {\n this.setGroupTitle();\n this.filterGroupComp.setAlignItems(\"stretch\");\n this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`);\n this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}-header`);\n this.childFilterComps.forEach((filterComp) => {\n this.filterGroupComp.addItem(filterComp);\n filterComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth + 1}-header`);\n });\n this.refreshFilterClass();\n this.addExpandCollapseListeners();\n this.addFilterChangedListeners();\n this.setupTooltip();\n this.addInIcon(\"filter\");\n }\n setupTooltip() {\n if (!this.showingColumn) {\n return;\n }\n const isTooltipWhenTruncated = this.gos.get(\"tooltipShowMode\") === \"whenTruncated\";\n let shouldDisplayTooltip;\n if (isTooltipWhenTruncated) {\n shouldDisplayTooltip = () => {\n const eGui = this.filterGroupComp.getGui();\n const eTitle = eGui.querySelector(\".ag-group-title\");\n if (!eTitle) {\n return true;\n }\n return eTitle.scrollWidth > eTitle.clientWidth;\n };\n }\n const refresh = () => {\n const newTooltipText = this.columnGroup.getColDef().headerTooltip;\n this.setTooltip({ newTooltipText, location: \"filterToolPanelColumnGroup\", shouldDisplayTooltip });\n };\n refresh();\n this.addManagedListener(this.eventService, Events35.EVENT_NEW_COLUMNS_LOADED, refresh);\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"filterToolPanelColumnGroup\";\n return res;\n }\n addCssClassToTitleBar(cssClass) {\n this.filterGroupComp.addCssClassToTitleBar(cssClass);\n }\n refreshFilters(isDisplayed) {\n this.childFilterComps.forEach((filterComp) => {\n if (filterComp instanceof _ToolPanelFilterGroupComp2) {\n filterComp.refreshFilters(isDisplayed);\n } else {\n filterComp.refreshFilter(isDisplayed);\n }\n });\n }\n isColumnGroup() {\n return this.columnGroup instanceof ProvidedColumnGroup3;\n }\n isExpanded() {\n return this.filterGroupComp.isExpanded();\n }\n getChildren() {\n return this.childFilterComps;\n }\n getFilterGroupName() {\n return this.filterGroupName ? this.filterGroupName : \"\";\n }\n getFilterGroupId() {\n return this.columnGroup.getId();\n }\n hideGroupItem(hide, index) {\n this.filterGroupComp.hideItem(hide, index);\n }\n hideGroup(hide) {\n this.setDisplayed(!hide);\n }\n addInIcon(iconName) {\n const eIcon = _312.createIconNoSpan(iconName, this.gos);\n if (eIcon) {\n eIcon.classList.add(\"ag-filter-toolpanel-group-instance-header-icon\");\n }\n this.filterGroupComp.addTitleBarWidget(eIcon);\n }\n forEachToolPanelFilterChild(action) {\n this.childFilterComps.forEach((filterComp) => {\n if (filterComp instanceof ToolPanelFilterComp) {\n action(filterComp);\n }\n });\n }\n addExpandCollapseListeners() {\n const expandListener = this.isColumnGroup() ? () => this.expandedCallback() : () => this.forEachToolPanelFilterChild((filterComp) => filterComp.expand());\n const collapseListener = this.isColumnGroup() ? () => this.expandedCallback() : () => this.forEachToolPanelFilterChild((filterComp) => filterComp.collapse());\n this.addManagedListener(this.filterGroupComp, AgGroupComponent.EVENT_EXPANDED, expandListener);\n this.addManagedListener(this.filterGroupComp, AgGroupComponent.EVENT_COLLAPSED, collapseListener);\n }\n getColumns() {\n if (this.columnGroup instanceof ProvidedColumnGroup3) {\n return this.columnGroup.getLeafColumns();\n }\n return [this.columnGroup];\n }\n addFilterChangedListeners() {\n this.getColumns().forEach((column) => {\n this.addManagedListener(column, Column32.EVENT_FILTER_CHANGED, () => this.refreshFilterClass());\n });\n if (!(this.columnGroup instanceof ProvidedColumnGroup3)) {\n this.addManagedListener(this.eventService, Events35.EVENT_FILTER_OPENED, this.onFilterOpened.bind(this));\n }\n }\n refreshFilterClass() {\n const columns = this.getColumns();\n const anyChildFiltersActive = () => columns.some((col) => col.isFilterActive());\n this.filterGroupComp.addOrRemoveCssClass(\"ag-has-filter\", anyChildFiltersActive());\n }\n onFilterOpened(event) {\n if (event.source !== \"COLUMN_MENU\") {\n return;\n }\n if (event.column !== this.columnGroup) {\n return;\n }\n if (!this.isExpanded()) {\n return;\n }\n this.collapse();\n }\n expand() {\n this.filterGroupComp.toggleGroupExpand(true);\n }\n collapse() {\n this.filterGroupComp.toggleGroupExpand(false);\n }\n setGroupTitle() {\n this.filterGroupName = this.columnGroup instanceof ProvidedColumnGroup3 ? this.getColumnGroupName(this.columnGroup) : this.getColumnName(this.columnGroup);\n this.filterGroupComp.setTitle(this.filterGroupName || \"\");\n }\n getColumnGroupName(columnGroup) {\n return this.columnModel.getDisplayNameForProvidedColumnGroup(null, columnGroup, \"filterToolPanel\");\n }\n getColumnName(column) {\n return this.columnModel.getDisplayNameForColumn(column, \"filterToolPanel\", false);\n }\n destroyFilters() {\n this.childFilterComps = this.destroyBeans(this.childFilterComps);\n _312.clearElement(this.getGui());\n }\n destroy() {\n this.destroyFilters();\n super.destroy();\n }\n};\n_ToolPanelFilterGroupComp.TEMPLATE = /* html */\n`
\n \n
`;\n__decorateClass10([\n RefSelector36(\"filterGroupComp\")\n], _ToolPanelFilterGroupComp.prototype, \"filterGroupComp\", 2);\n__decorateClass10([\n Autowired313(\"columnModel\")\n], _ToolPanelFilterGroupComp.prototype, \"columnModel\", 2);\n__decorateClass10([\n PreConstruct22\n], _ToolPanelFilterGroupComp.prototype, \"preConstruct\", 1);\n__decorateClass10([\n PostConstruct313\n], _ToolPanelFilterGroupComp.prototype, \"init\", 1);\nvar ToolPanelFilterGroupComp = _ToolPanelFilterGroupComp;\nvar _FiltersToolPanelListPanel = class _FiltersToolPanelListPanel2 extends Component49 {\n constructor() {\n super(_FiltersToolPanelListPanel2.TEMPLATE);\n this.initialised = false;\n this.hasLoadedInitialState = false;\n this.isInitialState = false;\n this.filterGroupComps = [];\n this.suppressOnColumnsChanged = false;\n this.onColumnsChangedPending = false;\n }\n init(params) {\n this.initialised = true;\n const defaultParams = this.gos.addGridCommonParams({\n suppressExpandAll: false,\n suppressFilterSearch: false,\n suppressSyncLayoutWithGrid: false\n });\n _47.mergeDeep(defaultParams, params);\n this.params = defaultParams;\n if (!this.params.suppressSyncLayoutWithGrid) {\n this.addManagedListener(this.eventService, Events45.EVENT_COLUMN_MOVED, () => this.onColumnsChanged());\n }\n this.addManagedListener(this.eventService, Events45.EVENT_NEW_COLUMNS_LOADED, () => this.onColumnsChanged());\n this.addManagedListener(this.eventService, Events45.EVENT_TOOL_PANEL_VISIBLE_CHANGED, (event) => {\n if (event.key === \"filters\") {\n this.refreshFilters(event.visible);\n }\n });\n this.addManagedListener(this.eventService, Events45.EVENT_DRAG_STARTED, () => {\n this.suppressOnColumnsChanged = true;\n });\n this.addManagedListener(this.eventService, Events45.EVENT_DRAG_STOPPED, () => {\n this.suppressOnColumnsChanged = false;\n if (this.onColumnsChangedPending) {\n this.onColumnsChangedPending = false;\n this.onColumnsChanged();\n }\n });\n if (this.columnModel.isReady()) {\n this.onColumnsChanged();\n }\n }\n onColumnsChanged() {\n if (this.suppressOnColumnsChanged) {\n this.onColumnsChangedPending = true;\n return;\n }\n const pivotModeActive = this.columnModel.isPivotMode();\n const shouldSyncColumnLayoutWithGrid = !this.params.suppressSyncLayoutWithGrid && !pivotModeActive;\n shouldSyncColumnLayoutWithGrid ? this.syncFilterLayout() : this.buildTreeFromProvidedColumnDefs();\n this.refreshAriaLabel();\n }\n syncFilterLayout() {\n this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this));\n this.refreshAriaLabel();\n }\n buildTreeFromProvidedColumnDefs() {\n const columnTree = this.columnModel.getPrimaryColumnTree();\n this.recreateFilters(columnTree);\n }\n setFiltersLayout(colDefs) {\n const columnTree = this.toolPanelColDefService.createColumnTree(colDefs);\n this.recreateFilters(columnTree);\n }\n recreateFilters(columnTree) {\n const activeElement = this.gos.getActiveDomElement();\n if (!this.hasLoadedInitialState) {\n this.hasLoadedInitialState = true;\n this.isInitialState = !!this.params.initialState;\n }\n const expansionState = this.getExpansionState();\n this.destroyFilters();\n this.filterGroupComps = this.recursivelyAddComps(columnTree, 0, expansionState);\n const len = this.filterGroupComps.length;\n if (len) {\n this.filterGroupComps.forEach((comp) => this.appendChild(comp));\n this.setFirstAndLastVisible(0, len - 1);\n }\n if (_47.exists(this.searchFilterText)) {\n this.searchFilters(this.searchFilterText);\n }\n this.fireExpandedEvent();\n if (this.getGui().contains(activeElement)) {\n activeElement.focus();\n }\n this.isInitialState = false;\n this.refreshAriaLabel();\n }\n recursivelyAddComps(tree, depth, expansionState) {\n return _47.flatten(tree.map((child) => {\n if (child instanceof ProvidedColumnGroup22) {\n return _47.flatten(this.recursivelyAddFilterGroupComps(child, depth, expansionState));\n }\n const column = child;\n if (!this.shouldDisplayFilter(column)) {\n return [];\n }\n const hideFilterCompHeader = depth === 0;\n const filterComp = new ToolPanelFilterComp(hideFilterCompHeader, () => this.onFilterExpanded());\n this.createBean(filterComp);\n filterComp.setColumn(column);\n if (expansionState.get(column.getId())) {\n filterComp.expand();\n }\n if (depth > 0) {\n return filterComp;\n }\n const filterGroupComp = this.createBean(new ToolPanelFilterGroupComp(column, [filterComp], this.onGroupExpanded.bind(this), depth, true));\n filterGroupComp.addCssClassToTitleBar(\"ag-filter-toolpanel-header\");\n if (!expansionState.get(filterGroupComp.getFilterGroupId())) {\n filterGroupComp.collapse();\n }\n return filterGroupComp;\n }));\n }\n refreshAriaLabel() {\n const translate = this.localeService.getLocaleTextFunc();\n const filterListName = translate(\"ariaFilterPanelList\", \"Filter List\");\n const localeFilters = translate(\"filters\", \"Filters\");\n const eGui = this.getGui();\n const groupSelector = \".ag-filter-toolpanel-group-wrapper\";\n const itemSelector = \".ag-filter-toolpanel-group-item\";\n const hiddenSelector = \".ag-hidden\";\n const visibleItems = eGui.querySelectorAll(`${itemSelector}:not(${groupSelector}, ${hiddenSelector})`);\n const totalVisibleItems = visibleItems.length;\n _47.setAriaLabel(this.getAriaElement(), `${filterListName} ${totalVisibleItems} ${localeFilters}`);\n }\n recursivelyAddFilterGroupComps(columnGroup, depth, expansionState) {\n if (!this.filtersExistInChildren(columnGroup.getChildren())) {\n return;\n }\n const colGroupDef = columnGroup.getColGroupDef();\n if (colGroupDef && colGroupDef.suppressFiltersToolPanel) {\n return [];\n }\n const newDepth = columnGroup.isPadding() ? depth : depth + 1;\n const childFilterComps = _47.flatten(this.recursivelyAddComps(columnGroup.getChildren(), newDepth, expansionState));\n if (columnGroup.isPadding()) {\n return childFilterComps;\n }\n const filterGroupComp = new ToolPanelFilterGroupComp(columnGroup, childFilterComps, this.onGroupExpanded.bind(this), depth, false);\n this.createBean(filterGroupComp);\n filterGroupComp.addCssClassToTitleBar(\"ag-filter-toolpanel-header\");\n const expansionStateValue = expansionState.get(filterGroupComp.getFilterGroupId());\n if (this.isInitialState && !expansionStateValue || expansionStateValue === false) {\n filterGroupComp.collapse();\n }\n return [filterGroupComp];\n }\n filtersExistInChildren(tree) {\n return tree.some((child) => {\n if (child instanceof ProvidedColumnGroup22) {\n return this.filtersExistInChildren(child.getChildren());\n }\n return this.shouldDisplayFilter(child);\n });\n }\n shouldDisplayFilter(column) {\n const suppressFiltersToolPanel = column.getColDef() && column.getColDef().suppressFiltersToolPanel;\n return column.isFilterAllowed() && !suppressFiltersToolPanel;\n }\n getExpansionState() {\n const expansionState = /* @__PURE__ */ new Map();\n if (this.isInitialState) {\n const { expandedColIds, expandedGroupIds } = this.params.initialState;\n expandedColIds.forEach((id) => expansionState.set(id, true));\n expandedGroupIds.forEach((id) => expansionState.set(id, true));\n return expansionState;\n }\n const recursiveGetExpansionState = (filterGroupComp) => {\n expansionState.set(filterGroupComp.getFilterGroupId(), filterGroupComp.isExpanded());\n filterGroupComp.getChildren().forEach((child) => {\n if (child instanceof ToolPanelFilterGroupComp) {\n recursiveGetExpansionState(child);\n } else {\n expansionState.set(child.getColumn().getId(), child.isExpanded());\n }\n });\n };\n this.filterGroupComps.forEach(recursiveGetExpansionState);\n return expansionState;\n }\n // we don't support refreshing, but must implement because it's on the tool panel interface\n refresh() {\n }\n // lazy initialise the panel\n setVisible(visible) {\n super.setDisplayed(visible);\n if (visible && !this.initialised) {\n this.init(this.params);\n }\n }\n expandFilterGroups(expand, groupIds) {\n const updatedGroupIds = [];\n const updateGroupExpandState = (filterGroup) => {\n const groupId = filterGroup.getFilterGroupId();\n const shouldExpandOrCollapse = !groupIds || _47.includes(groupIds, groupId);\n if (shouldExpandOrCollapse) {\n if (expand && filterGroup.isColumnGroup()) {\n filterGroup.expand();\n } else {\n filterGroup.collapse();\n }\n updatedGroupIds.push(groupId);\n }\n filterGroup.getChildren().forEach((child) => {\n if (child instanceof ToolPanelFilterGroupComp) {\n updateGroupExpandState(child);\n }\n });\n };\n this.filterGroupComps.forEach(updateGroupExpandState);\n this.onGroupExpanded();\n if (groupIds) {\n const unrecognisedGroupIds = groupIds.filter((groupId) => updatedGroupIds.indexOf(groupId) < 0);\n if (unrecognisedGroupIds.length > 0) {\n console.warn(\"AG Grid: unable to find groups for these supplied groupIds:\", unrecognisedGroupIds);\n }\n }\n }\n expandFilters(expand, colIds) {\n const updatedColIds = [];\n const updateGroupExpandState = (filterComp) => {\n if (filterComp instanceof ToolPanelFilterGroupComp) {\n let anyChildrenChanged = false;\n filterComp.getChildren().forEach((child) => {\n const childUpdated = updateGroupExpandState(child);\n if (childUpdated) {\n if (expand) {\n filterComp.expand();\n anyChildrenChanged = true;\n } else if (!filterComp.isColumnGroup()) {\n filterComp.collapse();\n }\n }\n });\n return anyChildrenChanged;\n }\n const colId = filterComp.getColumn().getColId();\n const updateFilterExpandState = !colIds || _47.includes(colIds, colId);\n if (updateFilterExpandState) {\n expand ? filterComp.expand() : filterComp.collapse();\n updatedColIds.push(colId);\n }\n return updateFilterExpandState;\n };\n this.filterGroupComps.forEach(updateGroupExpandState);\n this.onGroupExpanded();\n if (colIds) {\n const unrecognisedColIds = colIds.filter((colId) => updatedColIds.indexOf(colId) < 0);\n if (unrecognisedColIds.length > 0) {\n console.warn(\"AG Grid: unable to find columns for these supplied colIds:\", unrecognisedColIds);\n }\n }\n }\n onGroupExpanded() {\n this.fireExpandedEvent();\n }\n onFilterExpanded() {\n this.dispatchEvent({ type: \"filterExpanded\" });\n }\n fireExpandedEvent() {\n let expandedCount = 0;\n let notExpandedCount = 0;\n const updateExpandCounts = (filterGroup) => {\n if (!filterGroup.isColumnGroup()) {\n return;\n }\n filterGroup.isExpanded() ? expandedCount++ : notExpandedCount++;\n filterGroup.getChildren().forEach((child) => {\n if (child instanceof ToolPanelFilterGroupComp) {\n updateExpandCounts(child);\n }\n });\n };\n this.filterGroupComps.forEach(updateExpandCounts);\n let state;\n if (expandedCount > 0 && notExpandedCount > 0) {\n state = 2;\n } else if (notExpandedCount > 0) {\n state = 1;\n } else {\n state = 0;\n }\n this.dispatchEvent({ type: \"groupExpanded\", state });\n }\n performFilterSearch(searchText) {\n this.searchFilterText = _47.exists(searchText) ? searchText.toLowerCase() : null;\n this.searchFilters(this.searchFilterText);\n }\n searchFilters(searchFilter) {\n const passesFilter = (groupName) => {\n return !_47.exists(searchFilter) || groupName.toLowerCase().indexOf(searchFilter) !== -1;\n };\n const recursivelySearch = (filterItem, parentPasses) => {\n if (!(filterItem instanceof ToolPanelFilterGroupComp)) {\n return passesFilter(filterItem.getColumnFilterName() || \"\");\n }\n const children = filterItem.getChildren();\n const groupNamePasses = passesFilter(filterItem.getFilterGroupName());\n const alreadyPassed = parentPasses || groupNamePasses;\n if (alreadyPassed) {\n filterItem.hideGroup(false);\n for (let i = 0; i < children.length; i++) {\n recursivelySearch(children[i], alreadyPassed);\n filterItem.hideGroupItem(false, i);\n }\n return true;\n }\n let anyChildPasses = false;\n children.forEach((child, index) => {\n const childPasses = recursivelySearch(child, parentPasses);\n filterItem.hideGroupItem(!childPasses, index);\n if (childPasses) {\n anyChildPasses = true;\n }\n });\n filterItem.hideGroup(!anyChildPasses);\n return anyChildPasses;\n };\n let firstVisible;\n let lastVisible;\n this.filterGroupComps.forEach((filterGroup, idx) => {\n recursivelySearch(filterGroup, false);\n if (firstVisible === void 0) {\n if (!filterGroup.containsCssClass(\"ag-hidden\")) {\n firstVisible = idx;\n lastVisible = idx;\n }\n } else if (!filterGroup.containsCssClass(\"ag-hidden\") && lastVisible !== idx) {\n lastVisible = idx;\n }\n });\n this.setFirstAndLastVisible(firstVisible, lastVisible);\n this.refreshAriaLabel();\n }\n setFirstAndLastVisible(firstIdx, lastIdx) {\n this.filterGroupComps.forEach((filterGroup, idx) => {\n filterGroup.removeCssClass(\"ag-first-group-visible\");\n filterGroup.removeCssClass(\"ag-last-group-visible\");\n if (idx === firstIdx) {\n filterGroup.addCssClass(\"ag-first-group-visible\");\n }\n if (idx === lastIdx) {\n filterGroup.addCssClass(\"ag-last-group-visible\");\n }\n });\n }\n refreshFilters(isDisplayed) {\n this.filterGroupComps.forEach((filterGroupComp) => filterGroupComp.refreshFilters(isDisplayed));\n }\n getExpandedFiltersAndGroups() {\n const expandedGroupIds = [];\n const expandedColIds = /* @__PURE__ */ new Set();\n const getExpandedFiltersAndGroups = (filterComp) => {\n if (filterComp instanceof ToolPanelFilterGroupComp) {\n filterComp.getChildren().forEach((child) => getExpandedFiltersAndGroups(child));\n const groupId = filterComp.getFilterGroupId();\n if (filterComp.isExpanded() && !expandedColIds.has(groupId)) {\n expandedGroupIds.push(groupId);\n }\n } else {\n if (filterComp.isExpanded()) {\n expandedColIds.add(filterComp.getColumn().getColId());\n }\n }\n };\n this.filterGroupComps.forEach(getExpandedFiltersAndGroups);\n return { expandedGroupIds, expandedColIds: Array.from(expandedColIds) };\n }\n destroyFilters() {\n this.filterGroupComps = this.destroyBeans(this.filterGroupComps);\n _47.clearElement(this.getGui());\n }\n destroy() {\n this.destroyFilters();\n super.destroy();\n }\n};\n_FiltersToolPanelListPanel.TEMPLATE = /* html */\n`
`;\n__decorateClass10([\n Autowired413(\"toolPanelColDefService\")\n], _FiltersToolPanelListPanel.prototype, \"toolPanelColDefService\", 2);\n__decorateClass10([\n Autowired413(\"columnModel\")\n], _FiltersToolPanelListPanel.prototype, \"columnModel\", 2);\nvar FiltersToolPanelListPanel = _FiltersToolPanelListPanel;\nvar _FiltersToolPanel = class _FiltersToolPanel2 extends Component55 {\n constructor() {\n super(_FiltersToolPanel2.TEMPLATE);\n this.initialised = false;\n this.listenerDestroyFuncs = [];\n }\n init(params) {\n if (this.initialised) {\n this.listenerDestroyFuncs.forEach((func) => func());\n this.listenerDestroyFuncs = [];\n }\n this.initialised = true;\n const defaultParams = this.gos.addGridCommonParams({\n suppressExpandAll: false,\n suppressFilterSearch: false,\n suppressSyncLayoutWithGrid: false\n });\n this.params = __spreadValues8(__spreadValues8({}, defaultParams), params);\n this.filtersToolPanelHeaderPanel.init(this.params);\n this.filtersToolPanelListPanel.init(this.params);\n const hideExpand = this.params.suppressExpandAll;\n const hideSearch = this.params.suppressFilterSearch;\n if (hideExpand && hideSearch) {\n this.filtersToolPanelHeaderPanel.setDisplayed(false);\n }\n this.listenerDestroyFuncs.push(\n this.addManagedListener(this.filtersToolPanelHeaderPanel, \"expandAll\", this.onExpandAll.bind(this)),\n this.addManagedListener(this.filtersToolPanelHeaderPanel, \"collapseAll\", this.onCollapseAll.bind(this)),\n this.addManagedListener(this.filtersToolPanelHeaderPanel, \"searchChanged\", this.onSearchChanged.bind(this)),\n this.addManagedListener(this.filtersToolPanelListPanel, \"filterExpanded\", this.onFilterExpanded.bind(this)),\n this.addManagedListener(this.filtersToolPanelListPanel, \"groupExpanded\", this.onGroupExpanded.bind(this))\n );\n }\n // lazy initialise the panel\n setVisible(visible) {\n super.setDisplayed(visible);\n if (visible && !this.initialised) {\n this.init(this.params);\n }\n }\n onExpandAll() {\n this.filtersToolPanelListPanel.expandFilterGroups(true);\n }\n onCollapseAll() {\n this.filtersToolPanelListPanel.expandFilterGroups(false);\n }\n onSearchChanged(event) {\n this.filtersToolPanelListPanel.performFilterSearch(event.searchText);\n }\n setFilterLayout(colDefs) {\n this.filtersToolPanelListPanel.setFiltersLayout(colDefs);\n }\n onFilterExpanded() {\n this.params.onStateUpdated();\n }\n onGroupExpanded(event) {\n this.filtersToolPanelHeaderPanel.setExpandState(event.state);\n this.params.onStateUpdated();\n }\n expandFilterGroups(groupIds) {\n this.filtersToolPanelListPanel.expandFilterGroups(true, groupIds);\n }\n collapseFilterGroups(groupIds) {\n this.filtersToolPanelListPanel.expandFilterGroups(false, groupIds);\n }\n expandFilters(colIds) {\n this.filtersToolPanelListPanel.expandFilters(true, colIds);\n }\n collapseFilters(colIds) {\n this.filtersToolPanelListPanel.expandFilters(false, colIds);\n }\n syncLayoutWithGrid() {\n this.filtersToolPanelListPanel.syncFilterLayout();\n }\n refresh(params) {\n this.init(params);\n return true;\n }\n getState() {\n return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups();\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n};\n_FiltersToolPanel.TEMPLATE = /* html */\n`
\n \n \n
`;\n__decorateClass10([\n RefSelector44(\"filtersToolPanelHeaderPanel\")\n], _FiltersToolPanel.prototype, \"filtersToolPanelHeaderPanel\", 2);\n__decorateClass10([\n RefSelector44(\"filtersToolPanelListPanel\")\n], _FiltersToolPanel.prototype, \"filtersToolPanelListPanel\", 2);\nvar FiltersToolPanel = _FiltersToolPanel;\nvar VERSION10 = \"31.3.2\";\nvar FiltersToolPanelModule = {\n version: VERSION10,\n moduleName: ModuleNames10.FiltersToolPanelModule,\n beans: [],\n agStackComponents: [\n { componentName: \"AgFiltersToolPanelHeader\", componentClass: FiltersToolPanelHeaderPanel },\n { componentName: \"AgFiltersToolPanelList\", componentClass: FiltersToolPanelListPanel }\n ],\n userComponents: [\n { componentName: \"agFiltersToolPanel\", componentClass: FiltersToolPanel }\n ],\n dependantModules: [\n SideBarModule,\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/master-detail/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames11 } from \"ag-grid-community\";\nimport { Component as Component50, RefSelector as RefSelector19, _ as _214, ModuleRegistry as ModuleRegistry4, createGrid, ColumnApi as ColumnApi2 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired59,\n BeanStub as BeanStub19,\n Events as Events16,\n _ as _48\n} from \"ag-grid-community\";\nvar __defProp11 = Object.defineProperty;\nvar __getOwnPropDesc11 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropSymbols9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp10 = Object.prototype.hasOwnProperty;\nvar __propIsEnum9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp9 = (obj, key, value) => key in obj ? __defProp11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp10.call(b, prop))\n __defNormalProp9(a, prop, b[prop]);\n if (__getOwnPropSymbols9)\n for (var prop of __getOwnPropSymbols9(b)) {\n if (__propIsEnum9.call(b, prop))\n __defNormalProp9(a, prop, b[prop]);\n }\n return a;\n};\nvar __decorateClass11 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc11(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp11(target, key, result);\n return result;\n};\nvar DetailCellRendererCtrl = class extends BeanStub19 {\n constructor() {\n super(...arguments);\n this.loadRowDataVersion = 0;\n }\n init(comp, params) {\n this.params = params;\n this.comp = comp;\n const doNothingBecauseInsidePinnedSection = params.pinned != null;\n if (doNothingBecauseInsidePinnedSection) {\n return;\n }\n this.setAutoHeightClasses();\n this.setupRefreshStrategy();\n this.addThemeToDetailGrid();\n this.createDetailGrid();\n this.loadRowData();\n this.addManagedListener(this.eventService, Events16.EVENT_FULL_WIDTH_ROW_FOCUSED, this.onFullWidthRowFocused.bind(this));\n }\n onFullWidthRowFocused(e) {\n const params = this.params;\n const row = { rowIndex: params.node.rowIndex, rowPinned: params.node.rowPinned };\n const eventRow = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };\n const isSameRow = this.rowPositionUtils.sameRow(row, eventRow);\n if (!isSameRow) {\n return;\n }\n this.focusService.focusInto(this.comp.getGui(), e.fromBelow);\n }\n setAutoHeightClasses() {\n const autoHeight = this.gos.get(\"detailRowAutoHeight\");\n const parentClass = autoHeight ? \"ag-details-row-auto-height\" : \"ag-details-row-fixed-height\";\n const detailClass = autoHeight ? \"ag-details-grid-auto-height\" : \"ag-details-grid-fixed-height\";\n this.comp.addOrRemoveCssClass(parentClass, true);\n this.comp.addOrRemoveDetailGridCssClass(detailClass, true);\n }\n setupRefreshStrategy() {\n const providedStrategy = this.params.refreshStrategy;\n const validSelection = providedStrategy == \"everything\" || providedStrategy == \"nothing\" || providedStrategy == \"rows\";\n if (validSelection) {\n this.refreshStrategy = providedStrategy;\n return;\n }\n if (providedStrategy != null) {\n console.warn(\"AG Grid: invalid cellRendererParams.refreshStrategy = '\" + providedStrategy + \"' supplied, defaulting to refreshStrategy = 'rows'.\");\n }\n this.refreshStrategy = \"rows\";\n }\n addThemeToDetailGrid() {\n const { theme } = this.environment.getTheme();\n if (theme) {\n this.comp.addOrRemoveDetailGridCssClass(theme, true);\n }\n }\n createDetailGrid() {\n if (_48.missing(this.params.detailGridOptions)) {\n console.warn(\"AG Grid: could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions\");\n return;\n }\n const autoHeight = this.gos.get(\"detailRowAutoHeight\");\n const gridOptions = __spreadValues9({}, this.params.detailGridOptions);\n if (autoHeight) {\n gridOptions.domLayout = \"autoHeight\";\n }\n this.comp.setDetailGrid(gridOptions);\n }\n registerDetailWithMaster(api, columnApi) {\n const rowId = this.params.node.id;\n const masterGridApi = this.params.api;\n const gridInfo = {\n id: rowId,\n api,\n columnApi\n };\n const rowNode = this.params.node;\n if (masterGridApi.isDestroyed()) {\n return;\n }\n masterGridApi.addDetailGridInfo(rowId, gridInfo);\n rowNode.detailGridInfo = gridInfo;\n this.addDestroyFunc(() => {\n if (rowNode.detailGridInfo !== gridInfo) {\n return;\n }\n if (!masterGridApi.isDestroyed()) {\n masterGridApi.removeDetailGridInfo(rowId);\n }\n rowNode.detailGridInfo = null;\n });\n }\n loadRowData() {\n var _a, _b, _c;\n this.loadRowDataVersion++;\n const versionThisCall = this.loadRowDataVersion;\n if (((_a = this.params.detailGridOptions) == null ? void 0 : _a.rowModelType) === \"serverSide\") {\n const node = this.params.node;\n (_c = (_b = node.detailGridInfo) == null ? void 0 : _b.api) == null ? void 0 : _c.refreshServerSide({ purge: true });\n return;\n }\n const userFunc = this.params.getDetailRowData;\n if (!userFunc) {\n console.warn(\"AG Grid: could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData\");\n return;\n }\n const successCallback = (rowData) => {\n const mostRecentCall = this.loadRowDataVersion === versionThisCall;\n if (mostRecentCall) {\n this.comp.setRowData(rowData);\n }\n };\n const funcParams = {\n node: this.params.node,\n // we take data from node, rather than params.data\n // as the data could have been updated with new instance\n data: this.params.node.data,\n successCallback,\n context: this.gos.getGridCommonParams().context\n };\n userFunc(funcParams);\n }\n refresh() {\n const GET_GRID_TO_REFRESH = false;\n const GET_GRID_TO_DO_NOTHING = true;\n switch (this.refreshStrategy) {\n case \"nothing\":\n return GET_GRID_TO_DO_NOTHING;\n case \"everything\":\n return GET_GRID_TO_REFRESH;\n }\n this.loadRowData();\n return GET_GRID_TO_DO_NOTHING;\n }\n};\n__decorateClass11([\n Autowired59(\"rowPositionUtils\")\n], DetailCellRendererCtrl.prototype, \"rowPositionUtils\", 2);\n__decorateClass11([\n Autowired59(\"focusService\")\n], DetailCellRendererCtrl.prototype, \"focusService\", 2);\nvar _DetailCellRenderer = class _DetailCellRenderer2 extends Component50 {\n init(params) {\n this.params = params;\n this.selectAndSetTemplate();\n const compProxy = {\n addOrRemoveCssClass: (cssClassName, on) => this.addOrRemoveCssClass(cssClassName, on),\n addOrRemoveDetailGridCssClass: (cssClassName, on) => this.eDetailGrid.classList.toggle(cssClassName, on),\n setDetailGrid: (gridOptions) => this.setDetailGrid(gridOptions),\n setRowData: (rowData) => this.setRowData(rowData),\n getGui: () => this.eDetailGrid\n };\n this.ctrl = this.createManagedBean(new DetailCellRendererCtrl());\n this.ctrl.init(compProxy, params);\n }\n refresh() {\n return this.ctrl && this.ctrl.refresh();\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n selectAndSetTemplate() {\n if (this.params.pinned) {\n this.setTemplate('
');\n return;\n }\n const setDefaultTemplate = () => {\n this.setTemplate(_DetailCellRenderer2.TEMPLATE);\n };\n if (_214.missing(this.params.template)) {\n setDefaultTemplate();\n } else {\n if (typeof this.params.template === \"string\") {\n this.setTemplate(this.params.template);\n } else if (typeof this.params.template === \"function\") {\n const templateFunc = this.params.template;\n const template = templateFunc(this.params);\n this.setTemplate(template);\n } else {\n console.warn(\"AG Grid: detailCellRendererParams.template should be function or string\");\n setDefaultTemplate();\n }\n }\n if (this.eDetailGrid == null) {\n console.warn('AG Grid: reference to eDetailGrid was missing from the details template. Please add ref=\"eDetailGrid\" to the template.');\n }\n }\n setDetailGrid(gridOptions) {\n if (!this.eDetailGrid) {\n return;\n }\n const agGridReact = this.context.getBean(\"agGridReact\");\n const agGridReactCloned = agGridReact ? _214.cloneObject(agGridReact) : void 0;\n const frameworkComponentWrapper = this.context.getBean(\"frameworkComponentWrapper\");\n const frameworkOverrides = this.getFrameworkOverrides();\n const api = createGrid(this.eDetailGrid, gridOptions, {\n frameworkOverrides,\n providedBeanInstances: {\n agGridReact: agGridReactCloned,\n frameworkComponentWrapper\n },\n modules: ModuleRegistry4.__getGridRegisteredModules(this.params.api.getGridId())\n });\n this.detailApi = api;\n this.ctrl.registerDetailWithMaster(api, new ColumnApi2(api));\n this.addDestroyFunc(() => {\n api == null ? void 0 : api.destroy();\n });\n }\n setRowData(rowData) {\n this.detailApi && this.detailApi.setGridOption(\"rowData\", rowData);\n }\n};\n_DetailCellRenderer.TEMPLATE = /* html */\n`
\n
\n
`;\n__decorateClass11([\n RefSelector19(\"eDetailGrid\")\n], _DetailCellRenderer.prototype, \"eDetailGrid\", 2);\nvar DetailCellRenderer = _DetailCellRenderer;\nvar VERSION11 = \"31.3.2\";\nvar MasterDetailModule = {\n version: VERSION11,\n moduleName: ModuleNames11.MasterDetailModule,\n beans: [],\n userComponents: [\n { componentName: \"agDetailCellRenderer\", componentClass: DetailCellRenderer }\n ],\n controllers: [\n { controllerName: \"detailCellRenderer\", controllerClass: DetailCellRendererCtrl }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/menu/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames52 } from \"ag-grid-community\";\nimport {\n _ as _49,\n Autowired as Autowired60,\n Bean as Bean13,\n BeanStub as BeanStub20,\n ModuleNames as ModuleNames12,\n ModuleRegistry as ModuleRegistry5,\n PostConstruct as PostConstruct60,\n RefSelector as RefSelector20,\n AgPromise as AgPromise4,\n TabbedLayout as TabbedLayout2,\n AgMenuItemComponent as AgMenuItemComponent3,\n Component as Component51,\n Events as Events17,\n FilterWrapperComp as FilterWrapperComp3\n} from \"ag-grid-community\";\nimport {\n _ as _215,\n AgMenuItemComponent as AgMenuItemComponent22,\n AgMenuList as AgMenuList22,\n Autowired as Autowired214,\n Bean as Bean27,\n BeanStub as BeanStub27,\n Component as Component213,\n ModuleNames as ModuleNames25,\n ModuleRegistry as ModuleRegistry22,\n Optional as Optional5,\n PostConstruct as PostConstruct214,\n Events as Events28\n} from \"ag-grid-community\";\nimport {\n _ as _313,\n Autowired as Autowired314,\n Bean as Bean34,\n BeanStub as BeanStub34,\n ModuleNames as ModuleNames32,\n ModuleRegistry as ModuleRegistry32,\n Optional as Optional22\n} from \"ag-grid-community\";\nimport { Bean as Bean44, BeanStub as BeanStub44, ModuleNames as ModuleNames42, ModuleRegistry as ModuleRegistry42, Optional as Optional32, _ as _410 } from \"ag-grid-community\";\nimport {\n AgDialog as AgDialog4,\n Autowired as Autowired414,\n Bean as Bean53,\n BeanStub as BeanStub54,\n Events as Events36\n} from \"ag-grid-community\";\nimport {\n AgMenuList as AgMenuList3,\n Autowired as Autowired510,\n Bean as Bean63,\n BeanStub as BeanStub64,\n _ as _56\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired65,\n Bean as Bean72,\n BeanStub as BeanStub73,\n _ as _66\n} from \"ag-grid-community\";\nvar __defProp12 = Object.defineProperty;\nvar __defProps7 = Object.defineProperties;\nvar __getOwnPropDesc12 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols10 = Object.getOwnPropertySymbols;\nvar __hasOwnProp11 = Object.prototype.hasOwnProperty;\nvar __propIsEnum10 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp10 = (obj, key, value) => key in obj ? __defProp12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues10 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp11.call(b, prop))\n __defNormalProp10(a, prop, b[prop]);\n if (__getOwnPropSymbols10)\n for (var prop of __getOwnPropSymbols10(b)) {\n if (__propIsEnum10.call(b, prop))\n __defNormalProp10(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps7 = (a, b) => __defProps7(a, __getOwnPropDescs7(b));\nvar __decorateClass12 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc12(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp12(target, key, result);\n return result;\n};\nvar EnterpriseMenuFactory = class extends BeanStub20 {\n hideActiveMenu() {\n this.destroyBean(this.activeMenu);\n }\n showMenuAfterMouseEvent(column, mouseEvent, containerType, filtersOnly) {\n const defaultTab = filtersOnly ? \"filterMenuTab\" : void 0;\n this.showMenu(column, (menu) => {\n var _a;\n const ePopup = menu.getGui();\n this.popupService.positionPopupUnderMouseEvent({\n type: containerType,\n column,\n mouseEvent,\n ePopup\n });\n if (defaultTab) {\n (_a = menu.showTab) == null ? void 0 : _a.call(menu, defaultTab);\n }\n this.dispatchVisibleChangedEvent(true, false, column, defaultTab);\n }, containerType, defaultTab, void 0, mouseEvent.target);\n }\n showMenuAfterButtonClick(column, eventSource, containerType, filtersOnly) {\n let multiplier = -1;\n let alignSide = \"left\";\n if (this.gos.get(\"enableRtl\")) {\n multiplier = 1;\n alignSide = \"right\";\n }\n const defaultTab = filtersOnly ? \"filterMenuTab\" : void 0;\n const restrictToTabs = defaultTab ? [defaultTab] : void 0;\n const isLegacyMenuEnabled = this.menuService.isLegacyMenuEnabled();\n let nudgeX = (isLegacyMenuEnabled ? 9 : 4) * multiplier;\n let nudgeY = isLegacyMenuEnabled ? -23 : 4;\n this.showMenu(column, (menu) => {\n var _a;\n const ePopup = menu.getGui();\n this.popupService.positionPopupByComponent({\n type: containerType,\n column,\n eventSource,\n ePopup,\n alignSide,\n nudgeX,\n nudgeY,\n position: \"under\",\n keepWithinBounds: true\n });\n if (defaultTab) {\n (_a = menu.showTab) == null ? void 0 : _a.call(menu, defaultTab);\n }\n this.dispatchVisibleChangedEvent(true, false, column, defaultTab);\n }, containerType, defaultTab, restrictToTabs, eventSource);\n }\n showMenu(column, positionCallback, containerType, defaultTab, restrictToTabs, eventSource) {\n var _a;\n const { menu, eMenuGui, anchorToElement, restoreFocusParams } = this.getMenuParams(column, restrictToTabs, eventSource);\n const closedFuncs = [];\n closedFuncs.push(\n (e) => {\n const eComp = menu.getGui();\n this.destroyBean(menu);\n if (column) {\n column.setMenuVisible(false, \"contextMenu\");\n this.menuUtils.restoreFocusOnClose(restoreFocusParams, eComp, e);\n }\n }\n );\n const translate = this.localeService.getLocaleTextFunc();\n this.popupService.addPopup({\n modal: true,\n eChild: eMenuGui,\n closeOnEsc: true,\n closedCallback: (e) => {\n closedFuncs.forEach((f) => f(e));\n this.dispatchVisibleChangedEvent(false, false, column, defaultTab);\n },\n afterGuiAttached: (params) => menu.afterGuiAttached(Object.assign({}, { container: containerType }, params)),\n // if defaultTab is not present, positionCallback will be called\n // after `showTabBasedOnPreviousSelection` is called.\n positionCallback: !!defaultTab ? () => positionCallback(menu) : void 0,\n ariaLabel: translate(\"ariaLabelColumnMenu\", \"Column Menu\")\n });\n if (!defaultTab) {\n (_a = menu.showTabBasedOnPreviousSelection) == null ? void 0 : _a.call(menu);\n positionCallback(menu);\n }\n if (this.menuService.isColumnMenuAnchoringEnabled()) {\n const stopAnchoringPromise = this.popupService.setPopupPositionRelatedToElement(eMenuGui, anchorToElement);\n if (stopAnchoringPromise && column) {\n this.addStopAnchoring(stopAnchoringPromise, column, closedFuncs);\n }\n }\n menu.addEventListener(TabbedColumnMenu.EVENT_TAB_SELECTED, (event) => {\n this.dispatchVisibleChangedEvent(false, true, column);\n this.lastSelectedTab = event.key;\n this.dispatchVisibleChangedEvent(true, true, column);\n });\n column == null ? void 0 : column.setMenuVisible(true, \"contextMenu\");\n this.activeMenu = menu;\n menu.addEventListener(BeanStub20.EVENT_DESTROYED, () => {\n if (this.activeMenu === menu) {\n this.activeMenu = null;\n }\n });\n }\n addStopAnchoring(stopAnchoringPromise, column, closedFuncsArr) {\n stopAnchoringPromise.then((stopAnchoringFunc) => {\n column.addEventListener(\"leftChanged\", stopAnchoringFunc);\n column.addEventListener(\"visibleChanged\", stopAnchoringFunc);\n closedFuncsArr.push(() => {\n column.removeEventListener(\"leftChanged\", stopAnchoringFunc);\n column.removeEventListener(\"visibleChanged\", stopAnchoringFunc);\n });\n });\n }\n getMenuParams(column, restrictToTabs, eventSource) {\n const restoreFocusParams = {\n column,\n headerPosition: this.focusService.getFocusedHeader(),\n columnIndex: this.columnModel.getAllDisplayedColumns().indexOf(column),\n eventSource\n };\n const menu = this.createMenu(column, restoreFocusParams, restrictToTabs, eventSource);\n return {\n menu,\n eMenuGui: menu.getGui(),\n anchorToElement: eventSource || this.ctrlsService.getGridBodyCtrl().getGui(),\n restoreFocusParams\n };\n }\n createMenu(column, restoreFocusParams, restrictToTabs, eventSource) {\n if (this.menuService.isLegacyMenuEnabled()) {\n return this.createBean(new TabbedColumnMenu(column, restoreFocusParams, this.lastSelectedTab, restrictToTabs, eventSource));\n } else {\n return this.createBean(new ColumnContextMenu(column, restoreFocusParams, eventSource));\n }\n }\n dispatchVisibleChangedEvent(visible, switchingTab, column, defaultTab) {\n var _a, _b;\n const event = {\n type: Events17.EVENT_COLUMN_MENU_VISIBLE_CHANGED,\n visible,\n switchingTab,\n key: (_b = (_a = this.lastSelectedTab) != null ? _a : defaultTab) != null ? _b : this.menuService.isLegacyMenuEnabled() ? TabbedColumnMenu.TAB_GENERAL : \"columnMenu\",\n column: column != null ? column : null\n };\n this.eventService.dispatchEvent(event);\n }\n isMenuEnabled(column) {\n var _a;\n if (!this.menuService.isLegacyMenuEnabled()) {\n return true;\n }\n const isFilterDisabled = !this.filterManager.isFilterAllowed(column);\n const tabs = (_a = column.getColDef().menuTabs) != null ? _a : TabbedColumnMenu.TABS_DEFAULT;\n const numActiveTabs = isFilterDisabled && tabs.includes(TabbedColumnMenu.TAB_FILTER) ? tabs.length - 1 : tabs.length;\n return numActiveTabs > 0;\n }\n showMenuAfterContextMenuEvent(column, mouseEvent, touchEvent) {\n this.menuUtils.onContextMenu(mouseEvent, touchEvent, (eventOrTouch) => {\n this.showMenuAfterMouseEvent(column, eventOrTouch, \"columnMenu\");\n return true;\n });\n }\n};\n__decorateClass12([\n Autowired60(\"popupService\")\n], EnterpriseMenuFactory.prototype, \"popupService\", 2);\n__decorateClass12([\n Autowired60(\"focusService\")\n], EnterpriseMenuFactory.prototype, \"focusService\", 2);\n__decorateClass12([\n Autowired60(\"ctrlsService\")\n], EnterpriseMenuFactory.prototype, \"ctrlsService\", 2);\n__decorateClass12([\n Autowired60(\"columnModel\")\n], EnterpriseMenuFactory.prototype, \"columnModel\", 2);\n__decorateClass12([\n Autowired60(\"filterManager\")\n], EnterpriseMenuFactory.prototype, \"filterManager\", 2);\n__decorateClass12([\n Autowired60(\"menuUtils\")\n], EnterpriseMenuFactory.prototype, \"menuUtils\", 2);\n__decorateClass12([\n Autowired60(\"menuService\")\n], EnterpriseMenuFactory.prototype, \"menuService\", 2);\nEnterpriseMenuFactory = __decorateClass12([\n Bean13(\"enterpriseMenuFactory\")\n], EnterpriseMenuFactory);\nvar _TabbedColumnMenu = class _TabbedColumnMenu2 extends BeanStub20 {\n constructor(column, restoreFocusParams, initialSelection, restrictTo, sourceElement) {\n super();\n this.column = column;\n this.restoreFocusParams = restoreFocusParams;\n this.initialSelection = initialSelection;\n this.restrictTo = restrictTo;\n this.sourceElement = sourceElement;\n this.tabFactories = {};\n this.includeChecks = {};\n this.tabFactories[_TabbedColumnMenu2.TAB_GENERAL] = this.createMainPanel.bind(this);\n this.tabFactories[_TabbedColumnMenu2.TAB_FILTER] = this.createFilterPanel.bind(this);\n this.tabFactories[_TabbedColumnMenu2.TAB_COLUMNS] = this.createColumnsPanel.bind(this);\n this.includeChecks[_TabbedColumnMenu2.TAB_GENERAL] = () => true;\n this.includeChecks[_TabbedColumnMenu2.TAB_FILTER] = () => column ? this.filterManager.isFilterAllowed(column) : false;\n this.includeChecks[_TabbedColumnMenu2.TAB_COLUMNS] = () => true;\n }\n init() {\n const tabs = this.getTabsToCreate().map((name) => this.createTab(name));\n this.tabbedLayout = new TabbedLayout2({\n items: tabs,\n cssClass: \"ag-menu\",\n onActiveItemClicked: this.onHidePopup.bind(this),\n onItemClicked: this.onTabItemClicked.bind(this)\n });\n this.createBean(this.tabbedLayout);\n if (this.mainMenuList) {\n this.mainMenuList.setParentComponent(this.tabbedLayout);\n }\n this.addDestroyFunc(() => this.destroyBean(this.tabbedLayout));\n }\n getTabsToCreate() {\n var _a, _b;\n if (this.restrictTo) {\n return this.restrictTo;\n }\n return ((_b = (_a = this.column) == null ? void 0 : _a.getColDef().menuTabs) != null ? _b : _TabbedColumnMenu2.TABS_DEFAULT).filter((tabName) => this.isValidMenuTabItem(tabName)).filter((tabName) => this.isNotSuppressed(tabName)).filter((tabName) => this.isModuleLoaded(tabName));\n }\n isModuleLoaded(menuTabName) {\n if (menuTabName === _TabbedColumnMenu2.TAB_COLUMNS) {\n return ModuleRegistry5.__isRegistered(ModuleNames12.ColumnsToolPanelModule, this.context.getGridId());\n }\n return true;\n }\n isValidMenuTabItem(menuTabName) {\n let isValid = true;\n let itemsToConsider = _TabbedColumnMenu2.TABS_DEFAULT;\n if (this.restrictTo != null) {\n isValid = this.restrictTo.indexOf(menuTabName) > -1;\n itemsToConsider = this.restrictTo;\n }\n isValid = isValid && _TabbedColumnMenu2.TABS_DEFAULT.indexOf(menuTabName) > -1;\n if (!isValid) {\n console.warn(`AG Grid: Trying to render an invalid menu item '${menuTabName}'. Check that your 'menuTabs' contains one of [${itemsToConsider}]`);\n }\n return isValid;\n }\n isNotSuppressed(menuTabName) {\n return this.includeChecks[menuTabName]();\n }\n createTab(name) {\n return this.tabFactories[name]();\n }\n showTabBasedOnPreviousSelection() {\n this.showTab(this.initialSelection);\n }\n showTab(toShow) {\n if (this.tabItemColumns && toShow === _TabbedColumnMenu2.TAB_COLUMNS) {\n this.tabbedLayout.showItem(this.tabItemColumns);\n } else if (this.tabItemFilter && toShow === _TabbedColumnMenu2.TAB_FILTER) {\n this.tabbedLayout.showItem(this.tabItemFilter);\n } else if (this.tabItemGeneral && toShow === _TabbedColumnMenu2.TAB_GENERAL) {\n this.tabbedLayout.showItem(this.tabItemGeneral);\n } else {\n this.tabbedLayout.showFirstItem();\n }\n }\n onTabItemClicked(event) {\n let key = null;\n switch (event.item) {\n case this.tabItemColumns:\n key = _TabbedColumnMenu2.TAB_COLUMNS;\n break;\n case this.tabItemFilter:\n key = _TabbedColumnMenu2.TAB_FILTER;\n break;\n case this.tabItemGeneral:\n key = _TabbedColumnMenu2.TAB_GENERAL;\n break;\n }\n if (key) {\n this.activateTab(key);\n }\n }\n activateTab(tab) {\n const ev = {\n type: _TabbedColumnMenu2.EVENT_TAB_SELECTED,\n key: tab\n };\n this.dispatchEvent(ev);\n }\n createMainPanel() {\n this.mainMenuList = this.columnMenuFactory.createMenu(this, this.column, () => {\n var _a;\n return (_a = this.sourceElement) != null ? _a : this.getGui();\n });\n this.mainMenuList.addEventListener(AgMenuItemComponent3.EVENT_CLOSE_MENU, this.onHidePopup.bind(this));\n this.tabItemGeneral = {\n title: _49.createIconNoSpan(\"menu\", this.gos, this.column),\n titleLabel: _TabbedColumnMenu2.TAB_GENERAL.replace(\"MenuTab\", \"\"),\n bodyPromise: AgPromise4.resolve(this.mainMenuList.getGui()),\n name: _TabbedColumnMenu2.TAB_GENERAL\n };\n return this.tabItemGeneral;\n }\n onHidePopup(event) {\n this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc, this.restoreFocusParams, event);\n }\n createFilterPanel() {\n const comp = this.column ? this.createManagedBean(new FilterWrapperComp3(this.column, \"COLUMN_MENU\")) : null;\n if (!(comp == null ? void 0 : comp.hasFilter())) {\n throw new Error(\"AG Grid - Unable to instantiate filter\");\n }\n const afterAttachedCallback = (params) => comp.afterGuiAttached(params);\n const afterDetachedCallback = () => comp.afterGuiDetached();\n this.tabItemFilter = {\n title: _49.createIconNoSpan(\"filter\", this.gos, this.column),\n titleLabel: _TabbedColumnMenu2.TAB_FILTER.replace(\"MenuTab\", \"\"),\n bodyPromise: AgPromise4.resolve(comp == null ? void 0 : comp.getGui()),\n afterAttachedCallback,\n afterDetachedCallback,\n name: _TabbedColumnMenu2.TAB_FILTER\n };\n return this.tabItemFilter;\n }\n createColumnsPanel() {\n const eWrapperDiv = document.createElement(\"div\");\n eWrapperDiv.classList.add(\"ag-menu-column-select-wrapper\");\n const columnSelectPanel = this.columnChooserFactory.createColumnSelectPanel(this, this.column);\n const columnSelectPanelGui = columnSelectPanel.getGui();\n columnSelectPanelGui.classList.add(\"ag-menu-column-select\");\n eWrapperDiv.appendChild(columnSelectPanelGui);\n this.tabItemColumns = {\n title: _49.createIconNoSpan(\"columns\", this.gos, this.column),\n //createColumnsIcon(),\n titleLabel: _TabbedColumnMenu2.TAB_COLUMNS.replace(\"MenuTab\", \"\"),\n bodyPromise: AgPromise4.resolve(eWrapperDiv),\n name: _TabbedColumnMenu2.TAB_COLUMNS\n };\n return this.tabItemColumns;\n }\n afterGuiAttached(params) {\n const { container, hidePopup } = params;\n this.tabbedLayout.setAfterAttachedParams({ container, hidePopup });\n if (hidePopup) {\n this.hidePopupFunc = hidePopup;\n this.addDestroyFunc(hidePopup);\n }\n }\n getGui() {\n return this.tabbedLayout.getGui();\n }\n};\n_TabbedColumnMenu.EVENT_TAB_SELECTED = \"tabSelected\";\n_TabbedColumnMenu.TAB_FILTER = \"filterMenuTab\";\n_TabbedColumnMenu.TAB_GENERAL = \"generalMenuTab\";\n_TabbedColumnMenu.TAB_COLUMNS = \"columnsMenuTab\";\n_TabbedColumnMenu.TABS_DEFAULT = [_TabbedColumnMenu.TAB_GENERAL, _TabbedColumnMenu.TAB_FILTER, _TabbedColumnMenu.TAB_COLUMNS];\n__decorateClass12([\n Autowired60(\"filterManager\")\n], _TabbedColumnMenu.prototype, \"filterManager\", 2);\n__decorateClass12([\n Autowired60(\"columnChooserFactory\")\n], _TabbedColumnMenu.prototype, \"columnChooserFactory\", 2);\n__decorateClass12([\n Autowired60(\"columnMenuFactory\")\n], _TabbedColumnMenu.prototype, \"columnMenuFactory\", 2);\n__decorateClass12([\n Autowired60(\"menuUtils\")\n], _TabbedColumnMenu.prototype, \"menuUtils\", 2);\n__decorateClass12([\n PostConstruct60\n], _TabbedColumnMenu.prototype, \"init\", 1);\nvar TabbedColumnMenu = _TabbedColumnMenu;\nvar ColumnContextMenu = class extends Component51 {\n constructor(column, restoreFocusParams, sourceElement) {\n super(\n /* html */\n `\n
\n `\n );\n this.column = column;\n this.restoreFocusParams = restoreFocusParams;\n this.sourceElement = sourceElement;\n }\n init() {\n this.mainMenuList = this.columnMenuFactory.createMenu(this, this.column, () => {\n var _a;\n return (_a = this.sourceElement) != null ? _a : this.getGui();\n });\n this.mainMenuList.addEventListener(AgMenuItemComponent3.EVENT_CLOSE_MENU, this.onHidePopup.bind(this));\n this.eColumnMenu.appendChild(this.mainMenuList.getGui());\n }\n onHidePopup(event) {\n this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc, this.restoreFocusParams, event);\n }\n afterGuiAttached({ hidePopup }) {\n if (hidePopup) {\n this.hidePopupFunc = hidePopup;\n this.addDestroyFunc(hidePopup);\n }\n this.focusService.focusInto(this.mainMenuList.getGui());\n }\n};\n__decorateClass12([\n Autowired60(\"columnMenuFactory\")\n], ColumnContextMenu.prototype, \"columnMenuFactory\", 2);\n__decorateClass12([\n Autowired60(\"menuUtils\")\n], ColumnContextMenu.prototype, \"menuUtils\", 2);\n__decorateClass12([\n Autowired60(\"focusService\")\n], ColumnContextMenu.prototype, \"focusService\", 2);\n__decorateClass12([\n RefSelector20(\"eColumnMenu\")\n], ColumnContextMenu.prototype, \"eColumnMenu\", 2);\n__decorateClass12([\n PostConstruct60\n], ColumnContextMenu.prototype, \"init\", 1);\nvar CSS_MENU = \"ag-menu\";\nvar CSS_CONTEXT_MENU_OPEN = \"ag-context-menu-open\";\nvar ContextMenuFactory = class extends BeanStub27 {\n hideActiveMenu() {\n this.destroyBean(this.activeMenu);\n }\n getMenuItems(node, column, value) {\n const defaultMenuOptions = [];\n if (_215.exists(node) && ModuleRegistry22.__isRegistered(ModuleNames25.ClipboardModule, this.context.getGridId())) {\n if (column) {\n if (!this.gos.get(\"suppressCutToClipboard\")) {\n defaultMenuOptions.push(\"cut\");\n }\n defaultMenuOptions.push(\"copy\", \"copyWithHeaders\", \"copyWithGroupHeaders\", \"paste\", \"separator\");\n }\n }\n if (this.gos.get(\"enableCharts\") && ModuleRegistry22.__isRegistered(ModuleNames25.GridChartsModule, this.context.getGridId())) {\n if (this.columnModel.isPivotMode()) {\n defaultMenuOptions.push(\"pivotChart\");\n }\n if (this.rangeService && !this.rangeService.isEmpty()) {\n defaultMenuOptions.push(\"chartRange\");\n }\n }\n if (_215.exists(node)) {\n const csvModuleMissing = !ModuleRegistry22.__isRegistered(ModuleNames25.CsvExportModule, this.context.getGridId());\n const excelModuleMissing = !ModuleRegistry22.__isRegistered(ModuleNames25.ExcelExportModule, this.context.getGridId());\n const suppressExcel = this.gos.get(\"suppressExcelExport\") || excelModuleMissing;\n const suppressCsv = this.gos.get(\"suppressCsvExport\") || csvModuleMissing;\n const onIPad = _215.isIOSUserAgent();\n const anyExport = !onIPad && (!suppressExcel || !suppressCsv);\n if (anyExport) {\n defaultMenuOptions.push(\"export\");\n }\n }\n const defaultItems = defaultMenuOptions.length ? defaultMenuOptions : void 0;\n const columnContextMenuItems = column == null ? void 0 : column.getColDef().contextMenuItems;\n if (Array.isArray(columnContextMenuItems)) {\n return columnContextMenuItems;\n }\n if (typeof columnContextMenuItems === \"function\") {\n return columnContextMenuItems(this.gos.addGridCommonParams({\n column,\n node,\n value,\n defaultItems\n }));\n }\n const userFunc = this.gos.getCallback(\"getContextMenuItems\");\n if (userFunc) {\n return userFunc({ column, node, value, defaultItems });\n }\n return defaultMenuOptions;\n }\n onContextMenu(mouseEvent, touchEvent, rowNode, column, value, anchorToElement) {\n this.menuUtils.onContextMenu(mouseEvent, touchEvent, (eventOrTouch) => this.showMenu(rowNode, column, value, eventOrTouch, anchorToElement));\n }\n showMenu(node, column, value, mouseEvent, anchorToElement) {\n const menuItems = this.getMenuItems(node, column, value);\n const eGridBodyGui = this.ctrlsService.getGridBodyCtrl().getGui();\n if (menuItems === void 0 || _215.missingOrEmpty(menuItems)) {\n return false;\n }\n const menu = new ContextMenu(menuItems, column, node, value);\n this.createBean(menu);\n const eMenuGui = menu.getGui();\n const positionParams = {\n column,\n rowNode: node,\n type: \"contextMenu\",\n mouseEvent,\n ePopup: eMenuGui,\n // move one pixel away so that accidentally double clicking\n // won't show the browser's contextmenu\n nudgeY: 1\n };\n const translate = this.localeService.getLocaleTextFunc();\n const addPopupRes = this.popupService.addPopup({\n modal: true,\n eChild: eMenuGui,\n closeOnEsc: true,\n closedCallback: (e) => {\n eGridBodyGui.classList.remove(CSS_CONTEXT_MENU_OPEN);\n this.destroyBean(menu);\n this.dispatchVisibleChangedEvent(false, e === void 0 ? \"api\" : \"ui\");\n },\n click: mouseEvent,\n positionCallback: () => {\n const isRtl = this.gos.get(\"enableRtl\");\n this.popupService.positionPopupUnderMouseEvent(__spreadProps7(__spreadValues10({}, positionParams), {\n nudgeX: isRtl ? (eMenuGui.offsetWidth + 1) * -1 : 1\n }));\n },\n // so when browser is scrolled down, or grid is scrolled, context menu stays with cell\n anchorToElement,\n ariaLabel: translate(\"ariaLabelContextMenu\", \"Context Menu\")\n });\n if (addPopupRes) {\n eGridBodyGui.classList.add(CSS_CONTEXT_MENU_OPEN);\n menu.afterGuiAttached({ container: \"contextMenu\", hidePopup: addPopupRes.hideFunc });\n }\n if (this.activeMenu) {\n this.hideActiveMenu();\n }\n this.activeMenu = menu;\n menu.addEventListener(BeanStub27.EVENT_DESTROYED, () => {\n if (this.activeMenu === menu) {\n this.activeMenu = null;\n }\n });\n if (addPopupRes) {\n menu.addEventListener(AgMenuItemComponent22.EVENT_CLOSE_MENU, (e) => {\n var _a, _b;\n return addPopupRes.hideFunc({\n mouseEvent: (_a = e.mouseEvent) != null ? _a : void 0,\n keyboardEvent: (_b = e.keyboardEvent) != null ? _b : void 0,\n forceHide: true\n });\n });\n }\n const isApi = mouseEvent && mouseEvent instanceof MouseEvent && mouseEvent.type === \"mousedown\";\n this.dispatchVisibleChangedEvent(true, isApi ? \"api\" : \"ui\");\n return true;\n }\n dispatchVisibleChangedEvent(visible, source = \"ui\") {\n const displayedEvent = {\n type: Events28.EVENT_CONTEXT_MENU_VISIBLE_CHANGED,\n visible,\n source\n };\n this.eventService.dispatchEvent(displayedEvent);\n }\n};\n__decorateClass12([\n Autowired214(\"popupService\")\n], ContextMenuFactory.prototype, \"popupService\", 2);\n__decorateClass12([\n Autowired214(\"ctrlsService\")\n], ContextMenuFactory.prototype, \"ctrlsService\", 2);\n__decorateClass12([\n Autowired214(\"columnModel\")\n], ContextMenuFactory.prototype, \"columnModel\", 2);\n__decorateClass12([\n Autowired214(\"menuUtils\")\n], ContextMenuFactory.prototype, \"menuUtils\", 2);\n__decorateClass12([\n Optional5(\"rangeService\")\n], ContextMenuFactory.prototype, \"rangeService\", 2);\nContextMenuFactory = __decorateClass12([\n Bean27(\"contextMenuFactory\")\n], ContextMenuFactory);\nvar ContextMenu = class extends Component213 {\n constructor(menuItems, column, node, value) {\n super(\n /* html */\n `
`\n );\n this.menuItems = menuItems;\n this.column = column;\n this.node = node;\n this.value = value;\n this.menuList = null;\n this.focusedCell = null;\n }\n addMenuItems() {\n const menuList = this.createManagedBean(new AgMenuList22(0, {\n column: this.column,\n node: this.node,\n value: this.value\n }));\n const menuItemsMapped = this.menuItemMapper.mapWithStockItems(this.menuItems, null, () => this.getGui());\n menuList.addMenuItems(menuItemsMapped);\n this.appendChild(menuList);\n this.menuList = menuList;\n menuList.addEventListener(AgMenuItemComponent22.EVENT_CLOSE_MENU, (e) => this.dispatchEvent(e));\n }\n afterGuiAttached(params) {\n if (params.hidePopup) {\n this.addDestroyFunc(params.hidePopup);\n }\n this.focusedCell = this.focusService.getFocusedCell();\n if (this.menuList) {\n this.focusService.focusInto(this.menuList.getGui());\n }\n }\n restoreFocusedCell() {\n const currentFocusedCell = this.focusService.getFocusedCell();\n if (currentFocusedCell && this.focusedCell && this.cellPositionUtils.equals(currentFocusedCell, this.focusedCell)) {\n const { rowIndex, rowPinned, column } = this.focusedCell;\n const doc = this.gos.getDocument();\n const activeEl = this.gos.getActiveDomElement();\n if (!activeEl || activeEl === doc.body) {\n this.focusService.setFocusedCell({\n rowIndex,\n column,\n rowPinned,\n forceBrowserFocus: true,\n preventScrollOnBrowserFocus: !this.focusService.isKeyboardMode()\n });\n }\n }\n }\n destroy() {\n this.restoreFocusedCell();\n super.destroy();\n }\n};\n__decorateClass12([\n Autowired214(\"menuItemMapper\")\n], ContextMenu.prototype, \"menuItemMapper\", 2);\n__decorateClass12([\n Autowired214(\"focusService\")\n], ContextMenu.prototype, \"focusService\", 2);\n__decorateClass12([\n Autowired214(\"cellPositionUtils\")\n], ContextMenu.prototype, \"cellPositionUtils\", 2);\n__decorateClass12([\n PostConstruct214\n], ContextMenu.prototype, \"addMenuItems\", 1);\nvar MenuItemMapper = class extends BeanStub34 {\n mapWithStockItems(originalList, column, sourceElement) {\n if (!originalList) {\n return [];\n }\n const resultList = [];\n originalList.forEach((menuItemOrString) => {\n let result;\n if (typeof menuItemOrString === \"string\") {\n result = this.getStockMenuItem(menuItemOrString, column, sourceElement);\n } else {\n result = __spreadValues10({}, menuItemOrString);\n }\n if (!result) {\n return;\n }\n const resultDef = result;\n const { subMenu } = resultDef;\n if (subMenu && subMenu instanceof Array) {\n resultDef.subMenu = this.mapWithStockItems(subMenu, column, sourceElement);\n }\n if (result != null) {\n resultList.push(result);\n }\n });\n return resultList;\n }\n getStockMenuItem(key, column, sourceElement) {\n var _a;\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const skipHeaderOnAutoSize = this.gos.get(\"skipHeaderOnAutoSize\");\n switch (key) {\n case \"pinSubMenu\":\n return {\n name: localeTextFunc(\"pinColumn\", \"Pin Column\"),\n icon: _313.createIconNoSpan(\"menuPin\", this.gos, null),\n subMenu: [\"clearPinned\", \"pinLeft\", \"pinRight\"]\n };\n case \"pinLeft\":\n return {\n name: localeTextFunc(\"pinLeft\", \"Pin Left\"),\n action: () => this.columnModel.setColumnsPinned([column], \"left\", \"contextMenu\"),\n checked: !!column && column.isPinnedLeft()\n };\n case \"pinRight\":\n return {\n name: localeTextFunc(\"pinRight\", \"Pin Right\"),\n action: () => this.columnModel.setColumnsPinned([column], \"right\", \"contextMenu\"),\n checked: !!column && column.isPinnedRight()\n };\n case \"clearPinned\":\n return {\n name: localeTextFunc(\"noPin\", \"No Pin\"),\n action: () => this.columnModel.setColumnsPinned([column], null, \"contextMenu\"),\n checked: !!column && !column.isPinned()\n };\n case \"valueAggSubMenu\":\n if (ModuleRegistry32.__assertRegistered(ModuleNames32.RowGroupingModule, \"Aggregation from Menu\", this.context.getGridId())) {\n if (!(column == null ? void 0 : column.isPrimary()) && !(column == null ? void 0 : column.getColDef().pivotValueColumn)) {\n return null;\n }\n return {\n name: localeTextFunc(\"valueAggregation\", \"Value Aggregation\"),\n icon: _313.createIconNoSpan(\"menuValue\", this.gos, null),\n subMenu: this.createAggregationSubMenu(column, this.aggFuncService)\n };\n } else {\n return null;\n }\n case \"autoSizeThis\":\n return {\n name: localeTextFunc(\"autosizeThiscolumn\", \"Autosize This Column\"),\n action: () => this.columnModel.autoSizeColumn(column, \"contextMenu\", skipHeaderOnAutoSize)\n };\n case \"autoSizeAll\":\n return {\n name: localeTextFunc(\"autosizeAllColumns\", \"Autosize All Columns\"),\n action: () => this.columnModel.autoSizeAllColumns(\"contextMenu\", skipHeaderOnAutoSize)\n };\n case \"rowGroup\":\n return {\n name: localeTextFunc(\"groupBy\", \"Group by\") + \" \" + _313.escapeString(this.columnModel.getDisplayNameForColumn(column, \"header\")),\n disabled: (column == null ? void 0 : column.isRowGroupActive()) || !(column == null ? void 0 : column.getColDef().enableRowGroup),\n action: () => this.columnModel.addRowGroupColumns([column], \"contextMenu\"),\n icon: _313.createIconNoSpan(\"menuAddRowGroup\", this.gos, null)\n };\n case \"rowUnGroup\":\n const icon = _313.createIconNoSpan(\"menuRemoveRowGroup\", this.gos, null);\n const showRowGroup = column == null ? void 0 : column.getColDef().showRowGroup;\n const lockedGroups = this.gos.get(\"groupLockGroupColumns\");\n if (showRowGroup === true) {\n return {\n name: localeTextFunc(\"ungroupAll\", \"Un-Group All\"),\n disabled: lockedGroups === -1 || lockedGroups >= this.columnModel.getRowGroupColumns().length,\n action: () => this.columnModel.setRowGroupColumns(this.columnModel.getRowGroupColumns().slice(0, lockedGroups), \"contextMenu\"),\n icon\n };\n }\n if (typeof showRowGroup === \"string\") {\n const underlyingColumn = this.columnModel.getPrimaryColumn(showRowGroup);\n const ungroupByName = underlyingColumn != null ? _313.escapeString(this.columnModel.getDisplayNameForColumn(underlyingColumn, \"header\")) : showRowGroup;\n return {\n name: localeTextFunc(\"ungroupBy\", \"Un-Group by\") + \" \" + ungroupByName,\n disabled: underlyingColumn != null && this.columnModel.isColumnGroupingLocked(underlyingColumn),\n action: () => this.columnModel.removeRowGroupColumns([showRowGroup], \"contextMenu\"),\n icon\n };\n }\n return {\n name: localeTextFunc(\"ungroupBy\", \"Un-Group by\") + \" \" + _313.escapeString(this.columnModel.getDisplayNameForColumn(column, \"header\")),\n disabled: !(column == null ? void 0 : column.isRowGroupActive()) || !(column == null ? void 0 : column.getColDef().enableRowGroup) || this.columnModel.isColumnGroupingLocked(column),\n action: () => this.columnModel.removeRowGroupColumns([column], \"contextMenu\"),\n icon\n };\n case \"resetColumns\":\n return {\n name: localeTextFunc(\"resetColumns\", \"Reset Columns\"),\n action: () => this.columnModel.resetColumnState(\"contextMenu\")\n };\n case \"expandAll\":\n return {\n name: localeTextFunc(\"expandAll\", \"Expand All Row Groups\"),\n action: () => this.gridApi.expandAll()\n };\n case \"contractAll\":\n return {\n name: localeTextFunc(\"collapseAll\", \"Collapse All Row Groups\"),\n action: () => this.gridApi.collapseAll()\n };\n case \"copy\":\n if (ModuleRegistry32.__assertRegistered(ModuleNames32.ClipboardModule, \"Copy from Menu\", this.context.getGridId())) {\n return {\n name: localeTextFunc(\"copy\", \"Copy\"),\n shortcut: localeTextFunc(\"ctrlC\", \"Ctrl+C\"),\n icon: _313.createIconNoSpan(\"clipboardCopy\", this.gos, null),\n action: () => this.clipboardService.copyToClipboard()\n };\n } else {\n return null;\n }\n case \"copyWithHeaders\":\n if (ModuleRegistry32.__assertRegistered(ModuleNames32.ClipboardModule, \"Copy with Headers from Menu\", this.context.getGridId())) {\n return {\n name: localeTextFunc(\"copyWithHeaders\", \"Copy with Headers\"),\n // shortcut: localeTextFunc('ctrlC','Ctrl+C'),\n icon: _313.createIconNoSpan(\"clipboardCopy\", this.gos, null),\n action: () => this.clipboardService.copyToClipboard({ includeHeaders: true })\n };\n } else {\n return null;\n }\n case \"copyWithGroupHeaders\":\n if (ModuleRegistry32.__assertRegistered(ModuleNames32.ClipboardModule, \"Copy with Group Headers from Menu\", this.context.getGridId())) {\n return {\n name: localeTextFunc(\"copyWithGroupHeaders\", \"Copy with Group Headers\"),\n // shortcut: localeTextFunc('ctrlC','Ctrl+C'),\n icon: _313.createIconNoSpan(\"clipboardCopy\", this.gos, null),\n action: () => this.clipboardService.copyToClipboard({ includeHeaders: true, includeGroupHeaders: true })\n };\n } else {\n return null;\n }\n case \"cut\":\n if (ModuleRegistry32.__assertRegistered(ModuleNames32.ClipboardModule, \"Cut from Menu\", this.context.getGridId())) {\n const focusedCell = this.focusService.getFocusedCell();\n const rowNode = focusedCell ? this.rowPositionUtils.getRowNode(focusedCell) : null;\n const isEditable = rowNode ? focusedCell == null ? void 0 : focusedCell.column.isCellEditable(rowNode) : false;\n return {\n name: localeTextFunc(\"cut\", \"Cut\"),\n shortcut: localeTextFunc(\"ctrlX\", \"Ctrl+X\"),\n icon: _313.createIconNoSpan(\"clipboardCut\", this.gos, null),\n disabled: !isEditable || this.gos.get(\"suppressCutToClipboard\"),\n action: () => this.clipboardService.cutToClipboard(void 0, \"contextMenu\")\n };\n } else {\n return null;\n }\n case \"paste\":\n if (ModuleRegistry32.__assertRegistered(ModuleNames32.ClipboardModule, \"Paste from Clipboard\", this.context.getGridId())) {\n return {\n name: localeTextFunc(\"paste\", \"Paste\"),\n shortcut: localeTextFunc(\"ctrlV\", \"Ctrl+V\"),\n disabled: true,\n icon: _313.createIconNoSpan(\"clipboardPaste\", this.gos, null),\n action: () => this.clipboardService.pasteFromClipboard()\n };\n } else {\n return null;\n }\n case \"export\":\n const exportSubMenuItems = [];\n const csvModuleLoaded = ModuleRegistry32.__isRegistered(ModuleNames32.CsvExportModule, this.context.getGridId());\n const excelModuleLoaded = ModuleRegistry32.__isRegistered(ModuleNames32.ExcelExportModule, this.context.getGridId());\n if (!this.gos.get(\"suppressCsvExport\") && csvModuleLoaded) {\n exportSubMenuItems.push(\"csvExport\");\n }\n if (!this.gos.get(\"suppressExcelExport\") && excelModuleLoaded) {\n exportSubMenuItems.push(\"excelExport\");\n }\n return {\n name: localeTextFunc(\"export\", \"Export\"),\n subMenu: exportSubMenuItems,\n icon: _313.createIconNoSpan(\"save\", this.gos, null)\n };\n case \"csvExport\":\n return {\n name: localeTextFunc(\"csvExport\", \"CSV Export\"),\n icon: _313.createIconNoSpan(\"csvExport\", this.gos, null),\n action: () => this.gridApi.exportDataAsCsv({})\n };\n case \"excelExport\":\n return {\n name: localeTextFunc(\"excelExport\", \"Excel Export\"),\n icon: _313.createIconNoSpan(\"excelExport\", this.gos, null),\n action: () => this.gridApi.exportDataAsExcel()\n };\n case \"separator\":\n return \"separator\";\n case \"pivotChart\":\n case \"chartRange\":\n return (_a = this.chartMenuItemMapper.getChartItems(key)) != null ? _a : null;\n case \"columnFilter\":\n if (column) {\n return {\n name: localeTextFunc(\"columnFilter\", \"Column Filter\"),\n icon: _313.createIconNoSpan(\"filter\", this.gos, null),\n action: () => this.menuService.showFilterMenu({\n column,\n buttonElement: sourceElement(),\n containerType: \"columnFilter\",\n positionBy: \"button\"\n })\n };\n } else {\n return null;\n }\n case \"columnChooser\":\n if (ModuleRegistry32.__isRegistered(ModuleNames32.ColumnsToolPanelModule, this.context.getGridId())) {\n return {\n name: localeTextFunc(\"columnChooser\", \"Choose Columns\"),\n icon: _313.createIconNoSpan(\"columns\", this.gos, null),\n action: () => this.menuService.showColumnChooser({ column, eventSource: sourceElement() })\n };\n } else {\n return null;\n }\n case \"sortAscending\":\n return {\n name: localeTextFunc(\"sortAscending\", \"Sort Ascending\"),\n icon: _313.createIconNoSpan(\"sortAscending\", this.gos, null),\n action: () => this.sortController.setSortForColumn(column, \"asc\", false, \"columnMenu\")\n };\n case \"sortDescending\":\n return {\n name: localeTextFunc(\"sortDescending\", \"Sort Descending\"),\n icon: _313.createIconNoSpan(\"sortDescending\", this.gos, null),\n action: () => this.sortController.setSortForColumn(column, \"desc\", false, \"columnMenu\")\n };\n case \"sortUnSort\":\n return {\n name: localeTextFunc(\"sortUnSort\", \"Clear Sort\"),\n icon: _313.createIconNoSpan(\"sortUnSort\", this.gos, null),\n action: () => this.sortController.setSortForColumn(column, null, false, \"columnMenu\")\n };\n default: {\n console.warn(`AG Grid: unknown menu item type ${key}`);\n return null;\n }\n }\n }\n createAggregationSubMenu(column, aggFuncService) {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n let columnToUse;\n if (column.isPrimary()) {\n columnToUse = column;\n } else {\n const pivotValueColumn = column.getColDef().pivotValueColumn;\n columnToUse = _313.exists(pivotValueColumn) ? pivotValueColumn : void 0;\n }\n const result = [];\n if (columnToUse) {\n const columnIsAlreadyAggValue = columnToUse.isValueActive();\n const funcNames = aggFuncService.getFuncNames(columnToUse);\n result.push({\n name: localeTextFunc(\"noAggregation\", \"None\"),\n action: () => {\n this.columnModel.removeValueColumns([columnToUse], \"contextMenu\");\n this.columnModel.setColumnAggFunc(columnToUse, void 0, \"contextMenu\");\n },\n checked: !columnIsAlreadyAggValue\n });\n funcNames.forEach((funcName) => {\n result.push({\n name: localeTextFunc(funcName, aggFuncService.getDefaultFuncLabel(funcName)),\n action: () => {\n this.columnModel.setColumnAggFunc(columnToUse, funcName, \"contextMenu\");\n this.columnModel.addValueColumns([columnToUse], \"contextMenu\");\n },\n checked: columnIsAlreadyAggValue && columnToUse.getAggFunc() === funcName\n });\n });\n }\n return result;\n }\n};\n__decorateClass12([\n Autowired314(\"columnModel\")\n], MenuItemMapper.prototype, \"columnModel\", 2);\n__decorateClass12([\n Autowired314(\"gridApi\")\n], MenuItemMapper.prototype, \"gridApi\", 2);\n__decorateClass12([\n Autowired314(\"focusService\")\n], MenuItemMapper.prototype, \"focusService\", 2);\n__decorateClass12([\n Autowired314(\"rowPositionUtils\")\n], MenuItemMapper.prototype, \"rowPositionUtils\", 2);\n__decorateClass12([\n Autowired314(\"chartMenuItemMapper\")\n], MenuItemMapper.prototype, \"chartMenuItemMapper\", 2);\n__decorateClass12([\n Autowired314(\"menuService\")\n], MenuItemMapper.prototype, \"menuService\", 2);\n__decorateClass12([\n Autowired314(\"sortController\")\n], MenuItemMapper.prototype, \"sortController\", 2);\n__decorateClass12([\n Optional22(\"clipboardService\")\n], MenuItemMapper.prototype, \"clipboardService\", 2);\n__decorateClass12([\n Optional22(\"aggFuncService\")\n], MenuItemMapper.prototype, \"aggFuncService\", 2);\nMenuItemMapper = __decorateClass12([\n Bean34(\"menuItemMapper\")\n], MenuItemMapper);\nvar VERSION12 = \"31.3.2\";\nvar ChartMenuItemMapper = class extends BeanStub44 {\n getChartItems(key) {\n var _a, _b;\n if (!this.chartService) {\n ModuleRegistry42.__assertRegistered(ModuleNames42.GridChartsModule, `the Context Menu key \"${key}\"`, this.context.getGridId());\n return void 0;\n }\n const builder = key === \"pivotChart\" ? new PivotMenuItemMapper(this.gos, this.chartService, this.localeService) : new RangeMenuItemMapper(this.gos, this.chartService, this.localeService);\n const isEnterprise = this.chartService.isEnterprise();\n let topLevelMenuItem = builder.getMenuItem();\n if (topLevelMenuItem && topLevelMenuItem.subMenu && !isEnterprise) {\n const filterEnterpriseItems = (m) => {\n var _a2;\n return __spreadProps7(__spreadValues10({}, m), {\n subMenu: (_a2 = m.subMenu) == null ? void 0 : _a2.filter((menu) => !menu._enterprise).map((menu) => filterEnterpriseItems(menu))\n });\n };\n topLevelMenuItem = filterEnterpriseItems(topLevelMenuItem);\n }\n const chartGroupsDef = (_b = (_a = this.gos.get(\"chartToolPanelsDef\")) == null ? void 0 : _a.settingsPanel) == null ? void 0 : _b.chartGroupsDef;\n if (chartGroupsDef) {\n topLevelMenuItem = ChartMenuItemMapper.filterAndOrderChartMenu(topLevelMenuItem, chartGroupsDef, builder.getConfigLookup());\n }\n return this.cleanInternals(topLevelMenuItem);\n }\n // Remove our internal _key and _enterprise properties so this does not leak out of the class on the menu items.\n cleanInternals(menuItem) {\n if (!menuItem) {\n return menuItem;\n }\n const removeKeys = (m) => {\n var _a;\n m == null ? true : delete m._key;\n m == null ? true : delete m._enterprise;\n (_a = m == null ? void 0 : m.subMenu) == null ? void 0 : _a.forEach((s) => removeKeys(s));\n return m;\n };\n return removeKeys(menuItem);\n }\n static buildLookup(menuItem) {\n let itemLookup = {};\n const addItem = (item) => {\n itemLookup[item._key] = item;\n if (item.subMenu) {\n item.subMenu.forEach((s) => addItem(s));\n }\n };\n addItem(menuItem);\n return itemLookup;\n }\n /**\n * Make the MenuItem match the charts provided and their ordering on the ChartGroupsDef config object as provided by the user.\n */\n static filterAndOrderChartMenu(topLevelMenuItem, chartGroupsDef, configLookup) {\n var _a;\n const menuItemLookup = this.buildLookup(topLevelMenuItem);\n let orderedAndFiltered = __spreadProps7(__spreadValues10({}, topLevelMenuItem), { subMenu: [] });\n Object.entries(chartGroupsDef).forEach(([group, chartTypes]) => {\n var _a2, _b;\n const chartConfigGroup = configLookup[group];\n if (chartConfigGroup === null)\n return;\n if (chartConfigGroup == void 0) {\n _410.warnOnce(`invalid chartGroupsDef config '${group}'`);\n return void 0;\n }\n const menuItem = menuItemLookup[chartConfigGroup._key];\n if (menuItem) {\n if (menuItem.subMenu) {\n const subMenus = chartTypes.map((chartType) => {\n const itemKey = chartConfigGroup[chartType];\n if (itemKey == void 0) {\n _410.warnOnce(`invalid chartGroupsDef config '${group}.${chartType}'`);\n return void 0;\n }\n return menuItemLookup[itemKey];\n }).filter((s) => s !== void 0);\n if (subMenus.length > 0) {\n menuItem.subMenu = subMenus;\n (_a2 = orderedAndFiltered.subMenu) == null ? void 0 : _a2.push(menuItem);\n }\n } else {\n (_b = orderedAndFiltered.subMenu) == null ? void 0 : _b.push(menuItem);\n }\n }\n });\n if (((_a = orderedAndFiltered.subMenu) == null ? void 0 : _a.length) == 0) {\n return void 0;\n }\n return orderedAndFiltered;\n }\n};\n__decorateClass12([\n Optional32(\"chartService\")\n], ChartMenuItemMapper.prototype, \"chartService\", 2);\nChartMenuItemMapper = __decorateClass12([\n Bean44(\"chartMenuItemMapper\")\n], ChartMenuItemMapper);\nvar PivotMenuItemMapper = class {\n constructor(gos, chartService, localeService) {\n this.gos = gos;\n this.chartService = chartService;\n this.localeService = localeService;\n }\n getMenuItem() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const getMenuItem = (localeKey, defaultText, chartType, key, enterprise = false) => {\n return {\n name: localeTextFunc(localeKey, defaultText),\n action: () => this.chartService.createPivotChart({ chartType }),\n _key: key,\n _enterprise: enterprise\n };\n };\n return {\n name: localeTextFunc(\"pivotChart\", \"Pivot Chart\"),\n _key: \"pivotChart\",\n subMenu: [\n {\n _key: \"pivotColumnChart\",\n name: localeTextFunc(\"columnChart\", \"Column\"),\n subMenu: [\n getMenuItem(\"groupedColumn\", \"Grouped‎\", \"groupedColumn\", \"pivotGroupedColumn\"),\n getMenuItem(\"stackedColumn\", \"Stacked‎\", \"stackedColumn\", \"pivotStackedColumn\"),\n getMenuItem(\"normalizedColumn\", \"100% Stacked‎\", \"normalizedColumn\", \"pivotNormalizedColumn\")\n ]\n },\n {\n _key: \"pivotBarChart\",\n name: localeTextFunc(\"barChart\", \"Bar\"),\n subMenu: [\n getMenuItem(\"groupedBar\", \"Grouped‎\", \"groupedBar\", \"pivotGroupedBar\"),\n getMenuItem(\"stackedBar\", \"Stacked‎\", \"stackedBar\", \"pivotStackedBar\"),\n getMenuItem(\"normalizedBar\", \"100% Stacked‎\", \"normalizedBar\", \"pivotNormalizedBar\")\n ]\n },\n {\n _key: \"pivotPieChart\",\n name: localeTextFunc(\"pieChart\", \"Pie\"),\n subMenu: [\n getMenuItem(\"pie\", \"Pie‎\", \"pie\", \"pivotPie\"),\n getMenuItem(\"donut\", \"Donut‎\", \"donut\", \"pivotDonut\")\n ]\n },\n getMenuItem(\"line\", \"Line‎\", \"line\", \"pivotLineChart\"),\n {\n _key: \"pivotXYChart\",\n name: localeTextFunc(\"xyChart\", \"X Y (Scatter)\"),\n subMenu: [\n getMenuItem(\"scatter\", \"Scatter‎\", \"scatter\", \"pivotScatter\"),\n getMenuItem(\"bubble\", \"Bubble‎\", \"bubble\", \"pivotBubble\")\n ]\n },\n {\n _key: \"pivotAreaChart\",\n name: localeTextFunc(\"areaChart\", \"Area\"),\n subMenu: [\n getMenuItem(\"area\", \"Area‎\", \"area\", \"pivotArea\"),\n getMenuItem(\"stackedArea\", \"Stacked‎\", \"stackedArea\", \"pivotStackedArea\"),\n getMenuItem(\"normalizedArea\", \"100% Stacked‎\", \"normalizedArea\", \"pivotNormalizedArea\")\n ]\n },\n {\n _key: \"pivotStatisticalChart\",\n _enterprise: false,\n // histogram chart is available in both community and enterprise distributions\n name: localeTextFunc(\"statisticalChart\", \"Statistical\"),\n subMenu: [\n getMenuItem(\"histogramChart\", \"Histogram‎\", \"histogram\", \"pivotHistogram\", false)\n ]\n },\n {\n _key: \"pivotHierarchicalChart\",\n _enterprise: true,\n name: localeTextFunc(\"hierarchicalChart\", \"Hierarchical\"),\n subMenu: [\n getMenuItem(\"treemapChart\", \"Treemap‎\", \"treemap\", \"pivotTreemap\", true),\n getMenuItem(\"sunburstChart\", \"Sunburst‎\", \"sunburst\", \"pivotSunburst\", true)\n ]\n },\n {\n _key: \"pivotCombinationChart\",\n name: localeTextFunc(\"combinationChart\", \"Combination\"),\n subMenu: [\n getMenuItem(\"columnLineCombo\", \"Column & Line‎\", \"columnLineCombo\", \"pivotColumnLineCombo\"),\n getMenuItem(\"AreaColumnCombo\", \"Area & Column‎\", \"areaColumnCombo\", \"pivotAreaColumnCombo\")\n ]\n }\n ],\n icon: _410.createIconNoSpan(\"chart\", this.gos, void 0)\n };\n }\n getConfigLookup() {\n return {\n columnGroup: {\n _key: \"pivotColumnChart\",\n column: \"pivotGroupedColumn\",\n stackedColumn: \"pivotStackedColumn\",\n normalizedColumn: \"pivotNormalizedColumn\"\n },\n barGroup: {\n _key: \"pivotBarChart\",\n bar: \"pivotGroupedBar\",\n stackedBar: \"pivotStackedBar\",\n normalizedBar: \"pivotNormalizedBar\"\n },\n pieGroup: {\n _key: \"pivotPieChart\",\n pie: \"pivotPie\",\n donut: \"pivotDonut\",\n doughnut: \"pivotDonut\"\n },\n lineGroup: {\n _key: \"pivotLineChart\",\n line: \"pivotLineChart\"\n },\n scatterGroup: {\n _key: \"pivotXYChart\",\n bubble: \"pivotBubble\",\n scatter: \"pivotScatter\"\n },\n areaGroup: {\n _key: \"pivotAreaChart\",\n area: \"pivotArea\",\n stackedArea: \"pivotStackedArea\",\n normalizedArea: \"pivotNormalizedArea\"\n },\n combinationGroup: {\n _key: \"pivotCombinationChart\",\n columnLineCombo: \"pivotColumnLineCombo\",\n areaColumnCombo: \"pivotAreaColumnCombo\",\n customCombo: null\n // Not currently supported\n },\n hierarchicalGroup: {\n _key: \"pivotHierarchicalChart\",\n treemap: \"pivotTreemap\",\n sunburst: \"pivotSunburst\"\n },\n statisticalGroup: {\n _key: \"pivotStatisticalChart\",\n histogram: \"pivotHistogram\",\n // Some statistical charts do not currently support pivot mode\n rangeBar: null,\n rangeArea: null,\n boxPlot: null\n },\n // Polar charts do not support pivot mode\n polarGroup: null,\n // Specialized charts do not currently support pivot mode\n specializedGroup: null\n };\n }\n};\nvar RangeMenuItemMapper = class {\n constructor(gos, chartService, localeService) {\n this.gos = gos;\n this.chartService = chartService;\n this.localeService = localeService;\n }\n getMenuItem() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const getMenuItem = (localeKey, defaultText, chartType, key, enterprise = false) => {\n return {\n name: localeTextFunc(localeKey, defaultText),\n action: () => this.chartService.createChartFromCurrentRange(chartType),\n _key: key,\n _enterprise: enterprise\n };\n };\n return {\n name: localeTextFunc(\"chartRange\", \"Chart Range\"),\n _key: \"chartRange\",\n subMenu: [\n {\n name: localeTextFunc(\"columnChart\", \"Column\"),\n subMenu: [\n getMenuItem(\"groupedColumn\", \"Grouped‎\", \"groupedColumn\", \"rangeGroupedColumn\"),\n getMenuItem(\"stackedColumn\", \"Stacked‎\", \"stackedColumn\", \"rangeStackedColumn\"),\n getMenuItem(\"normalizedColumn\", \"100% Stacked‎\", \"normalizedColumn\", \"rangeNormalizedColumn\")\n ],\n _key: \"rangeColumnChart\"\n },\n {\n name: localeTextFunc(\"barChart\", \"Bar\"),\n subMenu: [\n getMenuItem(\"groupedBar\", \"Grouped‎\", \"groupedBar\", \"rangeGroupedBar\"),\n getMenuItem(\"stackedBar\", \"Stacked‎\", \"stackedBar\", \"rangeStackedBar\"),\n getMenuItem(\"normalizedBar\", \"100% Stacked‎\", \"normalizedBar\", \"rangeNormalizedBar\")\n ],\n _key: \"rangeBarChart\"\n },\n {\n name: localeTextFunc(\"pieChart\", \"Pie\"),\n subMenu: [\n getMenuItem(\"pie\", \"Pie‎\", \"pie\", \"rangePie\"),\n getMenuItem(\"donut\", \"Donut‎\", \"donut\", \"rangeDonut\")\n ],\n _key: \"rangePieChart\"\n },\n getMenuItem(\"line\", \"Line‎\", \"line\", \"rangeLineChart\"),\n {\n name: localeTextFunc(\"xyChart\", \"X Y (Scatter)\"),\n subMenu: [\n getMenuItem(\"scatter\", \"Scatter‎\", \"scatter\", \"rangeScatter\"),\n getMenuItem(\"bubble\", \"Bubble‎\", \"bubble\", \"rangeBubble\")\n ],\n _key: \"rangeXYChart\"\n },\n {\n name: localeTextFunc(\"areaChart\", \"Area\"),\n subMenu: [\n getMenuItem(\"area\", \"Area‎\", \"area\", \"rangeArea\"),\n getMenuItem(\"stackedArea\", \"Stacked‎\", \"stackedArea\", \"rangeStackedArea\"),\n getMenuItem(\"normalizedArea\", \"100% Stacked‎\", \"normalizedArea\", \"rangeNormalizedArea\")\n ],\n _key: \"rangeAreaChart\"\n },\n {\n name: localeTextFunc(\"polarChart\", \"Polar\"),\n subMenu: [\n getMenuItem(\"radarLine\", \"Radar Line‎\", \"radarLine\", \"rangeRadarLine\"),\n getMenuItem(\"radarArea\", \"Radar Area‎\", \"radarArea\", \"rangeRadarArea\"),\n getMenuItem(\"nightingale\", \"Nightingale‎\", \"nightingale\", \"rangeNightingale\"),\n getMenuItem(\"radialColumn\", \"Radial Column‎\", \"radialColumn\", \"rangeRadialColumn\"),\n getMenuItem(\"radialBar\", \"Radial Bar‎\", \"radialBar\", \"rangeRadialBar\")\n ],\n _key: \"rangePolarChart\",\n _enterprise: true\n },\n {\n name: localeTextFunc(\"statisticalChart\", \"Statistical\"),\n subMenu: [\n getMenuItem(\"boxPlot\", \"Box Plot‎\", \"boxPlot\", \"rangeBoxPlot\", true),\n getMenuItem(\"histogramChart\", \"Histogram‎\", \"histogram\", \"rangeHistogram\", false),\n getMenuItem(\"rangeBar\", \"Range Bar‎\", \"rangeBar\", \"rangeRangeBar\", true),\n getMenuItem(\"rangeArea\", \"Range Area‎\", \"rangeArea\", \"rangeRangeArea\", true)\n ],\n _key: \"rangeStatisticalChart\",\n _enterprise: false\n // histogram chart is available in both community and enterprise distributions\n },\n {\n name: localeTextFunc(\"hierarchicalChart\", \"Hierarchical\"),\n subMenu: [\n getMenuItem(\"treemap\", \"Treemap‎\", \"treemap\", \"rangeTreemap\"),\n getMenuItem(\"sunburst\", \"Sunburst‎\", \"sunburst\", \"rangeSunburst\")\n ],\n _key: \"rangeHierarchicalChart\",\n _enterprise: true\n },\n {\n name: localeTextFunc(\"specializedChart\", \"Specialized\"),\n subMenu: [\n getMenuItem(\"heatmap\", \"Heatmap‎\", \"heatmap\", \"rangeHeatmap\"),\n getMenuItem(\"waterfall\", \"Waterfall‎\", \"waterfall\", \"rangeWaterfall\")\n ],\n _key: \"rangeSpecializedChart\",\n _enterprise: true\n },\n {\n name: localeTextFunc(\"combinationChart\", \"Combination\"),\n subMenu: [\n getMenuItem(\"columnLineCombo\", \"Column & Line‎\", \"columnLineCombo\", \"rangeColumnLineCombo\"),\n getMenuItem(\"AreaColumnCombo\", \"Area & Column‎\", \"areaColumnCombo\", \"rangeAreaColumnCombo\")\n ],\n _key: \"rangeCombinationChart\"\n }\n ],\n icon: _410.createIconNoSpan(\"chart\", this.gos, void 0)\n };\n }\n getConfigLookup() {\n return {\n columnGroup: {\n _key: \"rangeColumnChart\",\n column: \"rangeGroupedColumn\",\n stackedColumn: \"rangeStackedColumn\",\n normalizedColumn: \"rangeNormalizedColumn\"\n },\n barGroup: {\n _key: \"rangeBarChart\",\n bar: \"rangeGroupedBar\",\n stackedBar: \"rangeStackedBar\",\n normalizedBar: \"rangeNormalizedBar\"\n },\n pieGroup: {\n _key: \"rangePieChart\",\n pie: \"rangePie\",\n donut: \"rangeDonut\",\n doughnut: \"rangeDonut\"\n },\n lineGroup: {\n _key: \"rangeLineChart\",\n line: \"rangeLineChart\"\n },\n scatterGroup: {\n _key: \"rangeXYChart\",\n bubble: \"rangeBubble\",\n scatter: \"rangeScatter\"\n },\n areaGroup: {\n _key: \"rangeAreaChart\",\n area: \"rangeArea\",\n stackedArea: \"rangeStackedArea\",\n normalizedArea: \"rangeNormalizedArea\"\n },\n polarGroup: {\n _key: \"rangePolarChart\",\n radarLine: \"rangeRadarLine\",\n radarArea: \"rangeRadarArea\",\n nightingale: \"rangeNightingale\",\n radialColumn: \"rangeRadialColumn\",\n radialBar: \"rangeRadialBar\"\n },\n statisticalGroup: {\n _key: \"rangeStatisticalChart\",\n boxPlot: \"rangeBoxPlot\",\n histogram: \"rangeHistogram\",\n rangeBar: \"rangeRangeBar\",\n rangeArea: \"rangeRangeArea\"\n },\n hierarchicalGroup: {\n _key: \"rangeHierarchicalChart\",\n treemap: \"rangeTreemap\",\n sunburst: \"rangeSunburst\"\n },\n specializedGroup: {\n _key: \"rangeSpecializedChart\",\n heatmap: \"rangeHeatmap\",\n waterfall: \"rangeWaterfall\"\n },\n combinationGroup: {\n _key: \"rangeCombinationChart\",\n columnLineCombo: \"rangeColumnLineCombo\",\n areaColumnCombo: \"rangeAreaColumnCombo\",\n customCombo: null\n // Not currently supported\n }\n };\n }\n};\nvar ColumnChooserFactory = class extends BeanStub54 {\n createColumnSelectPanel(parent, column, draggable, params) {\n var _a, _b;\n const columnSelectPanel = parent.createManagedBean(new PrimaryColsPanel());\n const columnChooserParams = (_b = (_a = params != null ? params : column == null ? void 0 : column.getColDef().columnChooserParams) != null ? _a : column == null ? void 0 : column.getColDef().columnsMenuParams) != null ? _b : {};\n const {\n contractColumnSelection,\n suppressColumnExpandAll,\n suppressColumnFilter,\n suppressColumnSelectAll,\n suppressSyncLayoutWithGrid,\n columnLayout\n } = columnChooserParams;\n columnSelectPanel.init(!!draggable, this.gos.addGridCommonParams({\n suppressColumnMove: false,\n suppressValues: false,\n suppressPivots: false,\n suppressRowGroups: false,\n suppressPivotMode: false,\n contractColumnSelection: !!contractColumnSelection,\n suppressColumnExpandAll: !!suppressColumnExpandAll,\n suppressColumnFilter: !!suppressColumnFilter,\n suppressColumnSelectAll: !!suppressColumnSelectAll,\n suppressSyncLayoutWithGrid: !!columnLayout || !!suppressSyncLayoutWithGrid,\n onStateUpdated: () => {\n }\n }), \"columnMenu\");\n if (columnLayout) {\n columnSelectPanel.setColumnLayout(columnLayout);\n }\n return columnSelectPanel;\n }\n showColumnChooser({ column, chooserParams, eventSource }) {\n this.hideActiveColumnChooser();\n const columnSelectPanel = this.createColumnSelectPanel(this, column, true, chooserParams);\n const translate = this.localeService.getLocaleTextFunc();\n const columnIndex = this.columnModel.getAllDisplayedColumns().indexOf(column);\n const headerPosition = column ? this.focusService.getFocusedHeader() : null;\n this.activeColumnChooserDialog = this.createBean(new AgDialog4({\n title: translate(\"chooseColumns\", \"Choose Columns\"),\n component: columnSelectPanel,\n width: 300,\n height: 300,\n resizable: true,\n movable: true,\n centered: true,\n closable: true,\n afterGuiAttached: () => {\n var _a;\n (_a = this.focusService.findNextFocusableElement(columnSelectPanel.getGui())) == null ? void 0 : _a.focus();\n this.dispatchVisibleChangedEvent(true, column);\n },\n closedCallback: (event) => {\n const eComp = this.activeColumnChooser.getGui();\n this.destroyBean(this.activeColumnChooser);\n this.activeColumnChooser = void 0;\n this.activeColumnChooserDialog = void 0;\n this.dispatchVisibleChangedEvent(false, column);\n if (column) {\n this.menuUtils.restoreFocusOnClose({ column, headerPosition, columnIndex, eventSource }, eComp, event, true);\n }\n }\n }));\n this.activeColumnChooser = columnSelectPanel;\n }\n hideActiveColumnChooser() {\n if (this.activeColumnChooserDialog) {\n this.destroyBean(this.activeColumnChooserDialog);\n }\n }\n dispatchVisibleChangedEvent(visible, column) {\n const event = {\n type: Events36.EVENT_COLUMN_MENU_VISIBLE_CHANGED,\n visible,\n switchingTab: false,\n key: \"columnChooser\",\n column: column != null ? column : null\n };\n this.eventService.dispatchEvent(event);\n }\n};\n__decorateClass12([\n Autowired414(\"focusService\")\n], ColumnChooserFactory.prototype, \"focusService\", 2);\n__decorateClass12([\n Autowired414(\"menuUtils\")\n], ColumnChooserFactory.prototype, \"menuUtils\", 2);\n__decorateClass12([\n Autowired414(\"columnModel\")\n], ColumnChooserFactory.prototype, \"columnModel\", 2);\nColumnChooserFactory = __decorateClass12([\n Bean53(\"columnChooserFactory\")\n], ColumnChooserFactory);\nvar ColumnMenuFactory = class extends BeanStub64 {\n createMenu(parent, column, sourceElement) {\n const menuList = parent.createManagedBean(new AgMenuList3(0, {\n column: column != null ? column : null,\n node: null,\n value: null\n }));\n const menuItems = this.getMenuItems(column);\n const menuItemsMapped = this.menuItemMapper.mapWithStockItems(menuItems, column != null ? column : null, sourceElement);\n menuList.addMenuItems(menuItemsMapped);\n return menuList;\n }\n getMenuItems(column) {\n const defaultItems = this.getDefaultMenuOptions(column);\n let result;\n const columnMainMenuItems = column == null ? void 0 : column.getColDef().mainMenuItems;\n if (Array.isArray(columnMainMenuItems)) {\n result = columnMainMenuItems;\n } else if (typeof columnMainMenuItems === \"function\") {\n result = columnMainMenuItems(this.gos.addGridCommonParams({\n column,\n defaultItems\n }));\n } else {\n const userFunc = this.gos.getCallback(\"getMainMenuItems\");\n if (userFunc && column) {\n result = userFunc({\n column,\n defaultItems\n });\n } else {\n result = defaultItems;\n }\n }\n _56.removeRepeatsFromArray(result, ColumnMenuFactory.MENU_ITEM_SEPARATOR);\n return result;\n }\n getDefaultMenuOptions(column) {\n const result = [];\n const isLegacyMenuEnabled = this.menuService.isLegacyMenuEnabled();\n if (!column) {\n if (!isLegacyMenuEnabled) {\n result.push(\"columnChooser\");\n }\n result.push(\"resetColumns\");\n return result;\n }\n const allowPinning = !column.getColDef().lockPinned;\n const rowGroupCount = this.columnModel.getRowGroupColumns().length;\n const doingGrouping = rowGroupCount > 0;\n const allowValue = column.isAllowValue();\n const allowRowGroup = column.isAllowRowGroup();\n const isPrimary = column.isPrimary();\n const pivotModeOn = this.columnModel.isPivotMode();\n const isInMemoryRowModel = this.rowModel.getType() === \"clientSide\";\n const usingTreeData = this.gos.get(\"treeData\");\n const allowValueAgg = (\n // if primary, then only allow aggValue if grouping and it's a value columns\n isPrimary && doingGrouping && allowValue || !isPrimary\n );\n if (!isLegacyMenuEnabled && column.isSortable()) {\n const sort = column.getSort();\n if (sort !== \"asc\") {\n result.push(\"sortAscending\");\n }\n if (sort !== \"desc\") {\n result.push(\"sortDescending\");\n }\n if (sort) {\n result.push(\"sortUnSort\");\n }\n result.push(ColumnMenuFactory.MENU_ITEM_SEPARATOR);\n }\n if (this.menuService.isFilterMenuItemEnabled(column)) {\n result.push(\"columnFilter\");\n result.push(ColumnMenuFactory.MENU_ITEM_SEPARATOR);\n }\n if (allowPinning) {\n result.push(\"pinSubMenu\");\n }\n if (allowValueAgg) {\n result.push(\"valueAggSubMenu\");\n }\n if (allowPinning || allowValueAgg) {\n result.push(ColumnMenuFactory.MENU_ITEM_SEPARATOR);\n }\n result.push(\"autoSizeThis\");\n result.push(\"autoSizeAll\");\n result.push(ColumnMenuFactory.MENU_ITEM_SEPARATOR);\n const showRowGroup = column.getColDef().showRowGroup;\n if (showRowGroup) {\n result.push(\"rowUnGroup\");\n } else if (allowRowGroup && column.isPrimary()) {\n if (column.isRowGroupActive()) {\n const groupLocked = this.columnModel.isColumnGroupingLocked(column);\n if (!groupLocked) {\n result.push(\"rowUnGroup\");\n }\n } else {\n result.push(\"rowGroup\");\n }\n }\n result.push(ColumnMenuFactory.MENU_ITEM_SEPARATOR);\n if (!isLegacyMenuEnabled) {\n result.push(\"columnChooser\");\n }\n result.push(\"resetColumns\");\n const allowExpandAndContract = isInMemoryRowModel && (usingTreeData || rowGroupCount > (pivotModeOn ? 1 : 0));\n if (allowExpandAndContract) {\n result.push(\"expandAll\");\n result.push(\"contractAll\");\n }\n return result;\n }\n};\nColumnMenuFactory.MENU_ITEM_SEPARATOR = \"separator\";\n__decorateClass12([\n Autowired510(\"menuItemMapper\")\n], ColumnMenuFactory.prototype, \"menuItemMapper\", 2);\n__decorateClass12([\n Autowired510(\"columnModel\")\n], ColumnMenuFactory.prototype, \"columnModel\", 2);\n__decorateClass12([\n Autowired510(\"rowModel\")\n], ColumnMenuFactory.prototype, \"rowModel\", 2);\n__decorateClass12([\n Autowired510(\"filterManager\")\n], ColumnMenuFactory.prototype, \"filterManager\", 2);\n__decorateClass12([\n Autowired510(\"menuService\")\n], ColumnMenuFactory.prototype, \"menuService\", 2);\nColumnMenuFactory = __decorateClass12([\n Bean63(\"columnMenuFactory\")\n], ColumnMenuFactory);\nvar MenuUtils = class extends BeanStub73 {\n restoreFocusOnClose(restoreFocusParams, eComp, e, restoreIfMouseEvent) {\n const { eventSource } = restoreFocusParams;\n const isKeyboardEvent = e instanceof KeyboardEvent;\n if (!restoreIfMouseEvent && !isKeyboardEvent || !eventSource) {\n return;\n }\n const eDocument = this.gos.getDocument();\n const activeEl = this.gos.getActiveDomElement();\n if (!eComp.contains(activeEl) && activeEl !== eDocument.body) {\n return;\n }\n this.focusHeaderCell(restoreFocusParams);\n }\n closePopupAndRestoreFocusOnSelect(hidePopupFunc, restoreFocusParams, event) {\n let keyboardEvent;\n if (event && event.keyboardEvent) {\n keyboardEvent = event.keyboardEvent;\n }\n hidePopupFunc(keyboardEvent && { keyboardEvent });\n const focusedCell = this.focusService.getFocusedCell();\n const eDocument = this.gos.getDocument();\n const activeEl = this.gos.getActiveDomElement();\n if (!activeEl || activeEl === eDocument.body) {\n if (focusedCell) {\n const { rowIndex, rowPinned, column } = focusedCell;\n this.focusService.setFocusedCell({ rowIndex, column, rowPinned, forceBrowserFocus: true, preventScrollOnBrowserFocus: true });\n } else {\n this.focusHeaderCell(restoreFocusParams);\n }\n }\n }\n onContextMenu(mouseEvent, touchEvent, showMenuCallback) {\n if (!this.gos.get(\"allowContextMenuWithControlKey\")) {\n if (mouseEvent && (mouseEvent.ctrlKey || mouseEvent.metaKey)) {\n return;\n }\n }\n if (mouseEvent) {\n this.blockMiddleClickScrollsIfNeeded(mouseEvent);\n }\n if (this.gos.get(\"suppressContextMenu\")) {\n return;\n }\n const eventOrTouch = mouseEvent != null ? mouseEvent : touchEvent.touches[0];\n if (showMenuCallback(eventOrTouch)) {\n const event = mouseEvent != null ? mouseEvent : touchEvent;\n if (event && event.cancelable) {\n event.preventDefault();\n }\n }\n }\n focusHeaderCell(restoreFocusParams) {\n const { column, columnIndex, headerPosition, eventSource } = restoreFocusParams;\n const isColumnStillVisible = this.columnModel.getAllDisplayedColumns().some((col) => col === column);\n if (isColumnStillVisible && eventSource && _66.isVisible(eventSource)) {\n const focusableEl = this.focusService.findTabbableParent(eventSource);\n if (focusableEl) {\n if (column) {\n this.headerNavigationService.scrollToColumn(column);\n }\n focusableEl.focus();\n }\n } else if (headerPosition && columnIndex !== -1) {\n const allColumns = this.columnModel.getAllDisplayedColumns();\n const columnToFocus = allColumns[columnIndex] || _66.last(allColumns);\n if (columnToFocus) {\n this.focusService.focusHeaderPosition({\n headerPosition: {\n headerRowIndex: headerPosition.headerRowIndex,\n column: columnToFocus\n }\n });\n }\n }\n }\n blockMiddleClickScrollsIfNeeded(mouseEvent) {\n if (this.gos.get(\"suppressMiddleClickScrolls\") && mouseEvent.which === 2) {\n mouseEvent.preventDefault();\n }\n }\n};\n__decorateClass12([\n Autowired65(\"focusService\")\n], MenuUtils.prototype, \"focusService\", 2);\n__decorateClass12([\n Autowired65(\"headerNavigationService\")\n], MenuUtils.prototype, \"headerNavigationService\", 2);\n__decorateClass12([\n Autowired65(\"columnModel\")\n], MenuUtils.prototype, \"columnModel\", 2);\nMenuUtils = __decorateClass12([\n Bean72(\"menuUtils\")\n], MenuUtils);\nvar MenuModule = {\n version: VERSION12,\n moduleName: ModuleNames52.MenuModule,\n beans: [EnterpriseMenuFactory, ContextMenuFactory, MenuItemMapper, ChartMenuItemMapper, ColumnChooserFactory, ColumnMenuFactory, MenuUtils],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/multi-filter/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames13 } from \"ag-grid-community\";\nimport {\n ProvidedFilter,\n AgPromise as AgPromise5,\n Autowired as Autowired61,\n AgGroupComponent as AgGroupComponent5,\n TabGuardComp as TabGuardComp4,\n AgMenuItemComponent as AgMenuItemComponent4,\n AgMenuItemRenderer,\n PostConstruct as PostConstruct61,\n _ as _50,\n KeyCode as KeyCode10\n} from \"ag-grid-community\";\nimport {\n Component as Component56,\n _ as _216,\n Autowired as Autowired215,\n AgPromise as AgPromise23\n} from \"ag-grid-community\";\nvar __defProp13 = Object.defineProperty;\nvar __defProps8 = Object.defineProperties;\nvar __getOwnPropDesc13 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols11 = Object.getOwnPropertySymbols;\nvar __hasOwnProp12 = Object.prototype.hasOwnProperty;\nvar __propIsEnum11 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp11 = (obj, key, value) => key in obj ? __defProp13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues11 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp12.call(b, prop))\n __defNormalProp11(a, prop, b[prop]);\n if (__getOwnPropSymbols11)\n for (var prop of __getOwnPropSymbols11(b)) {\n if (__propIsEnum11.call(b, prop))\n __defNormalProp11(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps8 = (a, b) => __defProps8(a, __getOwnPropDescs8(b));\nvar __decorateClass13 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc13(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp13(target, key, result);\n return result;\n};\nvar _MultiFilter = class _MultiFilter2 extends TabGuardComp4 {\n constructor() {\n super(\n /* html */\n `
`\n );\n this.filterDefs = [];\n this.filters = [];\n this.guiDestroyFuncs = [];\n this.filterGuis = [];\n this.activeFilterIndices = [];\n this.lastActivatedMenuItem = null;\n this.afterFiltersReadyFuncs = [];\n }\n postConstruct() {\n this.initialiseTabGuard({\n onFocusIn: (e) => this.onFocusIn(e)\n });\n }\n static getFilterDefs(params) {\n const { filters } = params;\n return filters && filters.length > 0 ? filters : [{ filter: \"agTextColumnFilter\" }, { filter: \"agSetColumnFilter\" }];\n }\n init(params) {\n this.params = params;\n this.filterDefs = _MultiFilter2.getFilterDefs(params);\n const { column, filterChangedCallback } = params;\n this.column = column;\n this.filterChangedCallback = filterChangedCallback;\n const filterPromises = [];\n this.filterDefs.forEach((filterDef, index) => {\n const filterPromise = this.createFilter(filterDef, index);\n if (filterPromise != null) {\n filterPromises.push(filterPromise);\n }\n });\n return new AgPromise5((resolve) => {\n AgPromise5.all(filterPromises).then((filters) => {\n this.filters = filters;\n this.refreshGui(\"columnMenu\").then(() => {\n resolve();\n });\n });\n }).then(() => {\n this.afterFiltersReadyFuncs.forEach((f) => f());\n this.afterFiltersReadyFuncs.length = 0;\n });\n }\n refreshGui(container) {\n if (container === this.lastOpenedInContainer) {\n return AgPromise5.resolve();\n }\n this.removeAllChildrenExceptTabGuards();\n this.destroyChildren();\n return AgPromise5.all(this.filters.map((filter, index) => {\n const filterDef = this.filterDefs[index];\n const filterTitle = this.getFilterTitle(filter, filterDef);\n let filterGuiPromise;\n if (filterDef.display === \"subMenu\" && container !== \"toolPanel\") {\n filterGuiPromise = this.insertFilterMenu(filter, filterTitle).then((menuItem) => menuItem.getGui());\n } else if (filterDef.display === \"subMenu\" || filterDef.display === \"accordion\") {\n const group = this.insertFilterGroup(filter, filterTitle);\n filterGuiPromise = AgPromise5.resolve(group.getGui());\n } else {\n filterGuiPromise = AgPromise5.resolve(filter.getGui());\n }\n return filterGuiPromise;\n })).then((filterGuis) => {\n filterGuis.forEach((filterGui, index) => {\n if (index > 0) {\n this.appendChild(_50.loadTemplate(\n /* html */\n `
`\n ));\n }\n this.appendChild(filterGui);\n });\n this.filterGuis = filterGuis;\n this.lastOpenedInContainer = container;\n });\n }\n getFilterTitle(filter, filterDef) {\n if (filterDef.title != null) {\n return filterDef.title;\n }\n return filter instanceof ProvidedFilter ? filter.getFilterTitle() : \"Filter\";\n }\n destroyChildren() {\n this.guiDestroyFuncs.forEach((func) => func());\n this.guiDestroyFuncs.length = 0;\n this.filterGuis.length = 0;\n }\n insertFilterMenu(filter, name) {\n const menuItem = this.createBean(new AgMenuItemComponent4());\n return menuItem.init({\n menuItemDef: {\n name,\n subMenu: [],\n cssClasses: [\"ag-multi-filter-menu-item\"],\n menuItem: AgMenuItemRenderer,\n menuItemParams: {\n cssClassPrefix: \"ag-compact-menu-option\",\n isCompact: true\n }\n },\n level: 0,\n isAnotherSubMenuOpen: () => false,\n childComponent: filter,\n contextParams: {\n column: null,\n node: null,\n value: null\n }\n }).then(() => {\n menuItem.setParentComponent(this);\n this.guiDestroyFuncs.push(() => this.destroyBean(menuItem));\n this.addManagedListener(menuItem, AgMenuItemComponent4.EVENT_MENU_ITEM_ACTIVATED, (event) => {\n if (this.lastActivatedMenuItem && this.lastActivatedMenuItem !== event.menuItem) {\n this.lastActivatedMenuItem.deactivate();\n }\n this.lastActivatedMenuItem = event.menuItem;\n });\n const menuItemGui = menuItem.getGui();\n menuItem.addManagedListener(menuItemGui, \"keydown\", (e) => {\n const { key } = e;\n switch (key) {\n case KeyCode10.UP:\n case KeyCode10.RIGHT:\n case KeyCode10.DOWN:\n case KeyCode10.LEFT:\n e.preventDefault();\n if (key === KeyCode10.RIGHT) {\n menuItem.openSubMenu(true);\n }\n break;\n }\n });\n menuItem.addManagedListener(menuItemGui, \"focusin\", () => menuItem.activate());\n menuItem.addManagedListener(menuItemGui, \"focusout\", () => {\n if (!menuItem.isSubMenuOpen() && !menuItem.isSubMenuOpening()) {\n menuItem.deactivate();\n }\n });\n return menuItem;\n });\n }\n insertFilterGroup(filter, title) {\n const group = this.createBean(new AgGroupComponent5({\n title,\n cssIdentifier: \"multi-filter\"\n }));\n this.guiDestroyFuncs.push(() => this.destroyBean(group));\n group.addItem(filter.getGui());\n group.toggleGroupExpand(false);\n if (filter.afterGuiAttached) {\n group.addManagedListener(group, AgGroupComponent5.EVENT_EXPANDED, () => filter.afterGuiAttached({\n container: this.lastOpenedInContainer,\n suppressFocus: true,\n hidePopup: this.hidePopup\n }));\n }\n return group;\n }\n isFilterActive() {\n return this.filters.some((filter) => filter.isFilterActive());\n }\n getLastActiveFilterIndex() {\n return this.activeFilterIndices.length > 0 ? this.activeFilterIndices[this.activeFilterIndices.length - 1] : null;\n }\n doesFilterPass(params, filterToSkip) {\n let rowPasses = true;\n this.filters.forEach((filter) => {\n if (!rowPasses || filter === filterToSkip || !filter.isFilterActive()) {\n return;\n }\n rowPasses = filter.doesFilterPass(params);\n });\n return rowPasses;\n }\n getFilterType() {\n return \"multi\";\n }\n getModelFromUi() {\n const model = {\n filterType: this.getFilterType(),\n filterModels: this.filters.map((filter) => {\n const providedFilter = filter;\n if (typeof providedFilter.getModelFromUi === \"function\") {\n return providedFilter.getModelFromUi();\n }\n return null;\n })\n };\n return model;\n }\n getModel() {\n if (!this.isFilterActive()) {\n return null;\n }\n const model = {\n filterType: this.getFilterType(),\n filterModels: this.filters.map((filter) => {\n if (filter.isFilterActive()) {\n return filter.getModel();\n }\n return null;\n })\n };\n return model;\n }\n setModel(model) {\n const setFilterModel = (filter, filterModel) => {\n return new AgPromise5((resolve) => {\n const promise = filter.setModel(filterModel);\n promise ? promise.then(() => resolve()) : resolve();\n });\n };\n let promises = [];\n if (model == null) {\n promises = this.filters.map((filter, index) => {\n const res = setFilterModel(filter, null).then(() => {\n this.updateActiveList(index);\n });\n return res;\n });\n } else {\n this.filters.forEach((filter, index) => {\n const filterModel = model.filterModels.length > index ? model.filterModels[index] : null;\n const res = setFilterModel(filter, filterModel).then(() => {\n this.updateActiveList(index);\n });\n promises.push(res);\n });\n }\n return AgPromise5.all(promises).then(() => {\n });\n }\n applyModel(source = \"api\") {\n let result = false;\n this.filters.forEach((filter) => {\n if (filter instanceof ProvidedFilter) {\n result = filter.applyModel(source) || result;\n }\n });\n return result;\n }\n getChildFilterInstance(index) {\n return this.filters[index];\n }\n afterGuiAttached(params) {\n let refreshPromise;\n if (params) {\n this.hidePopup = params.hidePopup;\n refreshPromise = this.refreshGui(params.container);\n } else {\n this.hidePopup = void 0;\n refreshPromise = AgPromise5.resolve();\n }\n refreshPromise.then(() => {\n const { filterDefs } = this;\n let hasFocused = false;\n if (filterDefs) {\n _50.forEachReverse(filterDefs, (filterDef, index) => {\n var _a;\n const isFirst = index === 0;\n const suppressFocus = !isFirst || filterDef.display !== \"inline\";\n const afterGuiAttachedParams = __spreadProps8(__spreadValues11({}, params != null ? params : {}), { suppressFocus });\n const filter = (_a = this.filters) == null ? void 0 : _a[index];\n if (filter) {\n this.executeFunctionIfExistsOnFilter(filter, \"afterGuiAttached\", afterGuiAttachedParams);\n if (isFirst) {\n hasFocused = true;\n }\n }\n if (isFirst && suppressFocus) {\n const filterGui = this.filterGuis[index];\n if (filterGui) {\n filterGui.focus();\n hasFocused = true;\n }\n }\n });\n }\n const eDocument = this.gos.getDocument();\n const activeEl = this.gos.getActiveDomElement();\n if (!hasFocused && (!activeEl || activeEl === eDocument.body || this.getGui().contains(activeEl))) {\n this.forceFocusOutOfContainer(true);\n }\n });\n }\n afterGuiDetached() {\n this.executeFunctionIfExists(\"afterGuiDetached\");\n }\n onAnyFilterChanged() {\n this.executeFunctionIfExists(\"onAnyFilterChanged\");\n }\n onNewRowsLoaded() {\n this.executeFunctionIfExists(\"onNewRowsLoaded\");\n }\n destroy() {\n this.filters.forEach((filter) => this.destroyBean(filter));\n this.filters.length = 0;\n this.destroyChildren();\n this.hidePopup = void 0;\n super.destroy();\n }\n executeFunctionIfExists(name, ...params) {\n _50.forEachReverse(this.filters, (filter) => {\n this.executeFunctionIfExistsOnFilter(filter, name, params);\n });\n }\n executeFunctionIfExistsOnFilter(filter, name, ...params) {\n const func = filter[name];\n if (typeof func === \"function\") {\n func.apply(filter, params);\n }\n }\n createFilter(filterDef, index) {\n const { filterModifiedCallback, doesRowPassOtherFilter } = this.params;\n let filterInstance;\n const filterParams = __spreadProps8(__spreadValues11({}, this.filterManager.createFilterParams(this.column, this.column.getColDef())), {\n filterModifiedCallback,\n filterChangedCallback: (additionalEventAttributes) => {\n this.executeWhenAllFiltersReady(() => this.filterChanged(index, additionalEventAttributes));\n },\n doesRowPassOtherFilter: (node) => doesRowPassOtherFilter(node) && this.doesFilterPass({ node, data: node.data }, filterInstance)\n });\n const compDetails = this.userComponentFactory.getFilterDetails(filterDef, filterParams, \"agTextColumnFilter\");\n if (!compDetails) {\n return null;\n }\n const filterPromise = compDetails.newAgStackInstance();\n if (filterPromise) {\n filterPromise.then((filter) => filterInstance = filter);\n }\n return filterPromise;\n }\n executeWhenAllFiltersReady(action) {\n if (this.filters && this.filters.length > 0) {\n action();\n } else {\n this.afterFiltersReadyFuncs.push(action);\n }\n }\n updateActiveList(index) {\n const changedFilter = this.filters[index];\n _50.removeFromArray(this.activeFilterIndices, index);\n if (changedFilter.isFilterActive()) {\n this.activeFilterIndices.push(index);\n }\n }\n filterChanged(index, additionalEventAttributes) {\n this.updateActiveList(index);\n this.filterChangedCallback(additionalEventAttributes);\n const changedFilter = this.filters[index];\n this.filters.forEach((filter) => {\n if (filter === changedFilter) {\n return;\n }\n if (typeof filter.onAnyFilterChanged === \"function\") {\n filter.onAnyFilterChanged();\n }\n });\n }\n onFocusIn(e) {\n if (this.lastActivatedMenuItem != null && !this.lastActivatedMenuItem.getGui().contains(e.target)) {\n this.lastActivatedMenuItem.deactivate();\n this.lastActivatedMenuItem = null;\n }\n }\n getModelAsString(model) {\n var _a, _b, _c, _d;\n if (!this.filters || !((_a = model == null ? void 0 : model.filterModels) == null ? void 0 : _a.length)) {\n return \"\";\n }\n const lastActiveIndex = (_b = this.getLastActiveFilterIndex()) != null ? _b : 0;\n const activeFilter = this.filters[lastActiveIndex];\n return (_d = (_c = activeFilter.getModelAsString) == null ? void 0 : _c.call(activeFilter, model.filterModels[lastActiveIndex])) != null ? _d : \"\";\n }\n};\n__decorateClass13([\n Autowired61(\"filterManager\")\n], _MultiFilter.prototype, \"filterManager\", 2);\n__decorateClass13([\n Autowired61(\"userComponentFactory\")\n], _MultiFilter.prototype, \"userComponentFactory\", 2);\n__decorateClass13([\n PostConstruct61\n], _MultiFilter.prototype, \"postConstruct\", 1);\nvar MultiFilter = _MultiFilter;\nvar MultiFloatingFilterComp = class extends Component56 {\n constructor() {\n super(\n /* html */\n `
`\n );\n this.floatingFilters = [];\n this.compDetailsList = [];\n }\n init(params) {\n this.params = params;\n const { compDetailsList } = this.getCompDetailsList(params);\n return this.setParams(compDetailsList);\n }\n setParams(compDetailsList) {\n const floatingFilterPromises = [];\n compDetailsList.forEach((compDetails) => {\n const floatingFilterPromise = compDetails == null ? void 0 : compDetails.newAgStackInstance();\n if (floatingFilterPromise != null) {\n this.compDetailsList.push(compDetails);\n floatingFilterPromises.push(floatingFilterPromise);\n }\n });\n return AgPromise23.all(floatingFilterPromises).then((floatingFilters) => {\n floatingFilters.forEach((floatingFilter, index) => {\n this.floatingFilters.push(floatingFilter);\n const gui = floatingFilter.getGui();\n this.appendChild(gui);\n if (index > 0) {\n _216.setDisplayed(gui, false);\n }\n });\n });\n }\n onParamsUpdated(params) {\n this.refresh(params);\n }\n refresh(params) {\n this.params = params;\n const { compDetailsList: newCompDetailsList, floatingFilterParamsList } = this.getCompDetailsList(params);\n const allFloatingFilterCompsUnchanged = newCompDetailsList.length === this.compDetailsList.length && newCompDetailsList.every((newCompDetails, index) => !this.filterManager.areFilterCompsDifferent(this.compDetailsList[index], newCompDetails));\n if (allFloatingFilterCompsUnchanged) {\n floatingFilterParamsList.forEach((floatingFilterParams, index) => {\n var _a;\n const floatingFilter = this.floatingFilters[index];\n let hasRefreshed = false;\n if (floatingFilter.refresh) {\n const result = floatingFilter.refresh(floatingFilterParams);\n if (result !== null) {\n hasRefreshed = true;\n }\n }\n if (!hasRefreshed) {\n (_a = floatingFilter.onParamsUpdated) == null ? void 0 : _a.call(floatingFilter, floatingFilterParams);\n }\n });\n } else {\n _216.clearElement(this.getGui());\n this.destroyBeans(this.floatingFilters);\n this.floatingFilters = [];\n this.compDetailsList = [];\n this.setParams(newCompDetailsList);\n }\n }\n getCompDetailsList(params) {\n const compDetailsList = [];\n const floatingFilterParamsList = [];\n const filterParams = params.filterParams;\n MultiFilter.getFilterDefs(filterParams).forEach((filterDef, index) => {\n const floatingFilterParams = __spreadProps8(__spreadValues11({}, params), {\n // set the parent filter instance for each floating filter to the relevant child filter instance\n parentFilterInstance: (callback) => {\n this.parentMultiFilterInstance((parent) => {\n const child = parent.getChildFilterInstance(index);\n if (child == null) {\n return;\n }\n callback(child);\n });\n }\n });\n _216.mergeDeep(floatingFilterParams.filterParams, filterDef.filterParams);\n const compDetails = this.getCompDetails(filterDef, floatingFilterParams);\n if (compDetails) {\n compDetailsList.push(compDetails);\n floatingFilterParamsList.push(floatingFilterParams);\n }\n });\n return { compDetailsList, floatingFilterParamsList };\n }\n onParentModelChanged(model, event) {\n if (event && event.afterFloatingFilter) {\n return;\n }\n this.parentMultiFilterInstance((parent) => {\n if (model == null) {\n this.floatingFilters.forEach((filter, i) => {\n filter.onParentModelChanged(null, event);\n _216.setDisplayed(filter.getGui(), i === 0);\n });\n } else {\n const lastActiveFloatingFilterIndex = parent.getLastActiveFilterIndex();\n this.floatingFilters.forEach((filter, i) => {\n const filterModel = model.filterModels.length > i ? model.filterModels[i] : null;\n filter.onParentModelChanged(filterModel, event);\n const shouldShow = lastActiveFloatingFilterIndex == null ? i === 0 : i === lastActiveFloatingFilterIndex;\n _216.setDisplayed(filter.getGui(), shouldShow);\n });\n }\n });\n }\n destroy() {\n this.destroyBeans(this.floatingFilters);\n this.floatingFilters.length = 0;\n super.destroy();\n }\n getCompDetails(filterDef, params) {\n var _a;\n let defaultComponentName = (_a = this.userComponentFactory.getDefaultFloatingFilterType(\n filterDef,\n () => this.filterManager.getDefaultFloatingFilter(this.params.column)\n )) != null ? _a : \"agReadOnlyFloatingFilter\";\n return this.userComponentFactory.getFloatingFilterCompDetails(filterDef, params, defaultComponentName);\n }\n parentMultiFilterInstance(cb) {\n this.params.parentFilterInstance((parent) => {\n if (!(parent instanceof MultiFilter)) {\n throw new Error(\"AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent\");\n }\n cb(parent);\n });\n }\n};\n__decorateClass13([\n Autowired215(\"userComponentFactory\")\n], MultiFloatingFilterComp.prototype, \"userComponentFactory\", 2);\n__decorateClass13([\n Autowired215(\"filterManager\")\n], MultiFloatingFilterComp.prototype, \"filterManager\", 2);\nvar VERSION13 = \"31.3.2\";\nvar MultiFilterModule = {\n version: VERSION13,\n moduleName: ModuleNames13.MultiFilterModule,\n beans: [],\n userComponents: [\n { componentName: \"agMultiColumnFilter\", componentClass: MultiFilter },\n { componentName: \"agMultiColumnFloatingFilter\", componentClass: MultiFloatingFilterComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/rich-select/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames14 } from \"ag-grid-community\";\nimport {\n AgRichSelect as AgRichSelect3,\n Events as Events18,\n PopupComponent,\n _ as _51\n} from \"ag-grid-community\";\nvar RichSelectCellEditor = class extends PopupComponent {\n constructor() {\n super(\n /* html */\n `
`\n );\n }\n init(params) {\n this.params = params;\n const { cellStartedEdit, cellHeight, values } = params;\n if (_51.missing(values)) {\n console.warn(\"AG Grid: agRichSelectCellEditor requires cellEditorParams.values to be set\");\n }\n const { params: richSelectParams, valuesPromise } = this.buildRichSelectParams();\n this.richSelect = this.createManagedBean(new AgRichSelect3(richSelectParams));\n this.richSelect.addCssClass(\"ag-cell-editor\");\n this.appendChild(this.richSelect);\n if (valuesPromise) {\n valuesPromise.then((values2) => {\n this.richSelect.setValueList({ valueList: values2, refresh: true });\n const searchStringCallback = this.getSearchStringCallback(values2);\n if (searchStringCallback) {\n this.richSelect.setSearchStringCreator(searchStringCallback);\n }\n });\n }\n this.addManagedListener(this.richSelect, Events18.EVENT_FIELD_PICKER_VALUE_SELECTED, this.onEditorPickerValueSelected.bind(this));\n this.addManagedListener(this.richSelect.getGui(), \"focusout\", this.onEditorFocusOut.bind(this));\n this.focusAfterAttached = cellStartedEdit;\n if (_51.exists(cellHeight)) {\n this.richSelect.setRowHeight(cellHeight);\n }\n }\n onEditorPickerValueSelected(e) {\n this.params.stopEditing(!e.fromEnterKey);\n }\n onEditorFocusOut(e) {\n if (this.richSelect.getGui().contains(e.relatedTarget)) {\n return;\n }\n this.params.stopEditing(true);\n }\n buildRichSelectParams() {\n const {\n cellRenderer,\n value,\n values,\n formatValue,\n searchDebounceDelay,\n valueListGap,\n valueListMaxHeight,\n valueListMaxWidth,\n allowTyping,\n filterList,\n searchType,\n highlightMatch,\n valuePlaceholder,\n eventKey\n } = this.params;\n const ret = {\n value,\n cellRenderer,\n searchDebounceDelay,\n valueFormatter: formatValue,\n pickerAriaLabelKey: \"ariaLabelRichSelectField\",\n pickerAriaLabelValue: \"Rich Select Field\",\n pickerType: \"virtual-list\",\n pickerGap: valueListGap,\n allowTyping,\n filterList,\n searchType,\n highlightMatch,\n maxPickerHeight: valueListMaxHeight,\n maxPickerWidth: valueListMaxWidth,\n placeholder: valuePlaceholder,\n initialInputValue: (eventKey == null ? void 0 : eventKey.length) === 1 ? eventKey : void 0\n };\n let valuesResult;\n let valuesPromise;\n if (typeof values === \"function\") {\n valuesResult = values(this.params);\n } else {\n valuesResult = values != null ? values : [];\n }\n if (Array.isArray(valuesResult)) {\n ret.valueList = valuesResult;\n ret.searchStringCreator = this.getSearchStringCallback(valuesResult);\n } else {\n valuesPromise = valuesResult;\n }\n return { params: ret, valuesPromise };\n }\n getSearchStringCallback(values) {\n const { colDef } = this.params;\n if (typeof values[0] !== \"object\" || !colDef.keyCreator) {\n return;\n }\n return (values2) => values2.map((value) => {\n const keyParams = this.gos.addGridCommonParams({\n value,\n colDef: this.params.colDef,\n column: this.params.column,\n node: this.params.node,\n data: this.params.data\n });\n return colDef.keyCreator(keyParams);\n });\n }\n // we need to have the gui attached before we can draw the virtual rows, as the\n // virtual row logic needs info about the gui state\n afterGuiAttached() {\n const { focusAfterAttached, params } = this;\n setTimeout(() => {\n if (!this.isAlive()) {\n return;\n }\n if (focusAfterAttached) {\n const focusableEl = this.richSelect.getFocusableElement();\n focusableEl.focus();\n const { allowTyping, eventKey: eventKey2 } = this.params;\n if (allowTyping && (!eventKey2 || eventKey2.length !== 1)) {\n focusableEl.select();\n }\n }\n this.richSelect.showPicker();\n const { eventKey } = params;\n if (eventKey) {\n if ((eventKey == null ? void 0 : eventKey.length) === 1) {\n this.richSelect.searchTextFromString(eventKey);\n }\n }\n });\n }\n getValue() {\n return this.richSelect.getValue();\n }\n isPopup() {\n return false;\n }\n};\nvar VERSION14 = \"31.3.2\";\nvar RichSelectModule = {\n version: VERSION14,\n moduleName: ModuleNames14.RichSelectModule,\n beans: [],\n userComponents: [\n { componentName: \"agRichSelect\", componentClass: RichSelectCellEditor },\n { componentName: \"agRichSelectCellEditor\", componentClass: RichSelectCellEditor }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/server-side-row-model/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames26 } from \"ag-grid-community\";\nimport {\n _ as _314,\n Autowired as Autowired511,\n Bean as Bean28,\n BeanStub as BeanStub45,\n Events as Events37,\n NumberSequence as NumberSequence4,\n PostConstruct as PostConstruct510,\n PreDestroy as PreDestroy4,\n RowNode as RowNode5,\n Optional as Optional6,\n ModuleRegistry as ModuleRegistry6,\n ModuleNames as ModuleNames15\n} from \"ag-grid-community\";\nimport {\n _ as _57,\n Autowired as Autowired66,\n Events as Events19,\n NumberSequence,\n PostConstruct as PostConstruct64,\n PreDestroy as PreDestroy5,\n RowNodeBlock,\n ServerSideTransactionResultStatus\n} from \"ag-grid-community\";\nimport {\n _ as _217,\n Autowired as Autowired415,\n BeanStub as BeanStub35,\n Events as Events29,\n NumberSequence as NumberSequence3,\n PostConstruct as PostConstruct413,\n PreDestroy as PreDestroy32,\n ServerSideTransactionResultStatus as ServerSideTransactionResultStatus2\n} from \"ag-grid-community\";\nimport { Autowired as Autowired315, BeanStub as BeanStub28, PostConstruct as PostConstruct314, PreDestroy as PreDestroy22 } from \"ag-grid-community\";\nimport { Autowired as Autowired216, Bean as Bean14, BeanStub as BeanStub21, PostConstruct as PostConstruct215, RowNodeBlockLoader as RowNodeBlockLoader2 } from \"ag-grid-community\";\nimport {\n _ as _411,\n Autowired as Autowired67,\n Bean as Bean35,\n BeanStub as BeanStub55\n} from \"ag-grid-community\";\nimport {\n _ as _58,\n Autowired as Autowired75,\n Bean as Bean45,\n BeanStub as BeanStub65,\n RowNode as RowNode7\n} from \"ag-grid-community\";\nimport { Bean as Bean54, PreDestroy as PreDestroy52 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired85,\n Bean as Bean64,\n BeanStub as BeanStub74,\n Events as Events46,\n PostConstruct as PostConstruct74,\n ServerSideTransactionResultStatus as ServerSideTransactionResultStatus3\n} from \"ag-grid-community\";\nimport {\n _ as _67,\n Autowired as Autowired94,\n BeanStub as BeanStub82,\n Events as Events55,\n PostConstruct as PostConstruct83,\n RowNode as RowNode10,\n Bean as Bean73\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired104,\n Bean as Bean82,\n BeanStub as BeanStub92,\n Events as Events65,\n PostConstruct as PostConstruct93\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired113,\n Bean as Bean92,\n BeanStub as BeanStub102,\n Events as Events75,\n PostConstruct as PostConstruct103\n} from \"ag-grid-community\";\nimport {\n _ as _85,\n Autowired as Autowired123,\n Bean as Bean102\n} from \"ag-grid-community\";\nimport { Autowired as Autowired133, Bean as Bean112 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired162,\n Bean as Bean122,\n BeanStub as BeanStub132,\n Events as Events102,\n PostConstruct as PostConstruct133\n} from \"ag-grid-community\";\nimport { Autowired as Autowired142, BeanStub as BeanStub112, Events as Events84, PostConstruct as PostConstruct113 } from \"ag-grid-community\";\nimport { Autowired as Autowired152, BeanStub as BeanStub122, PostConstruct as PostConstruct123, Events as Events93 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired172,\n Bean as Bean132,\n Events as Events112,\n ExpansionService\n} from \"ag-grid-community\";\nvar __defProp14 = Object.defineProperty;\nvar __defProps9 = Object.defineProperties;\nvar __getOwnPropDesc14 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropDescs9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols12 = Object.getOwnPropertySymbols;\nvar __hasOwnProp13 = Object.prototype.hasOwnProperty;\nvar __propIsEnum12 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp12 = (obj, key, value) => key in obj ? __defProp14(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues12 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp13.call(b, prop))\n __defNormalProp12(a, prop, b[prop]);\n if (__getOwnPropSymbols12)\n for (var prop of __getOwnPropSymbols12(b)) {\n if (__propIsEnum12.call(b, prop))\n __defNormalProp12(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps9 = (a, b) => __defProps9(a, __getOwnPropDescs9(b));\nvar __objRest2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp13.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols12)\n for (var prop of __getOwnPropSymbols12(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum12.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nvar __decorateClass14 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc14(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp14(target, key, result);\n return result;\n};\nvar FullStore = class extends RowNodeBlock {\n constructor(ssrmParams, storeParams, parentRowNode) {\n super(0);\n this.nodeIdSequence = new NumberSequence();\n this.info = {};\n this.ssrmParams = ssrmParams;\n this.parentRowNode = parentRowNode;\n this.level = parentRowNode.level + 1;\n this.groupLevel = ssrmParams.rowGroupCols ? this.level < ssrmParams.rowGroupCols.length : void 0;\n this.leafGroup = ssrmParams.rowGroupCols ? this.level === ssrmParams.rowGroupCols.length - 1 : false;\n }\n postConstruct() {\n this.usingTreeData = this.gos.get(\"treeData\");\n this.nodeIdPrefix = this.blockUtils.createNodeIdPrefix(this.parentRowNode);\n if (!this.usingTreeData && this.groupLevel) {\n const groupColVo = this.ssrmParams.rowGroupCols[this.level];\n this.groupField = groupColVo.field;\n this.rowGroupColumn = this.columnModel.getRowGroupColumns()[this.level];\n }\n let initialRowCount = 1;\n const isRootStore = this.parentRowNode.level === -1;\n const userInitialRowCount = this.storeUtils.getServerSideInitialRowCount();\n if (isRootStore && userInitialRowCount != null) {\n initialRowCount = userInitialRowCount;\n }\n this.initialiseRowNodes(initialRowCount);\n this.rowNodeBlockLoader.addBlock(this);\n this.addDestroyFunc(() => this.rowNodeBlockLoader.removeBlock(this));\n this.postSortFunc = this.gos.getCallback(\"postSortRows\");\n if (userInitialRowCount != null) {\n this.eventService.dispatchEventOnce({\n type: Events19.EVENT_ROW_COUNT_READY\n });\n }\n }\n destroyRowNodes() {\n this.blockUtils.destroyRowNodes(this.allRowNodes);\n this.allRowNodes = [];\n this.nodesAfterSort = [];\n this.nodesAfterFilter = [];\n this.allNodesMap = {};\n }\n initialiseRowNodes(loadingRowsCount, failedLoad = false) {\n this.destroyRowNodes();\n for (let i = 0; i < loadingRowsCount; i++) {\n const loadingRowNode = this.blockUtils.createRowNode(\n {\n field: this.groupField,\n group: this.groupLevel,\n leafGroup: this.leafGroup,\n level: this.level,\n parent: this.parentRowNode,\n rowGroupColumn: this.rowGroupColumn\n }\n );\n if (failedLoad) {\n loadingRowNode.failedLoad = true;\n }\n this.allRowNodes.push(loadingRowNode);\n this.nodesAfterFilter.push(loadingRowNode);\n this.nodesAfterSort.push(loadingRowNode);\n }\n }\n getBlockStateJson() {\n return {\n id: this.nodeIdPrefix ? this.nodeIdPrefix : \"\",\n state: this.getState()\n };\n }\n loadFromDatasource() {\n this.storeUtils.loadFromDatasource({\n startRow: void 0,\n endRow: void 0,\n parentBlock: this,\n parentNode: this.parentRowNode,\n storeParams: this.ssrmParams,\n success: this.success.bind(this, this.getVersion()),\n fail: this.pageLoadFailed.bind(this, this.getVersion())\n });\n }\n getStartRow() {\n return 0;\n }\n getEndRow() {\n return this.nodesAfterSort.length;\n }\n createDataNode(data, index) {\n const rowNode = this.blockUtils.createRowNode(\n {\n field: this.groupField,\n group: this.groupLevel,\n leafGroup: this.leafGroup,\n level: this.level,\n parent: this.parentRowNode,\n rowGroupColumn: this.rowGroupColumn\n }\n );\n if (index != null) {\n _57.insertIntoArray(this.allRowNodes, rowNode, index);\n } else {\n this.allRowNodes.push(rowNode);\n }\n const defaultId = this.prefixId(this.nodeIdSequence.next());\n this.blockUtils.setDataIntoRowNode(rowNode, data, defaultId, void 0);\n this.nodeManager.addRowNode(rowNode);\n this.blockUtils.checkOpenByDefault(rowNode);\n this.allNodesMap[rowNode.id] = rowNode;\n return rowNode;\n }\n prefixId(id) {\n if (this.nodeIdPrefix) {\n return this.nodeIdPrefix + \"-\" + id;\n } else {\n return id.toString();\n }\n }\n processServerFail() {\n this.initialiseRowNodes(1, true);\n this.fireStoreUpdatedEvent();\n this.flushAsyncTransactions();\n }\n processServerResult(params) {\n if (!this.isAlive()) {\n return;\n }\n const info = params.groupLevelInfo;\n if (info) {\n Object.assign(this.info, info);\n }\n if (params.pivotResultFields) {\n this.serverSideRowModel.generateSecondaryColumns(params.pivotResultFields);\n }\n const nodesToRecycle = this.allRowNodes.length > 0 ? this.allNodesMap : void 0;\n this.allRowNodes = [];\n this.nodesAfterSort = [];\n this.nodesAfterFilter = [];\n this.allNodesMap = {};\n if (!params.rowData) {\n _57.warnOnce('\"params.data\" is missing from Server-Side Row Model success() callback. Please use the \"data\" attribute. If no data is returned, set an empty list.');\n }\n this.createOrRecycleNodes(nodesToRecycle, params.rowData);\n if (nodesToRecycle) {\n this.blockUtils.destroyRowNodes(_57.getAllValuesInObject(nodesToRecycle));\n }\n if (this.level === 0) {\n this.eventService.dispatchEventOnce({\n type: Events19.EVENT_ROW_COUNT_READY\n });\n }\n this.filterAndSortNodes();\n this.fireStoreUpdatedEvent();\n this.flushAsyncTransactions();\n }\n createOrRecycleNodes(nodesToRecycle, rowData) {\n if (!rowData) {\n return;\n }\n const lookupNodeToRecycle = (data) => {\n if (!nodesToRecycle) {\n return void 0;\n }\n const getRowIdFunc = this.gos.getCallback(\"getRowId\");\n if (!getRowIdFunc) {\n return void 0;\n }\n const parentKeys = this.parentRowNode.getGroupKeys();\n const level = this.level;\n const id = getRowIdFunc({\n data,\n parentKeys: parentKeys.length > 0 ? parentKeys : void 0,\n level\n });\n const foundNode = nodesToRecycle[id];\n if (!foundNode) {\n return void 0;\n }\n delete nodesToRecycle[id];\n return foundNode;\n };\n const recycleNode = (rowNode, dataItem) => {\n this.allNodesMap[rowNode.id] = rowNode;\n this.blockUtils.updateDataIntoRowNode(rowNode, dataItem);\n this.allRowNodes.push(rowNode);\n };\n rowData.forEach((dataItem) => {\n const nodeToRecycle = lookupNodeToRecycle(dataItem);\n if (nodeToRecycle) {\n recycleNode(nodeToRecycle, dataItem);\n } else {\n this.createDataNode(dataItem);\n }\n });\n }\n flushAsyncTransactions() {\n window.setTimeout(() => this.transactionManager.flushAsyncTransactions(), 0);\n }\n filterAndSortNodes() {\n this.filterRowNodes();\n this.sortRowNodes();\n }\n sortRowNodes() {\n const serverIsSorting = this.storeUtils.isServerSideSortAllLevels() || this.storeUtils.isServerSideSortOnServer();\n const sortOptions = this.sortController.getSortOptions();\n const noSortApplied = !sortOptions || sortOptions.length == 0;\n if (serverIsSorting || noSortApplied) {\n this.nodesAfterSort = this.nodesAfterFilter;\n return;\n }\n this.nodesAfterSort = this.rowNodeSorter.doFullSort(this.nodesAfterFilter, sortOptions);\n if (this.postSortFunc) {\n const params = { nodes: this.nodesAfterSort };\n this.postSortFunc(params);\n }\n }\n filterRowNodes() {\n const serverIsFiltering = !this.storeUtils.isServerSideOnlyRefreshFilteredGroups() || this.storeUtils.isServerSideFilterOnServer();\n const groupLevel = this.groupLevel;\n if (serverIsFiltering || groupLevel) {\n this.nodesAfterFilter = this.allRowNodes;\n return;\n }\n this.nodesAfterFilter = this.allRowNodes.filter(\n (rowNode) => this.filterManager.doesRowPassFilter({ rowNode })\n );\n }\n clearDisplayIndexes() {\n this.displayIndexStart = void 0;\n this.displayIndexEnd = void 0;\n this.allRowNodes.forEach((rowNode) => this.blockUtils.clearDisplayIndex(rowNode));\n }\n getDisplayIndexEnd() {\n return this.displayIndexEnd;\n }\n isDisplayIndexInStore(displayIndex) {\n if (this.getRowCount() === 0) {\n return false;\n }\n return displayIndex >= this.displayIndexStart && displayIndex < this.displayIndexEnd;\n }\n setDisplayIndexes(displayIndexSeq, nextRowTop) {\n this.displayIndexStart = displayIndexSeq.peek();\n this.topPx = nextRowTop.value;\n const visibleNodeIds = {};\n this.nodesAfterSort.forEach((rowNode) => {\n this.blockUtils.setDisplayIndex(rowNode, displayIndexSeq, nextRowTop);\n visibleNodeIds[rowNode.id] = true;\n });\n this.allRowNodes.forEach((rowNode) => {\n if (!visibleNodeIds[rowNode.id]) {\n this.blockUtils.clearDisplayIndex(rowNode);\n }\n });\n this.displayIndexEnd = displayIndexSeq.peek();\n this.heightPx = nextRowTop.value - this.topPx;\n }\n forEachStoreDeep(callback, sequence = new NumberSequence()) {\n callback(this, sequence.next());\n this.allRowNodes.forEach((rowNode) => {\n const childCache = rowNode.childStore;\n if (childCache) {\n childCache.forEachStoreDeep(callback, sequence);\n }\n });\n }\n forEachNodeDeep(callback, sequence = new NumberSequence()) {\n this.allRowNodes.forEach((rowNode) => {\n callback(rowNode, sequence.next());\n const childCache = rowNode.childStore;\n if (childCache) {\n childCache.forEachNodeDeep(callback, sequence);\n }\n });\n }\n forEachNodeDeepAfterFilterAndSort(callback, sequence = new NumberSequence(), includeFooterNodes = false) {\n this.nodesAfterSort.forEach((rowNode) => {\n callback(rowNode, sequence.next());\n const childCache = rowNode.childStore;\n if (childCache) {\n childCache.forEachNodeDeepAfterFilterAndSort(callback, sequence, includeFooterNodes);\n }\n });\n if (includeFooterNodes && this.parentRowNode.sibling) {\n callback(this.parentRowNode.sibling, sequence.next());\n }\n }\n getRowUsingDisplayIndex(displayRowIndex) {\n if (!this.isDisplayIndexInStore(displayRowIndex)) {\n return void 0;\n }\n const res = this.blockUtils.binarySearchForDisplayIndex(displayRowIndex, this.nodesAfterSort);\n return res;\n }\n getRowBounds(index) {\n for (let i = 0; i < this.nodesAfterSort.length; i++) {\n const rowNode = this.nodesAfterSort[i];\n const res = this.blockUtils.extractRowBounds(rowNode, index);\n if (res) {\n return res;\n }\n }\n return null;\n }\n isPixelInRange(pixel) {\n return pixel >= this.topPx && pixel < this.topPx + this.heightPx;\n }\n getRowIndexAtPixel(pixel) {\n const pixelBeforeThisStore = pixel <= this.topPx;\n if (pixelBeforeThisStore) {\n const firstNode = this.nodesAfterSort[0];\n return firstNode.rowIndex;\n }\n const pixelAfterThisStore = pixel >= this.topPx + this.heightPx;\n if (pixelAfterThisStore) {\n const lastRowNode = this.nodesAfterSort[this.nodesAfterSort.length - 1];\n const lastRowNodeBottomPx = lastRowNode.rowTop + lastRowNode.rowHeight;\n if (pixel >= lastRowNodeBottomPx && lastRowNode.expanded) {\n if (lastRowNode.childStore && lastRowNode.childStore.getRowCount() > 0) {\n return lastRowNode.childStore.getRowIndexAtPixel(pixel);\n }\n if (lastRowNode.detailNode) {\n return lastRowNode.detailNode.rowIndex;\n }\n }\n return lastRowNode.rowIndex;\n }\n let res = null;\n this.nodesAfterSort.forEach((rowNode) => {\n const res2 = this.blockUtils.getIndexAtPixel(rowNode, pixel);\n if (res2 != null) {\n res = res2;\n }\n });\n const pixelIsPastLastRow = res == null;\n if (pixelIsPastLastRow) {\n return this.displayIndexEnd - 1;\n }\n return res;\n }\n getChildStore(keys) {\n return this.storeUtils.getChildStore(keys, this, (key) => {\n const rowNode = this.allRowNodes.find((currentRowNode) => {\n return currentRowNode.key == key;\n });\n return rowNode;\n });\n }\n forEachChildStoreShallow(callback) {\n this.allRowNodes.forEach((rowNode) => {\n const childStore = rowNode.childStore;\n if (childStore) {\n callback(childStore);\n }\n });\n }\n refreshAfterFilter(params) {\n const serverIsFiltering = this.storeUtils.isServerSideFilterOnServer();\n const storeIsImpacted = this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params);\n const serverIsFilteringAllLevels = !this.storeUtils.isServerSideOnlyRefreshFilteredGroups();\n if (serverIsFilteringAllLevels || serverIsFiltering && storeIsImpacted) {\n this.refreshStore(true);\n this.sortRowNodes();\n return;\n }\n this.filterRowNodes();\n this.sortRowNodes();\n this.forEachChildStoreShallow((store) => store.refreshAfterFilter(params));\n }\n refreshAfterSort(params) {\n const serverIsSorting = this.storeUtils.isServerSideSortOnServer();\n const storeIsImpacted = this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params);\n const serverIsSortingAllLevels = this.storeUtils.isServerSideSortAllLevels();\n if (serverIsSortingAllLevels || serverIsSorting && storeIsImpacted) {\n this.refreshStore(true);\n this.filterRowNodes();\n return;\n }\n this.filterRowNodes();\n this.sortRowNodes();\n this.forEachChildStoreShallow((store) => store.refreshAfterSort(params));\n }\n applyTransaction(transaction) {\n switch (this.getState()) {\n case RowNodeBlock.STATE_FAILED:\n return { status: ServerSideTransactionResultStatus.StoreLoadingFailed };\n case RowNodeBlock.STATE_LOADING:\n return { status: ServerSideTransactionResultStatus.StoreLoading };\n case RowNodeBlock.STATE_WAITING_TO_LOAD:\n return { status: ServerSideTransactionResultStatus.StoreWaitingToLoad };\n }\n const applyCallback = this.gos.getCallback(\"isApplyServerSideTransaction\");\n if (applyCallback) {\n const params = {\n transaction,\n parentNode: this.parentRowNode,\n groupLevelInfo: this.info\n };\n const apply = applyCallback(params);\n if (!apply) {\n return { status: ServerSideTransactionResultStatus.Cancelled };\n }\n }\n const res = {\n status: ServerSideTransactionResultStatus.Applied,\n remove: [],\n update: [],\n add: []\n };\n const nodesToUnselect = [];\n this.executeAdd(transaction, res);\n this.executeRemove(transaction, res, nodesToUnselect);\n this.executeUpdate(transaction, res, nodesToUnselect);\n this.filterAndSortNodes();\n this.updateSelection(nodesToUnselect);\n return res;\n }\n updateSelection(nodesToUnselect) {\n const selectionChanged = nodesToUnselect.length > 0;\n if (selectionChanged) {\n this.selectionService.setNodesSelected({\n newValue: false,\n nodes: nodesToUnselect,\n suppressFinishActions: true,\n clearSelection: false,\n source: \"rowDataChanged\"\n });\n const event = {\n type: Events19.EVENT_SELECTION_CHANGED,\n source: \"rowDataChanged\"\n };\n this.eventService.dispatchEvent(event);\n }\n }\n executeAdd(rowDataTran, rowNodeTransaction) {\n const { add, addIndex } = rowDataTran;\n if (_57.missingOrEmpty(add)) {\n return;\n }\n const useIndex = typeof addIndex === \"number\" && addIndex >= 0;\n if (useIndex) {\n add.reverse().forEach((item) => {\n const newRowNode = this.createDataNode(item, addIndex);\n rowNodeTransaction.add.push(newRowNode);\n });\n } else {\n add.forEach((item) => {\n const newRowNode = this.createDataNode(item);\n rowNodeTransaction.add.push(newRowNode);\n });\n }\n }\n executeRemove(rowDataTran, rowNodeTransaction, nodesToUnselect) {\n const { remove } = rowDataTran;\n if (remove == null) {\n return;\n }\n const rowIdsRemoved = {};\n remove.forEach((item) => {\n const rowNode = this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n if (rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n rowNode.clearRowTopAndRowIndex();\n rowIdsRemoved[rowNode.id] = true;\n delete this.allNodesMap[rowNode.id];\n rowNodeTransaction.remove.push(rowNode);\n this.nodeManager.removeNode(rowNode);\n });\n this.allRowNodes = this.allRowNodes.filter((rowNode) => !rowIdsRemoved[rowNode.id]);\n }\n executeUpdate(rowDataTran, rowNodeTransaction, nodesToUnselect) {\n const { update } = rowDataTran;\n if (update == null) {\n return;\n }\n update.forEach((item) => {\n const rowNode = this.lookupRowNode(item);\n if (!rowNode) {\n return;\n }\n this.blockUtils.updateDataIntoRowNode(rowNode, item);\n if (!rowNode.selectable && rowNode.isSelected()) {\n nodesToUnselect.push(rowNode);\n }\n rowNodeTransaction.update.push(rowNode);\n });\n }\n lookupRowNode(data) {\n const getRowIdFunc = this.gos.getCallback(\"getRowId\");\n let rowNode;\n if (getRowIdFunc != null) {\n const level = this.level;\n const parentKeys = this.parentRowNode.getGroupKeys();\n const id = getRowIdFunc({\n data,\n parentKeys: parentKeys.length > 0 ? parentKeys : void 0,\n level\n });\n rowNode = this.allNodesMap[id];\n if (!rowNode) {\n console.error(`AG Grid: could not find row id=${id}, data item was not found for this id`);\n return null;\n }\n } else {\n rowNode = this.allRowNodes.find((currentRowNode) => currentRowNode.data === data);\n if (!rowNode) {\n console.error(`AG Grid: could not find data item as object was not found`, data);\n return null;\n }\n }\n return rowNode;\n }\n addStoreStates(result) {\n result.push({\n suppressInfiniteScroll: true,\n route: this.parentRowNode.getGroupKeys(),\n rowCount: this.allRowNodes.length,\n info: this.info\n });\n this.forEachChildStoreShallow((childStore) => childStore.addStoreStates(result));\n }\n refreshStore(purge) {\n if (purge) {\n const loadingRowsToShow = this.nodesAfterSort ? this.nodesAfterSort.length : 1;\n this.initialiseRowNodes(loadingRowsToShow);\n }\n this.scheduleLoad();\n this.fireStoreUpdatedEvent();\n }\n retryLoads() {\n if (this.getState() === RowNodeBlock.STATE_FAILED) {\n this.initialiseRowNodes(1);\n this.scheduleLoad();\n }\n this.forEachChildStoreShallow((store) => store.retryLoads());\n }\n scheduleLoad() {\n this.setStateWaitingToLoad();\n this.rowNodeBlockLoader.checkBlockToLoad();\n }\n // gets called 1) row count changed 2) cache purged 3) items inserted\n fireStoreUpdatedEvent() {\n const event = {\n type: Events19.EVENT_STORE_UPDATED\n };\n this.eventService.dispatchEvent(event);\n }\n getRowCount() {\n return this.nodesAfterSort.length;\n }\n getTopLevelRowDisplayedIndex(topLevelIndex) {\n const rowNode = this.nodesAfterSort[topLevelIndex];\n return rowNode.rowIndex;\n }\n isLastRowIndexKnown() {\n return this.getState() == RowNodeBlock.STATE_LOADED;\n }\n getRowNodesInRange(firstInRange, lastInRange) {\n const result = [];\n let inActiveRange = false;\n if (_57.missing(firstInRange)) {\n inActiveRange = true;\n }\n this.nodesAfterSort.forEach((rowNode) => {\n const hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;\n if (inActiveRange || hitFirstOrLast) {\n result.push(rowNode);\n }\n if (hitFirstOrLast) {\n inActiveRange = !inActiveRange;\n }\n });\n const invalidRange = inActiveRange;\n return invalidRange ? [] : result;\n }\n getStoreBounds() {\n return {\n topPx: this.topPx,\n heightPx: this.heightPx\n };\n }\n};\n__decorateClass14([\n Autowired66(\"ssrmStoreUtils\")\n], FullStore.prototype, \"storeUtils\", 2);\n__decorateClass14([\n Autowired66(\"ssrmBlockUtils\")\n], FullStore.prototype, \"blockUtils\", 2);\n__decorateClass14([\n Autowired66(\"columnModel\")\n], FullStore.prototype, \"columnModel\", 2);\n__decorateClass14([\n Autowired66(\"rowNodeBlockLoader\")\n], FullStore.prototype, \"rowNodeBlockLoader\", 2);\n__decorateClass14([\n Autowired66(\"rowNodeSorter\")\n], FullStore.prototype, \"rowNodeSorter\", 2);\n__decorateClass14([\n Autowired66(\"sortController\")\n], FullStore.prototype, \"sortController\", 2);\n__decorateClass14([\n Autowired66(\"selectionService\")\n], FullStore.prototype, \"selectionService\", 2);\n__decorateClass14([\n Autowired66(\"ssrmNodeManager\")\n], FullStore.prototype, \"nodeManager\", 2);\n__decorateClass14([\n Autowired66(\"filterManager\")\n], FullStore.prototype, \"filterManager\", 2);\n__decorateClass14([\n Autowired66(\"ssrmTransactionManager\")\n], FullStore.prototype, \"transactionManager\", 2);\n__decorateClass14([\n Autowired66(\"rowModel\")\n], FullStore.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n PostConstruct64\n], FullStore.prototype, \"postConstruct\", 1);\n__decorateClass14([\n PreDestroy5\n], FullStore.prototype, \"destroyRowNodes\", 1);\nvar MultiIndexMap = class {\n constructor(...indexes) {\n if (indexes.length < 1) {\n throw new Error(\"AG Grid: At least one index must be provided.\");\n }\n this.indexes = indexes;\n this.maps = new Map(\n this.indexes.map((index) => [index, /* @__PURE__ */ new Map()])\n );\n }\n getSize() {\n return this.maps.get(this.indexes[0]).size;\n }\n getBy(index, key) {\n const map = this.maps.get(index);\n if (!map) {\n throw new Error(`AG Grid: ${String(index)} not found`);\n }\n return map.get(key);\n }\n set(item) {\n this.indexes.forEach((index) => {\n const map = this.maps.get(index);\n if (!map) {\n throw new Error(`AG Grid: ${String(index)} not found`);\n }\n map.set(item[index], item);\n });\n }\n delete(item) {\n this.indexes.forEach((index) => {\n const map = this.maps.get(index);\n if (!map) {\n throw new Error(`AG Grid: ${String(index)} not found`);\n }\n map.delete(item[index]);\n });\n }\n clear() {\n this.maps.forEach((map) => map.clear());\n }\n getIterator(index) {\n const map = this.maps.get(index);\n if (!map) {\n throw new Error(`AG Grid: ${String(index)} not found`);\n }\n return map.values();\n }\n forEach(callback) {\n const iterator = this.getIterator(this.indexes[0]);\n let pointer;\n while (pointer = iterator.next()) {\n if (pointer.done)\n break;\n callback(pointer.value);\n }\n }\n find(callback) {\n const iterator = this.getIterator(this.indexes[0]);\n let pointer;\n while (pointer = iterator.next()) {\n if (pointer.done)\n break;\n if (callback(pointer.value)) {\n return pointer.value;\n }\n }\n }\n filter(predicate) {\n const iterator = this.getIterator(this.indexes[0]);\n let pointer;\n const result = [];\n while (pointer = iterator.next()) {\n if (pointer.done)\n break;\n if (predicate(pointer.value)) {\n result.push(pointer.value);\n }\n }\n return result;\n }\n};\nvar LazyBlockLoadingService = class extends BeanStub21 {\n constructor() {\n super(...arguments);\n this.cacheLoadingNodesMap = /* @__PURE__ */ new Map();\n this.isCheckQueued = false;\n this.nextBlockToLoad = void 0;\n }\n init() {\n this.addManagedListener(this.rowNodeBlockLoader, RowNodeBlockLoader2.BLOCK_LOADED_EVENT, () => this.queueLoadCheck());\n }\n subscribe(cache) {\n this.cacheLoadingNodesMap.set(cache, /* @__PURE__ */ new Set());\n }\n unsubscribe(cache) {\n this.cacheLoadingNodesMap.delete(cache);\n }\n /**\n * Queues a microtask to check if any blocks need to be loaded.\n */\n queueLoadCheck() {\n if (this.isCheckQueued) {\n return;\n }\n this.isCheckQueued = true;\n window.queueMicrotask(() => {\n this.queueLoadAction();\n this.isCheckQueued = false;\n });\n }\n queueLoadAction() {\n const nextBlockToLoad = this.getBlockToLoad();\n if (!nextBlockToLoad) {\n return;\n }\n const isSameBlock = this.nextBlockToLoad && this.nextBlockToLoad.cache === nextBlockToLoad.cache && this.nextBlockToLoad.index === nextBlockToLoad.index;\n if (isSameBlock) {\n return;\n }\n if (!this.nextBlockToLoad || !isSameBlock) {\n this.nextBlockToLoad = nextBlockToLoad;\n window.clearTimeout(this.loaderTimeout);\n const startRow = Number(this.nextBlockToLoad.index);\n const cache = this.nextBlockToLoad.cache;\n const endRow = nextBlockToLoad.index + nextBlockToLoad.cache.getBlockSize();\n this.loaderTimeout = window.setTimeout(() => {\n if (!cache.isAlive()) {\n return;\n }\n this.loaderTimeout = void 0;\n this.attemptLoad(cache, startRow, endRow);\n this.nextBlockToLoad = void 0;\n }, this.gos.get(\"blockLoadDebounceMillis\"));\n }\n }\n attemptLoad(cache, start, end) {\n const availableLoadingCount = this.rowNodeBlockLoader.getAvailableLoadingCount();\n if (availableLoadingCount != null && availableLoadingCount === 0) {\n return;\n }\n ;\n this.rowNodeBlockLoader.registerLoads(1);\n this.executeLoad(cache, start, end);\n this.queueLoadCheck();\n }\n executeLoad(cache, startRow, endRow) {\n var _a;\n const ssrmParams = cache.getSsrmParams();\n const request = {\n startRow,\n endRow,\n rowGroupCols: ssrmParams.rowGroupCols,\n valueCols: ssrmParams.valueCols,\n pivotCols: ssrmParams.pivotCols,\n pivotMode: ssrmParams.pivotMode,\n groupKeys: cache.store.getParentNode().getGroupKeys(),\n filterModel: ssrmParams.filterModel,\n sortModel: ssrmParams.sortModel\n };\n const loadingNodes = this.cacheLoadingNodesMap.get(cache);\n const removeNodesFromLoadingMap = () => {\n for (let i = 0; i < endRow - startRow; i++) {\n loadingNodes.delete(startRow + i);\n }\n };\n const addNodesToLoadingMap = () => {\n for (let i = 0; i < endRow - startRow; i++) {\n loadingNodes.add(startRow + i);\n }\n };\n const success = (params2) => {\n this.rowNodeBlockLoader.loadComplete();\n cache.onLoadSuccess(startRow, endRow - startRow, params2);\n removeNodesFromLoadingMap();\n };\n const fail = () => {\n this.rowNodeBlockLoader.loadComplete();\n cache.onLoadFailed(startRow, endRow - startRow);\n removeNodesFromLoadingMap();\n };\n const params = this.gos.addGridCommonParams({\n request,\n success,\n fail,\n parentNode: cache.store.getParentNode()\n });\n addNodesToLoadingMap();\n (_a = cache.getSsrmParams().datasource) == null ? void 0 : _a.getRows(params);\n }\n getBlockToLoad() {\n var _a;\n const firstRowInViewport = this.rowRenderer.getFirstVirtualRenderedRow();\n const lastRowInViewport = this.rowRenderer.getLastVirtualRenderedRow();\n for (let i = firstRowInViewport; i <= lastRowInViewport; i++) {\n const row = this.rowModel.getRow(i);\n if (!row) {\n continue;\n }\n const store = row.parent && row.parent.childStore;\n if (!store || !(store instanceof LazyStore)) {\n continue;\n }\n const cache = store.getCache();\n const lazyNode = cache.getNodes().getBy(\"node\", row);\n if (!lazyNode) {\n continue;\n }\n const loadingNodes = this.cacheLoadingNodesMap.get(cache);\n if (loadingNodes == null ? void 0 : loadingNodes.has(lazyNode.index)) {\n continue;\n }\n if (row.__needsRefreshWhenVisible || row.stub && !row.failedLoad) {\n return {\n cache,\n index: cache.getBlockStartIndex(lazyNode.index)\n };\n }\n }\n let cacheToRefresh = null;\n let nodeToRefresh = null;\n let nodeToRefreshDist = Number.MAX_SAFE_INTEGER;\n for (const cache of this.cacheLoadingNodesMap.keys()) {\n const nodesToRefresh = cache.getNodesToRefresh();\n nodesToRefresh.forEach((node) => {\n if (node.rowIndex == null) {\n nodeToRefresh = node;\n cacheToRefresh = cache;\n return;\n }\n const lazyNode = cache.getNodes().getBy(\"node\", node);\n if (!lazyNode) {\n return;\n }\n const loadingNodes = this.cacheLoadingNodesMap.get(cache);\n if (loadingNodes == null ? void 0 : loadingNodes.has(lazyNode.index)) {\n return;\n }\n const distToViewportTop = Math.abs(firstRowInViewport - node.rowIndex);\n const distToViewportBottom = Math.abs(node.rowIndex - lastRowInViewport);\n if (distToViewportTop < nodeToRefreshDist) {\n nodeToRefresh = node;\n nodeToRefreshDist = distToViewportTop;\n cacheToRefresh = cache;\n }\n if (distToViewportBottom < nodeToRefreshDist) {\n nodeToRefresh = node;\n nodeToRefreshDist = distToViewportBottom;\n cacheToRefresh = cache;\n }\n });\n }\n if (!cacheToRefresh) {\n return void 0;\n }\n const lazyCache = cacheToRefresh;\n const lazyIndex = (_a = lazyCache.getNodes().getBy(\"node\", nodeToRefresh)) == null ? void 0 : _a.index;\n return lazyIndex == null ? void 0 : {\n cache: lazyCache,\n index: lazyCache.getBlockStartIndex(lazyIndex)\n };\n }\n isRowLoading(cache, index) {\n var _a, _b;\n return (_b = (_a = this.cacheLoadingNodesMap.get(cache)) == null ? void 0 : _a.has(index)) != null ? _b : false;\n }\n};\nLazyBlockLoadingService.DEFAULT_BLOCK_SIZE = 100;\n__decorateClass14([\n Autowired216(\"rowNodeBlockLoader\")\n], LazyBlockLoadingService.prototype, \"rowNodeBlockLoader\", 2);\n__decorateClass14([\n Autowired216(\"rowRenderer\")\n], LazyBlockLoadingService.prototype, \"rowRenderer\", 2);\n__decorateClass14([\n Autowired216(\"rowModel\")\n], LazyBlockLoadingService.prototype, \"rowModel\", 2);\n__decorateClass14([\n PostConstruct215\n], LazyBlockLoadingService.prototype, \"init\", 1);\nLazyBlockLoadingService = __decorateClass14([\n Bean14(\"lazyBlockLoadingService\")\n], LazyBlockLoadingService);\nvar LazyCache = class extends BeanStub28 {\n constructor(store, numberOfRows, storeParams) {\n super();\n this.live = true;\n this.removedNodeCache = /* @__PURE__ */ new Map();\n this.store = store;\n this.numberOfRows = numberOfRows;\n this.isLastRowKnown = false;\n this.storeParams = storeParams;\n }\n init() {\n this.lazyBlockLoadingService.subscribe(this);\n this.nodeMap = new MultiIndexMap(\"index\", \"id\", \"node\");\n this.nodeDisplayIndexMap = /* @__PURE__ */ new Map();\n this.nodesToRefresh = /* @__PURE__ */ new Set();\n this.defaultNodeIdPrefix = this.blockUtils.createNodeIdPrefix(this.store.getParentNode());\n this.getRowIdFunc = this.gos.getCallback(\"getRowId\");\n this.isMasterDetail = this.gos.get(\"masterDetail\");\n }\n destroyRowNodes() {\n this.lazyBlockLoadingService.unsubscribe(this);\n this.numberOfRows = 0;\n this.nodeMap.forEach((node) => this.blockUtils.destroyRowNode(node.node));\n this.nodeMap.clear();\n this.nodeDisplayIndexMap.clear();\n this.nodesToRefresh.clear();\n this.live = false;\n }\n /**\n * Get the row node for a specific display index from this store\n * @param displayIndex the display index of the node to find\n * @returns undefined if the node is not in the store bounds, otherwise will always return a node\n */\n getRowByDisplayIndex(displayIndex) {\n var _a, _b, _c, _d;\n if (!this.store.isDisplayIndexInStore(displayIndex)) {\n return void 0;\n }\n const node = this.nodeDisplayIndexMap.get(displayIndex);\n if (node) {\n if (node.stub || node.__needsRefreshWhenVisible) {\n this.lazyBlockLoadingService.queueLoadCheck();\n }\n return node;\n }\n if (displayIndex === this.store.getDisplayIndexStart()) {\n return this.createStubNode(0, displayIndex);\n }\n const contiguouslyPreviousNode = this.nodeDisplayIndexMap.get(displayIndex - 1);\n if (contiguouslyPreviousNode) {\n if (this.isMasterDetail && contiguouslyPreviousNode.master && contiguouslyPreviousNode.expanded) {\n return contiguouslyPreviousNode.detailNode;\n }\n if (contiguouslyPreviousNode.expanded && ((_a = contiguouslyPreviousNode.childStore) == null ? void 0 : _a.isDisplayIndexInStore(displayIndex))) {\n return (_b = contiguouslyPreviousNode.childStore) == null ? void 0 : _b.getRowUsingDisplayIndex(displayIndex);\n }\n const lazyCacheNode = this.nodeMap.getBy(\"node\", contiguouslyPreviousNode);\n return this.createStubNode(lazyCacheNode.index + 1, displayIndex);\n }\n const adjacentNodes = this.getSurroundingNodesByDisplayIndex(displayIndex);\n if (adjacentNodes == null) {\n const storeIndexFromEndIndex2 = this.store.getRowCount() - (this.store.getDisplayIndexEnd() - displayIndex);\n return this.createStubNode(storeIndexFromEndIndex2, displayIndex);\n }\n const { previousNode, nextNode } = adjacentNodes;\n if (previousNode && previousNode.node.expanded && ((_c = previousNode.node.childStore) == null ? void 0 : _c.isDisplayIndexInStore(displayIndex))) {\n return (_d = previousNode.node.childStore) == null ? void 0 : _d.getRowUsingDisplayIndex(displayIndex);\n }\n if (nextNode) {\n const displayIndexDiff = nextNode.node.rowIndex - displayIndex;\n const newStoreIndex = nextNode.index - displayIndexDiff;\n return this.createStubNode(newStoreIndex, displayIndex);\n }\n const storeIndexFromEndIndex = this.store.getRowCount() - (this.store.getDisplayIndexEnd() - displayIndex);\n return this.createStubNode(storeIndexFromEndIndex, displayIndex);\n }\n /**\n * Used for creating and positioning a stub node without firing a store updated event\n */\n createStubNode(storeIndex, displayIndex) {\n const rowBounds = this.store.getRowBounds(displayIndex);\n const newNode = this.createRowAtIndex(storeIndex, null, (node) => {\n node.setRowIndex(displayIndex);\n node.setRowTop(rowBounds.rowTop);\n this.nodeDisplayIndexMap.set(displayIndex, node);\n });\n this.lazyBlockLoadingService.queueLoadCheck();\n return newNode;\n }\n /**\n * @param index The row index relative to this store\n * @returns A rowNode at the given store index\n */\n getRowByStoreIndex(index) {\n var _a;\n return (_a = this.nodeMap.getBy(\"index\", index)) == null ? void 0 : _a.node;\n }\n /**\n * Given a number of rows, skips through the given sequence & row top reference (using default row height)\n * @param numberOfRowsToSkip number of rows to skip over in the given sequence\n * @param displayIndexSeq the sequence in which to skip\n * @param nextRowTop the row top reference in which to skip\n */\n skipDisplayIndexes(numberOfRowsToSkip, displayIndexSeq, nextRowTop) {\n if (numberOfRowsToSkip === 0) {\n return;\n }\n const defaultRowHeight = this.gos.getRowHeightAsNumber();\n displayIndexSeq.skip(numberOfRowsToSkip);\n nextRowTop.value += numberOfRowsToSkip * defaultRowHeight;\n }\n /**\n * @param displayIndexSeq the number sequence for generating the display index of each row\n * @param nextRowTop an object containing the next row top value intended to be modified by ref per row\n */\n setDisplayIndexes(displayIndexSeq, nextRowTop) {\n this.nodeDisplayIndexMap.clear();\n const orderedMap = {};\n this.nodeMap.forEach((lazyNode) => {\n orderedMap[lazyNode.index] = lazyNode.node;\n });\n let lastIndex = -1;\n for (const stringIndex in orderedMap) {\n const node = orderedMap[stringIndex];\n const numericIndex = Number(stringIndex);\n const numberOfRowsToSkip2 = numericIndex - 1 - lastIndex;\n this.skipDisplayIndexes(numberOfRowsToSkip2, displayIndexSeq, nextRowTop);\n this.blockUtils.setDisplayIndex(node, displayIndexSeq, nextRowTop);\n this.nodeDisplayIndexMap.set(node.rowIndex, node);\n lastIndex = numericIndex;\n }\n const numberOfRowsToSkip = this.numberOfRows - 1 - lastIndex;\n this.skipDisplayIndexes(numberOfRowsToSkip, displayIndexSeq, nextRowTop);\n this.purgeExcessRows();\n }\n getRowCount() {\n return this.numberOfRows;\n }\n setRowCount(rowCount, isLastRowIndexKnown) {\n if (rowCount < 0) {\n throw new Error(\"AG Grid: setRowCount can only accept a positive row count.\");\n }\n this.numberOfRows = rowCount;\n if (isLastRowIndexKnown != null) {\n this.isLastRowKnown = isLastRowIndexKnown;\n if (isLastRowIndexKnown === false) {\n this.numberOfRows += 1;\n }\n }\n this.fireStoreUpdatedEvent();\n }\n getNodes() {\n return this.nodeMap;\n }\n getNodeCachedByDisplayIndex(displayIndex) {\n var _a;\n return (_a = this.nodeDisplayIndexMap.get(displayIndex)) != null ? _a : null;\n }\n getNodesToRefresh() {\n return this.nodesToRefresh;\n }\n /**\n * @returns the previous and next loaded row nodes surrounding the given display index\n */\n getSurroundingNodesByDisplayIndex(displayIndex) {\n let nextNode;\n let previousNode;\n this.nodeMap.forEach((lazyNode) => {\n if (displayIndex > lazyNode.node.rowIndex) {\n if (previousNode == null || previousNode.node.rowIndex < lazyNode.node.rowIndex) {\n previousNode = lazyNode;\n }\n return;\n }\n if (nextNode == null || nextNode.node.rowIndex > lazyNode.node.rowIndex) {\n nextNode = lazyNode;\n return;\n }\n });\n if (!previousNode && !nextNode)\n return null;\n return { previousNode, nextNode };\n }\n /**\n * Get or calculate the display index for a given store index\n * @param storeIndex the rows index within this store\n * @returns the rows visible display index relative to the grid\n */\n getDisplayIndexFromStoreIndex(storeIndex) {\n var _a, _b;\n const nodeAtIndex = this.nodeMap.getBy(\"index\", storeIndex);\n if (nodeAtIndex) {\n return nodeAtIndex.node.rowIndex;\n }\n let nextNode;\n let previousNode;\n this.nodeMap.forEach((lazyNode) => {\n if (storeIndex > lazyNode.index) {\n if (previousNode == null || previousNode.index < lazyNode.index) {\n previousNode = lazyNode;\n }\n return;\n }\n if (nextNode == null || nextNode.index > lazyNode.index) {\n nextNode = lazyNode;\n return;\n }\n });\n if (!nextNode) {\n return this.store.getDisplayIndexEnd() - (this.numberOfRows - storeIndex);\n }\n if (!previousNode) {\n return this.store.getDisplayIndexStart() + storeIndex;\n }\n const storeIndexDiff = storeIndex - previousNode.index;\n const previousDisplayIndex = (_b = (_a = previousNode.node.childStore) == null ? void 0 : _a.getDisplayIndexEnd()) != null ? _b : previousNode.node.rowIndex;\n return previousDisplayIndex + storeIndexDiff;\n }\n /**\n * Creates a new row and inserts it at the given index\n * @param atStoreIndex the node index relative to this store\n * @param data the data object to populate the node with \n * @returns the new row node\n */\n createRowAtIndex(atStoreIndex, data, createNodeCallback) {\n var _a, _b;\n const lazyNode = this.nodeMap.getBy(\"index\", atStoreIndex);\n if (lazyNode) {\n const { node } = lazyNode;\n node.__needsRefreshWhenVisible = false;\n if (this.doesNodeMatch(data, node)) {\n this.blockUtils.updateDataIntoRowNode(node, data);\n this.nodesToRefresh.delete(node);\n return node;\n }\n if (this.getRowIdFunc == null && node.hasChildren() && node.expanded) {\n this.nodesToRefresh.delete(node);\n return node;\n }\n this.destroyRowAtIndex(atStoreIndex);\n }\n if (data && this.getRowIdFunc != null) {\n const id = this.getRowId(data);\n const deletedNode = id && ((_a = this.removedNodeCache) == null ? void 0 : _a.get(id));\n if (deletedNode) {\n (_b = this.removedNodeCache) == null ? void 0 : _b.delete(id);\n this.blockUtils.updateDataIntoRowNode(deletedNode, data);\n this.nodeMap.set({\n id: deletedNode.id,\n node: deletedNode,\n index: atStoreIndex\n });\n return deletedNode;\n }\n const lazyNode2 = this.nodeMap.getBy(\"id\", id);\n if (lazyNode2) {\n this.nodeMap.delete(lazyNode2);\n const { node, index } = lazyNode2;\n this.blockUtils.updateDataIntoRowNode(node, data);\n this.nodeMap.set({\n id: node.id,\n node,\n index: atStoreIndex\n });\n this.nodesToRefresh.delete(node);\n if (this.getBlockStartIndex(index) === this.getBlockStartIndex(atStoreIndex)) {\n return node;\n }\n this.markBlockForVerify(index);\n return node;\n }\n }\n const newNode = this.blockUtils.createRowNode(this.store.getRowDetails());\n if (data != null) {\n const defaultId = this.getPrefixedId(this.store.getIdSequence().next());\n this.blockUtils.setDataIntoRowNode(newNode, data, defaultId, void 0);\n this.serverSideRowModel.setPaused(true);\n this.blockUtils.checkOpenByDefault(newNode);\n this.serverSideRowModel.setPaused(false);\n this.nodeManager.addRowNode(newNode);\n }\n this.nodeMap.set({\n id: newNode.id,\n node: newNode,\n index: atStoreIndex\n });\n if (createNodeCallback) {\n createNodeCallback(newNode);\n }\n return newNode;\n }\n getBlockStates() {\n const blockCounts = {};\n const blockStates = {};\n this.nodeMap.forEach(({ node, index }) => {\n var _a;\n const blockStart = this.getBlockStartIndex(index);\n if (!node.stub && !node.failedLoad) {\n blockCounts[blockStart] = ((_a = blockCounts[blockStart]) != null ? _a : 0) + 1;\n }\n let rowState = \"loaded\";\n if (node.failedLoad) {\n rowState = \"failed\";\n } else if (this.lazyBlockLoadingService.isRowLoading(this, blockStart)) {\n rowState = \"loading\";\n } else if (this.nodesToRefresh.has(node) || node.stub) {\n rowState = \"needsLoading\";\n }\n if (!blockStates[blockStart]) {\n blockStates[blockStart] = /* @__PURE__ */ new Set();\n }\n blockStates[blockStart].add(rowState);\n });\n const statePriorityMap = {\n loading: 4,\n failed: 3,\n needsLoading: 2,\n loaded: 1\n };\n const blockPrefix = this.blockUtils.createNodeIdPrefix(this.store.getParentNode());\n const results = {};\n Object.entries(blockStates).forEach(([blockStart, uniqueStates]) => {\n var _a;\n const sortedStates = [...uniqueStates].sort((a, b) => {\n var _a2, _b;\n return ((_a2 = statePriorityMap[a]) != null ? _a2 : 0) - ((_b = statePriorityMap[b]) != null ? _b : 0);\n });\n const priorityState = sortedStates[0];\n const blockNumber = Number(blockStart) / this.getBlockSize();\n const blockId = blockPrefix ? `${blockPrefix}-${blockNumber}` : String(blockNumber);\n results[blockId] = {\n blockNumber,\n startRow: Number(blockStart),\n endRow: Number(blockStart) + this.getBlockSize(),\n pageStatus: priorityState,\n loadedRowCount: (_a = blockCounts[blockStart]) != null ? _a : 0\n };\n });\n return results;\n }\n destroyRowAtIndex(atStoreIndex) {\n const lazyNode = this.nodeMap.getBy(\"index\", atStoreIndex);\n if (!lazyNode) {\n return;\n }\n this.nodeMap.delete(lazyNode);\n this.nodeDisplayIndexMap.delete(lazyNode.node.rowIndex);\n if (this.nodesToRefresh.size > 0) {\n this.removedNodeCache.set(lazyNode.node.id, lazyNode.node);\n } else {\n this.blockUtils.destroyRowNode(lazyNode.node);\n }\n this.nodesToRefresh.delete(lazyNode.node);\n }\n getSsrmParams() {\n return this.store.getSsrmParams();\n }\n /**\n * @param id the base id to be prefixed\n * @returns a node id with prefix if required\n */\n getPrefixedId(id) {\n if (this.defaultNodeIdPrefix) {\n return this.defaultNodeIdPrefix + \"-\" + id;\n } else {\n return id.toString();\n }\n }\n markBlockForVerify(rowIndex) {\n const [start, end] = this.getBlockBounds(rowIndex);\n const lazyNodesInRange = this.nodeMap.filter((lazyNode) => lazyNode.index >= start && lazyNode.index < end);\n lazyNodesInRange.forEach(({ node }) => {\n node.__needsRefreshWhenVisible = true;\n });\n }\n doesNodeMatch(data, node) {\n if (node.stub) {\n return false;\n }\n if (this.getRowIdFunc != null) {\n const id = this.getRowId(data);\n return node.id === id;\n }\n return node.data === data;\n }\n /**\n * Deletes any stub nodes not within the given range\n */\n purgeStubsOutsideOfViewport() {\n const firstRow = this.api.getFirstDisplayedRowIndex();\n const lastRow = this.api.getLastDisplayedRowIndex();\n const firstRowBlockStart = this.getBlockStartIndex(firstRow);\n const [_94, lastRowBlockEnd] = this.getBlockBounds(lastRow);\n this.nodeMap.forEach((lazyNode) => {\n if (this.lazyBlockLoadingService.isRowLoading(this, lazyNode.index) || lazyNode.node.failedLoad) {\n return;\n }\n if (lazyNode.node.stub && (lazyNode.index < firstRowBlockStart || lazyNode.index > lastRowBlockEnd)) {\n this.destroyRowAtIndex(lazyNode.index);\n }\n });\n }\n getBlocksDistanceFromRow(nodes, otherDisplayIndex) {\n const blockDistanceToMiddle = {};\n nodes.forEach(({ node, index }) => {\n const [blockStart, blockEnd] = this.getBlockBounds(index);\n if (blockStart in blockDistanceToMiddle) {\n return;\n }\n const distStart = Math.abs(node.rowIndex - otherDisplayIndex);\n let distEnd;\n const lastLazyNode = this.nodeMap.getBy(\"index\", [blockEnd - 1]);\n if (lastLazyNode)\n distEnd = Math.abs(lastLazyNode.node.rowIndex - otherDisplayIndex);\n const farthest = distEnd == null || distStart < distEnd ? distStart : distEnd;\n blockDistanceToMiddle[blockStart] = farthest;\n });\n return Object.entries(blockDistanceToMiddle);\n }\n purgeExcessRows() {\n var _a;\n this.purgeStubsOutsideOfViewport();\n if (this.store.getDisplayIndexEnd() == null || this.storeParams.maxBlocksInCache == null) {\n return;\n }\n const firstRowInViewport = this.api.getFirstDisplayedRowIndex();\n const lastRowInViewport = this.api.getLastDisplayedRowIndex();\n const allLoadedBlocks = /* @__PURE__ */ new Set();\n const blocksInViewport = /* @__PURE__ */ new Set();\n this.nodeMap.forEach(({ index, node }) => {\n const blockStart = this.getBlockStartIndex(index);\n allLoadedBlocks.add(blockStart);\n const isInViewport = node.rowIndex >= firstRowInViewport && node.rowIndex <= lastRowInViewport;\n if (isInViewport) {\n blocksInViewport.add(blockStart);\n }\n });\n const numberOfBlocksToRetain = Math.max(blocksInViewport.size, (_a = this.storeParams.maxBlocksInCache) != null ? _a : 0);\n const loadedBlockCount = allLoadedBlocks.size;\n const blocksToRemove = loadedBlockCount - numberOfBlocksToRetain;\n if (blocksToRemove <= 0) {\n return;\n }\n let firstRowBlockStart = Number.MAX_SAFE_INTEGER;\n let lastRowBlockStart = Number.MIN_SAFE_INTEGER;\n blocksInViewport.forEach((blockStart) => {\n if (firstRowBlockStart > blockStart) {\n firstRowBlockStart = blockStart;\n }\n if (lastRowBlockStart < blockStart) {\n lastRowBlockStart = blockStart;\n }\n });\n const disposableNodes = this.nodeMap.filter(({ node, index }) => {\n const rowBlockStart = this.getBlockStartIndex(index);\n const rowBlockInViewport = rowBlockStart >= firstRowBlockStart && rowBlockStart <= lastRowBlockStart;\n return !rowBlockInViewport && !this.isNodeCached(node);\n });\n if (disposableNodes.length === 0) {\n return;\n }\n const midViewportRow = firstRowInViewport + (lastRowInViewport - firstRowInViewport) / 2;\n const blockDistanceArray = this.getBlocksDistanceFromRow(disposableNodes, midViewportRow);\n const blockSize = this.getBlockSize();\n blockDistanceArray.sort((a, b) => Math.sign(b[1] - a[1]));\n for (let i = 0; i < Math.min(blocksToRemove, blockDistanceArray.length); i++) {\n const blockStart = Number(blockDistanceArray[i][0]);\n for (let x = blockStart; x < blockStart + blockSize; x++) {\n const lazyNode = this.nodeMap.getBy(\"index\", x);\n if (!lazyNode || this.isNodeCached(lazyNode.node)) {\n continue;\n }\n this.destroyRowAtIndex(x);\n }\n }\n }\n isNodeFocused(node) {\n const focusedCell = this.focusService.getFocusCellToUseAfterRefresh();\n if (!focusedCell) {\n return false;\n }\n if (focusedCell.rowPinned != null) {\n return false;\n }\n const hasFocus = focusedCell.rowIndex === node.rowIndex;\n return hasFocus;\n }\n isNodeCached(node) {\n return node.isExpandable() && node.expanded || this.isNodeFocused(node);\n }\n extractDuplicateIds(rows) {\n if (this.getRowIdFunc == null) {\n return [];\n }\n const newIds = /* @__PURE__ */ new Set();\n const duplicates = /* @__PURE__ */ new Set();\n rows.forEach((data) => {\n const id = this.getRowId(data);\n if (newIds.has(id)) {\n duplicates.add(id);\n return;\n }\n newIds.add(id);\n });\n return [...duplicates];\n }\n onLoadSuccess(firstRowIndex, numberOfRowsExpected, response) {\n if (!this.live)\n return;\n const info = response.groupLevelInfo;\n this.store.setStoreInfo(info);\n if (this.getRowIdFunc != null) {\n const duplicates = this.extractDuplicateIds(response.rowData);\n if (duplicates.length > 0) {\n const duplicateIdText = duplicates.join(\", \");\n console.warn(`AG Grid: Unable to display rows as duplicate row ids (${duplicateIdText}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`);\n this.onLoadFailed(firstRowIndex, numberOfRowsExpected);\n return;\n }\n }\n if (response.pivotResultFields) {\n this.serverSideRowModel.generateSecondaryColumns(response.pivotResultFields);\n }\n const wasRefreshing = this.nodesToRefresh.size > 0;\n response.rowData.forEach((data, responseRowIndex) => {\n var _a;\n const rowIndex = firstRowIndex + responseRowIndex;\n const nodeFromCache = this.nodeMap.getBy(\"index\", rowIndex);\n if ((_a = nodeFromCache == null ? void 0 : nodeFromCache.node) == null ? void 0 : _a.stub) {\n this.createRowAtIndex(rowIndex, data);\n return;\n }\n if (nodeFromCache && this.doesNodeMatch(data, nodeFromCache.node)) {\n this.blockUtils.updateDataIntoRowNode(nodeFromCache.node, data);\n this.nodesToRefresh.delete(nodeFromCache.node);\n nodeFromCache.node.__needsRefreshWhenVisible = false;\n return;\n }\n this.createRowAtIndex(rowIndex, data);\n });\n if (response.rowCount != void 0 && response.rowCount !== -1) {\n this.numberOfRows = response.rowCount;\n this.isLastRowKnown = true;\n } else if (numberOfRowsExpected > response.rowData.length) {\n this.numberOfRows = firstRowIndex + response.rowData.length;\n this.isLastRowKnown = true;\n } else if (!this.isLastRowKnown) {\n const lastInferredRow = firstRowIndex + response.rowData.length + 1;\n if (lastInferredRow > this.numberOfRows) {\n this.numberOfRows = lastInferredRow;\n }\n }\n if (this.isLastRowKnown) {\n const lazyNodesAfterStoreEnd = this.nodeMap.filter((lazyNode) => lazyNode.index >= this.numberOfRows);\n lazyNodesAfterStoreEnd.forEach((lazyNode) => this.destroyRowAtIndex(lazyNode.index));\n }\n this.fireStoreUpdatedEvent();\n const finishedRefreshing = this.nodesToRefresh.size === 0;\n if (wasRefreshing && finishedRefreshing) {\n this.fireRefreshFinishedEvent();\n }\n }\n fireRefreshFinishedEvent() {\n const finishedRefreshing = this.nodesToRefresh.size === 0;\n if (!finishedRefreshing) {\n return;\n }\n this.removedNodeCache.forEach((node) => {\n this.blockUtils.destroyRowNode(node);\n });\n this.removedNodeCache = /* @__PURE__ */ new Map();\n this.store.fireRefreshFinishedEvent();\n }\n /**\n * @returns true if all rows are loaded\n */\n isStoreFullyLoaded() {\n const knowsSize = this.isLastRowKnown;\n const hasCorrectRowCount = this.nodeMap.getSize() === this.numberOfRows;\n if (!knowsSize || !hasCorrectRowCount) {\n return;\n }\n if (this.nodesToRefresh.size > 0) {\n return;\n }\n let index = -1;\n const firstOutOfPlaceNode = this.nodeMap.find((lazyNode) => {\n index += 1;\n if (lazyNode.index !== index) {\n return true;\n }\n if (lazyNode.node.__needsRefreshWhenVisible) {\n return true;\n }\n if (lazyNode.node.stub) {\n return true;\n }\n return false;\n });\n return firstOutOfPlaceNode == null;\n }\n isLastRowIndexKnown() {\n return this.isLastRowKnown;\n }\n onLoadFailed(firstRowIndex, numberOfRowsExpected) {\n var _a;\n if (!this.live)\n return;\n const wasRefreshing = this.nodesToRefresh.size > 0;\n for (let i = firstRowIndex; i < firstRowIndex + numberOfRowsExpected && i < this.getRowCount(); i++) {\n let { node } = (_a = this.nodeMap.getBy(\"index\", i)) != null ? _a : {};\n if (node) {\n this.nodesToRefresh.delete(node);\n }\n if (!node || !node.stub) {\n if (node && !node.stub) {\n this.destroyRowAtIndex(i);\n }\n node = this.createRowAtIndex(i);\n }\n node.__needsRefreshWhenVisible = false;\n node.failedLoad = true;\n }\n const finishedRefreshing = this.nodesToRefresh.size === 0;\n if (wasRefreshing && finishedRefreshing) {\n this.fireRefreshFinishedEvent();\n }\n this.fireStoreUpdatedEvent();\n }\n markNodesForRefresh() {\n this.nodeMap.forEach((lazyNode) => {\n if (lazyNode.node.stub && !lazyNode.node.failedLoad) {\n return;\n }\n this.nodesToRefresh.add(lazyNode.node);\n });\n this.lazyBlockLoadingService.queueLoadCheck();\n if (this.isLastRowKnown && this.numberOfRows === 0) {\n this.numberOfRows = 1;\n this.isLastRowKnown = false;\n this.fireStoreUpdatedEvent();\n }\n }\n isNodeInCache(id) {\n return !!this.nodeMap.getBy(\"id\", id);\n }\n // gets called 1) row count changed 2) cache purged 3) items inserted\n fireStoreUpdatedEvent() {\n if (!this.live) {\n return;\n }\n this.store.fireStoreUpdatedEvent();\n }\n getRowId(data) {\n if (this.getRowIdFunc == null) {\n return null;\n }\n const { level } = this.store.getRowDetails();\n const parentKeys = this.store.getParentNode().getGroupKeys();\n const id = this.getRowIdFunc({\n data,\n parentKeys: parentKeys.length > 0 ? parentKeys : void 0,\n level\n });\n return String(id);\n }\n getOrderedNodeMap() {\n const obj = {};\n this.nodeMap.forEach((node) => obj[node.index] = node);\n return obj;\n }\n clearDisplayIndexes() {\n this.nodeDisplayIndexMap.clear();\n }\n /**\n * Client side sorting\n */\n clientSideSortRows() {\n const sortOptions = this.sortController.getSortOptions();\n const isAnySort = sortOptions.some((opt) => opt.sort != null);\n if (!isAnySort) {\n return;\n }\n const allNodes = new Array(this.nodeMap.getSize());\n this.nodeMap.forEach((lazyNode) => allNodes[lazyNode.index] = lazyNode.node);\n this.nodeMap.clear();\n const sortedNodes = this.rowNodeSorter.doFullSort(allNodes, sortOptions);\n sortedNodes.forEach((node, index) => {\n this.nodeMap.set({\n id: node.id,\n node,\n index\n });\n });\n }\n /**\n * Transaction Support here\n */\n updateRowNodes(updates) {\n if (this.getRowIdFunc == null) {\n throw new Error(\"AG Grid: Transactions can only be applied when row ids are supplied.\");\n }\n const updatedNodes = [];\n updates.forEach((data) => {\n const id = this.getRowId(data);\n const lazyNode = this.nodeMap.getBy(\"id\", id);\n if (lazyNode) {\n this.blockUtils.updateDataIntoRowNode(lazyNode.node, data);\n updatedNodes.push(lazyNode.node);\n }\n });\n return updatedNodes;\n }\n insertRowNodes(inserts, indexToAdd) {\n const realRowCount = this.store.getRowCount() - (this.store.getParentNode().sibling ? 1 : 0);\n const addIndex = indexToAdd == null && this.isLastRowKnown ? realRowCount : indexToAdd;\n if (addIndex == null || realRowCount < addIndex) {\n return [];\n }\n if (this.getRowIdFunc == null) {\n throw new Error(\"AG Grid: Transactions can only be applied when row ids are supplied.\");\n }\n const uniqueInsertsMap = {};\n inserts.forEach((data) => {\n const dataId = this.getRowId(data);\n if (dataId && this.isNodeInCache(dataId)) {\n return;\n }\n uniqueInsertsMap[dataId] = data;\n });\n const uniqueInserts = Object.values(uniqueInsertsMap);\n let numberOfInserts = uniqueInserts.length;\n if (numberOfInserts === 0) {\n return [];\n }\n const nodesToMove = this.nodeMap.filter((node) => node.index >= addIndex);\n nodesToMove.forEach((lazyNode) => this.nodeMap.delete(lazyNode));\n nodesToMove.forEach((lazyNode) => {\n this.nodeMap.set({\n node: lazyNode.node,\n index: lazyNode.index + numberOfInserts,\n id: lazyNode.id\n });\n });\n this.numberOfRows += numberOfInserts;\n return uniqueInserts.map((data, uniqueInsertOffset) => this.createRowAtIndex(addIndex + uniqueInsertOffset, data));\n }\n removeRowNodes(idsToRemove) {\n if (this.getRowIdFunc == null) {\n throw new Error(\"AG Grid: Transactions can only be applied when row ids are supplied.\");\n }\n const removedNodes = [];\n const nodesToVerify = [];\n let deletedNodeCount = 0;\n const remainingIdsToRemove = [...idsToRemove];\n const allNodes = this.getOrderedNodeMap();\n let contiguousIndex = -1;\n for (let stringIndex in allNodes) {\n contiguousIndex += 1;\n const node = allNodes[stringIndex];\n const matchIndex = remainingIdsToRemove.findIndex((idToRemove) => idToRemove === node.id);\n if (matchIndex !== -1) {\n remainingIdsToRemove.splice(matchIndex, 1);\n this.destroyRowAtIndex(Number(stringIndex));\n removedNodes.push(node.node);\n deletedNodeCount += 1;\n continue;\n }\n if (deletedNodeCount === 0) {\n continue;\n }\n const numericStoreIndex = Number(stringIndex);\n if (contiguousIndex !== numericStoreIndex) {\n nodesToVerify.push(node.node);\n }\n this.nodeMap.delete(allNodes[stringIndex]);\n this.nodeMap.set({\n id: node.id,\n node: node.node,\n index: numericStoreIndex - deletedNodeCount\n });\n }\n this.numberOfRows -= this.isLastRowIndexKnown() ? idsToRemove.length : deletedNodeCount;\n if (remainingIdsToRemove.length > 0 && nodesToVerify.length > 0) {\n nodesToVerify.forEach((node) => node.__needsRefreshWhenVisible = true);\n this.lazyBlockLoadingService.queueLoadCheck();\n }\n return removedNodes;\n }\n /**\n * Return the block size configured for this cache\n */\n getBlockSize() {\n return this.storeParams.cacheBlockSize || LazyBlockLoadingService.DEFAULT_BLOCK_SIZE;\n }\n /**\n * Get the start index of the loading block for a given index\n */\n getBlockStartIndex(storeIndex) {\n const blockSize = this.getBlockSize();\n return storeIndex - storeIndex % blockSize;\n }\n /**\n * Get the start and end index of a block, given a row store index\n */\n getBlockBounds(storeIndex) {\n const startOfBlock = this.getBlockStartIndex(storeIndex);\n const blockSize = this.getBlockSize();\n return [startOfBlock, startOfBlock + blockSize];\n }\n};\n__decorateClass14([\n Autowired315(\"gridApi\")\n], LazyCache.prototype, \"api\", 2);\n__decorateClass14([\n Autowired315(\"ssrmBlockUtils\")\n], LazyCache.prototype, \"blockUtils\", 2);\n__decorateClass14([\n Autowired315(\"focusService\")\n], LazyCache.prototype, \"focusService\", 2);\n__decorateClass14([\n Autowired315(\"ssrmNodeManager\")\n], LazyCache.prototype, \"nodeManager\", 2);\n__decorateClass14([\n Autowired315(\"rowModel\")\n], LazyCache.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired315(\"rowNodeSorter\")\n], LazyCache.prototype, \"rowNodeSorter\", 2);\n__decorateClass14([\n Autowired315(\"sortController\")\n], LazyCache.prototype, \"sortController\", 2);\n__decorateClass14([\n Autowired315(\"lazyBlockLoadingService\")\n], LazyCache.prototype, \"lazyBlockLoadingService\", 2);\n__decorateClass14([\n PostConstruct314\n], LazyCache.prototype, \"init\", 1);\n__decorateClass14([\n PreDestroy22\n], LazyCache.prototype, \"destroyRowNodes\", 1);\nvar LazyStore = class extends BeanStub35 {\n constructor(ssrmParams, storeParams, parentRowNode) {\n super();\n this.idSequence = new NumberSequence3();\n this.ssrmParams = ssrmParams;\n this.parentRowNode = parentRowNode;\n this.storeParams = storeParams;\n this.level = parentRowNode.level + 1;\n this.group = ssrmParams.rowGroupCols ? this.level < ssrmParams.rowGroupCols.length : false;\n this.leafGroup = ssrmParams.rowGroupCols ? this.level === ssrmParams.rowGroupCols.length - 1 : false;\n this.info = {};\n }\n init() {\n var _a;\n let numberOfRows = 1;\n if (this.level === 0) {\n numberOfRows = (_a = this.storeUtils.getServerSideInitialRowCount()) != null ? _a : 1;\n this.eventService.dispatchEventOnce({\n type: Events29.EVENT_ROW_COUNT_READY\n });\n }\n this.cache = this.createManagedBean(new LazyCache(this, numberOfRows, this.storeParams));\n const usingTreeData = this.gos.get(\"treeData\");\n if (!usingTreeData && this.group) {\n const groupColVo = this.ssrmParams.rowGroupCols[this.level];\n this.groupField = groupColVo.field;\n this.rowGroupColumn = this.columnModel.getRowGroupColumns()[this.level];\n }\n }\n destroyRowNodes() {\n this.displayIndexStart = void 0;\n this.displayIndexEnd = void 0;\n this.destroyBean(this.cache);\n }\n /**\n * Given a server response, ingest the rows outside of the data source lifecycle.\n * \n * @param rowDataParams the server response containing the rows to ingest\n * @param startRow the index to start ingesting rows\n * @param expectedRows the expected number of rows in the response (used to determine if the last row index is known)\n */\n applyRowData(rowDataParams, startRow, expectedRows) {\n this.cache.onLoadSuccess(startRow, expectedRows, rowDataParams);\n }\n /**\n * Applies a given transaction to the data set within this store\n * \n * @param transaction an object containing delta instructions determining the changes to apply to this store\n * @returns an object determining the status of this transaction and effected nodes\n */\n applyTransaction(transaction) {\n var _a, _b, _c;\n const idFunc = this.gos.getCallback(\"getRowId\");\n if (!idFunc) {\n console.warn(\"AG Grid: getRowId callback must be implemented for transactions to work. Transaction was ignored.\");\n return {\n status: ServerSideTransactionResultStatus2.Cancelled\n };\n }\n const applyCallback = this.gos.getCallback(\"isApplyServerSideTransaction\");\n if (applyCallback) {\n const params = {\n transaction,\n parentNode: this.parentRowNode,\n groupLevelInfo: this.info\n };\n const apply = applyCallback(params);\n if (!apply) {\n return { status: ServerSideTransactionResultStatus2.Cancelled };\n }\n }\n const allRowsLoaded = this.cache.isStoreFullyLoaded();\n let updatedNodes = void 0;\n if ((_a = transaction.update) == null ? void 0 : _a.length) {\n updatedNodes = this.cache.updateRowNodes(transaction.update);\n }\n let insertedNodes = void 0;\n if ((_b = transaction.add) == null ? void 0 : _b.length) {\n let addIndex = transaction.addIndex;\n if (addIndex != null && addIndex < 0) {\n addIndex = void 0;\n }\n insertedNodes = this.cache.insertRowNodes(transaction.add, addIndex);\n }\n let removedNodes = void 0;\n if ((_c = transaction.remove) == null ? void 0 : _c.length) {\n const allIdsToRemove = transaction.remove.map((data) => idFunc({ level: this.level, parentKeys: this.parentRowNode.getGroupKeys(), data }));\n const allUniqueIdsToRemove = [...new Set(allIdsToRemove)];\n removedNodes = this.cache.removeRowNodes(allUniqueIdsToRemove);\n }\n const isClientSideSortingEnabled = this.gos.get(\"serverSideEnableClientSideSort\");\n const isUpdateOrAdd = (updatedNodes == null ? void 0 : updatedNodes.length) || (insertedNodes == null ? void 0 : insertedNodes.length);\n const isClientSideSort = allRowsLoaded && isClientSideSortingEnabled;\n if (isClientSideSort && isUpdateOrAdd) {\n this.cache.clientSideSortRows();\n }\n this.updateSelectionAfterTransaction(updatedNodes, removedNodes);\n return {\n status: ServerSideTransactionResultStatus2.Applied,\n update: updatedNodes,\n add: insertedNodes,\n remove: removedNodes\n };\n }\n updateSelectionAfterTransaction(updatedNodes, removedNodes) {\n const nodesToDeselect = [];\n updatedNodes == null ? void 0 : updatedNodes.forEach((node) => {\n if (node.isSelected() && !node.selectable) {\n nodesToDeselect.push(node);\n }\n });\n removedNodes == null ? void 0 : removedNodes.forEach((node) => {\n if (node.isSelected()) {\n nodesToDeselect.push(node);\n }\n });\n if (nodesToDeselect.length) {\n this.selectionService.setNodesSelected({\n newValue: false,\n clearSelection: false,\n nodes: nodesToDeselect,\n source: \"rowDataChanged\"\n });\n }\n }\n /**\n * Clear the display indexes, used for fading rows out when stores are not being destroyed\n */\n clearDisplayIndexes() {\n this.displayIndexStart = void 0;\n this.displayIndexEnd = void 0;\n this.cache.getNodes().forEach((lazyNode) => this.blockUtils.clearDisplayIndex(lazyNode.node));\n if (this.parentRowNode.sibling) {\n this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling);\n }\n this.cache.clearDisplayIndexes();\n }\n /**\n * @returns an index representing the last sequentially displayed row in the grid for this store\n */\n getDisplayIndexStart() {\n return this.displayIndexStart;\n }\n /**\n * @returns the index representing one after the last sequentially displayed row in the grid for this store\n */\n getDisplayIndexEnd() {\n return this.displayIndexEnd;\n }\n /** \n * @returns the virtual size of this store\n */\n getRowCount() {\n if (this.parentRowNode.sibling) {\n return this.cache.getRowCount() + 1;\n }\n return this.cache.getRowCount();\n }\n /** \n * Sets the current row count of the store, and whether the last row index is known\n */\n setRowCount(rowCount, isLastRowIndexKnown) {\n this.cache.setRowCount(rowCount, isLastRowIndexKnown);\n }\n /**\n * Given a display index, returns whether that row is within this store or a child store of this store\n * \n * @param displayIndex the visible index of a row\n * @returns whether or not the row exists within this store\n */\n isDisplayIndexInStore(displayIndex) {\n if (this.cache.getRowCount() === 0)\n return false;\n return this.displayIndexStart <= displayIndex && displayIndex < this.getDisplayIndexEnd();\n }\n /**\n * Recursively sets up the display indexes and top position of every node belonging to this store.\n * \n * Called after a row height changes, or a store updated event.\n * \n * @param displayIndexSeq the number sequence for generating the display index of each row\n * @param nextRowTop an object containing the next row top value intended to be modified by ref per row\n */\n setDisplayIndexes(displayIndexSeq, nextRowTop) {\n this.displayIndexStart = displayIndexSeq.peek();\n this.topPx = nextRowTop.value;\n const footerNode = this.parentRowNode.level > -1 && this.gos.getGroupTotalRowCallback()({ node: this.parentRowNode });\n if (!footerNode) {\n this.parentRowNode.destroyFooter();\n }\n if (footerNode === \"top\") {\n this.parentRowNode.createFooter();\n this.blockUtils.setDisplayIndex(this.parentRowNode.sibling, displayIndexSeq, nextRowTop);\n }\n this.cache.setDisplayIndexes(displayIndexSeq, nextRowTop);\n if (footerNode === \"bottom\") {\n this.parentRowNode.createFooter();\n this.blockUtils.setDisplayIndex(this.parentRowNode.sibling, displayIndexSeq, nextRowTop);\n }\n this.displayIndexEnd = displayIndexSeq.peek();\n this.heightPx = nextRowTop.value - this.topPx;\n }\n /**\n * Recursively applies a provided function to every node\n * \n * For the purpose of exclusively server side filtered stores, this is the same as getNodes().forEachDeepAfterFilterAndSort\n */\n forEachStoreDeep(callback, sequence = new NumberSequence3()) {\n callback(this, sequence.next());\n this.cache.getNodes().forEach((lazyNode) => {\n const childCache = lazyNode.node.childStore;\n if (childCache) {\n childCache.forEachStoreDeep(callback, sequence);\n }\n });\n }\n /**\n * Recursively applies a provided function to every node\n * \n * For the purpose of exclusively server side filtered stores, this is the same as getNodes().forEachDeepAfterFilterAndSort\n */\n forEachNodeDeep(callback, sequence = new NumberSequence3()) {\n this.cache.getNodes().forEach((lazyNode) => {\n callback(lazyNode.node, sequence.next());\n const childCache = lazyNode.node.childStore;\n if (childCache) {\n childCache.forEachNodeDeep(callback, sequence);\n }\n });\n }\n /**\n * Recursively applies a provided function to every node\n * \n * For the purpose of exclusively server side filtered stores, this is the same as getNodes().forEachDeep\n */\n forEachNodeDeepAfterFilterAndSort(callback, sequence = new NumberSequence3(), includeFooterNodes = false) {\n const footerNode = this.parentRowNode.level > -1 && this.gos.getGroupTotalRowCallback()({ node: this.parentRowNode });\n if (footerNode === \"top\") {\n callback(this.parentRowNode.sibling, sequence.next());\n }\n const orderedNodes = this.cache.getOrderedNodeMap();\n for (let key in orderedNodes) {\n const lazyNode = orderedNodes[key];\n callback(lazyNode.node, sequence.next());\n const childCache = lazyNode.node.childStore;\n if (childCache) {\n childCache.forEachNodeDeepAfterFilterAndSort(callback, sequence, includeFooterNodes);\n }\n }\n if (footerNode === \"bottom\") {\n callback(this.parentRowNode.sibling, sequence.next());\n }\n }\n /**\n * Removes the failed status from all nodes, and marks them as stub to encourage reloading\n */\n retryLoads() {\n this.cache.getNodes().forEach(({ node }) => {\n if (node.failedLoad) {\n node.failedLoad = false;\n node.__needsRefreshWhenVisible = true;\n node.stub = true;\n }\n });\n this.forEachChildStoreShallow((store) => store.retryLoads());\n this.fireStoreUpdatedEvent();\n }\n /**\n * Given a display index, returns the row at that location.\n * \n * @param displayRowIndex the displayed index within the grid to search for\n * @returns the row node if the display index falls within the store, if it didn't exist this will create a new stub to return\n */\n getRowUsingDisplayIndex(displayRowIndex) {\n if (this.parentRowNode.sibling && displayRowIndex === this.parentRowNode.sibling.rowIndex) {\n return this.parentRowNode.sibling;\n }\n return this.cache.getRowByDisplayIndex(displayRowIndex);\n }\n /**\n * Given a display index, returns the row top and height for the row at that index.\n * \n * @param displayIndex the display index of the node\n * @returns an object containing the rowTop and rowHeight of the node at the given displayIndex\n */\n getRowBounds(displayIndex) {\n var _a;\n if (!this.isDisplayIndexInStore(displayIndex)) {\n return null;\n }\n const thisNode = this.cache.getNodeCachedByDisplayIndex(displayIndex);\n if (thisNode) {\n const boundsFromRow = this.blockUtils.extractRowBounds(thisNode, displayIndex);\n if (boundsFromRow) {\n return boundsFromRow;\n }\n }\n const { previousNode, nextNode } = (_a = this.cache.getSurroundingNodesByDisplayIndex(displayIndex)) != null ? _a : {};\n if (previousNode) {\n const boundsFromRow = this.blockUtils.extractRowBounds(previousNode.node, displayIndex);\n if (boundsFromRow != null) {\n return boundsFromRow;\n }\n }\n const defaultRowHeight = this.gos.getRowHeightAsNumber();\n if (nextNode) {\n const numberOfRowDiff2 = (nextNode.node.rowIndex - displayIndex) * defaultRowHeight;\n return {\n rowTop: nextNode.node.rowTop - numberOfRowDiff2,\n rowHeight: defaultRowHeight\n };\n }\n const lastTop = this.topPx + this.heightPx;\n const numberOfRowDiff = (this.getDisplayIndexEnd() - displayIndex) * defaultRowHeight;\n return {\n rowTop: lastTop - numberOfRowDiff,\n rowHeight: defaultRowHeight\n };\n }\n /**\n * Given a vertical pixel, determines whether this store contains a row at that pixel\n * \n * @param pixel a vertical pixel position from the grid\n * @returns whether that pixel points to a virtual space belonging to this store\n */\n isPixelInRange(pixel) {\n return pixel >= this.topPx && pixel < this.topPx + this.heightPx;\n }\n /**\n * Given a vertical pixel, returns the row existing at that pixel location\n * \n * @param pixel a vertical pixel position from the grid\n * @returns the display index at the given pixel location\n */\n getRowIndexAtPixel(pixel) {\n if (pixel < this.topPx) {\n return this.getDisplayIndexStart();\n }\n if (pixel >= this.topPx + this.heightPx) {\n return this.getDisplayIndexEnd() - 1;\n }\n if (this.parentRowNode.sibling && pixel > this.parentRowNode.sibling.rowTop && pixel < this.parentRowNode.sibling.rowTop + this.parentRowNode.sibling.rowHeight) {\n return this.parentRowNode.sibling.rowIndex;\n }\n let distToPreviousNodeTop = Number.MAX_SAFE_INTEGER;\n let previousNode = null;\n let distToNextNodeTop = Number.MAX_SAFE_INTEGER;\n let nextNode = null;\n this.cache.getNodes().forEach(({ node }) => {\n const distBetween = Math.abs(pixel - node.rowTop);\n if (node.rowTop < pixel) {\n if (distBetween < distToPreviousNodeTop) {\n distToPreviousNodeTop = distBetween;\n previousNode = node;\n }\n return;\n }\n if (distBetween < distToNextNodeTop) {\n distToNextNodeTop = distBetween;\n nextNode = node;\n }\n });\n previousNode = previousNode;\n nextNode = nextNode;\n if (previousNode) {\n const indexOfRow = this.blockUtils.getIndexAtPixel(previousNode, pixel);\n if (indexOfRow != null) {\n return indexOfRow;\n }\n }\n const defaultRowHeight = this.gos.getRowHeightAsNumber();\n if (nextNode) {\n const nextTop2 = nextNode.rowTop;\n const numberOfRowDiff2 = Math.ceil((nextTop2 - pixel) / defaultRowHeight);\n return nextNode.rowIndex - numberOfRowDiff2;\n }\n const nextTop = this.topPx + this.heightPx;\n const numberOfRowDiff = Math.floor((nextTop - pixel) / defaultRowHeight);\n return this.getDisplayIndexEnd() - numberOfRowDiff;\n }\n /**\n * Given a path of group keys, returns the child store for that group.\n * \n * @param keys the grouping path to the desired store\n * @returns the child store for the given keys, or null if not found\n */\n getChildStore(keys) {\n return this.storeUtils.getChildStore(keys, this, (key) => {\n const lazyNode = this.cache.getNodes().find((lazyNode2) => lazyNode2.node.key == key);\n if (!lazyNode) {\n return null;\n }\n return lazyNode.node;\n });\n }\n /**\n * Executes a provided callback on each child store belonging to this store\n * \n * @param cb the callback to execute\n */\n forEachChildStoreShallow(cb) {\n this.cache.getNodes().forEach(({ node }) => {\n if (node.childStore) {\n cb(node.childStore);\n }\n });\n }\n /**\n * Executes after a change to sorting, determines recursively whether this store or a child requires refreshed.\n * \n * If a purge refresh occurs, the row count is preserved.\n * \n * @param params a set of properties pertaining to the sort changes\n */\n refreshAfterSort(params) {\n const serverSortsAllLevels = this.storeUtils.isServerSideSortAllLevels();\n if (serverSortsAllLevels || this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params)) {\n const allRowsLoaded = this.cache.isStoreFullyLoaded();\n const isClientSideSortingEnabled = this.gos.get(\"serverSideEnableClientSideSort\");\n const isClientSideSort = allRowsLoaded && isClientSideSortingEnabled;\n if (!isClientSideSort) {\n const oldCount = this.cache.getRowCount();\n this.destroyBean(this.cache);\n this.cache = this.createManagedBean(new LazyCache(this, oldCount, this.storeParams));\n return;\n }\n this.cache.clientSideSortRows();\n }\n this.forEachChildStoreShallow((store) => store.refreshAfterSort(params));\n }\n /**\n * Executes after a change to filtering, determines recursively whether this store or a child requires refreshed.\n * \n * If a refresh occurs, the row count is reset.\n * \n * @param params a set of properties pertaining to the filter changes\n */\n refreshAfterFilter(params) {\n const serverFiltersAllLevels = !this.storeUtils.isServerSideOnlyRefreshFilteredGroups();\n if (serverFiltersAllLevels || this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params)) {\n this.refreshStore(true);\n return;\n }\n this.forEachChildStoreShallow((store) => store.refreshAfterFilter(params));\n }\n /**\n * Marks all existing nodes as requiring reloaded, and triggers a load check\n *\n * @param purge whether to remove all nodes and data in favour of stub nodes\n */\n refreshStore(purge) {\n if (purge) {\n this.destroyBean(this.cache);\n this.cache = this.createManagedBean(new LazyCache(this, 1, this.storeParams));\n this.fireStoreUpdatedEvent();\n return;\n }\n this.cache.markNodesForRefresh();\n }\n /**\n * Used for pagination, given a local/store index, returns the display index of that row\n * \n * @param topLevelIndex the store index of a row\n * @returns the display index for the given store index\n */\n getTopLevelRowDisplayedIndex(topLevelIndex) {\n const displayIndex = this.cache.getDisplayIndexFromStoreIndex(topLevelIndex);\n return displayIndex != null ? displayIndex : topLevelIndex;\n }\n /**\n * Used for pagination to determine if the last page is known, and for aria to determine if the last grid row is known\n * \n * @returns whether the last index of this store is known, or if lazy loading still required\n */\n isLastRowIndexKnown() {\n return this.cache.isLastRowIndexKnown();\n }\n /**\n * Used by the selection service to select a range of nodes\n * \n * @param firstInRange the first node in the range to find\n * @param lastInRange the last node in the range to find\n * @returns a range of nodes between firstInRange and lastInRange inclusive\n */\n getRowNodesInRange(firstInRange, lastInRange) {\n const result = [];\n let inActiveRange = false;\n if (_217.missing(firstInRange)) {\n inActiveRange = true;\n }\n return this.cache.getNodes().filter(({ node }) => {\n return node.rowIndex >= firstInRange.rowIndex && node.rowIndex <= lastInRange.rowIndex;\n }).map(({ node }) => node);\n }\n /**\n * Mutates a given array to add this stores state, and recursively add all the children store states.\n * \n * @param result a mutable results array\n */\n addStoreStates(result) {\n result.push({\n suppressInfiniteScroll: false,\n route: this.parentRowNode.getGroupKeys(),\n rowCount: this.getRowCount(),\n lastRowIndexKnown: this.isLastRowIndexKnown(),\n info: this.info,\n maxBlocksInCache: this.storeParams.maxBlocksInCache,\n cacheBlockSize: this.storeParams.cacheBlockSize\n });\n this.forEachChildStoreShallow((childStore) => childStore.addStoreStates(result));\n }\n getIdSequence() {\n return this.idSequence;\n }\n getParentNode() {\n return this.parentRowNode;\n }\n getRowDetails() {\n return {\n field: this.groupField,\n group: this.group,\n leafGroup: this.leafGroup,\n level: this.level,\n parent: this.parentRowNode,\n rowGroupColumn: this.rowGroupColumn\n };\n }\n getSsrmParams() {\n return this.ssrmParams;\n }\n setStoreInfo(info) {\n if (info) {\n Object.assign(this.info, info);\n }\n }\n // gets called 1) row count changed 2) cache purged\n fireStoreUpdatedEvent() {\n const event = {\n type: Events29.EVENT_STORE_UPDATED\n };\n this.eventService.dispatchEvent(event);\n }\n // gets called when row data updated, and no more refreshing needed\n fireRefreshFinishedEvent() {\n const event = {\n type: Events29.EVENT_STORE_REFRESHED,\n route: this.parentRowNode.getRoute()\n };\n this.eventService.dispatchEvent(event);\n }\n getBlockStates() {\n return this.cache.getBlockStates();\n }\n getStoreBounds() {\n return {\n topPx: this.topPx,\n heightPx: this.heightPx\n };\n }\n getCache() {\n return this.cache;\n }\n};\n__decorateClass14([\n Autowired415(\"ssrmBlockUtils\")\n], LazyStore.prototype, \"blockUtils\", 2);\n__decorateClass14([\n Autowired415(\"ssrmStoreUtils\")\n], LazyStore.prototype, \"storeUtils\", 2);\n__decorateClass14([\n Autowired415(\"columnModel\")\n], LazyStore.prototype, \"columnModel\", 2);\n__decorateClass14([\n Autowired415(\"selectionService\")\n], LazyStore.prototype, \"selectionService\", 2);\n__decorateClass14([\n PostConstruct413\n], LazyStore.prototype, \"init\", 1);\n__decorateClass14([\n PreDestroy32\n], LazyStore.prototype, \"destroyRowNodes\", 1);\nvar ServerSideRowModel = class extends BeanStub45 {\n constructor() {\n super(...arguments);\n this.onRowHeightChanged_debounced = _314.debounce(this.onRowHeightChanged.bind(this), 100);\n this.pauseStoreUpdateListening = false;\n this.started = false;\n this.managingPivotResultColumns = false;\n }\n // we don't implement as lazy row heights is not supported in this row model\n ensureRowHeightsValid() {\n return false;\n }\n start() {\n this.started = true;\n this.updateDatasource();\n }\n destroyDatasource() {\n if (!this.datasource) {\n return;\n }\n if (this.datasource.destroy) {\n this.datasource.destroy();\n }\n this.rowRenderer.datasourceChanged();\n this.datasource = void 0;\n }\n addEventListeners() {\n this.addManagedListener(this.eventService, Events37.EVENT_NEW_COLUMNS_LOADED, this.onColumnEverything.bind(this));\n this.addManagedListener(this.eventService, Events37.EVENT_STORE_UPDATED, this.onStoreUpdated.bind(this));\n const resetListener = this.resetRootStore.bind(this);\n this.addManagedListener(this.eventService, Events37.EVENT_COLUMN_VALUE_CHANGED, resetListener);\n this.addManagedListener(this.eventService, Events37.EVENT_COLUMN_PIVOT_CHANGED, resetListener);\n this.addManagedListener(this.eventService, Events37.EVENT_COLUMN_ROW_GROUP_CHANGED, resetListener);\n this.addManagedListener(this.eventService, Events37.EVENT_COLUMN_PIVOT_MODE_CHANGED, resetListener);\n this.addManagedPropertyListeners([\n /**\n * Following properties omitted as they are likely to come with undesired side effects.\n * 'getRowId', 'isRowMaster', 'getRowHeight', 'isServerSideGroup', 'getServerSideGroupKey',\n * */\n \"masterDetail\",\n \"treeData\",\n \"removePivotHeaderRowWhenSingleValueColumn\",\n \"suppressServerSideInfiniteScroll\",\n \"cacheBlockSize\"\n ], resetListener);\n this.addManagedPropertyListener(\"rowHeight\", () => this.resetRowHeights());\n this.verifyProps();\n this.addManagedPropertyListener(\"serverSideDatasource\", () => this.updateDatasource());\n }\n updateDatasource() {\n const datasource = this.gos.get(\"serverSideDatasource\");\n if (datasource) {\n this.setDatasource(datasource);\n }\n }\n verifyProps() {\n if (this.gos.exists(\"initialGroupOrderComparator\")) {\n _314.warnOnce(`initialGroupOrderComparator cannot be used with Server Side Row Model.`);\n }\n if (this.gos.isRowSelection() && !this.gos.exists(\"getRowId\")) {\n _314.warnOnce(`getRowId callback must be provided for Server Side Row Model selection to work correctly.`);\n }\n }\n setDatasource(datasource) {\n if (!this.started) {\n return;\n }\n this.destroyDatasource();\n this.datasource = datasource;\n this.resetRootStore();\n }\n applyRowData(rowDataParams, startRow, route) {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n const storeToExecuteOn = rootStore.getChildStore(route);\n if (!storeToExecuteOn) {\n return;\n }\n ;\n if (storeToExecuteOn instanceof LazyStore) {\n storeToExecuteOn.applyRowData(rowDataParams, startRow, rowDataParams.rowData.length);\n } else if (storeToExecuteOn instanceof FullStore) {\n storeToExecuteOn.processServerResult(rowDataParams);\n }\n }\n isLastRowIndexKnown() {\n const cache = this.getRootStore();\n if (!cache) {\n return false;\n }\n return cache.isLastRowIndexKnown();\n }\n onColumnEverything() {\n if (!this.storeParams) {\n this.resetRootStore();\n return;\n }\n const rowGroupColumnVos = this.columnsToValueObjects(this.columnModel.getRowGroupColumns());\n const valueColumnVos = this.columnsToValueObjects(this.columnModel.getValueColumns());\n const pivotColumnVos = this.columnsToValueObjects(this.columnModel.getPivotColumns());\n const areColsSame = (params) => {\n const oldColsMap = {};\n params.oldCols.forEach((col) => oldColsMap[col.id] = col);\n const allColsUnchanged = params.newCols.every((col) => {\n const equivalentCol = oldColsMap[col.id];\n if (equivalentCol) {\n delete oldColsMap[col.id];\n }\n return equivalentCol && equivalentCol.field === col.field && equivalentCol.aggFunc === col.aggFunc;\n });\n const missingCols = !params.allowRemovedColumns && !!Object.values(oldColsMap).length;\n return allColsUnchanged && !missingCols;\n };\n const sortModelDifferent = !_314.jsonEquals(this.storeParams.sortModel, this.sortController.getSortModel());\n const rowGroupDifferent = !areColsSame({\n oldCols: this.storeParams.rowGroupCols,\n newCols: rowGroupColumnVos\n });\n const pivotDifferent = !areColsSame({\n oldCols: this.storeParams.pivotCols,\n newCols: pivotColumnVos\n });\n const valuesDifferent = !!(rowGroupColumnVos == null ? void 0 : rowGroupColumnVos.length) && !areColsSame({\n oldCols: this.storeParams.valueCols,\n newCols: valueColumnVos,\n allowRemovedColumns: true\n });\n const resetRequired = sortModelDifferent || rowGroupDifferent || pivotDifferent || valuesDifferent;\n if (resetRequired) {\n this.resetRootStore();\n } else {\n const newParams = this.createStoreParams();\n this.storeParams.rowGroupCols = newParams.rowGroupCols;\n this.storeParams.pivotCols = newParams.pivotCols;\n this.storeParams.valueCols = newParams.valueCols;\n }\n }\n destroyRootStore() {\n if (!this.rootNode || !this.rootNode.childStore) {\n return;\n }\n this.rootNode.childStore = this.destroyBean(this.rootNode.childStore);\n this.nodeManager.clear();\n }\n refreshAfterSort(newSortModel, params) {\n if (this.storeParams) {\n this.storeParams.sortModel = newSortModel;\n }\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.refreshAfterSort(params);\n this.onStoreUpdated();\n }\n generateSecondaryColumns(pivotFields) {\n if (!this.pivotColDefService) {\n ModuleRegistry6.__assertRegistered(ModuleNames15.RowGroupingModule, \"pivotResultFields\", this.context.getGridId());\n return;\n }\n const pivotColumnGroupDefs = this.pivotColDefService.createColDefsFromFields(pivotFields);\n this.managingPivotResultColumns = true;\n this.columnModel.setSecondaryColumns(pivotColumnGroupDefs, \"rowModelUpdated\");\n }\n resetRowHeights() {\n const atLeastOne = this.resetRowHeightsForAllRowNodes();\n const rootNodeHeight = this.gos.getRowHeightForNode(this.rootNode);\n this.rootNode.setRowHeight(rootNodeHeight.height, rootNodeHeight.estimated);\n if (this.rootNode.sibling) {\n const rootNodeSibling = this.gos.getRowHeightForNode(this.rootNode.sibling);\n this.rootNode.sibling.setRowHeight(rootNodeSibling.height, rootNodeSibling.estimated);\n }\n if (atLeastOne) {\n this.onRowHeightChanged();\n }\n }\n resetRowHeightsForAllRowNodes() {\n let atLeastOne = false;\n this.forEachNode((rowNode) => {\n const rowHeightForNode = this.gos.getRowHeightForNode(rowNode);\n rowNode.setRowHeight(rowHeightForNode.height, rowHeightForNode.estimated);\n const detailNode = rowNode.detailNode;\n if (detailNode) {\n const detailRowHeight = this.gos.getRowHeightForNode(detailNode);\n detailNode.setRowHeight(detailRowHeight.height, detailRowHeight.estimated);\n }\n if (rowNode.sibling) {\n const siblingRowHeight = this.gos.getRowHeightForNode(rowNode.sibling);\n detailNode.setRowHeight(siblingRowHeight.height, siblingRowHeight.estimated);\n }\n atLeastOne = true;\n });\n return atLeastOne;\n }\n resetRootStore() {\n this.destroyRootStore();\n this.rootNode = new RowNode5(this.beans);\n this.rootNode.group = true;\n this.rootNode.level = -1;\n if (this.datasource) {\n this.storeParams = this.createStoreParams();\n this.rootNode.childStore = this.createBean(this.storeFactory.createStore(this.storeParams, this.rootNode));\n this.updateRowIndexesAndBounds();\n }\n if (this.managingPivotResultColumns) {\n this.columnModel.setSecondaryColumns(null, \"api\");\n this.managingPivotResultColumns = false;\n }\n this.dispatchModelUpdated(true);\n }\n columnsToValueObjects(columns) {\n return columns.map((col) => ({\n id: col.getId(),\n aggFunc: col.getAggFunc(),\n displayName: this.columnModel.getDisplayNameForColumn(col, \"model\"),\n field: col.getColDef().field\n }));\n }\n createStoreParams() {\n const rowGroupColumnVos = this.columnsToValueObjects(this.columnModel.getRowGroupColumns());\n const valueColumnVos = this.columnsToValueObjects(this.columnModel.getValueColumns());\n const pivotColumnVos = this.columnsToValueObjects(this.columnModel.getPivotColumns());\n const dynamicRowHeight = this.gos.isGetRowHeightFunction();\n const params = {\n // the columns the user has grouped and aggregated by\n valueCols: valueColumnVos,\n rowGroupCols: rowGroupColumnVos,\n pivotCols: pivotColumnVos,\n pivotMode: this.columnModel.isPivotMode(),\n // sort and filter model\n filterModel: this.filterManager.isAdvancedFilterEnabled() ? this.filterManager.getAdvancedFilterModel() : this.filterManager.getFilterModel(),\n sortModel: this.sortController.getSortModel(),\n datasource: this.datasource,\n lastAccessedSequence: new NumberSequence4(),\n // blockSize: blockSize == null ? 100 : blockSize,\n dynamicRowHeight\n };\n return params;\n }\n getParams() {\n return this.storeParams;\n }\n dispatchModelUpdated(reset = false) {\n const modelUpdatedEvent = {\n type: Events37.EVENT_MODEL_UPDATED,\n animate: !reset,\n keepRenderedRows: !reset,\n newPage: false,\n newData: false\n };\n this.eventService.dispatchEvent(modelUpdatedEvent);\n }\n onStoreUpdated() {\n if (this.pauseStoreUpdateListening) {\n return;\n }\n this.updateRowIndexesAndBounds();\n this.dispatchModelUpdated();\n }\n /** This method is debounced. It is used for row auto-height. If we don't debounce,\n * then the Row Models will end up recalculating each row position\n * for each row height change and result in the Row Renderer laying out rows.\n * This is particularly bad if using print layout, and showing eg 1,000 rows,\n * each row will change it's height, causing Row Model to update 1,000 times.\n */\n onRowHeightChangedDebounced() {\n this.onRowHeightChanged_debounced();\n }\n onRowHeightChanged() {\n this.updateRowIndexesAndBounds();\n this.dispatchModelUpdated();\n }\n updateRowIndexesAndBounds() {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.setDisplayIndexes(new NumberSequence4(), { value: 0 });\n }\n retryLoads() {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.retryLoads();\n this.onStoreUpdated();\n }\n getRow(index) {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return void 0;\n }\n return rootStore.getRowUsingDisplayIndex(index);\n }\n /**\n * Pauses the store, to prevent it updating the UI. This is used when doing batch updates to the store.\n */\n setPaused(paused) {\n this.pauseStoreUpdateListening = paused;\n }\n expandAll(value) {\n this.pauseStoreUpdateListening = true;\n this.forEachNode((node) => {\n if (node.stub) {\n return;\n }\n if (node.hasChildren()) {\n node.setExpanded(value);\n }\n });\n this.pauseStoreUpdateListening = false;\n this.onStoreUpdated();\n }\n refreshAfterFilter(newFilterModel, params) {\n if (this.storeParams) {\n this.storeParams.filterModel = newFilterModel;\n }\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.refreshAfterFilter(params);\n this.onStoreUpdated();\n }\n getRootStore() {\n if (this.rootNode && this.rootNode.childStore) {\n return this.rootNode.childStore;\n }\n }\n getRowCount() {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return 0;\n }\n return rootStore.getDisplayIndexEnd();\n }\n getTopLevelRowCount() {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return 1;\n }\n return rootStore.getRowCount();\n }\n getTopLevelRowDisplayedIndex(topLevelIndex) {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return topLevelIndex;\n }\n return rootStore.getTopLevelRowDisplayedIndex(topLevelIndex);\n }\n getRowBounds(index) {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n const rowHeight = this.gos.getRowHeightAsNumber();\n return {\n rowTop: 0,\n rowHeight\n };\n }\n return rootStore.getRowBounds(index);\n }\n getBlockStates() {\n const root = this.getRootStore();\n if (!root) {\n return void 0;\n }\n const states = {};\n root.forEachStoreDeep((store) => {\n if (store instanceof FullStore) {\n const { id, state } = store.getBlockStateJson();\n states[id] = state;\n } else if (store instanceof LazyStore) {\n Object.entries(store.getBlockStates()).forEach(([block, state]) => {\n states[block] = state;\n });\n } else {\n throw new Error(\"AG Grid: Unsupported store type\");\n }\n });\n return states;\n }\n getRowIndexAtPixel(pixel) {\n const rootStore = this.getRootStore();\n if (pixel <= 0 || !rootStore) {\n return 0;\n }\n return rootStore.getRowIndexAtPixel(pixel);\n }\n isEmpty() {\n return false;\n }\n isRowsToRender() {\n return this.getRootStore() != null && this.getRowCount() > 0;\n }\n getType() {\n return \"serverSide\";\n }\n forEachNode(callback) {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.forEachNodeDeep(callback);\n }\n forEachNodeAfterFilterAndSort(callback, includeFooterNodes = false) {\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return;\n }\n rootStore.forEachNodeDeepAfterFilterAndSort(callback, void 0, includeFooterNodes);\n }\n /** @return false if store hasn't started */\n executeOnStore(route, callback) {\n if (!this.started) {\n return false;\n }\n const rootStore = this.getRootStore();\n if (!rootStore) {\n return true;\n }\n const storeToExecuteOn = rootStore.getChildStore(route);\n if (storeToExecuteOn) {\n callback(storeToExecuteOn);\n }\n return true;\n }\n refreshStore(params = {}) {\n const route = params.route ? params.route : [];\n this.executeOnStore(route, (store) => store.refreshStore(params.purge == true));\n }\n getStoreState() {\n const res = [];\n const rootStore = this.getRootStore();\n if (rootStore) {\n rootStore.addStoreStates(res);\n }\n return res;\n }\n getNodesInRangeForSelection(firstInRange, lastInRange) {\n if (!_314.exists(firstInRange)) {\n return [];\n }\n if (!lastInRange) {\n return [firstInRange];\n }\n const startIndex = firstInRange.rowIndex;\n const endIndex = lastInRange.rowIndex;\n if (startIndex === null || endIndex === null) {\n return [firstInRange];\n }\n const nodeRange = [];\n const [firstIndex, lastIndex] = [startIndex, endIndex].sort((a, b) => a - b);\n this.forEachNode((node) => {\n const thisRowIndex = node.rowIndex;\n if (thisRowIndex == null || node.stub) {\n return;\n }\n if (thisRowIndex >= firstIndex && thisRowIndex <= lastIndex) {\n nodeRange.push(node);\n }\n });\n if (nodeRange.length !== lastIndex - firstIndex + 1) {\n return [firstInRange];\n }\n return nodeRange;\n }\n getRowNode(id) {\n let result;\n this.forEachNode((rowNode) => {\n if (rowNode.id === id) {\n result = rowNode;\n }\n if (rowNode.detailNode && rowNode.detailNode.id === id) {\n result = rowNode.detailNode;\n }\n });\n return result;\n }\n isRowPresent(rowNode) {\n const foundRowNode = this.getRowNode(rowNode.id);\n return !!foundRowNode;\n }\n setRowCount(rowCount, lastRowIndexKnown) {\n const rootStore = this.getRootStore();\n if (rootStore) {\n if (rootStore instanceof LazyStore) {\n rootStore.setRowCount(rowCount, lastRowIndexKnown);\n return;\n }\n console.error(\"AG Grid: Infinite scrolling must be enabled in order to set the row count.\");\n }\n }\n};\n__decorateClass14([\n Autowired511(\"columnModel\")\n], ServerSideRowModel.prototype, \"columnModel\", 2);\n__decorateClass14([\n Autowired511(\"filterManager\")\n], ServerSideRowModel.prototype, \"filterManager\", 2);\n__decorateClass14([\n Autowired511(\"sortController\")\n], ServerSideRowModel.prototype, \"sortController\", 2);\n__decorateClass14([\n Autowired511(\"rowRenderer\")\n], ServerSideRowModel.prototype, \"rowRenderer\", 2);\n__decorateClass14([\n Autowired511(\"ssrmNodeManager\")\n], ServerSideRowModel.prototype, \"nodeManager\", 2);\n__decorateClass14([\n Autowired511(\"ssrmStoreFactory\")\n], ServerSideRowModel.prototype, \"storeFactory\", 2);\n__decorateClass14([\n Autowired511(\"beans\")\n], ServerSideRowModel.prototype, \"beans\", 2);\n__decorateClass14([\n Optional6(\"pivotColDefService\")\n], ServerSideRowModel.prototype, \"pivotColDefService\", 2);\n__decorateClass14([\n PreDestroy4\n], ServerSideRowModel.prototype, \"destroyDatasource\", 1);\n__decorateClass14([\n PostConstruct510\n], ServerSideRowModel.prototype, \"addEventListeners\", 1);\n__decorateClass14([\n PreDestroy4\n], ServerSideRowModel.prototype, \"destroyRootStore\", 1);\nServerSideRowModel = __decorateClass14([\n Bean28(\"rowModel\")\n], ServerSideRowModel);\nvar StoreUtils = class extends BeanStub55 {\n loadFromDatasource(p) {\n const { storeParams, parentBlock, parentNode } = p;\n const groupKeys = parentNode.getGroupKeys();\n if (!storeParams.datasource) {\n return;\n }\n const request = {\n startRow: p.startRow,\n endRow: p.endRow,\n rowGroupCols: storeParams.rowGroupCols,\n valueCols: storeParams.valueCols,\n pivotCols: storeParams.pivotCols,\n pivotMode: storeParams.pivotMode,\n groupKeys,\n filterModel: storeParams.filterModel,\n sortModel: storeParams.sortModel\n };\n const getRowsParams = this.gos.addGridCommonParams({\n success: p.success,\n fail: p.fail,\n request,\n parentNode: p.parentNode\n });\n window.setTimeout(() => {\n if (!storeParams.datasource || !parentBlock.isAlive()) {\n p.fail();\n return;\n }\n storeParams.datasource.getRows(getRowsParams);\n }, 0);\n }\n getChildStore(keys, currentCache, findNodeFunc) {\n if (_411.missingOrEmpty(keys)) {\n return currentCache;\n }\n const nextKey = keys[0];\n const nextNode = findNodeFunc(nextKey);\n if (nextNode) {\n if (keys.length === 1 && !nextNode.childStore) {\n const storeParams = this.serverSideRowModel.getParams();\n nextNode.childStore = this.createBean(this.storeFactory.createStore(storeParams, nextNode));\n }\n const keyListForNextLevel = keys.slice(1, keys.length);\n const nextStore = nextNode.childStore;\n return nextStore ? nextStore.getChildStore(keyListForNextLevel) : null;\n }\n return null;\n }\n isServerRefreshNeeded(parentRowNode, rowGroupCols, params) {\n if (params.valueColChanged || params.secondaryColChanged) {\n return true;\n }\n const level = parentRowNode.level + 1;\n const grouping = level < rowGroupCols.length;\n const leafNodes = !grouping;\n if (leafNodes) {\n return true;\n }\n const colIdThisGroup = rowGroupCols[level].id;\n const actionOnThisGroup = params.changedColumns.indexOf(colIdThisGroup) > -1;\n if (actionOnThisGroup) {\n return true;\n }\n const allCols = this.columnModel.getAllGridColumns();\n const affectedGroupCols = allCols.filter((col) => col.getColDef().showRowGroup && params.changedColumns.includes(col.getId())).map((col) => col.getColDef().showRowGroup).some((group) => group === true || group === colIdThisGroup);\n return affectedGroupCols;\n }\n getServerSideInitialRowCount() {\n return this.gos.get(\"serverSideInitialRowCount\");\n }\n assertRowModelIsServerSide(key) {\n if (!this.gos.isRowModelType(\"serverSide\")) {\n _411.warnOnce(`The '${key}' property can only be used with the Server Side Row Model.`);\n return false;\n }\n return true;\n }\n assertNotTreeData(key) {\n if (this.gos.get(\"treeData\")) {\n _411.warnOnce(`The '${key}' property cannot be used while using tree data.`);\n return false;\n }\n return true;\n }\n isServerSideSortAllLevels() {\n return this.gos.get(\"serverSideSortAllLevels\") && this.assertRowModelIsServerSide(\"serverSideSortAllLevels\");\n }\n isServerSideOnlyRefreshFilteredGroups() {\n return this.gos.get(\"serverSideOnlyRefreshFilteredGroups\") && this.assertRowModelIsServerSide(\"serverSideOnlyRefreshFilteredGroups\");\n }\n isServerSideSortOnServer() {\n return this.gos.get(\"serverSideSortOnServer\") && this.assertRowModelIsServerSide(\"serverSideSortOnServer\") && this.assertNotTreeData(\"serverSideSortOnServer\");\n }\n isServerSideFilterOnServer() {\n return this.gos.get(\"serverSideFilterOnServer\") && this.assertRowModelIsServerSide(\"serverSideFilterOnServer\") && this.assertNotTreeData(\"serverSideFilterOnServer\");\n }\n};\n__decorateClass14([\n Autowired67(\"columnModel\")\n], StoreUtils.prototype, \"columnModel\", 2);\n__decorateClass14([\n Autowired67(\"rowModel\")\n], StoreUtils.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired67(\"ssrmStoreFactory\")\n], StoreUtils.prototype, \"storeFactory\", 2);\nStoreUtils = __decorateClass14([\n Bean35(\"ssrmStoreUtils\")\n], StoreUtils);\nvar GROUP_MISSING_KEY_ID = \"ag-Grid-MissingKey\";\nvar BlockUtils = class extends BeanStub65 {\n createRowNode(params) {\n const rowNode = new RowNode7(this.beans);\n const rowHeight = params.rowHeight != null ? params.rowHeight : this.gos.getRowHeightAsNumber();\n rowNode.setRowHeight(rowHeight);\n rowNode.group = params.group;\n rowNode.leafGroup = params.leafGroup;\n rowNode.level = params.level;\n rowNode.uiLevel = params.level;\n rowNode.parent = params.parent;\n rowNode.stub = true;\n rowNode.__needsRefreshWhenVisible = false;\n if (rowNode.group) {\n rowNode.expanded = false;\n rowNode.field = params.field;\n rowNode.rowGroupColumn = params.rowGroupColumn;\n }\n return rowNode;\n }\n destroyRowNodes(rowNodes) {\n if (rowNodes) {\n rowNodes.forEach((row) => this.destroyRowNode(row));\n }\n }\n destroyRowNode(rowNode, preserveStore = false) {\n if (rowNode.childStore && !preserveStore) {\n this.destroyBean(rowNode.childStore);\n rowNode.childStore = null;\n }\n if (rowNode.sibling && !rowNode.footer) {\n this.destroyRowNode(rowNode.sibling, false);\n }\n rowNode.clearRowTopAndRowIndex();\n if (rowNode.id != null) {\n this.nodeManager.removeNode(rowNode);\n }\n }\n setTreeGroupInfo(rowNode) {\n rowNode.updateHasChildren();\n const getKeyFunc = this.gos.get(\"getServerSideGroupKey\");\n if (rowNode.hasChildren() && getKeyFunc != null) {\n rowNode.key = getKeyFunc(rowNode.data);\n }\n if (!rowNode.hasChildren() && rowNode.childStore != null) {\n this.destroyBean(rowNode.childStore);\n rowNode.childStore = null;\n rowNode.expanded = false;\n }\n }\n setRowGroupInfo(rowNode) {\n rowNode.key = this.valueService.getValue(rowNode.rowGroupColumn, rowNode);\n if (rowNode.key === null || rowNode.key === void 0) {\n _58.doOnce(() => {\n console.warn(`AG Grid: null and undefined values are not allowed for server side row model keys`);\n if (rowNode.rowGroupColumn) {\n console.warn(`column = ${rowNode.rowGroupColumn.getId()}`);\n }\n console.warn(`data is `, rowNode.data);\n }, \"ServerSideBlock-CannotHaveNullOrUndefinedForKey\");\n }\n const getGroupIncludeFooter = this.beans.gos.getGroupTotalRowCallback();\n const doesRowShowFooter = getGroupIncludeFooter({ node: rowNode });\n if (doesRowShowFooter) {\n rowNode.createFooter();\n if (rowNode.sibling) {\n rowNode.sibling.uiLevel = rowNode.uiLevel + 1;\n }\n }\n }\n setMasterDetailInfo(rowNode) {\n const isMasterFunc = this.gos.get(\"isRowMaster\");\n if (isMasterFunc != null) {\n rowNode.master = isMasterFunc(rowNode.data);\n } else {\n rowNode.master = true;\n }\n }\n updateDataIntoRowNode(rowNode, data) {\n rowNode.updateData(data);\n if (this.gos.get(\"treeData\")) {\n this.setTreeGroupInfo(rowNode);\n this.setChildCountIntoRowNode(rowNode);\n } else if (rowNode.group) {\n this.setChildCountIntoRowNode(rowNode);\n if (!rowNode.footer) {\n const getGroupIncludeFooter = this.beans.gos.getGroupTotalRowCallback();\n const doesRowShowFooter = getGroupIncludeFooter({ node: rowNode });\n if (doesRowShowFooter) {\n if (rowNode.sibling) {\n rowNode.sibling.updateData(data);\n } else {\n rowNode.createFooter();\n }\n } else if (rowNode.sibling) {\n rowNode.destroyFooter();\n }\n }\n } else if (this.gos.get(\"masterDetail\")) {\n }\n }\n setDataIntoRowNode(rowNode, data, defaultId, cachedRowHeight) {\n var _a;\n rowNode.stub = false;\n const treeData = this.gos.get(\"treeData\");\n if (_58.exists(data)) {\n rowNode.setDataAndId(data, defaultId);\n if (treeData) {\n this.setTreeGroupInfo(rowNode);\n } else if (rowNode.group) {\n this.setRowGroupInfo(rowNode);\n } else if (this.gos.get(\"masterDetail\")) {\n this.setMasterDetailInfo(rowNode);\n }\n } else {\n rowNode.setDataAndId(void 0, void 0);\n rowNode.key = null;\n }\n if (treeData || rowNode.group) {\n this.setGroupDataIntoRowNode(rowNode);\n this.setChildCountIntoRowNode(rowNode);\n }\n if (_58.exists(data)) {\n rowNode.setRowHeight(this.gos.getRowHeightForNode(rowNode, false, cachedRowHeight).height);\n (_a = rowNode.sibling) == null ? void 0 : _a.setRowHeight(this.gos.getRowHeightForNode(rowNode.sibling, false, cachedRowHeight).height);\n }\n }\n setChildCountIntoRowNode(rowNode) {\n const getChildCount = this.gos.get(\"getChildCount\");\n if (getChildCount) {\n rowNode.setAllChildrenCount(getChildCount(rowNode.data));\n }\n }\n setGroupDataIntoRowNode(rowNode) {\n const groupDisplayCols = this.columnModel.getGroupDisplayColumns();\n const usingTreeData = this.gos.get(\"treeData\");\n groupDisplayCols.forEach((col) => {\n if (rowNode.groupData == null) {\n rowNode.groupData = {};\n }\n if (usingTreeData) {\n rowNode.groupData[col.getColId()] = rowNode.key;\n } else if (col.isRowGroupDisplayed(rowNode.rowGroupColumn.getId())) {\n const groupValue = this.valueService.getValue(rowNode.rowGroupColumn, rowNode);\n rowNode.groupData[col.getColId()] = groupValue;\n }\n });\n }\n clearDisplayIndex(rowNode) {\n rowNode.clearRowTopAndRowIndex();\n const hasChildStore = rowNode.hasChildren() && _58.exists(rowNode.childStore);\n if (hasChildStore) {\n const childStore = rowNode.childStore;\n childStore.clearDisplayIndexes();\n }\n const hasDetailNode = rowNode.master && rowNode.detailNode;\n if (hasDetailNode) {\n rowNode.detailNode.clearRowTopAndRowIndex();\n }\n }\n setDisplayIndex(rowNode, displayIndexSeq, nextRowTop) {\n rowNode.setRowIndex(displayIndexSeq.next());\n rowNode.setRowTop(nextRowTop.value);\n nextRowTop.value += rowNode.rowHeight;\n if (rowNode.footer) {\n return;\n }\n const hasDetailRow = rowNode.master;\n if (hasDetailRow) {\n if (rowNode.expanded && rowNode.detailNode) {\n rowNode.detailNode.setRowIndex(displayIndexSeq.next());\n rowNode.detailNode.setRowTop(nextRowTop.value);\n nextRowTop.value += rowNode.detailNode.rowHeight;\n } else if (rowNode.detailNode) {\n rowNode.detailNode.clearRowTopAndRowIndex();\n }\n }\n const hasChildStore = rowNode.hasChildren() && _58.exists(rowNode.childStore);\n if (hasChildStore) {\n const childStore = rowNode.childStore;\n if (rowNode.expanded) {\n childStore.setDisplayIndexes(displayIndexSeq, nextRowTop);\n } else {\n childStore.clearDisplayIndexes();\n }\n }\n }\n binarySearchForDisplayIndex(displayRowIndex, rowNodes) {\n let bottomPointer = 0;\n let topPointer = rowNodes.length - 1;\n if (_58.missing(topPointer) || _58.missing(bottomPointer)) {\n console.warn(`AG Grid: error: topPointer = ${topPointer}, bottomPointer = ${bottomPointer}`);\n return void 0;\n }\n while (true) {\n const midPointer = Math.floor((bottomPointer + topPointer) / 2);\n const currentRowNode = rowNodes[midPointer];\n if (currentRowNode.rowIndex === displayRowIndex) {\n return currentRowNode;\n }\n const expandedMasterRow = currentRowNode.master && currentRowNode.expanded;\n const detailNode = currentRowNode.detailNode;\n if (expandedMasterRow && detailNode && detailNode.rowIndex === displayRowIndex) {\n return currentRowNode.detailNode;\n }\n const childStore = currentRowNode.childStore;\n if (currentRowNode.expanded && childStore && childStore.isDisplayIndexInStore(displayRowIndex)) {\n return childStore.getRowUsingDisplayIndex(displayRowIndex);\n }\n if (currentRowNode.rowIndex < displayRowIndex) {\n bottomPointer = midPointer + 1;\n } else if (currentRowNode.rowIndex > displayRowIndex) {\n topPointer = midPointer - 1;\n } else {\n console.warn(`AG Grid: error: unable to locate rowIndex = ${displayRowIndex} in cache`);\n return void 0;\n }\n }\n }\n extractRowBounds(rowNode, index) {\n const extractRowBounds = (currentRowNode) => ({\n rowHeight: currentRowNode.rowHeight,\n rowTop: currentRowNode.rowTop\n });\n if (rowNode.rowIndex === index) {\n return extractRowBounds(rowNode);\n }\n if (rowNode.hasChildren() && rowNode.expanded && _58.exists(rowNode.childStore)) {\n const childStore = rowNode.childStore;\n if (childStore.isDisplayIndexInStore(index)) {\n return childStore.getRowBounds(index);\n }\n } else if (rowNode.master && rowNode.expanded && _58.exists(rowNode.detailNode)) {\n if (rowNode.detailNode.rowIndex === index) {\n return extractRowBounds(rowNode.detailNode);\n }\n }\n }\n getIndexAtPixel(rowNode, pixel) {\n if (rowNode.isPixelInRange(pixel)) {\n return rowNode.rowIndex;\n }\n const expandedMasterRow = rowNode.master && rowNode.expanded;\n const detailNode = rowNode.detailNode;\n if (expandedMasterRow && detailNode && detailNode.isPixelInRange(pixel)) {\n return rowNode.detailNode.rowIndex;\n }\n if (rowNode.hasChildren() && rowNode.expanded && _58.exists(rowNode.childStore)) {\n const childStore = rowNode.childStore;\n if (childStore.isPixelInRange(pixel)) {\n return childStore.getRowIndexAtPixel(pixel);\n }\n }\n return null;\n }\n createNodeIdPrefix(parentRowNode) {\n const parts = [];\n let rowNode = parentRowNode;\n while (rowNode && rowNode.level >= 0) {\n if (rowNode.key === \"\") {\n parts.push(GROUP_MISSING_KEY_ID);\n } else {\n parts.push(rowNode.key);\n }\n rowNode = rowNode.parent;\n }\n if (parts.length > 0) {\n return parts.reverse().join(\"-\");\n }\n return void 0;\n }\n checkOpenByDefault(rowNode) {\n return this.expansionService.checkOpenByDefault(rowNode);\n }\n};\n__decorateClass14([\n Autowired75(\"valueService\")\n], BlockUtils.prototype, \"valueService\", 2);\n__decorateClass14([\n Autowired75(\"columnModel\")\n], BlockUtils.prototype, \"columnModel\", 2);\n__decorateClass14([\n Autowired75(\"ssrmNodeManager\")\n], BlockUtils.prototype, \"nodeManager\", 2);\n__decorateClass14([\n Autowired75(\"beans\")\n], BlockUtils.prototype, \"beans\", 2);\n__decorateClass14([\n Autowired75(\"expansionService\")\n], BlockUtils.prototype, \"expansionService\", 2);\nBlockUtils = __decorateClass14([\n Bean45(\"ssrmBlockUtils\")\n], BlockUtils);\nvar NodeManager = class {\n constructor() {\n this.rowNodes = {};\n }\n addRowNode(rowNode) {\n const id = rowNode.id;\n if (this.rowNodes[id]) {\n console.warn(`AG Grid: Duplicate node id ${rowNode.id}. Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`);\n console.warn(\"first instance\", this.rowNodes[id].data);\n console.warn(\"second instance\", rowNode.data);\n }\n this.rowNodes[id] = rowNode;\n }\n removeNode(rowNode) {\n const id = rowNode.id;\n if (this.rowNodes[id]) {\n this.rowNodes[id] = void 0;\n }\n }\n clear() {\n this.rowNodes = {};\n }\n};\n__decorateClass14([\n PreDestroy52\n], NodeManager.prototype, \"clear\", 1);\nNodeManager = __decorateClass14([\n Bean54(\"ssrmNodeManager\")\n], NodeManager);\nvar TransactionManager = class extends BeanStub74 {\n constructor() {\n super(...arguments);\n this.asyncTransactions = [];\n }\n postConstruct() {\n if (!this.gos.isRowModelType(\"serverSide\")) {\n return;\n }\n }\n applyTransactionAsync(transaction, callback) {\n if (this.asyncTransactionsTimeout == null) {\n this.scheduleExecuteAsync();\n }\n this.asyncTransactions.push({ transaction, callback });\n }\n scheduleExecuteAsync() {\n const waitMillis = this.gos.getAsyncTransactionWaitMillis();\n this.asyncTransactionsTimeout = window.setTimeout(() => {\n this.executeAsyncTransactions();\n }, waitMillis);\n }\n executeAsyncTransactions() {\n if (!this.asyncTransactions) {\n return;\n }\n const resultFuncs = [];\n const resultsForEvent = [];\n const transactionsToRetry = [];\n let atLeastOneTransactionApplied = false;\n this.asyncTransactions.forEach((txWrapper) => {\n let result;\n const hasStarted = this.serverSideRowModel.executeOnStore(txWrapper.transaction.route, (cache) => {\n result = cache.applyTransaction(txWrapper.transaction);\n });\n if (!hasStarted) {\n result = { status: ServerSideTransactionResultStatus3.StoreNotStarted };\n } else if (result == void 0) {\n result = { status: ServerSideTransactionResultStatus3.StoreNotFound };\n }\n resultsForEvent.push(result);\n const retryTransaction = result.status == ServerSideTransactionResultStatus3.StoreLoading;\n if (retryTransaction) {\n transactionsToRetry.push(txWrapper);\n return;\n }\n if (txWrapper.callback) {\n resultFuncs.push(() => txWrapper.callback(result));\n }\n if (result.status === ServerSideTransactionResultStatus3.Applied) {\n atLeastOneTransactionApplied = true;\n }\n });\n if (resultFuncs.length > 0) {\n window.setTimeout(() => {\n resultFuncs.forEach((func) => func());\n }, 0);\n }\n this.asyncTransactionsTimeout = void 0;\n this.asyncTransactions = transactionsToRetry;\n if (atLeastOneTransactionApplied) {\n this.valueCache.onDataChanged();\n this.eventService.dispatchEvent({ type: Events46.EVENT_STORE_UPDATED });\n }\n if (resultsForEvent.length > 0) {\n const event = {\n type: Events46.EVENT_ASYNC_TRANSACTIONS_FLUSHED,\n results: resultsForEvent\n };\n this.eventService.dispatchEvent(event);\n }\n }\n flushAsyncTransactions() {\n if (this.asyncTransactionsTimeout != null) {\n clearTimeout(this.asyncTransactionsTimeout);\n }\n this.executeAsyncTransactions();\n }\n applyTransaction(transaction) {\n let res;\n const hasStarted = this.serverSideRowModel.executeOnStore(transaction.route, (store) => {\n res = store.applyTransaction(transaction);\n });\n if (!hasStarted) {\n return { status: ServerSideTransactionResultStatus3.StoreNotStarted };\n } else if (res) {\n this.valueCache.onDataChanged();\n if (res.remove) {\n const removedRowIds = res.remove.map((row) => row.id);\n this.selectionService.deleteSelectionStateFromParent(transaction.route || [], removedRowIds);\n }\n this.eventService.dispatchEvent({ type: Events46.EVENT_STORE_UPDATED });\n return res;\n } else {\n return { status: ServerSideTransactionResultStatus3.StoreNotFound };\n }\n }\n};\n__decorateClass14([\n Autowired85(\"rowNodeBlockLoader\")\n], TransactionManager.prototype, \"rowNodeBlockLoader\", 2);\n__decorateClass14([\n Autowired85(\"valueCache\")\n], TransactionManager.prototype, \"valueCache\", 2);\n__decorateClass14([\n Autowired85(\"rowModel\")\n], TransactionManager.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired85(\"rowRenderer\")\n], TransactionManager.prototype, \"rowRenderer\", 2);\n__decorateClass14([\n Autowired85(\"selectionService\")\n], TransactionManager.prototype, \"selectionService\", 2);\n__decorateClass14([\n PostConstruct74\n], TransactionManager.prototype, \"postConstruct\", 1);\nTransactionManager = __decorateClass14([\n Bean64(\"ssrmTransactionManager\")\n], TransactionManager);\nvar ExpandListener = class extends BeanStub82 {\n postConstruct() {\n if (!this.gos.isRowModelType(\"serverSide\")) {\n return;\n }\n this.addManagedListener(this.eventService, Events55.EVENT_ROW_GROUP_OPENED, this.onRowGroupOpened.bind(this));\n }\n onRowGroupOpened(event) {\n const rowNode = event.node;\n if (rowNode.expanded) {\n if (rowNode.master) {\n this.createDetailNode(rowNode);\n } else if (_67.missing(rowNode.childStore)) {\n const storeParams = this.serverSideRowModel.getParams();\n rowNode.childStore = this.createBean(this.storeFactory.createStore(storeParams, rowNode));\n }\n } else if (this.gos.get(\"purgeClosedRowNodes\") && _67.exists(rowNode.childStore)) {\n rowNode.childStore = this.destroyBean(rowNode.childStore);\n }\n const storeUpdatedEvent = { type: Events55.EVENT_STORE_UPDATED };\n this.eventService.dispatchEvent(storeUpdatedEvent);\n }\n createDetailNode(masterNode) {\n if (_67.exists(masterNode.detailNode)) {\n return masterNode.detailNode;\n }\n const detailNode = new RowNode10(this.beans);\n detailNode.detail = true;\n detailNode.selectable = false;\n detailNode.parent = masterNode;\n if (_67.exists(masterNode.id)) {\n detailNode.id = \"detail_\" + masterNode.id;\n }\n detailNode.data = masterNode.data;\n detailNode.level = masterNode.level + 1;\n const defaultDetailRowHeight = 200;\n const rowHeight = this.gos.getRowHeightForNode(detailNode).height;\n detailNode.rowHeight = rowHeight ? rowHeight : defaultDetailRowHeight;\n masterNode.detailNode = detailNode;\n return detailNode;\n }\n};\n__decorateClass14([\n Autowired94(\"rowModel\")\n], ExpandListener.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired94(\"ssrmStoreFactory\")\n], ExpandListener.prototype, \"storeFactory\", 2);\n__decorateClass14([\n Autowired94(\"beans\")\n], ExpandListener.prototype, \"beans\", 2);\n__decorateClass14([\n PostConstruct83\n], ExpandListener.prototype, \"postConstruct\", 1);\nExpandListener = __decorateClass14([\n Bean73(\"ssrmExpandListener\")\n], ExpandListener);\nvar SortListener = class extends BeanStub92 {\n postConstruct() {\n if (!this.gos.isRowModelType(\"serverSide\")) {\n return;\n }\n this.addManagedListener(this.eventService, Events65.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n }\n onSortChanged() {\n const storeParams = this.serverSideRowModel.getParams();\n if (!storeParams) {\n return;\n }\n const newSortModel = this.sortController.getSortModel();\n const oldSortModel = storeParams.sortModel;\n const changedColumns = this.findChangedColumnsInSort(newSortModel, oldSortModel);\n const valueColChanged = this.listenerUtils.isSortingWithValueColumn(changedColumns);\n const secondaryColChanged = this.listenerUtils.isSortingWithSecondaryColumn(changedColumns);\n const params = {\n valueColChanged,\n secondaryColChanged,\n changedColumns\n };\n this.serverSideRowModel.refreshAfterSort(newSortModel, params);\n }\n // returns back all the cols that were effected by the sorting. eg if we were sorting by col A,\n // and now we are sorting by col B, the list of impacted cols should be A and B. so if a cache\n // is impacted by sorting on A or B then it needs to be refreshed. this includes where the cache\n // was previously sorted by A and then the A sort now needs to be cleared.\n findChangedColumnsInSort(newSortModel, oldSortModel) {\n let allColsInBothSorts = [];\n [newSortModel, oldSortModel].forEach((sortModel) => {\n if (sortModel) {\n const ids = sortModel.map((sm) => sm.colId);\n allColsInBothSorts = allColsInBothSorts.concat(ids);\n }\n });\n const differentSorts = (oldSortItem, newSortItem) => {\n const oldSort = oldSortItem ? oldSortItem.sort : null;\n const newSort = newSortItem ? newSortItem.sort : null;\n return oldSort !== newSort;\n };\n const differentIndexes = (oldSortItem, newSortItem) => {\n const oldIndex = oldSortItem ? oldSortModel.indexOf(oldSortItem) : -1;\n const newIndex = newSortItem ? newSortModel.indexOf(newSortItem) : -1;\n return oldIndex !== newIndex;\n };\n return allColsInBothSorts.filter((colId) => {\n const oldSortItem = oldSortModel.find((sm) => sm.colId === colId);\n const newSortItem = newSortModel.find((sm) => sm.colId === colId);\n return differentSorts(oldSortItem, newSortItem) || differentIndexes(oldSortItem, newSortItem);\n });\n }\n};\n__decorateClass14([\n Autowired104(\"sortController\")\n], SortListener.prototype, \"sortController\", 2);\n__decorateClass14([\n Autowired104(\"rowModel\")\n], SortListener.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired104(\"ssrmListenerUtils\")\n], SortListener.prototype, \"listenerUtils\", 2);\n__decorateClass14([\n PostConstruct93\n], SortListener.prototype, \"postConstruct\", 1);\nSortListener = __decorateClass14([\n Bean82(\"ssrmSortService\")\n], SortListener);\nvar FilterListener = class extends BeanStub102 {\n postConstruct() {\n if (!this.gos.isRowModelType(\"serverSide\")) {\n return;\n }\n this.addManagedListener(this.eventService, Events75.EVENT_ADVANCED_FILTER_ENABLED_CHANGED, () => this.onFilterChanged(true));\n this.addManagedListener(this.eventService, Events75.EVENT_FILTER_CHANGED, () => this.onFilterChanged());\n }\n onFilterChanged(advancedFilterEnabledChanged) {\n const storeParams = this.serverSideRowModel.getParams();\n if (!storeParams) {\n return;\n }\n const oldModel = storeParams.filterModel;\n let newModel;\n let changedColumns;\n if (this.filterManager.isAdvancedFilterEnabled()) {\n newModel = this.filterManager.getAdvancedFilterModel();\n const oldColumns = advancedFilterEnabledChanged ? Object.keys(oldModel != null ? oldModel : {}) : this.getAdvancedFilterColumns(oldModel);\n const newColumns = this.getAdvancedFilterColumns(newModel);\n oldColumns.forEach((column) => newColumns.add(column));\n changedColumns = Array.from(newColumns);\n } else {\n newModel = this.filterManager.getFilterModel();\n if (advancedFilterEnabledChanged) {\n const oldColumns = this.getAdvancedFilterColumns(oldModel);\n Object.keys(newModel).forEach((column) => oldColumns.add(column));\n changedColumns = Array.from(oldColumns);\n } else {\n changedColumns = this.findChangedColumns(oldModel, newModel);\n }\n }\n const valueColChanged = this.listenerUtils.isSortingWithValueColumn(changedColumns);\n const secondaryColChanged = this.listenerUtils.isSortingWithSecondaryColumn(changedColumns);\n const params = {\n valueColChanged,\n secondaryColChanged,\n changedColumns\n };\n this.serverSideRowModel.refreshAfterFilter(newModel, params);\n }\n findChangedColumns(oldModel, newModel) {\n const allColKeysMap = {};\n Object.keys(oldModel).forEach((key) => allColKeysMap[key] = true);\n Object.keys(newModel).forEach((key) => allColKeysMap[key] = true);\n const res = [];\n Object.keys(allColKeysMap).forEach((key) => {\n const oldJson = JSON.stringify(oldModel[key]);\n const newJson = JSON.stringify(newModel[key]);\n const filterChanged = oldJson != newJson;\n if (filterChanged) {\n res.push(key);\n }\n });\n return res;\n }\n getAdvancedFilterColumns(model) {\n const columns = /* @__PURE__ */ new Set();\n if (!model) {\n return columns;\n }\n const processAdvancedFilterModel = (filterModel) => {\n if (filterModel.filterType === \"join\") {\n filterModel.conditions.forEach((condition) => processAdvancedFilterModel(condition));\n } else {\n columns.add(filterModel.colId);\n }\n };\n processAdvancedFilterModel(model);\n return columns;\n }\n};\n__decorateClass14([\n Autowired113(\"rowModel\")\n], FilterListener.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired113(\"filterManager\")\n], FilterListener.prototype, \"filterManager\", 2);\n__decorateClass14([\n Autowired113(\"ssrmListenerUtils\")\n], FilterListener.prototype, \"listenerUtils\", 2);\n__decorateClass14([\n PostConstruct103\n], FilterListener.prototype, \"postConstruct\", 1);\nFilterListener = __decorateClass14([\n Bean92(\"ssrmFilterListener\")\n], FilterListener);\nvar StoreFactory = class {\n createStore(ssrmParams, parentNode) {\n const storeParams = this.getStoreParams(ssrmParams, parentNode);\n const CacheClass = storeParams.suppressInfiniteScroll ? FullStore : LazyStore;\n return new CacheClass(ssrmParams, storeParams, parentNode);\n }\n getStoreParams(ssrmParams, parentNode) {\n const userStoreParams = this.getLevelSpecificParams(parentNode);\n const infiniteScroll = this.isInfiniteScroll(userStoreParams);\n const cacheBlockSize = this.getBlockSize(infiniteScroll, userStoreParams);\n const maxBlocksInCache = this.getMaxBlocksInCache(infiniteScroll, ssrmParams, userStoreParams);\n const storeParams = {\n suppressInfiniteScroll: !infiniteScroll,\n cacheBlockSize,\n maxBlocksInCache\n };\n return storeParams;\n }\n getMaxBlocksInCache(infiniteScroll, ssrmParams, userStoreParams) {\n if (!infiniteScroll) {\n return void 0;\n }\n const maxBlocksInCache = userStoreParams && userStoreParams.maxBlocksInCache != null ? userStoreParams.maxBlocksInCache : this.gos.get(\"maxBlocksInCache\");\n const maxBlocksActive = maxBlocksInCache != null && maxBlocksInCache >= 0;\n if (!maxBlocksActive) {\n return void 0;\n }\n if (ssrmParams.dynamicRowHeight) {\n const message = \"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.\";\n _85.warnOnce(message);\n return void 0;\n }\n if (this.columnModel.isAutoRowHeightActive()) {\n const message = \"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.\";\n _85.warnOnce(message);\n return void 0;\n }\n return maxBlocksInCache;\n }\n getBlockSize(infiniteScroll, userStoreParams) {\n if (!infiniteScroll) {\n return void 0;\n }\n const blockSize = userStoreParams && userStoreParams.cacheBlockSize != null ? userStoreParams.cacheBlockSize : this.gos.get(\"cacheBlockSize\");\n if (blockSize != null && blockSize > 0) {\n return blockSize;\n } else {\n return 100;\n }\n }\n getLevelSpecificParams(parentNode) {\n const callback = this.gos.getCallback(\"getServerSideGroupLevelParams\");\n if (!callback) {\n return void 0;\n }\n const params = {\n level: parentNode.level + 1,\n parentRowNode: parentNode.level >= 0 ? parentNode : void 0,\n rowGroupColumns: this.columnModel.getRowGroupColumns(),\n pivotColumns: this.columnModel.getPivotColumns(),\n pivotMode: this.columnModel.isPivotMode()\n };\n const res = callback(params);\n return res;\n }\n isInfiniteScroll(storeParams) {\n const res = storeParams && storeParams.suppressInfiniteScroll != null ? storeParams.suppressInfiniteScroll : this.isSuppressServerSideInfiniteScroll();\n return !res;\n }\n isSuppressServerSideInfiniteScroll() {\n return this.gos.get(\"suppressServerSideInfiniteScroll\");\n }\n};\n__decorateClass14([\n Autowired123(\"gridOptionsService\")\n], StoreFactory.prototype, \"gos\", 2);\n__decorateClass14([\n Autowired123(\"columnModel\")\n], StoreFactory.prototype, \"columnModel\", 2);\nStoreFactory = __decorateClass14([\n Bean102(\"ssrmStoreFactory\")\n], StoreFactory);\nvar ListenerUtils = class {\n isSortingWithValueColumn(changedColumnsInSort) {\n const valueColIds = this.columnModel.getValueColumns().map((col) => col.getColId());\n for (let i = 0; i < changedColumnsInSort.length; i++) {\n if (valueColIds.indexOf(changedColumnsInSort[i]) > -1) {\n return true;\n }\n }\n return false;\n }\n isSortingWithSecondaryColumn(changedColumnsInSort) {\n if (!this.columnModel.getSecondaryColumns()) {\n return false;\n }\n const secondaryColIds = this.columnModel.getSecondaryColumns().map((col) => col.getColId());\n for (let i = 0; i < changedColumnsInSort.length; i++) {\n if (secondaryColIds.indexOf(changedColumnsInSort[i]) > -1) {\n return true;\n }\n }\n return false;\n }\n};\n__decorateClass14([\n Autowired133(\"columnModel\")\n], ListenerUtils.prototype, \"columnModel\", 2);\nListenerUtils = __decorateClass14([\n Bean112(\"ssrmListenerUtils\")\n], ListenerUtils);\nvar DefaultStrategy = class extends BeanStub112 {\n constructor() {\n super(...arguments);\n this.selectedState = { selectAll: false, toggledNodes: /* @__PURE__ */ new Set() };\n this.lastSelected = null;\n this.selectAllUsed = false;\n this.selectedNodes = {};\n }\n init() {\n this.rowSelection = this.gos.get(\"rowSelection\");\n this.addManagedPropertyListener(\"rowSelection\", (propChange) => {\n this.rowSelection = propChange.currentValue;\n });\n }\n getSelectedState() {\n return {\n selectAll: this.selectedState.selectAll,\n toggledNodes: [...this.selectedState.toggledNodes]\n };\n }\n setSelectedState(state) {\n const newState = {\n selectAll: false,\n toggledNodes: /* @__PURE__ */ new Set()\n };\n if (typeof state !== \"object\") {\n console.error(\"AG Grid: The provided selection state should be an object.\");\n return;\n }\n if (\"selectAll\" in state && typeof state.selectAll === \"boolean\") {\n newState.selectAll = state.selectAll;\n } else {\n console.error(\"AG Grid: Select all status should be of boolean type.\");\n return;\n }\n if (\"toggledNodes\" in state && Array.isArray(state.toggledNodes)) {\n state.toggledNodes.forEach((key) => {\n if (typeof key === \"string\") {\n newState.toggledNodes.add(key);\n } else {\n console.warn(`AG Grid: Provided ids must be of string type. Invalid id provided: ${key}`);\n }\n });\n } else {\n console.error(\"AG Grid: `toggledNodes` must be an array of string ids.\");\n return;\n }\n this.selectedState = newState;\n }\n deleteSelectionStateFromParent(parentPath, removedNodeIds) {\n if (this.selectedState.toggledNodes.size === 0) {\n return false;\n }\n let anyNodesToggled = false;\n removedNodeIds.forEach((id) => {\n if (this.selectedState.toggledNodes.delete(id)) {\n anyNodesToggled = true;\n }\n });\n return anyNodesToggled;\n }\n setNodesSelected(params) {\n if (params.nodes.length === 0)\n return 0;\n const onlyThisNode = params.clearSelection && params.newValue && !params.rangeSelect;\n if (this.rowSelection !== \"multiple\" || onlyThisNode) {\n if (params.nodes.length > 1) {\n throw new Error(\"AG Grid: cannot select multiple rows when rowSelection is set to 'single'\");\n }\n const node = params.nodes[0];\n if (params.newValue) {\n this.selectedNodes = { [node.id]: node };\n this.selectedState = {\n selectAll: false,\n toggledNodes: /* @__PURE__ */ new Set([node.id])\n };\n } else {\n this.selectedNodes = {};\n this.selectedState = {\n selectAll: false,\n toggledNodes: /* @__PURE__ */ new Set()\n };\n }\n this.lastSelected = node.id;\n return 1;\n }\n const updateNodeState = (node) => {\n if (params.newValue) {\n this.selectedNodes[node.id] = node;\n } else {\n delete this.selectedNodes[node.id];\n }\n const isNodeSelectable = node.selectable;\n const doesNodeConform = params.newValue === this.selectedState.selectAll;\n if (doesNodeConform || !isNodeSelectable) {\n this.selectedState.toggledNodes.delete(node.id);\n return;\n }\n this.selectedState.toggledNodes.add(node.id);\n };\n if (params.rangeSelect && this.lastSelected) {\n if (params.nodes.length > 1) {\n throw new Error(\"AG Grid: cannot select multiple rows when using rangeSelect\");\n }\n const node = params.nodes[0];\n const lastSelectedNode = this.rowModel.getRowNode(this.lastSelected);\n this.rowModel.getNodesInRangeForSelection(node, lastSelectedNode != null ? lastSelectedNode : null).forEach(updateNodeState);\n this.lastSelected = node.id;\n return 1;\n }\n params.nodes.forEach(updateNodeState);\n this.lastSelected = params.nodes[params.nodes.length - 1].id;\n return 1;\n }\n processNewRow(node) {\n if (this.selectedNodes[node.id]) {\n this.selectedNodes[node.id] = node;\n }\n }\n isNodeSelected(node) {\n const isToggled = this.selectedState.toggledNodes.has(node.id);\n return this.selectedState.selectAll ? !isToggled : isToggled;\n }\n getSelectedNodes() {\n if (this.selectAllUsed) {\n console.warn(\n `AG Grid: getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n Use \\`api.getServerSideSelectionState()\\` instead.`\n );\n }\n return Object.values(this.selectedNodes);\n }\n getSelectedRows() {\n return this.getSelectedNodes().map((node) => node.data);\n }\n getSelectionCount() {\n if (this.selectedState.selectAll) {\n return -1;\n }\n return this.selectedState.toggledNodes.size;\n }\n clearOtherNodes(rowNodeToKeepSelected, source) {\n const clearedRows = this.selectedState.selectAll ? 1 : this.selectedState.toggledNodes.size - 1;\n this.selectedState = {\n selectAll: false,\n toggledNodes: /* @__PURE__ */ new Set([rowNodeToKeepSelected.id])\n };\n this.rowModel.forEachNode((node) => {\n if (node !== rowNodeToKeepSelected) {\n node.selectThisNode(false, void 0, source);\n }\n });\n const event = {\n type: Events84.EVENT_SELECTION_CHANGED,\n source\n };\n this.eventService.dispatchEvent(event);\n return clearedRows;\n }\n isEmpty() {\n var _a;\n return !this.selectedState.selectAll && !((_a = this.selectedState.toggledNodes) == null ? void 0 : _a.size);\n }\n selectAllRowNodes(params) {\n this.selectedState = { selectAll: true, toggledNodes: /* @__PURE__ */ new Set() };\n this.selectedNodes = {};\n this.selectAllUsed = true;\n }\n deselectAllRowNodes(params) {\n this.selectedState = { selectAll: false, toggledNodes: /* @__PURE__ */ new Set() };\n this.selectedNodes = {};\n }\n getSelectAllState(justFiltered, justCurrentPage) {\n if (this.selectedState.selectAll) {\n if (this.selectedState.toggledNodes.size > 0) {\n return null;\n }\n return true;\n }\n if (this.selectedState.toggledNodes.size > 0) {\n return null;\n }\n return false;\n }\n};\n__decorateClass14([\n Autowired142(\"rowModel\")\n], DefaultStrategy.prototype, \"rowModel\", 2);\n__decorateClass14([\n PostConstruct113\n], DefaultStrategy.prototype, \"init\", 1);\nvar GroupSelectsChildrenStrategy = class extends BeanStub122 {\n constructor() {\n super(...arguments);\n this.selectedState = { selectAllChildren: false, toggledNodes: /* @__PURE__ */ new Map() };\n this.lastSelected = null;\n }\n init() {\n this.addManagedListener(this.eventService, Events93.EVENT_MODEL_UPDATED, () => this.removeRedundantState());\n this.addManagedListener(this.eventService, Events93.EVENT_COLUMN_ROW_GROUP_CHANGED, () => this.selectionService.reset(\"rowGroupChanged\"));\n }\n getSelectedState() {\n const treeData = this.gos.get(\"treeData\");\n const recursivelySerializeState = (state, level, nodeId) => {\n const normalisedState = {\n nodeId\n };\n if (treeData || level <= this.columnModel.getRowGroupColumns().length) {\n normalisedState.selectAllChildren = state.selectAllChildren;\n }\n if (state.toggledNodes.size) {\n const toggledNodes = [];\n state.toggledNodes.forEach((value, key) => {\n const newState = recursivelySerializeState(value, level + 1, key);\n toggledNodes.push(newState);\n });\n normalisedState.toggledNodes = toggledNodes;\n }\n return normalisedState;\n };\n return recursivelySerializeState(this.selectedState, 0);\n }\n setSelectedState(state) {\n const recursivelyDeserializeState = (normalisedState, parentSelected) => {\n var _a, _b;\n if (typeof normalisedState !== \"object\") {\n throw new Error(\"AG Grid: Each provided state object must be an object.\");\n }\n if (\"selectAllChildren\" in normalisedState && typeof normalisedState.selectAllChildren !== \"boolean\") {\n throw new Error(\"AG Grid: `selectAllChildren` must be a boolean value or undefined.\");\n }\n if (\"toggledNodes\" in normalisedState) {\n if (!Array.isArray(normalisedState.toggledNodes)) {\n throw new Error(\"AG Grid: `toggledNodes` must be an array.\");\n }\n const allHaveIds = normalisedState.toggledNodes.every((innerState) => typeof innerState === \"object\" && \"nodeId\" in innerState && typeof innerState.nodeId === \"string\");\n if (!allHaveIds) {\n throw new Error(\"AG Grid: Every `toggledNode` requires an associated string id.\");\n }\n }\n const isThisNodeSelected = (_a = normalisedState.selectAllChildren) != null ? _a : !parentSelected;\n const convertedChildren = (_b = normalisedState.toggledNodes) == null ? void 0 : _b.map((innerState) => [innerState.nodeId, recursivelyDeserializeState(innerState, isThisNodeSelected)]);\n const doesRedundantStateExist = convertedChildren == null ? void 0 : convertedChildren.some(([_94, innerState]) => isThisNodeSelected === innerState.selectAllChildren && innerState.toggledNodes.size === 0);\n if (doesRedundantStateExist) {\n throw new Error(`\n AG Grid: AG Grid: Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.\n Please rebuild the selection state and reapply it.\n `);\n }\n return {\n selectAllChildren: isThisNodeSelected,\n toggledNodes: new Map(convertedChildren)\n };\n };\n try {\n this.selectedState = recursivelyDeserializeState(state, !!state.selectAllChildren);\n } catch (e) {\n console.error(e.message);\n }\n }\n deleteSelectionStateFromParent(parentRoute, removedNodeIds) {\n let parentState = this.selectedState;\n const remainingRoute = [...parentRoute];\n while (parentState && remainingRoute.length) {\n parentState = parentState.toggledNodes.get(remainingRoute.pop());\n }\n if (!parentState) {\n return false;\n }\n let anyStateChanged = false;\n removedNodeIds.forEach((id) => {\n if (parentState == null ? void 0 : parentState.toggledNodes.delete(id)) {\n anyStateChanged = true;\n }\n });\n if (anyStateChanged) {\n this.removeRedundantState();\n }\n return anyStateChanged;\n }\n setNodesSelected(params) {\n const _a = params, { nodes } = _a, other = __objRest2(_a, [\"nodes\"]);\n if (nodes.length === 0)\n return 0;\n if (params.rangeSelect) {\n if (nodes.length > 1) {\n throw new Error(\"AG Grid: cannot select multiple rows when using rangeSelect\");\n }\n const node = nodes[0];\n const rangeOfNodes = this.rowModel.getNodesInRangeForSelection(node, this.lastSelected);\n const routes = rangeOfNodes.map(this.getRouteToNode).sort((a, b) => b.length - a.length);\n const completedRoutes = /* @__PURE__ */ new Set();\n routes.forEach((route) => {\n if (completedRoutes.has(route[route.length - 1])) {\n return;\n }\n route.forEach((part) => completedRoutes.add(part));\n this.recursivelySelectNode(route, this.selectedState, __spreadValues12({ node }, other));\n });\n this.removeRedundantState();\n this.lastSelected = node;\n return 1;\n }\n params.nodes.forEach((node) => {\n const idPathToNode = this.getRouteToNode(node);\n this.recursivelySelectNode(idPathToNode, this.selectedState, __spreadProps9(__spreadValues12({}, other), { node }));\n });\n this.removeRedundantState();\n this.lastSelected = params.nodes[params.nodes.length - 1];\n return 1;\n }\n isNodeSelected(node) {\n const path = this.getRouteToNode(node);\n return this.isNodePathSelected(path, this.selectedState);\n }\n isNodePathSelected([nextNode, ...nodes], state) {\n if (nodes.length === 0) {\n const isToggled = state.toggledNodes.has(nextNode.id);\n if (nextNode.hasChildren()) {\n const groupState = state.toggledNodes.get(nextNode.id);\n if (groupState && groupState.toggledNodes.size) {\n return void 0;\n }\n }\n return state.selectAllChildren ? !isToggled : isToggled;\n }\n if (state.toggledNodes.has(nextNode.id)) {\n const nextState = state.toggledNodes.get(nextNode.id);\n if (nextState) {\n return this.isNodePathSelected(nodes, nextState);\n }\n }\n return !!state.selectAllChildren;\n }\n getRouteToNode(node) {\n const pathToNode = [];\n let tempNode = node;\n while (tempNode.parent) {\n pathToNode.push(tempNode);\n tempNode = tempNode.parent;\n }\n return pathToNode.reverse();\n }\n removeRedundantState() {\n if (this.filterManager.isAnyFilterPresent()) {\n return;\n }\n const forEachNodeStateDepthFirst = (state = this.selectedState, thisKey, parentState) => {\n state.toggledNodes.forEach((value, key) => {\n forEachNodeStateDepthFirst(value, key, state);\n });\n if (thisKey) {\n const thisRow = this.rowModel.getRowNode(thisKey);\n const thisRowStore = thisRow == null ? void 0 : thisRow.childStore;\n const isStoreSizeKnown = thisRowStore == null ? void 0 : thisRowStore.isLastRowIndexKnown();\n if (isStoreSizeKnown) {\n const possibleAllNodesToggled = state.toggledNodes.size >= thisRowStore.getRowCount();\n if (possibleAllNodesToggled) {\n for (const childState of state.toggledNodes.entries()) {\n const [key, value] = childState;\n if (value.toggledNodes.size > 0) {\n return;\n }\n const rowDoesNotExist = !this.rowModel.getRowNode(key);\n if (rowDoesNotExist) {\n return;\n }\n }\n state.selectAllChildren = !state.selectAllChildren;\n state.toggledNodes.clear();\n }\n }\n }\n const hasNoToggledRows = state.toggledNodes.size === 0;\n const isIdenticalToParent = (parentState == null ? void 0 : parentState.selectAllChildren) === state.selectAllChildren;\n if (hasNoToggledRows && isIdenticalToParent) {\n parentState == null ? void 0 : parentState.toggledNodes.delete(thisKey);\n }\n };\n forEachNodeStateDepthFirst();\n }\n recursivelySelectNode([nextNode, ...nodes], selectedState, params) {\n if (!nextNode) {\n return;\n }\n const isLastNode = !nodes.length;\n if (isLastNode) {\n const isNodeSelectable = nextNode.selectable;\n const doesNodeConform = selectedState.selectAllChildren === params.newValue;\n if (doesNodeConform || !isNodeSelectable) {\n selectedState.toggledNodes.delete(nextNode.id);\n return;\n }\n const newState = {\n selectAllChildren: params.newValue,\n toggledNodes: /* @__PURE__ */ new Map()\n };\n selectedState.toggledNodes.set(nextNode.id, newState);\n return;\n }\n const doesStateAlreadyExist = selectedState.toggledNodes.has(nextNode.id);\n const childState = doesStateAlreadyExist ? selectedState.toggledNodes.get(nextNode.id) : {\n selectAllChildren: selectedState.selectAllChildren,\n toggledNodes: /* @__PURE__ */ new Map()\n };\n if (!doesStateAlreadyExist) {\n selectedState.toggledNodes.set(nextNode.id, childState);\n }\n this.recursivelySelectNode(nodes, childState, params);\n if (selectedState.selectAllChildren === childState.selectAllChildren && childState.toggledNodes.size === 0) {\n selectedState.toggledNodes.delete(nextNode.id);\n }\n }\n getSelectedNodes() {\n console.warn(\n `AG Grid: \\`getSelectedNodes\\` and \\`getSelectedRows\\` functions cannot be used with \\`groupSelectsChildren\\` and the server-side row model.\n Use \\`api.getServerSideSelectionState()\\` instead.`\n );\n const selectedNodes = [];\n this.rowModel.forEachNode((node) => {\n if (node.isSelected()) {\n selectedNodes.push(node);\n }\n });\n return selectedNodes;\n }\n processNewRow(node) {\n }\n getSelectedRows() {\n return this.getSelectedNodes().map((node) => node.data);\n }\n getSelectionCount() {\n return -1;\n }\n isEmpty() {\n var _a;\n return !this.selectedState.selectAllChildren && !((_a = this.selectedState.toggledNodes) == null ? void 0 : _a.size);\n }\n selectAllRowNodes(params) {\n this.selectedState = { selectAllChildren: true, toggledNodes: /* @__PURE__ */ new Map() };\n }\n deselectAllRowNodes(params) {\n this.selectedState = { selectAllChildren: false, toggledNodes: /* @__PURE__ */ new Map() };\n }\n getSelectAllState(justFiltered, justCurrentPage) {\n if (this.selectedState.selectAllChildren) {\n if (this.selectedState.toggledNodes.size > 0) {\n return null;\n }\n return true;\n }\n if (this.selectedState.toggledNodes.size > 0) {\n return null;\n }\n return false;\n }\n};\n__decorateClass14([\n Autowired152(\"rowModel\")\n], GroupSelectsChildrenStrategy.prototype, \"rowModel\", 2);\n__decorateClass14([\n Autowired152(\"columnModel\")\n], GroupSelectsChildrenStrategy.prototype, \"columnModel\", 2);\n__decorateClass14([\n Autowired152(\"filterManager\")\n], GroupSelectsChildrenStrategy.prototype, \"filterManager\", 2);\n__decorateClass14([\n Autowired152(\"rowModel\")\n], GroupSelectsChildrenStrategy.prototype, \"serverSideRowModel\", 2);\n__decorateClass14([\n Autowired152(\"selectionService\")\n], GroupSelectsChildrenStrategy.prototype, \"selectionService\", 2);\n__decorateClass14([\n PostConstruct123\n], GroupSelectsChildrenStrategy.prototype, \"init\", 1);\nvar ServerSideSelectionService = class extends BeanStub132 {\n init() {\n const groupSelectsChildren = this.gos.get(\"groupSelectsChildren\");\n this.addManagedPropertyListener(\"groupSelectsChildren\", (propChange) => {\n this.destroyBean(this.selectionStrategy);\n const StrategyClazz2 = !propChange.currentValue ? DefaultStrategy : GroupSelectsChildrenStrategy;\n this.selectionStrategy = this.createManagedBean(new StrategyClazz2());\n this.shotgunResetNodeSelectionState();\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source: \"api\"\n };\n this.eventService.dispatchEvent(event);\n });\n this.addManagedPropertyListener(\"rowSelection\", () => this.deselectAllRowNodes({ source: \"api\" }));\n const StrategyClazz = !groupSelectsChildren ? DefaultStrategy : GroupSelectsChildrenStrategy;\n this.selectionStrategy = this.createManagedBean(new StrategyClazz());\n }\n getSelectionState() {\n return this.selectionStrategy.getSelectedState();\n }\n setSelectionState(state, source) {\n if (Array.isArray(state)) {\n return;\n }\n this.selectionStrategy.setSelectedState(state);\n this.shotgunResetNodeSelectionState();\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source\n };\n this.eventService.dispatchEvent(event);\n }\n setNodesSelected(params) {\n const _a = params, { nodes } = _a, otherParams = __objRest2(_a, [\"nodes\"]);\n const rowSelection = this.gos.get(\"rowSelection\");\n if (nodes.length > 1 && rowSelection !== \"multiple\") {\n console.warn(`AG Grid: cannot multi select while rowSelection='single'`);\n return 0;\n }\n if (nodes.length > 1 && params.rangeSelect) {\n console.warn(`AG Grid: cannot use range selection when multi selecting rows`);\n return 0;\n }\n const adjustedParams = __spreadValues12({\n nodes: nodes.filter((node) => node.selectable)\n }, otherParams);\n if (!adjustedParams.nodes.length) {\n return 0;\n }\n const changedNodes = this.selectionStrategy.setNodesSelected(adjustedParams);\n this.shotgunResetNodeSelectionState(adjustedParams.source);\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source: adjustedParams.source\n };\n this.eventService.dispatchEvent(event);\n return changedNodes;\n }\n /**\n * Deletes the selection state for a set of nodes, for use after deleting nodes via\n * transaction. As this is designed for transactions, all nodes should belong to the same group.\n */\n deleteSelectionStateFromParent(storeRoute, removedNodeIds) {\n const stateChanged = this.selectionStrategy.deleteSelectionStateFromParent(storeRoute, removedNodeIds);\n if (!stateChanged) {\n return;\n }\n this.shotgunResetNodeSelectionState();\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source: \"api\"\n };\n this.eventService.dispatchEvent(event);\n }\n shotgunResetNodeSelectionState(source) {\n this.rowModel.forEachNode((node) => {\n if (node.stub) {\n return;\n }\n const isNodeSelected = this.selectionStrategy.isNodeSelected(node);\n if (isNodeSelected !== node.isSelected()) {\n node.selectThisNode(isNodeSelected, void 0, source);\n }\n });\n }\n getSelectedNodes() {\n return this.selectionStrategy.getSelectedNodes();\n }\n getSelectedRows() {\n return this.selectionStrategy.getSelectedRows();\n }\n getSelectionCount() {\n return this.selectionStrategy.getSelectionCount();\n }\n syncInRowNode(rowNode, oldNode) {\n this.selectionStrategy.processNewRow(rowNode);\n const isNodeSelected = this.selectionStrategy.isNodeSelected(rowNode);\n if (isNodeSelected != false && !rowNode.selectable) {\n this.selectionStrategy.setNodesSelected({\n nodes: [rowNode],\n newValue: false,\n source: \"api\"\n });\n this.shotgunResetNodeSelectionState();\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source: \"api\"\n };\n this.eventService.dispatchEvent(event);\n return;\n }\n rowNode.setSelectedInitialValue(isNodeSelected);\n }\n reset() {\n this.selectionStrategy.deselectAllRowNodes({ source: \"api\" });\n }\n isEmpty() {\n return this.selectionStrategy.isEmpty();\n }\n hasNodesToSelect(justFiltered = false, justCurrentPage = false) {\n return true;\n }\n selectAllRowNodes(params) {\n if (params.justCurrentPage || params.justFiltered) {\n console.warn(\"AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'\");\n }\n this.selectionStrategy.selectAllRowNodes(params);\n this.rowModel.forEachNode((node) => {\n if (node.stub) {\n return;\n }\n node.selectThisNode(true, void 0, params.source);\n });\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source: params.source\n };\n this.eventService.dispatchEvent(event);\n }\n deselectAllRowNodes(params) {\n if (params.justCurrentPage || params.justFiltered) {\n console.warn(\"AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'\");\n }\n this.selectionStrategy.deselectAllRowNodes(params);\n this.rowModel.forEachNode((node) => {\n if (node.stub) {\n return;\n }\n node.selectThisNode(false, void 0, params.source);\n });\n const event = {\n type: Events102.EVENT_SELECTION_CHANGED,\n source: params.source\n };\n this.eventService.dispatchEvent(event);\n }\n getSelectAllState(justFiltered, justCurrentPage) {\n return this.selectionStrategy.getSelectAllState(justFiltered, justCurrentPage);\n }\n // used by CSRM\n updateGroupsFromChildrenSelections(source, changedPath) {\n return false;\n }\n // used by CSRM\n getBestCostNodeSelection() {\n console.warn(\"AG Grid: calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.\");\n return void 0;\n }\n // used by CSRM\n filterFromSelection() {\n return;\n }\n};\n__decorateClass14([\n Autowired162(\"rowModel\")\n], ServerSideSelectionService.prototype, \"rowModel\", 2);\n__decorateClass14([\n PostConstruct133\n], ServerSideSelectionService.prototype, \"init\", 1);\nServerSideSelectionService = __decorateClass14([\n Bean122(\"selectionService\")\n], ServerSideSelectionService);\nvar VERSION15 = \"31.3.2\";\nvar ServerSideExpansionService = class extends ExpansionService {\n constructor() {\n super(...arguments);\n this.queuedRowIds = /* @__PURE__ */ new Set();\n }\n postConstruct() {\n super.postConstruct();\n this.addManagedListener(this.eventService, Events112.EVENT_COLUMN_ROW_GROUP_CHANGED, () => {\n this.queuedRowIds.clear();\n });\n }\n checkOpenByDefault(rowNode) {\n if (!rowNode.isExpandable()) {\n return;\n }\n if (this.queuedRowIds.has(rowNode.id)) {\n this.queuedRowIds.delete(rowNode.id);\n rowNode.setExpanded(true);\n return;\n }\n const userFunc = this.gos.getCallback(\"isServerSideGroupOpenByDefault\");\n if (!userFunc) {\n return;\n }\n const params = {\n data: rowNode.data,\n rowNode\n };\n const userFuncRes = userFunc(params);\n if (userFuncRes) {\n rowNode.setExpanded(true);\n }\n }\n expandRows(rowIds) {\n rowIds.forEach((rowId) => {\n const rowNode = this.serverSideRowModel.getRowNode(rowId);\n if (rowNode) {\n rowNode.setExpanded(true);\n } else {\n this.queuedRowIds.add(rowId);\n }\n });\n }\n expandAll(value) {\n this.serverSideRowModel.expandAll(value);\n }\n onGroupExpandedOrCollapsed() {\n }\n};\n__decorateClass14([\n Autowired172(\"rowModel\")\n], ServerSideExpansionService.prototype, \"serverSideRowModel\", 2);\nServerSideExpansionService = __decorateClass14([\n Bean132(\"expansionService\")\n], ServerSideExpansionService);\nvar ServerSideRowModelModule = {\n version: VERSION15,\n moduleName: ModuleNames26.ServerSideRowModelModule,\n rowModel: \"serverSide\",\n beans: [\n ServerSideRowModel,\n ExpandListener,\n SortListener,\n StoreUtils,\n BlockUtils,\n NodeManager,\n TransactionManager,\n FilterListener,\n StoreFactory,\n ListenerUtils,\n ServerSideSelectionService,\n ServerSideExpansionService,\n LazyBlockLoadingService\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/set-filter/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames16 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired217,\n Events as Events210,\n ProvidedFilter as ProvidedFilter2,\n RefSelector as RefSelector27,\n VirtualList as VirtualList4,\n AgPromise as AgPromise32,\n KeyCode as KeyCode11,\n _ as _59,\n GROUP_AUTO_COLUMN_ID as GROUP_AUTO_COLUMN_ID2\n} from \"ag-grid-community\";\nimport {\n _ as _315,\n AgPromise as AgPromise24,\n TextFilter,\n EventService as EventService2\n} from \"ag-grid-community\";\nimport {\n AgPromise as AgPromise6,\n Events as Events20,\n _ as _60\n} from \"ag-grid-community\";\nimport { _ as _218 } from \"ag-grid-community\";\nimport {\n _ as _412,\n Autowired as Autowired68,\n Component as Component57,\n PostConstruct as PostConstruct65,\n RefSelector as RefSelector21\n} from \"ag-grid-community\";\nimport {\n Autowired as Autowired316,\n Component as Component214,\n RefSelector as RefSelector37\n} from \"ag-grid-community\";\nvar __defProp15 = Object.defineProperty;\nvar __getOwnPropDesc15 = Object.getOwnPropertyDescriptor;\nvar __decorateClass15 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc15(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp15(target, key, result);\n return result;\n};\nvar ClientSideValuesExtractor = class {\n constructor(rowModel, filterParams, createKey, caseFormat, columnModel, valueService, treeDataOrGrouping, treeData, getDataPath, groupAllowUnbalanced, addManagedListener) {\n this.rowModel = rowModel;\n this.filterParams = filterParams;\n this.createKey = createKey;\n this.caseFormat = caseFormat;\n this.columnModel = columnModel;\n this.valueService = valueService;\n this.treeDataOrGrouping = treeDataOrGrouping;\n this.treeData = treeData;\n this.getDataPath = getDataPath;\n this.groupAllowUnbalanced = groupAllowUnbalanced;\n this.addManagedListener = addManagedListener;\n }\n extractUniqueValuesAsync(predicate, existingValues) {\n return new AgPromise6((resolve) => {\n if (this.rowModel.isRowDataLoaded()) {\n resolve(this.extractUniqueValues(predicate, existingValues));\n } else {\n const destroyFunc = this.addManagedListener(Events20.EVENT_ROW_COUNT_READY, () => {\n destroyFunc == null ? void 0 : destroyFunc();\n resolve(this.extractUniqueValues(predicate, existingValues));\n });\n }\n });\n }\n extractUniqueValues(predicate, existingValues) {\n const values = /* @__PURE__ */ new Map();\n const existingFormattedKeys = this.extractExistingFormattedKeys(existingValues);\n const formattedKeys = /* @__PURE__ */ new Set();\n const treeData = this.treeData && !!this.getDataPath;\n const groupedCols = this.columnModel.getRowGroupColumns();\n const addValue = (unformattedKey, value) => {\n const formattedKey = this.caseFormat(unformattedKey);\n if (!formattedKeys.has(formattedKey)) {\n formattedKeys.add(formattedKey);\n let keyToAdd = unformattedKey;\n let valueToAdd = _60.makeNull(value);\n const existingUnformattedKey = existingFormattedKeys == null ? void 0 : existingFormattedKeys.get(formattedKey);\n if (existingUnformattedKey != null) {\n keyToAdd = existingUnformattedKey;\n valueToAdd = existingValues.get(existingUnformattedKey);\n }\n values.set(keyToAdd, valueToAdd);\n }\n };\n this.rowModel.forEachLeafNode((node) => {\n if (!node.data || !predicate(node)) {\n return;\n }\n if (this.treeDataOrGrouping) {\n this.addValueForTreeDataOrGrouping(node, treeData, groupedCols, addValue);\n return;\n }\n let value = this.getValue(node);\n if (this.filterParams.convertValuesToStrings) {\n this.addValueForConvertValuesToString(node, value, addValue);\n return;\n }\n if (value != null && Array.isArray(value)) {\n value.forEach((x) => {\n addValue(this.createKey(x, node), x);\n });\n if (value.length === 0) {\n addValue(null, null);\n }\n } else {\n addValue(this.createKey(value, node), value);\n }\n });\n return values;\n }\n addValueForConvertValuesToString(node, value, addValue) {\n const key = this.createKey(value, node);\n if (key != null && Array.isArray(key)) {\n key.forEach((part) => {\n const processedPart = _60.toStringOrNull(_60.makeNull(part));\n addValue(processedPart, processedPart);\n });\n if (key.length === 0) {\n addValue(null, null);\n }\n } else {\n addValue(key, key);\n }\n }\n addValueForTreeDataOrGrouping(node, treeData, groupedCols, addValue) {\n var _a;\n let dataPath;\n if (treeData) {\n if ((_a = node.childrenAfterGroup) == null ? void 0 : _a.length) {\n return;\n }\n dataPath = this.getDataPath(node.data);\n } else {\n dataPath = groupedCols.map((groupCol) => this.valueService.getKeyForNode(groupCol, node));\n dataPath.push(this.getValue(node));\n }\n if (dataPath) {\n dataPath = dataPath.map((treeKey) => _60.toStringOrNull(_60.makeNull(treeKey)));\n }\n if (!treeData && this.groupAllowUnbalanced && (dataPath == null ? void 0 : dataPath.some((treeKey) => treeKey == null))) {\n dataPath = dataPath.filter((treeKey) => treeKey != null);\n }\n addValue(this.createKey(dataPath), dataPath);\n }\n getValue(node) {\n return this.filterParams.getValue(node);\n }\n extractExistingFormattedKeys(existingValues) {\n if (!existingValues) {\n return null;\n }\n const existingFormattedKeys = /* @__PURE__ */ new Map();\n existingValues.forEach((_value, key) => {\n existingFormattedKeys.set(this.caseFormat(key), key);\n });\n return existingFormattedKeys;\n }\n};\nvar SetFilterDisplayValue = class {\n};\nSetFilterDisplayValue.SELECT_ALL = \"__AG_SELECT_ALL__\";\nSetFilterDisplayValue.ADD_SELECTION_TO_FILTER = \"__AG_ADD_SELECTION_TO_FILTER__\";\nvar FlatSetDisplayValueModel = class {\n constructor(valueService, valueFormatter, formatter, column) {\n this.valueService = valueService;\n this.valueFormatter = valueFormatter;\n this.formatter = formatter;\n this.column = column;\n this.displayedKeys = [];\n }\n updateDisplayedValuesToAllAvailable(_getValue, _allKeys, availableKeys) {\n this.displayedKeys = Array.from(availableKeys);\n }\n updateDisplayedValuesToMatchMiniFilter(getValue, _allKeys, availableKeys, matchesFilter, nullMatchesFilter) {\n this.displayedKeys = [];\n for (let key of availableKeys) {\n if (key == null) {\n if (nullMatchesFilter) {\n this.displayedKeys.push(key);\n }\n } else {\n const value = getValue(key);\n const valueFormatterValue = this.valueService.formatValue(\n this.column,\n null,\n value,\n this.valueFormatter,\n false\n );\n const textFormatterValue = this.formatter(valueFormatterValue);\n if (matchesFilter(textFormatterValue)) {\n this.displayedKeys.push(key);\n }\n }\n }\n }\n getDisplayedValueCount() {\n return this.displayedKeys.length;\n }\n getDisplayedItem(index) {\n return this.displayedKeys[index];\n }\n getSelectAllItem() {\n return SetFilterDisplayValue.SELECT_ALL;\n }\n getAddSelectionToFilterItem() {\n return SetFilterDisplayValue.ADD_SELECTION_TO_FILTER;\n }\n getDisplayedKeys() {\n return this.displayedKeys;\n }\n forEachDisplayedKey(func) {\n this.displayedKeys.forEach(func);\n }\n someDisplayedKey(func) {\n return this.displayedKeys.some(func);\n }\n hasGroups() {\n return false;\n }\n refresh() {\n }\n};\nvar _TreeSetDisplayValueModel = class _TreeSetDisplayValueModel2 {\n constructor(formatter, treeListPathGetter, treeListFormatter, treeDataOrGrouping) {\n this.formatter = formatter;\n this.treeListPathGetter = treeListPathGetter;\n this.treeListFormatter = treeListFormatter;\n this.treeDataOrGrouping = treeDataOrGrouping;\n this.allDisplayedItemsTree = [];\n this.activeDisplayedItemsFlat = [];\n this.selectAllItem = {\n depth: 0,\n filterPasses: true,\n available: true,\n treeKey: SetFilterDisplayValue.SELECT_ALL,\n children: this.allDisplayedItemsTree,\n expanded: true,\n key: SetFilterDisplayValue.SELECT_ALL,\n parentTreeKeys: []\n };\n this.addSelectionToFilterItem = {\n depth: 0,\n filterPasses: true,\n available: true,\n treeKey: SetFilterDisplayValue.ADD_SELECTION_TO_FILTER,\n expanded: true,\n key: SetFilterDisplayValue.ADD_SELECTION_TO_FILTER,\n parentTreeKeys: []\n };\n }\n updateDisplayedValuesToAllAvailable(getValue, allKeys, availableKeys, source) {\n if (source === \"reload\") {\n this.generateItemTree(getValue, allKeys, availableKeys);\n } else if (source === \"otherFilter\") {\n this.updateAvailable(availableKeys);\n this.updateExpandAll();\n } else if (source === \"miniFilter\") {\n this.resetFilter();\n this.updateExpandAll();\n }\n this.flattenItems();\n }\n updateDisplayedValuesToMatchMiniFilter(getValue, allKeys, availableKeys, matchesFilter, nullMatchesFilter, source) {\n if (source === \"reload\") {\n this.generateItemTree(getValue, allKeys, availableKeys);\n } else if (source === \"otherFilter\") {\n this.updateAvailable(availableKeys);\n }\n this.updateFilter(matchesFilter, nullMatchesFilter);\n this.updateExpandAll();\n this.flattenItems();\n }\n generateItemTree(getValue, allKeys, availableKeys) {\n var _a;\n this.allDisplayedItemsTree = [];\n this.groupsExist = false;\n const treeListPathGetter = this.getTreeListPathGetter(getValue, availableKeys);\n for (let key of allKeys) {\n const value = getValue(key);\n const dataPath = (_a = treeListPathGetter(value)) != null ? _a : [null];\n if (dataPath.length > 1) {\n this.groupsExist = true;\n }\n const available = availableKeys.has(key);\n let children = this.allDisplayedItemsTree;\n let item;\n let parentTreeKeys = [];\n dataPath.forEach((treeKey, depth) => {\n if (!children) {\n children = [];\n item.children = children;\n }\n item = children.find((child) => {\n var _a2;\n return ((_a2 = child.treeKey) == null ? void 0 : _a2.toUpperCase()) === (treeKey == null ? void 0 : treeKey.toUpperCase());\n });\n if (!item) {\n item = { treeKey, depth, filterPasses: true, expanded: false, available, parentTreeKeys };\n if (depth === dataPath.length - 1) {\n item.key = key;\n }\n children.push(item);\n }\n children = item.children;\n parentTreeKeys = [...parentTreeKeys, treeKey];\n });\n }\n this.updateAvailable(availableKeys);\n this.selectAllItem.children = this.allDisplayedItemsTree;\n this.selectAllItem.expanded = false;\n }\n getTreeListPathGetter(getValue, availableKeys) {\n if (this.treeListPathGetter) {\n return this.treeListPathGetter;\n }\n if (this.treeDataOrGrouping) {\n return (value) => value;\n }\n let isDate2 = false;\n for (const availableKey of availableKeys) {\n const value = getValue(availableKey);\n if (value instanceof Date) {\n isDate2 = true;\n break;\n } else if (value != null) {\n break;\n }\n }\n if (isDate2) {\n return _TreeSetDisplayValueModel2.DATE_TREE_LIST_PATH_GETTER;\n }\n _218.warnOnce(\"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.\");\n return (value) => [String(value)];\n }\n flattenItems() {\n this.activeDisplayedItemsFlat = [];\n const recursivelyFlattenDisplayedItems = (items) => {\n items.forEach((item) => {\n if (!item.filterPasses || !item.available) {\n return;\n }\n this.activeDisplayedItemsFlat.push(item);\n if (item.children && item.expanded) {\n recursivelyFlattenDisplayedItems(item.children);\n }\n });\n };\n recursivelyFlattenDisplayedItems(this.allDisplayedItemsTree);\n }\n resetFilter() {\n const recursiveFilterReset = (item) => {\n if (item.children) {\n item.children.forEach((child) => {\n recursiveFilterReset(child);\n });\n }\n item.filterPasses = true;\n };\n this.allDisplayedItemsTree.forEach((item) => recursiveFilterReset(item));\n }\n updateFilter(matchesFilter, nullMatchesFilter) {\n const passesFilter = (item) => {\n if (!item.available) {\n return false;\n }\n if (item.treeKey == null) {\n return nullMatchesFilter;\n }\n return matchesFilter(\n this.formatter(this.treeListFormatter ? this.treeListFormatter(item.treeKey, item.depth, item.parentTreeKeys) : item.treeKey)\n );\n };\n this.allDisplayedItemsTree.forEach((item) => this.recursiveItemCheck(item, false, passesFilter, \"filterPasses\"));\n }\n getDisplayedValueCount() {\n return this.activeDisplayedItemsFlat.length;\n }\n getDisplayedItem(index) {\n return this.activeDisplayedItemsFlat[index];\n }\n getSelectAllItem() {\n return this.selectAllItem;\n }\n getAddSelectionToFilterItem() {\n return this.addSelectionToFilterItem;\n }\n getDisplayedKeys() {\n const displayedKeys = [];\n this.forEachDisplayedKey((key) => displayedKeys.push(key));\n return displayedKeys;\n }\n forEachDisplayedKey(func) {\n const recursiveForEachItem = (item, topParentExpanded) => {\n if (item.children) {\n if (!item.expanded || !topParentExpanded) {\n item.children.forEach((child) => {\n if (child.filterPasses) {\n recursiveForEachItem(child, false);\n }\n });\n }\n } else {\n func(item.key);\n }\n };\n this.activeDisplayedItemsFlat.forEach((item) => recursiveForEachItem(item, true));\n }\n someDisplayedKey(func) {\n const recursiveSomeItem = (item, topParentExpanded) => {\n if (item.children) {\n if (!item.expanded || !topParentExpanded) {\n return item.children.some((child) => {\n if (child.filterPasses) {\n return recursiveSomeItem(child, false);\n }\n return false;\n });\n }\n } else {\n return func(item.key);\n }\n return false;\n };\n return this.activeDisplayedItemsFlat.some((item) => recursiveSomeItem(item, true));\n }\n hasGroups() {\n return this.groupsExist;\n }\n refresh() {\n this.updateExpandAll();\n this.flattenItems();\n }\n updateExpandAll() {\n const recursiveExpansionCheck = (items, someTrue, someFalse) => {\n for (const item2 of items) {\n if (!item2.filterPasses || !item2.available || !item2.children) {\n continue;\n }\n someTrue = someTrue || !!item2.expanded;\n someFalse = someFalse || !item2.expanded;\n if (someTrue && someFalse) {\n return void 0;\n }\n const childExpanded = recursiveExpansionCheck(item2.children, someTrue, someFalse);\n if (childExpanded === void 0) {\n return void 0;\n } else if (childExpanded) {\n someTrue = true;\n } else {\n someFalse = true;\n }\n }\n return someTrue && someFalse ? void 0 : someTrue;\n };\n const item = this.getSelectAllItem();\n item.expanded = recursiveExpansionCheck(item.children, false, false);\n }\n recursiveItemCheck(item, parentPasses, checkFunction, itemProp) {\n let atLeastOneChildPassed = false;\n if (item.children) {\n item.children.forEach((child) => {\n const childPasses = this.recursiveItemCheck(child, parentPasses || checkFunction(item), checkFunction, itemProp);\n atLeastOneChildPassed = atLeastOneChildPassed || childPasses;\n });\n }\n const itemPasses = parentPasses || atLeastOneChildPassed || checkFunction(item);\n item[itemProp] = itemPasses;\n return itemPasses;\n }\n updateAvailable(availableKeys) {\n const isAvailable = (item) => availableKeys.has(item.key);\n this.allDisplayedItemsTree.forEach((item) => this.recursiveItemCheck(item, false, isAvailable, \"available\"));\n }\n};\n_TreeSetDisplayValueModel.DATE_TREE_LIST_PATH_GETTER = (date) => date ? [String(date.getFullYear()), String(date.getMonth() + 1), String(date.getDate())] : null;\nvar TreeSetDisplayValueModel = _TreeSetDisplayValueModel;\nvar SetValueModelFilteringKeys = class {\n constructor({ caseFormat }) {\n this.filteringKeys = null;\n this.filteringKeysCaseFormatted = null;\n this.hasNoAppliedFilteringKeys = false;\n this.caseFormat = caseFormat;\n }\n allFilteringKeys() {\n return this.filteringKeys;\n }\n allFilteringKeysCaseFormatted() {\n return this.filteringKeysCaseFormatted;\n }\n noAppliedFilteringKeys() {\n return this.hasNoAppliedFilteringKeys;\n }\n setFilteringKeys(filteringKeys) {\n this.filteringKeys = new Set(filteringKeys);\n this.hasNoAppliedFilteringKeys = !this.filteringKeys || this.filteringKeys.size === 0;\n this.filteringKeysCaseFormatted = /* @__PURE__ */ new Set();\n this.filteringKeys.forEach(\n (key) => this.filteringKeysCaseFormatted.add(this.caseFormat(key))\n );\n }\n addFilteringKey(key) {\n if (this.filteringKeys == null) {\n this.filteringKeys = /* @__PURE__ */ new Set();\n this.filteringKeysCaseFormatted = /* @__PURE__ */ new Set();\n }\n this.filteringKeys.add(key);\n this.filteringKeysCaseFormatted.add(this.caseFormat(key));\n if (this.hasNoAppliedFilteringKeys) {\n this.hasNoAppliedFilteringKeys = false;\n }\n }\n hasCaseFormattedFilteringKey(key) {\n return this.filteringKeysCaseFormatted.has(this.caseFormat(key));\n }\n hasFilteringKey(key) {\n return this.filteringKeys.has(key);\n }\n reset() {\n this.filteringKeys = null;\n this.filteringKeysCaseFormatted = null;\n this.hasNoAppliedFilteringKeys = false;\n }\n};\nvar _SetValueModel = class _SetValueModel2 {\n constructor(params) {\n this.localEventService = new EventService2();\n this.miniFilterText = null;\n this.addCurrentSelectionToFilter = false;\n this.providedValues = null;\n this.allValues = /* @__PURE__ */ new Map();\n this.availableKeys = /* @__PURE__ */ new Set();\n this.selectedKeys = /* @__PURE__ */ new Set();\n this.initialised = false;\n const {\n usingComplexObjects,\n columnModel,\n valueService,\n treeDataTreeList,\n groupingTreeList,\n filterParams,\n gos,\n valueFormatter,\n addManagedListener\n } = params;\n const {\n column,\n colDef,\n textFormatter,\n doesRowPassOtherFilter,\n suppressSorting,\n comparator,\n rowModel,\n values,\n caseSensitive,\n convertValuesToStrings,\n treeList,\n treeListPathGetter,\n treeListFormatter\n } = filterParams;\n this.filterParams = filterParams;\n this.gos = gos;\n this.setIsLoading = params.setIsLoading;\n this.translate = params.translate;\n this.caseFormat = params.caseFormat;\n this.createKey = params.createKey;\n this.usingComplexObjects = !!params.usingComplexObjects;\n this.formatter = textFormatter || TextFilter.DEFAULT_FORMATTER;\n this.doesRowPassOtherFilters = doesRowPassOtherFilter;\n this.suppressSorting = suppressSorting || false;\n this.convertValuesToStrings = !!convertValuesToStrings;\n this.filteringKeys = new SetValueModelFilteringKeys({ caseFormat: this.caseFormat });\n const keyComparator = comparator != null ? comparator : colDef.comparator;\n const treeDataOrGrouping = !!treeDataTreeList || !!groupingTreeList;\n this.compareByValue = !!(usingComplexObjects && keyComparator || treeDataOrGrouping || treeList && !treeListPathGetter);\n if (treeDataOrGrouping && !keyComparator) {\n this.entryComparator = this.createTreeDataOrGroupingComparator();\n } else if (treeList && !treeListPathGetter && !keyComparator) {\n this.entryComparator = ([_aKey, aValue], [_bKey, bValue]) => _315.defaultComparator(aValue, bValue);\n } else {\n this.entryComparator = ([_aKey, aValue], [_bKey, bValue]) => keyComparator(aValue, bValue);\n }\n this.keyComparator = keyComparator != null ? keyComparator : _315.defaultComparator;\n this.caseSensitive = !!caseSensitive;\n const getDataPath = gos.get(\"getDataPath\");\n const groupAllowUnbalanced = gos.get(\"groupAllowUnbalanced\");\n if (rowModel.getType() === \"clientSide\") {\n this.clientSideValuesExtractor = new ClientSideValuesExtractor(\n rowModel,\n this.filterParams,\n this.createKey,\n this.caseFormat,\n columnModel,\n valueService,\n treeDataOrGrouping,\n !!treeDataTreeList,\n getDataPath,\n groupAllowUnbalanced,\n addManagedListener\n );\n }\n if (values == null) {\n this.valuesType = 2;\n } else {\n this.valuesType = Array.isArray(values) ? 0 : 1;\n this.providedValues = values;\n }\n this.displayValueModel = treeList ? new TreeSetDisplayValueModel(\n this.formatter,\n treeListPathGetter,\n treeListFormatter,\n treeDataTreeList || groupingTreeList\n ) : new FlatSetDisplayValueModel(\n valueService,\n valueFormatter,\n this.formatter,\n column\n );\n this.updateAllValues().then((updatedKeys) => this.resetSelectionState(updatedKeys || []));\n }\n addEventListener(eventType, listener, async) {\n this.localEventService.addEventListener(eventType, listener, async);\n }\n removeEventListener(eventType, listener, async) {\n this.localEventService.removeEventListener(eventType, listener, async);\n }\n updateOnParamsChange(filterParams) {\n return new AgPromise24((resolve) => {\n const {\n values,\n textFormatter,\n suppressSorting\n } = filterParams;\n const currentProvidedValues = this.providedValues;\n const currentSuppressSorting = this.suppressSorting;\n this.filterParams = filterParams;\n this.formatter = textFormatter || TextFilter.DEFAULT_FORMATTER;\n this.suppressSorting = suppressSorting || false;\n this.providedValues = values != null ? values : null;\n if (this.providedValues !== currentProvidedValues || this.suppressSorting !== currentSuppressSorting) {\n if (!values || values.length === 0) {\n this.valuesType = 2;\n this.providedValues = null;\n } else {\n this.valuesType = Array.isArray(values) ? 0 : 1;\n }\n const currentModel = this.getModel();\n this.updateAllValues().then((updatedKeys) => {\n this.setModel(currentModel).then(() => resolve());\n });\n } else {\n resolve();\n }\n });\n }\n /**\n * Re-fetches the values used in the filter from the value source.\n * If keepSelection is false, the filter selection will be reset to everything selected,\n * otherwise the current selection will be preserved.\n */\n refreshValues() {\n return new AgPromise24((resolve) => {\n this.allValuesPromise.then(() => {\n const currentModel = this.getModel();\n this.updateAllValues();\n this.setModel(currentModel).then(() => resolve());\n });\n });\n }\n /**\n * Overrides the current values being used for the set filter.\n * If keepSelection is false, the filter selection will be reset to everything selected,\n * otherwise the current selection will be preserved.\n */\n overrideValues(valuesToUse) {\n return new AgPromise24((resolve) => {\n this.allValuesPromise.then(() => {\n this.valuesType = 0;\n this.providedValues = valuesToUse;\n this.refreshValues().then(() => resolve());\n });\n });\n }\n /** @return has anything been updated */\n refreshAfterAnyFilterChanged() {\n if (this.showAvailableOnly()) {\n return this.allValuesPromise.then((keys) => {\n this.updateAvailableKeys(keys != null ? keys : [], \"otherFilter\");\n return true;\n });\n }\n return AgPromise24.resolve(false);\n }\n isInitialised() {\n return this.initialised;\n }\n updateAllValues() {\n this.allValuesPromise = new AgPromise24((resolve) => {\n switch (this.valuesType) {\n case 2:\n this.getValuesFromRowsAsync(false).then((values) => resolve(this.processAllValues(values)));\n break;\n case 0: {\n resolve(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));\n break;\n }\n case 1: {\n this.setIsLoading(true);\n const callback = this.providedValues;\n const { column, colDef } = this.filterParams;\n const params = this.gos.addGridCommonParams({\n success: (values) => {\n this.setIsLoading(false);\n resolve(this.processAllValues(this.uniqueValues(this.validateProvidedValues(values))));\n },\n colDef,\n column\n });\n window.setTimeout(() => callback(params), 0);\n break;\n }\n default:\n throw new Error(\"Unrecognised valuesType\");\n }\n });\n this.allValuesPromise.then((values) => this.updateAvailableKeys(values || [], \"reload\")).then(() => this.initialised = true);\n return this.allValuesPromise;\n }\n processAllValues(values) {\n const sortedKeys = this.sortKeys(values);\n this.allValues = values != null ? values : /* @__PURE__ */ new Map();\n return sortedKeys;\n }\n validateProvidedValues(values) {\n if (this.usingComplexObjects && (values == null ? void 0 : values.length)) {\n const firstValue = values[0];\n if (firstValue && typeof firstValue !== \"object\" && typeof firstValue !== \"function\") {\n const firstKey = this.createKey(firstValue);\n if (firstKey == null) {\n _315.warnOnce(\"Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects or set convertValuesToStrings=true in the filterParams. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types\");\n } else {\n _315.warnOnce(\"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects or enable convertValuesToStrings?\");\n }\n }\n }\n return values;\n }\n setValuesType(value) {\n this.valuesType = value;\n }\n getValuesType() {\n return this.valuesType;\n }\n isKeyAvailable(key) {\n return this.availableKeys.has(key);\n }\n showAvailableOnly() {\n return this.valuesType === 2;\n }\n updateAvailableKeys(allKeys, source) {\n const availableKeys = this.showAvailableOnly() ? this.sortKeys(this.getValuesFromRows(true)) : allKeys;\n this.availableKeys = new Set(availableKeys);\n this.localEventService.dispatchEvent({ type: _SetValueModel2.EVENT_AVAILABLE_VALUES_CHANGED });\n this.updateDisplayedValues(source, allKeys);\n }\n sortKeys(nullableValues) {\n const values = nullableValues != null ? nullableValues : /* @__PURE__ */ new Map();\n if (this.suppressSorting) {\n return Array.from(values.keys());\n }\n let sortedKeys;\n if (this.compareByValue) {\n sortedKeys = Array.from(values.entries()).sort(this.entryComparator).map(([key]) => key);\n } else {\n sortedKeys = Array.from(values.keys()).sort(this.keyComparator);\n }\n if (this.filterParams.excelMode && values.has(null)) {\n sortedKeys = sortedKeys.filter((v) => v != null);\n sortedKeys.push(null);\n }\n return sortedKeys;\n }\n getParamsForValuesFromRows(removeUnavailableValues = false) {\n if (!this.clientSideValuesExtractor) {\n _315.doOnce(() => {\n console.error(\"AG Grid: Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values\");\n }, \"setFilterValueNotCSRM\");\n return null;\n }\n const predicate = (node) => !removeUnavailableValues || this.doesRowPassOtherFilters(node);\n const existingValues = removeUnavailableValues && !this.caseSensitive ? this.allValues : void 0;\n return { predicate, existingValues };\n }\n getValuesFromRows(removeUnavailableValues = false) {\n const params = this.getParamsForValuesFromRows(removeUnavailableValues);\n if (!params) {\n return null;\n }\n return this.clientSideValuesExtractor.extractUniqueValues(params.predicate, params.existingValues);\n }\n getValuesFromRowsAsync(removeUnavailableValues = false) {\n const params = this.getParamsForValuesFromRows(removeUnavailableValues);\n if (!params) {\n return AgPromise24.resolve(null);\n }\n return this.clientSideValuesExtractor.extractUniqueValuesAsync(params.predicate, params.existingValues);\n }\n /** Sets mini filter value. Returns true if it changed from last value, otherwise false. */\n setMiniFilter(value) {\n value = _315.makeNull(value);\n if (this.miniFilterText === value) {\n return false;\n }\n if (value === null) {\n this.setAddCurrentSelectionToFilter(false);\n }\n this.miniFilterText = value;\n this.updateDisplayedValues(\"miniFilter\");\n return true;\n }\n getMiniFilter() {\n return this.miniFilterText;\n }\n updateDisplayedValues(source, allKeys) {\n if (source === \"expansion\") {\n this.displayValueModel.refresh();\n return;\n }\n if (this.miniFilterText == null) {\n this.displayValueModel.updateDisplayedValuesToAllAvailable(\n (key) => this.getValue(key),\n allKeys,\n this.availableKeys,\n source\n );\n return;\n }\n const formattedFilterText = this.caseFormat(this.formatter(this.miniFilterText) || \"\");\n const matchesFilter = (valueToCheck) => valueToCheck != null && this.caseFormat(valueToCheck).indexOf(formattedFilterText) >= 0;\n const nullMatchesFilter = !!this.filterParams.excelMode && matchesFilter(this.translate(\"blanks\"));\n this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(\n (key) => this.getValue(key),\n allKeys,\n this.availableKeys,\n matchesFilter,\n nullMatchesFilter,\n source\n );\n }\n getDisplayedValueCount() {\n return this.displayValueModel.getDisplayedValueCount();\n }\n getDisplayedItem(index) {\n return this.displayValueModel.getDisplayedItem(index);\n }\n getSelectAllItem() {\n return this.displayValueModel.getSelectAllItem();\n }\n getAddSelectionToFilterItem() {\n return this.displayValueModel.getAddSelectionToFilterItem();\n }\n hasSelections() {\n return this.filterParams.defaultToNothingSelected ? this.selectedKeys.size > 0 : this.allValues.size !== this.selectedKeys.size;\n }\n getKeys() {\n return Array.from(this.allValues.keys());\n }\n getValues() {\n return Array.from(this.allValues.values());\n }\n getValue(key) {\n return this.allValues.get(key);\n }\n setAddCurrentSelectionToFilter(value) {\n this.addCurrentSelectionToFilter = value;\n }\n isInWindowsExcelMode() {\n return this.filterParams.excelMode === \"windows\";\n }\n isAddCurrentSelectionToFilterChecked() {\n return this.isInWindowsExcelMode() && this.addCurrentSelectionToFilter;\n }\n showAddCurrentSelectionToFilter() {\n return this.isInWindowsExcelMode() && _315.exists(this.miniFilterText) && this.miniFilterText.length > 0;\n }\n selectAllMatchingMiniFilter(clearExistingSelection = false) {\n if (this.miniFilterText == null) {\n this.selectedKeys = new Set(this.allValues.keys());\n } else {\n if (clearExistingSelection) {\n this.selectedKeys.clear();\n }\n this.displayValueModel.forEachDisplayedKey((key) => this.selectedKeys.add(key));\n }\n }\n deselectAllMatchingMiniFilter() {\n if (this.miniFilterText == null) {\n this.selectedKeys.clear();\n } else {\n this.displayValueModel.forEachDisplayedKey((key) => this.selectedKeys.delete(key));\n }\n }\n selectKey(key) {\n this.selectedKeys.add(key);\n }\n deselectKey(key) {\n if (this.filterParams.excelMode && this.isEverythingVisibleSelected()) {\n this.resetSelectionState(this.displayValueModel.getDisplayedKeys());\n }\n this.selectedKeys.delete(key);\n }\n isKeySelected(key) {\n return this.selectedKeys.has(key);\n }\n isEverythingVisibleSelected() {\n return !this.displayValueModel.someDisplayedKey((it) => !this.isKeySelected(it));\n }\n isNothingVisibleSelected() {\n return !this.displayValueModel.someDisplayedKey((it) => this.isKeySelected(it));\n }\n getModel() {\n if (!this.hasSelections()) {\n return null;\n }\n const filteringKeys = this.isAddCurrentSelectionToFilterChecked() ? this.filteringKeys.allFilteringKeys() : null;\n if (filteringKeys && filteringKeys.size > 0) {\n if (this.selectedKeys) {\n const modelKeys = /* @__PURE__ */ new Set([\n ...Array.from(filteringKeys),\n ...Array.from(this.selectedKeys).filter((key) => !filteringKeys.has(key))\n ]);\n return Array.from(modelKeys);\n }\n return Array.from(filteringKeys);\n }\n return Array.from(this.selectedKeys);\n }\n setModel(model) {\n return this.allValuesPromise.then((keys) => {\n if (model == null) {\n this.resetSelectionState(keys != null ? keys : []);\n } else {\n this.selectedKeys.clear();\n const existingFormattedKeys = /* @__PURE__ */ new Map();\n this.allValues.forEach((_value, key) => {\n existingFormattedKeys.set(this.caseFormat(key), key);\n });\n model.forEach((unformattedKey) => {\n const formattedKey = this.caseFormat(_315.makeNull(unformattedKey));\n const existingUnformattedKey = existingFormattedKeys.get(formattedKey);\n if (existingUnformattedKey !== void 0) {\n this.selectKey(existingUnformattedKey);\n }\n });\n }\n });\n }\n uniqueValues(values) {\n const uniqueValues = /* @__PURE__ */ new Map();\n const formattedKeys = /* @__PURE__ */ new Set();\n (values != null ? values : []).forEach((value) => {\n const valueToUse = _315.makeNull(value);\n const unformattedKey = this.convertAndGetKey(valueToUse);\n const formattedKey = this.caseFormat(unformattedKey);\n if (!formattedKeys.has(formattedKey)) {\n formattedKeys.add(formattedKey);\n uniqueValues.set(unformattedKey, valueToUse);\n }\n });\n return uniqueValues;\n }\n convertAndGetKey(value) {\n return this.convertValuesToStrings ? value : this.createKey(value);\n }\n resetSelectionState(keys) {\n if (this.filterParams.defaultToNothingSelected) {\n this.selectedKeys.clear();\n } else {\n this.selectedKeys = new Set(keys);\n }\n }\n hasGroups() {\n return this.displayValueModel.hasGroups();\n }\n createTreeDataOrGroupingComparator() {\n return ([_aKey, aValue], [_bKey, bValue]) => {\n if (aValue == null) {\n return bValue == null ? 0 : -1;\n } else if (bValue == null) {\n return 1;\n }\n for (let i = 0; i < aValue.length; i++) {\n if (i >= bValue.length) {\n return 1;\n }\n const diff = _315.defaultComparator(aValue[i], bValue[i]);\n if (diff !== 0) {\n return diff;\n }\n }\n return 0;\n };\n }\n setAppliedModelKeys(appliedModelKeys) {\n this.filteringKeys.setFilteringKeys(appliedModelKeys);\n }\n addToAppliedModelKeys(appliedModelKey) {\n this.filteringKeys.addFilteringKey(appliedModelKey);\n }\n getAppliedModelKeys() {\n return this.filteringKeys.allFilteringKeys();\n }\n getCaseFormattedAppliedModelKeys() {\n return this.filteringKeys.allFilteringKeysCaseFormatted();\n }\n hasAppliedModelKey(appliedModelKey) {\n return this.filteringKeys.hasCaseFormattedFilteringKey(appliedModelKey);\n }\n hasAnyAppliedModelKey() {\n return !this.filteringKeys.noAppliedFilteringKeys();\n }\n};\n_SetValueModel.EVENT_AVAILABLE_VALUES_CHANGED = \"availableValuesChanged\";\nvar SetValueModel = _SetValueModel;\nvar _SetFilterListItem = class _SetFilterListItem2 extends Component57 {\n constructor(params) {\n var _a;\n super(params.isGroup ? _SetFilterListItem2.GROUP_TEMPLATE : _SetFilterListItem2.TEMPLATE);\n this.focusWrapper = params.focusWrapper;\n this.value = params.value;\n this.params = params.params;\n this.translate = params.translate;\n this.valueFormatter = params.valueFormatter;\n this.item = params.item;\n this.isSelected = params.isSelected;\n this.isTree = params.isTree;\n this.depth = (_a = params.depth) != null ? _a : 0;\n this.isGroup = params.isGroup;\n this.groupsExist = params.groupsExist;\n this.isExpanded = params.isExpanded;\n this.hasIndeterminateExpandState = params.hasIndeterminateExpandState;\n }\n init() {\n this.addDestroyFunc(() => {\n var _a;\n return (_a = this.destroyCellRendererComponent) == null ? void 0 : _a.call(this);\n });\n this.render();\n this.eCheckbox.setLabelEllipsis(true).setValue(this.isSelected, true).setDisabled(!!this.params.readOnly).getInputElement().setAttribute(\"tabindex\", \"-1\");\n this.refreshVariableAriaLabels();\n if (this.isTree) {\n if (this.depth > 0) {\n this.addCssClass(\"ag-set-filter-indent-\" + this.depth);\n }\n if (this.isGroup) {\n this.setupExpansion();\n } else {\n if (this.groupsExist) {\n this.addCssClass(\"ag-set-filter-add-group-indent\");\n }\n }\n _412.setAriaLevel(this.getAriaElement(), this.depth + 1);\n }\n this.refreshAriaChecked();\n if (!!this.params.readOnly) {\n return;\n }\n this.eCheckbox.onValueChange((value) => this.onCheckboxChanged(!!value));\n }\n getFocusableElement() {\n return this.focusWrapper;\n }\n setupExpansion() {\n this.eGroupClosedIcon.appendChild(_412.createIcon(\"setFilterGroupClosed\", this.gos, null));\n this.eGroupOpenedIcon.appendChild(_412.createIcon(\"setFilterGroupOpen\", this.gos, null));\n this.addManagedListener(this.eGroupClosedIcon, \"click\", this.onExpandOrContractClicked.bind(this));\n this.addManagedListener(this.eGroupOpenedIcon, \"click\", this.onExpandOrContractClicked.bind(this));\n if (this.hasIndeterminateExpandState) {\n this.eGroupIndeterminateIcon.appendChild(_412.createIcon(\"setFilterGroupIndeterminate\", this.gos, null));\n this.addManagedListener(this.eGroupIndeterminateIcon, \"click\", this.onExpandOrContractClicked.bind(this));\n }\n this.setExpandedIcons();\n this.refreshAriaExpanded();\n }\n onExpandOrContractClicked() {\n this.setExpanded(!this.isExpanded);\n }\n setExpanded(isExpanded, silent) {\n if (this.isGroup && isExpanded !== this.isExpanded) {\n this.isExpanded = isExpanded;\n const event = {\n type: _SetFilterListItem2.EVENT_EXPANDED_CHANGED,\n isExpanded: !!isExpanded,\n item: this.item\n };\n if (!silent) {\n this.dispatchEvent(event);\n }\n this.setExpandedIcons();\n this.refreshAriaExpanded();\n }\n }\n setExpandedIcons() {\n _412.setDisplayed(this.eGroupClosedIcon, this.hasIndeterminateExpandState ? this.isExpanded === false : !this.isExpanded);\n _412.setDisplayed(this.eGroupOpenedIcon, this.isExpanded === true);\n if (this.hasIndeterminateExpandState) {\n _412.setDisplayed(this.eGroupIndeterminateIcon, this.isExpanded === void 0);\n }\n }\n onCheckboxChanged(isSelected) {\n this.isSelected = isSelected;\n const event = {\n type: _SetFilterListItem2.EVENT_SELECTION_CHANGED,\n isSelected,\n item: this.item\n };\n this.dispatchEvent(event);\n this.refreshVariableAriaLabels();\n this.refreshAriaChecked();\n }\n toggleSelected() {\n if (!!this.params.readOnly) {\n return;\n }\n this.setSelected(!this.isSelected);\n }\n setSelected(isSelected, silent) {\n this.isSelected = isSelected;\n this.eCheckbox.setValue(isSelected, silent);\n this.refreshAriaChecked();\n }\n refreshVariableAriaLabels() {\n if (!this.isTree) {\n return;\n }\n const translate = this.localeService.getLocaleTextFunc();\n const checkboxValue = this.eCheckbox.getValue();\n const state = checkboxValue === void 0 ? translate(\"ariaIndeterminate\", \"indeterminate\") : checkboxValue ? translate(\"ariaVisible\", \"visible\") : translate(\"ariaHidden\", \"hidden\");\n const visibilityLabel = translate(\"ariaToggleVisibility\", \"Press SPACE to toggle visibility\");\n _412.setAriaLabelledBy(this.eCheckbox.getInputElement(), void 0);\n this.eCheckbox.setInputAriaLabel(`${visibilityLabel} (${state})`);\n }\n setupFixedAriaLabels(value) {\n if (!this.isTree) {\n return;\n }\n const translate = this.localeService.getLocaleTextFunc();\n const itemLabel = translate(\"ariaFilterValue\", \"Filter Value\");\n const ariaEl = this.getAriaElement();\n _412.setAriaLabel(ariaEl, `${value} ${itemLabel}`);\n _412.setAriaDescribedBy(ariaEl, this.eCheckbox.getInputElement().id);\n }\n refreshAriaChecked() {\n const ariaEl = this.getAriaElement();\n _412.setAriaChecked(ariaEl, this.eCheckbox.getValue());\n }\n refreshAriaExpanded() {\n _412.setAriaExpanded(this.getAriaElement(), !!this.isExpanded);\n }\n refresh(item, isSelected, isExpanded) {\n var _a, _b;\n this.item = item;\n if (isSelected !== this.isSelected) {\n this.setSelected(isSelected, true);\n }\n this.setExpanded(isExpanded, true);\n if (this.valueFunction) {\n const value = this.valueFunction();\n this.setTooltipAndCellRendererParams(value, value);\n if (!this.cellRendererComponent) {\n this.renderCellWithoutCellRenderer();\n }\n }\n if (this.cellRendererComponent) {\n const success = (_b = (_a = this.cellRendererComponent).refresh) == null ? void 0 : _b.call(_a, this.cellRendererParams);\n if (!success) {\n const oldComponent = this.cellRendererComponent;\n this.renderCell();\n this.destroyBean(oldComponent);\n }\n }\n }\n render() {\n const { params: { column } } = this;\n let { value } = this;\n let formattedValue = null;\n if (typeof value === \"function\") {\n this.valueFunction = value;\n formattedValue = this.valueFunction();\n value = formattedValue;\n } else if (this.isTree) {\n formattedValue = _412.toStringOrNull(value);\n } else {\n formattedValue = this.getFormattedValue(column, value);\n }\n this.setTooltipAndCellRendererParams(value, formattedValue);\n this.renderCell();\n }\n setTooltipAndCellRendererParams(value, formattedValue) {\n const isTooltipWhenTruncated = this.gos.get(\"tooltipShowMode\") === \"whenTruncated\";\n if (this.params.showTooltips && (!isTooltipWhenTruncated || !this.params.cellRenderer)) {\n const newTooltipText = formattedValue != null ? formattedValue : _412.toStringOrNull(value);\n let shouldDisplayTooltip;\n if (isTooltipWhenTruncated) {\n shouldDisplayTooltip = () => {\n const el = this.eCheckbox.getGui().querySelector(\".ag-label\");\n if (!el) {\n return true;\n }\n return el.scrollWidth > el.clientWidth;\n };\n }\n this.setTooltip({\n newTooltipText,\n location: \"setFilterValue\",\n getColDef: () => this.params.colDef,\n getColumn: () => this.params.column,\n shouldDisplayTooltip\n });\n }\n this.cellRendererParams = this.gos.addGridCommonParams({\n value,\n valueFormatted: formattedValue,\n colDef: this.params.colDef,\n column: this.params.column,\n setTooltip: (value2, shouldDisplayTooltip) => {\n this.setTooltip({\n newTooltipText: value2,\n getColDef: () => this.params.colDef,\n getColumn: () => this.params.column,\n location: \"setFilterValue\",\n shouldDisplayTooltip\n });\n }\n });\n }\n getTooltipParams() {\n const res = super.getTooltipParams();\n res.location = \"setFilterValue\";\n res.colDef = this.getComponentHolder();\n if (this.isTree) {\n res.level = this.depth;\n }\n return res;\n }\n getFormattedValue(column, value) {\n return this.valueService.formatValue(column, null, value, this.valueFormatter, false);\n }\n renderCell() {\n const compDetails = this.userComponentFactory.getSetFilterCellRendererDetails(this.params, this.cellRendererParams);\n const cellRendererPromise = compDetails ? compDetails.newAgStackInstance() : void 0;\n if (cellRendererPromise == null) {\n this.renderCellWithoutCellRenderer();\n return;\n }\n cellRendererPromise.then((component) => {\n if (component) {\n this.cellRendererComponent = component;\n this.eCheckbox.setLabel(component.getGui());\n this.destroyCellRendererComponent = () => this.destroyBean(component);\n }\n });\n }\n renderCellWithoutCellRenderer() {\n var _a;\n let valueToRender = (_a = this.cellRendererParams.valueFormatted == null ? this.cellRendererParams.value : this.cellRendererParams.valueFormatted) != null ? _a : this.translate(\"blanks\");\n if (typeof valueToRender !== \"string\") {\n _412.warnOnce(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects, or set convertValuesToStrings=true in the filterParams. See ${this.getFrameworkOverrides().getDocLink(\"filter-set-filter-list/#filter-value-types\")}`);\n valueToRender = \"\";\n }\n this.eCheckbox.setLabel(valueToRender);\n this.setupFixedAriaLabels(valueToRender);\n }\n getComponentHolder() {\n return this.params.column.getColDef();\n }\n};\n_SetFilterListItem.EVENT_SELECTION_CHANGED = \"selectionChanged\";\n_SetFilterListItem.EVENT_EXPANDED_CHANGED = \"expandedChanged\";\n_SetFilterListItem.GROUP_TEMPLATE = /* html */\n`\n
\n \n \n \n \n \n \n
`;\n_SetFilterListItem.TEMPLATE = /* html */\n`\n
\n \n
`;\n__decorateClass15([\n Autowired68(\"valueService\")\n], _SetFilterListItem.prototype, \"valueService\", 2);\n__decorateClass15([\n Autowired68(\"userComponentFactory\")\n], _SetFilterListItem.prototype, \"userComponentFactory\", 2);\n__decorateClass15([\n RefSelector21(\"eCheckbox\")\n], _SetFilterListItem.prototype, \"eCheckbox\", 2);\n__decorateClass15([\n RefSelector21(\"eGroupOpenedIcon\")\n], _SetFilterListItem.prototype, \"eGroupOpenedIcon\", 2);\n__decorateClass15([\n RefSelector21(\"eGroupClosedIcon\")\n], _SetFilterListItem.prototype, \"eGroupClosedIcon\", 2);\n__decorateClass15([\n RefSelector21(\"eGroupIndeterminateIcon\")\n], _SetFilterListItem.prototype, \"eGroupIndeterminateIcon\", 2);\n__decorateClass15([\n PostConstruct65\n], _SetFilterListItem.prototype, \"init\", 1);\nvar SetFilterListItem = _SetFilterListItem;\nvar DEFAULT_LOCALE_TEXT = {\n loadingOoo: \"Loading...\",\n blanks: \"(Blanks)\",\n searchOoo: \"Search...\",\n selectAll: \"(Select All)\",\n selectAllSearchResults: \"(Select All Search Results)\",\n addCurrentSelectionToFilter: \"Add current selection to filter\",\n noMatches: \"No matches.\"\n};\nvar SetFilterModelFormatter = class {\n getModelAsString(model, setFilter) {\n const { values } = model || setFilter.getModel() || {};\n const valueModel = setFilter.getValueModel();\n if (values == null || valueModel == null) {\n return \"\";\n }\n const availableKeys = values.filter((v) => valueModel.isKeyAvailable(v));\n const numValues = availableKeys.length;\n const formattedValues = availableKeys.slice(0, 10).map((key) => setFilter.getFormattedValue(key));\n return `(${numValues}) ${formattedValues.join(\",\")}${numValues > 10 ? \",...\" : \"\"}`;\n }\n};\nvar SetFilter = class extends ProvidedFilter2 {\n constructor() {\n super(\"setFilter\");\n this.valueModel = null;\n this.setFilterParams = null;\n this.virtualList = null;\n this.caseSensitive = false;\n this.convertValuesToStrings = false;\n this.treeDataTreeList = false;\n this.groupingTreeList = false;\n this.hardRefreshVirtualList = false;\n this.noValueFormatterSupplied = false;\n this.filterModelFormatter = new SetFilterModelFormatter();\n this.updateSetFilterOnParamsChange = (newParams) => {\n var _a;\n this.setFilterParams = newParams;\n this.convertValuesToStrings = !!newParams.convertValuesToStrings;\n this.caseSensitive = !!newParams.caseSensitive;\n const keyCreator = (_a = newParams.keyCreator) != null ? _a : newParams.colDef.keyCreator;\n this.setValueFormatter(newParams.valueFormatter, keyCreator, this.convertValuesToStrings, !!newParams.treeList, !!newParams.colDef.refData);\n const isGroupCol = newParams.column.getId().startsWith(GROUP_AUTO_COLUMN_ID2);\n this.treeDataTreeList = this.gos.get(\"treeData\") && !!newParams.treeList && isGroupCol;\n this.getDataPath = this.gos.get(\"getDataPath\");\n this.groupingTreeList = !!this.columnModel.getRowGroupColumns().length && !!newParams.treeList && isGroupCol;\n this.createKey = this.generateCreateKey(keyCreator, this.convertValuesToStrings, this.treeDataTreeList || this.groupingTreeList);\n };\n }\n postConstruct() {\n super.postConstruct();\n }\n // unlike the simple filters, nothing in the set filter UI shows/hides.\n // maybe this method belongs in abstractSimpleFilter???\n updateUiVisibility() {\n }\n createBodyTemplate() {\n return (\n /* html */\n `\n
\n
${this.translateForSetFilter(\"loadingOoo\")}
\n \n
${this.translateForSetFilter(\"noMatches\")}
\n
\n
`\n );\n }\n handleKeyDown(e) {\n super.handleKeyDown(e);\n if (e.defaultPrevented) {\n return;\n }\n switch (e.key) {\n case KeyCode11.SPACE:\n this.handleKeySpace(e);\n break;\n case KeyCode11.ENTER:\n this.handleKeyEnter(e);\n break;\n case KeyCode11.LEFT:\n this.handleKeyLeft(e);\n break;\n case KeyCode11.RIGHT:\n this.handleKeyRight(e);\n break;\n }\n }\n handleKeySpace(e) {\n var _a;\n (_a = this.getComponentForKeyEvent(e)) == null ? void 0 : _a.toggleSelected();\n }\n handleKeyEnter(e) {\n if (!this.setFilterParams) {\n return;\n }\n const { excelMode, readOnly } = this.setFilterParams || {};\n if (!excelMode || !!readOnly) {\n return;\n }\n e.preventDefault();\n this.onBtApply(false, false, e);\n if (this.setFilterParams.excelMode === \"mac\") {\n this.eMiniFilter.getInputElement().select();\n }\n }\n handleKeyLeft(e) {\n var _a;\n (_a = this.getComponentForKeyEvent(e)) == null ? void 0 : _a.setExpanded(false);\n }\n handleKeyRight(e) {\n var _a;\n (_a = this.getComponentForKeyEvent(e)) == null ? void 0 : _a.setExpanded(true);\n }\n getComponentForKeyEvent(e) {\n var _a;\n if (!this.eSetFilterList.contains(this.gos.getActiveDomElement()) || !this.virtualList) {\n return;\n }\n const currentItem = this.virtualList.getLastFocusedRow();\n if (currentItem == null) {\n return;\n }\n const component = this.virtualList.getComponentAt(currentItem);\n if (component == null) {\n return;\n }\n e.preventDefault();\n const { readOnly } = (_a = this.setFilterParams) != null ? _a : {};\n if (!!readOnly) {\n return;\n }\n return component;\n }\n getCssIdentifier() {\n return \"set-filter\";\n }\n setModel(model) {\n var _a;\n if (model == null && ((_a = this.valueModel) == null ? void 0 : _a.getModel()) == null) {\n this.setMiniFilter(null);\n return AgPromise32.resolve();\n }\n return super.setModel(model);\n }\n refresh(params) {\n var _a, _b, _c;\n if (!super.refresh(params)) {\n return false;\n }\n const paramsThatForceReload = [\n \"treeList\",\n \"treeListFormatter\",\n \"treeListPathGetter\",\n \"keyCreator\",\n \"convertValuesToStrings\",\n \"caseSensitive\",\n \"comparator\",\n \"suppressSelectAll\",\n \"excelMode\"\n ];\n if (paramsThatForceReload.some((param) => {\n var _a2;\n return params[param] !== ((_a2 = this.setFilterParams) == null ? void 0 : _a2[param]);\n })) {\n return false;\n }\n if (this.haveColDefParamsChanged(params.colDef)) {\n return false;\n }\n super.updateParams(params);\n this.updateSetFilterOnParamsChange(params);\n this.updateMiniFilter();\n if (params.cellRenderer !== ((_a = this.setFilterParams) == null ? void 0 : _a.cellRenderer) || params.valueFormatter !== ((_b = this.setFilterParams) == null ? void 0 : _b.valueFormatter)) {\n this.checkAndRefreshVirtualList();\n }\n (_c = this.valueModel) == null ? void 0 : _c.updateOnParamsChange(params).then(() => {\n var _a2;\n if ((_a2 = this.valueModel) == null ? void 0 : _a2.hasSelections()) {\n this.refreshFilterValues();\n }\n });\n return true;\n }\n haveColDefParamsChanged(colDef) {\n var _a;\n const paramsThatForceReload = [\n \"keyCreator\",\n \"filterValueGetter\"\n ];\n const existingColDef = (_a = this.setFilterParams) == null ? void 0 : _a.colDef;\n return paramsThatForceReload.some((param) => colDef[param] !== (existingColDef == null ? void 0 : existingColDef[param]));\n }\n setModelAndRefresh(values) {\n return this.valueModel ? this.valueModel.setModel(values).then(() => this.checkAndRefreshVirtualList()) : AgPromise32.resolve();\n }\n resetUiToDefaults() {\n this.setMiniFilter(null);\n return this.setModelAndRefresh(null);\n }\n setModelIntoUi(model) {\n this.setMiniFilter(null);\n const values = model == null ? null : model.values;\n return this.setModelAndRefresh(values);\n }\n getModelFromUi() {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const values = this.valueModel.getModel();\n if (!values) {\n return null;\n }\n return { values, filterType: this.getFilterType() };\n }\n getFilterType() {\n return \"set\";\n }\n getValueModel() {\n return this.valueModel;\n }\n areModelsEqual(a, b) {\n if (a == null && b == null) {\n return true;\n }\n return a != null && b != null && _59.areEqual(a.values, b.values);\n }\n setParams(params) {\n var _a;\n this.applyExcelModeOptions(params);\n super.setParams(params);\n this.updateSetFilterOnParamsChange(params);\n const keyCreator = (_a = params.keyCreator) != null ? _a : params.colDef.keyCreator;\n this.valueModel = new SetValueModel({\n filterParams: params,\n setIsLoading: (loading) => this.setIsLoading(loading),\n translate: (key) => this.translateForSetFilter(key),\n caseFormat: (v) => this.caseFormat(v),\n createKey: this.createKey,\n valueFormatter: this.valueFormatter,\n usingComplexObjects: !!keyCreator,\n gos: this.gos,\n columnModel: this.columnModel,\n valueService: this.valueService,\n treeDataTreeList: this.treeDataTreeList,\n groupingTreeList: this.groupingTreeList,\n addManagedListener: (event, listener) => this.addManagedListener(this.eventService, event, listener)\n });\n this.initialiseFilterBodyUi();\n this.addEventListenersForDataChanges();\n }\n onAddCurrentSelectionToFilterChange(newValue) {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n this.valueModel.setAddCurrentSelectionToFilter(newValue);\n }\n setValueFormatter(providedValueFormatter, keyCreator, convertValuesToStrings, treeList, isRefData) {\n let valueFormatter = providedValueFormatter;\n if (!valueFormatter) {\n if (keyCreator && !convertValuesToStrings && !treeList) {\n throw new Error(\"AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator unless convertValuesToStrings is enabled\");\n }\n this.noValueFormatterSupplied = true;\n if (!isRefData) {\n valueFormatter = (params) => _59.toStringOrNull(params.value);\n }\n }\n this.valueFormatter = valueFormatter;\n }\n generateCreateKey(keyCreator, convertValuesToStrings, treeDataOrGrouping) {\n if (treeDataOrGrouping && !keyCreator) {\n throw new Error(\"AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.\");\n }\n if (keyCreator) {\n return (value, node = null) => {\n const params = this.getKeyCreatorParams(value, node);\n return _59.makeNull(keyCreator(params));\n };\n }\n if (convertValuesToStrings) {\n return (value) => Array.isArray(value) ? value : _59.makeNull(_59.toStringOrNull(value));\n } else {\n return (value) => _59.makeNull(_59.toStringOrNull(value));\n }\n }\n getFormattedValue(key) {\n var _a;\n let value = this.valueModel.getValue(key);\n if (this.noValueFormatterSupplied && (this.treeDataTreeList || this.groupingTreeList) && Array.isArray(value)) {\n value = _59.last(value);\n }\n const formattedValue = this.valueService.formatValue(\n this.setFilterParams.column,\n null,\n value,\n this.valueFormatter,\n false\n );\n return (_a = formattedValue == null ? _59.toStringOrNull(value) : formattedValue) != null ? _a : this.translateForSetFilter(\"blanks\");\n }\n applyExcelModeOptions(params) {\n if (params.excelMode === \"windows\") {\n if (!params.buttons) {\n params.buttons = [\"apply\", \"cancel\"];\n }\n if (params.closeOnApply == null) {\n params.closeOnApply = true;\n }\n } else if (params.excelMode === \"mac\") {\n if (!params.buttons) {\n params.buttons = [\"reset\"];\n }\n if (params.applyMiniFilterWhileTyping == null) {\n params.applyMiniFilterWhileTyping = true;\n }\n if (params.debounceMs == null) {\n params.debounceMs = 500;\n }\n }\n if (params.excelMode && params.defaultToNothingSelected) {\n params.defaultToNothingSelected = false;\n _59.warnOnce('The Set Filter Parameter \"defaultToNothingSelected\" value was ignored because it does not work when \"excelMode\" is used.');\n }\n }\n addEventListenersForDataChanges() {\n if (!this.isValuesTakenFromGrid()) {\n return;\n }\n this.addManagedListener(\n this.eventService,\n Events210.EVENT_CELL_VALUE_CHANGED,\n (event) => {\n if (this.setFilterParams && event.column === this.setFilterParams.column) {\n this.syncAfterDataChange();\n }\n }\n );\n this.addManagedPropertyListeners([\"treeData\", \"getDataPath\", \"groupAllowUnbalanced\"], () => {\n this.syncAfterDataChange();\n });\n }\n syncAfterDataChange() {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n let promise = this.valueModel.refreshValues();\n return promise.then(() => {\n this.checkAndRefreshVirtualList();\n this.onBtApply(false, true);\n });\n }\n setIsLoading(isLoading) {\n _59.setDisplayed(this.eFilterLoading, isLoading);\n if (!isLoading) {\n this.hardRefreshVirtualList = true;\n }\n }\n initialiseFilterBodyUi() {\n this.initVirtualList();\n this.initMiniFilter();\n }\n initVirtualList() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const translate = this.localeService.getLocaleTextFunc();\n const filterListName = translate(\"ariaFilterList\", \"Filter List\");\n const isTree = !!this.setFilterParams.treeList;\n const virtualList = this.virtualList = this.createBean(new VirtualList4({\n cssIdentifier: \"filter\",\n ariaRole: isTree ? \"tree\" : \"listbox\",\n listName: filterListName\n }));\n const eSetFilterList = this.getRefElement(\"eSetFilterList\");\n if (isTree) {\n eSetFilterList.classList.add(\"ag-set-filter-tree-list\");\n }\n if (eSetFilterList) {\n eSetFilterList.appendChild(virtualList.getGui());\n }\n const { cellHeight } = this.setFilterParams;\n if (cellHeight != null) {\n virtualList.setRowHeight(cellHeight);\n }\n const componentCreator = (item, listItemElement) => this.createSetListItem(item, isTree, listItemElement);\n virtualList.setComponentCreator(componentCreator);\n const componentUpdater = (item, component) => this.updateSetListItem(item, component);\n virtualList.setComponentUpdater(componentUpdater);\n let model;\n if (this.setFilterParams.suppressSelectAll) {\n model = new ModelWrapper(this.valueModel);\n } else {\n model = new ModelWrapperWithSelectAll(this.valueModel, () => this.isSelectAllSelected());\n }\n if (isTree) {\n model = new TreeModelWrapper(model);\n }\n virtualList.setModel(model);\n }\n getSelectAllLabel() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const key = this.valueModel.getMiniFilter() == null || !this.setFilterParams.excelMode ? \"selectAll\" : \"selectAllSearchResults\";\n return this.translateForSetFilter(key);\n }\n getAddSelectionToFilterLabel() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n return this.translateForSetFilter(\"addCurrentSelectionToFilter\");\n }\n createSetListItem(item, isTree, focusWrapper) {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const groupsExist = this.valueModel.hasGroups();\n const { isSelected, isExpanded } = this.isSelectedExpanded(item);\n const {\n value,\n depth,\n isGroup,\n hasIndeterminateExpandState,\n selectedListener,\n expandedListener\n } = this.newSetListItemAttributes(item, isTree);\n const itemParams = {\n focusWrapper,\n value,\n params: this.setFilterParams,\n translate: (translateKey) => this.translateForSetFilter(translateKey),\n valueFormatter: this.valueFormatter,\n item,\n isSelected,\n isTree,\n depth,\n groupsExist,\n isGroup,\n isExpanded,\n hasIndeterminateExpandState\n };\n const listItem = this.createBean(new SetFilterListItem(itemParams));\n listItem.addEventListener(SetFilterListItem.EVENT_SELECTION_CHANGED, selectedListener);\n if (expandedListener) {\n listItem.addEventListener(SetFilterListItem.EVENT_EXPANDED_CHANGED, expandedListener);\n }\n return listItem;\n }\n newSetTreeItemAttributes(item, isTree) {\n var _a, _b, _c, _d, _e, _f;\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const groupsExist = this.valueModel.hasGroups();\n if (item.key === SetFilterDisplayValue.SELECT_ALL) {\n return {\n value: () => this.getSelectAllLabel(),\n isGroup: groupsExist,\n depth: item.depth,\n hasIndeterminateExpandState: true,\n selectedListener: (e) => this.onSelectAll(e.isSelected),\n expandedListener: (e) => this.onExpandAll(e.item, e.isExpanded)\n };\n }\n if (item.key === SetFilterDisplayValue.ADD_SELECTION_TO_FILTER) {\n return {\n value: () => this.getAddSelectionToFilterLabel(),\n depth: item.depth,\n isGroup: false,\n hasIndeterminateExpandState: false,\n selectedListener: (e) => {\n this.onAddCurrentSelectionToFilterChange(e.isSelected);\n }\n };\n }\n if (item.children) {\n return {\n value: (_c = (_b = (_a = this.setFilterParams).treeListFormatter) == null ? void 0 : _b.call(_a, item.treeKey, item.depth, item.parentTreeKeys)) != null ? _c : item.treeKey,\n depth: item.depth,\n isGroup: true,\n selectedListener: (e) => this.onGroupItemSelected(e.item, e.isSelected),\n expandedListener: (e) => this.onExpandedChanged(e.item, e.isExpanded)\n };\n }\n return {\n value: (_f = (_e = (_d = this.setFilterParams).treeListFormatter) == null ? void 0 : _e.call(_d, item.treeKey, item.depth, item.parentTreeKeys)) != null ? _f : item.treeKey,\n depth: item.depth,\n selectedListener: (e) => this.onItemSelected(e.item.key, e.isSelected)\n };\n }\n newSetListItemAttributes(item, isTree) {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (this.isSetFilterModelTreeItem(item)) {\n return this.newSetTreeItemAttributes(item, isTree);\n }\n if (item === SetFilterDisplayValue.SELECT_ALL) {\n return {\n value: () => this.getSelectAllLabel(),\n selectedListener: (e) => this.onSelectAll(e.isSelected)\n };\n }\n if (item === SetFilterDisplayValue.ADD_SELECTION_TO_FILTER) {\n return {\n value: () => this.getAddSelectionToFilterLabel(),\n selectedListener: (e) => {\n this.onAddCurrentSelectionToFilterChange(e.isSelected);\n }\n };\n }\n return {\n value: this.valueModel.getValue(item),\n selectedListener: (e) => this.onItemSelected(e.item, e.isSelected)\n };\n }\n updateSetListItem(item, component) {\n const { isSelected, isExpanded } = this.isSelectedExpanded(item);\n component.refresh(item, isSelected, isExpanded);\n }\n isSelectedExpanded(item) {\n let isSelected;\n let isExpanded;\n if (this.isSetFilterModelTreeItem(item)) {\n isExpanded = item.expanded;\n if (item.key === SetFilterDisplayValue.SELECT_ALL) {\n isSelected = this.isSelectAllSelected();\n } else if (item.key === SetFilterDisplayValue.ADD_SELECTION_TO_FILTER) {\n isSelected = this.valueModel.isAddCurrentSelectionToFilterChecked();\n } else if (item.children) {\n isSelected = this.areAllChildrenSelected(item);\n } else {\n isSelected = this.valueModel.isKeySelected(item.key);\n }\n } else {\n if (item === SetFilterDisplayValue.SELECT_ALL) {\n isSelected = this.isSelectAllSelected();\n } else if (item === SetFilterDisplayValue.ADD_SELECTION_TO_FILTER) {\n isSelected = this.valueModel.isAddCurrentSelectionToFilterChecked();\n } else {\n isSelected = this.valueModel.isKeySelected(item);\n }\n }\n return { isSelected, isExpanded };\n }\n isSetFilterModelTreeItem(item) {\n return (item == null ? void 0 : item.treeKey) !== void 0;\n }\n initMiniFilter() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const { eMiniFilter, localeService } = this;\n const translate = localeService.getLocaleTextFunc();\n eMiniFilter.setDisplayed(!this.setFilterParams.suppressMiniFilter);\n eMiniFilter.setValue(this.valueModel.getMiniFilter());\n eMiniFilter.onValueChange(() => this.onMiniFilterInput());\n eMiniFilter.setInputAriaLabel(translate(\"ariaSearchFilterValues\", \"Search filter values\"));\n this.addManagedListener(eMiniFilter.getInputElement(), \"keydown\", (e) => this.onMiniFilterKeyDown(e));\n }\n updateMiniFilter() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const { eMiniFilter } = this;\n if (eMiniFilter.isDisplayed() !== !this.setFilterParams.suppressMiniFilter) {\n eMiniFilter.setDisplayed(!this.setFilterParams.suppressMiniFilter);\n }\n const miniFilterValue = this.valueModel.getMiniFilter();\n if (eMiniFilter.getValue() !== miniFilterValue) {\n eMiniFilter.setValue(miniFilterValue);\n }\n }\n // we need to have the GUI attached before we can draw the virtual rows, as the\n // virtual row logic needs info about the GUI state\n afterGuiAttached(params) {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n super.afterGuiAttached(params);\n this.resetExpansion();\n this.refreshVirtualList();\n const { eMiniFilter } = this;\n eMiniFilter.setInputPlaceholder(this.translateForSetFilter(\"searchOoo\"));\n if (!params || !params.suppressFocus) {\n eMiniFilter.getFocusableElement().focus();\n }\n }\n afterGuiDetached() {\n var _a, _b;\n super.afterGuiDetached();\n if ((_a = this.setFilterParams) == null ? void 0 : _a.excelMode) {\n this.resetMiniFilter();\n }\n const appliedModel = this.getModel();\n if (((_b = this.setFilterParams) == null ? void 0 : _b.excelMode) || !this.areModelsEqual(appliedModel, this.getModelFromUi())) {\n this.resetUiToActiveModel(appliedModel);\n this.showOrHideResults();\n }\n }\n applyModel(source = \"api\") {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (this.setFilterParams.excelMode && source !== \"rowDataUpdated\" && this.valueModel.isEverythingVisibleSelected()) {\n this.valueModel.selectAllMatchingMiniFilter();\n }\n const shouldKeepCurrentSelection = this.valueModel.showAddCurrentSelectionToFilter() && this.valueModel.isAddCurrentSelectionToFilterChecked();\n if (shouldKeepCurrentSelection && !this.getModel()) {\n return false;\n }\n const result = super.applyModel(source);\n const appliedModel = this.getModel();\n if (appliedModel) {\n if (!shouldKeepCurrentSelection) {\n this.valueModel.setAppliedModelKeys(/* @__PURE__ */ new Set());\n }\n appliedModel.values.forEach((key) => {\n this.valueModel.addToAppliedModelKeys(key);\n });\n } else {\n if (!shouldKeepCurrentSelection) {\n this.valueModel.setAppliedModelKeys(null);\n }\n }\n return result;\n }\n isModelValid(model) {\n return this.setFilterParams && this.setFilterParams.excelMode ? model == null || model.values.length > 0 : true;\n }\n doesFilterPass(params) {\n if (!this.setFilterParams || !this.valueModel || !this.valueModel.getCaseFormattedAppliedModelKeys()) {\n return true;\n }\n if (!this.valueModel.hasAnyAppliedModelKey()) {\n return false;\n }\n const { node, data } = params;\n if (this.treeDataTreeList) {\n return this.doesFilterPassForTreeData(node, data);\n }\n if (this.groupingTreeList) {\n return this.doesFilterPassForGrouping(node);\n }\n let value = this.getValueFromNode(node);\n if (this.convertValuesToStrings) {\n return this.doesFilterPassForConvertValuesToString(node, value);\n }\n if (value != null && Array.isArray(value)) {\n if (value.length === 0) {\n return this.valueModel.hasAppliedModelKey(null);\n }\n return value.some((v) => this.isInAppliedModel(this.createKey(v, node)));\n }\n return this.isInAppliedModel(this.createKey(value, node));\n }\n doesFilterPassForConvertValuesToString(node, value) {\n const key = this.createKey(value, node);\n if (key != null && Array.isArray(key)) {\n if (key.length === 0) {\n return this.valueModel.hasAppliedModelKey(null);\n }\n return key.some((v) => this.isInAppliedModel(v));\n }\n return this.isInAppliedModel(key);\n }\n doesFilterPassForTreeData(node, data) {\n var _a;\n if ((_a = node.childrenAfterGroup) == null ? void 0 : _a.length) {\n return false;\n }\n return this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(this.getDataPath(data))));\n }\n doesFilterPassForGrouping(node) {\n const dataPath = this.columnModel.getRowGroupColumns().map((groupCol) => this.valueService.getKeyForNode(groupCol, node));\n dataPath.push(this.getValueFromNode(node));\n return this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(dataPath)));\n }\n checkMakeNullDataPath(dataPath) {\n if (dataPath) {\n dataPath = dataPath.map((treeKey) => _59.toStringOrNull(_59.makeNull(treeKey)));\n }\n if (dataPath == null ? void 0 : dataPath.some((treeKey) => treeKey == null)) {\n return null;\n }\n return dataPath;\n }\n isInAppliedModel(key) {\n return this.valueModel.hasAppliedModelKey(key);\n }\n getValueFromNode(node) {\n return this.setFilterParams.getValue(node);\n }\n getKeyCreatorParams(value, node = null) {\n return {\n value,\n colDef: this.setFilterParams.colDef,\n column: this.setFilterParams.column,\n node,\n data: node == null ? void 0 : node.data,\n api: this.setFilterParams.api,\n columnApi: this.setFilterParams.columnApi,\n context: this.setFilterParams.context\n };\n }\n onNewRowsLoaded() {\n if (!this.isValuesTakenFromGrid()) {\n return;\n }\n this.syncAfterDataChange();\n }\n isValuesTakenFromGrid() {\n if (!this.valueModel) {\n return false;\n }\n const valuesType = this.valueModel.getValuesType();\n return valuesType === 2;\n }\n //noinspection JSUnusedGlobalSymbols\n /**\n * Public method provided so the user can change the value of the filter once\n * the filter has been already started\n * @param values The values to use.\n */\n setFilterValues(values) {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n this.valueModel.overrideValues(values).then(() => {\n this.checkAndRefreshVirtualList();\n this.onUiChanged();\n });\n }\n //noinspection JSUnusedGlobalSymbols\n /**\n * Public method provided so the user can reset the values of the filter once that it has started.\n */\n resetFilterValues() {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n this.valueModel.setValuesType(\n 2\n /* TAKEN_FROM_GRID_VALUES */\n );\n this.syncAfterDataChange();\n }\n refreshFilterValues() {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (!this.valueModel.isInitialised()) {\n return;\n }\n this.valueModel.refreshValues().then(() => {\n this.checkAndRefreshVirtualList();\n this.onUiChanged();\n });\n }\n onAnyFilterChanged() {\n setTimeout(() => {\n if (!this.isAlive()) {\n return;\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n this.valueModel.refreshAfterAnyFilterChanged().then((refresh) => {\n if (refresh) {\n this.checkAndRefreshVirtualList();\n this.showOrHideResults();\n }\n });\n }, 0);\n }\n onMiniFilterInput() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (!this.valueModel.setMiniFilter(this.eMiniFilter.getValue())) {\n return;\n }\n const { applyMiniFilterWhileTyping, readOnly } = this.setFilterParams || {};\n if (!readOnly && applyMiniFilterWhileTyping) {\n this.filterOnAllVisibleValues(false);\n } else {\n this.updateUiAfterMiniFilterChange();\n }\n }\n updateUiAfterMiniFilterChange() {\n if (!this.setFilterParams) {\n throw new Error(\"Set filter params have not been provided.\");\n }\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const { excelMode, readOnly } = this.setFilterParams || {};\n if (excelMode == null || !!readOnly) {\n this.checkAndRefreshVirtualList();\n } else if (this.valueModel.getMiniFilter() == null) {\n this.resetUiToActiveModel(this.getModel());\n } else {\n this.valueModel.selectAllMatchingMiniFilter(true);\n this.checkAndRefreshVirtualList();\n this.onUiChanged();\n }\n this.showOrHideResults();\n }\n showOrHideResults() {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n const hideResults = this.valueModel.getMiniFilter() != null && this.valueModel.getDisplayedValueCount() < 1;\n _59.setDisplayed(this.eNoMatches, hideResults);\n _59.setDisplayed(this.eSetFilterList, !hideResults);\n }\n resetMiniFilter() {\n var _a;\n this.eMiniFilter.setValue(null, true);\n (_a = this.valueModel) == null ? void 0 : _a.setMiniFilter(null);\n }\n resetUiToActiveModel(currentModel, afterUiUpdatedFunc) {\n this.setModelAndRefresh(currentModel == null ? null : currentModel.values).then(() => {\n this.onUiChanged(false, \"prevent\");\n afterUiUpdatedFunc == null ? void 0 : afterUiUpdatedFunc();\n });\n }\n handleCancelEnd(e) {\n this.setMiniFilter(null);\n super.handleCancelEnd(e);\n }\n onMiniFilterKeyDown(e) {\n const { excelMode, readOnly } = this.setFilterParams || {};\n if (e.key === KeyCode11.ENTER && !excelMode && !readOnly) {\n this.filterOnAllVisibleValues();\n }\n }\n filterOnAllVisibleValues(applyImmediately = true) {\n const { readOnly } = this.setFilterParams || {};\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (!!readOnly) {\n throw new Error(\"Unable to filter in readOnly mode.\");\n }\n this.valueModel.selectAllMatchingMiniFilter(true);\n this.checkAndRefreshVirtualList();\n this.onUiChanged(false, applyImmediately ? \"immediately\" : \"debounce\");\n this.showOrHideResults();\n }\n focusRowIfAlive(rowIndex) {\n if (rowIndex == null) {\n return;\n }\n window.setTimeout(() => {\n if (!this.virtualList) {\n throw new Error(\"Virtual list has not been created.\");\n }\n if (this.isAlive()) {\n this.virtualList.focusRow(rowIndex);\n }\n }, 0);\n }\n onSelectAll(isSelected) {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (!this.virtualList) {\n throw new Error(\"Virtual list has not been created.\");\n }\n if (isSelected) {\n this.valueModel.selectAllMatchingMiniFilter();\n } else {\n this.valueModel.deselectAllMatchingMiniFilter();\n }\n this.refreshAfterSelection();\n }\n onGroupItemSelected(item, isSelected) {\n const recursiveGroupSelection = (i) => {\n if (i.children) {\n i.children.forEach((childItem) => recursiveGroupSelection(childItem));\n } else {\n this.selectItem(i.key, isSelected);\n }\n };\n recursiveGroupSelection(item);\n this.refreshAfterSelection();\n }\n onItemSelected(key, isSelected) {\n if (!this.valueModel) {\n throw new Error(\"Value model has not been created.\");\n }\n if (!this.virtualList) {\n throw new Error(\"Virtual list has not been created.\");\n }\n this.selectItem(key, isSelected);\n this.refreshAfterSelection();\n }\n selectItem(key, isSelected) {\n if (isSelected) {\n this.valueModel.selectKey(key);\n } else {\n this.valueModel.deselectKey(key);\n }\n }\n onExpandAll(item, isExpanded) {\n const recursiveExpansion = (i) => {\n if (i.filterPasses && i.available && i.children) {\n i.children.forEach((childItem) => recursiveExpansion(childItem));\n i.expanded = isExpanded;\n }\n };\n recursiveExpansion(item);\n this.refreshAfterExpansion();\n }\n onExpandedChanged(item, isExpanded) {\n item.expanded = isExpanded;\n this.refreshAfterExpansion();\n }\n refreshAfterExpansion() {\n const focusedRow = this.virtualList.getLastFocusedRow();\n this.valueModel.updateDisplayedValues(\"expansion\");\n this.checkAndRefreshVirtualList();\n this.focusRowIfAlive(focusedRow);\n }\n refreshAfterSelection() {\n const focusedRow = this.virtualList.getLastFocusedRow();\n this.checkAndRefreshVirtualList();\n this.onUiChanged();\n this.focusRowIfAlive(focusedRow);\n }\n setMiniFilter(newMiniFilter) {\n this.eMiniFilter.setValue(newMiniFilter);\n this.onMiniFilterInput();\n }\n getMiniFilter() {\n return this.valueModel ? this.valueModel.getMiniFilter() : null;\n }\n checkAndRefreshVirtualList() {\n if (!this.virtualList) {\n throw new Error(\"Virtual list has not been created.\");\n }\n this.virtualList.refresh(!this.hardRefreshVirtualList);\n if (this.hardRefreshVirtualList) {\n this.hardRefreshVirtualList = false;\n }\n }\n getFilterKeys() {\n return this.valueModel ? this.valueModel.getKeys() : [];\n }\n getFilterValues() {\n return this.valueModel ? this.valueModel.getValues() : [];\n }\n getValues() {\n return this.getFilterKeys();\n }\n refreshVirtualList() {\n if (this.setFilterParams && this.setFilterParams.refreshValuesOnOpen) {\n this.refreshFilterValues();\n } else {\n this.checkAndRefreshVirtualList();\n }\n }\n translateForSetFilter(key) {\n const translate = this.localeService.getLocaleTextFunc();\n return translate(key, DEFAULT_LOCALE_TEXT[key]);\n }\n isSelectAllSelected() {\n if (!this.setFilterParams || !this.valueModel) {\n return false;\n }\n if (!this.setFilterParams.defaultToNothingSelected) {\n if (this.valueModel.hasSelections() && this.valueModel.isNothingVisibleSelected()) {\n return false;\n }\n if (this.valueModel.isEverythingVisibleSelected()) {\n return true;\n }\n } else {\n if (this.valueModel.hasSelections() && this.valueModel.isEverythingVisibleSelected()) {\n return true;\n }\n if (this.valueModel.isNothingVisibleSelected()) {\n return false;\n }\n }\n return void 0;\n }\n areAllChildrenSelected(item) {\n const recursiveChildSelectionCheck = (i) => {\n if (i.children) {\n let someTrue = false;\n let someFalse = false;\n const mixed = i.children.some((child) => {\n if (!child.filterPasses || !child.available) {\n return false;\n }\n const childSelected = recursiveChildSelectionCheck(child);\n if (childSelected === void 0) {\n return true;\n }\n if (childSelected) {\n someTrue = true;\n } else {\n someFalse = true;\n }\n return someTrue && someFalse;\n });\n return mixed ? void 0 : someTrue;\n } else {\n return this.valueModel.isKeySelected(i.key);\n }\n };\n if (!this.setFilterParams.defaultToNothingSelected) {\n return recursiveChildSelectionCheck(item);\n } else {\n return this.valueModel.hasSelections() && recursiveChildSelectionCheck(item);\n }\n }\n destroy() {\n if (this.virtualList != null) {\n this.virtualList.destroy();\n this.virtualList = null;\n }\n super.destroy();\n }\n caseFormat(valueToFormat) {\n if (valueToFormat == null || typeof valueToFormat !== \"string\") {\n return valueToFormat;\n }\n return this.caseSensitive ? valueToFormat : valueToFormat.toUpperCase();\n }\n resetExpansion() {\n var _a, _b;\n if (!((_a = this.setFilterParams) == null ? void 0 : _a.treeList)) {\n return;\n }\n const selectAllItem = (_b = this.valueModel) == null ? void 0 : _b.getSelectAllItem();\n if (this.isSetFilterModelTreeItem(selectAllItem)) {\n const recursiveCollapse = (i) => {\n if (i.children) {\n i.children.forEach((childItem) => recursiveCollapse(childItem));\n i.expanded = false;\n }\n };\n recursiveCollapse(selectAllItem);\n this.valueModel.updateDisplayedValues(\"expansion\");\n }\n }\n getModelAsString(model) {\n return this.filterModelFormatter.getModelAsString(model, this);\n }\n getPositionableElement() {\n return this.eSetFilterList;\n }\n};\n__decorateClass15([\n RefSelector27(\"eMiniFilter\")\n], SetFilter.prototype, \"eMiniFilter\", 2);\n__decorateClass15([\n RefSelector27(\"eFilterLoading\")\n], SetFilter.prototype, \"eFilterLoading\", 2);\n__decorateClass15([\n RefSelector27(\"eSetFilterList\")\n], SetFilter.prototype, \"eSetFilterList\", 2);\n__decorateClass15([\n RefSelector27(\"eFilterNoMatches\")\n], SetFilter.prototype, \"eNoMatches\", 2);\n__decorateClass15([\n Autowired217(\"columnModel\")\n], SetFilter.prototype, \"columnModel\", 2);\n__decorateClass15([\n Autowired217(\"valueService\")\n], SetFilter.prototype, \"valueService\", 2);\nvar ModelWrapper = class {\n constructor(model) {\n this.model = model;\n }\n getRowCount() {\n return this.model.getDisplayedValueCount();\n }\n getRow(index) {\n return this.model.getDisplayedItem(index);\n }\n areRowsEqual(oldRow, newRow) {\n return oldRow === newRow;\n }\n};\nvar ModelWrapperWithSelectAll = class {\n constructor(model, isSelectAllSelected) {\n this.model = model;\n this.isSelectAllSelected = isSelectAllSelected;\n }\n getRowCount() {\n const showAddCurrentSelectionToFilter = this.model.showAddCurrentSelectionToFilter();\n const outboundItems = showAddCurrentSelectionToFilter ? 2 : 1;\n return this.model.getDisplayedValueCount() + outboundItems;\n }\n getRow(index) {\n if (index === 0) {\n return this.model.getSelectAllItem();\n }\n const showAddCurrentSelectionToFilter = this.model.showAddCurrentSelectionToFilter();\n const outboundItems = showAddCurrentSelectionToFilter ? 2 : 1;\n if (index === 1 && showAddCurrentSelectionToFilter) {\n return this.model.getAddSelectionToFilterItem();\n }\n return this.model.getDisplayedItem(index - outboundItems);\n }\n areRowsEqual(oldRow, newRow) {\n return oldRow === newRow;\n }\n};\nvar TreeModelWrapper = class {\n constructor(model) {\n this.model = model;\n }\n getRowCount() {\n return this.model.getRowCount();\n }\n getRow(index) {\n return this.model.getRow(index);\n }\n areRowsEqual(oldRow, newRow) {\n if (oldRow == null && newRow == null) {\n return true;\n }\n return oldRow != null && newRow != null && oldRow.treeKey === newRow.treeKey && oldRow.depth === newRow.depth;\n }\n};\nvar SetFloatingFilterComp = class extends Component214 {\n constructor() {\n super(\n /* html */\n `\n
\n \n
`\n );\n this.availableValuesListenerAdded = false;\n this.filterModelFormatter = new SetFilterModelFormatter();\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n init(params) {\n this.params = params;\n this.eFloatingFilterText.setDisabled(true).addGuiEventListener(\"click\", () => this.params.showParentFilter());\n this.setParams(params);\n }\n setParams(params) {\n const displayName = this.columnModel.getDisplayNameForColumn(params.column, \"header\", true);\n const translate = this.localeService.getLocaleTextFunc();\n this.eFloatingFilterText.setInputAriaLabel(`${displayName} ${translate(\"ariaFilterInput\", \"Filter Input\")}`);\n }\n onParamsUpdated(params) {\n this.refresh(params);\n }\n refresh(params) {\n this.params = params;\n this.setParams(params);\n }\n onParentModelChanged(parentModel) {\n this.updateFloatingFilterText(parentModel);\n }\n parentSetFilterInstance(cb) {\n this.params.parentFilterInstance((filter) => {\n if (!(filter instanceof SetFilter)) {\n throw new Error(\"AG Grid - SetFloatingFilter expects SetFilter as its parent\");\n }\n cb(filter);\n });\n }\n addAvailableValuesListener() {\n this.parentSetFilterInstance((setFilter) => {\n const setValueModel = setFilter.getValueModel();\n if (!setValueModel) {\n return;\n }\n this.addManagedListener(\n setValueModel,\n SetValueModel.EVENT_AVAILABLE_VALUES_CHANGED,\n () => this.updateFloatingFilterText()\n );\n });\n this.availableValuesListenerAdded = true;\n }\n updateFloatingFilterText(parentModel) {\n if (!this.availableValuesListenerAdded) {\n this.addAvailableValuesListener();\n }\n this.parentSetFilterInstance((setFilter) => {\n this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(parentModel, setFilter));\n });\n }\n};\n__decorateClass15([\n RefSelector37(\"eFloatingFilterText\")\n], SetFloatingFilterComp.prototype, \"eFloatingFilterText\", 2);\n__decorateClass15([\n Autowired316(\"columnModel\")\n], SetFloatingFilterComp.prototype, \"columnModel\", 2);\nvar VERSION16 = \"31.3.2\";\nvar SetFilterModule = {\n version: VERSION16,\n moduleName: ModuleNames16.SetFilterModule,\n beans: [],\n userComponents: [\n { componentName: \"agSetColumnFilter\", componentClass: SetFilter },\n { componentName: \"agSetColumnFloatingFilter\", componentClass: SetFloatingFilterComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/sparklines/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames17 } from \"ag-grid-community\";\nimport {\n Autowired as Autowired69,\n Component as Component58,\n RefSelector as RefSelector28\n} from \"ag-grid-community\";\nimport { _Scale as _Scale2, _Scene as _Scene32, _Util as _Util2 } from \"ag-charts-community\";\nimport { _Scale, _Scene as _Scene25, _Util as _Util4 } from \"ag-charts-community\";\nimport { _Scene as _Scene26 } from \"ag-charts-community\";\nimport { _Scale as _Scale3, _Scene as _Scene42, _Util as _Util32 } from \"ag-charts-community\";\nimport { _Scale as _Scale4, _Scene as _Scene62, _Util as _Util52 } from \"ag-charts-community\";\nimport { _Scene as _Scene52, _Util as _Util42 } from \"ag-charts-community\";\nimport { _Scale as _Scale5, _Scene as _Scene72, _Util as _Util62 } from \"ag-charts-community\";\nimport { _Util as _Util7 } from \"ag-charts-community\";\nimport { Bean as Bean15, BeanStub as BeanStub29, PostConstruct as PostConstruct66, PreDestroy as PreDestroy6 } from \"ag-grid-community\";\nvar __defProp16 = Object.defineProperty;\nvar __getOwnPropDesc16 = Object.getOwnPropertyDescriptor;\nvar __getOwnPropSymbols13 = Object.getOwnPropertySymbols;\nvar __hasOwnProp14 = Object.prototype.hasOwnProperty;\nvar __propIsEnum13 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp13 = (obj, key, value) => key in obj ? __defProp16(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues13 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp14.call(b, prop))\n __defNormalProp13(a, prop, b[prop]);\n if (__getOwnPropSymbols13)\n for (var prop of __getOwnPropSymbols13(b)) {\n if (__propIsEnum13.call(b, prop))\n __defNormalProp13(a, prop, b[prop]);\n }\n return a;\n};\nvar __decorateClass16 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc16(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp16(target, key, result);\n return result;\n};\nvar defaultTooltipCss = `\n.ag-sparkline-tooltip-wrapper {\n position: absolute;\n user-select: none;\n pointer-events: none;\n}\n\n.ag-sparkline-tooltip {\n position: relative;\n font: 12px arial,sans-serif;\n border-radius: 2px;\n box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\n line-height: 1.7em;\n overflow: hidden;\n white-space: nowrap;\n z-index: 99999;\n background-color: rgb(255, 255, 255);\n color: rgba(0,0,0, 0.67);\n}\n\n.ag-sparkline-tooltip-content {\n padding: 0 7px;\n opacity: 1;\n}\n\n.ag-sparkline-tooltip-title {\n padding-left: 7px;\n opacity: 1;\n}\n\n.ag-sparkline-tooltip-wrapper-hidden {\n top: -10000px !important;\n}\n\n.ag-sparkline-wrapper {\n box-sizing: border-box;\n overflow: hidden;\n}\n`;\nvar { extent, isNumber, isString: isString2, isStringObject, isDate, createId, Padding } = _Util4;\nvar { LinearScale, BandScale, TimeScale } = _Scale;\nvar SparklineAxis = class {\n constructor() {\n this.type = \"category\";\n this.stroke = \"rgb(204, 214, 235)\";\n this.strokeWidth = 1;\n }\n};\nvar _Sparkline = class _Sparkline2 {\n constructor() {\n this.id = createId(this);\n this.seriesRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n this._context = void 0;\n this._container = void 0;\n this._data = void 0;\n this.padding = new Padding(3);\n this.xKey = \"x\";\n this.yKey = \"y\";\n this.dataType = void 0;\n this.xData = [];\n this.yData = [];\n this.min = void 0;\n this.max = void 0;\n this.yScale = new LinearScale();\n this.axis = new SparklineAxis();\n this.highlightStyle = {\n size: 6,\n fill: \"yellow\",\n stroke: \"silver\",\n strokeWidth: 1\n };\n this._width = 100;\n this._height = 100;\n this.smallestInterval = void 0;\n this.layoutId = 0;\n this.defaultDateFormatter = new Intl.DateTimeFormat(\"en-US\", {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hour12: false\n });\n this._onMouseMove = this.onMouseMove.bind(this);\n this._onMouseOut = this.onMouseOut.bind(this);\n const root = new _Scene25.Group();\n this.rootGroup = root;\n const element = document.createElement(\"div\");\n element.setAttribute(\"class\", \"ag-sparkline-wrapper\");\n const scene = new _Scene25.Scene({});\n this.scene = scene;\n this.canvasElement = scene.canvas.element;\n scene.setRoot(root);\n scene.setContainer(element);\n this.resizeAndSetDimensions(this.width, this.height);\n if (!_Sparkline2.tooltipDocuments.includes(document)) {\n this.initialiseTooltipStyles();\n }\n this.setupDomEventListeners(this.canvasElement);\n }\n set context(value) {\n if (this._context !== value) {\n this._context = value;\n }\n }\n get context() {\n return this._context;\n }\n set container(value) {\n if (this._container !== value) {\n const { parentNode } = this.canvasElement;\n if (parentNode != null) {\n parentNode.removeChild(this.canvasElement);\n }\n if (value) {\n value.appendChild(this.canvasElement);\n }\n this._container = value;\n }\n }\n get container() {\n return this._container;\n }\n set data(value) {\n if (this._data !== value) {\n this._data = value;\n this.processData();\n if (this.mouseMoveEvent && this.highlightedDatum) {\n this.updateHitPoint(this.mouseMoveEvent);\n }\n }\n }\n get data() {\n return this._data;\n }\n resizeAndSetDimensions(width, height) {\n this.scene.resize(width, height);\n this.seriesRect.width = width;\n this.seriesRect.height = height;\n }\n initialiseTooltipStyles() {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = defaultTooltipCss;\n document.head.insertBefore(styleElement, document.head.querySelector(\"style\"));\n _Sparkline2.tooltipDocuments.push(document);\n }\n set width(value) {\n if (this._width !== value) {\n this._width = value;\n this.scene.resize(value, this.height);\n this.scheduleLayout();\n }\n }\n get width() {\n return this._width;\n }\n set height(value) {\n if (this._height !== value) {\n this._height = value;\n this.scene.resize(this.width, value);\n this.scheduleLayout();\n }\n }\n get height() {\n return this._height;\n }\n /**\n * Generate node data from processed data.\n * Produce data joins.\n * Update selection's nodes using node data.\n */\n update() {\n }\n // Update y scale based on processed data.\n updateYScale() {\n this.updateYScaleRange();\n this.updateYScaleDomain();\n }\n // Update y scale domain based on processed data.\n updateYScaleDomain() {\n }\n // Update y scale range based on height and padding (seriesRect).\n updateYScaleRange() {\n const { yScale, seriesRect } = this;\n yScale.range = [seriesRect.height, 0];\n }\n // Update x scale based on processed data.\n updateXScale() {\n const { type } = this.axis;\n this.xScale = this.getXScale(type);\n this.updateXScaleRange();\n this.updateXScaleDomain();\n }\n // Update x scale range based on width and padding (seriesRect).\n updateXScaleRange() {\n this.xScale.range = [0, this.seriesRect.width];\n }\n // Update x scale domain based on processed data and type of scale.\n updateXScaleDomain() {\n const { xData, xScale } = this;\n let xMinMax;\n if (xScale instanceof LinearScale || xScale instanceof TimeScale) {\n xMinMax = extent(xData);\n }\n this.xScale.domain = xMinMax ? xMinMax.slice() : xData;\n }\n /**\n * Return xScale instance based on the provided type or return a `BandScale` by default.\n * The default type is `category`.\n * @param type\n */\n getXScale(type = \"category\") {\n switch (type) {\n case \"number\":\n return new LinearScale();\n case \"time\":\n return new TimeScale();\n case \"category\":\n default:\n return new BandScale();\n }\n }\n // Update axis line.\n updateAxisLine() {\n }\n // Update X and Y scales and the axis line.\n updateAxes() {\n this.updateYScale();\n this.updateXScale();\n this.updateAxisLine();\n }\n // Update horizontal and vertical crosshair lines.\n updateCrosshairs() {\n this.updateXCrosshairLine();\n this.updateYCrosshairLine();\n }\n // Using processed data, generate data that backs visible nodes.\n generateNodeData() {\n return [];\n }\n // Returns persisted node data associated with the sparkline's data.\n getNodeData() {\n return [];\n }\n // Update the selection's nodes.\n updateNodes() {\n }\n // Update the vertical crosshair line.\n updateXCrosshairLine() {\n }\n // Update the horizontal crosshair line.\n updateYCrosshairLine() {\n }\n highlightDatum(closestDatum) {\n this.updateNodes();\n }\n dehighlightDatum() {\n this.highlightedDatum = void 0;\n this.updateNodes();\n this.updateCrosshairs();\n }\n /**\n * Highlight closest datum and display tooltip if enabled.\n * Only update if necessary, i.e. only update if the highlighted datum is different from previously highlighted datum,\n * or if there is no previously highlighted datum.\n * @param event\n */\n onMouseMove(event) {\n this.mouseMoveEvent = event;\n this.updateHitPoint(event);\n }\n updateHitPoint(event) {\n var _a, _b, _c;\n const closestDatum = this.pickClosestSeriesNodeDatum(event.offsetX, event.offsetY);\n if (!closestDatum) {\n return;\n }\n const oldHighlightedDatum = this.highlightedDatum;\n this.highlightedDatum = closestDatum;\n if (this.highlightedDatum && !oldHighlightedDatum || this.highlightedDatum && oldHighlightedDatum && this.highlightedDatum !== oldHighlightedDatum) {\n this.highlightDatum(closestDatum);\n this.updateCrosshairs();\n this.scene.render().catch((e) => console.error(`AG Grid - chart rendering failed`, e));\n }\n const tooltipEnabled = (_c = (_b = (_a = this.processedOptions) == null ? void 0 : _a.tooltip) == null ? void 0 : _b.enabled) != null ? _c : true;\n if (tooltipEnabled) {\n this.handleTooltip(event, closestDatum);\n }\n }\n /**\n * Dehighlight all nodes and remove tooltip.\n * @param event\n */\n onMouseOut(event) {\n this.dehighlightDatum();\n this.tooltip.toggle(false);\n this.scene.render().catch((e) => console.error(`AG Grid - chart rendering failed`, e));\n }\n // Fetch required values from the data object and process them.\n processData() {\n const { data, yData, xData } = this;\n if (!data || this.invalidData(this.data)) {\n return;\n }\n yData.length = 0;\n xData.length = 0;\n const n = data.length;\n const dataType = this.getDataType(data);\n this.dataType = dataType;\n const { type: xValueType } = this.axis;\n const xType = xValueType !== \"number\" && xValueType !== \"time\" ? \"category\" : xValueType;\n const isContinuousX = xType === \"number\" || xType === \"time\";\n const setSmallestXInterval = (curr, prev) => {\n if (this.smallestInterval == void 0) {\n this.smallestInterval = { x: Infinity, y: Infinity };\n }\n const { x } = this.smallestInterval;\n const interval = Math.abs(curr - prev);\n if (interval > 0 && interval < x) {\n this.smallestInterval.x = interval;\n }\n };\n let prevX;\n if (dataType === \"number\") {\n for (let i = 0; i < n; i++) {\n const xDatum = i;\n const yDatum = data[i];\n const x = this.getDatum(xDatum, xType);\n const y = this.getDatum(yDatum, \"number\");\n if (isContinuousX) {\n setSmallestXInterval(x, prevX);\n }\n xData.push(x);\n yData.push(y);\n prevX = x;\n }\n } else if (dataType === \"array\") {\n for (let i = 0; i < n; i++) {\n const datum = data[i];\n if (Array.isArray(datum)) {\n const xDatum = datum[0];\n const yDatum = datum[1];\n const x = this.getDatum(xDatum, xType);\n const y = this.getDatum(yDatum, \"number\");\n if (x == void 0) {\n continue;\n }\n if (isContinuousX) {\n setSmallestXInterval(x, prevX);\n }\n xData.push(x);\n yData.push(y);\n prevX = x;\n }\n }\n } else if (dataType === \"object\") {\n const { yKey, xKey } = this;\n for (let i = 0; i < n; i++) {\n const datum = data[i];\n if (typeof datum === \"object\" && !Array.isArray(datum)) {\n const xDatum = datum[xKey];\n const yDatum = datum[yKey];\n const x = this.getDatum(xDatum, xType);\n const y = this.getDatum(yDatum, \"number\");\n if (x == void 0) {\n continue;\n }\n if (isContinuousX) {\n setSmallestXInterval(x, prevX);\n }\n xData.push(x);\n yData.push(y);\n prevX = x;\n }\n }\n }\n this.updateAxes();\n this.immediateLayout();\n }\n /**\n * Return the type of data provided to the sparkline based on the first truthy value in the data array.\n * If the value is not a number, array or object, return `undefined`.\n * @param data\n */\n getDataType(data) {\n for (const datum of data) {\n if (datum != void 0) {\n if (isNumber(datum)) {\n return \"number\";\n } else if (Array.isArray(datum)) {\n return \"array\";\n } else if (typeof datum === \"object\") {\n return \"object\";\n }\n }\n }\n }\n /**\n * Return the given value depending on the type of axis.\n * Return `undefined` if the value is invalid for the given axis type.\n * @param value\n */\n getDatum(value, type) {\n if (type === \"number\" && isNumber(value) || type === \"time\" && (isNumber(value) || isDate(value))) {\n return value;\n } else if (type === \"category\") {\n if (isString2(value) || isDate(value) || isNumber(value)) {\n return { toString: () => String(value) };\n } else if (isStringObject(value)) {\n return value;\n }\n }\n }\n /**\n * Only `true` while we are waiting for the layout to start.\n * This will be `false` if the layout has already started and is ongoing.\n */\n get layoutScheduled() {\n return !!this.layoutId;\n }\n /**\n * Execute update method on the next available screen repaint to make changes to the canvas.\n * If we are waiting for a layout to start and a new layout is requested,\n * cancel the previous layout using the non 0 integer (this.layoutId) returned from requestAnimationFrame.\n */\n scheduleLayout() {\n if (this.layoutId) {\n cancelAnimationFrame(this.layoutId);\n }\n this.layoutId = requestAnimationFrame(() => {\n this.immediateLayout();\n this.layoutId = 0;\n });\n }\n immediateLayout() {\n this.setSparklineDimensions();\n if (this.invalidData(this.data)) {\n return;\n }\n this.updateXScaleRange();\n this.updateYScaleRange();\n this.updateAxisLine();\n this.update();\n this.scene.render().catch((e) => console.error(`AG Grid - chart rendering failed`, e));\n }\n setSparklineDimensions() {\n const { width, height, padding, seriesRect, rootGroup } = this;\n const shrunkWidth = width - padding.left - padding.right;\n const shrunkHeight = height - padding.top - padding.bottom;\n seriesRect.width = shrunkWidth;\n seriesRect.height = shrunkHeight;\n seriesRect.x = padding.left;\n seriesRect.y = padding.top;\n rootGroup.translationX = seriesRect.x;\n rootGroup.translationY = seriesRect.y;\n }\n /**\n * Return the closest data point to x/y canvas coordinates.\n * @param x\n * @param y\n */\n pickClosestSeriesNodeDatum(x, y) {\n let minDistance = Infinity;\n let closestDatum;\n const hitPoint = this.rootGroup.transformPoint(x, y);\n const nodeData = this.getNodeData();\n for (let i = 0; i < nodeData.length; i++) {\n const datum = nodeData[i];\n if (!datum.point) {\n return;\n }\n const distance = this.getDistance(hitPoint, datum.point);\n if (distance <= minDistance) {\n minDistance = distance;\n closestDatum = datum;\n }\n }\n return closestDatum;\n }\n /**\n * Return the relevant distance between two points.\n * The distance will be calculated based on the x value of the points for all sparklines except bar sparkline, where the distance is based on the y values.\n * @param x\n * @param y\n */\n getDistance(p1, p2) {\n return Math.abs(p1.x - p2.x);\n }\n /**\n * calculate x/y coordinates for tooltip based on coordinates of highlighted datum, position of canvas and page offset.\n * @param datum\n */\n handleTooltip(event, datum) {\n var _a, _b;\n const { seriesDatum } = datum;\n const { canvasElement } = this;\n const { clientX, clientY } = event;\n const tooltipOptions = (_a = this.processedOptions) == null ? void 0 : _a.tooltip;\n const meta = {\n pageX: clientX,\n pageY: clientY,\n position: {\n xOffset: tooltipOptions == null ? void 0 : tooltipOptions.xOffset,\n yOffset: tooltipOptions == null ? void 0 : tooltipOptions.yOffset\n },\n container: tooltipOptions == null ? void 0 : tooltipOptions.container\n };\n if (meta.container == void 0) {\n meta.container = canvasElement;\n }\n const yValue = seriesDatum.y;\n const xValue = seriesDatum.x;\n let enabled = (_b = tooltipOptions == null ? void 0 : tooltipOptions.enabled) != null ? _b : true;\n const tooltipRenderer = tooltipOptions == null ? void 0 : tooltipOptions.renderer;\n if (tooltipRenderer) {\n const tooltipRendererResult = tooltipRenderer({\n context: this.context,\n datum: seriesDatum,\n yValue,\n xValue\n });\n enabled = typeof tooltipRendererResult !== \"string\" && tooltipRendererResult.enabled !== void 0 ? tooltipRendererResult.enabled : enabled;\n }\n const html = enabled && seriesDatum.y !== void 0 && this.getTooltipHtml(datum);\n if (html) {\n this.tooltip.show(meta, html);\n }\n }\n formatNumericDatum(datum) {\n return String(Math.round(datum * 10) / 10);\n }\n // locale.format('%m/%d/%y, %H:%M:%S');\n formatDatum(datum) {\n const type = this.axis.type || \"category\";\n if (type === \"number\" && typeof datum === \"number\") {\n return this.formatNumericDatum(datum);\n } else if (type === \"time\" && (datum instanceof Date || isNumber(datum))) {\n return this.defaultDateFormatter.format(datum);\n } else {\n return String(datum);\n }\n }\n setupDomEventListeners(chartElement) {\n chartElement.addEventListener(\"mousemove\", this._onMouseMove);\n chartElement.addEventListener(\"mouseout\", this._onMouseOut);\n }\n cleanupDomEventListeners(chartElement) {\n chartElement.removeEventListener(\"mousemove\", this._onMouseMove);\n chartElement.removeEventListener(\"mouseout\", this._onMouseOut);\n }\n invalidData(data) {\n return !data || !Array.isArray(data);\n }\n /**\n * Cleanup and remove canvas element from the DOM.\n */\n destroy() {\n this.cleanupDomEventListeners(this.canvasElement);\n this.scene.destroy();\n this.container = void 0;\n }\n};\n_Sparkline.tooltipDocuments = [];\nvar Sparkline = _Sparkline;\nfunction toTooltipHtml(input, defaults) {\n var _a, _b, _c;\n if (typeof input === \"string\") {\n return input;\n }\n defaults = defaults != null ? defaults : {};\n const {\n content = (_a = defaults.content) != null ? _a : \"\",\n title = (_b = defaults.title) != null ? _b : void 0,\n color = defaults.color,\n backgroundColor = defaults.backgroundColor,\n opacity = (_c = defaults.opacity) != null ? _c : 1\n } = input;\n let titleHtml;\n let contentHtml;\n if (color) {\n titleHtml = title ? `${title}` : \"\";\n contentHtml = `${content}`;\n } else {\n titleHtml = title ? `${title}` : \"\";\n contentHtml = `${content}`;\n }\n let style = `opacity: ${opacity}`;\n if (backgroundColor) {\n style += `; background-color: ${backgroundColor.toLowerCase()}`;\n }\n return `
\n ${titleHtml}\n ${contentHtml}\n
`;\n}\nvar _SparklineTooltip = class _SparklineTooltip2 {\n constructor() {\n this.element = document.createElement(\"div\");\n const tooltipRoot = document.body;\n tooltipRoot.appendChild(this.element);\n }\n isVisible() {\n const { element } = this;\n if (element.classList) {\n return !element.classList.contains(`${_SparklineTooltip2.class}-wrapper-hidden`);\n }\n const classes = element.getAttribute(\"class\");\n if (classes) {\n return classes.split(\" \").indexOf(`${_SparklineTooltip2.class}-wrapper-hidden`) < 0;\n }\n return false;\n }\n updateClass(visible) {\n const classList = [`${_SparklineTooltip2.class}-wrapper`];\n if (visible !== true) {\n classList.push(`${_SparklineTooltip2.class}-wrapper-hidden`);\n }\n this.element.setAttribute(\"class\", classList.join(\" \"));\n }\n show(meta, html) {\n var _a, _b, _c, _d;\n this.toggle(false);\n const { element } = this;\n if (html !== void 0) {\n element.innerHTML = html;\n } else if (!element.innerHTML) {\n return;\n }\n const xOffset = (_b = (_a = meta.position) == null ? void 0 : _a.xOffset) != null ? _b : 10;\n const yOffset = (_d = (_c = meta.position) == null ? void 0 : _c.yOffset) != null ? _d : 0;\n let left = meta.pageX + xOffset;\n let top = meta.pageY + yOffset;\n const tooltipRect = element.getBoundingClientRect();\n let maxLeft = window.innerWidth - tooltipRect.width;\n if (meta.container) {\n const containerRect = meta.container.getBoundingClientRect();\n maxLeft = containerRect.left + (containerRect.width - tooltipRect.width);\n }\n if (left > maxLeft) {\n left = meta.pageX - element.clientWidth - xOffset;\n }\n if (typeof scrollX !== \"undefined\") {\n left += scrollX;\n }\n if (typeof scrollY !== \"undefined\") {\n top += scrollY;\n }\n element.style.left = `${Math.round(left)}px`;\n element.style.top = `${Math.round(top)}px`;\n this.toggle(true);\n }\n toggle(visible) {\n this.updateClass(visible);\n }\n destroy() {\n const { parentNode } = this.element;\n if (parentNode) {\n parentNode.removeChild(this.element);\n }\n }\n};\n_SparklineTooltip.class = \"ag-sparkline-tooltip\";\nvar SparklineTooltip = _SparklineTooltip;\nfunction getMarker(shape) {\n switch (shape) {\n case \"circle\":\n return _Scene26.Circle;\n case \"square\":\n return _Scene26.Square;\n case \"diamond\":\n return _Scene26.Diamond;\n default:\n return _Scene26.Circle;\n }\n}\nfunction getLineDash(lineCap, lineDash = \"solid\") {\n const buttOrNull = {\n solid: [],\n dash: [4, 3],\n dot: [1, 3],\n dashDot: [4, 3, 1, 3],\n dashDotDot: [4, 3, 1, 3, 1, 3],\n shortDot: [1, 1],\n shortDash: [3, 1],\n shortDashDot: [3, 1, 1, 1],\n shortDashDotDot: [3, 1, 1, 1, 1, 1],\n longDash: [8, 3],\n longDashDot: [8, 3, 1, 3],\n longDashDotDot: [8, 3, 1, 3, 1, 3]\n };\n const roundOrSquare = {\n solid: [],\n dash: [3, 3],\n dot: [0, 3],\n dashDot: [3, 3, 0, 3],\n dashDotDot: [3, 3, 0, 3, 0, 3],\n shortDot: [0, 2],\n shortDash: [2, 2],\n shortDashDot: [2, 2, 0, 2],\n shortDashDotDot: [2, 2, 0, 2, 0, 2],\n longDash: [7, 3],\n longDashDot: [7, 3, 0, 3],\n longDashDotDot: [7, 3, 0, 3, 0, 3]\n };\n if (lineCap === \"round\" || lineCap === \"square\") {\n if (roundOrSquare[lineDash] == void 0) {\n console.warn(`'${lineDash}' is not a valid 'lineDash' option.`);\n return roundOrSquare.solid;\n }\n return roundOrSquare[lineDash];\n }\n if (buttOrNull[lineDash] == void 0) {\n console.warn(`'${lineDash}' is not a valid 'lineDash' option.`);\n return buttOrNull.solid;\n }\n return buttOrNull[lineDash];\n}\nvar { extent: extent2 } = _Util2;\nvar { BandScale: BandScale2 } = _Scale2;\nvar SparklineMarker = class {\n constructor() {\n this.enabled = true;\n this.shape = \"circle\";\n this.size = 0;\n this.fill = \"rgb(124, 181, 236)\";\n this.stroke = \"rgb(124, 181, 236)\";\n this.strokeWidth = 1;\n this.formatter = void 0;\n }\n};\nvar SparklineLine = class {\n constructor() {\n this.stroke = \"rgb(124, 181, 236)\";\n this.strokeWidth = 1;\n }\n};\nvar SparklineCrosshairs = class {\n constructor() {\n this.xLine = {\n enabled: true,\n stroke: \"rgba(0,0,0, 0.54)\",\n strokeWidth: 1,\n lineDash: \"solid\",\n lineCap: void 0\n };\n this.yLine = {\n enabled: false,\n stroke: \"rgba(0,0,0, 0.54)\",\n strokeWidth: 1,\n lineDash: \"solid\",\n lineCap: void 0\n };\n }\n};\nvar AreaSparkline = class extends Sparkline {\n constructor() {\n super();\n this.fill = \"rgba(124, 181, 236, 0.25)\";\n this.strokePath = new _Scene32.Path();\n this.fillPath = new _Scene32.Path();\n this.xCrosshairLine = new _Scene32.Line();\n this.yCrosshairLine = new _Scene32.Line();\n this.areaSparklineGroup = new _Scene32.Group();\n this.xAxisLine = new _Scene32.Line();\n this.markers = new _Scene32.Group();\n this.markerSelection = _Scene32.Selection.select(\n this.markers,\n () => this.markerFactory()\n );\n this.markerSelectionData = [];\n this.marker = new SparklineMarker();\n this.line = new SparklineLine();\n this.crosshairs = new SparklineCrosshairs();\n this.rootGroup.append(this.areaSparklineGroup);\n this.xAxisLine.zIndex = 500;\n this.fillPath.zIndex = 50;\n this.strokePath.zIndex = 1e3;\n this.xCrosshairLine.zIndex = 2e3;\n this.yCrosshairLine.zIndex = 2e3;\n this.markers.zIndex = 2500;\n this.areaSparklineGroup.append([\n this.fillPath,\n this.xAxisLine,\n this.strokePath,\n this.xCrosshairLine,\n this.yCrosshairLine,\n this.markers\n ]);\n }\n markerFactory() {\n const { shape } = this.marker;\n const MarkerShape = getMarker(shape);\n return new MarkerShape();\n }\n getNodeData() {\n return this.markerSelectionData;\n }\n update() {\n const data = this.generateNodeData();\n if (!data) {\n return;\n }\n const { nodeData, fillData, strokeData } = data;\n this.markerSelectionData = nodeData;\n this.updateSelection(nodeData);\n this.updateNodes();\n this.updateStroke(strokeData);\n this.updateFill(fillData);\n }\n updateYScaleDomain() {\n const { yData, yScale } = this;\n const yMinMax = extent2(yData);\n let yMin = 0;\n let yMax = 1;\n if (yMinMax !== void 0) {\n yMin = this.min = yMinMax[0];\n yMax = this.max = yMinMax[1];\n }\n yMin = yMin < 0 ? yMin : 0;\n yMax = yMax < 0 ? 0 : yMax;\n yScale.domain = [yMin, yMax];\n }\n generateNodeData() {\n const { data, yData, xData, xScale, yScale } = this;\n if (!data) {\n return;\n }\n const continuous = !(xScale instanceof BandScale2);\n const offsetX = !continuous ? xScale.bandwidth / 2 : 0;\n const n = yData.length;\n const nodeData = [];\n const fillData = [];\n const strokeData = [];\n let firstValidX;\n let lastValidX;\n let previousX;\n let nextX;\n const yZero = yScale.convert(0);\n for (let i = 0; i < n; i++) {\n const yDatum = yData[i];\n const xDatum = xData[i];\n const x = xScale.convert(continuous ? xScale.toDomain(xDatum) : xDatum) + offsetX;\n const y = yDatum === void 0 ? NaN : yScale.convert(yDatum);\n if (i + 1 < n) {\n nextX = xScale.convert(continuous ? xScale.toDomain(xData[i + 1]) : xData[i + 1]) + offsetX;\n }\n strokeData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x, y }\n });\n if (yDatum === void 0 && previousX !== void 0) {\n fillData.push({ seriesDatum: void 0, point: { x: previousX, y: yZero } });\n if (nextX !== void 0) {\n fillData.push({ seriesDatum: void 0, point: { x: nextX, y: yZero } });\n }\n } else if (yDatum !== void 0) {\n fillData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x, y }\n });\n nodeData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x, y }\n });\n firstValidX = firstValidX !== void 0 ? firstValidX : x;\n lastValidX = x;\n }\n previousX = x;\n }\n fillData.push(\n { seriesDatum: void 0, point: { x: lastValidX, y: yZero } },\n { seriesDatum: void 0, point: { x: firstValidX, y: yZero } }\n );\n return { nodeData, fillData, strokeData };\n }\n updateAxisLine() {\n const { xScale, yScale, axis, xAxisLine } = this;\n xAxisLine.x1 = xScale.range[0];\n xAxisLine.x2 = xScale.range[1];\n xAxisLine.y1 = xAxisLine.y2 = 0;\n xAxisLine.stroke = axis.stroke;\n xAxisLine.strokeWidth = axis.strokeWidth;\n const yZero = yScale.convert(0);\n xAxisLine.translationY = yZero;\n }\n updateSelection(selectionData) {\n this.markerSelection.update(selectionData);\n }\n updateNodes() {\n const { highlightedDatum, highlightStyle, marker } = this;\n const {\n size: highlightSize,\n fill: highlightFill,\n stroke: highlightStroke,\n strokeWidth: highlightStrokeWidth\n } = highlightStyle;\n const markerFormatter = marker.formatter;\n this.markerSelection.each((node, datum, index) => {\n const { point, seriesDatum } = datum;\n if (!point) {\n return;\n }\n const highlighted = datum === highlightedDatum;\n const markerFill = highlighted && highlightFill !== void 0 ? highlightFill : marker.fill;\n const markerStroke = highlighted && highlightStroke !== void 0 ? highlightStroke : marker.stroke;\n const markerStrokeWidth = highlighted && highlightStrokeWidth !== void 0 ? highlightStrokeWidth : marker.strokeWidth;\n const markerSize = highlighted && highlightSize !== void 0 ? highlightSize : marker.size;\n let markerFormat;\n if (markerFormatter) {\n const first = index === 0;\n const last = index === this.markerSelectionData.length - 1;\n const min = seriesDatum.y === this.min;\n const max = seriesDatum.y === this.max;\n markerFormat = markerFormatter({\n datum,\n xValue: seriesDatum.x,\n yValue: seriesDatum.y,\n min,\n max,\n first,\n last,\n fill: markerFill,\n stroke: markerStroke,\n strokeWidth: markerStrokeWidth,\n size: markerSize,\n highlighted\n });\n }\n node.size = markerFormat && markerFormat.size != void 0 ? markerFormat.size : markerSize;\n node.fill = markerFormat && markerFormat.fill != void 0 ? markerFormat.fill : markerFill;\n node.stroke = markerFormat && markerFormat.stroke != void 0 ? markerFormat.stroke : markerStroke;\n node.strokeWidth = markerFormat && markerFormat.strokeWidth != void 0 ? markerFormat.strokeWidth : markerStrokeWidth;\n node.translationX = point.x;\n node.translationY = point.y;\n node.visible = markerFormat && markerFormat.enabled != void 0 ? markerFormat.enabled : marker.enabled && node.size > 0;\n });\n }\n updateStroke(strokeData) {\n const { strokePath, yData, line } = this;\n const path = strokePath.path;\n path.clear();\n if (yData.length < 2) {\n return;\n }\n const n = strokeData.length;\n let moveTo = true;\n for (let i = 0; i < n; i++) {\n const { point, seriesDatum } = strokeData[i];\n const x = point.x;\n const y = point.y;\n if (seriesDatum.y == void 0) {\n moveTo = true;\n } else {\n if (moveTo) {\n path.moveTo(x, y);\n moveTo = false;\n } else {\n path.lineTo(x, y);\n }\n }\n }\n strokePath.lineJoin = strokePath.lineCap = \"round\";\n strokePath.fill = void 0;\n strokePath.stroke = line.stroke;\n strokePath.strokeWidth = line.strokeWidth;\n }\n updateFill(areaData) {\n const { fillPath, yData, fill } = this;\n const path = fillPath.path;\n const n = areaData.length;\n path.clear();\n if (yData.length < 2) {\n return;\n }\n for (let i = 0; i < n; i++) {\n const { point } = areaData[i];\n const x = point.x;\n const y = point.y;\n if (i > 0) {\n path.lineTo(x, y);\n } else {\n path.moveTo(x, y);\n }\n }\n path.closePath();\n fillPath.lineJoin = \"round\";\n fillPath.stroke = void 0;\n fillPath.fill = fill;\n }\n updateXCrosshairLine() {\n var _a;\n const {\n yScale,\n xCrosshairLine,\n highlightedDatum,\n crosshairs: { xLine }\n } = this;\n if (!xLine.enabled || highlightedDatum == void 0) {\n xCrosshairLine.strokeWidth = 0;\n return;\n }\n xCrosshairLine.y1 = yScale.range[0];\n xCrosshairLine.y2 = yScale.range[1];\n xCrosshairLine.x1 = xCrosshairLine.x2 = 0;\n xCrosshairLine.stroke = xLine.stroke;\n xCrosshairLine.strokeWidth = (_a = xLine.strokeWidth) != null ? _a : 1;\n xCrosshairLine.lineCap = xLine.lineCap === \"round\" || xLine.lineCap === \"square\" ? xLine.lineCap : void 0;\n const { lineDash } = xLine;\n xCrosshairLine.lineDash = Array.isArray(lineDash) ? lineDash : getLineDash(xCrosshairLine.lineCap, xLine.lineDash);\n xCrosshairLine.translationX = highlightedDatum.point.x;\n }\n updateYCrosshairLine() {\n var _a;\n const {\n xScale,\n yCrosshairLine,\n highlightedDatum,\n crosshairs: { yLine }\n } = this;\n if (!yLine.enabled || highlightedDatum == void 0) {\n yCrosshairLine.strokeWidth = 0;\n return;\n }\n yCrosshairLine.x1 = xScale.range[0];\n yCrosshairLine.x2 = xScale.range[1];\n yCrosshairLine.y1 = yCrosshairLine.y2 = 0;\n yCrosshairLine.stroke = yLine.stroke;\n yCrosshairLine.strokeWidth = (_a = yLine.strokeWidth) != null ? _a : 1;\n yCrosshairLine.lineCap = yLine.lineCap === \"round\" || yLine.lineCap === \"square\" ? yLine.lineCap : void 0;\n const { lineDash } = yLine;\n yCrosshairLine.lineDash = Array.isArray(lineDash) ? lineDash : getLineDash(yCrosshairLine.lineCap, yLine.lineDash);\n yCrosshairLine.translationY = highlightedDatum.point.y;\n }\n getTooltipHtml(datum) {\n var _a, _b;\n const { dataType } = this;\n const { seriesDatum } = datum;\n const yValue = seriesDatum.y;\n const xValue = seriesDatum.x;\n const content = this.formatNumericDatum(yValue);\n const title = dataType === \"array\" || dataType === \"object\" ? this.formatDatum(xValue) : void 0;\n const defaults = {\n content,\n title\n };\n const tooltipRenderer = (_b = (_a = this.processedOptions) == null ? void 0 : _a.tooltip) == null ? void 0 : _b.renderer;\n if (tooltipRenderer) {\n return toTooltipHtml(\n tooltipRenderer({\n context: this.context,\n datum: seriesDatum,\n yValue,\n xValue\n }),\n defaults\n );\n }\n return toTooltipHtml(defaults);\n }\n};\nAreaSparkline.className = \"AreaSparkline\";\nvar { extent: extent3 } = _Util32;\nvar { BandScale: BandScale3 } = _Scale3;\nvar SparklineMarker2 = class {\n constructor() {\n this.enabled = true;\n this.shape = \"circle\";\n this.size = 0;\n this.fill = \"rgb(124, 181, 236)\";\n this.stroke = \"rgb(124, 181, 236)\";\n this.strokeWidth = 1;\n this.formatter = void 0;\n }\n};\nvar SparklineLine2 = class {\n constructor() {\n this.stroke = \"rgb(124, 181, 236)\";\n this.strokeWidth = 1;\n }\n};\nvar SparklineCrosshairs2 = class {\n constructor() {\n this.xLine = {\n enabled: true,\n stroke: \"rgba(0,0,0, 0.54)\",\n strokeWidth: 1,\n lineDash: \"solid\",\n lineCap: void 0\n };\n this.yLine = {\n enabled: false,\n stroke: \"rgba(0,0,0, 0.54)\",\n strokeWidth: 1,\n lineDash: \"solid\",\n lineCap: void 0\n };\n }\n};\nvar LineSparkline = class extends Sparkline {\n constructor() {\n super();\n this.linePath = new _Scene42.Path();\n this.xCrosshairLine = new _Scene42.Line();\n this.yCrosshairLine = new _Scene42.Line();\n this.lineSparklineGroup = new _Scene42.Group();\n this.markers = new _Scene42.Group();\n this.markerSelection = _Scene42.Selection.select(\n this.markers,\n () => this.markerFactory()\n );\n this.markerSelectionData = [];\n this.marker = new SparklineMarker2();\n this.line = new SparklineLine2();\n this.crosshairs = new SparklineCrosshairs2();\n this.rootGroup.append(this.lineSparklineGroup);\n this.linePath.zIndex = 1e3;\n this.xCrosshairLine.zIndex = 2e3;\n this.yCrosshairLine.zIndex = 2e3;\n this.markers.zIndex = 2500;\n this.lineSparklineGroup.append([this.linePath, this.xCrosshairLine, this.yCrosshairLine, this.markers]);\n }\n getNodeData() {\n return this.markerSelectionData;\n }\n markerFactory() {\n const { shape } = this.marker;\n const MarkerShape = getMarker(shape);\n return new MarkerShape();\n }\n /**\n * If marker shape is changed, this method should be called to remove the previous marker nodes selection.\n */\n onMarkerShapeChange() {\n this.markerSelection = this.markerSelection.clear();\n this.scheduleLayout();\n }\n update() {\n const nodeData = this.generateNodeData();\n if (!nodeData) {\n return;\n }\n this.markerSelectionData = nodeData;\n this.updateSelection(nodeData);\n this.updateNodes();\n this.updateLine();\n }\n updateYScaleDomain() {\n const { yData, yScale } = this;\n const yMinMax = extent3(yData);\n let yMin = 0;\n let yMax = 1;\n if (yMinMax !== void 0) {\n yMin = this.min = yMinMax[0];\n yMax = this.max = yMinMax[1];\n }\n if (yMin === yMax) {\n const padding = Math.abs(yMin * 0.01);\n yMin -= padding;\n yMax += padding;\n }\n yScale.domain = [yMin, yMax];\n }\n generateNodeData() {\n const { data, yData, xData, xScale, yScale } = this;\n if (!data) {\n return;\n }\n const continuous = !(xScale instanceof BandScale3);\n const offsetX = !continuous ? xScale.bandwidth / 2 : 0;\n const nodeData = [];\n for (let i = 0; i < yData.length; i++) {\n const yDatum = yData[i];\n const xDatum = xData[i];\n if (yDatum == void 0) {\n continue;\n }\n const x = xScale.convert(continuous ? xScale.toDomain(xDatum) : xDatum) + offsetX;\n const y = yDatum === void 0 ? NaN : yScale.convert(yDatum);\n nodeData.push({\n seriesDatum: { x: xDatum, y: yDatum },\n point: { x, y }\n });\n }\n return nodeData;\n }\n updateSelection(selectionData) {\n this.markerSelection.update(selectionData);\n }\n updateNodes() {\n const { highlightedDatum, highlightStyle, marker } = this;\n const {\n size: highlightSize,\n fill: highlightFill,\n stroke: highlightStroke,\n strokeWidth: highlightStrokeWidth\n } = highlightStyle;\n const markerFormatter = marker.formatter;\n this.markerSelection.each((node, datum, index) => {\n const highlighted = datum === highlightedDatum;\n const markerFill = highlighted && highlightFill !== void 0 ? highlightFill : marker.fill;\n const markerStroke = highlighted && highlightStroke !== void 0 ? highlightStroke : marker.stroke;\n const markerStrokeWidth = highlighted && highlightStrokeWidth !== void 0 ? highlightStrokeWidth : marker.strokeWidth;\n const markerSize = highlighted && highlightSize !== void 0 ? highlightSize : marker.size;\n let markerFormat;\n const { seriesDatum, point } = datum;\n if (markerFormatter) {\n const first = index === 0;\n const last = index === this.markerSelectionData.length - 1;\n const min = seriesDatum.y === this.min;\n const max = seriesDatum.y === this.max;\n markerFormat = markerFormatter({\n datum,\n xValue: seriesDatum.x,\n yValue: seriesDatum.y,\n min,\n max,\n first,\n last,\n fill: markerFill,\n stroke: markerStroke,\n strokeWidth: markerStrokeWidth,\n size: markerSize,\n highlighted\n });\n }\n node.size = markerFormat && markerFormat.size != void 0 ? markerFormat.size : markerSize;\n node.fill = markerFormat && markerFormat.fill != void 0 ? markerFormat.fill : markerFill;\n node.stroke = markerFormat && markerFormat.stroke != void 0 ? markerFormat.stroke : markerStroke;\n node.strokeWidth = markerFormat && markerFormat.strokeWidth != void 0 ? markerFormat.strokeWidth : markerStrokeWidth;\n node.translationX = point.x;\n node.translationY = point.y;\n node.visible = markerFormat && markerFormat.enabled != void 0 ? markerFormat.enabled : marker.enabled && node.size > 0;\n });\n }\n updateLine() {\n const { linePath, yData, xData, xScale, yScale, line } = this;\n const path = linePath.path;\n path.clear();\n if (yData.length < 2) {\n return;\n }\n const continuous = !(xScale instanceof BandScale3);\n const n = yData.length;\n const offsetX = !continuous ? xScale.bandwidth / 2 : 0;\n let moveTo = true;\n for (let i = 0; i < n; i++) {\n const xDatum = xData[i];\n const yDatum = yData[i];\n const x = xScale.convert(continuous ? xScale.toDomain(xDatum) : xDatum) + offsetX;\n const y = yDatum === void 0 ? NaN : yScale.convert(yDatum);\n if (yDatum == void 0) {\n moveTo = true;\n } else {\n if (moveTo) {\n path.moveTo(x, y);\n moveTo = false;\n } else {\n path.lineTo(x, y);\n }\n }\n }\n linePath.fill = void 0;\n linePath.stroke = line.stroke;\n linePath.strokeWidth = line.strokeWidth;\n }\n updateXCrosshairLine() {\n var _a;\n const {\n yScale,\n xCrosshairLine,\n highlightedDatum,\n crosshairs: { xLine }\n } = this;\n if (!xLine.enabled || highlightedDatum == void 0) {\n xCrosshairLine.strokeWidth = 0;\n return;\n }\n xCrosshairLine.y1 = yScale.range[0];\n xCrosshairLine.y2 = yScale.range[1];\n xCrosshairLine.x1 = xCrosshairLine.x2 = 0;\n xCrosshairLine.stroke = xLine.stroke;\n xCrosshairLine.strokeWidth = (_a = xLine.strokeWidth) != null ? _a : 1;\n xCrosshairLine.lineCap = xLine.lineCap === \"round\" || xLine.lineCap === \"square\" ? xLine.lineCap : void 0;\n const { lineDash } = xLine;\n xCrosshairLine.lineDash = Array.isArray(lineDash) ? lineDash : getLineDash(xCrosshairLine.lineCap, xLine.lineDash);\n xCrosshairLine.translationX = highlightedDatum.point.x;\n }\n updateYCrosshairLine() {\n var _a;\n const {\n xScale,\n yCrosshairLine,\n highlightedDatum,\n crosshairs: { yLine }\n } = this;\n if (!yLine.enabled || highlightedDatum == void 0) {\n yCrosshairLine.strokeWidth = 0;\n return;\n }\n yCrosshairLine.x1 = xScale.range[0];\n yCrosshairLine.x2 = xScale.range[1];\n yCrosshairLine.y1 = yCrosshairLine.y2 = 0;\n yCrosshairLine.stroke = yLine.stroke;\n yCrosshairLine.strokeWidth = (_a = yLine.strokeWidth) != null ? _a : 1;\n yCrosshairLine.lineCap = yLine.lineCap === \"round\" || yLine.lineCap === \"square\" ? yLine.lineCap : void 0;\n const { lineDash } = yLine;\n yCrosshairLine.lineDash = Array.isArray(lineDash) ? lineDash : getLineDash(yCrosshairLine.lineCap, yLine.lineDash);\n yCrosshairLine.translationY = highlightedDatum.point.y;\n }\n getTooltipHtml(datum) {\n var _a, _b;\n const { dataType } = this;\n const { seriesDatum } = datum;\n const yValue = seriesDatum.y;\n const xValue = seriesDatum.x;\n const content = this.formatNumericDatum(yValue);\n const title = dataType === \"array\" || dataType === \"object\" ? this.formatDatum(xValue) : void 0;\n const defaults = {\n content,\n title\n };\n const tooltipRenderer = (_b = (_a = this.processedOptions) == null ? void 0 : _a.tooltip) == null ? void 0 : _b.renderer;\n if (tooltipRenderer) {\n return toTooltipHtml(\n tooltipRenderer({\n context: this.context,\n datum: seriesDatum,\n yValue,\n xValue\n }),\n defaults\n );\n }\n return toTooltipHtml(defaults);\n }\n};\nLineSparkline.className = \"LineSparkline\";\nvar Label = class {\n constructor() {\n this.enabled = true;\n this.fontSize = 8;\n this.fontFamily = \"Verdana, sans-serif\";\n this.fontStyle = void 0;\n this.fontWeight = void 0;\n this.color = \"rgba(70, 70, 70, 1)\";\n }\n};\nvar { extent: extent4 } = _Util42;\nvar BarColumnLabel = class extends Label {\n constructor() {\n super(...arguments);\n this.formatter = void 0;\n this.placement = \"insideEnd\";\n }\n};\nvar BarColumnSparkline = class extends Sparkline {\n constructor() {\n super();\n this.fill = \"rgb(124, 181, 236)\";\n this.stroke = \"silver\";\n this.strokeWidth = 0;\n this.paddingInner = 0.1;\n this.paddingOuter = 0.2;\n this.valueAxisDomain = void 0;\n this.formatter = void 0;\n this.axisLine = new _Scene52.Line();\n this.bandWidth = 0;\n this.sparklineGroup = new _Scene52.Group();\n this.rectGroup = new _Scene52.Group();\n this.labelGroup = new _Scene52.Group();\n this.rectSelection = _Scene52.Selection.select(\n this.rectGroup,\n _Scene52.Rect\n );\n this.labelSelection = _Scene52.Selection.select(\n this.labelGroup,\n _Scene52.Text\n );\n this.nodeSelectionData = [];\n this.label = new BarColumnLabel();\n this.rootGroup.append(this.sparklineGroup);\n this.rectGroup.zIndex = 50;\n this.axisLine.zIndex = 500;\n this.labelGroup.zIndex = 1500;\n this.sparklineGroup.append([this.rectGroup, this.axisLine, this.labelGroup]);\n this.axisLine.lineCap = \"round\";\n this.label.enabled = false;\n }\n getNodeData() {\n return this.nodeSelectionData;\n }\n update() {\n this.updateSelections();\n this.updateNodes();\n }\n updateSelections() {\n const nodeData = this.generateNodeData();\n if (!nodeData) {\n return;\n }\n this.nodeSelectionData = nodeData;\n this.updateRectSelection(nodeData);\n this.updateLabelSelection(nodeData);\n }\n updateNodes() {\n this.updateRectNodes();\n this.updateLabelNodes();\n }\n calculateStep(range) {\n var _a;\n const { xScale, paddingInner, paddingOuter, smallestInterval } = this;\n let domainLength = xScale.domain[1] - xScale.domain[0];\n let intervals = domainLength / ((_a = smallestInterval == null ? void 0 : smallestInterval.x) != null ? _a : 1) + 1;\n const maxBands = 50;\n const bands = Math.min(intervals, maxBands);\n const gaps = bands - 1;\n const step = range / Math.max(1, 2 * paddingOuter + gaps * paddingInner + bands);\n return step;\n }\n updateYScaleDomain() {\n const { yScale, yData, valueAxisDomain } = this;\n const yMinMax = extent4(yData);\n let yMin = 0;\n let yMax = 1;\n if (yMinMax !== void 0) {\n yMin = this.min = yMinMax[0];\n yMax = this.max = yMinMax[1];\n }\n yMin = yMin < 0 ? yMin : 0;\n yMax = yMax < 0 ? 0 : yMax;\n if (valueAxisDomain) {\n if (valueAxisDomain[1] < yMax) {\n valueAxisDomain[1] = yMax;\n }\n if (valueAxisDomain[0] > yMin) {\n valueAxisDomain[0] = yMin;\n }\n }\n yScale.domain = valueAxisDomain ? valueAxisDomain : [yMin, yMax];\n }\n updateRectSelection(selectionData) {\n this.rectSelection.update(selectionData);\n }\n updateRectNodes() {\n const { highlightedDatum, formatter: nodeFormatter, fill, stroke, strokeWidth } = this;\n const { fill: highlightFill, stroke: highlightStroke, strokeWidth: highlightStrokeWidth } = this.highlightStyle;\n this.rectSelection.each((node, datum, index) => {\n const highlighted = datum === highlightedDatum;\n const nodeFill = highlighted && highlightFill !== void 0 ? highlightFill : fill;\n const nodeStroke = highlighted && highlightStroke !== void 0 ? highlightStroke : stroke;\n const nodeStrokeWidth = highlighted && highlightStrokeWidth !== void 0 ? highlightStrokeWidth : strokeWidth;\n let nodeFormat;\n const { x, y, width, height, seriesDatum } = datum;\n if (nodeFormatter) {\n const first = index === 0;\n const last = index === this.nodeSelectionData.length - 1;\n const min = seriesDatum.y === this.min;\n const max = seriesDatum.y === this.max;\n nodeFormat = nodeFormatter({\n datum,\n xValue: seriesDatum.x,\n yValue: seriesDatum.y,\n width,\n height,\n min,\n max,\n first,\n last,\n fill: nodeFill,\n stroke: nodeStroke,\n strokeWidth: nodeStrokeWidth,\n highlighted\n });\n }\n node.fill = nodeFormat && nodeFormat.fill || nodeFill;\n node.stroke = nodeFormat && nodeFormat.stroke || nodeStroke;\n node.strokeWidth = nodeFormat && nodeFormat.strokeWidth || nodeStrokeWidth;\n node.x = node.y = 0;\n node.width = width;\n node.height = height;\n node.visible = node.height > 0;\n node.translationX = x;\n node.translationY = y;\n });\n }\n updateLabelSelection(selectionData) {\n this.labelSelection.update(selectionData, (text) => {\n text.tag = 1;\n text.pointerEvents = _Scene52.PointerEvents.None;\n });\n }\n updateLabelNodes() {\n const {\n label: { enabled: labelEnabled, fontStyle, fontWeight, fontSize, fontFamily, color }\n } = this;\n this.labelSelection.each((text, datum) => {\n const label = datum.label;\n if (label && labelEnabled) {\n text.fontStyle = fontStyle;\n text.fontWeight = fontWeight;\n text.fontSize = fontSize;\n text.fontFamily = fontFamily;\n text.textAlign = label.textAlign;\n text.textBaseline = label.textBaseline;\n text.text = label.text;\n text.x = label.x;\n text.y = label.y;\n text.fill = color;\n text.visible = true;\n } else {\n text.visible = false;\n }\n });\n }\n getTooltipHtml(datum) {\n var _a, _b;\n const { dataType } = this;\n const { seriesDatum } = datum;\n const yValue = seriesDatum.y;\n const xValue = seriesDatum.x;\n const content = this.formatNumericDatum(yValue);\n const title = dataType === \"array\" || dataType === \"object\" ? this.formatDatum(xValue) : void 0;\n const defaults = {\n content,\n title\n };\n const tooltipRenderer = (_b = (_a = this.processedOptions) == null ? void 0 : _a.tooltip) == null ? void 0 : _b.renderer;\n if (tooltipRenderer) {\n return toTooltipHtml(\n tooltipRenderer({\n context: this.context,\n datum: seriesDatum,\n yValue,\n xValue\n }),\n defaults\n );\n }\n return toTooltipHtml(defaults);\n }\n formatLabelValue(value) {\n return value % 1 !== 0 ? value.toFixed(1) : value.toFixed(0);\n }\n};\nvar { isNumber: isNumber2 } = _Util52;\nvar { BandScale: BandScale4 } = _Scale4;\nvar BarSparkline = class extends BarColumnSparkline {\n updateYScaleRange() {\n const { seriesRect, yScale } = this;\n yScale.range = [0, seriesRect.width];\n }\n updateXScaleRange() {\n const { xScale, seriesRect, paddingOuter, paddingInner } = this;\n if (xScale instanceof BandScale4) {\n xScale.range = [0, seriesRect.height];\n xScale.paddingInner = paddingInner;\n xScale.paddingOuter = paddingOuter;\n } else {\n const step = this.calculateStep(seriesRect.height);\n const padding = step * paddingOuter;\n this.bandWidth = step * (1 - paddingInner);\n xScale.range = [padding, seriesRect.height - padding - this.bandWidth];\n }\n }\n updateAxisLine() {\n const { yScale, axis, axisLine, seriesRect } = this;\n const { strokeWidth } = axis;\n axisLine.x1 = 0;\n axisLine.x2 = 0;\n axisLine.y1 = 0;\n axisLine.y2 = seriesRect.height;\n axisLine.stroke = axis.stroke;\n axisLine.strokeWidth = strokeWidth + (strokeWidth % 2 === 1 ? 1 : 0);\n const yZero = yScale.convert(0);\n axisLine.translationX = yZero;\n }\n generateNodeData() {\n const { data, yData, xData, xScale, yScale, fill, stroke, strokeWidth, label } = this;\n if (!data) {\n return;\n }\n const {\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n color: labelColor,\n formatter: labelFormatter,\n placement: labelPlacement\n } = label;\n const nodeData = [];\n const yZero = yScale.convert(0);\n const continuous = !(xScale instanceof BandScale4);\n for (let i = 0, n = yData.length; i < n; i++) {\n let yDatum = yData[i];\n const xDatum = xData[i];\n const invalidDatum = yDatum === void 0;\n if (invalidDatum) {\n yDatum = 0;\n }\n const y = xScale.convert(continuous ? xScale.toDomain(xDatum) : xDatum);\n const x = Math.min(yDatum === void 0 ? NaN : yScale.convert(yDatum), yZero);\n const bottom = Math.max(yDatum === void 0 ? NaN : yScale.convert(yDatum), yZero);\n const height = !continuous ? xScale.bandwidth : this.bandWidth;\n const width = bottom - x;\n const midPoint = {\n x: yZero,\n y\n };\n let labelText;\n if (labelFormatter) {\n labelText = labelFormatter({ value: yDatum });\n } else {\n labelText = yDatum !== void 0 && isNumber2(yDatum) ? this.formatLabelValue(yDatum) : \"\";\n }\n const labelY = y + height / 2;\n let labelX;\n const labelTextBaseline = \"middle\";\n let labelTextAlign;\n const isPositiveY = yDatum !== void 0 && yDatum >= 0;\n const labelPadding = 4;\n if (labelPlacement === \"center\") {\n labelX = x + width / 2;\n labelTextAlign = \"center\";\n } else if (labelPlacement === \"outsideEnd\") {\n labelX = x + (isPositiveY ? width + labelPadding : -labelPadding);\n labelTextAlign = isPositiveY ? \"start\" : \"end\";\n } else if (labelPlacement === \"insideEnd\") {\n labelX = x + (isPositiveY ? width - labelPadding : labelPadding);\n labelTextAlign = isPositiveY ? \"end\" : \"start\";\n const textSize = _Scene62.Text.getTextSize(labelText, labelFontFamily);\n const textWidth = textSize.width || 20;\n const positiveBoundary = yZero + textWidth;\n const negativeBoundary = yZero - textWidth;\n const exceedsBoundaries = isPositiveY && labelX < positiveBoundary || !isPositiveY && labelX > negativeBoundary;\n if (exceedsBoundaries) {\n labelX = yZero + labelPadding * (isPositiveY ? 1 : -1);\n labelTextAlign = isPositiveY ? \"start\" : \"end\";\n }\n } else {\n labelX = yZero + labelPadding * (isPositiveY ? 1 : -1);\n labelTextAlign = isPositiveY ? \"start\" : \"end\";\n }\n nodeData.push({\n x,\n y,\n width,\n height,\n fill,\n stroke,\n strokeWidth,\n seriesDatum: { x: xDatum, y: invalidDatum ? void 0 : yDatum },\n point: midPoint,\n label: {\n x: labelX,\n y: labelY,\n text: labelText,\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n textAlign: labelTextAlign,\n textBaseline: labelTextBaseline,\n fill: labelColor\n }\n });\n }\n return nodeData;\n }\n getDistance(p1, p2) {\n return Math.abs(p1.y - p2.y);\n }\n};\nBarSparkline.className = \"BarSparkline\";\nvar { isNumber: isNumber3 } = _Util62;\nvar { BandScale: BandScale5 } = _Scale5;\nvar ColumnSparkline = class extends BarColumnSparkline {\n updateYScaleRange() {\n const { seriesRect, yScale } = this;\n yScale.range = [seriesRect.height, 0];\n }\n updateXScaleRange() {\n const { xScale, seriesRect, paddingOuter, paddingInner } = this;\n if (xScale instanceof BandScale5) {\n xScale.range = [0, seriesRect.width];\n xScale.paddingInner = paddingInner;\n xScale.paddingOuter = paddingOuter;\n } else {\n const step = this.calculateStep(seriesRect.width);\n const padding = step * paddingOuter;\n this.bandWidth = step * (1 - paddingInner);\n xScale.range = [padding, seriesRect.width - padding - this.bandWidth];\n }\n }\n updateAxisLine() {\n const { yScale, axis, axisLine, seriesRect } = this;\n const { strokeWidth } = axis;\n axisLine.x1 = 0;\n axisLine.x2 = seriesRect.width;\n axisLine.y1 = 0;\n axisLine.y2 = 0;\n axisLine.stroke = axis.stroke;\n axisLine.strokeWidth = strokeWidth + (strokeWidth % 2 === 1 ? 1 : 0);\n const yZero = yScale.convert(0);\n axisLine.translationY = yZero;\n }\n generateNodeData() {\n const { data, yData, xData, xScale, yScale, fill, stroke, strokeWidth, label } = this;\n if (!data) {\n return;\n }\n const {\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n color: labelColor,\n formatter: labelFormatter,\n placement: labelPlacement\n } = label;\n const nodeData = [];\n const yZero = yScale.convert(0);\n const continuous = !(xScale instanceof BandScale5);\n for (let i = 0, n = yData.length; i < n; i++) {\n let yDatum = yData[i];\n const xDatum = xData[i];\n const invalidDatum = yDatum === void 0;\n if (invalidDatum) {\n yDatum = 0;\n }\n const y = Math.min(yDatum === void 0 ? NaN : yScale.convert(yDatum), yZero);\n const x = xScale.convert(continuous ? xScale.toDomain(xDatum) : xDatum);\n const bottom = Math.max(yDatum === void 0 ? NaN : yScale.convert(yDatum), yZero);\n const width = !continuous ? xScale.bandwidth : this.bandWidth;\n const height = bottom - y;\n const midPoint = {\n x: x + width / 2,\n y: yZero\n };\n let labelText;\n if (labelFormatter) {\n labelText = labelFormatter({ value: yDatum });\n } else {\n labelText = yDatum !== void 0 && isNumber3(yDatum) ? this.formatLabelValue(yDatum) : \"\";\n }\n const labelX = x + width / 2;\n let labelY;\n const labelTextAlign = \"center\";\n let labelTextBaseline;\n const isPositiveY = yDatum !== void 0 && yDatum >= 0;\n const labelPadding = 2;\n if (labelPlacement === \"center\") {\n labelY = y + height / 2;\n labelTextBaseline = \"middle\";\n } else if (labelPlacement === \"outsideEnd\") {\n labelY = y + (isPositiveY ? -labelPadding : height + labelPadding);\n labelTextBaseline = isPositiveY ? \"bottom\" : \"top\";\n } else if (labelPlacement === \"insideEnd\") {\n labelY = y + (isPositiveY ? labelPadding : height - labelPadding);\n labelTextBaseline = isPositiveY ? \"top\" : \"bottom\";\n const textSize = _Scene72.Text.getTextSize(labelText, labelFontFamily);\n const textHeight = textSize.height || 10;\n const positiveBoundary = yZero - textHeight;\n const negativeBoundary = yZero + textHeight;\n const exceedsBoundaries = isPositiveY && labelY > positiveBoundary || !isPositiveY && labelY < negativeBoundary;\n if (exceedsBoundaries) {\n labelY = yZero + labelPadding * (isPositiveY ? -1 : 1);\n labelTextBaseline = isPositiveY ? \"bottom\" : \"top\";\n }\n } else {\n labelY = yZero + labelPadding * (isPositiveY ? -1 : 1);\n labelTextBaseline = isPositiveY ? \"bottom\" : \"top\";\n }\n nodeData.push({\n x,\n y,\n width,\n height,\n fill,\n stroke,\n strokeWidth,\n seriesDatum: { x: xDatum, y: invalidDatum ? void 0 : yDatum },\n point: midPoint,\n label: {\n x: labelX,\n y: labelY,\n text: labelText,\n fontStyle: labelFontStyle,\n fontWeight: labelFontWeight,\n fontSize: labelFontSize,\n fontFamily: labelFontFamily,\n textAlign: labelTextAlign,\n textBaseline: labelTextBaseline,\n fill: labelColor\n }\n });\n }\n return nodeData;\n }\n};\nColumnSparkline.className = \"ColumnSparkline\";\nvar { isNumber: isNumber4 } = _Util7;\nvar AgSparkline = class {\n static create(options, tooltip) {\n options = _Util7.deepClone(options);\n const sparkline = getSparklineInstance(options.type);\n if (tooltip) {\n sparkline.tooltip = tooltip;\n }\n initSparkline(sparkline, options);\n initSparklineByType(sparkline, options);\n if (options.data) {\n sparkline.data = options.data;\n }\n sparkline.processedOptions = options;\n return sparkline;\n }\n};\nfunction getSparklineInstance(type = \"line\") {\n switch (type) {\n case \"column\":\n return new ColumnSparkline();\n case \"bar\":\n return new BarSparkline();\n case \"area\":\n return new AreaSparkline();\n case \"line\":\n default:\n return new LineSparkline();\n }\n}\nfunction initSparklineByType(sparkline, options) {\n switch (options.type) {\n case \"bar\":\n initBarColumnSparkline(sparkline, options);\n break;\n case \"column\":\n initBarColumnSparkline(sparkline, options);\n break;\n case \"area\":\n initAreaSparkline(sparkline, options);\n break;\n case \"line\":\n default:\n initLineSparkline(sparkline, options);\n break;\n }\n}\nfunction initSparkline(sparkline, options) {\n setValueIfPropertyExists(sparkline, \"context\", options.context, options);\n setValueIfPropertyExists(sparkline, \"width\", options.width, options);\n setValueIfPropertyExists(sparkline, \"height\", options.height, options);\n setValueIfPropertyExists(sparkline, \"container\", options.container, options);\n setValueIfPropertyExists(sparkline, \"xKey\", options.xKey, options);\n setValueIfPropertyExists(sparkline, \"yKey\", options.yKey, options);\n if (options.padding) {\n initPaddingOptions(sparkline.padding, options.padding);\n }\n if (options.axis) {\n initAxisOptions(sparkline.axis, options.axis);\n }\n if (options.highlightStyle) {\n initHighlightStyleOptions(sparkline.highlightStyle, options.highlightStyle);\n }\n}\nfunction initLineSparkline(sparkline, options) {\n if (options.marker) {\n initMarkerOptions(sparkline.marker, options.marker);\n }\n if (options.line) {\n initLineOptions(sparkline.line, options.line);\n }\n if (options.crosshairs) {\n initCrosshairsOptions(sparkline.crosshairs, options.crosshairs);\n }\n}\nfunction initAreaSparkline(sparkline, options) {\n setValueIfPropertyExists(sparkline, \"fill\", options.fill, options);\n if (options.marker) {\n initMarkerOptions(sparkline.marker, options.marker);\n }\n if (options.line) {\n initLineOptions(sparkline.line, options.line);\n }\n if (options.crosshairs) {\n initCrosshairsOptions(sparkline.crosshairs, options.crosshairs);\n }\n}\nfunction initBarColumnSparkline(sparkline, options) {\n setValueIfPropertyExists(sparkline, \"valueAxisDomain\", options.valueAxisDomain, options);\n setValueIfPropertyExists(sparkline, \"fill\", options.fill, options);\n setValueIfPropertyExists(sparkline, \"stroke\", options.stroke, options);\n setValueIfPropertyExists(sparkline, \"strokeWidth\", options.strokeWidth, options);\n setValueIfPropertyExists(sparkline, \"paddingInner\", options.paddingInner, options);\n setValueIfPropertyExists(sparkline, \"paddingOuter\", options.paddingOuter, options);\n setValueIfPropertyExists(sparkline, \"formatter\", options.formatter, options);\n if (options.label) {\n initLabelOptions(sparkline.label, options.label);\n }\n}\nfunction initPaddingOptions(target, options) {\n setValueIfPropertyExists(target, \"top\", options.top, options);\n setValueIfPropertyExists(target, \"right\", options.right, options);\n setValueIfPropertyExists(target, \"bottom\", options.bottom, options);\n setValueIfPropertyExists(target, \"left\", options.left, options);\n}\nfunction initMarkerOptions(target, options) {\n setValueIfPropertyExists(target, \"enabled\", options.enabled, options);\n setValueIfPropertyExists(target, \"size\", options.size, options);\n setValueIfPropertyExists(target, \"shape\", options.shape, options);\n setValueIfPropertyExists(target, \"fill\", options.fill, options);\n setValueIfPropertyExists(target, \"stroke\", options.stroke, options);\n setValueIfPropertyExists(target, \"strokeWidth\", options.strokeWidth, options);\n setValueIfPropertyExists(target, \"formatter\", options.formatter, options);\n}\nfunction initLabelOptions(target, options) {\n setValueIfPropertyExists(target, \"enabled\", options.enabled, options);\n setValueIfPropertyExists(target, \"fontStyle\", options.fontStyle, options);\n setValueIfPropertyExists(target, \"fontWeight\", options.fontWeight, options);\n setValueIfPropertyExists(target, \"fontSize\", options.fontSize, options);\n setValueIfPropertyExists(target, \"fontFamily\", options.fontFamily, options);\n setValueIfPropertyExists(target, \"textAlign\", options.textAlign, options);\n setValueIfPropertyExists(target, \"textBaseline\", options.textBaseline, options);\n setValueIfPropertyExists(target, \"color\", options.color, options);\n setValueIfPropertyExists(target, \"formatter\", options.formatter, options);\n setValueIfPropertyExists(target, \"placement\", options.placement, options);\n}\nfunction initLineOptions(target, options) {\n setValueIfPropertyExists(target, \"stroke\", options.stroke, options);\n setValueIfPropertyExists(target, \"strokeWidth\", options.strokeWidth, options);\n}\nfunction initAxisOptions(target, options) {\n setValueIfPropertyExists(target, \"type\", options.type, options);\n setValueIfPropertyExists(target, \"stroke\", options.stroke, options);\n setValueIfPropertyExists(target, \"strokeWidth\", options.strokeWidth, options);\n}\nfunction initHighlightStyleOptions(target, options) {\n setValueIfPropertyExists(target, \"fill\", options.fill, options);\n setValueIfPropertyExists(target, \"size\", options.size, options);\n setValueIfPropertyExists(target, \"stroke\", options.stroke, options);\n setValueIfPropertyExists(target, \"strokeWidth\", options.strokeWidth, options);\n}\nfunction initCrosshairsOptions(target, options) {\n if (target.xLine && options.xLine) {\n initCrosshairLineOptions(target.xLine, options.xLine);\n }\n if (target.yLine && options.yLine) {\n initCrosshairLineOptions(target.yLine, options.yLine);\n }\n}\nfunction initCrosshairLineOptions(target, options) {\n setValueIfPropertyExists(target, \"enabled\", options.enabled, options);\n setValueIfPropertyExists(target, \"stroke\", options.stroke, options);\n setValueIfPropertyExists(target, \"strokeWidth\", options.strokeWidth, options);\n setValueIfPropertyExists(target, \"lineDash\", options.lineDash, options);\n setValueIfPropertyExists(target, \"lineCap\", options.lineCap, options);\n}\nvar doOnceFlags = {};\nfunction doOnce(func, key) {\n if (doOnceFlags[key]) {\n return;\n }\n func();\n doOnceFlags[key] = true;\n}\nvar offsetValidator = (property, value, defaultOffset) => {\n if (isNumber4(value)) {\n return true;\n }\n const message = `AG Charts: ${property} must be a number, the value you provided is not a valid number. Using the default of ${defaultOffset}px.`;\n doOnce(() => console.warn(message), `${property} not a number`);\n return false;\n};\nvar validators = {\n xOffset: offsetValidator,\n yOffset: offsetValidator\n};\nfunction setValueIfPropertyExists(target, property, value, options) {\n if (property in options) {\n if (property in target) {\n const validator = validators[property];\n const isValid = validator ? validator(property, value, target[property]) : true;\n if (isValid && target[property] !== value) {\n target[property] = value;\n }\n } else {\n console.warn(`Property ${property} does not exist on the target object.`);\n }\n }\n}\nvar _SparklineCellRenderer = class _SparklineCellRenderer2 extends Component58 {\n constructor() {\n super(_SparklineCellRenderer2.TEMPLATE);\n }\n init(params) {\n let firstTimeIn = true;\n const updateSparkline = () => {\n const { clientWidth, clientHeight } = this.getGui();\n if (clientWidth === 0 || clientHeight === 0) {\n return;\n }\n if (firstTimeIn) {\n const options = __spreadValues13({\n data: params.value,\n width: clientWidth,\n height: clientHeight,\n context: {\n data: params.data\n }\n }, params.sparklineOptions);\n this.sparkline = AgSparkline.create(options, this.sparklineTooltipSingleton.getSparklineTooltip());\n this.eSparkline.appendChild(this.sparkline.canvasElement);\n firstTimeIn = false;\n } else {\n this.sparkline.width = clientWidth;\n this.sparkline.height = clientHeight;\n }\n };\n const unsubscribeFromResize = this.resizeObserverService.observeResize(this.getGui(), updateSparkline);\n this.addDestroyFunc(() => unsubscribeFromResize());\n }\n refresh(params) {\n if (this.sparkline) {\n this.sparkline.data = params.value;\n return true;\n }\n return false;\n }\n destroy() {\n if (this.sparkline) {\n this.sparkline.destroy();\n }\n super.destroy();\n }\n};\n_SparklineCellRenderer.TEMPLATE = `
\n \n
`;\n__decorateClass16([\n RefSelector28(\"eSparkline\")\n], _SparklineCellRenderer.prototype, \"eSparkline\", 2);\n__decorateClass16([\n Autowired69(\"resizeObserverService\")\n], _SparklineCellRenderer.prototype, \"resizeObserverService\", 2);\n__decorateClass16([\n Autowired69(\"sparklineTooltipSingleton\")\n], _SparklineCellRenderer.prototype, \"sparklineTooltipSingleton\", 2);\nvar SparklineCellRenderer = _SparklineCellRenderer;\nvar SparklineTooltipSingleton = class extends BeanStub29 {\n postConstruct() {\n this.tooltip = new SparklineTooltip();\n }\n getSparklineTooltip() {\n return this.tooltip;\n }\n destroyTooltip() {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n }\n};\n__decorateClass16([\n PostConstruct66\n], SparklineTooltipSingleton.prototype, \"postConstruct\", 1);\n__decorateClass16([\n PreDestroy6\n], SparklineTooltipSingleton.prototype, \"destroyTooltip\", 1);\nSparklineTooltipSingleton = __decorateClass16([\n Bean15(\"sparklineTooltipSingleton\")\n], SparklineTooltipSingleton);\nvar VERSION17 = \"31.3.2\";\nvar SparklinesModule = {\n version: VERSION17,\n moduleName: ModuleNames17.SparklinesModule,\n beans: [SparklineTooltipSingleton],\n userComponents: [{ componentName: \"agSparklineCellRenderer\", componentClass: SparklineCellRenderer }],\n dependantModules: [EnterpriseCoreModule]\n};\n\n// enterprise-modules/status-bar/src/statusBarModule.ts\nimport { ModuleNames as ModuleNames18 } from \"ag-grid-community\";\n\n// enterprise-modules/status-bar/src/statusBar/statusBarService.ts\nimport { Bean as Bean16, BeanStub as BeanStub30 } from \"ag-grid-community\";\nvar StatusBarService = class extends BeanStub30 {\n // tslint:disable-next-line\n constructor() {\n super();\n this.allComponents = /* @__PURE__ */ new Map();\n }\n registerStatusPanel(key, component) {\n this.allComponents.set(key, component);\n }\n unregisterStatusPanel(key) {\n this.allComponents.delete(key);\n }\n unregisterAllComponents() {\n this.allComponents.clear();\n }\n getStatusPanel(key) {\n return this.allComponents.get(key);\n }\n destroy() {\n this.unregisterAllComponents();\n super.destroy();\n }\n};\nStatusBarService = __decorateClass([\n Bean16(\"statusBarService\")\n], StatusBarService);\n\n// enterprise-modules/status-bar/src/statusBar/statusBar.ts\nimport {\n Autowired as Autowired70,\n Component as Component59,\n PostConstruct as PostConstruct67,\n PreDestroy as PreDestroy7,\n AgPromise as AgPromise7,\n RefSelector as RefSelector29,\n _ as _61\n} from \"ag-grid-community\";\nvar _StatusBar = class _StatusBar extends Component59 {\n constructor() {\n super(_StatusBar.TEMPLATE);\n this.compDestroyFunctions = {};\n }\n postConstruct() {\n this.processStatusPanels(/* @__PURE__ */ new Map());\n this.addManagedPropertyListeners([\"statusBar\"], this.handleStatusBarChanged.bind(this));\n }\n processStatusPanels(existingStatusPanelsToReuse) {\n var _a;\n const statusPanels = (_a = this.gos.get(\"statusBar\")) == null ? void 0 : _a.statusPanels;\n if (statusPanels) {\n const leftStatusPanelComponents = statusPanels.filter((componentConfig) => componentConfig.align === \"left\");\n this.createAndRenderComponents(leftStatusPanelComponents, this.eStatusBarLeft, existingStatusPanelsToReuse);\n const centerStatusPanelComponents = statusPanels.filter((componentConfig) => componentConfig.align === \"center\");\n this.createAndRenderComponents(centerStatusPanelComponents, this.eStatusBarCenter, existingStatusPanelsToReuse);\n const rightStatusPanelComponents = statusPanels.filter((componentConfig) => !componentConfig.align || componentConfig.align === \"right\");\n this.createAndRenderComponents(rightStatusPanelComponents, this.eStatusBarRight, existingStatusPanelsToReuse);\n } else {\n this.setDisplayed(false);\n }\n }\n handleStatusBarChanged() {\n var _a;\n const statusPanels = (_a = this.gos.get(\"statusBar\")) == null ? void 0 : _a.statusPanels;\n const validStatusBarPanelsProvided = Array.isArray(statusPanels) && statusPanels.length > 0;\n this.setDisplayed(validStatusBarPanelsProvided);\n const existingStatusPanelsToReuse = /* @__PURE__ */ new Map();\n if (validStatusBarPanelsProvided) {\n statusPanels.forEach((statusPanelConfig) => {\n var _a2, _b;\n const key = (_a2 = statusPanelConfig.key) != null ? _a2 : statusPanelConfig.statusPanel;\n const existingStatusPanel = this.statusBarService.getStatusPanel(key);\n if (existingStatusPanel == null ? void 0 : existingStatusPanel.refresh) {\n const newParams = this.gos.addGridCommonParams((_b = statusPanelConfig.statusPanelParams) != null ? _b : {});\n const hasRefreshed = existingStatusPanel.refresh(newParams);\n if (hasRefreshed) {\n existingStatusPanelsToReuse.set(key, existingStatusPanel);\n delete this.compDestroyFunctions[key];\n _61.removeFromParent(existingStatusPanel.getGui());\n }\n }\n });\n }\n this.resetStatusBar();\n if (validStatusBarPanelsProvided) {\n this.processStatusPanels(existingStatusPanelsToReuse);\n }\n }\n resetStatusBar() {\n this.eStatusBarLeft.innerHTML = \"\";\n this.eStatusBarCenter.innerHTML = \"\";\n this.eStatusBarRight.innerHTML = \"\";\n this.destroyComponents();\n this.statusBarService.unregisterAllComponents();\n }\n destroyComponents() {\n Object.values(this.compDestroyFunctions).forEach((func) => func());\n this.compDestroyFunctions = {};\n }\n createAndRenderComponents(statusBarComponents, ePanelComponent, existingStatusPanelsToReuse) {\n const componentDetails = [];\n statusBarComponents.forEach((componentConfig) => {\n const key = componentConfig.key || componentConfig.statusPanel;\n const existingStatusPanel = existingStatusPanelsToReuse.get(key);\n let promise;\n if (existingStatusPanel) {\n promise = AgPromise7.resolve(existingStatusPanel);\n } else {\n const params = {};\n const compDetails = this.userComponentFactory.getStatusPanelCompDetails(componentConfig, params);\n promise = compDetails.newAgStackInstance();\n if (!promise) {\n return;\n }\n }\n componentDetails.push({\n key,\n promise\n });\n });\n AgPromise7.all(componentDetails.map((details) => details.promise)).then(() => {\n componentDetails.forEach((componentDetail) => {\n componentDetail.promise.then((component) => {\n const destroyFunc = () => {\n this.getContext().destroyBean(component);\n };\n if (this.isAlive()) {\n this.statusBarService.registerStatusPanel(componentDetail.key, component);\n ePanelComponent.appendChild(component.getGui());\n this.compDestroyFunctions[componentDetail.key] = destroyFunc;\n } else {\n destroyFunc();\n }\n });\n });\n });\n }\n};\n_StatusBar.TEMPLATE = /* html */\n`
\n
\n
\n
\n
`;\n__decorateClass([\n Autowired70(\"userComponentFactory\")\n], _StatusBar.prototype, \"userComponentFactory\", 2);\n__decorateClass([\n Autowired70(\"statusBarService\")\n], _StatusBar.prototype, \"statusBarService\", 2);\n__decorateClass([\n RefSelector29(\"eStatusBarLeft\")\n], _StatusBar.prototype, \"eStatusBarLeft\", 2);\n__decorateClass([\n RefSelector29(\"eStatusBarCenter\")\n], _StatusBar.prototype, \"eStatusBarCenter\", 2);\n__decorateClass([\n RefSelector29(\"eStatusBarRight\")\n], _StatusBar.prototype, \"eStatusBarRight\", 2);\n__decorateClass([\n PostConstruct67\n], _StatusBar.prototype, \"postConstruct\", 1);\n__decorateClass([\n PreDestroy7\n], _StatusBar.prototype, \"destroyComponents\", 1);\nvar StatusBar = _StatusBar;\n\n// enterprise-modules/status-bar/src/statusBar/providedPanels/nameValueComp.ts\nimport { Component as Component60, RefSelector as RefSelector30 } from \"ag-grid-community\";\nvar _NameValueComp = class _NameValueComp extends Component60 {\n constructor() {\n super(_NameValueComp.TEMPLATE);\n }\n setLabel(key, defaultValue) {\n this.setDisplayed(false);\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n this.eLabel.innerHTML = localeTextFunc(key, defaultValue);\n }\n setValue(value) {\n this.eValue.innerHTML = value;\n }\n};\n_NameValueComp.TEMPLATE = /* html */\n`
\n : \n \n
`;\n__decorateClass([\n RefSelector30(\"eLabel\")\n], _NameValueComp.prototype, \"eLabel\", 2);\n__decorateClass([\n RefSelector30(\"eValue\")\n], _NameValueComp.prototype, \"eValue\", 2);\nvar NameValueComp = _NameValueComp;\n\n// enterprise-modules/status-bar/src/statusBar/providedPanels/totalAndFilteredRowsComp.ts\nimport {\n Autowired as Autowired71,\n Events as Events21,\n PostConstruct as PostConstruct68,\n _ as _68\n} from \"ag-grid-community\";\nvar TotalAndFilteredRowsComp = class extends NameValueComp {\n postConstruct() {\n if (this.rowModel.getType() !== \"clientSide\") {\n _68.warnOnce(`agTotalAndFilteredRowCountComponent should only be used with the client side row model.`);\n return;\n }\n this.setLabel(\"totalAndFilteredRows\", \"Rows\");\n this.addCssClass(\"ag-status-panel\");\n this.addCssClass(\"ag-status-panel-total-and-filtered-row-count\");\n this.setDisplayed(true);\n this.addManagedListener(this.eventService, Events21.EVENT_MODEL_UPDATED, this.onDataChanged.bind(this));\n this.onDataChanged();\n }\n onDataChanged() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const thousandSeparator = localeTextFunc(\"thousandSeparator\", \",\");\n const decimalSeparator = localeTextFunc(\"decimalSeparator\", \".\");\n const rowCount = _68.formatNumberCommas(this.getFilteredRowCountValue(), thousandSeparator, decimalSeparator);\n const totalRowCount = _68.formatNumberCommas(this.getTotalRowCount(), thousandSeparator, decimalSeparator);\n if (rowCount === totalRowCount) {\n this.setValue(rowCount);\n } else {\n const localeTextFunc2 = this.localeService.getLocaleTextFunc();\n this.setValue(`${rowCount} ${localeTextFunc2(\"of\", \"of\")} ${totalRowCount}`);\n }\n }\n getFilteredRowCountValue() {\n let filteredRowCount = 0;\n this.rowModel.forEachNodeAfterFilter((node) => {\n if (!node.group) {\n filteredRowCount++;\n }\n });\n return filteredRowCount;\n }\n getTotalRowCount() {\n let totalRowCount = 0;\n this.rowModel.forEachNode((node) => {\n if (!node.group) {\n totalRowCount++;\n }\n });\n return totalRowCount;\n }\n init() {\n }\n refresh() {\n return true;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n};\n__decorateClass([\n Autowired71(\"rowModel\")\n], TotalAndFilteredRowsComp.prototype, \"rowModel\", 2);\n__decorateClass([\n PostConstruct68\n], TotalAndFilteredRowsComp.prototype, \"postConstruct\", 1);\n\n// enterprise-modules/status-bar/src/statusBar/providedPanels/filteredRowsComp.ts\nimport {\n Autowired as Autowired76,\n Events as Events30,\n PostConstruct as PostConstruct69,\n _ as _69\n} from \"ag-grid-community\";\nvar FilteredRowsComp = class extends NameValueComp {\n postConstruct() {\n this.setLabel(\"filteredRows\", \"Filtered\");\n if (this.rowModel.getType() !== \"clientSide\") {\n _69.warnOnce(`agFilteredRowCountComponent should only be used with the client side row model.`);\n return;\n }\n this.addCssClass(\"ag-status-panel\");\n this.addCssClass(\"ag-status-panel-filtered-row-count\");\n this.setDisplayed(true);\n const listener = this.onDataChanged.bind(this);\n this.addManagedListener(this.eventService, Events30.EVENT_MODEL_UPDATED, listener);\n listener();\n }\n onDataChanged() {\n const totalRowCountValue = this.getTotalRowCountValue();\n const filteredRowCountValue = this.getFilteredRowCountValue();\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const thousandSeparator = localeTextFunc(\"thousandSeparator\", \",\");\n const decimalSeparator = localeTextFunc(\"decimalSeparator\", \".\");\n this.setValue(_69.formatNumberCommas(filteredRowCountValue, thousandSeparator, decimalSeparator));\n this.setDisplayed(totalRowCountValue !== filteredRowCountValue);\n }\n getTotalRowCountValue() {\n let totalRowCount = 0;\n this.rowModel.forEachNode((node) => totalRowCount += 1);\n return totalRowCount;\n }\n getFilteredRowCountValue() {\n let filteredRowCount = 0;\n this.rowModel.forEachNodeAfterFilter((node) => {\n if (!node.group) {\n filteredRowCount += 1;\n }\n });\n return filteredRowCount;\n }\n init() {\n }\n refresh() {\n return true;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n};\n__decorateClass([\n Autowired76(\"rowModel\")\n], FilteredRowsComp.prototype, \"rowModel\", 2);\n__decorateClass([\n PostConstruct69\n], FilteredRowsComp.prototype, \"postConstruct\", 1);\n\n// enterprise-modules/status-bar/src/statusBar/providedPanels/totalRowsComp.ts\nimport { Autowired as Autowired77, Events as Events31, PostConstruct as PostConstruct70, _ as _70 } from \"ag-grid-community\";\nvar TotalRowsComp = class extends NameValueComp {\n postConstruct() {\n this.setLabel(\"totalRows\", \"Total Rows\");\n if (this.rowModel.getType() !== \"clientSide\") {\n _70.warnOnce(\"agTotalRowCountComponent should only be used with the client side row model.\");\n return;\n }\n this.addCssClass(\"ag-status-panel\");\n this.addCssClass(\"ag-status-panel-total-row-count\");\n this.setDisplayed(true);\n this.addManagedListener(this.eventService, Events31.EVENT_MODEL_UPDATED, this.onDataChanged.bind(this));\n this.onDataChanged();\n }\n onDataChanged() {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const thousandSeparator = localeTextFunc(\"thousandSeparator\", \",\");\n const decimalSeparator = localeTextFunc(\"decimalSeparator\", \".\");\n this.setValue(_70.formatNumberCommas(this.getRowCountValue(), thousandSeparator, decimalSeparator));\n }\n getRowCountValue() {\n let totalRowCount = 0;\n this.rowModel.forEachLeafNode((node) => totalRowCount += 1);\n return totalRowCount;\n }\n init() {\n }\n refresh() {\n return true;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n};\n__decorateClass([\n Autowired77(\"rowModel\")\n], TotalRowsComp.prototype, \"rowModel\", 2);\n__decorateClass([\n PostConstruct70\n], TotalRowsComp.prototype, \"postConstruct\", 1);\n\n// enterprise-modules/status-bar/src/statusBar/providedPanels/selectedRowsComp.ts\nimport { Autowired as Autowired78, Events as Events38, PostConstruct as PostConstruct71, _ as _71 } from \"ag-grid-community\";\nvar SelectedRowsComp = class extends NameValueComp {\n postConstruct() {\n if (!this.isValidRowModel()) {\n console.warn(`AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.`);\n return;\n }\n this.setLabel(\"selectedRows\", \"Selected\");\n this.addCssClass(\"ag-status-panel\");\n this.addCssClass(\"ag-status-panel-selected-row-count\");\n this.onRowSelectionChanged();\n const eventListener = this.onRowSelectionChanged.bind(this);\n this.addManagedListener(this.eventService, Events38.EVENT_MODEL_UPDATED, eventListener);\n this.addManagedListener(this.eventService, Events38.EVENT_SELECTION_CHANGED, eventListener);\n }\n isValidRowModel() {\n const rowModelType = this.rowModel.getType();\n return rowModelType === \"clientSide\" || rowModelType === \"serverSide\";\n }\n onRowSelectionChanged() {\n const selectedRowCount = this.selectionService.getSelectionCount();\n if (selectedRowCount < 0) {\n this.setValue(\"?\");\n this.setDisplayed(true);\n return;\n }\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const thousandSeparator = localeTextFunc(\"thousandSeparator\", \",\");\n const decimalSeparator = localeTextFunc(\"decimalSeparator\", \".\");\n this.setValue(_71.formatNumberCommas(selectedRowCount, thousandSeparator, decimalSeparator));\n this.setDisplayed(selectedRowCount > 0);\n }\n init() {\n }\n refresh() {\n return true;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n};\n__decorateClass([\n Autowired78(\"rowModel\")\n], SelectedRowsComp.prototype, \"rowModel\", 2);\n__decorateClass([\n Autowired78(\"selectionService\")\n], SelectedRowsComp.prototype, \"selectionService\", 2);\n__decorateClass([\n PostConstruct71\n], SelectedRowsComp.prototype, \"postConstruct\", 1);\n\n// enterprise-modules/status-bar/src/statusBar/providedPanels/aggregationComp.ts\nimport {\n Autowired as Autowired79,\n Component as Component61,\n Events as Events39,\n PostConstruct as PostConstruct75,\n RefSelector as RefSelector31,\n _ as _74,\n Optional as Optional7\n} from \"ag-grid-community\";\nvar _AggregationComp = class _AggregationComp extends Component61 {\n constructor() {\n super(_AggregationComp.TEMPLATE);\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n destroy() {\n super.destroy();\n }\n postConstruct() {\n if (!this.isValidRowModel()) {\n console.warn(`AG Grid: agAggregationComponent should only be used with the client and server side row model.`);\n return;\n }\n this.avgAggregationComp.setLabel(\"avg\", \"Average\");\n this.countAggregationComp.setLabel(\"count\", \"Count\");\n this.minAggregationComp.setLabel(\"min\", \"Min\");\n this.maxAggregationComp.setLabel(\"max\", \"Max\");\n this.sumAggregationComp.setLabel(\"sum\", \"Sum\");\n this.addManagedListener(this.eventService, Events39.EVENT_RANGE_SELECTION_CHANGED, this.onRangeSelectionChanged.bind(this));\n this.addManagedListener(this.eventService, Events39.EVENT_MODEL_UPDATED, this.onRangeSelectionChanged.bind(this));\n }\n isValidRowModel() {\n const rowModelType = this.rowModel.getType();\n return rowModelType === \"clientSide\" || rowModelType === \"serverSide\";\n }\n init(params) {\n this.params = params;\n }\n refresh(params) {\n this.params = params;\n this.onRangeSelectionChanged();\n return true;\n }\n setAggregationComponentValue(aggFuncName, value, visible) {\n var _a;\n const statusBarValueComponent = this.getAllowedAggregationValueComponent(aggFuncName);\n if (_74.exists(statusBarValueComponent) && statusBarValueComponent) {\n const localeTextFunc = this.localeService.getLocaleTextFunc();\n const thousandSeparator = localeTextFunc(\"thousandSeparator\", \",\");\n const decimalSeparator = localeTextFunc(\"decimalSeparator\", \".\");\n statusBarValueComponent.setValue(_74.formatNumberTwoDecimalPlacesAndCommas(value, thousandSeparator, decimalSeparator));\n statusBarValueComponent.setDisplayed(visible);\n } else {\n (_a = this.getAggregationValueComponent(aggFuncName)) == null ? void 0 : _a.setDisplayed(false);\n }\n }\n getAllowedAggregationValueComponent(aggFuncName) {\n const { aggFuncs } = this.params;\n if (!aggFuncs || aggFuncs.includes(aggFuncName)) {\n return this.getAggregationValueComponent(aggFuncName);\n }\n return null;\n }\n getAggregationValueComponent(aggFuncName) {\n const refComponentName = `${aggFuncName}AggregationComp`;\n return this[refComponentName];\n }\n onRangeSelectionChanged() {\n var _a;\n const cellRanges = (_a = this.rangeService) == null ? void 0 : _a.getCellRanges();\n let sum = 0;\n let count = 0;\n let numberCount = 0;\n let min = null;\n let max = null;\n const cellsSoFar = {};\n if (cellRanges && !_74.missingOrEmpty(cellRanges) && this.rangeService) {\n for (let i = 0; i < cellRanges.length; i++) {\n const cellRange = cellRanges[i];\n let currentRow = this.rangeService.getRangeStartRow(cellRange);\n const lastRow = this.rangeService.getRangeEndRow(cellRange);\n while (true) {\n const finishedAllRows = _74.missing(currentRow) || !currentRow || this.rowPositionUtils.before(lastRow, currentRow);\n if (finishedAllRows || !currentRow || !cellRange.columns) {\n break;\n }\n cellRange.columns.forEach((col) => {\n if (currentRow === null) {\n return;\n }\n const cellId = this.cellPositionUtils.createId({\n rowPinned: currentRow.rowPinned,\n column: col,\n rowIndex: currentRow.rowIndex\n });\n if (cellsSoFar[cellId]) {\n return;\n }\n cellsSoFar[cellId] = true;\n const rowNode = this.rowPositionUtils.getRowNode(currentRow);\n if (_74.missing(rowNode)) {\n return;\n }\n let value = this.valueService.getValue(col, rowNode);\n if (_74.missing(value) || value === \"\") {\n return;\n }\n count++;\n if (typeof value === \"object\" && \"value\" in value) {\n value = value.value;\n if (value === \"\") {\n return;\n }\n }\n if (typeof value === \"string\") {\n value = Number(value);\n }\n if (typeof value === \"number\" && !isNaN(value)) {\n sum += value;\n if (max === null || value > max) {\n max = value;\n }\n if (min === null || value < min) {\n min = value;\n }\n numberCount++;\n }\n });\n currentRow = this.cellNavigationService.getRowBelow(currentRow);\n }\n }\n ;\n }\n const gotResult = count > 1;\n const gotNumberResult = numberCount > 1;\n this.setAggregationComponentValue(\"count\", count, gotResult);\n this.setAggregationComponentValue(\"sum\", sum, gotNumberResult);\n this.setAggregationComponentValue(\"min\", min, gotNumberResult);\n this.setAggregationComponentValue(\"max\", max, gotNumberResult);\n this.setAggregationComponentValue(\"avg\", sum / numberCount, gotNumberResult);\n }\n};\n_AggregationComp.TEMPLATE = /* html */\n`
\n \n \n \n \n \n
`;\n__decorateClass([\n Optional7(\"rangeService\")\n], _AggregationComp.prototype, \"rangeService\", 2);\n__decorateClass([\n Autowired79(\"valueService\")\n], _AggregationComp.prototype, \"valueService\", 2);\n__decorateClass([\n Autowired79(\"cellNavigationService\")\n], _AggregationComp.prototype, \"cellNavigationService\", 2);\n__decorateClass([\n Autowired79(\"rowModel\")\n], _AggregationComp.prototype, \"rowModel\", 2);\n__decorateClass([\n Autowired79(\"cellPositionUtils\")\n], _AggregationComp.prototype, \"cellPositionUtils\", 2);\n__decorateClass([\n Autowired79(\"rowPositionUtils\")\n], _AggregationComp.prototype, \"rowPositionUtils\", 2);\n__decorateClass([\n RefSelector31(\"sumAggregationComp\")\n], _AggregationComp.prototype, \"sumAggregationComp\", 2);\n__decorateClass([\n RefSelector31(\"countAggregationComp\")\n], _AggregationComp.prototype, \"countAggregationComp\", 2);\n__decorateClass([\n RefSelector31(\"minAggregationComp\")\n], _AggregationComp.prototype, \"minAggregationComp\", 2);\n__decorateClass([\n RefSelector31(\"maxAggregationComp\")\n], _AggregationComp.prototype, \"maxAggregationComp\", 2);\n__decorateClass([\n RefSelector31(\"avgAggregationComp\")\n], _AggregationComp.prototype, \"avgAggregationComp\", 2);\n__decorateClass([\n PostConstruct75\n], _AggregationComp.prototype, \"postConstruct\", 1);\nvar AggregationComp = _AggregationComp;\n\n// enterprise-modules/status-bar/src/version.ts\nvar VERSION18 = \"31.3.2\";\n\n// enterprise-modules/status-bar/src/statusBarModule.ts\nvar StatusBarModule = {\n version: VERSION18,\n moduleName: ModuleNames18.StatusBarModule,\n beans: [StatusBarService],\n agStackComponents: [\n { componentName: \"AgStatusBar\", componentClass: StatusBar },\n { componentName: \"AgNameValue\", componentClass: NameValueComp }\n ],\n userComponents: [\n { componentName: \"agAggregationComponent\", componentClass: AggregationComp },\n { componentName: \"agSelectedRowCountComponent\", componentClass: SelectedRowsComp },\n { componentName: \"agTotalRowCountComponent\", componentClass: TotalRowsComp },\n { componentName: \"agFilteredRowCountComponent\", componentClass: FilteredRowsComp },\n { componentName: \"agTotalAndFilteredRowCountComponent\", componentClass: TotalAndFilteredRowsComp }\n ],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// enterprise-modules/viewport-row-model/dist/package/main.esm.mjs\nimport { ModuleNames as ModuleNames19 } from \"ag-grid-community\";\nimport {\n _ as _75,\n Autowired as Autowired80,\n Bean as Bean17,\n BeanStub as BeanStub31,\n Events as Events40,\n PostConstruct as PostConstruct76,\n PreDestroy as PreDestroy8,\n RowNode\n} from \"ag-grid-community\";\nvar __defProp17 = Object.defineProperty;\nvar __getOwnPropDesc17 = Object.getOwnPropertyDescriptor;\nvar __decorateClass17 = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc17(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp17(target, key, result);\n return result;\n};\nvar VERSION19 = \"31.3.2\";\nvar ViewportRowModel = class extends BeanStub31 {\n constructor() {\n super(...arguments);\n this.firstRow = -1;\n this.lastRow = -1;\n this.rowCount = -1;\n this.rowNodesByIndex = {};\n }\n // we don't implement as lazy row heights is not supported in this row model\n ensureRowHeightsValid(startPixel, endPixel, startLimitIndex, endLimitIndex) {\n return false;\n }\n init() {\n this.rowHeight = this.gos.getRowHeightAsNumber();\n this.addManagedListener(this.eventService, Events40.EVENT_VIEWPORT_CHANGED, this.onViewportChanged.bind(this));\n this.addManagedPropertyListener(\"viewportDatasource\", () => this.updateDatasource());\n this.addManagedPropertyListener(\"rowHeight\", () => {\n this.rowHeight = this.gos.getRowHeightAsNumber();\n this.updateRowHeights();\n });\n }\n start() {\n this.updateDatasource();\n }\n isLastRowIndexKnown() {\n return true;\n }\n destroyDatasource() {\n if (!this.viewportDatasource) {\n return;\n }\n if (this.viewportDatasource.destroy) {\n this.viewportDatasource.destroy();\n }\n this.rowRenderer.datasourceChanged();\n this.firstRow = -1;\n this.lastRow = -1;\n }\n updateDatasource() {\n const datasource = this.gos.get(\"viewportDatasource\");\n if (datasource) {\n this.setViewportDatasource(datasource);\n }\n }\n getViewportRowModelPageSize() {\n return this.gos.get(\"viewportRowModelPageSize\");\n }\n getViewportRowModelBufferSize() {\n return this.gos.get(\"viewportRowModelBufferSize\");\n }\n calculateFirstRow(firstRenderedRow) {\n const bufferSize = this.getViewportRowModelBufferSize();\n const pageSize = this.getViewportRowModelPageSize();\n const afterBuffer = firstRenderedRow - bufferSize;\n if (afterBuffer < 0) {\n return 0;\n }\n return Math.floor(afterBuffer / pageSize) * pageSize;\n }\n calculateLastRow(lastRenderedRow) {\n if (lastRenderedRow === -1) {\n return lastRenderedRow;\n }\n const bufferSize = this.getViewportRowModelBufferSize();\n const pageSize = this.getViewportRowModelPageSize();\n const afterBuffer = lastRenderedRow + bufferSize;\n const result = Math.ceil(afterBuffer / pageSize) * pageSize;\n const lastRowIndex = this.rowCount - 1;\n return Math.min(result, lastRowIndex);\n }\n onViewportChanged(event) {\n const newFirst = this.calculateFirstRow(event.firstRow);\n const newLast = this.calculateLastRow(event.lastRow);\n if (this.firstRow !== newFirst || this.lastRow !== newLast) {\n this.firstRow = newFirst;\n this.lastRow = newLast;\n this.purgeRowsNotInViewport();\n if (this.viewportDatasource) {\n this.viewportDatasource.setViewportRange(this.firstRow, this.lastRow);\n }\n }\n }\n purgeRowsNotInViewport() {\n Object.keys(this.rowNodesByIndex).forEach((indexStr) => {\n const index = parseInt(indexStr, 10);\n if (index < this.firstRow || index > this.lastRow) {\n if (this.isRowFocused(index)) {\n return;\n }\n delete this.rowNodesByIndex[index];\n }\n });\n }\n isRowFocused(rowIndex) {\n const focusedCell = this.focusService.getFocusCellToUseAfterRefresh();\n if (!focusedCell) {\n return false;\n }\n if (focusedCell.rowPinned != null) {\n return false;\n }\n const hasFocus = focusedCell.rowIndex === rowIndex;\n return hasFocus;\n }\n setViewportDatasource(viewportDatasource) {\n this.destroyDatasource();\n this.viewportDatasource = viewportDatasource;\n this.rowCount = -1;\n if (!viewportDatasource.init) {\n console.warn(\"AG Grid: viewport is missing init method.\");\n } else {\n viewportDatasource.init({\n setRowCount: this.setRowCount.bind(this),\n setRowData: this.setRowData.bind(this),\n getRow: this.getRow.bind(this)\n });\n }\n }\n getType() {\n return \"viewport\";\n }\n getRow(rowIndex) {\n if (!this.rowNodesByIndex[rowIndex]) {\n this.rowNodesByIndex[rowIndex] = this.createBlankRowNode(rowIndex);\n }\n return this.rowNodesByIndex[rowIndex];\n }\n getRowNode(id) {\n let result;\n this.forEachNode((rowNode) => {\n if (rowNode.id === id) {\n result = rowNode;\n }\n });\n return result;\n }\n getRowCount() {\n return this.rowCount === -1 ? 0 : this.rowCount;\n }\n getRowIndexAtPixel(pixel) {\n if (this.rowHeight !== 0) {\n return Math.floor(pixel / this.rowHeight);\n }\n return 0;\n }\n getRowBounds(index) {\n return {\n rowHeight: this.rowHeight,\n rowTop: this.rowHeight * index\n };\n }\n updateRowHeights() {\n this.forEachNode((node) => {\n node.setRowHeight(this.rowHeight);\n node.setRowTop(this.rowHeight * node.rowIndex);\n });\n const event = {\n type: Events40.EVENT_MODEL_UPDATED,\n newData: false,\n newPage: false,\n keepRenderedRows: true,\n animate: false\n };\n this.eventService.dispatchEvent(event);\n }\n getTopLevelRowCount() {\n return this.getRowCount();\n }\n getTopLevelRowDisplayedIndex(topLevelIndex) {\n return topLevelIndex;\n }\n isEmpty() {\n return this.rowCount > 0;\n }\n isRowsToRender() {\n return this.rowCount > 0;\n }\n getNodesInRangeForSelection(firstInRange, lastInRange) {\n const firstIndex = _75.missing(firstInRange) ? 0 : firstInRange.rowIndex;\n const lastIndex = lastInRange.rowIndex;\n const firstNodeOutOfRange = firstIndex < this.firstRow || firstIndex > this.lastRow;\n const lastNodeOutOfRange = lastIndex < this.firstRow || lastIndex > this.lastRow;\n if (firstNodeOutOfRange || lastNodeOutOfRange) {\n return [];\n }\n const result = [];\n const startIndex = firstIndex <= lastIndex ? firstIndex : lastIndex;\n const endIndex = firstIndex <= lastIndex ? lastIndex : firstIndex;\n for (let i = startIndex; i <= endIndex; i++) {\n result.push(this.rowNodesByIndex[i]);\n }\n return result;\n }\n forEachNode(callback) {\n let callbackCount = 0;\n Object.keys(this.rowNodesByIndex).forEach((indexStr) => {\n const index = parseInt(indexStr, 10);\n const rowNode = this.rowNodesByIndex[index];\n callback(rowNode, callbackCount);\n callbackCount++;\n });\n }\n setRowData(rowData) {\n _75.iterateObject(rowData, (indexStr, dataItem) => {\n const index = parseInt(indexStr, 10);\n if (index >= this.firstRow && index <= this.lastRow) {\n let rowNode = this.rowNodesByIndex[index];\n if (_75.missing(rowNode)) {\n rowNode = this.createBlankRowNode(index);\n this.rowNodesByIndex[index] = rowNode;\n }\n rowNode.setDataAndId(dataItem, index.toString());\n }\n });\n }\n createBlankRowNode(rowIndex) {\n const rowNode = new RowNode(this.beans);\n rowNode.setRowHeight(this.rowHeight);\n rowNode.setRowTop(this.rowHeight * rowIndex);\n rowNode.setRowIndex(rowIndex);\n return rowNode;\n }\n setRowCount(rowCount, keepRenderedRows = false) {\n if (rowCount === this.rowCount) {\n return;\n }\n this.rowCount = rowCount;\n this.eventService.dispatchEventOnce({\n type: Events40.EVENT_ROW_COUNT_READY\n });\n const event = {\n type: Events40.EVENT_MODEL_UPDATED,\n newData: false,\n newPage: false,\n keepRenderedRows,\n animate: false\n };\n this.eventService.dispatchEvent(event);\n }\n isRowPresent(rowNode) {\n const foundRowNode = this.getRowNode(rowNode.id);\n return !!foundRowNode;\n }\n};\n__decorateClass17([\n Autowired80(\"rowRenderer\")\n], ViewportRowModel.prototype, \"rowRenderer\", 2);\n__decorateClass17([\n Autowired80(\"focusService\")\n], ViewportRowModel.prototype, \"focusService\", 2);\n__decorateClass17([\n Autowired80(\"beans\")\n], ViewportRowModel.prototype, \"beans\", 2);\n__decorateClass17([\n PostConstruct76\n], ViewportRowModel.prototype, \"init\", 1);\n__decorateClass17([\n PreDestroy8\n], ViewportRowModel.prototype, \"destroyDatasource\", 1);\nViewportRowModel = __decorateClass17([\n Bean17(\"rowModel\")\n], ViewportRowModel);\nvar ViewportRowModelModule = {\n version: VERSION19,\n moduleName: ModuleNames19.ViewportRowModelModule,\n rowModel: \"viewport\",\n beans: [ViewportRowModel],\n dependantModules: [\n EnterpriseCoreModule\n ]\n};\n\n// packages/ag-grid-enterprise/src/main.ts\n__reExport(main_exports, main_esm_exports);\nimport { ALWAYS_SYNC_GLOBAL_EVENTS } from \"ag-grid-community\";\nimport { AbstractHeaderCellCtrl } from \"ag-grid-community\";\nimport { AgAbstractField } from \"ag-grid-community\";\nimport { AgAbstractLabel as AgAbstractLabel2 } from \"ag-grid-community\";\nimport { AgAutocomplete as AgAutocomplete2 } from \"ag-grid-community\";\nimport { AgCheckbox } from \"ag-grid-community\";\nimport { AgDialog as AgDialog5 } from \"ag-grid-community\";\nimport { AgGroupComponent as AgGroupComponent6 } from \"ag-grid-community\";\nimport { AgInputDateField as AgInputDateField2 } from \"ag-grid-community\";\nimport { AgInputNumberField as AgInputNumberField2 } from \"ag-grid-community\";\nimport { AgInputRange } from \"ag-grid-community\";\nimport { AgInputTextArea } from \"ag-grid-community\";\nimport { AgInputTextField as AgInputTextField3 } from \"ag-grid-community\";\nimport { AgMenuItemComponent as AgMenuItemComponent5 } from \"ag-grid-community\";\nimport { AgMenuItemRenderer as AgMenuItemRenderer2 } from \"ag-grid-community\";\nimport { AgMenuList as AgMenuList4 } from \"ag-grid-community\";\nimport { AgMenuPanel } from \"ag-grid-community\";\nimport { AgPanel as AgPanel2 } from \"ag-grid-community\";\nimport { AgPickerField as AgPickerField2 } from \"ag-grid-community\";\nimport { AgPromise as AgPromise8 } from \"ag-grid-community\";\nimport { AgPromiseStatus } from \"ag-grid-community\";\nimport { AgRadioButton } from \"ag-grid-community\";\nimport { AgRichSelect as AgRichSelect4 } from \"ag-grid-community\";\nimport { AgSelect as AgSelect9 } from \"ag-grid-community\";\nimport { AgSlider as AgSlider3 } from \"ag-grid-community\";\nimport { AgStackComponentsRegistry } from \"ag-grid-community\";\nimport { AgToggleButton as AgToggleButton5 } from \"ag-grid-community\";\nimport { AlignedGridsService } from \"ag-grid-community\";\nimport { AnimateShowChangeCellRenderer } from \"ag-grid-community\";\nimport { AnimateSlideCellRenderer } from \"ag-grid-community\";\nimport { AnimationFrameService } from \"ag-grid-community\";\nimport { AutoScrollService as AutoScrollService2 } from \"ag-grid-community\";\nimport { AutoWidthCalculator } from \"ag-grid-community\";\nimport { Autowired as Autowired81 } from \"ag-grid-community\";\nimport { BarColumnLabelPlacement } from \"ag-grid-community\";\nimport { BaseComponentWrapper } from \"ag-grid-community\";\nimport { Bean as Bean18 } from \"ag-grid-community\";\nimport { BeanStub as BeanStub36 } from \"ag-grid-community\";\nimport { Beans } from \"ag-grid-community\";\nimport { BodyDropPivotTarget } from \"ag-grid-community\";\nimport { BodyDropTarget } from \"ag-grid-community\";\nimport { CellComp } from \"ag-grid-community\";\nimport { CellCtrl as CellCtrl2 } from \"ag-grid-community\";\nimport { CellNavigationService as CellNavigationService2 } from \"ag-grid-community\";\nimport { CellPositionUtils as CellPositionUtils2 } from \"ag-grid-community\";\nimport { CellRangeType as CellRangeType3 } from \"ag-grid-community\";\nimport { ChangedPath as ChangedPath2 } from \"ag-grid-community\";\nimport { ChartMappings as ChartMappings3 } from \"ag-grid-community\";\nimport { CheckboxCellEditor } from \"ag-grid-community\";\nimport { CheckboxCellRenderer } from \"ag-grid-community\";\nimport { CheckboxSelectionComponent } from \"ag-grid-community\";\nimport { ClientSideRowModelSteps } from \"ag-grid-community\";\nimport { Column } from \"ag-grid-community\";\nimport { ColumnApi } from \"ag-grid-community\";\nimport { ColumnFactory } from \"ag-grid-community\";\nimport { ColumnGroup } from \"ag-grid-community\";\nimport { ColumnKeyCreator } from \"ag-grid-community\";\nimport { ColumnModel } from \"ag-grid-community\";\nimport { Component as Component64 } from \"ag-grid-community\";\nimport { ComponentUtil } from \"ag-grid-community\";\nimport { Context } from \"ag-grid-community\";\nimport { CssClassApplier as CssClassApplier4 } from \"ag-grid-community\";\nimport { CssClassManager } from \"ag-grid-community\";\nimport { CtrlsService } from \"ag-grid-community\";\nimport { DataTypeService } from \"ag-grid-community\";\nimport { DateCellEditor } from \"ag-grid-community\";\nimport { DateFilter } from \"ag-grid-community\";\nimport { DateStringCellEditor } from \"ag-grid-community\";\nimport { DisplayedGroupCreator } from \"ag-grid-community\";\nimport { DragAndDropService as DragAndDropService7 } from \"ag-grid-community\";\nimport { DragService } from \"ag-grid-community\";\nimport { DragSourceType as DragSourceType6 } from \"ag-grid-community\";\nimport { Environment } from \"ag-grid-community\";\nimport { EventService as EventService3 } from \"ag-grid-community\";\nimport { Events as Events41 } from \"ag-grid-community\";\nimport { ExcelFactoryMode as ExcelFactoryMode2 } from \"ag-grid-community\";\nimport { ExpansionService as ExpansionService2 } from \"ag-grid-community\";\nimport { ExpressionService } from \"ag-grid-community\";\nimport { FilterManager } from \"ag-grid-community\";\nimport { FilterWrapperComp as FilterWrapperComp4 } from \"ag-grid-community\";\nimport { FloatingFilterMapper } from \"ag-grid-community\";\nimport { FocusService } from \"ag-grid-community\";\nimport { GROUP_AUTO_COLUMN_ID as GROUP_AUTO_COLUMN_ID3 } from \"ag-grid-community\";\nimport { Grid } from \"ag-grid-community\";\nimport { GridApi as GridApi2 } from \"ag-grid-community\";\nimport { GridBodyComp } from \"ag-grid-community\";\nimport { GridBodyCtrl } from \"ag-grid-community\";\nimport { GridComp } from \"ag-grid-community\";\nimport { GridCoreCreator } from \"ag-grid-community\";\nimport { GridCtrl } from \"ag-grid-community\";\nimport { GridHeaderComp } from \"ag-grid-community\";\nimport { GridHeaderCtrl } from \"ag-grid-community\";\nimport { GridOptionsService } from \"ag-grid-community\";\nimport { GroupCellRenderer } from \"ag-grid-community\";\nimport { GroupCellRendererCtrl } from \"ag-grid-community\";\nimport { GroupInstanceIdCreator } from \"ag-grid-community\";\nimport { HeaderCellCtrl } from \"ag-grid-community\";\nimport { HeaderFilterCellComp } from \"ag-grid-community\";\nimport { HeaderFilterCellCtrl } from \"ag-grid-community\";\nimport { HeaderGroupCellCtrl } from \"ag-grid-community\";\nimport { HeaderNavigationDirection } from \"ag-grid-community\";\nimport { HeaderNavigationService } from \"ag-grid-community\";\nimport { HeaderPositionUtils } from \"ag-grid-community\";\nimport { HeaderRowComp } from \"ag-grid-community\";\nimport { HeaderRowContainerComp } from \"ag-grid-community\";\nimport { HeaderRowContainerCtrl } from \"ag-grid-community\";\nimport { HeaderRowCtrl } from \"ag-grid-community\";\nimport { HeaderRowType } from \"ag-grid-community\";\nimport { HorizontalDirection } from \"ag-grid-community\";\nimport { HorizontalResizeService } from \"ag-grid-community\";\nimport { KeyCode as KeyCode12 } from \"ag-grid-community\";\nimport { LargeTextCellEditor } from \"ag-grid-community\";\nimport { LayoutCssClasses } from \"ag-grid-community\";\nimport { LocaleService } from \"ag-grid-community\";\nimport { Logger } from \"ag-grid-community\";\nimport { LoggerFactory } from \"ag-grid-community\";\nimport { ManagedFocusFeature as ManagedFocusFeature2 } from \"ag-grid-community\";\nimport { MenuService } from \"ag-grid-community\";\nimport { ModuleNames as ModuleNames20 } from \"ag-grid-community\";\nimport { ModuleRegistry as ModuleRegistry8 } from \"ag-grid-community\";\nimport { MouseEventService } from \"ag-grid-community\";\nimport { MoveColumnFeature } from \"ag-grid-community\";\nimport { NavigationService } from \"ag-grid-community\";\nimport { NumberCellEditor } from \"ag-grid-community\";\nimport { NumberFilter } from \"ag-grid-community\";\nimport { NumberSequence as NumberSequence2 } from \"ag-grid-community\";\nimport { Optional as Optional8 } from \"ag-grid-community\";\nimport { PaginationProxy } from \"ag-grid-community\";\nimport { PillDragComp as PillDragComp3 } from \"ag-grid-community\";\nimport { PillDropZonePanel as PillDropZonePanel3 } from \"ag-grid-community\";\nimport { PinnedRowModel } from \"ag-grid-community\";\nimport { PopupComponent as PopupComponent2 } from \"ag-grid-community\";\nimport { PopupEditorWrapper } from \"ag-grid-community\";\nimport { PopupService } from \"ag-grid-community\";\nimport { PositionableFeature as PositionableFeature2 } from \"ag-grid-community\";\nimport { PostConstruct as PostConstruct77 } from \"ag-grid-community\";\nimport { PreConstruct as PreConstruct4 } from \"ag-grid-community\";\nimport { PreDestroy as PreDestroy9 } from \"ag-grid-community\";\nimport { PropertyKeys } from \"ag-grid-community\";\nimport { ProvidedColumnGroup as ProvidedColumnGroup6 } from \"ag-grid-community\";\nimport { ProvidedFilter as ProvidedFilter3 } from \"ag-grid-community\";\nimport { Qualifier } from \"ag-grid-community\";\nimport { QuerySelector } from \"ag-grid-community\";\nimport { RefSelector as RefSelector38 } from \"ag-grid-community\";\nimport { ResizeObserverService } from \"ag-grid-community\";\nimport { RowAnimationCssClasses } from \"ag-grid-community\";\nimport { RowContainerComp } from \"ag-grid-community\";\nimport { RowContainerCtrl } from \"ag-grid-community\";\nimport { RowContainerName } from \"ag-grid-community\";\nimport { RowContainerType } from \"ag-grid-community\";\nimport { RowCtrl } from \"ag-grid-community\";\nimport { RowHighlightPosition } from \"ag-grid-community\";\nimport { RowNode as RowNode3 } from \"ag-grid-community\";\nimport { RowNodeBlock as RowNodeBlock2 } from \"ag-grid-community\";\nimport { RowNodeBlockLoader } from \"ag-grid-community\";\nimport { RowNodeSorter } from \"ag-grid-community\";\nimport { RowPositionUtils as RowPositionUtils2 } from \"ag-grid-community\";\nimport { RowRenderer } from \"ag-grid-community\";\nimport { ScalarFilter } from \"ag-grid-community\";\nimport { ScrollVisibleService } from \"ag-grid-community\";\nimport { SelectCellEditor } from \"ag-grid-community\";\nimport { SelectableService } from \"ag-grid-community\";\nimport { SelectionHandleType as SelectionHandleType5 } from \"ag-grid-community\";\nimport { ServerSideTransactionResultStatus as ServerSideTransactionResultStatus4 } from \"ag-grid-community\";\nimport { SetLeftFeature } from \"ag-grid-community\";\nimport { SimpleFilter } from \"ag-grid-community\";\nimport { SortController } from \"ag-grid-community\";\nimport { SortIndicatorComp } from \"ag-grid-community\";\nimport { StandardMenuFactory } from \"ag-grid-community\";\nimport { StylingService } from \"ag-grid-community\";\nimport { TabGuardClassNames } from \"ag-grid-community\";\nimport { TabGuardComp as TabGuardComp5 } from \"ag-grid-community\";\nimport { TabGuardCtrl } from \"ag-grid-community\";\nimport { TabbedLayout as TabbedLayout3 } from \"ag-grid-community\";\nimport { TextCellEditor } from \"ag-grid-community\";\nimport { TextFilter as TextFilter2 } from \"ag-grid-community\";\nimport { TextFloatingFilter } from \"ag-grid-community\";\nimport { Timer } from \"ag-grid-community\";\nimport { TooltipFeature as TooltipFeature4 } from \"ag-grid-community\";\nimport { TooltipStateManager } from \"ag-grid-community\";\nimport { TouchListener as TouchListener2 } from \"ag-grid-community\";\nimport { UserComponentFactory as UserComponentFactory2 } from \"ag-grid-community\";\nimport { UserComponentRegistry } from \"ag-grid-community\";\nimport { ValueCache } from \"ag-grid-community\";\nimport { ValueService as ValueService2 } from \"ag-grid-community\";\nimport { VanillaFrameworkOverrides } from \"ag-grid-community\";\nimport { VerticalDirection } from \"ag-grid-community\";\nimport { VirtualList as VirtualList5 } from \"ag-grid-community\";\nimport { VirtualListDragFeature as VirtualListDragFeature3 } from \"ag-grid-community\";\nimport { _ as _76 } from \"ag-grid-community\";\nimport { createGrid as createGrid2 } from \"ag-grid-community\";\nimport { getRowContainerTypeForName } from \"ag-grid-community\";\nimport { provideGlobalGridOptions } from \"ag-grid-community\";\nModuleRegistry7.__registerModules([\n ClientSideRowModelModule,\n InfiniteRowModelModule,\n CsvExportModule3,\n AdvancedFilterModule,\n GridChartsModule,\n ClipboardModule,\n ColumnsToolPanelModule,\n ExcelExportModule,\n FiltersToolPanelModule,\n MasterDetailModule,\n MenuModule,\n MultiFilterModule,\n RangeSelectionModule,\n RichSelectModule,\n RowGroupingModule,\n ServerSideRowModelModule,\n SetFilterModule,\n SideBarModule,\n SparklinesModule,\n StatusBarModule,\n ViewportRowModelModule\n], false, void 0);\nexport {\n ALWAYS_SYNC_GLOBAL_EVENTS,\n AbstractHeaderCellCtrl,\n AdvancedFilterModule,\n AgAbstractField,\n AgAbstractLabel2 as AgAbstractLabel,\n AgAutocomplete2 as AgAutocomplete,\n AgCheckbox,\n AgDialog5 as AgDialog,\n AgGroupComponent6 as AgGroupComponent,\n AgInputDateField2 as AgInputDateField,\n AgInputNumberField2 as AgInputNumberField,\n AgInputRange,\n AgInputTextArea,\n AgInputTextField3 as AgInputTextField,\n AgMenuItemComponent5 as AgMenuItemComponent,\n AgMenuItemRenderer2 as AgMenuItemRenderer,\n AgMenuList4 as AgMenuList,\n AgMenuPanel,\n AgPanel2 as AgPanel,\n AgPickerField2 as AgPickerField,\n AgPromise8 as AgPromise,\n AgPromiseStatus,\n AgRadioButton,\n AgRichSelect4 as AgRichSelect,\n AgSelect9 as AgSelect,\n AgSlider3 as AgSlider,\n AgStackComponentsRegistry,\n AgToggleButton5 as AgToggleButton,\n AlignedGridsService,\n AnimateShowChangeCellRenderer,\n AnimateSlideCellRenderer,\n AnimationFrameService,\n AutoScrollService2 as AutoScrollService,\n AutoWidthCalculator,\n Autowired81 as Autowired,\n BarColumnLabelPlacement,\n BaseComponentWrapper,\n Bean18 as Bean,\n BeanStub36 as BeanStub,\n Beans,\n BodyDropPivotTarget,\n BodyDropTarget,\n CellComp,\n CellCtrl2 as CellCtrl,\n CellNavigationService2 as CellNavigationService,\n CellPositionUtils2 as CellPositionUtils,\n CellRangeType3 as CellRangeType,\n ChangedPath2 as ChangedPath,\n ChartMappings3 as ChartMappings,\n CheckboxCellEditor,\n CheckboxCellRenderer,\n CheckboxSelectionComponent,\n ClientSideRowModelSteps,\n ClipboardModule,\n Column,\n ColumnApi,\n ColumnFactory,\n ColumnGroup,\n ColumnKeyCreator,\n ColumnModel,\n ColumnsToolPanelModule,\n Component64 as Component,\n ComponentUtil,\n Context,\n CssClassApplier4 as CssClassApplier,\n CssClassManager,\n CtrlsService,\n DataTypeService,\n DateCellEditor,\n DateFilter,\n DateStringCellEditor,\n DisplayedGroupCreator,\n DragAndDropService7 as DragAndDropService,\n DragService,\n DragSourceType6 as DragSourceType,\n EnterpriseCoreModule,\n Environment,\n EventService3 as EventService,\n Events41 as Events,\n ExcelExportModule,\n ExcelFactoryMode2 as ExcelFactoryMode,\n ExpansionService2 as ExpansionService,\n ExpressionService,\n FilterManager,\n FilterWrapperComp4 as FilterWrapperComp,\n FiltersToolPanelModule,\n FloatingFilterMapper,\n FocusService,\n GROUP_AUTO_COLUMN_ID3 as GROUP_AUTO_COLUMN_ID,\n Grid,\n GridApi2 as GridApi,\n GridBodyComp,\n GridBodyCtrl,\n GridChartsModule,\n GridComp,\n GridCoreCreator,\n GridCtrl,\n GridHeaderComp,\n GridHeaderCtrl,\n GridOptionsService,\n GroupCellRenderer,\n GroupCellRendererCtrl,\n GroupInstanceIdCreator,\n HeaderCellCtrl,\n HeaderFilterCellComp,\n HeaderFilterCellCtrl,\n HeaderGroupCellCtrl,\n HeaderNavigationDirection,\n HeaderNavigationService,\n HeaderPositionUtils,\n HeaderRowComp,\n HeaderRowContainerComp,\n HeaderRowContainerCtrl,\n HeaderRowCtrl,\n HeaderRowType,\n HorizontalDirection,\n HorizontalResizeService,\n KeyCode12 as KeyCode,\n LargeTextCellEditor,\n LayoutCssClasses,\n GridLicenseManager as LicenseManager,\n LocaleService,\n Logger,\n LoggerFactory,\n ManagedFocusFeature2 as ManagedFocusFeature,\n MasterDetailModule,\n MenuModule,\n MenuService,\n ModuleNames20 as ModuleNames,\n ModuleRegistry8 as ModuleRegistry,\n MouseEventService,\n MoveColumnFeature,\n MultiFilter,\n MultiFilterModule,\n NavigationService,\n NumberCellEditor,\n NumberFilter,\n NumberSequence2 as NumberSequence,\n Optional8 as Optional,\n PaginationProxy,\n PillDragComp3 as PillDragComp,\n PillDropZonePanel3 as PillDropZonePanel,\n PinnedRowModel,\n PivotDropZonePanel,\n PopupComponent2 as PopupComponent,\n PopupEditorWrapper,\n PopupService,\n PositionableFeature2 as PositionableFeature,\n PostConstruct77 as PostConstruct,\n PreConstruct4 as PreConstruct,\n PreDestroy9 as PreDestroy,\n PrimaryColsPanel,\n PropertyKeys,\n ProvidedColumnGroup6 as ProvidedColumnGroup,\n ProvidedFilter3 as ProvidedFilter,\n Qualifier,\n QuerySelector,\n RangeSelectionModule,\n RefSelector38 as RefSelector,\n ResizeObserverService,\n RichSelectModule,\n RowAnimationCssClasses,\n RowContainerComp,\n RowContainerCtrl,\n RowContainerName,\n RowContainerType,\n RowCtrl,\n RowGroupDropZonePanel,\n RowGroupingModule,\n RowHighlightPosition,\n RowNode3 as RowNode,\n RowNodeBlock2 as RowNodeBlock,\n RowNodeBlockLoader,\n RowNodeSorter,\n RowPositionUtils2 as RowPositionUtils,\n RowRenderer,\n ScalarFilter,\n ScrollVisibleService,\n SelectCellEditor,\n SelectableService,\n SelectionHandleType5 as SelectionHandleType,\n ServerSideRowModelModule,\n ServerSideTransactionResultStatus4 as ServerSideTransactionResultStatus,\n SetFilter,\n SetFilterModule,\n SetLeftFeature,\n SideBarModule,\n SimpleFilter,\n SortController,\n SortIndicatorComp,\n SparklinesModule,\n StandardMenuFactory,\n StatusBarModule,\n StylingService,\n TabGuardClassNames,\n TabGuardComp5 as TabGuardComp,\n TabGuardCtrl,\n TabbedLayout3 as TabbedLayout,\n TextCellEditor,\n TextFilter2 as TextFilter,\n TextFloatingFilter,\n Timer,\n ToolPanelColDefService,\n TooltipFeature4 as TooltipFeature,\n TooltipStateManager,\n TouchListener2 as TouchListener,\n UserComponentFactory2 as UserComponentFactory,\n UserComponentRegistry,\n ValueCache,\n ValueService2 as ValueService,\n ValuesDropZonePanel,\n VanillaFrameworkOverrides,\n VerticalDirection,\n ViewportRowModelModule,\n VirtualList5 as VirtualList,\n VirtualListDragFeature3 as VirtualListDragFeature,\n _76 as _,\n __FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT,\n agCharts,\n createGrid2 as createGrid,\n exportMultipleSheetsAsExcel,\n getMultipleSheetsAsExcel,\n getRowContainerTypeForName,\n provideGlobalGridOptions\n};\n"],"names":[],"sourceRoot":""}