{"version":3,"sources":["dom7.js","template7.js","wrap-start.js","f7-intro.js","views.js","navbars.js","searchbar.js","messagebar.js","xhr.js","pages.js","router.js","modals.js","progressbar.js","panels.js","lazy-load.js","material-preloader.js","messages.js","swipeout.js","sortable.js","smart-select.js","virtual-list.js","pull-to-refresh.js","infinite-scroll.js","scroll-toolbars.js","material-tabbar.js","tabs.js","accordion.js","fast-clicks.js","clicks.js","resize.js","forms-storage.js","forms-ajax.js","forms-textarea.js","material-inputs.js","push-state.js","swiper-init.js","photo-browser.js","autocomplete.js","picker.js","calendar.js","notifications.js","data-table.js","template7-templates.js","plugins.js","init.js","f7-outro.js","proto-support.js","proto-device.js","proto-plugins.js","swiper.js","wrap-end.js"],"names":[],"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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACp3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7cA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9mBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACv+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjHA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACn9HA;AACA","file":"framework7.js","sourcesContent":["window.Dom7 = (function () {\n'use strict';\n\nvar Dom7 = function Dom7(arr) {\n var self = this;\n // Create array-like object\n for (var i = 0; i < arr.length; i += 1) {\n self[i] = arr[i];\n }\n self.length = arr.length;\n // Return collection with methods\n return this;\n};\n\nfunction $(selector, context) {\n var arr = [];\n var i = 0;\n if (selector && !context) {\n if (selector instanceof Dom7) {\n return selector;\n }\n }\n if (selector) {\n // String\n if (typeof selector === 'string') {\n var els;\n var tempParent;\n var html = selector.trim();\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n var toCreate = 'div';\n if (html.indexOf(':~]/)) {\n // Pure ID selector\n els = [document.getElementById(selector.trim().split('#')[1])];\n } else {\n // Other selectors\n els = (context || document).querySelectorAll(selector.trim());\n }\n for (i = 0; i < els.length; i += 1) {\n if (els[i]) { arr.push(els[i]); }\n }\n }\n } else if (selector.nodeType || selector === window || selector === document) {\n // Node/element\n arr.push(selector);\n } else if (selector.length > 0 && selector[0].nodeType) {\n // Array of elements or instance of Dom\n for (i = 0; i < selector.length; i += 1) {\n arr.push(selector[i]);\n }\n }\n }\n return new Dom7(arr);\n}\n\n// Remove Diacritics\nvar defaultDiacriticsRemovalap = [\n { base: 'A', letters: '\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F' },\n { base: 'AA', letters: '\\uA732' },\n { base: 'AE', letters: '\\u00C6\\u01FC\\u01E2' },\n { base: 'AO', letters: '\\uA734' },\n { base: 'AU', letters: '\\uA736' },\n { base: 'AV', letters: '\\uA738\\uA73A' },\n { base: 'AY', letters: '\\uA73C' },\n { base: 'B', letters: '\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181' },\n { base: 'C', letters: '\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E' },\n { base: 'D', letters: '\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779' },\n { base: 'DZ', letters: '\\u01F1\\u01C4' },\n { base: 'Dz', letters: '\\u01F2\\u01C5' },\n { base: 'E', letters: '\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E' },\n { base: 'F', letters: '\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B' },\n { base: 'G', letters: '\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E' },\n { base: 'H', letters: '\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D' },\n { base: 'I', letters: '\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197' },\n { base: 'J', letters: '\\u004A\\u24BF\\uFF2A\\u0134\\u0248' },\n { base: 'K', letters: '\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2' },\n { base: 'L', letters: '\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780' },\n { base: 'LJ', letters: '\\u01C7' },\n { base: 'Lj', letters: '\\u01C8' },\n { base: 'M', letters: '\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C' },\n { base: 'N', letters: '\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4' },\n { base: 'NJ', letters: '\\u01CA' },\n { base: 'Nj', letters: '\\u01CB' },\n { base: 'O', letters: '\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C' },\n { base: 'OI', letters: '\\u01A2' },\n { base: 'OO', letters: '\\uA74E' },\n { base: 'OU', letters: '\\u0222' },\n { base: 'OE', letters: '\\u008C\\u0152' },\n { base: 'oe', letters: '\\u009C\\u0153' },\n { base: 'P', letters: '\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754' },\n { base: 'Q', letters: '\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A' },\n { base: 'R', letters: '\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782' },\n { base: 'S', letters: '\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784' },\n { base: 'T', letters: '\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786' },\n { base: 'TZ', letters: '\\uA728' },\n { base: 'U', letters: '\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244' },\n { base: 'V', letters: '\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245' },\n { base: 'VY', letters: '\\uA760' },\n { base: 'W', letters: '\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72' },\n { base: 'X', letters: '\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C' },\n { base: 'Y', letters: '\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE' },\n { base: 'Z', letters: '\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762' },\n { base: 'a', letters: '\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250' },\n { base: 'aa', letters: '\\uA733' },\n { base: 'ae', letters: '\\u00E6\\u01FD\\u01E3' },\n { base: 'ao', letters: '\\uA735' },\n { base: 'au', letters: '\\uA737' },\n { base: 'av', letters: '\\uA739\\uA73B' },\n { base: 'ay', letters: '\\uA73D' },\n { base: 'b', letters: '\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253' },\n { base: 'c', letters: '\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184' },\n { base: 'd', letters: '\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A' },\n { base: 'dz', letters: '\\u01F3\\u01C6' },\n { base: 'e', letters: '\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD' },\n { base: 'f', letters: '\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C' },\n { base: 'g', letters: '\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F' },\n { base: 'h', letters: '\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265' },\n { base: 'hv', letters: '\\u0195' },\n { base: 'i', letters: '\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131' },\n { base: 'j', letters: '\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249' },\n { base: 'k', letters: '\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3' },\n { base: 'l', letters: '\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747' },\n { base: 'lj', letters: '\\u01C9' },\n { base: 'm', letters: '\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F' },\n { base: 'n', letters: '\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5' },\n { base: 'nj', letters: '\\u01CC' },\n { base: 'o', letters: '\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275' },\n { base: 'oi', letters: '\\u01A3' },\n { base: 'ou', letters: '\\u0223' },\n { base: 'oo', letters: '\\uA74F' },\n { base: 'p', letters: '\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755' },\n { base: 'q', letters: '\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759' },\n { base: 'r', letters: '\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783' },\n { base: 's', letters: '\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B' },\n { base: 't', letters: '\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787' },\n { base: 'tz', letters: '\\uA729' },\n { base: 'u', letters: '\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289' },\n { base: 'v', letters: '\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C' },\n { base: 'vy', letters: '\\uA761' },\n { base: 'w', letters: '\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73' },\n { base: 'x', letters: '\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D' },\n { base: 'y', letters: '\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF' },\n { base: 'z', letters: '\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763' } ];\n\nvar diacriticsMap = {};\nfor (var i = 0; i < defaultDiacriticsRemovalap.length; i += 1) {\n var letters = defaultDiacriticsRemovalap[i].letters;\n for (var j = 0; j < letters.length; j += 1) {\n diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base;\n }\n}\n\nvar Utils = {\n parseUrlQuery: function parseUrlQuery(url) {\n var query = {};\n var urlToParse = url || window.location.href;\n var i;\n var params;\n var param;\n var length;\n if (typeof urlToParse === 'string' && urlToParse.length) {\n urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\\S*\\?/, '') : '';\n params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });\n length = params.length;\n\n for (i = 0; i < length; i += 1) {\n param = params[i].replace(/#\\S+/g, '').split('=');\n query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';\n }\n }\n return query;\n },\n isArray: function isArray(arr) {\n return Array.isArray(arr);\n },\n each: function each(obj, callback) {\n // Check it's iterable\n // TODO: Should probably raise a value error here\n if (typeof obj !== 'object') { return; }\n // Don't bother continuing without a callback\n if (!callback) { return; }\n if (Array.isArray(obj) || obj instanceof Dom7) {\n // Array\n for (var i = 0; i < obj.length; i++) {\n // If callback returns false\n if (callback(i, obj[i]) === false) {\n // Break out of the loop\n return;\n }\n }\n } else {\n // Object\n for (var prop in obj) {\n // Check the propertie belongs to the object\n // not it's prototype\n if (obj.hasOwnProperty(prop)) {\n // If the callback returns false\n if (callback(prop, obj[prop]) === false) {\n // Break out of the loop;\n return;\n }\n }\n }\n }\n },\n unique: function unique(arr) {\n var uniqueArray = [];\n for (var i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }\n }\n return uniqueArray;\n },\n serializeObject: function serializeObject(obj, parents) {\n if ( parents === void 0 ) parents = [];\n\n if (typeof obj === 'string') { return obj; }\n var resultArray = [];\n var separator = '&';\n var newParents;\n function varName(name) {\n if (parents.length > 0) {\n var parentParts = '';\n for (var j = 0; j < parents.length; j += 1) {\n if (j === 0) { parentParts += parents[j]; }\n else { parentParts += \"[\" + (encodeURIComponent(parents[j])) + \"]\"; }\n }\n return (parentParts + \"[\" + (encodeURIComponent(name)) + \"]\");\n }\n return encodeURIComponent(name);\n }\n function varValue(value) {\n return encodeURIComponent(value);\n }\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n var toPush = (void 0);\n if (Array.isArray(obj[prop])) {\n toPush = [];\n for (var i = 0; i < obj[prop].length; i += 1) {\n if (!Array.isArray(obj[prop][i]) && typeof obj[prop][i] === 'object') {\n newParents = parents.slice();\n newParents.push(prop);\n newParents.push(String(i));\n toPush.push(Utils.serializeObject(obj[prop][i], newParents));\n } else {\n toPush.push(((varName(prop)) + \"[]=\" + (varValue(obj[prop][i]))));\n }\n }\n if (toPush.length > 0) { resultArray.push(toPush.join(separator)); }\n } else if (obj[prop] === null || obj[prop] === '') {\n resultArray.push(((varName(prop)) + \"=\"));\n } else if (typeof obj[prop] === 'object') {\n // Object, convert to named array\n newParents = parents.slice();\n newParents.push(prop);\n toPush = Utils.serializeObject(obj[prop], newParents);\n if (toPush !== '') { resultArray.push(toPush); }\n } else if (typeof obj[prop] !== 'undefined' && obj[prop] !== '') {\n // Should be string or plain value\n resultArray.push(((varName(prop)) + \"=\" + (varValue(obj[prop]))));\n } else if (obj[prop] === '') { resultArray.push(varName(prop)); }\n }\n }\n return resultArray.join(separator);\n },\n toCamelCase: function toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); });\n },\n dataset: function dataset(el) {\n return $(el).dataset();\n },\n getTranslate: function getTranslate(el, axis) {\n if ( axis === void 0 ) axis = 'x';\n\n var curStyle = window.getComputedStyle(el, null);\n var matrix;\n var curTransform;\n var transformMatrix;\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(function map(a) {\n return a.replace(',', '.');\n }).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }\n // Crazy IE10 Matrix\n else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }\n // Normal Browsers\n else { curTransform = parseFloat(matrix[4]); }\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }\n // Crazy IE10 Matrix\n else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }\n // Normal Browsers\n else { curTransform = parseFloat(matrix[5]); }\n }\n\n return curTransform || 0;\n },\n requestAnimationFrame: function requestAnimationFrame(callback) {\n if (window.requestAnimationFrame) { return window.requestAnimationFrame(callback); }\n else if (window.webkitRequestAnimationFrame) { return window.webkitRequestAnimationFrame(callback); }\n return window.setTimeout(callback, 1000 / 60);\n },\n cancelAnimationFrame: function cancelAnimationFrame(id) {\n if (window.cancelAnimationFrame) { return window.cancelAnimationFrame(id); }\n else if (window.webkitCancelAnimationFrame) { return window.webkitCancelAnimationFrame(id); }\n return window.clearTimeout(id);\n },\n supportTouch: !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch)),\n removeDiacritics: function removeDiacritics(str) {\n return str.replace(/[^\\u0000-\\u007E]/g, function (a) { return diacriticsMap[a] || a; });\n },\n extend: function extend() {\n var args = [], len$1 = arguments.length;\n while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];\n\n var to = Object(args[0]);\n for (var i = 1; i < args.length; i += 1) {\n var nextSource = args[i];\n if (nextSource !== undefined && nextSource !== null) {\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (typeof to[nextKey] === 'object' && typeof nextSource[nextKey] === 'object') {\n Utils.extend(to[nextKey], nextSource[nextKey]);\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n },\n};\n\n// Aliases\nUtils.parseQuery = Utils.parseUrlQuery;\nUtils.param = Utils.serializeObject;\n\n// Global Ajax Setup\nvar globalAjaxOptions = {};\n$.ajaxSetup = function ajaxSetup(options) {\n if (options.type && !options.method) { options.method = options.type; }\n Utils.each(options, function (optionName, optionValue) {\n globalAjaxOptions[optionName] = optionValue;\n });\n};\n\n// JSONP Requests\nvar jsonpRequests = 0;\n\n// Ajax\nfunction ajax(options) {\n var defaults = {\n method: 'GET',\n data: false,\n async: true,\n cache: true,\n user: '',\n password: '',\n headers: {},\n xhrFields: {},\n statusCode: {},\n processData: true,\n dataType: 'text',\n contentType: 'application/x-www-form-urlencoded',\n timeout: 0,\n };\n var callbacks = ['beforeSend', 'error', 'complete', 'success', 'statusCode'];\n\n // For jQuery guys\n if (options.type) { options.method = options.type; }\n\n // Global options\n var globals = globalAjaxOptions;\n\n // Merge global and defaults\n Utils.each(globals, function (globalOptionName, globalOptionValue) {\n if (callbacks.indexOf(globalOptionName) < 0) { defaults[globalOptionName] = globalOptionValue; }\n });\n\n // Function to run XHR callbacks and events\n function fireAjaxCallback(eventName, eventData, callbackName) {\n var a = arguments;\n if (eventName) { $(document).trigger(eventName, eventData); }\n if (callbackName) {\n // Global callback\n if (callbackName in globals) { globals[callbackName](a[3], a[4], a[5], a[6]); }\n // Options callback\n if (options[callbackName]) { options[callbackName](a[3], a[4], a[5], a[6]); }\n }\n }\n\n // Merge options and defaults\n Utils.each(defaults, function (prop, defaultValue) {\n if (!(prop in options)) { options[prop] = defaultValue; }\n });\n\n // Default URL\n if (!options.url) {\n options.url = window.location.toString();\n }\n // Parameters Prefix\n var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?';\n\n // UC method\n var method = options.method.toUpperCase();\n\n // Data to modify GET URL\n if ((method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') && options.data) {\n var stringData;\n if (typeof options.data === 'string') {\n // Should be key=value string\n if (options.data.indexOf('?') >= 0) { stringData = options.data.split('?')[1]; }\n else { stringData = options.data; }\n } else {\n // Should be key=value object\n stringData = Utils.serializeObject(options.data);\n }\n if (stringData.length) {\n options.url += paramsPrefix + stringData;\n if (paramsPrefix === '?') { paramsPrefix = '&'; }\n }\n }\n // JSONP\n if (options.dataType === 'json' && options.url.indexOf('callback=') >= 0) {\n var callbackName = \"f7jsonp_\" + (Date.now() + ((jsonpRequests += 1)));\n var abortTimeout;\n var callbackSplit = options.url.split('callback=');\n var requestUrl = (callbackSplit[0]) + \"callback=\" + callbackName;\n if (callbackSplit[1].indexOf('&') >= 0) {\n var addVars = callbackSplit[1].split('&').filter(function (el) { return el.indexOf('=') > 0; }).join('&');\n if (addVars.length > 0) { requestUrl += \"&\" + addVars; }\n }\n\n // Create script\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.onerror = function onerror() {\n clearTimeout(abortTimeout);\n fireAjaxCallback(undefined, undefined, 'error', null, 'scripterror');\n fireAjaxCallback('ajaxComplete ajax:complete', { scripterror: true }, 'complete', null, 'scripterror');\n };\n script.src = requestUrl;\n\n // Handler\n window[callbackName] = function jsonpCallback(data) {\n clearTimeout(abortTimeout);\n fireAjaxCallback(undefined, undefined, 'success', data);\n script.parentNode.removeChild(script);\n script = null;\n delete window[callbackName];\n };\n document.querySelector('head').appendChild(script);\n\n if (options.timeout > 0) {\n abortTimeout = setTimeout(function () {\n script.parentNode.removeChild(script);\n script = null;\n fireAjaxCallback(undefined, undefined, 'error', null, 'timeout');\n }, options.timeout);\n }\n\n return;\n }\n\n // Cache for GET/HEAD requests\n if (method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') {\n if (options.cache === false) {\n options.url += paramsPrefix + \"_nocache\" + (Date.now());\n }\n }\n\n // Create XHR\n var xhr = new XMLHttpRequest();\n\n // Save Request URL\n xhr.requestUrl = options.url;\n xhr.requestParameters = options;\n\n // Open XHR\n xhr.open(method, options.url, options.async, options.user, options.password);\n\n // Create POST Data\n var postData = null;\n\n if ((method === 'POST' || method === 'PUT' || method === 'PATCH') && options.data) {\n if (options.processData) {\n var postDataInstances = [ArrayBuffer, Blob, Document, FormData];\n // Post Data\n if (postDataInstances.indexOf(options.data.constructor) >= 0) {\n postData = options.data;\n } else {\n // POST Headers\n var boundary = \"---------------------------\" + (Date.now().toString(16));\n\n if (options.contentType === 'multipart\\/form-data') {\n xhr.setRequestHeader('Content-Type', (\"multipart/form-data; boundary=\" + boundary));\n } else {\n xhr.setRequestHeader('Content-Type', options.contentType);\n }\n postData = '';\n var data = Utils.serializeObject(options.data);\n if (options.contentType === 'multipart\\/form-data') {\n boundary = \"---------------------------\" + (Date.now().toString(16));\n data = data.split('&');\n var newData = [];\n for (var i = 0; i < data.length; i += 1) {\n newData.push('Content-Disposition: form-data; name=\"' + _data[i].split('=')[0] + '\"\\r\\n\\r\\n' + _data[i].split('=')[1] + '\\r\\n');\n }\n postData = \"--\" + boundary + \"\\r\\n\" + (newData.join((\"--\" + boundary + \"\\r\\n\"))) + \"--\" + boundary + \"--\\r\\n\";\n } else {\n postData = data;\n }\n }\n } else {\n postData = options.data;\n }\n }\n\n // Additional headers\n if (options.headers) {\n Utils.each(options.headers, function (headerName, headerCallback) {\n xhr.setRequestHeader(headerName, headerCallback);\n });\n }\n\n // Check for crossDomain\n if (typeof options.crossDomain === 'undefined') {\n options.crossDomain = /^([\\w-]+:)?\\/\\/([^\\/]+)/.test(options.url) && RegExp.$2 !== window.location.host;\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n\n if (options.xhrFields) {\n Utils.each(options.xhrFields, function (fieldName, fieldValue) {\n xhr[fieldName] = fieldValue;\n });\n }\n\n var xhrTimeout;\n // Handle XHR\n xhr.onload = function onload(e) {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {\n var responseData;\n if (options.dataType === 'json') {\n try {\n responseData = JSON.parse(xhr.responseText);\n fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);\n } catch (err) {\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, parseerror: true }, 'error', xhr, 'parseerror');\n }\n } else {\n responseData = xhr.responseType === 'text' || xhr.responseType === '' ? xhr.responseText : xhr.response;\n fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);\n }\n } else {\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);\n }\n if (options.statusCode) {\n if (globals.statusCode && globals.statusCode[xhr.status]) { globals.statusCode[xhr.status](xhr); }\n if (options.statusCode[xhr.status]) { options.statusCode[xhr.status](xhr); }\n }\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr }, 'complete', xhr, xhr.status);\n };\n\n xhr.onerror = function onerror(e) {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, error: true }, 'complete', xhr, 'error');\n };\n\n // Ajax start callback\n fireAjaxCallback('ajaxStart ajax:start', { xhr: xhr }, 'start', xhr);\n fireAjaxCallback(undefined, undefined, 'beforeSend', xhr);\n\n // Timeout\n if (options.timeout > 0) {\n xhr.onabort = function onabort() {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n };\n xhrTimeout = setTimeout(function () {\n xhr.abort();\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, timeout: true }, 'error', xhr, 'timeout');\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, timeout: true }, 'complete', xhr, 'timeout');\n }, options.timeout);\n }\n\n // Send XHR\n xhr.send(postData);\n\n // Return XHR object\n return xhr;\n}\n\nfunction ajaxShortcut(method) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var url;\n var data;\n var success;\n var error;\n var dataType;\n if (typeof args[1] === 'function') {\n var assign;\n (assign = args, url = assign[0], success = assign[1], error = assign[2], dataType = assign[3]);\n } else {\n var assign$1;\n (assign$1 = args, url = assign$1[0], data = assign$1[1], success = assign$1[2], error = assign$1[3], dataType = assign$1[4]);\n }\n [success, error].forEach(function (callback) {\n if (typeof callback === 'string') {\n dataType = callback;\n if (callback === success) { success = undefined; }\n else { error = undefined; }\n }\n });\n dataType = dataType || (method === 'getJSON' ? 'json' : undefined);\n return $.ajax({\n url: url,\n method: method === 'post' ? 'POST' : 'GET',\n data: data,\n success: success,\n error: error,\n dataType: dataType,\n });\n}\n\nfunction get() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args.unshift('get');\n return ajaxShortcut.apply(this, args);\n}\nfunction post() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args.unshift('post');\n return ajaxShortcut.apply(this, args);\n}\nfunction getJSON() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n args.unshift('getJSON');\n return ajaxShortcut.apply(this, args);\n}\n\nvar Scroll = {\n scrollTo: function scrollTo(left, top, duration, easing, callback) {\n if ( easing === void 0 ) easing = 'swing';\n\n if (arguments.length === 4 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n return this.each(function animate() {\n var el = this;\n var currentTop;\n var currentLeft;\n var maxTop;\n var maxLeft;\n var newTop;\n var newLeft;\n var scrollTop;\n var scrollLeft;\n var animateTop = top > 0 || top === 0;\n var animateLeft = left > 0 || left === 0;\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n if (animateTop) {\n currentTop = el.scrollTop;\n if (!duration) {\n el.scrollTop = top;\n }\n }\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n if (!duration) { return; }\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n var startTime = null;\n if (animateTop && newTop === currentTop) { animateTop = false; }\n if (animateLeft && newLeft === currentLeft) { animateLeft = false; }\n function render(time) {\n if ( time === void 0 ) time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n var progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n var easeProgress = easing === 'linear' ? progress : (0.5 - (Math.cos(progress * Math.PI) / 2));\n var done;\n if (animateTop) { scrollTop = currentTop + (easeProgress * (newTop - currentTop)); }\n if (animateLeft) { scrollLeft = currentLeft + (easeProgress * (newLeft - currentLeft)); }\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) { callback(); }\n return;\n }\n if (animateTop) { el.scrollTop = scrollTop; }\n if (animateLeft) { el.scrollLeft = scrollLeft; }\n Utils.requestAnimationFrame(render);\n }\n Utils.requestAnimationFrame(render);\n });\n },\n scrollTop: function scrollTop(top, duration, easing, callback) {\n if (arguments.length === 3 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n var dom = this;\n if (typeof top === 'undefined') {\n if (dom.length > 0) { return dom[0].scrollTop; }\n return null;\n }\n return dom.scrollTo(undefined, top, duration, easing, callback);\n },\n scrollLeft: function scrollLeft(left, duration, easing, callback) {\n if (arguments.length === 3 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n var dom = this;\n if (typeof left === 'undefined') {\n if (dom.length > 0) { return dom[0].scrollLeft; }\n return null;\n }\n return dom.scrollTo(left, undefined, duration, easing, callback);\n },\n};\n\nvar Methods = {\n // Classes and attributes\n addClass: function addClass(className) {\n var this$1 = this;\n\n if (typeof className === 'undefined') {\n return this;\n }\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); }\n }\n }\n return this;\n },\n removeClass: function removeClass(className) {\n var this$1 = this;\n\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); }\n }\n }\n return this;\n },\n hasClass: function hasClass(className) {\n if (!this[0]) { return false; }\n return this[0].classList.contains(className);\n },\n toggleClass: function toggleClass(className) {\n var this$1 = this;\n\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); }\n }\n }\n return this;\n },\n attr: function attr(attrs, value) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) { return this[0].getAttribute(attrs); }\n return undefined;\n }\n\n // Set attrs\n for (var i = 0; i < this.length; i += 1) {\n if (arguments$1.length === 2) {\n // String\n this$1[i].setAttribute(attrs, value);\n } else {\n // Object\n for (var attrName in attrs) {\n this$1[i][attrName] = attrs[attrName];\n this$1[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n return this;\n },\n removeAttr: function removeAttr(attr) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].removeAttribute(attr);\n }\n return this;\n },\n prop: function prop(props, value) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) { return this[0][props]; }\n } else {\n // Set props\n for (var i = 0; i < this.length; i += 1) {\n if (arguments$1.length === 2) {\n // String\n this$1[i][props] = value;\n } else {\n // Object\n for (var propName in props) {\n this$1[i][propName] = props[propName];\n }\n }\n }\n return this;\n }\n },\n data: function data(key, value) {\n var this$1 = this;\n\n var el;\n if (typeof value === 'undefined') {\n el = this[0];\n // Get value\n if (el) {\n if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {\n return el.dom7ElementDataStorage[key];\n }\n\n var dataKey = el.getAttribute((\"data-\" + key));\n if (dataKey) {\n return dataKey;\n }\n return undefined;\n }\n return undefined;\n }\n\n // Set value\n for (var i = 0; i < this.length; i += 1) {\n el = this$1[i];\n if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }\n el.dom7ElementDataStorage[key] = value;\n }\n return this;\n },\n removeData: function removeData(key) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n },\n dataset: function dataset() {\n var el = this[0];\n if (!el) { return undefined; }\n var dataset = {};\n if (el.dataset) {\n for (var dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (var i = 0; i < el.attributes.length; i += 1) {\n var attr = el.attributes[i];\n if (attr.name.indexOf('data-') >= 0) {\n dataset[Utils.toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n for (var key in dataset) {\n if (dataset[key] === 'false') { dataset[key] = false; }\n else if (dataset[key] === 'true') { dataset[key] = true; }\n else if (parseFloat(dataset[key]) === dataset[key] * 1) { dataset[key] *= 1; }\n }\n return dataset;\n },\n val: function val(value) {\n var this$1 = this;\n\n if (typeof value === 'undefined') {\n if (this[0]) {\n if (this[0].multiple && this[0].nodeName.toLowerCase() === 'select') {\n var values = [];\n for (var i = 0; i < this[0].selectedOptions.length; i += 1) {\n values.push(this$1[0].selectedOptions[i].value);\n }\n return values;\n }\n return this[0].value;\n }\n return undefined;\n }\n\n for (var i$1 = 0; i$1 < this.length; i$1 += 1) {\n this$1[i$1].value = value;\n }\n return this;\n },\n // Transforms\n transform: function transform(transform$1) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var elStyle = this$1[i].style;\n elStyle.webkitTransform = transform$1;\n elStyle.transform = transform$1;\n }\n return this;\n },\n transition: function transition(duration) {\n var this$1 = this;\n\n if (typeof duration !== 'string') {\n duration = duration + \"ms\";\n }\n for (var i = 0; i < this.length; i += 1) {\n var elStyle = this$1[i].style;\n elStyle.webkitTransitionDuration = duration;\n elStyle.transitionDuration = duration;\n }\n return this;\n },\n // Events\n on: function on() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var eventType = args[0];\n var targetSelector;\n var listener;\n var capture = false;\n if (typeof args[1] === 'function') {\n targetSelector = false;\n listener = args[1];\n capture = args[2];\n } else {\n targetSelector = args[1];\n listener = args[2];\n capture = args[3];\n }\n function handleLiveEvent(e) {\n var target = e.target;\n var eventData = e.target.dom7EventData || [];\n eventData.unshift(e);\n if ($(target).is(targetSelector)) { listener.apply(target, eventData); }\n else {\n var parents = $(target).parents();\n for (var k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }\n }\n }\n }\n function handleEvent(e) {\n var eventData = e.target.dom7EventData || [];\n eventData.unshift(e);\n listener.apply(this, eventData);\n }\n var events = eventType.split(' ');\n var j;\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n if (!el.dom7Listeners) { el.dom7Listeners = []; }\n el.dom7Listeners.push({\n type: eventType,\n listener: listener,\n proxyListener: handleEvent,\n });\n el.addEventListener(events[j], handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n if (!el.dom7LiveListeners) { el.dom7LiveListeners = []; }\n el.dom7LiveListeners.push({\n type: eventType,\n listener: listener,\n proxyListener: handleLiveEvent,\n });\n el.addEventListener(events[j], handleLiveEvent, capture);\n }\n }\n }\n return this;\n },\n off: function off() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var eventType = args[0];\n var targetSelector;\n var listener;\n var capture = false;\n if (typeof args[1] === 'function') {\n targetSelector = false;\n listener = args[1];\n capture = args[2];\n } else {\n targetSelector = args[1];\n listener = args[2];\n capture = args[3];\n }\n var events = eventType.split(' ');\n for (var i = 0; i < events.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n var el = this$1[j];\n if (!targetSelector) {\n if (el.dom7Listeners) {\n for (var k = 0; k < el.dom7Listeners.length; k += 1) {\n if (listener) {\n if (el.dom7Listeners[k].listener === listener) {\n el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture);\n }\n } else if (el.dom7Listeners[k].type === events[i]) {\n el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture);\n }\n }\n }\n } else if (el.dom7LiveListeners) {\n for (var k$1 = 0; k$1 < el.dom7LiveListeners.length; k$1 += 1) {\n if (listener) {\n if (el.dom7LiveListeners[k$1].listener === listener) {\n el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture);\n }\n } else if (el.dom7Listeners[k$1].type === events[i]) {\n el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture);\n }\n }\n }\n }\n }\n return this;\n },\n once: function once(eventName, targetSelector, listener, capture) {\n var dom = this;\n if (typeof targetSelector === 'function') {\n listener = arguments[1];\n capture = arguments[2];\n targetSelector = false;\n }\n function proxy(e) {\n var eventData = e.target.dom7EventData || [];\n listener.apply(this, eventData);\n dom.off(eventName, targetSelector, proxy, capture);\n }\n return dom.on(eventName, targetSelector, proxy, capture);\n },\n trigger: function trigger() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var events = args[0].split(' ');\n var eventData = args[1];\n for (var i = 0; i < events.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n var evt = (void 0);\n try {\n evt = new CustomEvent(events[i], { detail: eventData, bubbles: true, cancelable: true });\n } catch (e) {\n evt = document.createEvent('Event');\n evt.initEvent(events[i], true, true);\n evt.detail = eventData;\n }\n this$1[j].dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });\n this$1[j].dispatchEvent(evt);\n this$1[j].dom7EventData = [];\n delete this$1[j].dom7EventData;\n }\n }\n return this;\n },\n transitionEnd: function transitionEnd(callback) {\n var events = ['webkitTransitionEnd', 'transitionend'];\n var dom = this;\n var i;\n function fireCallBack(e) {\n /* jshint validthis:true */\n if (e.target !== this) { return; }\n callback.call(this, e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n },\n animationEnd: function animationEnd(callback) {\n var events = ['webkitAnimationEnd', 'animationend'];\n var dom = this;\n var i;\n function fireCallBack(e) {\n callback(e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n },\n // Sizing/Styles\n width: function width() {\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n },\n outerWidth: function outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n var styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n return this[0].offsetWidth;\n }\n return null;\n },\n height: function height() {\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n },\n outerHeight: function outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n var styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n return this[0].offsetHeight;\n }\n return null;\n },\n offset: function offset() {\n if (this.length > 0) {\n var el = this[0];\n var box = el.getBoundingClientRect();\n var body = document.body;\n var clientTop = el.clientTop || body.clientTop || 0;\n var clientLeft = el.clientLeft || body.clientLeft || 0;\n var scrollTop = el === window ? window.scrollY : el.scrollTop;\n var scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: (box.top + scrollTop) - clientTop,\n left: (box.left + scrollLeft) - clientLeft,\n };\n }\n\n return null;\n },\n hide: function hide() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].style.display = 'none';\n }\n return this;\n },\n show: function show() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].style.display = 'block';\n }\n return this;\n },\n styles: function styles() {\n if (this[0]) { return window.getComputedStyle(this[0], null); }\n },\n css: function css(props, value) {\n var this$1 = this;\n\n var i;\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n if (this[0]) { return window.getComputedStyle(this[0], null).getPropertyValue(props); }\n } else {\n for (i = 0; i < this.length; i += 1) {\n for (var prop in props) {\n this$1[i].style[prop] = props[prop];\n }\n }\n return this;\n }\n }\n if (arguments.length === 2 && typeof props === 'string') {\n for (i = 0; i < this.length; i += 1) {\n this$1[i].style[props] = value;\n }\n return this;\n }\n return this;\n },\n\n // Dom manipulation\n // Iterate over the collection passing elements to `callback`\n each: function each(callback) {\n var this$1 = this;\n\n // Don't bother continuing without a callback\n if (!callback) { return this; }\n // Iterate over the current collection\n for (var i = 0; i < this.length; i += 1) {\n // If the callback returns false\n if (callback.call(this$1[i], i, this$1[i]) === false) {\n // End the loop early\n return this$1;\n }\n }\n // Return `this` to allow chained DOM operations\n return this;\n },\n filter: function filter(callback) {\n var matchedItems = [];\n var dom = this;\n for (var i = 0; i < dom.length; i += 1) {\n if (callback.call(dom[i], i, dom[i])) { matchedItems.push(dom[i]); }\n }\n return new Dom7(matchedItems);\n },\n html: function html(html$1) {\n var this$1 = this;\n\n if (typeof html$1 === 'undefined') {\n return this[0] ? this[0].innerHTML : undefined;\n }\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].innerHTML = html$1;\n }\n return this;\n },\n text: function text(text$1) {\n var this$1 = this;\n\n if (typeof text$1 === 'undefined') {\n if (this[0]) {\n return this[0].textContent.trim();\n }\n return null;\n }\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].textContent = text$1;\n }\n return this;\n },\n is: function is(selector) {\n var el = this[0];\n var compareWith;\n var i;\n if (!el || typeof selector === 'undefined') { return false; }\n if (typeof selector === 'string') {\n if (el.matches) { return el.matches(selector); }\n else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }\n else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }\n\n compareWith = $(selector);\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) { return true; }\n }\n return false;\n } else if (selector === document) { return el === document; }\n else if (selector === window) { return el === window; }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) { return true; }\n }\n return false;\n }\n return false;\n },\n indexOf: function indexOf(el) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i] === el) { return i; }\n }\n },\n index: function index() {\n var child = this[0];\n var i;\n if (child) {\n i = 0;\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) { i += 1; }\n }\n return i;\n }\n },\n eq: function eq(index) {\n if (typeof index === 'undefined') { return this; }\n var length = this.length;\n var returnIndex;\n if (index > length - 1) {\n return new Dom7([]);\n }\n if (index < 0) {\n returnIndex = length + index;\n if (returnIndex < 0) { return new Dom7([]); }\n return new Dom7([this[returnIndex]]);\n }\n return new Dom7([this[index]]);\n },\n append: function append() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var newChild;\n\n for (var k = 0; k < args.length; k += 1) {\n newChild = args[k];\n for (var i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n while (tempDiv.firstChild) {\n this$1[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (var j = 0; j < newChild.length; j += 1) {\n this$1[i].appendChild(newChild[j]);\n }\n } else {\n this$1[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n },\n appendTo: function appendTo(parent) {\n $(parent).append(this);\n return this;\n },\n prepend: function prepend(newChild) {\n var this$1 = this;\n\n var i;\n var j;\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this$1[i].insertBefore(tempDiv.childNodes[j], this$1[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this$1[i].insertBefore(newChild[j], this$1[i].childNodes[0]);\n }\n } else {\n this$1[i].insertBefore(newChild, this$1[i].childNodes[0]);\n }\n }\n return this;\n },\n prependTo: function prependTo(parent) {\n $(parent).prepend(this);\n return this;\n },\n insertBefore: function insertBefore(selector) {\n var this$1 = this;\n\n var before = $(selector);\n for (var i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this$1[i], before[0]);\n } else if (before.length > 1) {\n for (var j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this$1[i].cloneNode(true), before[j]);\n }\n }\n }\n },\n insertAfter: function insertAfter(selector) {\n var this$1 = this;\n\n var after = $(selector);\n for (var i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this$1[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (var j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this$1[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n },\n next: function next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { return new Dom7([this[0].nextElementSibling]); }\n return new Dom7([]);\n }\n\n if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }\n return new Dom7([]);\n }\n return new Dom7([]);\n },\n nextAll: function nextAll(selector) {\n var nextEls = [];\n var el = this[0];\n if (!el) { return new Dom7([]); }\n while (el.nextElementSibling) {\n var next = el.nextElementSibling;\n if (selector) {\n if ($(next).is(selector)) { nextEls.push(next); }\n } else { nextEls.push(next); }\n el = next;\n }\n return new Dom7(nextEls);\n },\n prev: function prev(selector) {\n if (this.length > 0) {\n var el = this[0];\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { return new Dom7([el.previousElementSibling]); }\n return new Dom7([]);\n }\n\n if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }\n return new Dom7([]);\n }\n return new Dom7([]);\n },\n prevAll: function prevAll(selector) {\n var prevEls = [];\n var el = this[0];\n if (!el) { return new Dom7([]); }\n while (el.previousElementSibling) {\n var prev = el.previousElementSibling;\n if (selector) {\n if ($(prev).is(selector)) { prevEls.push(prev); }\n } else { prevEls.push(prev); }\n el = prev;\n }\n return new Dom7(prevEls);\n },\n siblings: function siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n },\n parent: function parent(selector) {\n var this$1 = this;\n\n var parents = [];\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i].parentNode !== null) {\n if (selector) {\n if ($(this$1[i].parentNode).is(selector)) { parents.push(this$1[i].parentNode); }\n } else {\n parents.push(this$1[i].parentNode);\n }\n }\n }\n return $(Utils.unique(parents));\n },\n parents: function parents(selector) {\n var this$1 = this;\n\n var parents = [];\n for (var i = 0; i < this.length; i += 1) {\n var parent = this$1[i].parentNode;\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) { parents.push(parent); }\n } else {\n parents.push(parent);\n }\n parent = parent.parentNode;\n }\n }\n return $(Utils.unique(parents));\n },\n closest: function closest(selector) {\n var closest = this;\n if (typeof selector === 'undefined') {\n return new Dom7([]);\n }\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n return closest;\n },\n find: function find(selector) {\n var this$1 = this;\n\n var foundElements = [];\n for (var i = 0; i < this.length; i += 1) {\n var found = this$1[i].querySelectorAll(selector);\n for (var j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n return new Dom7(foundElements);\n },\n children: function children(selector) {\n var this$1 = this;\n\n var children = [];\n for (var i = 0; i < this.length; i += 1) {\n var childNodes = this$1[i].childNodes;\n\n for (var j = 0; j < childNodes.length; j += 1) {\n if (!selector) {\n if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }\n } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { children.push(childNodes[j]); }\n }\n }\n return new Dom7(Utils.unique(children));\n },\n remove: function remove() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i].parentNode) { this$1[i].parentNode.removeChild(this$1[i]); }\n }\n return this;\n },\n detach: function detach() {\n return this.remove();\n },\n add: function add() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var dom = this;\n var i;\n var j;\n for (i = 0; i < args.length; i += 1) {\n var toAdd = $(args[i]);\n for (j = 0; j < toAdd.length; j += 1) {\n dom[dom.length] = toAdd[j];\n dom.length += 1;\n }\n }\n return dom;\n },\n empty: function empty() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (el.nodeType === 1) {\n for (var j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n el.textContent = '';\n }\n }\n return this;\n },\n};\n\n// Shortcuts\nvar shortcuts = ('click blur focus focusin focusout keyup keydown keypress submit change mousedown mousemove mouseup mouseenter mouseleave mouseout mouseover touchstart touchend touchmove resize scroll').split(' ');\nvar notTrigger = ('resize scroll').split(' ');\nfunction createMethod(name) {\n Methods[name] = function eventShortcut(targetSelector, listener, capture) {\n var this$1 = this;\n\n if (typeof targetSelector === 'undefined') {\n for (var i = 0; i < this.length; i += 1) {\n if (notTrigger.indexOf(name) < 0) {\n if (name in this$1[i]) { this$1[i][name](); }\n else {\n $(this$1[i]).trigger(name);\n }\n }\n }\n return this;\n }\n return this.on(name, targetSelector, listener, capture);\n };\n}\nfor (var i$1 = 0; i$1 < shortcuts.length; i$1 += 1) {\n createMethod(shortcuts[i$1]);\n}\n\nfunction animate(initialProps, initialParams) {\n var els = this;\n var a = {\n props: $.extend({}, initialProps),\n params: $.extend({\n duration: 300,\n easing: 'swing', // or 'linear'\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n }, initialParams),\n\n elements: els,\n animating: false,\n que: [],\n\n easingProgress: function easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - (Math.cos(progress * Math.PI) / 2);\n }\n if (typeof easing === 'function') {\n return easing(progress);\n }\n return progress;\n },\n stop: function stop() {\n if (a.frameId) {\n Utils.cancelAnimationFrame(a.frameId);\n }\n a.animating = false;\n a.elements.each(function (index, el) {\n var element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n done: function done(complete) {\n a.animating = false;\n a.elements.each(function (index, el) {\n var element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) { complete(els); }\n if (a.que.length > 0) {\n var que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n animate: function animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n var elements = [];\n\n // Define & Cache Initials & Units\n a.elements.each(function (index, el) {\n var initialFullValue;\n var initialValue;\n var unit;\n var finalValue;\n var finalFullValue;\n\n if (!el.dom7AnimateInstance) { a.elements[index].dom7AnimateInstance = a; }\n\n elements[index] = {\n container: el,\n };\n Object.keys(props).forEach(function (prop) {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue: initialFullValue,\n initialValue: initialValue,\n unit: unit,\n finalValue: finalValue,\n finalFullValue: finalFullValue,\n currentValue: initialValue,\n };\n });\n });\n\n var startTime = null;\n var time;\n var elementsDone = 0;\n var propsDone = 0;\n var done;\n var began = false;\n\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n var progress;\n var easeProgress;\n // let el;\n if (!began) {\n began = true;\n if (params.begin) { params.begin(els); }\n }\n if (startTime === null) {\n startTime = time;\n }\n if (params.progress) {\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), ((startTime + params.duration) - time < 0 ? 0 : (startTime + params.duration) - time), startTime);\n }\n\n elements.forEach(function (element) {\n var el = element;\n if (done || el.done) { return; }\n Object.keys(props).forEach(function (prop) {\n if (done || el.done) { return; }\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n var ref = el[prop];\n var initialValue = ref.initialValue;\n var finalValue = ref.finalValue;\n var unit = ref.unit;\n el[prop].currentValue = initialValue + (easeProgress * (finalValue - initialValue));\n var currentValue = el[prop].currentValue;\n\n if (\n (finalValue > initialValue && currentValue >= finalValue) ||\n (finalValue < initialValue && currentValue <= finalValue)) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n if (done) {\n a.done(params.complete);\n return;\n }\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) { return; }\n // Then call\n a.frameId = Utils.requestAnimationFrame(render);\n }\n a.frameId = Utils.requestAnimationFrame(render);\n return a;\n },\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n var animateInstance;\n for (var i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else { a.elements[i].dom7AnimateInstance = a; }\n }\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction stop() {\n var els = this;\n for (var i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nfunction dom7() {\n // Utils & Helpers\n Object.keys(Utils).forEach(function (key) {\n $[key] = Utils[key];\n });\n\n // Methods\n Object.keys(Methods).forEach(function (key) {\n Dom7.prototype[key] = Methods[key];\n });\n\n // Scroll\n Object.keys(Scroll).forEach(function (key) {\n Dom7.prototype[key] = Scroll[key];\n });\n\n // Animate\n Dom7.prototype.animate = animate;\n Dom7.prototype.stop = stop;\n\n // Ajax\n $.ajax = ajax;\n $.get = get;\n $.post = post;\n $.getJSON = getJSON;\n\n // Link to prototype\n $.fn = Dom7.prototype;\n\n return $;\n}\nvar dom7$1 = dom7();\n\nreturn dom7$1;\n\n}());\n","window.Template7 = (function () {\n'use strict';\n\nvar template7Context;\nif (typeof window !== 'undefined') {\n template7Context = window;\n} else if (typeof global !== 'undefined') {\n template7Context = global;\n} else {\n template7Context = undefined;\n}\nfunction isArray(arr) {\n return Array.isArray ? Array.isArray(arr) : Object.prototype.toString.apply(arr) === '[object Array]';\n}\nfunction isFunction(func) {\n return typeof func === 'function';\n}\nfunction escape(string) {\n return (typeof template7Context !== 'undefined' && template7Context.escape ? template7Context.escape(string) : string)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n}\nvar quoteSingleRexExp = new RegExp('\\'', 'g');\nvar quoteDoubleRexExp = new RegExp('\"', 'g');\nfunction helperToSlices(string) {\n var helperParts = string.replace(/[{}#}]/g, '').split(' ');\n var slices = [];\n var shiftIndex;\n var i;\n var j;\n for (i = 0; i < helperParts.length; i += 1) {\n var part = helperParts[i];\n var blockQuoteRegExp = (void 0);\n var openingQuote = (void 0);\n if (i === 0) { slices.push(part); }\n else if (part.indexOf('\"') === 0 || part.indexOf('\\'') === 0) {\n blockQuoteRegExp = part.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n openingQuote = part.indexOf('\"') === 0 ? '\"' : '\\'';\n // Plain String\n if (part.match(blockQuoteRegExp).length === 2) {\n // One word string\n slices.push(part);\n } else {\n // Find closed Index\n shiftIndex = 0;\n for (j = i + 1; j < helperParts.length; j += 1) {\n part += \" \" + (helperParts[j]);\n if (helperParts[j].indexOf(openingQuote) >= 0) {\n shiftIndex = j;\n slices.push(part);\n break;\n }\n }\n if (shiftIndex) { i = shiftIndex; }\n }\n } else if (part.indexOf('=') > 0) {\n // Hash\n var hashParts = part.split('=');\n var hashName = hashParts[0];\n var hashContent = hashParts[1];\n if (!blockQuoteRegExp) {\n blockQuoteRegExp = hashContent.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n openingQuote = hashContent.indexOf('\"') === 0 ? '\"' : '\\'';\n }\n if (hashContent.match(blockQuoteRegExp).length !== 2) {\n shiftIndex = 0;\n for (j = i + 1; j < helperParts.length; j += 1) {\n hashContent += \" \" + (helperParts[j]);\n if (helperParts[j].indexOf(openingQuote) >= 0) {\n shiftIndex = j;\n break;\n }\n }\n if (shiftIndex) { i = shiftIndex; }\n }\n var hash = [hashName, hashContent.replace(blockQuoteRegExp, '')];\n slices.push(hash);\n } else {\n // Plain variable\n slices.push(part);\n }\n }\n return slices;\n}\nfunction stringToBlocks(string) {\n var blocks = [];\n var i;\n var j;\n if (!string) { return []; }\n var stringBlocks = string.split(/({{[^{^}]*}})/);\n for (i = 0; i < stringBlocks.length; i += 1) {\n var block = stringBlocks[i];\n if (block === '') { continue; }\n if (block.indexOf('{{') < 0) {\n blocks.push({\n type: 'plain',\n content: block,\n });\n } else {\n if (block.indexOf('{/') >= 0) {\n continue;\n }\n if (block.indexOf('{#') < 0 && block.indexOf(' ') < 0 && block.indexOf('else') < 0) {\n // Simple variable\n blocks.push({\n type: 'variable',\n contextName: block.replace(/[{}]/g, ''),\n });\n continue;\n }\n // Helpers\n var helperSlices = helperToSlices(block);\n var helperName = helperSlices[0];\n var isPartial = helperName === '>';\n var helperContext = [];\n var helperHash = {};\n for (j = 1; j < helperSlices.length; j += 1) {\n var slice = helperSlices[j];\n if (isArray(slice)) {\n // Hash\n helperHash[slice[0]] = slice[1] === 'false' ? false : slice[1];\n } else {\n helperContext.push(slice);\n }\n }\n\n if (block.indexOf('{#') >= 0) {\n // Condition/Helper\n var helperContent = '';\n var elseContent = '';\n var toSkip = 0;\n var shiftIndex = (void 0);\n var foundClosed = false;\n var foundElse = false;\n var depth = 0;\n for (j = i + 1; j < stringBlocks.length; j += 1) {\n if (stringBlocks[j].indexOf('{{#') >= 0) {\n depth += 1;\n }\n if (stringBlocks[j].indexOf('{{/') >= 0) {\n depth -= 1;\n }\n if (stringBlocks[j].indexOf((\"{{#\" + helperName)) >= 0) {\n helperContent += stringBlocks[j];\n if (foundElse) { elseContent += stringBlocks[j]; }\n toSkip += 1;\n } else if (stringBlocks[j].indexOf((\"{{/\" + helperName)) >= 0) {\n if (toSkip > 0) {\n toSkip -= 1;\n helperContent += stringBlocks[j];\n if (foundElse) { elseContent += stringBlocks[j]; }\n } else {\n shiftIndex = j;\n foundClosed = true;\n break;\n }\n } else if (stringBlocks[j].indexOf('else') >= 0 && depth === 0) {\n foundElse = true;\n } else {\n if (!foundElse) { helperContent += stringBlocks[j]; }\n if (foundElse) { elseContent += stringBlocks[j]; }\n }\n }\n if (foundClosed) {\n if (shiftIndex) { i = shiftIndex; }\n blocks.push({\n type: 'helper',\n helperName: helperName,\n contextName: helperContext,\n content: helperContent,\n inverseContent: elseContent,\n hash: helperHash,\n });\n }\n } else if (block.indexOf(' ') > 0) {\n if (isPartial) {\n helperName = '_partial';\n if (helperContext[0]) { helperContext[0] = \"\\\"\" + (helperContext[0].replace(/\"|'/g, '')) + \"\\\"\"; }\n }\n blocks.push({\n type: 'helper',\n helperName: helperName,\n contextName: helperContext,\n hash: helperHash,\n });\n }\n }\n }\n return blocks;\n}\nvar Template7 = function Template7(template) {\n var t = this;\n t.template = template;\n\n function getCompileVar(name, ctx) {\n var variable = ctx;\n var parts;\n var levelsUp = 0;\n if (name.indexOf('../') === 0) {\n var newDepth = variable.split('_')[1] - levelsUp;\n levelsUp = name.split('../').length - 1;\n variable = \"ctx_\" + (newDepth >= 1 ? newDepth : 1);\n parts = name.split('../')[levelsUp].split('.');\n } else if (name.indexOf('@global') === 0) {\n variable = 'Template7.global';\n parts = name.split('@global.')[1].split('.');\n } else if (name.indexOf('@root') === 0) {\n variable = 'root';\n parts = name.split('@root.')[1].split('.');\n } else {\n parts = name.split('.');\n }\n for (var i = 0; i < parts.length; i += 1) {\n var part = parts[i];\n if (part.indexOf('@') === 0) {\n if (i > 0) {\n variable += \"[(data && data.\" + (part.replace('@', '')) + \")]\";\n } else {\n variable = \"(data && data.\" + (name.replace('@', '')) + \")\";\n }\n } else if (isFinite(part)) {\n variable += \"[\" + part + \"]\";\n } else if (part === 'this' || part.indexOf('this.') >= 0 || part.indexOf('this[') >= 0 || part.indexOf('this(') >= 0) {\n variable = part.replace('this', ctx);\n } else {\n variable += \".\" + part;\n }\n }\n\n return variable;\n }\n function getCompiledArguments(contextArray, ctx) {\n var arr = [];\n for (var i = 0; i < contextArray.length; i += 1) {\n if (/^['\"]/.test(contextArray[i])) { arr.push(contextArray[i]); }\n else if (/^(true|false|\\d+)$/.test(contextArray[i])) { arr.push(contextArray[i]); }\n else {\n arr.push(getCompileVar(contextArray[i], ctx));\n }\n }\n\n return arr.join(', ');\n }\n function compile(template, depth) {\n if ( template === void 0 ) template = t.template;\n if ( depth === void 0 ) depth = 1;\n\n if (typeof template !== 'string') {\n throw new Error('Template7: Template must be a string');\n }\n var blocks = stringToBlocks(template);\n var ctx = \"ctx_\" + depth;\n if (blocks.length === 0) {\n return function empty() { return ''; };\n }\n\n function getCompileFn(block, newDepth) {\n if (block.content) { return compile(block.content, newDepth); }\n return function empty() { return ''; };\n }\n function getCompileInverse(block, newDepth) {\n if (block.inverseContent) { return compile(block.inverseContent, newDepth); }\n return function empty() { return ''; };\n }\n\n var resultString = '';\n if (depth === 1) {\n resultString += \"(function (\" + ctx + \", data, root) {\\n\";\n } else {\n resultString += \"(function (\" + ctx + \", data) {\\n\";\n }\n if (depth === 1) {\n resultString += 'function isArray(arr){return Object.prototype.toString.apply(arr) === \\'[object Array]\\';}\\n';\n resultString += 'function isFunction(func){return (typeof func === \\'function\\');}\\n';\n resultString += 'function c(val, ctx) {if (typeof val !== \"undefined\" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return \"\";}\\n';\n resultString += 'root = root || ctx_1 || {};\\n';\n }\n resultString += 'var r = \\'\\';\\n';\n var i;\n for (i = 0; i < blocks.length; i += 1) {\n var block = blocks[i];\n // Plain block\n if (block.type === 'plain') {\n resultString += \"r +='\" + ((block.content).replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\' + '\\'')) + \"';\";\n continue;\n }\n var variable = (void 0);\n var compiledArguments = (void 0);\n // Variable block\n if (block.type === 'variable') {\n variable = getCompileVar(block.contextName, ctx);\n resultString += \"r += c(\" + variable + \", \" + ctx + \");\";\n }\n // Helpers block\n if (block.type === 'helper') {\n if (block.helperName in t.helpers) {\n compiledArguments = getCompiledArguments(block.contextName, ctx);\n\n resultString += \"r += (Template7.helpers.\" + (block.helperName) + \").call(\" + ctx + \", \" + (compiledArguments && ((compiledArguments + \", \"))) + \"{hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n } else if (block.contextName.length > 0) {\n throw new Error((\"Template7: Missing helper: \\\"\" + (block.helperName) + \"\\\"\"));\n } else {\n variable = getCompileVar(block.helperName, ctx);\n resultString += \"if (\" + variable + \") {\";\n resultString += \"if (isArray(\" + variable + \")) {\";\n resultString += \"r += (Template7.helpers.each).call(\" + ctx + \", \" + variable + \", {hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n resultString += '}else {';\n resultString += \"r += (Template7.helpers.with).call(\" + ctx + \", \" + variable + \", {hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n resultString += '}}';\n }\n }\n }\n resultString += '\\nreturn r;})';\n return eval.call(template7Context, resultString);\n }\n t.compile = function _compile(template) {\n if (!t.compiled) {\n t.compiled = compile(template);\n }\n return t.compiled;\n };\n};\n\nTemplate7.prototype = {\n options: {},\n partials: {},\n helpers: {\n _partial: function _partial(partialName, options) {\n var p = Template7.prototype.partials[partialName];\n if (!p || (p && !p.template)) { return ''; }\n if (!p.compiled) {\n p.compiled = new Template7(p.template).compile();\n }\n var ctx = this;\n for (var hashName in options.hash) {\n ctx[hashName] = options.hash[hashName];\n }\n return p.compiled(ctx, options.data, options.root);\n },\n escape: function escape$1(context, options) {\n if (typeof context !== 'string') {\n throw new Error('Template7: Passed context to \"escape\" helper should be a string');\n }\n return escape(context);\n },\n if: function if$1(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (ctx) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n unless: function unless(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (!ctx) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n each: function each(context, options) {\n var ctx = context;\n var ret = '';\n var i = 0;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (isArray(ctx)) {\n if (options.hash.reverse) {\n ctx = ctx.reverse();\n }\n for (i = 0; i < ctx.length; i += 1) {\n ret += options.fn(ctx[i], { first: i === 0, last: i === ctx.length - 1, index: i });\n }\n if (options.hash.reverse) {\n ctx = ctx.reverse();\n }\n } else {\n for (var key in ctx) {\n i += 1;\n ret += options.fn(ctx[key], { key: key });\n }\n }\n if (i > 0) { return ret; }\n return options.inverse(this);\n },\n with: function with$1(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = context.call(this); }\n return options.fn(ctx);\n },\n join: function join(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n return ctx.join(options.hash.delimiter || options.hash.delimeter);\n },\n js: function js(expression, options) {\n var func;\n if (expression.indexOf('return') >= 0) {\n func = \"(function(){\" + expression + \"})\";\n } else {\n func = \"(function(){return (\" + expression + \")})\";\n }\n return eval.call(this, func).call(this);\n },\n js_compare: function js_compare(expression, options) {\n var func;\n if (expression.indexOf('return') >= 0) {\n func = \"(function(){\" + expression + \"})\";\n } else {\n func = \"(function(){return (\" + expression + \")})\";\n }\n var condition = eval.call(this, func).call(this);\n if (condition) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n },\n};\nfunction t7(template, data) {\n if (arguments.length === 2) {\n var instance = new Template7(template);\n var rendered = instance.compile()(data);\n instance = null;\n return (rendered);\n }\n return new Template7(template);\n}\nt7.registerHelper = function registerHelper(name, fn) {\n Template7.prototype.helpers[name] = fn;\n};\nt7.unregisterHelper = function unregisterHelper(name) {\n Template7.prototype.helpers[name] = undefined;\n delete Template7.prototype.helpers[name];\n};\nt7.registerPartial = function registerPartial(name, template) {\n Template7.prototype.partials[name] = { template: template };\n};\nt7.unregisterPartial = function unregisterPartial(name) {\n if (Template7.prototype.partials[name]) {\n Template7.prototype.partials[name] = undefined;\n delete Template7.prototype.partials[name];\n }\n};\nt7.compile = function compile(template, options) {\n var instance = new Template7(template, options);\n return instance.compile();\n};\n\nt7.options = Template7.prototype.options;\nt7.helpers = Template7.prototype.helpers;\nt7.partials = Template7.prototype.partials;\n\nreturn t7;\n\n}());\n","(function () {\n"," 'use strict';\n /*===========================\n Framework 7\n ===========================*/\n window.Framework7 = function (params) {\n // App\n var app = this;\n \n // Version\n app.version = '1.6.0';\n \n // Default Parameters\n app.params = {\n //\n root: 'body',\n //\n cache: true,\n cacheIgnore: [],\n cacheIgnoreGetParameters: false,\n cacheDuration: 1000 * 60 * 10, // Ten minutes\n preloadPreviousPage: true,\n uniqueHistory: false,\n uniqueHistoryIgnoreGetParameters: false,\n dynamicPageUrl: 'content-{{index}}',\n allowDuplicateUrls: false,\n router: true,\n routerRemoveTimeout: false,\n routerRemoveWithTimeout: false,\n // Push State\n pushState: false,\n pushStateRoot: undefined,\n pushStateNoAnimation: false,\n pushStateSeparator: '#!/',\n pushStateOnLoad: true,\n // Fast clicks\n fastClicks: true,\n fastClicksDistanceThreshold: 10,\n fastClicksDelayBetweenClicks: 50,\n fastClicksExclude: '', // CSS selector\n // Tap Hold\n tapHold: false,\n tapHoldDelay: 750,\n tapHoldPreventClicks: true,\n // Active State\n activeState: true,\n activeStateElements: 'a, button, label, span',\n // Animate Nav Back Icon\n animateNavBackIcon: false,\n // Swipe Back\n swipeBackPage: true,\n swipeBackPageThreshold: 0,\n swipeBackPageActiveArea: 30,\n swipeBackPageAnimateShadow: true,\n swipeBackPageAnimateOpacity: true,\n // Ajax\n ajaxLinks: undefined, // or CSS selector\n // External Links\n externalLinks: '.external', // CSS selector\n // Sortable\n sortable: true,\n // Scroll toolbars\n hideNavbarOnPageScroll: false,\n hideToolbarOnPageScroll: false,\n hideTabbarOnPageScroll: false,\n showBarsOnPageScrollEnd: true,\n showBarsOnPageScrollTop: true,\n // Swipeout\n swipeout: true,\n swipeoutActionsNoFold: false,\n swipeoutNoFollow: false,\n swipeoutRemoveWithTimeout: false,\n // Smart Select Back link template\n smartSelectOpenIn: 'page', // or 'popup' or 'picker'\n smartSelectBackText: 'Back',\n smartSelectPopupCloseText: 'Close',\n smartSelectPickerCloseText: 'Done',\n smartSelectSearchbar: false,\n smartSelectBackOnSelect: false,\n // Tap Navbar or Statusbar to scroll to top\n scrollTopOnNavbarClick: false,\n scrollTopOnStatusbarClick: false,\n // Panels\n panelLeftBreakpoint: null,\n panelRightBreakpoint: null,\n swipePanel: false, // or 'left' or 'right'\n swipePanelActiveArea: 0,\n swipePanelCloseOpposite: true,\n swipePanelOnlyClose: false,\n swipePanelNoFollow: false,\n swipePanelThreshold: 0,\n panelsCloseByOutside: true,\n // Modals\n modalButtonOk: 'OK',\n modalButtonCancel: 'Cancel',\n modalUsernamePlaceholder: 'Username',\n modalPasswordPlaceholder: 'Password',\n modalTitle: 'Framework7',\n modalCloseByOutside: false,\n actionsCloseByOutside: true,\n popupCloseByOutside: true,\n popoverCloseByOutside: true,\n modalPreloaderTitle: 'Loading... ',\n modalStack: true,\n modalsMoveToRoot: true,\n // Lazy Load\n imagesLazyLoadThreshold: 0,\n imagesLazyLoadSequential: true,\n // Name space\n viewClass: 'view',\n viewMainClass: 'view-main',\n viewsClass: 'views',\n // Notifications defaults\n notificationCloseOnClick: false,\n notificationCloseIcon: true,\n notificationCloseButtonText: 'Close',\n // Animate Pages\n animatePages: true,\n // Template7\n templates: {},\n template7Data: {},\n template7Pages: false,\n precompileTemplates: false,\n // Material\n material: false,\n materialPageLoadDelay: 0,\n materialPreloaderSvg: '',\n materialPreloaderHtml:\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '',\n materialRipple: true,\n materialRippleElements: '.ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a, .form-checkbox, .form-radio, .data-table .sortable-cell',\n // Auto init\n init: true,\n };\n \n // Extend defaults with parameters\n for (var param in params) {\n app.params[param] = params[param];\n }\n \n // DOM lib\n var $ = Dom7;\n \n // Template7 lib\n var t7 = Template7;\n app._compiledTemplates = {};\n \n // App Root\n app.root = $(app.params.root);\n app.root.eq(0).addClass('framework7-root');\n \n // Touch events\n app.touchEvents = {\n start: app.support.touch ? 'touchstart' : 'mousedown',\n move: app.support.touch ? 'touchmove' : 'mousemove',\n end: app.support.touch ? 'touchend' : 'mouseup'\n };\n \n // Link to local storage\n app.ls = window.localStorage;\n \n // RTL\n app.rtl = $('body').css('direction') === 'rtl';\n if (app.rtl) $('html').attr('dir', 'rtl');\n \n // Overwrite statusbar overlay\n if (typeof app.params.statusbarOverlay !== 'undefined') {\n if (app.params.statusbarOverlay) $('html').addClass('with-statusbar-overlay');\n else $('html').removeClass('with-statusbar-overlay');\n }\n else if (app.device.ios && (window.cordova || window.phonegap)) {\n $(document).on('resume', function () {\n if (app.device.needsStatusBar()) {\n $('html').addClass('with-statusbar-overlay');\n }\n }, false);\n }\n \n"," /*======================================================\n ************ Views ************\n ======================================================*/\n app.views = [];\n var View = function (selector, params) {\n var defaults = {\n dynamicNavbar: false,\n domCache: false,\n linksView: undefined,\n reloadPages: false,\n uniqueHistory: app.params.uniqueHistory,\n uniqueHistoryIgnoreGetParameters: app.params.uniqueHistoryIgnoreGetParameters,\n allowDuplicateUrls: app.params.allowDuplicateUrls,\n swipeBackPage: app.params.swipeBackPage,\n swipeBackPageAnimateShadow: app.params.swipeBackPageAnimateShadow,\n swipeBackPageAnimateOpacity: app.params.swipeBackPageAnimateOpacity,\n swipeBackPageActiveArea: app.params.swipeBackPageActiveArea,\n swipeBackPageThreshold: app.params.swipeBackPageThreshold,\n animatePages: app.params.animatePages,\n preloadPreviousPage: app.params.preloadPreviousPage\n };\n var i;\n \n // Params\n params = params || {};\n \n // Disable dynamic navbar for material theme\n if (params.dynamicNavbar && app.params.material) params.dynamicNavbar = false;\n \n // Extend params with defaults\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n // View\n var view = this;\n view.params = params;\n \n // Selector\n view.selector = selector;\n \n // Container\n var container = $(selector);\n view.container = container[0];\n \n // Fix Selector\n \n if (typeof selector !== 'string') {\n // Supposed to be HTMLElement or Dom7\n selector = (container.attr('id') ? '#' + container.attr('id') : '') + (container.attr('class') ? '.' + container.attr('class').replace(/ /g, '.').replace('.active', '') : '');\n view.selector = selector;\n }\n \n // Is main\n view.main = container.hasClass(app.params.viewMainClass);\n \n // Content cache\n view.contentCache = {};\n \n // Context cache\n view.contextCache = {};\n \n // Pages cache\n view.pagesCache = {};\n view.pageElementsCache = {};\n \n // Store View in element for easy access\n container[0].f7View = view;\n \n // Pages\n view.pagesContainer = container.find('.pages')[0];\n view.initialPages = [];\n view.initialPagesUrl = [];\n view.initialNavbars = [];\n if (view.params.domCache) {\n var initialPages = container.find('.page');\n for (i = 0; i < initialPages.length; i++) {\n view.initialPages.push(initialPages[i]);\n view.initialPagesUrl.push('#' + initialPages.eq(i).attr('data-page'));\n }\n if (view.params.dynamicNavbar) {\n var initialNavbars = container.find('.navbar-inner');\n for (i = 0; i < initialNavbars.length; i++) {\n view.initialNavbars.push(initialNavbars[i]);\n }\n }\n \n }\n \n view.allowPageChange = true;\n \n // Location\n var docLocation = document.location.href;\n \n // History\n view.history = [];\n var viewURL = docLocation;\n var pushStateSeparator = app.params.pushStateSeparator;\n var pushStateRoot = app.params.pushStateRoot;\n if (app.params.pushState && view.main) {\n if (pushStateRoot) {\n viewURL = pushStateRoot;\n }\n else {\n if (pushStateSeparator && viewURL.indexOf(pushStateSeparator) >= 0 && viewURL.indexOf(pushStateSeparator + '#') < 0) viewURL = viewURL.split(pushStateSeparator)[0];\n }\n \n }\n \n // Active Page\n var currentPage, currentPageData;\n if (!view.activePage) {\n currentPage = $(view.pagesContainer).find('.page-on-center');\n if (currentPage.length === 0) {\n currentPage = $(view.pagesContainer).find('.page:not(.cached)');\n currentPage = currentPage.eq(currentPage.length - 1);\n }\n if (currentPage.length > 0) {\n currentPageData = currentPage[0].f7PageData;\n }\n }\n \n // View startup URL\n if (view.params.domCache && currentPage) {\n view.url = container.attr('data-url') || view.params.url || '#' + currentPage.attr('data-page');\n view.pagesCache[view.url] = currentPage.attr('data-page');\n }\n else view.url = container.attr('data-url') || view.params.url || viewURL;\n \n // Update current page Data\n if (currentPageData) {\n currentPageData.view = view;\n currentPageData.url = view.url;\n if (view.params.domCache && view.params.dynamicNavbar && !currentPageData.navbarInnerContainer) {\n currentPageData.navbarInnerContainer = view.initialNavbars[view.initialPages.indexOf(currentPageData.container)];\n }\n view.activePage = currentPageData;\n currentPage[0].f7PageData = currentPageData;\n }\n \n // Store to history main view's url\n if (view.url) {\n view.history.push(view.url);\n }\n \n // Touch events\n var isTouched = false,\n isMoved = false,\n touchesStart = {},\n isScrolling,\n activePage = [],\n previousPage = [],\n viewContainerWidth,\n touchesDiff,\n allowViewTouchMove = true,\n touchStartTime,\n activeNavbar = [],\n previousNavbar = [],\n activeNavElements,\n previousNavElements,\n activeNavBackIcon,\n previousNavBackIcon,\n dynamicNavbar,\n pageShadow,\n pageOpacity,\n el;\n \n view.handleTouchStart = function (e) {\n if (!allowViewTouchMove || !view.params.swipeBackPage || isTouched || app.swipeoutOpenedEl || !view.allowPageChange) return;\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n dynamicNavbar = view.params.dynamicNavbar && container.find('.navbar-inner').length > 1;\n };\n \n view.handleTouchMove = function (e) {\n if (!isTouched) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) {\n isTouched = false;\n return;\n }\n if (!isMoved) {\n var cancel = false;\n // Calc values during first move fired\n viewContainerWidth = container.width();\n var target = $(e.target);\n var swipeout = target.hasClass('swipeout') ? target : target.parents('.swipeout');\n if (swipeout.length > 0) {\n if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true;\n if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true;\n }\n activePage = target.is('.page') ? target : target.parents('.page');\n if (activePage.hasClass('no-swipeback')) cancel = true;\n previousPage = container.find('.page-on-left:not(.cached)');\n var notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea;\n if (app.rtl) {\n notFromBorder = touchesStart.x < container.offset().left - container[0].scrollLeft + viewContainerWidth - view.params.swipeBackPageActiveArea;\n }\n else {\n notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea;\n }\n if (notFromBorder) cancel = true;\n if (previousPage.length === 0 || activePage.length === 0) cancel = true;\n if (cancel) {\n isTouched = false;\n return;\n }\n \n if (view.params.swipeBackPageAnimateShadow && !app.device.android) {\n pageShadow = activePage.find('.swipeback-page-shadow');\n if (pageShadow.length === 0) {\n pageShadow = $('
');\n activePage.append(pageShadow);\n }\n }\n if (view.params.swipeBackPageAnimateOpacity) {\n pageOpacity = previousPage.find('.swipeback-page-opacity');\n if (pageOpacity.length === 0) {\n pageOpacity = $('
');\n previousPage.append(pageOpacity);\n }\n }\n \n if (dynamicNavbar) {\n activeNavbar = container.find('.navbar-on-center:not(.cached)');\n previousNavbar = container.find('.navbar-on-left:not(.cached)');\n activeNavElements = activeNavbar.find('.left, .center, .right, .subnavbar, .fading');\n previousNavElements = previousNavbar.find('.left, .center, .right, .subnavbar, .fading');\n if (app.params.animateNavBackIcon) {\n activeNavBackIcon = activeNavbar.find('.left.sliding .back .icon');\n previousNavBackIcon = previousNavbar.find('.left.sliding .back .icon');\n }\n }\n \n // Close/Hide Any Picker\n if ($('.picker-modal.modal-in').length > 0) {\n app.closeModal($('.picker-modal.modal-in'));\n }\n }\n e.f7PreventPanelSwipe = true;\n isMoved = true;\n e.preventDefault();\n \n // RTL inverter\n var inverter = app.rtl ? -1 : 1;\n \n // Touches diff\n touchesDiff = (pageX - touchesStart.x - view.params.swipeBackPageThreshold) * inverter;\n if (touchesDiff < 0) touchesDiff = 0;\n var percentage = touchesDiff / viewContainerWidth;\n \n // Swipe Back Callback\n var callbackData = {\n percentage: percentage,\n activePage: activePage[0],\n previousPage: previousPage[0],\n activeNavbar: activeNavbar[0],\n previousNavbar: previousNavbar[0]\n };\n if (view.params.onSwipeBackMove) {\n view.params.onSwipeBackMove(callbackData);\n }\n container.trigger('swipeBackMove swipeback:move', callbackData);\n \n // Transform pages\n var activePageTranslate = touchesDiff * inverter;\n var previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter;\n if (app.device.pixelRatio === 1) {\n activePageTranslate = Math.round(activePageTranslate);\n previousPageTranslate = Math.round(previousPageTranslate);\n }\n \n activePage.transform('translate3d(' + activePageTranslate + 'px,0,0)');\n if (view.params.swipeBackPageAnimateShadow && !app.device.android) pageShadow[0].style.opacity = 1 - 1 * percentage;\n \n previousPage.transform('translate3d(' + previousPageTranslate + 'px,0,0)');\n if (view.params.swipeBackPageAnimateOpacity) pageOpacity[0].style.opacity = 1 - 1 * percentage;\n \n // Dynamic Navbars Animation\n if (dynamicNavbar) {\n var i;\n for (i = 0; i < activeNavElements.length; i++) {\n el = $(activeNavElements[i]);\n if (!el.is('.subnavbar.sliding')) el[0].style.opacity = (1 - percentage * 1.3);\n if (el[0].className.indexOf('sliding') >= 0) {\n var activeNavTranslate = percentage * el[0].f7NavbarRightOffset;\n if (app.device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate);\n el.transform('translate3d(' + activeNavTranslate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (el[0].className.indexOf('left') >= 0 && activeNavBackIcon.length > 0) {\n activeNavBackIcon.transform('translate3d(' + -activeNavTranslate + 'px,0,0)');\n }\n }\n }\n }\n for (i = 0; i < previousNavElements.length; i++) {\n el = $(previousNavElements[i]);\n if (!el.is('.subnavbar.sliding')) el[0].style.opacity = percentage * 1.3 - 0.3;\n if (el[0].className.indexOf('sliding') >= 0) {\n var previousNavTranslate = el[0].f7NavbarLeftOffset * (1 - percentage);\n if (app.device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate);\n el.transform('translate3d(' + previousNavTranslate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (el[0].className.indexOf('left') >= 0 && previousNavBackIcon.length > 0) {\n previousNavBackIcon.transform('translate3d(' + -previousNavTranslate + 'px,0,0)');\n }\n }\n }\n }\n }\n };\n \n view.handleTouchEnd = function (e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n isTouched = false;\n isMoved = false;\n if (touchesDiff === 0) {\n $([activePage[0], previousPage[0]]).transform('');\n if (dynamicNavbar) {\n activeNavElements.transform('').css({opacity: ''});\n previousNavElements.transform('').css({opacity: ''});\n if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.transform('');\n if (previousNavBackIcon && activeNavBackIcon.length > 0) previousNavBackIcon.transform('');\n }\n return;\n }\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var pageChanged = false;\n // Swipe back to previous page\n if (\n timeDiff < 300 && touchesDiff > 10 ||\n timeDiff >= 300 && touchesDiff > viewContainerWidth / 2\n ) {\n activePage.removeClass('page-on-center').addClass('page-on-right');\n previousPage.removeClass('page-on-left').addClass('page-on-center');\n if (dynamicNavbar) {\n activeNavbar.removeClass('navbar-on-center').addClass('navbar-on-right');\n previousNavbar.removeClass('navbar-on-left').addClass('navbar-on-center');\n }\n pageChanged = true;\n }\n // Reset custom styles\n // Add transitioning class for transition-duration\n $([activePage[0], previousPage[0]]).transform('').addClass('page-transitioning');\n if (dynamicNavbar) {\n activeNavElements.css({opacity: ''})\n .each(function () {\n var translate = pageChanged ? this.f7NavbarRightOffset : 0;\n var sliding = $(this);\n sliding.transform('translate3d(' + translate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && activeNavBackIcon.length > 0) {\n activeNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)');\n }\n }\n \n }).addClass('page-transitioning');\n \n previousNavElements.transform('').css({opacity: ''}).each(function () {\n var translate = pageChanged ? 0 : this.f7NavbarLeftOffset;\n var sliding = $(this);\n sliding.transform('translate3d(' + translate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && previousNavBackIcon.length > 0) {\n previousNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)');\n }\n }\n }).addClass('page-transitioning');\n }\n allowViewTouchMove = false;\n view.allowPageChange = false;\n // Swipe Back Callback\n var callbackData = {\n activePage: activePage[0],\n previousPage: previousPage[0],\n activeNavbar: activeNavbar[0],\n previousNavbar: previousNavbar[0]\n };\n if (pageChanged) {\n // Update View's URL\n var url = view.history[view.history.length - 2];\n view.url = url;\n \n // Page before animation callback\n app.pageBackCallback('before', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.pageAnimCallback('before', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true});\n \n if (view.params.onSwipeBackBeforeChange) {\n view.params.onSwipeBackBeforeChange(callbackData);\n }\n container.trigger('swipeBackBeforeChange swipeback:beforechange', callbackData);\n }\n else {\n if (view.params.onSwipeBackBeforeReset) {\n view.params.onSwipeBackBeforeReset(callbackData);\n }\n container.trigger('swipeBackBeforeReset swipeback:beforereset', callbackData);\n }\n \n activePage.transitionEnd(function () {\n $([activePage[0], previousPage[0]]).removeClass('page-transitioning');\n if (dynamicNavbar) {\n activeNavElements.removeClass('page-transitioning').css({opacity: ''});\n previousNavElements.removeClass('page-transitioning').css({opacity: ''});\n if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.removeClass('page-transitioning');\n if (previousNavBackIcon && previousNavBackIcon.length > 0) previousNavBackIcon.removeClass('page-transitioning');\n }\n allowViewTouchMove = true;\n view.allowPageChange = true;\n if (pageChanged) {\n if (app.params.pushState && view.main) history.back();\n // Page after animation callback\n app.pageBackCallback('after', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.pageAnimCallback('after', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.router.afterBack(view, activePage, previousPage);\n \n if (view.params.onSwipeBackAfterChange) {\n view.params.onSwipeBackAfterChange(callbackData);\n }\n container.trigger('swipeBackAfterChange swipeback:afterchange', callbackData);\n }\n else {\n if (view.params.onSwipeBackAfterReset) {\n view.params.onSwipeBackAfterReset(callbackData);\n }\n container.trigger('swipeBackAfterReset swipeback:afterreset', callbackData);\n }\n if (pageShadow && pageShadow.length > 0) pageShadow.remove();\n if (pageOpacity && pageOpacity.length > 0) pageOpacity.remove();\n });\n };\n view.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n container[action](app.touchEvents.start, view.handleTouchStart, passiveListener);\n container[action](app.touchEvents.move, view.handleTouchMove, activeListener);\n container[action](app.touchEvents.end, view.handleTouchEnd, passiveListener);\n };\n view.detachEvents = function () {\n view.attachEvents(true);\n };\n \n // Init\n if (view.params.swipeBackPage && !app.params.material) {\n view.attachEvents();\n }\n \n // Check view name to delete unwanted characters\n if (view.params.name) view.params.name = view.params.name.replace(/[^a-zA-Z]/g, '');\n \n // Add view to app\n app.views.push(view);\n if (view.main) {\n app.mainView = view;\n app.views.main = view;\n }\n else if(view.params.name) {\n app[view.params.name + 'View'] = view;\n app.views[view.params.name] = view;\n }\n \n // Router\n view.router = {\n load: function (options) {\n return app.router.load(view, options);\n },\n back: function (options) {\n return app.router.back(view, options);\n },\n // Shortcuts\n loadPage: function (options) {\n options = options || {};\n if (typeof options === 'string') {\n var url = options;\n options = {};\n if (url && url.indexOf('#') === 0 && view.params.domCache) {\n options.pageName = url.split('#')[1];\n }\n else options.url = url;\n }\n return app.router.load(view, options);\n },\n loadContent: function (content) {\n return app.router.load(view, {content: content});\n },\n reloadPage: function (url) {\n return app.router.load(view, {url: url, reload: true});\n },\n reloadContent: function (content) {\n return app.router.load(view, {content: content, reload: true});\n },\n reloadPreviousPage: function (url) {\n return app.router.load(view, {url: url, reloadPrevious: true, reload: true});\n },\n reloadPreviousContent: function (content) {\n return app.router.load(view, {content: content, reloadPrevious: true, reload: true});\n },\n refreshPage: function () {\n var options = {\n url: view.url,\n reload: true,\n ignoreCache: true\n };\n if (options.url && options.url.indexOf('#') === 0) {\n if (view.params.domCache && view.pagesCache[options.url]) {\n options.pageName = view.pagesCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n else if (view.contentCache[options.url]) {\n options.content = view.contentCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n }\n return app.router.load(view, options);\n },\n refreshPreviousPage: function () {\n var options = {\n url: view.history[view.history.length - 2],\n reload: true,\n reloadPrevious: true,\n ignoreCache: true\n };\n if (options.url && options.url.indexOf('#') === 0 && view.params.domCache && view.pagesCache[options.url]) {\n options.pageName = view.pagesCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n return app.router.load(view, options);\n }\n };\n \n // Aliases for temporary backward compatibility\n view.loadPage = view.router.loadPage;\n view.loadContent = view.router.loadContent;\n view.reloadPage = view.router.reloadPage;\n view.reloadContent = view.router.reloadContent;\n view.reloadPreviousPage = view.router.reloadPreviousPage;\n view.reloadPreviousContent = view.router.reloadPreviousContent;\n view.refreshPage = view.router.refreshPage;\n view.refreshPreviousPage = view.router.refreshPreviousPage;\n view.back = view.router.back;\n \n // Bars methods\n view.hideNavbar = function (animated) {\n return app.hideNavbar(container.find('.navbar'), animated);\n };\n view.showNavbar = function (animated) {\n return app.showNavbar(container.find('.navbar'), animated);\n };\n view.hideToolbar = function (animated) {\n return app.hideToolbar(container.find('.toolbar'), animated);\n };\n view.showToolbar = function (animated) {\n return app.showToolbar(container.find('.toolbar'), animated);\n };\n \n // Push State on load\n if (app.params.pushState && app.params.pushStateOnLoad && view.main) {\n var pushStateUrl;\n var pushStateUrlSplit = docLocation.split(pushStateSeparator)[1];\n if (pushStateRoot) {\n pushStateUrl = docLocation.split(app.params.pushStateRoot + pushStateSeparator)[1];\n }\n else if (pushStateSeparator && docLocation.indexOf(pushStateSeparator) >= 0 && docLocation.indexOf(pushStateSeparator + '#') < 0) {\n pushStateUrl = pushStateUrlSplit;\n }\n var pushStateAnimatePages = app.params.pushStateNoAnimation ? false : undefined;\n var historyState = history.state;\n if (pushStateUrl) {\n if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && historyState && historyState.pageName && 'viewIndex' in historyState) {\n app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && view.initialPagesUrl.indexOf(pushStateUrl) >= 0) {\n app.router.load(view, {pageName: pushStateUrl.replace('#',''), animatePages: pushStateAnimatePages, pushState: false});\n }\n else app.router.load(view, {url: pushStateUrl, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (view.params.domCache && docLocation.indexOf(pushStateSeparator + '#') >= 0) {\n if (historyState && historyState.pageName && 'viewIndex' in historyState) {\n app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (pushStateSeparator && pushStateUrlSplit.indexOf('#') === 0) {\n if (view.initialPagesUrl.indexOf(pushStateUrlSplit)) {\n app.router.load(view, {pageName: pushStateUrlSplit.replace('#', ''), animatePages: pushStateAnimatePages, pushState: false});\n }\n }\n }\n }\n \n // Destroy\n view.destroy = function () {\n view.detachEvents();\n if (view.main) {\n app.mainView = null;\n delete app.mainView;\n app.views.main = null;\n delete app.views.main;\n }\n else if(view.params.name) {\n app[view.params.name + 'View'] = null;\n delete app[view.params.name + 'View'];\n app.views[view.params.name] = null;\n delete app.views[view.params.name];\n }\n container.removeAttr('data-page');\n container[0].f7View = null;\n delete container[0].f7View;\n \n app.views.splice(app.views.indexOf(view), 1);\n \n // Delete props & methods\n for (var prop in view) {\n if (view.hasOwnProperty(prop)) {\n view[prop] = null;\n delete view[prop];\n }\n }\n view = null;\n };\n \n // Plugin hook\n app.pluginHook('addView', view);\n \n // Return view\n return view;\n };\n \n app.addView = function (selector, params) {\n return new View(selector, params);\n };\n \n app.getCurrentView = function (index) {\n var popoverView = $('.popover.modal-in .view');\n var popupView = $('.popup.modal-in .view');\n var panelView = $('.panel.active .view');\n var appViews = $('.views');\n // Find active view as tab\n var appView = appViews.children('.view');\n // Propably in tabs or split view\n if (appView.length > 1) {\n if (appView.hasClass('tab')) {\n // Tabs\n appView = appViews.children('.view.active');\n }\n else {\n // Split View, leave appView intact\n }\n }\n if (popoverView.length > 0 && popoverView[0].f7View) return popoverView[0].f7View;\n if (popupView.length > 0 && popupView[0].f7View) return popupView[0].f7View;\n if (panelView.length > 0 && panelView[0].f7View) return panelView[0].f7View;\n if (appView.length > 0) {\n if (appView.length === 1 && appView[0].f7View) return appView[0].f7View;\n if (appView.length > 1) {\n var currentViews = [];\n for (var i = 0; i < appView.length; i++) {\n if (appView[i].f7View) currentViews.push(appView[i].f7View);\n }\n if (currentViews.length > 0 && typeof index !== 'undefined') return currentViews[index];\n if (currentViews.length > 1) return currentViews;\n if (currentViews.length === 1) return currentViews[0];\n return undefined;\n }\n }\n return undefined;\n };\n \n"," /*======================================================\n ************ Navbars && Toolbars ************\n ======================================================*/\n // On Navbar Init Callback\n app.navbarInitCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) {\n if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0];\n if (!navbarInnerContainer || navbarInnerContainer.f7NavbarInitialized && view && !view.params.domCache) return;\n var navbarData = {\n container: navbarContainer,\n innerContainer: navbarInnerContainer\n };\n var pageData = pageContainer && pageContainer.f7PageData;\n \n var eventData = {\n page: pageData,\n navbar: navbarData\n };\n \n if (navbarInnerContainer.f7NavbarInitialized && ((view && view.params.domCache) || (!view && $(navbarContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) {\n // Reinit Navbar\n app.reinitNavbar(navbarContainer, navbarInnerContainer);\n \n // Plugin hook\n app.pluginHook('navbarReinit', eventData);\n \n // Event\n $(navbarInnerContainer).trigger('navbarReinit navbar:reinit', eventData);\n return;\n }\n navbarInnerContainer.f7NavbarInitialized = true;\n // Before Init\n app.pluginHook('navbarBeforeInit', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarBeforeInit navbar:beforeinit', eventData);\n \n // Initialize Navbar\n app.initNavbar(navbarContainer, navbarInnerContainer);\n \n // On init\n app.pluginHook('navbarInit', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarInit navbar:init', eventData);\n };\n // Navbar Remove Callback\n app.navbarRemoveCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) {\n if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0];\n var navbarData = {\n container: navbarContainer,\n innerContainer: navbarInnerContainer\n };\n var pageData;\n if (pageContainer) {\n pageData = pageContainer.f7PageData;\n }\n \n var eventData = {\n page: pageData,\n navbar: navbarData\n };\n app.pluginHook('navbarBeforeRemove', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarBeforeRemove navbar:beforeremove', eventData);\n navbarData = null;\n pageData = null;\n };\n app.initNavbar = function (navbarContainer, navbarInnerContainer) {\n // Init Subnavbar Searchbar\n if (app.initSearchbar) app.initSearchbar(navbarInnerContainer);\n };\n app.reinitNavbar = function (navbarContainer, navbarInnerContainer) {\n // Re init navbar methods\n };\n app.initNavbarWithCallback = function (navbarContainer) {\n navbarContainer = $(navbarContainer);\n var viewContainer = navbarContainer.parents('.' + app.params.viewClass);\n var view;\n if (viewContainer.length === 0) return;\n if (navbarContainer.parents('.navbar-through').length === 0 && viewContainer.find('.navbar-through').length === 0) return;\n view = viewContainer[0].f7View || undefined;\n \n navbarContainer.find('.navbar-inner').each(function () {\n var navbarInnerContainer = this;\n var pageContainer;\n if ($(navbarInnerContainer).attr('data-page')) {\n // For dom cache\n pageContainer = viewContainer.find('.page[data-page=\"' + $(navbarInnerContainer).attr('data-page') + '\"]')[0];\n }\n if (!pageContainer) {\n var pages = viewContainer.find('.page');\n if (pages.length === 1) {\n pageContainer = pages[0];\n }\n else {\n viewContainer.find('.page').each(function () {\n if (this.f7PageData && this.f7PageData.navbarInnerContainer === navbarInnerContainer) {\n pageContainer = this;\n }\n });\n }\n }\n app.navbarInitCallback(view, pageContainer, navbarContainer[0], navbarInnerContainer);\n });\n };\n \n // Size Navbars\n app.sizeNavbars = function (viewContainer) {\n if (app.params.material) return;\n var navbarInner = viewContainer ? $(viewContainer).find('.navbar .navbar-inner:not(.cached)') : $('.navbar .navbar-inner:not(.cached)');\n navbarInner.each(function () {\n var n = $(this);\n if (n.hasClass('cached')) return;\n var left = app.rtl ? n.find('.right') : n.find('.left'),\n right = app.rtl ? n.find('.left') : n.find('.right'),\n center = n.find('.center'),\n subnavbar = n.find('.subnavbar'),\n noLeft = left.length === 0,\n noRight = right.length === 0,\n leftWidth = noLeft ? 0 : left.outerWidth(true),\n rightWidth = noRight ? 0 : right.outerWidth(true),\n centerWidth = center.outerWidth(true),\n navbarStyles = n.styles(),\n navbarWidth = n[0].offsetWidth - parseInt(navbarStyles.paddingLeft, 10) - parseInt(navbarStyles.paddingRight, 10),\n onLeft = n.hasClass('navbar-on-left'),\n currLeft, diff;\n \n if (noRight) {\n currLeft = navbarWidth - centerWidth;\n }\n if (noLeft) {\n currLeft = 0;\n }\n if (!noLeft && !noRight) {\n currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2;\n }\n var requiredLeft = (navbarWidth - centerWidth) / 2;\n if (navbarWidth - leftWidth - rightWidth > centerWidth) {\n if (requiredLeft < leftWidth) {\n requiredLeft = leftWidth;\n }\n if (requiredLeft + centerWidth > navbarWidth - rightWidth) {\n requiredLeft = navbarWidth - rightWidth - centerWidth;\n }\n diff = requiredLeft - currLeft;\n }\n else {\n diff = 0;\n }\n // RTL inverter\n var inverter = app.rtl ? -1 : 1;\n \n if (center.hasClass('sliding')) {\n center[0].f7NavbarLeftOffset = -(currLeft + diff) * inverter;\n center[0].f7NavbarRightOffset = (navbarWidth - currLeft - diff - centerWidth) * inverter;\n if (onLeft) {\n if (app.params.animateNavBackIcon) {\n var activeNavbarBackLink = n.parent().find('.navbar-on-center').find('.left.sliding .back .icon ~ span');\n if (activeNavbarBackLink.length > 0) {\n center[0].f7NavbarLeftOffset += activeNavbarBackLink[0].offsetLeft;\n }\n }\n center.transform('translate3d(' + center[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n }\n if (!noLeft && left.hasClass('sliding')) {\n if (app.rtl) {\n left[0].f7NavbarLeftOffset = -(navbarWidth - left[0].offsetWidth) / 2 * inverter;\n left[0].f7NavbarRightOffset = leftWidth * inverter;\n }\n else {\n left[0].f7NavbarLeftOffset = -leftWidth;\n left[0].f7NavbarRightOffset = (navbarWidth - left[0].offsetWidth) / 2;\n if (app.params.animateNavBackIcon && left.find('.back .icon').length > 0) {\n left[0].f7NavbarRightOffset -= left.find('.back .icon')[0].offsetWidth;\n }\n }\n if (onLeft) left.transform('translate3d(' + left[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n if (!noRight && right.hasClass('sliding')) {\n if (app.rtl) {\n right[0].f7NavbarLeftOffset = -rightWidth * inverter;\n right[0].f7NavbarRightOffset = (navbarWidth - right[0].offsetWidth) / 2 * inverter;\n }\n else {\n right[0].f7NavbarLeftOffset = -(navbarWidth - right[0].offsetWidth) / 2;\n right[0].f7NavbarRightOffset = rightWidth;\n }\n if (onLeft) right.transform('translate3d(' + right[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n if (subnavbar.length && subnavbar.hasClass('sliding')) {\n subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth;\n subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset;\n }\n \n // Center left\n var centerLeft = diff;\n if (app.rtl && noLeft && noRight && center.length > 0) centerLeft = -centerLeft;\n center.css({left: centerLeft + 'px'});\n \n });\n };\n \n // Hide/Show Navbars/Toolbars\n app.hideNavbar = function (navbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n $(navbarContainer).addClass('navbar-hidden' + (!animated ? (' not-animated') : ''));\n return true;\n };\n app.showNavbar = function (navbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n var navbar = $(navbarContainer);\n if (animated) {\n navbar.removeClass('not-animated');\n navbar.addClass('navbar-hiding').removeClass('navbar-hidden').transitionEnd(function () {\n navbar.removeClass('navbar-hiding');\n });\n }\n else {\n navbar.removeClass('navbar-hidden navbar-hiding not-animated');\n }\n return true;\n };\n app.hideToolbar = function (toolbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n $(toolbarContainer).addClass('toolbar-hidden' + (!animated ? (' not-animated') : ''));\n return true;\n };\n app.showToolbar = function (toolbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n var toolbar = $(toolbarContainer);\n if (animated) {\n toolbar.removeClass('not-animated');\n toolbar.addClass('toolbar-hiding').removeClass('toolbar-hidden').transitionEnd(function () {\n toolbar.removeClass('toolbar-hiding' + (!animated ? (' not-animated') : ''));\n });\n }\n else {\n toolbar.removeClass('toolbar-hidden toolbar-hiding not-animated');\n }\n \n };\n \n"," /*======================================================\n ************ Searchbar ************\n ======================================================*/\n var Searchbar = function (container, params) {\n var defaults = {\n input: null,\n clearButton: null,\n cancelButton: null,\n searchList: null,\n searchIn: '.item-title',\n searchBy: '',\n found: null,\n notFound: null,\n overlay: null,\n ignore: '.searchbar-ignore',\n customSearch: false,\n removeDiacritics: false,\n hideDividers: true,\n hideGroups: true,\n /* Callbacks\n onSearch\n onEnable\n onDisable\n onClear\n */\n \n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null && defaults.hasOwnProperty(def)) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var s = this;\n \n // Material\n s.material = app.params.material;\n \n // Params\n s.params = params;\n \n // Container\n container = $(container);\n s.container = container;\n \n // Active\n s.active = false;\n \n // Input\n s.input = s.params.input ? $(s.params.input) : s.container.find('input[type=\"search\"]');\n s.clearButton = s.params.clearButton ? $(s.params.clearButton) : s.container.find('.searchbar-clear');\n s.cancelButton = s.params.cancelButton ? $(s.params.cancelButton) : s.container.find('.searchbar-cancel');\n \n // Search List\n s.searchList = $(s.params.searchList);\n \n // Is Virtual List\n s.isVirtualList = s.searchList.hasClass('virtual-list');\n \n // Is In Page\n s.pageContainer = s.container.parents('.page').eq(0);\n \n // Overlay\n if (!s.params.overlay) {\n s.overlay = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-overlay') : $('.searchbar-overlay');\n }\n else {\n s.overlay = $(s.params.overlay);\n }\n // Found and not found\n if (!s.params.found) {\n s.found = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-found') : $('.searchbar-found');\n }\n else {\n s.found = $(s.params.found);\n }\n if (!s.params.notFound) {\n s.notFound = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-not-found') : $('.searchbar-not-found');\n }\n else {\n s.notFound = $(s.params.notFound);\n }\n \n // Set Cancel button\n var cancelMarginProp = app.rtl ? 'margin-left' : 'margin-right';\n var cancelButtonHasMargin = false;\n s.setCancelButtonMargin = function () {\n s.cancelButton.transition(0).show();\n s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px');\n var clientLeft = s.cancelButton[0].clientLeft;\n s.cancelButton.transition('');\n cancelButtonHasMargin = true;\n };\n \n // Trigger\n s.triggerEvent = function (eventName, callbackName, eventData) {\n s.container.trigger(eventName, eventData);\n if (s.searchList.length > 0) s.searchList.trigger(eventName, eventData);\n if (callbackName && s.params[callbackName]) s.params[callbackName](s, eventData);\n };\n \n // Enable/disalbe\n s.enable = function (e) {\n function _enable() {\n if ((s.searchList.length || s.params.customSearch) && !s.container.hasClass('searchbar-active') && !s.query) s.overlay.addClass('searchbar-overlay-active');\n s.container.addClass('searchbar-active');\n if (s.cancelButton.length > 0 && !s.material) {\n if (!cancelButtonHasMargin) {\n s.setCancelButtonMargin();\n }\n s.cancelButton.css(cancelMarginProp, '0px');\n }\n s.triggerEvent('enableSearch searchbar:enable', 'onEnable');\n s.active = true;\n }\n if (app.device.ios && !app.params.material && e && e.type === 'focus') {\n setTimeout(function () {\n _enable();\n }, 400);\n }\n else {\n _enable();\n }\n };\n \n s.disable = function () {\n s.input.val('').trigger('change');\n s.container.removeClass('searchbar-active searchbar-not-empty');\n if (s.cancelButton.length > 0 && !s.material) s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px');\n \n if (s.searchList.length || s.params.customSearch) s.overlay.removeClass('searchbar-overlay-active');\n \n s.active = false;\n function _disable() {\n s.input.blur();\n }\n if (app.device.ios) {\n setTimeout(function () {\n _disable();\n }, 400);\n }\n else {\n _disable();\n }\n s.triggerEvent('disableSearch searchbar:disable', 'onDisable');\n };\n \n // Clear\n s.clear = function (e) {\n if (!s.query && e && $(e.target).hasClass('searchbar-clear')) {\n s.disable();\n return;\n }\n var previousQuery = s.value;\n s.input.val('').trigger('change').focus();\n s.triggerEvent('clearSearch searchbar:clear', 'onClear', {previousQuery: previousQuery});\n };\n \n // Search\n s.handleInput = function () {\n setTimeout(function () {\n var value = s.input.val().trim();\n if ((s.searchList.length > 0 || s.params.customSearch) && (s.params.searchIn || s.isVirtualList)) s.search(value, true);\n }, 0);\n };\n \n var previousQuery = '';\n var virtualList;\n s.search = function (query, internal) {\n if (previousQuery && query.trim() === previousQuery) return;\n previousQuery = query.trim();\n \n if (!internal) {\n if (!s.active) {\n s.enable();\n }\n s.input.val(query);\n }\n s.query = s.value = query;\n // Add active/inactive classes on overlay\n if (query.length === 0) {\n s.container.removeClass('searchbar-not-empty');\n if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.addClass('searchbar-overlay-active');\n }\n else {\n s.container.addClass('searchbar-not-empty');\n if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.removeClass('searchbar-overlay-active');\n }\n \n if (s.params.customSearch) {\n s.triggerEvent('search searchbar:search', 'onSearch', {query: query});\n return;\n }\n \n var foundItems = [], _vlQuery;\n if (s.isVirtualList) {\n virtualList = s.searchList[0].f7VirtualList;\n if (query.trim() === '') {\n virtualList.resetFilter();\n s.notFound.hide();\n s.found.show();\n return;\n }\n _vlQuery = s.params.removeDiacritics ? $.removeDiacritics(query) : query;\n if (virtualList.params.searchAll) {\n foundItems = virtualList.params.searchAll(_vlQuery, virtualList.items) || [];\n }\n else if (virtualList.params.searchByItem) {\n for (var i = 0; i < virtualList.items.length; i++) {\n if(virtualList.params.searchByItem(_vlQuery, i, virtualList.params.items[i])) {\n foundItems.push(i);\n }\n }\n }\n }\n else {\n var values;\n if (s.params.removeDiacritics) values = $.removeDiacritics(query.trim().toLowerCase()).split(' ');\n else {\n values = query.trim().toLowerCase().split(' ');\n }\n s.searchList.find('li').removeClass('hidden-by-searchbar').each(function (index, el) {\n el = $(el);\n var compareWithText = [];\n el.find(s.params.searchIn).each(function () {\n var itemText = $(this).text().trim().toLowerCase();\n if (s.params.removeDiacritics) itemText = $.removeDiacritics(itemText);\n compareWithText.push(itemText);\n });\n compareWithText = compareWithText.join(' ');\n var wordsMatch = 0;\n for (var i = 0; i < values.length; i++) {\n if (compareWithText.indexOf(values[i]) >= 0) wordsMatch++;\n }\n if (wordsMatch !== values.length && !(s.params.ignore && el.is(s.params.ignore))) {\n el.addClass('hidden-by-searchbar');\n }\n else {\n foundItems.push(el[0]);\n }\n });\n \n if (s.params.hideDividers) {\n s.searchList.find('.item-divider, .list-group-title').each(function () {\n var title = $(this);\n var nextElements = title.nextAll('li');\n var hide = true;\n for (var i = 0; i < nextElements.length; i++) {\n var nextEl = $(nextElements[i]);\n if (nextEl.hasClass('list-group-title') || nextEl.hasClass('item-divider')) break;\n if (!nextEl.hasClass('hidden-by-searchbar')) {\n hide = false;\n }\n }\n var ignore = s.params.ignore && title.is(s.params.ignore);\n if (hide && !ignore) title.addClass('hidden-by-searchbar');\n else title.removeClass('hidden-by-searchbar');\n });\n }\n if (s.params.hideGroups) {\n s.searchList.find('.list-group').each(function () {\n var group = $(this);\n var ignore = s.params.ignore && group.is(s.params.ignore);\n var notHidden = group.find('li:not(.hidden-by-searchbar)');\n if (notHidden.length === 0 && !ignore) {\n group.addClass('hidden-by-searchbar');\n }\n else {\n group.removeClass('hidden-by-searchbar');\n }\n });\n }\n }\n s.triggerEvent('search searchbar:search', 'onSearch', {query: query, foundItems: foundItems});\n if (foundItems.length === 0) {\n s.notFound.show();\n s.found.hide();\n }\n else {\n s.notFound.hide();\n s.found.show();\n }\n if (s.isVirtualList) {\n virtualList.filterItems(foundItems);\n }\n };\n \n // Events\n function preventSubmit(e) {\n e.preventDefault();\n }\n \n s.attachEvents = function (destroy) {\n var method = destroy ? 'off' : 'on';\n s.container[method]('submit', preventSubmit);\n if (!s.material) s.cancelButton[method]('click', s.disable);\n s.overlay[method]('click', s.disable);\n s.input[method]('focus', s.enable);\n s.input[method]('change keydown keypress keyup compositionend', s.handleInput);\n s.clearButton[method]('click', s.clear);\n \n };\n s.detachEvents = function() {\n s.attachEvents(true);\n };\n \n // Init Destroy\n s.init = function () {\n s.attachEvents();\n };\n s.destroy = function () {\n if (!s) return;\n s.detachEvents();\n s = null;\n };\n \n // Init\n s.init();\n \n s.container[0].f7Searchbar = s;\n return s;\n \n };\n app.searchbar = function (container, params) {\n return new Searchbar(container, params);\n };\n app.initSearchbar = function (container) {\n container = $(container);\n var searchbar = container.hasClass('searchbar') ? container : container.find('.searchbar');\n if (searchbar.length === 0) return;\n if (!searchbar.hasClass('searchbar-init')) return;\n \n var sb = app.searchbar(searchbar, searchbar.dataset());\n \n function onBeforeRemove() {\n if (sb) sb.destroy();\n }\n if (container.hasClass('page')) {\n container.once('pageBeforeRemove', onBeforeRemove);\n }\n else if (container.hasClass('navbar-inner')) {\n container.once('navbarBeforeRemove', onBeforeRemove);\n }\n };\n \n"," /*======================================================\n ************ Messagebar ************\n ======================================================*/\n var Messagebar = function (container, params) {\n var defaults = {\n textarea: null,\n maxHeight: null,\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var m = this;\n \n // Params\n m.params = params;\n \n // Container\n m.container = $(container);\n if (m.container.length === 0) return;\n \n // Textarea\n m.textarea = m.params.textarea ? $(m.params.textarea) : m.container.find('textarea');\n \n // Is In Page\n m.pageContainer = m.container.parents('.page').eq(0);\n m.pageContent = m.pageContainer.find('.page-content');\n \n // Initial Sizes\n m.pageContentPadding = parseInt(m.pageContent.css('padding-bottom'));\n m.initialBarHeight = m.container[0].offsetHeight;\n m.initialAreaHeight = m.textarea[0].offsetHeight;\n \n \n // Resize textarea\n m.sizeTextarea = function () {\n // Reset\n m.textarea.css({'height': ''});\n \n var height = m.textarea[0].offsetHeight;\n var diff = height - m.textarea[0].clientHeight;\n var scrollHeight = m.textarea[0].scrollHeight;\n \n // Update\n if (scrollHeight + diff > height) {\n var newAreaHeight = scrollHeight + diff;\n var newBarHeight = m.initialBarHeight + (newAreaHeight - m.initialAreaHeight);\n var maxBarHeight = m.params.maxHeight || m.container.parents('.view')[0].offsetHeight - 88;\n if (newBarHeight > maxBarHeight) {\n newBarHeight = parseInt(maxBarHeight, 10);\n newAreaHeight = newBarHeight - m.initialBarHeight + m.initialAreaHeight;\n }\n m.textarea.css('height', newAreaHeight + 'px');\n m.container.css('height', newBarHeight + 'px');\n var onBottom = (m.pageContent[0].scrollTop === m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight);\n if (m.pageContent.length > 0) {\n m.pageContent.css('padding-bottom', newBarHeight + 'px');\n if (m.pageContent.find('.messages-new-first').length === 0 && onBottom) {\n m.pageContent.scrollTop(m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight);\n }\n }\n }\n else {\n if (m.pageContent.length > 0) {\n m.container.css({'height': '', 'bottom': ''});\n m.pageContent.css({'padding-bottom': ''});\n }\n }\n };\n \n // Clear\n m.clear = function () {\n m.textarea.val('').trigger('change');\n };\n m.value = function (value) {\n if (typeof value === 'undefined') return m.textarea.val();\n else m.textarea.val(value).trigger('change');\n };\n \n // Handle textarea\n m.textareaTimeout = undefined;\n m.handleTextarea = function (e) {\n clearTimeout(m.textareaTimeout);\n m.textareaTimeout = setTimeout(function () {\n m.sizeTextarea();\n }, 0);\n };\n \n //Events\n function preventSubmit(e) {\n e.preventDefault();\n }\n \n m.attachEvents = function (destroy) {\n var method = destroy ? 'off' : 'on';\n m.container[method]('submit', preventSubmit);\n m.textarea[method]('change keydown keypress keyup paste cut', m.handleTextarea);\n };\n m.detachEvents = function () {\n m.attachEvents(true);\n };\n \n // Init Destroy\n m.init = function () {\n m.attachEvents();\n };\n m.destroy = function () {\n m.detachEvents();\n m = null;\n };\n \n // Init\n m.init();\n \n m.container[0].f7Messagebar = m;\n return m;\n };\n app.messagebar = function (container, params) {\n return new Messagebar(container, params);\n };\n app.initPageMessagebar = function (pageContainer) {\n pageContainer = $(pageContainer);\n var messagebar = pageContainer.hasClass('messagebar') ? pageContainer : pageContainer.find('.messagebar');\n if (messagebar.length === 0) return;\n if (!messagebar.hasClass('messagebar-init')) return;\n var mb = app.messagebar(messagebar, messagebar.dataset());\n \n // Destroy on page remove\n function pageBeforeRemove() {\n mb.destroy();\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n if (pageContainer.hasClass('page')) {\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n }\n };\n \n"," /*======================================================\n ************ XHR ************\n ======================================================*/\n // XHR Caching\n app.cache = [];\n app.removeFromCache = function (url) {\n var index = false;\n for (var i = 0; i < app.cache.length; i++) {\n if (app.cache[i].url === url) index = i;\n }\n if (index !== false) app.cache.splice(index, 1);\n };\n \n // XHR\n app.xhr = false;\n app.get = function (url, view, ignoreCache, callback) {\n // should we ignore get params or not\n var _url = url;\n if (app.params.cacheIgnoreGetParameters && url.indexOf('?') >= 0) {\n _url = url.split('?')[0];\n }\n if (app.params.cache && !ignoreCache && url.indexOf('nocache') < 0 && app.params.cacheIgnore.indexOf(_url) < 0) {\n // Check is the url cached\n for (var i = 0; i < app.cache.length; i++) {\n if (app.cache[i].url === _url) {\n // Check expiration\n if ((new Date()).getTime() - app.cache[i].time < app.params.cacheDuration) {\n // Load from cache\n callback(app.cache[i].content);\n return false;\n }\n }\n }\n }\n \n app.xhr = $.ajax({\n url: url,\n method: 'GET',\n beforeSend: app.params.onAjaxStart,\n complete: function (xhr, status) {\n if (status !== 'error' && status !== 'timeout' && (xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {\n if (app.params.cache && xhr.responseText !== '') {\n app.removeFromCache(_url);\n app.cache.push({\n url: _url,\n time: (new Date()).getTime(),\n content: xhr.responseText\n });\n }\n callback(xhr.responseText, false);\n }\n else {\n callback(xhr.responseText, true);\n }\n if (app.params.onAjaxComplete) app.params.onAjaxComplete(xhr);\n },\n error: function (xhr) {\n callback(xhr.responseText, true);\n if (app.params.onAjaxError) app.params.onAjaxError(xhr);\n }\n });\n if (view) view.xhr = app.xhr;\n \n return app.xhr;\n };\n \n"," /*======================================================\n ************ Pages ************\n ======================================================*/\n // Page Callbacks API\n app.pageCallbacks = {};\n \n app.onPage = function (callbackName, pageName, callback) {\n if (pageName && pageName.split(' ').length > 1) {\n var pageNames = pageName.split(' ');\n var returnCallbacks = [];\n for (var i = 0; i < pageNames.length; i++) {\n returnCallbacks.push(app.onPage(callbackName, pageNames[i], callback));\n }\n returnCallbacks.remove = function () {\n for (var i = 0; i < returnCallbacks.length; i++) {\n returnCallbacks[i].remove();\n }\n };\n returnCallbacks.trigger = function () {\n for (var i = 0; i < returnCallbacks.length; i++) {\n returnCallbacks[i].trigger();\n }\n };\n return returnCallbacks;\n }\n var callbacks = app.pageCallbacks[callbackName][pageName];\n if (!callbacks) {\n callbacks = app.pageCallbacks[callbackName][pageName] = [];\n }\n app.pageCallbacks[callbackName][pageName].push(callback);\n return {\n remove: function () {\n var removeIndex;\n for (var i = 0; i < callbacks.length; i++) {\n if (callbacks[i].toString() === callback.toString()) {\n removeIndex = i;\n }\n }\n if (typeof removeIndex !== 'undefined') callbacks.splice(removeIndex, 1);\n },\n trigger: callback\n };\n };\n \n //Create callbacks methods dynamically\n function createPageCallback(callbackName) {\n var capitalized = callbackName.replace(/^./, function (match) {\n return match.toUpperCase();\n });\n app['onPage' + capitalized] = function (pageName, callback) {\n return app.onPage(callbackName, pageName, callback);\n };\n }\n \n var pageCallbacksNames = ('beforeInit init reinit beforeAnimation afterAnimation back afterBack beforeRemove').split(' ');\n for (var i = 0; i < pageCallbacksNames.length; i++) {\n app.pageCallbacks[pageCallbacksNames[i]] = {};\n createPageCallback(pageCallbacksNames[i]);\n }\n \n app.triggerPageCallbacks = function (callbackName, pageName, pageData) {\n var allPagesCallbacks = app.pageCallbacks[callbackName]['*'];\n if (allPagesCallbacks) {\n for (var j = 0; j < allPagesCallbacks.length; j++) {\n allPagesCallbacks[j](pageData);\n }\n }\n var callbacks = app.pageCallbacks[callbackName][pageName];\n if (!callbacks || callbacks.length === 0) return;\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](pageData);\n }\n };\n \n // On Page Init Callback\n app.pageInitCallback = function (view, params) {\n var pageContainer = params.pageContainer;\n if (!pageContainer) return;\n if (pageContainer.f7PageInitialized && view && !view.params.domCache) return;\n \n var pageQuery = params.query;\n if (!pageQuery) {\n if (params.url && params.url.indexOf('?') > 0) {\n pageQuery = $.parseUrlQuery(params.url || '');\n }\n else if (pageContainer.f7PageData && pageContainer.f7PageData.query) {\n pageQuery = pageContainer.f7PageData.query;\n }\n else {\n pageQuery = {};\n }\n }\n \n // Page Data\n var pageData = {\n container: pageContainer,\n url: params.url,\n query: pageQuery,\n name: $(pageContainer).attr('data-page'),\n view: view,\n from: params.position,\n context: params.context,\n navbarInnerContainer: params.navbarInnerContainer,\n fromPage: params.fromPage\n };\n if (params.fromPage && !params.fromPage.navbarInnerContainer && params.oldNavbarInnerContainer) {\n params.fromPage.navbarInnerContainer = params.oldNavbarInnerContainer;\n }\n \n if (pageContainer.f7PageInitialized && ((view && view.params.domCache) || (!view && $(pageContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) {\n // Reinit Page\n app.reinitPage(pageContainer);\n \n // Callbacks\n app.pluginHook('pageReinit', pageData);\n if (app.params.onPageReinit) app.params.onPageReinit(app, pageData);\n app.triggerPageCallbacks('reinit', pageData.name, pageData);\n $(pageData.container).trigger('pageReinit page:reinit', {page: pageData});\n return;\n }\n pageContainer.f7PageInitialized = true;\n \n // Store pagedata in page\n pageContainer.f7PageData = pageData;\n \n // Update View's activePage\n if (view && !params.preloadOnly && !params.reloadPrevious) {\n // Add data-page on view\n $(view.container).attr('data-page', pageData.name);\n // Update View active page data\n view.activePage = pageData;\n }\n \n // Before Init Callbacks\n app.pluginHook('pageBeforeInit', pageData);\n if (app.params.onPageBeforeInit) app.params.onPageBeforeInit(app, pageData);\n app.triggerPageCallbacks('beforeInit', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeInit page:beforeinit', {page: pageData});\n \n // Init page\n app.initPage(pageContainer);\n \n // Init Callback\n app.pluginHook('pageInit', pageData);\n if (app.params.onPageInit) app.params.onPageInit(app, pageData);\n app.triggerPageCallbacks('init', pageData.name, pageData);\n $(pageData.container).trigger('pageInit page:init', {page: pageData});\n };\n app.pageRemoveCallback = function (view, pageContainer, position) {\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n // Page Data\n var pageData = {\n container: pageContainer,\n name: $(pageContainer).attr('data-page'),\n view: view,\n url: pageContainer.f7PageData && pageContainer.f7PageData.url,\n query: pageContainer.f7PageData && pageContainer.f7PageData.query,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n from: position,\n context: pageContext\n };\n // Before Init Callback\n app.pluginHook('pageBeforeRemove', pageData);\n if (app.params.onPageBeforeRemove) app.params.onPageBeforeRemove(app, pageData);\n app.triggerPageCallbacks('beforeRemove', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeRemove page:beforeremove', {page: pageData});\n pageData = null;\n };\n app.pageBackCallback = function (callback, view, params) {\n // Page Data\n var pageContainer = params.pageContainer;\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n \n var pageData = {\n container: pageContainer,\n name: $(pageContainer).attr('data-page'),\n url: pageContainer.f7PageData && pageContainer.f7PageData.url,\n query: pageContainer.f7PageData && pageContainer.f7PageData.query,\n view: view,\n from: params.position,\n context: pageContext,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n swipeBack: params.swipeBack\n };\n \n if (callback === 'after') {\n app.pluginHook('pageAfterBack', pageData);\n if (app.params.onPageAfterBack) app.params.onPageAfterBack(app, pageData);\n app.triggerPageCallbacks('afterBack', pageData.name, pageData);\n $(pageContainer).trigger('pageAfterBack page:afterback', {page: pageData});\n \n }\n if (callback === 'before') {\n app.pluginHook('pageBack', pageData);\n if (app.params.onPageBack) app.params.onPageBack(app, pageData);\n app.triggerPageCallbacks('back', pageData.name, pageData);\n $(pageData.container).trigger('pageBack page:back', {page: pageData});\n }\n };\n app.pageAnimCallback = function (callback, view, params) {\n var pageContainer = params.pageContainer;\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n \n var pageQuery = params.query;\n if (!pageQuery) {\n if (params.url && params.url.indexOf('?') > 0) {\n pageQuery = $.parseUrlQuery(params.url || '');\n }\n else if (pageContainer.f7PageData && pageContainer.f7PageData.query) {\n pageQuery = pageContainer.f7PageData.query;\n }\n else {\n pageQuery = {};\n }\n }\n // Page Data\n var pageData = {\n container: pageContainer,\n url: params.url,\n query: pageQuery,\n name: $(pageContainer).attr('data-page'),\n view: view,\n from: params.position,\n context: pageContext,\n swipeBack: params.swipeBack,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n fromPage: params.fromPage\n };\n var oldPage = params.oldPage,\n newPage = params.newPage;\n \n // Update page date\n pageContainer.f7PageData = pageData;\n \n if (callback === 'after') {\n app.pluginHook('pageAfterAnimation', pageData);\n if (app.params.onPageAfterAnimation) app.params.onPageAfterAnimation(app, pageData);\n app.triggerPageCallbacks('afterAnimation', pageData.name, pageData);\n $(pageData.container).trigger('pageAfterAnimation page:afteranimation', {page: pageData});\n \n }\n if (callback === 'before') {\n // Add data-page on view\n $(view.container).attr('data-page', pageData.name);\n \n // Update View's activePage\n if (view) view.activePage = pageData;\n \n // Hide/show navbar dynamically\n if (newPage.hasClass('no-navbar') && !oldPage.hasClass('no-navbar')) {\n view.hideNavbar();\n }\n if (!newPage.hasClass('no-navbar') && (oldPage.hasClass('no-navbar') || oldPage.hasClass('no-navbar-by-scroll'))) {\n view.showNavbar();\n }\n // Hide/show navbar toolbar\n if (newPage.hasClass('no-toolbar') && !oldPage.hasClass('no-toolbar')) {\n view.hideToolbar();\n }\n if (!newPage.hasClass('no-toolbar') && (oldPage.hasClass('no-toolbar') || oldPage.hasClass('no-toolbar-by-scroll'))) {\n view.showToolbar();\n }\n // Hide/show tabbar\n var tabBar;\n if (newPage.hasClass('no-tabbar') && !oldPage.hasClass('no-tabbar')) {\n tabBar = $(view.container).find('.tabbar');\n if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar');\n app.hideToolbar(tabBar);\n }\n if (!newPage.hasClass('no-tabbar') && (oldPage.hasClass('no-tabbar') || oldPage.hasClass('no-tabbar-by-scroll'))) {\n tabBar = $(view.container).find('.tabbar');\n if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar');\n app.showToolbar(tabBar);\n }\n \n oldPage.removeClass('no-navbar-by-scroll no-toolbar-by-scroll');\n // Callbacks\n app.pluginHook('pageBeforeAnimation', pageData);\n if (app.params.onPageBeforeAnimation) app.params.onPageBeforeAnimation(app, pageData);\n app.triggerPageCallbacks('beforeAnimation', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeAnimation page:beforeanimation', {page: pageData});\n }\n };\n \n // Init Page Events and Manipulations\n app.initPage = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length === 0) return;\n // Size navbars on page load\n if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]);\n // Init messages\n if (app.initPageMessages) app.initPageMessages(pageContainer);\n // Init forms storage\n if (app.initFormsStorage) app.initFormsStorage(pageContainer);\n // Init smart select\n if (app.initSmartSelects) app.initSmartSelects(pageContainer);\n // Init slider\n if (app.initPageSwiper) app.initPageSwiper(pageContainer);\n // Init pull to refres\n if (app.initPullToRefresh) app.initPullToRefresh(pageContainer);\n // Init infinite scroll\n if (app.initPageInfiniteScroll) app.initPageInfiniteScroll(pageContainer);\n // Init searchbar\n if (app.initSearchbar) app.initSearchbar(pageContainer);\n // Init message bar\n if (app.initPageMessagebar) app.initPageMessagebar(pageContainer);\n // Init scroll toolbars\n if (app.initPageScrollToolbars) app.initPageScrollToolbars(pageContainer);\n // Init lazy images\n if (app.initImagesLazyLoad) app.initImagesLazyLoad(pageContainer);\n // Init progress bars\n if (app.initPageProgressbar) app.initPageProgressbar(pageContainer);\n // Init resizeable textareas\n if (app.initPageResizableTextarea) app.initPageResizableTextarea(pageContainer);\n // Init Data Table\n if (app.initPageDataTables) app.initPageDataTables(pageContainer);\n // Init Material Preloader\n if (app.params.material && app.initPageMaterialPreloader) app.initPageMaterialPreloader(pageContainer);\n // Init Material Inputs\n if (app.params.material && app.initPageMaterialInputs) app.initPageMaterialInputs(pageContainer);\n // Init Material Tabbar\n if (app.params.material && app.initPageMaterialTabbar) app.initPageMaterialTabbar(pageContainer);\n };\n app.reinitPage = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length === 0) return;\n // Size navbars on page reinit\n if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]);\n // Reinit slider\n if (app.reinitPageSwiper) app.reinitPageSwiper(pageContainer);\n // Reinit lazy load\n if (app.reinitLazyLoad) app.reinitLazyLoad(pageContainer);\n };\n app.initPageWithCallback = function (pageContainer) {\n pageContainer = $(pageContainer);\n var viewContainer = pageContainer.parents('.' + app.params.viewClass);\n if (viewContainer.length === 0) return;\n var view = viewContainer[0].f7View || undefined;\n var url = view && view.url ? view.url : undefined;\n if (viewContainer && pageContainer.attr('data-page')) {\n viewContainer.attr('data-page', pageContainer.attr('data-page'));\n }\n app.pageInitCallback(view, {pageContainer: pageContainer[0], url: url, position: 'center'});\n };\n \n"," /*======================================================\n ************ Navigation / Router ************\n ======================================================*/\n app.router = {\n _remove: function (el) {\n if (app.params.routerRemoveTimeout || app.params.routerRemoveWithTimeout) {\n setTimeout(function () {\n $(el).remove();\n }, 0);\n }\n else $(el).remove();\n },\n _modalsSelector: '.popup, .modal, .popover, .actions-modal, .picker-modal, .login-screen',\n // Temporary DOM Element\n temporaryDom: document.createElement('div'),\n \n // Find page or navbar in passed container which are related to View\n findElement: function (selector, container, view, notCached) {\n container = $(container);\n if (notCached) selector = selector + ':not(.cached)';\n var found = container.find(selector).filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n });\n if (found.length > 1) {\n if (typeof view.selector === 'string') {\n // Search in related view\n found = container.find(view.selector + ' ' + selector);\n }\n if (found.length > 1) {\n // Search in main view\n found = container.find('.' + app.params.viewMainClass + ' ' + selector);\n }\n }\n if (found.length === 1) return found;\n else {\n // Try to find non cached\n if (!notCached) found = app.router.findElement(selector, container, view, true);\n if (found && found.length === 1) return found;\n if (found && found.length > 1) return $(found[0]);\n else return undefined;\n }\n },\n \n // Set pages classes for animationEnd\n animatePages: function (leftPage, rightPage, direction) {\n // Loading new page\n var removeClasses = 'page-on-center page-on-right page-on-left';\n if (direction === 'to-left') {\n leftPage.removeClass(removeClasses).addClass('page-from-center-to-left');\n rightPage.removeClass(removeClasses).addClass('page-from-right-to-center');\n }\n // Go back\n if (direction === 'to-right') {\n leftPage.removeClass(removeClasses).addClass('page-from-left-to-center');\n rightPage.removeClass(removeClasses).addClass('page-from-center-to-right');\n \n }\n },\n \n // Prepare navbar before animarion\n prepareNavbar: function (newNavbarInner, oldNavbarInner, newNavbarPosition) {\n $(newNavbarInner).find('.sliding').each(function () {\n var sliding = $(this);\n var slidingOffset = newNavbarPosition === 'right' ? this.f7NavbarRightOffset : this.f7NavbarLeftOffset;\n \n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-slidingOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + slidingOffset + 'px,0,0)');\n });\n },\n \n // Set navbars classes for animation\n animateNavbars: function (leftNavbarInner, rightNavbarInner, direction) {\n // Loading new page\n var removeClasses = 'navbar-on-right navbar-on-center navbar-on-left';\n if (direction === 'to-left') {\n rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-right-to-center');\n rightNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n sliding.transform('translate3d(0px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(0px,0,0)');\n }\n }\n });\n \n leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-left');\n leftNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n var rightText;\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('center') && rightNavbarInner.find('.sliding.left .back .icon').length > 0) {\n rightText = rightNavbarInner.find('.sliding.left .back span');\n if (rightText.length > 0) this.f7NavbarLeftOffset += rightText[0].offsetLeft;\n }\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarLeftOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + (this.f7NavbarLeftOffset) + 'px,0,0)');\n });\n }\n // Go back\n if (direction === 'to-right') {\n leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-left-to-center');\n leftNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n sliding.transform('translate3d(0px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(0px,0,0)');\n }\n }\n });\n \n rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-right');\n rightNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarRightOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + (this.f7NavbarRightOffset) + 'px,0,0)');\n });\n }\n },\n \n preprocess: function(view, content, url, next) {\n // Plugin hook\n app.pluginHook('routerPreprocess', view, content, url, next);\n \n // Preprocess by plugin\n content = app.pluginProcess('preprocess', content);\n \n if (view && view.params && view.params.preprocess) {\n content = view.params.preprocess(content, url, next);\n if (typeof content !== 'undefined') {\n next(content);\n }\n }\n else if (app.params.preprocess) {\n content = app.params.preprocess(content, url, next);\n if (typeof content !== 'undefined') {\n next(content);\n }\n }\n else {\n next(content);\n }\n },\n preroute: function(view, options, isBack) {\n if (isBack) options.isBack = true;\n app.pluginHook('routerPreroute', view, options);\n if ((app.params.preroute && app.params.preroute(view, options) === false) || (view && view.params.preroute && view.params.preroute(view, options) === false)) {\n return true;\n }\n else {\n return false;\n }\n },\n \n template7Render: function (view, options) {\n var url = options.url,\n content = options.content, //initial content\n t7_rendered_content = options.content, // will be rendered using Template7\n context = options.context, // Context data for Template7\n contextName = options.contextName,\n template = options.template; // Template 7 compiled template\n \n var t7_ctx, t7_template;\n if (typeof content === 'string') {\n if (url) {\n if (app.template7Cache[url] && !options.ignoreCache) t7_template = t7.cache[url];\n else {\n t7_template = t7.compile(content);\n t7.cache[url] = t7_template;\n }\n }\n else t7_template = t7.compile(content);\n }\n else if (template) {\n t7_template = template;\n }\n \n if (context) {\n t7_ctx = context;\n if (context && url) {\n view.contextCache[url] = context;\n }\n }\n else {\n if (contextName) {\n if (contextName.indexOf('.') >= 0) {\n var _ctx_path = contextName.split('.');\n var _ctx = t7.data[_ctx_path[0]];\n for (var i = 1; i < _ctx_path.length; i++) {\n if (_ctx_path[i]) _ctx = _ctx[_ctx_path[i]];\n }\n t7_ctx = _ctx;\n }\n else t7_ctx = t7.data[contextName];\n }\n if (!t7_ctx && url) {\n t7_ctx = t7.data['url:' + url];\n }\n if (!t7_ctx && typeof content === 'string' && !template) {\n //try to find by page name in content\n var pageNameMatch = content.match(/(data-page=[\"'][^\"^']*[\"'])/);\n if (pageNameMatch) {\n var page = pageNameMatch[0].split('data-page=')[1].replace(/['\"]/g, '');\n if (page) t7_ctx = t7.data['page:' + page];\n }\n }\n if (!t7_ctx && template && t7.templates) {\n // Try to find matched template name in t7.templates\n for (var templateName in t7.templates) {\n if (t7.templates[templateName] === template) t7_ctx = t7.data[templateName];\n }\n }\n if (!t7_ctx && url && url in view.contextCache) {\n t7_ctx = view.contextCache[url];\n }\n if (!t7_ctx) {\n t7_ctx = {};\n }\n }\n \n if (t7_template && t7_ctx) {\n if (typeof t7_ctx === 'function') t7_ctx = t7_ctx();\n if (url) {\n // Extend data with URL query\n var query = $.parseUrlQuery(url);\n t7_ctx.url_query = {};\n for (var key in query) {\n t7_ctx.url_query[key] = query[key];\n }\n }\n try {\n t7_rendered_content = t7_template(t7_ctx);\n }\n catch (e) {\n t7_rendered_content = '';\n if (window.console && window.console.error) {\n console.error(e);\n }\n }\n }\n \n return {content: t7_rendered_content, context: t7_ctx};\n }\n };\n \n \n app.router._load = function (view, options) {\n // Plugin hook\n app.pluginHook('routerLoad', view, options);\n \n var url = options.url,\n content = options.content, //initial content\n t7_rendered = {content: options.content},\n template = options.template, // Template 7 compiled template\n pageName = options.pageName,\n viewContainer = $(view.container),\n pagesContainer = $(view.pagesContainer),\n animatePages = options.animatePages,\n newPage, oldPage, pagesInView, i, oldNavbarInner, newNavbarInner, navbar, dynamicNavbar, reloadPosition,\n isDynamicPage = typeof url === 'undefined' && content || template,\n pushState = options.pushState,\n pageElement = options.pageElement;\n \n if (typeof animatePages === 'undefined') animatePages = view.params.animatePages;\n \n // Render with Template7\n if (app.params.template7Pages && typeof content === 'string' || template) {\n t7_rendered = app.router.template7Render(view, options);\n if (t7_rendered.content && !content) {\n content = t7_rendered.content;\n }\n }\n \n app.router.temporaryDom.innerHTML = '';\n \n // Parse DOM\n if (!pageName && !pageElement) {\n if ((typeof content === 'string') || (url && (typeof content === 'string'))) {\n app.router.temporaryDom.innerHTML = t7_rendered.content;\n } else {\n if ('length' in content && content.length > 1) {\n for (var ci = 0; ci < content.length; ci++) {\n $(app.router.temporaryDom).append(content[ci]);\n }\n } else {\n $(app.router.temporaryDom).append(content);\n }\n }\n }\n \n // Reload position\n reloadPosition = options.reload && (options.reloadPrevious ? 'left' : 'center');\n \n // Find new page\n if (pageName) newPage = pagesContainer.find('.page[data-page=\"' + pageName + '\"]');\n else {\n if (pageElement) newPage = $(pageElement);\n else newPage = app.router.findElement('.page', app.router.temporaryDom, view);\n }\n // If page not found exit\n if (!newPage || newPage.length === 0 || (pageName && view.activePage && view.activePage.name === pageName)) {\n view.allowPageChange = true;\n return;\n }\n \n newPage.addClass(options.reload ? 'page-on-' + reloadPosition : 'page-on-right');\n \n // Find old page (should be the last one) and remove older pages\n pagesInView = pagesContainer.children('.page:not(.cached)');\n if (pageElement) {\n pagesInView = pagesInView.filter(function (index, page) {\n if (page !== pageElement) return page;\n });\n }\n \n if (options.reload && options.reloadPrevious && pagesInView.length === 1) {\n view.allowPageChange = true;\n return;\n }\n \n if (options.reload) {\n oldPage = pagesInView.eq(pagesInView.length - 1);\n }\n else {\n if (pagesInView.length > 1) {\n for (i = 0; i < pagesInView.length - 2; i++) {\n if (!view.params.domCache) {\n app.pageRemoveCallback(view, pagesInView[i], 'left');\n app.router._remove(pagesInView[i]);\n }\n else {\n $(pagesInView[i]).addClass('cached');\n }\n }\n if (!view.params.domCache) {\n app.pageRemoveCallback(view, pagesInView[i], 'left');\n app.router._remove(pagesInView[i]);\n }\n else {\n $(pagesInView[i]).addClass('cached');\n }\n }\n oldPage = pagesContainer.children('.page:not(.cached)');\n }\n if (pageElement && oldPage.length > 1) {\n oldPage = oldPage.filter(function (index, page) {\n if (page !== pageElement) return page;\n });\n }\n if(view.params.domCache || pageElement) newPage.removeClass('cached');\n \n // Dynamic navbar\n if (view.params.dynamicNavbar) {\n dynamicNavbar = true;\n // Find navbar\n if (pageName) {\n newNavbarInner = viewContainer.find('.navbar-inner[data-page=\"' + pageName + '\"]');\n }\n else {\n newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view);\n }\n if (!newNavbarInner || newNavbarInner.length === 0) {\n // Look in page\n newNavbarInner = newPage.find('.navbar-inner');\n if (!newNavbarInner || newNavbarInner.length === 0) {\n // Set false\n dynamicNavbar = false;\n }\n else {\n if (newNavbarInner.parent('.navbar').length > 0) {\n newNavbarInner.prependTo(newPage);\n }\n }\n }\n if (dynamicNavbar && newPage.find('.navbar').length > 0) {\n app.router._remove(newPage.find('.navbar').filter(function(index, el){\n return $(el).parents(app.router._modalsSelector).length === 0;\n }));\n }\n navbar = viewContainer.children('.navbar');\n if (options.reload) {\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached):last-child');\n }\n else {\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached)');\n \n if (oldNavbarInner.length > 0) {\n for (i = 0; i < oldNavbarInner.length - 1; i++) {\n if (!view.params.domCache) {\n app.navbarRemoveCallback(view, pagesInView[i], navbar[0], oldNavbarInner[i]);\n app.router._remove(oldNavbarInner[i]);\n }\n else\n $(oldNavbarInner[i]).addClass('cached');\n }\n if (!newNavbarInner && oldNavbarInner.length === 1) {\n if (!view.params.domCache) {\n app.navbarRemoveCallback(view, pagesInView[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldNavbarInner[0]);\n }\n else\n $(oldNavbarInner[0]).addClass('cached');\n }\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached)');\n }\n }\n }\n if (dynamicNavbar) {\n newNavbarInner.addClass(options.reload ? 'navbar-on-' + reloadPosition : 'navbar-on-right');\n if(view.params.domCache || pageElement) newNavbarInner.removeClass('cached');\n newPage[0].f7RelatedNavbar = newNavbarInner[0];\n newNavbarInner[0].f7RelatedPage = newPage[0];\n }\n \n // save content areas into view's cache\n if (!url) {\n var newPageName = pageName || newPage.attr('data-page');\n if (isDynamicPage) url = '#' + app.params.dynamicPageUrl.replace(/{{name}}/g, newPageName).replace(/{{index}}/g, view.history.length - (options.reload ? 1 : 0));\n else url = '#' + newPageName;\n if (!view.params.domCache) {\n view.contentCache[url] = content;\n }\n if (view.params.domCache && pageName) {\n view.pagesCache[url] = pageName;\n }\n }\n else if (url && pageElement) {\n view.pageElementsCache[url] = {\n page: newPage,\n navbarInner: newNavbarInner\n };\n }\n \n // Push State\n if (app.params.pushState && !options.reloadPrevious && view.main) {\n if (typeof pushState === 'undefined') pushState = true;\n var pushStateRoot = app.params.pushStateRoot || '';\n var method = options.reload ? 'replaceState' : 'pushState';\n if (pushState) {\n if (!isDynamicPage && !pageName) {\n history[method]({url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n else if (isDynamicPage && content) {\n history[method]({content: typeof content === 'string' ? content : '', url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n else if (pageName) {\n history[method]({pageName: pageName, url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n }\n }\n \n // Update View history\n view.url = url;\n if (options.reload) {\n var lastUrl = view.history[view.history.length - (options.reloadPrevious ? 2 : 1)];\n if (lastUrl &&\n lastUrl.indexOf('#') === 0 &&\n lastUrl in view.contentCache &&\n lastUrl !== url &&\n view.history.indexOf(lastUrl) === -1) {\n view.contentCache[lastUrl] = null;\n delete view.contentCache[lastUrl];\n }\n else if (lastUrl &&\n lastUrl in view.pageElementsCache &&\n lastUrl !== url &&\n (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) {\n view.pageElementsCache[lastUrl] = null;\n delete view.pageElementsCache[lastUrl];\n }\n if (lastUrl &&\n lastUrl in view.contextCache &&\n lastUrl !== url &&\n (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) {\n view.contextCache[lastUrl] = null;\n delete view.contextCache[lastUrl];\n }\n view.history[view.history.length - (options.reloadPrevious ? 2 : 1)] = url;\n }\n else {\n view.history.push(url);\n }\n \n // Unique history\n var historyBecameUnique = false;\n if (view.params.uniqueHistory) {\n var _history = view.history;\n var _url = url;\n if (view.params.uniqueHistoryIgnoreGetParameters) {\n _history = [];\n _url = url.split('?')[0];\n for (i = 0; i < view.history.length; i++) {\n _history.push(view.history[i].split('?')[0]);\n }\n }\n \n if (_history.indexOf(_url) !== _history.lastIndexOf(_url)) {\n view.history = view.history.slice(0, _history.indexOf(_url));\n view.history.push(url);\n historyBecameUnique = true;\n }\n }\n // Dom manipulations\n if (options.reloadPrevious) {\n oldPage = oldPage.prev('.page');\n newPage.insertBefore(oldPage);\n if (dynamicNavbar) {\n oldNavbarInner = oldNavbarInner.prev('.navbar-inner');\n newNavbarInner.insertAfter(oldNavbarInner);\n }\n }\n else {\n pagesContainer.append(newPage[0]);\n if (dynamicNavbar) navbar.append(newNavbarInner[0]);\n }\n // Remove Old Page And Navbar\n if (options.reload) {\n if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) {\n oldPage.addClass('cached');\n if (dynamicNavbar) oldNavbarInner.addClass('cached');\n }\n else {\n app.pageRemoveCallback(view, oldPage[0], reloadPosition);\n if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldPage);\n if (dynamicNavbar) app.router._remove(oldNavbarInner);\n }\n }\n \n // Page Init Events\n app.pageInitCallback(view, {\n pageContainer: newPage[0],\n url: url,\n position: options.reload ? reloadPosition : 'right',\n navbarInnerContainer: dynamicNavbar ? newNavbarInner && newNavbarInner[0] : undefined,\n oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined,\n context: t7_rendered.context || options.context,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData,\n reload: options.reload,\n reloadPrevious: options.reloadPrevious\n });\n \n // Navbar init event\n if (dynamicNavbar) {\n app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, options.reload ? reloadPosition : 'right');\n }\n \n if (options.reload) {\n view.allowPageChange = true;\n if (historyBecameUnique) view.refreshPreviousPage();\n return;\n }\n \n if (dynamicNavbar && animatePages) {\n app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'right');\n }\n // Force reLayout\n var clientLeft = newPage[0].clientLeft;\n \n // Before Anim Callback\n app.pageAnimCallback('before', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'right',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n \n function afterAnimation() {\n view.allowPageChange = true;\n newPage.removeClass('page-from-right-to-center page-on-right page-on-left').addClass('page-on-center');\n oldPage.removeClass('page-from-center-to-left page-on-center page-on-right').addClass('page-on-left');\n if (dynamicNavbar) {\n newNavbarInner.removeClass('navbar-from-right-to-center navbar-on-left navbar-on-right').addClass('navbar-on-center');\n oldNavbarInner.removeClass('navbar-from-center-to-left navbar-on-center navbar-on-right').addClass('navbar-on-left');\n }\n app.pageAnimCallback('after', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'right',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n if (app.params.pushState && view.main) app.pushStateClearQueue();\n if (!(view.params.swipeBackPage || view.params.preloadPreviousPage)) {\n if (view.params.domCache) {\n oldPage.addClass('cached');\n if (dynamicNavbar) oldNavbarInner.addClass('cached');\n }\n else {\n if (!(url.indexOf('#') === 0 && newPage.attr('data-page').indexOf('smart-select-') === 0)) {\n app.pageRemoveCallback(view, oldPage[0], 'left');\n if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldPage);\n if (dynamicNavbar) app.router._remove(oldNavbarInner);\n }\n }\n }\n if (view.params.uniqueHistory && historyBecameUnique) {\n view.refreshPreviousPage();\n }\n }\n if (animatePages) {\n // Set pages before animation\n if (app.params.material && app.params.materialPageLoadDelay) {\n setTimeout(function () {\n app.router.animatePages(oldPage, newPage, 'to-left', view);\n }, app.params.materialPageLoadDelay);\n }\n else {\n app.router.animatePages(oldPage, newPage, 'to-left', view);\n }\n \n // Dynamic navbar animation\n if (dynamicNavbar) {\n setTimeout(function() {\n app.router.animateNavbars(oldNavbarInner, newNavbarInner, 'to-left', view);\n }, 0);\n }\n newPage.animationEnd(function () {\n afterAnimation();\n });\n }\n else {\n if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform('');\n afterAnimation();\n }\n \n };\n \n app.router.load = function (view, options) {\n options = options || {};\n if (app.routerPreOptions) {\n options = app.routerPreOptions(view, options) || {};\n }\n if (options.component && app.componentLoader) {\n try {\n app.componentLoader(view, options, function (newOptions) {\n app.router.load(view, newOptions);\n });\n } catch (e) {}\n return;\n }\n if (app.router.preroute(view, options)) {\n return false;\n }\n var url = options.url;\n var content = options.content;\n var pageName = options.pageName;\n var pageElement = options.pageElement;\n if (pageName) {\n if (pageName.indexOf('?') > 0) {\n options.query = $.parseUrlQuery(pageName);\n options.pageName = pageName = pageName.split('?')[0];\n }\n }\n var template = options.template;\n if (view.params.reloadPages === true) options.reload = true;\n \n if (!view.allowPageChange) return false;\n if (url && view.url === url && !options.reload && !view.params.allowDuplicateUrls) return false;\n view.allowPageChange = false;\n if (app.xhr && view.xhr && view.xhr === app.xhr) {\n app.xhr.abort();\n app.xhr = false;\n }\n function proceed(content) {\n app.router.preprocess(view, content, url, function (content) {\n options.content = content;\n app.router._load(view, options);\n });\n }\n if (content || pageName || pageElement) {\n proceed(content);\n return;\n }\n else if (template) {\n app.router._load(view, options);\n return;\n }\n \n if (!options.url || options.url === '#') {\n view.allowPageChange = true;\n return;\n }\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n };\n \n app.router._back = function (view, options) {\n options = options || {};\n \n app.pluginHook('routerBack', view, options);\n \n var url = options.url,\n content = options.content,\n t7_rendered = {content: options.content}, // will be rendered using Template7\n template = options.template, // Template 7 compiled template\n animatePages = options.animatePages,\n preloadOnly = options.preloadOnly,\n pushState = options.pushState,\n ignoreCache = options.ignoreCache,\n force = options.force,\n pageName = options.pageName,\n pageElement = options.pageElement;\n \n var viewContainer = $(view.container),\n pagesContainer = $(view.pagesContainer),\n pagesInView = pagesContainer.children('.page:not(.cached)'),\n oldPage, newPage, oldNavbarInner, newNavbarInner, navbar, navbarInners, dynamicNavbar, manipulateDom = true;\n \n if (typeof animatePages === 'undefined') animatePages = view.params.animatePages;\n \n // Render with Template7\n if (app.params.template7Pages && typeof content === 'string' || template) {\n t7_rendered = app.router.template7Render(view, options);\n if (t7_rendered.content && !content) {\n content = t7_rendered.content;\n }\n }\n \n // Animation\n function afterAnimation() {\n app.pageBackCallback('after', view, {\n pageContainer: oldPage[0],\n url: url,\n position: 'center',\n oldPage: oldPage,\n newPage: newPage,\n });\n app.pageAnimCallback('after', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n app.router.afterBack(view, oldPage[0], newPage[0]);\n }\n function animateBack() {\n // Page before animation callback\n app.pageBackCallback('before', view, {\n pageContainer: oldPage[0],\n url: url,\n position: 'center',\n oldPage: oldPage,\n newPage: newPage,\n });\n app.pageAnimCallback('before', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n \n if (animatePages) {\n // Set pages before animation\n app.router.animatePages(newPage, oldPage, 'to-right', view);\n \n // Dynamic navbar animation\n if (dynamicNavbar) {\n setTimeout(function () {\n app.router.animateNavbars(newNavbarInner, oldNavbarInner, 'to-right', view);\n }, 0);\n }\n \n newPage.animationEnd(function () {\n afterAnimation();\n });\n }\n else {\n if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform('');\n afterAnimation();\n }\n }\n \n function parseNewPage() {\n app.router.temporaryDom.innerHTML = '';\n // Parse DOM\n if ((typeof content === 'string') || (url && (typeof content === 'string'))) {\n app.router.temporaryDom.innerHTML = t7_rendered.content;\n } else {\n if ('length' in content && content.length > 1) {\n for (var ci = 0; ci < content.length; ci++) {\n $(app.router.temporaryDom).append(content[ci]);\n }\n } else {\n $(app.router.temporaryDom).append(content);\n }\n }\n if (pageElement) newPage = $(pageElement);\n else newPage = app.router.findElement('.page', app.router.temporaryDom, view);\n \n if (view.params.dynamicNavbar) {\n // Find navbar\n newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view);\n }\n }\n function setPages() {\n // If pages not found or there are still more than one, exit\n if (!newPage || newPage.length === 0) {\n view.allowPageChange = true;\n return;\n }\n if (view.params.dynamicNavbar && typeof dynamicNavbar === 'undefined') {\n if (!newNavbarInner || newNavbarInner.length === 0) {\n dynamicNavbar = false;\n }\n else {\n dynamicNavbar = true;\n }\n }\n \n newPage.addClass('page-on-left').removeClass('cached');\n if (dynamicNavbar) {\n navbar = viewContainer.children('.navbar');\n navbarInners = navbar.find('.navbar-inner:not(.cached)');\n newNavbarInner.addClass('navbar-on-left').removeClass('cached');\n }\n // Remove/hide previous page in force mode\n if (force) {\n var pageToRemove, navbarToRemove;\n pageToRemove = $(pagesInView[pagesInView.length - 2]);\n \n if (dynamicNavbar) navbarToRemove = $(pageToRemove[0] && pageToRemove[0].f7RelatedNavbar || navbarInners[navbarInners.length - 2]);\n if (view.params.domCache && view.initialPages.indexOf(pageToRemove[0]) >= 0) {\n if (pageToRemove.length && pageToRemove[0] !== newPage[0]) pageToRemove.addClass('cached');\n if (dynamicNavbar && navbarToRemove.length && navbarToRemove[0] !== newNavbarInner[0]) {\n navbarToRemove.addClass('cached');\n }\n }\n else {\n var removeNavbar = dynamicNavbar && navbarToRemove.length;\n if (pageToRemove.length) {\n app.pageRemoveCallback(view, pageToRemove[0], 'right');\n if (removeNavbar) {\n app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]);\n }\n app.router._remove(pageToRemove);\n if (removeNavbar) app.router._remove(navbarToRemove);\n }\n else if (removeNavbar) {\n app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]);\n app.router._remove(navbarToRemove);\n }\n }\n pagesInView = pagesContainer.children('.page:not(.cached)');\n if (dynamicNavbar) {\n navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)');\n }\n if (view.history.indexOf(url) >= 0) {\n view.history = view.history.slice(0, view.history.indexOf(url) + 2);\n }\n else {\n if (view.history[[view.history.length - 2]]) {\n view.history[view.history.length - 2] = url;\n }\n else {\n view.history.unshift(url);\n }\n }\n }\n \n oldPage = $(pagesInView[pagesInView.length - 1]);\n if (view.params.domCache) {\n if (oldPage[0] === newPage[0]) {\n oldPage = pagesContainer.children('.page.page-on-center');\n if (oldPage.length === 0 && view.activePage) oldPage = $(view.activePage.container);\n }\n }\n \n if (dynamicNavbar && !oldNavbarInner) {\n oldNavbarInner = $(navbarInners[navbarInners.length - 1]);\n if (view.params.domCache) {\n if (oldNavbarInner[0] === newNavbarInner[0]) {\n oldNavbarInner = navbar.children('.navbar-inner.navbar-on-center:not(.cached)');\n }\n if (oldNavbarInner.length === 0) {\n oldNavbarInner = navbar.children('.navbar-inner[data-page=\"'+oldPage.attr('data-page')+'\"]');\n }\n }\n if (oldNavbarInner.length === 0 || newNavbarInner[0] === oldNavbarInner[0]) dynamicNavbar = false;\n }\n \n if (dynamicNavbar) {\n if (manipulateDom) newNavbarInner.insertBefore(oldNavbarInner);\n newNavbarInner[0].f7RelatedPage = newPage[0];\n newPage[0].f7RelatedNavbar = newNavbarInner[0];\n }\n if (manipulateDom) newPage.insertBefore(oldPage);\n \n // Page Init Events\n app.pageInitCallback(view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n navbarInnerContainer: dynamicNavbar ? newNavbarInner[0] : undefined,\n oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined,\n context: t7_rendered.context,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData,\n preloadOnly: preloadOnly\n });\n if (dynamicNavbar) {\n app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, 'right');\n }\n \n if (dynamicNavbar && newNavbarInner.hasClass('navbar-on-left') && animatePages) {\n app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'left');\n }\n \n if (preloadOnly) {\n view.allowPageChange = true;\n return;\n }\n \n // Update View's URL\n view.url = url;\n \n // Force reLayout\n var clientLeft = newPage[0].clientLeft;\n \n animateBack();\n \n // Push state\n if (app.params.pushState && view.main) {\n if (typeof pushState === 'undefined') pushState = true;\n if (!preloadOnly && history.state && pushState) {\n history.back();\n }\n }\n return;\n }\n \n // Simple go back when we have pages on left\n if (pagesInView.length > 1 && !force) {\n // Exit if only preloadOnly\n if (preloadOnly) {\n view.allowPageChange = true;\n return;\n }\n // Update View's URL\n view.url = view.history[view.history.length - 2];\n url = view.url;\n \n // Define old and new pages\n newPage = $(pagesInView[pagesInView.length - 2]);\n oldPage = $(pagesInView[pagesInView.length - 1]);\n \n // Dynamic navbar\n if (view.params.dynamicNavbar) {\n dynamicNavbar = true;\n // Find navbar\n navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)');\n newNavbarInner = $(navbarInners[0]);\n oldNavbarInner = $(navbarInners[1]);\n if (newNavbarInner.length === 0 || oldNavbarInner.length === 0 || oldNavbarInner[0] === newNavbarInner[0]) {\n dynamicNavbar = false;\n }\n }\n manipulateDom = false;\n setPages();\n return;\n }\n \n if (!force) {\n // Go back when there is no pages on left\n if (!preloadOnly) {\n view.url = view.history[view.history.length - 2];\n url = view.url;\n }\n \n if (content) {\n parseNewPage();\n setPages();\n return;\n }\n else if (pageName) {\n // Get dom cached pages\n newPage = $(viewContainer).find('.page[data-page=\"' + pageName + '\"]');\n if (view.params.dynamicNavbar) {\n newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page=\"' + pageName + '\"]');\n if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) {\n newNavbarInner = $(newPage[0].f7RelatedNavbar);\n }\n if (newNavbarInner.length === 0 && newPage[0].f7PageData) {\n newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer);\n }\n }\n setPages();\n return;\n }\n else if (url && url in view.pageElementsCache) {\n newPage = view.pageElementsCache[url].page;\n newNavbarInner = view.pageElementsCache[url].navbarInner;\n setPages();\n return;\n }\n else {\n view.allowPageChange = true;\n return;\n }\n }\n else {\n if (url && url === view.url || pageName && view.activePage && view.activePage.name === pageName) {\n view.allowPageChange = true;\n return;\n }\n // Go back with force url\n if (content) {\n parseNewPage();\n setPages();\n return;\n }\n else if (pageName && view.params.domCache) {\n if (pageName) url = '#' + pageName;\n \n newPage = $(viewContainer).find('.page[data-page=\"' + pageName + '\"]');\n if (newPage[0].f7PageData && newPage[0].f7PageData.url) {\n url = newPage[0].f7PageData.url;\n }\n if (view.params.dynamicNavbar) {\n newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page=\"' + pageName + '\"]');\n if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) {\n newNavbarInner = $(newPage[0].f7RelatedNavbar);\n }\n if (newNavbarInner.length === 0 && newPage[0].f7PageData) {\n newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer);\n }\n }\n setPages();\n return;\n }\n else if (pageElement && url) {\n newPage = $(pageElement);\n if (view.params.dynamicNavbar) {\n newNavbarInner = newPage.find('.navbar-inner').filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n });\n if (newNavbarInner.length > 0) {\n newPage.prepend(newNavbarInner);\n app.router._remove(newPage.find('.navbar').filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n }));\n }\n }\n setPages();\n return;\n }\n else {\n view.allowPageChange = true;\n return;\n }\n }\n \n };\n app.router.back = function (view, options) {\n options = options || {};\n if (app.routerPreOptions) {\n options = app.routerPreOptions(view, options) || {};\n }\n if (options.component && app.componentLoader) {\n try {\n app.componentLoader(view, options, function (newOptions) {\n app.router.load(view, newOptions);\n });\n } catch (e) {}\n return;\n }\n if (app.router.preroute(view, options, true)) {\n return false;\n }\n var url = options.url;\n var content = options.content;\n var pageName = options.pageName;\n var pageElement = options.pageElement;\n if (pageName) {\n if (pageName.indexOf('?') > 0) {\n options.query = $.parseUrlQuery(pageName);\n options.pageName = pageName = pageName.split('?')[0];\n }\n }\n var force = options.force;\n if (!view.allowPageChange) return false;\n view.allowPageChange = false;\n if (app.xhr && view.xhr && view.xhr === app.xhr) {\n app.xhr.abort();\n app.xhr = false;\n }\n var pagesInView = $(view.pagesContainer).find('.page:not(.cached)');\n \n function proceed(content) {\n app.router.preprocess(view, content, url, function (content) {\n options.content = content;\n app.router._back(view, options);\n });\n }\n if (pagesInView.length > 1 && !force) {\n // Simple go back to previos page in view\n app.router._back(view, options);\n return;\n }\n if (!force) {\n url = view.history[view.history.length - 2] || options.url;\n if (!options.url) options.url = url;\n if (!url) {\n view.allowPageChange = true;\n return;\n }\n if (url.indexOf('#') === 0 && view.contentCache[url]) {\n proceed(view.contentCache[url]);\n return;\n }\n else if (url.indexOf('#') === 0 && view.params.domCache) {\n if (!pageName) options.pageName = url.split('#')[1];\n proceed();\n return;\n }\n else if (url && url in view.pageElementsCache) {\n proceed();\n }\n else if (url.indexOf('#') !== 0) {\n // Load ajax page\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n return;\n }\n }\n else {\n // Go back with force url\n if (!url && content) {\n proceed(content);\n return;\n }\n else if (!url && pageName) {\n if (pageName) url = '#' + pageName;\n proceed();\n return;\n }\n else if (url && pageElement) {\n proceed();\n return;\n }\n else if (url) {\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n return;\n }\n }\n view.allowPageChange = true;\n return;\n };\n \n app.router.afterBack = function (view, oldPage, newPage) {\n // Remove old page and set classes on new one\n oldPage = $(oldPage);\n newPage = $(newPage);\n \n if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) {\n oldPage.removeClass('page-from-center-to-right').addClass('cached');\n }\n else {\n app.pageRemoveCallback(view, oldPage[0], 'right');\n app.router._remove(oldPage);\n }\n \n newPage.removeClass('page-from-left-to-center page-on-left').addClass('page-on-center');\n view.allowPageChange = true;\n \n // Update View's History\n var previousURL = view.history.pop();\n \n var newNavbar;\n \n // Updated dynamic navbar\n if (view.params.dynamicNavbar) {\n var inners = $(view.container).children('.navbar').find('.navbar-inner:not(.cached)');\n var oldNavbar = $(oldPage[0].f7RelatedNavbar || inners[1]);\n if (view.params.domCache && view.initialNavbars.indexOf(oldNavbar[0]) >= 0) {\n oldNavbar.removeClass('navbar-from-center-to-right').addClass('cached');\n }\n else {\n app.navbarRemoveCallback(view, oldPage[0], undefined, oldNavbar[0]);\n app.router._remove(oldNavbar);\n }\n newNavbar = $(inners[0]).removeClass('navbar-on-left navbar-from-left-to-center').addClass('navbar-on-center');\n }\n \n // Remove pages in dom cache\n if (view.params.domCache) {\n $(view.container).find('.page.cached').each(function () {\n var page = $(this);\n var pageUrl = page[0].f7PageData && page[0].f7PageData.url;\n if (pageUrl && view.history.indexOf(pageUrl) < 0 && view.initialPages.indexOf(this) < 0) {\n app.pageRemoveCallback(view, page[0], 'right');\n if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.navbarRemoveCallback(view, page[0], undefined, page[0].f7RelatedNavbar);\n app.router._remove(page);\n if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.router._remove(page[0].f7RelatedNavbar);\n }\n });\n }\n \n // Check previous page is content based only and remove it from content cache\n if (!view.params.domCache &&\n previousURL &&\n previousURL.indexOf('#') > -1 &&\n (previousURL in view.contentCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.contentCache[previousURL] = null;\n delete view.contentCache[previousURL];\n }\n if (previousURL &&\n (previousURL in view.pageElementsCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.pageElementsCache[previousURL] = null;\n delete view.pageElementsCache[previousURL];\n }\n // Check for context cache\n if (previousURL &&\n (previousURL in view.contextCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.contextCache[previousURL] = null;\n delete view.contextCache[previousURL];\n }\n \n if (app.params.pushState && view.main) app.pushStateClearQueue();\n \n // Preload previous page\n if (view.params.preloadPreviousPage) {\n if (view.params.domCache && view.history.length > 1) {\n var preloadUrl = view.history[view.history.length - 2];\n var previousPage;\n var previousNavbar;\n if (preloadUrl && view.pagesCache[preloadUrl]) {\n // Load by page name\n previousPage = $(view.container).find('.page[data-page=\"' + view.pagesCache[preloadUrl] + '\"]');\n if (previousPage.next('.page')[0] !== newPage[0]) previousPage.insertBefore(newPage);\n if (newNavbar) {\n previousNavbar = $(view.container).children('.navbar').find('.navbar-inner[data-page=\"' + view.pagesCache[preloadUrl] + '\"]');\n if(!previousNavbar || previousNavbar.length === 0) previousNavbar = newNavbar.prev('.navbar-inner.cached');\n if (previousNavbar.next('.navbar-inner')[0] !== newNavbar[0]) previousNavbar.insertBefore(newNavbar);\n }\n }\n else {\n // Just load previous page\n previousPage = newPage.prev('.page.cached');\n if (newNavbar) previousNavbar = newNavbar.prev('.navbar-inner.cached');\n }\n if (previousPage && previousPage.length > 0) previousPage.removeClass('cached page-on-right page-on-center').addClass('page-on-left');\n if (previousNavbar && previousNavbar.length > 0) previousNavbar.removeClass('cached navbar-on-right navbar-on-center').addClass('navbar-on-left');\n }\n else {\n app.router.back(view, {preloadOnly: true});\n }\n }\n };\n \n"," /*======================================================\n ************ Modals ************\n ======================================================*/\n var _modalTemplateTempDiv = document.createElement('div');\n app.modalStack = [];\n app.modalStackClearQueue = function () {\n if (app.modalStack.length) {\n (app.modalStack.shift())();\n }\n };\n app.modal = function (params) {\n params = params || {};\n var modalHTML = '';\n if (app.params.modalTemplate) {\n if (!app._compiledTemplates.modal) app._compiledTemplates.modal = t7.compile(app.params.modalTemplate);\n modalHTML = app._compiledTemplates.modal(params);\n }\n else {\n var buttonsHTML = '';\n if (params.buttons && params.buttons.length > 0) {\n for (var i = 0; i < params.buttons.length; i++) {\n buttonsHTML += '' + params.buttons[i].text + '';\n }\n }\n var titleHTML = params.title ? '
' + params.title + '
' : '';\n var textHTML = params.text ? '
' + params.text + '
' : '';\n var afterTextHTML = params.afterText ? params.afterText : '';\n var noButtons = !params.buttons || params.buttons.length === 0 ? 'modal-no-buttons' : '';\n var verticalButtons = params.verticalButtons ? 'modal-buttons-vertical': '';\n var modalButtonsHTML = params.buttons && params.buttons.length > 0 ? '
' + buttonsHTML + '
' : '';\n modalHTML = '
' + (titleHTML + textHTML + afterTextHTML) + '
' + modalButtonsHTML + '
';\n }\n \n _modalTemplateTempDiv.innerHTML = modalHTML;\n \n var modal = $(_modalTemplateTempDiv).children();\n \n app.root.append(modal[0]);\n \n // Add events on buttons\n modal.find('.modal-button').each(function (index, el) {\n $(el).on('click', function (e) {\n if (params.buttons[index].close !== false) app.closeModal(modal);\n if (params.buttons[index].onClick) params.buttons[index].onClick(modal, e);\n if (params.onClick) params.onClick(modal, index);\n });\n });\n app.openModal(modal);\n return modal[0];\n };\n app.alert = function (text, title, callbackOk) {\n if (typeof title === 'function') {\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n buttons: [ {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} ]\n });\n };\n app.confirm = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n buttons: [\n {text: app.params.modalButtonCancel, onClick: callbackCancel},\n {text: app.params.modalButtonOk, bold: true, onClick: callbackOk}\n ]\n });\n };\n app.prompt = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n if (index === 0 && callbackCancel) callbackCancel($(modal).find('.modal-text-input').val());\n if (index === 1 && callbackOk) callbackOk($(modal).find('.modal-text-input').val());\n }\n });\n };\n app.modalLogin = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n var username = $(modal).find('.modal-text-input[name=\"modal-username\"]').val();\n var password = $(modal).find('.modal-text-input[name=\"modal-password\"]').val();\n if (index === 0 && callbackCancel) callbackCancel(username, password);\n if (index === 1 && callbackOk) callbackOk(username, password);\n }\n });\n };\n app.modalPassword = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n var password = $(modal).find('.modal-text-input[name=\"modal-password\"]').val();\n if (index === 0 && callbackCancel) callbackCancel(password);\n if (index === 1 && callbackOk) callbackOk(password);\n }\n });\n };\n app.showPreloader = function (title) {\n return app.modal({\n title: title || app.params.modalPreloaderTitle,\n text: '
' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
',\n cssClass: 'modal-preloader'\n });\n };\n app.hidePreloader = function () {\n app.closeModal('.modal-preloader');\n };\n app.showIndicator = function () {\n if ($('.preloader-indicator-overlay').length > 0) return;\n app.root.append('
' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
');\n };\n app.hideIndicator = function () {\n $('.preloader-indicator-overlay, .preloader-indicator-modal').remove();\n };\n // Action Sheet\n app.actions = function (target, params, animated) {\n var toPopover = false, modal, groupSelector, buttonSelector;\n if (arguments.length === 1 || arguments.length === 2 && typeof arguments[1] === 'boolean') {\n // Actions\n params = arguments[0];\n animated = arguments[1];\n }\n else {\n // Popover\n if (app.device.ios) {\n if (app.device.ipad) toPopover = true;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n if (typeof animated === 'undefined') animated = true;\n \n params = params || [];\n \n if (params.length > 0 && !Array.isArray(params[0])) {\n params = [params];\n }\n var modalHTML;\n if (toPopover) {\n var actionsToPopoverTemplate = app.params.modalActionsToPopoverTemplate ||\n '
' +\n '
' +\n '{{#each this}}' +\n '
' +\n '
    ' +\n '{{#each this}}' +\n '{{#if label}}' +\n '
  • {{text}}
  • ' +\n '{{else}}' +\n '
  • {{text}}
  • ' +\n '{{/if}}' +\n '{{/each}}' +\n '
' +\n '
' +\n '{{/each}}' +\n '
' +\n '
';\n if (!app._compiledTemplates.actionsToPopover) {\n app._compiledTemplates.actionsToPopover = t7.compile(actionsToPopoverTemplate);\n }\n var popoverHTML = app._compiledTemplates.actionsToPopover(params);\n modal = $(app.popover(popoverHTML, target, true, animated));\n groupSelector = '.list-block ul';\n buttonSelector = '.list-button';\n }\n else {\n if (app.params.modalActionsTemplate) {\n if (!app._compiledTemplates.actions) app._compiledTemplates.actions = t7.compile(app.params.modalActionsTemplate);\n modalHTML = app._compiledTemplates.actions(params);\n }\n else {\n var buttonsHTML = '';\n for (var i = 0; i < params.length; i++) {\n for (var j = 0; j < params[i].length; j++) {\n if (j === 0) buttonsHTML += '
';\n var button = params[i][j];\n var buttonClass = button.label ? 'actions-modal-label' : 'actions-modal-button';\n if (button.bold) buttonClass += ' actions-modal-button-bold';\n if (button.color) buttonClass += ' color-' + button.color;\n if (button.bg) buttonClass += ' bg-' + button.bg;\n if (button.disabled) buttonClass += ' disabled';\n buttonsHTML += '
' + button.text + '
';\n if (j === params[i].length - 1) buttonsHTML += '
';\n }\n }\n modalHTML = '
' + buttonsHTML + '
';\n }\n _modalTemplateTempDiv.innerHTML = modalHTML;\n modal = $(_modalTemplateTempDiv).children();\n app.root.append(modal[0]);\n groupSelector = '.actions-modal-group';\n buttonSelector = '.actions-modal-button';\n }\n \n var groups = modal.find(groupSelector);\n groups.each(function (index, el) {\n var groupIndex = index;\n $(el).children().each(function (index, el) {\n var buttonIndex = index;\n var buttonParams = params[groupIndex][buttonIndex];\n var clickTarget;\n if (!toPopover && $(el).is(buttonSelector)) clickTarget = $(el);\n if (toPopover && $(el).find(buttonSelector).length > 0) clickTarget = $(el).find(buttonSelector);\n \n if (clickTarget) {\n clickTarget.on('click', function (e) {\n if (buttonParams.close !== false) app.closeModal(modal);\n if (buttonParams.onClick) buttonParams.onClick(modal, e);\n });\n }\n });\n });\n if (!toPopover) app.openModal(modal, animated);\n return modal[0];\n };\n app.popover = function (modal, target, removeOnClose, animated, closeByOutside) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof closeByOutside === 'undefined') closeByOutside = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n var _modal = document.createElement('div');\n _modal.innerHTML = modal.trim();\n if (_modal.childNodes.length > 0) {\n modal = _modal.childNodes[0];\n if (removeOnClose) modal.classList.add('remove-on-close');\n if (!closeByOutside) modal.classList.add('ignore-close-by-outside');\n app.root.append(modal);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n target = $(target);\n if (modal.length === 0 || target.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n if (!closeByOutside) modal.addClass.add('ignore-close-by-outside');\n app.root.append(modal[0]);\n }\n if (modal.find('.popover-angle').length === 0 && !app.params.material) {\n modal.append('
');\n }\n modal.show();\n \n var material = app.params.material;\n \n function sizePopover() {\n modal.css({left: '', top: ''});\n var modalWidth = modal.width();\n var modalHeight = modal.height(); // 13 - height of angle\n var modalAngle, modalAngleSize = 0, modalAngleLeft, modalAngleTop;\n if (!material) {\n modalAngle = modal.find('.popover-angle');\n modalAngleSize = modalAngle.width() / 2;\n modalAngle.removeClass('on-left on-right on-top on-bottom').css({left: '', top: ''});\n }\n else {\n modal.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom').css({left: '', top: ''});\n }\n \n var targetWidth = target.outerWidth();\n var targetHeight = target.outerHeight();\n var targetOffset = target.offset();\n var targetOffsetLeft = targetOffset.left - app.left;\n var targetOffsetTop = targetOffset.top - app.top;\n var targetParentPage = target.parents('.page');\n if (targetParentPage.length > 0) {\n targetOffsetTop = targetOffsetTop - targetParentPage[0].scrollTop;\n }\n \n var modalTop = 0;\n var modalLeft = 0;\n var diff = 0;\n // Top Position\n var modalPosition = material ? 'bottom' : 'top';\n if (material) {\n if (modalHeight < app.height - targetOffsetTop - targetHeight) {\n // On bottom\n modalPosition = 'bottom';\n modalTop = targetOffsetTop;\n }\n else if (modalHeight < targetOffsetTop) {\n // On top\n modalTop = targetOffsetTop - modalHeight + targetHeight;\n modalPosition = 'top';\n }\n else {\n // On middle\n modalPosition = 'bottom';\n modalTop = targetOffsetTop;\n }\n \n if (modalTop <= 0) {\n modalTop = 8;\n }\n else if (modalTop + modalHeight >= app.height) {\n modalTop = app.height - modalHeight - 8;\n }\n \n // Horizontal Position\n modalLeft = targetOffsetLeft;\n if (modalLeft + modalWidth >= app.width - 8) {\n modalLeft = targetOffsetLeft + targetWidth - modalWidth - 8;\n }\n if (modalLeft < 8) {\n modalLeft = 8;\n }\n if (modalPosition === 'top') {\n modal.addClass('popover-on-top');\n }\n if (modalPosition === 'bottom') {\n modal.addClass('popover-on-bottom');\n }\n if (target.hasClass('floating-button-to-popover') && !modal.hasClass('modal-in')) {\n modal.addClass('popover-floating-button');\n var diffX = (modalLeft + modalWidth / 2) - (targetOffsetLeft + targetWidth / 2),\n diffY = (modalTop + modalHeight / 2) - (targetOffsetTop + targetHeight / 2);\n target\n .addClass('floating-button-to-popover-in')\n .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0)')\n .transitionEnd(function (e) {\n if (!target.hasClass('floating-button-to-popover-in')) return;\n target\n .addClass('floating-button-to-popover-scale')\n .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0) scale(' + (modalWidth/targetWidth) + ', ' + (modalHeight/targetHeight) + ')');\n });\n \n modal.once('popover:close', function () {\n target\n .removeClass('floating-button-to-popover-in floating-button-to-popover-scale')\n .addClass('floating-button-to-popover-out')\n .transform('')\n .transitionEnd(function (e) {\n target.removeClass('floating-button-to-popover-out');\n });\n });\n modal.once('popover:closed', function () {\n modal.removeClass('popover-floating-button');\n });\n }\n else if (target.hasClass('floating-button-to-popover') && modal.hasClass('modal-in')) {\n modalLeft = targetOffsetLeft;\n modalTop = targetOffsetTop;\n }\n \n }\n else {\n if ((modalHeight + modalAngleSize) < targetOffsetTop) {\n // On top\n modalTop = targetOffsetTop - modalHeight - modalAngleSize;\n }\n else if ((modalHeight + modalAngleSize) < app.height - targetOffsetTop - targetHeight) {\n // On bottom\n modalPosition = 'bottom';\n modalTop = targetOffsetTop + targetHeight + modalAngleSize;\n }\n else {\n // On middle\n modalPosition = 'middle';\n modalTop = targetHeight / 2 + targetOffsetTop - modalHeight / 2;\n diff = modalTop;\n if (modalTop <= 0) {\n modalTop = 5;\n }\n else if (modalTop + modalHeight >= app.height) {\n modalTop = app.height - modalHeight - 5;\n }\n diff = diff - modalTop;\n }\n \n // Horizontal Position\n if (modalPosition === 'top' || modalPosition === 'bottom') {\n modalLeft = targetWidth / 2 + targetOffsetLeft - modalWidth / 2;\n diff = modalLeft;\n if (modalLeft < 5) modalLeft = 5;\n if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5;\n if (modalPosition === 'top') {\n modalAngle.addClass('on-bottom');\n }\n if (modalPosition === 'bottom') {\n modalAngle.addClass('on-top');\n }\n diff = diff - modalLeft;\n modalAngleLeft = (modalWidth / 2 - modalAngleSize + diff);\n modalAngleLeft = Math.max(Math.min(modalAngleLeft, modalWidth - modalAngleSize * 2 - 13), 13);\n modalAngle.css({left: modalAngleLeft + 'px'});\n \n }\n else if (modalPosition === 'middle') {\n modalLeft = targetOffsetLeft - modalWidth - modalAngleSize;\n modalAngle.addClass('on-right');\n if (modalLeft < 5 || (modalLeft + modalWidth > app.width)) {\n if (modalLeft < 5) modalLeft = targetOffsetLeft + targetWidth + modalAngleSize;\n if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5;\n modalAngle.removeClass('on-right').addClass('on-left');\n }\n modalAngleTop = (modalHeight / 2 - modalAngleSize + diff);\n modalAngleTop = Math.max(Math.min(modalAngleTop, modalHeight - modalAngleSize * 2 - 13), 13);\n modalAngle.css({top: modalAngleTop + 'px'});\n }\n }\n \n \n // Apply Styles\n modal.css({top: modalTop + 'px', left: modalLeft + 'px'});\n }\n \n sizePopover();\n \n app.onResize(sizePopover);\n \n modal.on('popover:close', function () {\n app.offResize(sizePopover);\n });\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.popup = function (modal, removeOnClose, animated) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n var _modal = document.createElement('div');\n _modal.innerHTML = modal.trim();\n if (_modal.childNodes.length > 0) {\n modal = _modal.childNodes[0];\n if (removeOnClose) modal.classList.add('remove-on-close');\n app.root.append(modal);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n if (modal.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n modal.show();\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.pickerModal = function (modal, removeOnClose, animated) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n modal = $(modal);\n if (modal.length > 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n if (modal.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n if ($('.picker-modal.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) {\n app.closeModal('.picker-modal.modal-in:not(.modal-out)');\n }\n modal.show();\n app.openModal(modal, animated);\n return modal[0];\n };\n app.loginScreen = function (modal, animated) {\n if (!modal) modal = '.login-screen';\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal);\n if (modal.length === 0) return false;\n if ($('.login-screen.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) {\n app.closeModal('.login-screen.modal-in:not(.modal-out)');\n }\n modal.show();\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.openModal = function (modal, animated) {\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal);\n modal[animated ? 'removeClass' : 'addClass']('not-animated');\n \n var isModal = modal.hasClass('modal');\n var isPopover = modal.hasClass('popover');\n var isPopup = modal.hasClass('popup');\n var isLoginScreen = modal.hasClass('login-screen');\n var isPickerModal = modal.hasClass('picker-modal');\n var isActions = modal.hasClass('actions-modal');\n \n // Modal Event Prefix\n var modalType = 'modal';\n if (isPopover) modalType = 'popover';\n if (isPopup) modalType = 'popup';\n if (isLoginScreen) modalType = 'loginscreen';\n if (isPickerModal) modalType = 'picker';\n if (isActions) modalType = 'actions';\n \n if ($('.modal.modal-in:not(.modal-out)').length && app.params.modalStack && isModal) {\n app.modalStack.push(function () {\n app.openModal(modal);\n });\n return;\n }\n \n // do nothing if this modal already shown\n if (true === modal.data('f7-modal-shown')) {\n return;\n }\n modal.data('f7-modal-shown', true);\n \n // Move modal\n var modalParent = modal.parent();\n if (app.params.modalsMoveToRoot && !modalParent.is(app.root)) {\n app.root.append(modal);\n modal.once(modalType + ':closed', function() {\n modalParent.append(modal);\n });\n }\n \n modal.once(modalType + ':close', function() {\n modal.removeData('f7-modal-shown');\n });\n \n if (isModal) {\n modal.show();\n modal.css({\n marginTop: - Math.round(modal.outerHeight() / 2) + 'px'\n });\n }\n \n var overlay;\n if (!isLoginScreen && !isPickerModal) {\n if ($('.modal-overlay').length === 0 && !isPopup) {\n app.root.append('
');\n }\n if ($('.popup-overlay').length === 0 && isPopup) {\n app.root.append('
');\n }\n overlay = isPopup ? $('.popup-overlay') : $('.modal-overlay');\n }\n if (app.params.material && isPickerModal) {\n if (modal.hasClass('picker-calendar')) {\n if ($('.picker-modal-overlay').length === 0 && !isPopup) {\n app.root.append('
');\n }\n overlay = $('.picker-modal-overlay');\n }\n }\n if (overlay) {\n overlay[animated ? 'removeClass' : 'addClass']('not-animated');\n }\n \n //Make sure that styles are applied, trigger relayout;\n var clientLeft = modal[0].clientLeft;\n \n // Trugger open event\n modal.trigger('open ' + modalType + ':open');\n \n // Picker modal body class\n if (isPickerModal) {\n $('body').addClass('with-picker-modal');\n }\n \n // Init Pages and Navbars in modal\n if (modal.find('.' + app.params.viewClass).length > 0) {\n modal.find('.page').each(function () {\n app.initPageWithCallback(this);\n });\n modal.find('.navbar').each(function () {\n app.initNavbarWithCallback(this);\n });\n }\n \n // Classes for transition in\n if (!isLoginScreen && !isPickerModal) overlay.addClass('modal-overlay-visible');\n if (app.params.material && isPickerModal && overlay) overlay.addClass('modal-overlay-visible');\n if (animated) {\n modal.removeClass('modal-out').addClass('modal-in').transitionEnd(function (e) {\n if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed');\n else modal.trigger('opened ' + modalType + ':opened');\n });\n }\n else {\n modal.removeClass('modal-out').addClass('modal-in');\n modal.trigger('opened ' + modalType + ':opened');\n }\n return true;\n };\n app.closeModal = function (modal, animated) {\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal || '.modal-in');\n if (typeof modal !== 'undefined' && modal.length === 0) {\n return;\n }\n modal[animated ? 'removeClass' : 'addClass']('not-animated');\n var isModal = modal.hasClass('modal');\n var isPopover = modal.hasClass('popover');\n var isPopup = modal.hasClass('popup');\n var isLoginScreen = modal.hasClass('login-screen');\n var isPickerModal = modal.hasClass('picker-modal');\n var isActions = modal.hasClass('actions-modal');\n \n // Modal Event Prefix\n var modalType = 'modal';\n if (isPopover) modalType = 'popover';\n if (isPopup) modalType = 'popup';\n if (isLoginScreen) modalType = 'loginscreen';\n if (isPickerModal) modalType = 'picker';\n if (isActions) modalType = 'actions';\n \n var removeOnClose = modal.hasClass('remove-on-close');\n \n // ignore close popover\n if (isPopover && !removeOnClose && modal.hasClass('ignore-close-by-outside')) {\n \treturn;\n }\n \n // For Actions\n var keepOnClose = modal.hasClass('keep-on-close');\n \n var overlay;\n \n if (isPopup) overlay = $('.popup-overlay');\n else {\n if (isPickerModal && app.params.material) overlay = $('.picker-modal-overlay');\n else if (!isPickerModal) overlay = $('.modal-overlay');\n }\n \n if (isPopup){\n if (modal.length === $('.popup.modal-in').length) {\n overlay.removeClass('modal-overlay-visible');\n }\n }\n else if (overlay && overlay.length > 0) {\n overlay.removeClass('modal-overlay-visible');\n }\n if (overlay) overlay[animated ? 'removeClass' : 'addClass']('not-animated');\n \n modal.trigger('close ' + modalType + ':close');\n \n // Picker modal body class\n if (isPickerModal) {\n $('body').removeClass('with-picker-modal');\n $('body').addClass('picker-modal-closing');\n }\n \n if (!(isPopover && !app.params.material)) {\n if (animated) {\n modal.removeClass('modal-in').addClass('modal-out').transitionEnd(function (e) {\n if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed');\n else {\n modal.trigger('opened ' + modalType + ':opened');\n if (isPopover) return;\n }\n \n if (isPickerModal) {\n $('body').removeClass('picker-modal-closing');\n }\n if (isPopup || isLoginScreen || isPickerModal || isPopover) {\n modal.removeClass('modal-out').hide();\n if (removeOnClose && modal.length > 0) {\n modal.remove();\n }\n }\n else if (!keepOnClose) {\n modal.remove();\n }\n });\n }\n else {\n modal.trigger('closed ' + modalType + ':closed');\n modal.removeClass('modal-in modal-out');\n if (isPickerModal) {\n $('body').removeClass('picker-modal-closing');\n }\n if (isPopup || isLoginScreen || isPickerModal || isPopover) {\n modal.hide();\n if (removeOnClose && modal.length > 0) {\n modal.remove();\n }\n }\n else if (!keepOnClose) {\n modal.remove();\n }\n }\n if (isModal && app.params.modalStack) {\n app.modalStackClearQueue();\n }\n }\n else {\n modal.removeClass('modal-in modal-out not-animated').trigger('closed ' + modalType + ':closed').hide();\n if (removeOnClose) {\n modal.remove();\n }\n }\n return true;\n };\n \n"," /*===============================================================================\n ************ Progress Bar ************\n ===============================================================================*/\n app.setProgressbar = function (container, progress, speed) {\n container = $(container || app.root);\n if (container.length === 0) return;\n if (progress) progress = Math.min(Math.max(progress, 0), 100);\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar');\n }\n if (progressbar.length === 0 || progressbar.hasClass('progressbar-infinite')) return;\n var clientLeft = progressbar[0].clientLeft;\n progressbar.children('span').transform('translate3d(' + (-100 + progress) + '%,0,0)');\n if (typeof speed !== 'undefined') {\n progressbar.children('span').transition(speed);\n }\n else {\n progressbar.children('span').transition('');\n }\n return progressbar[0];\n };\n app.showProgressbar = function (container, progress, color) {\n if (typeof container === 'number') {\n container = app.root;\n progress = arguments[0];\n color = arguments[1];\n }\n if (progress && typeof progress === 'string' && parseFloat(progress) !== progress * 1) {\n color = progress;\n progress = undefined;\n }\n container = $(container || app.root);\n if (container.length === 0) return;\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)');\n if (progressbar.length === 0) {\n // Create one\n if (typeof progress !== 'undefined') {\n // Determined\n progressbar = $('');\n }\n else {\n // Infinite\n progressbar = $('');\n }\n container.append(progressbar);\n }\n }\n if (progress) app.setProgressbar(container, progress);\n return progressbar[0];\n };\n app.hideProgressbar = function (container) {\n container = $(container || app.root);\n if (container.length === 0) return;\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar, .progressbar-infinite');\n }\n if (progressbar.length === 0 || !progressbar.hasClass('progressbar-in') || progressbar.hasClass('progressbar-out')) return;\n progressbar.removeClass('progressbar-in').addClass('progressbar-out').animationEnd(function () {\n progressbar.remove();\n progressbar = null;\n });\n return;\n };\n app.initPageProgressbar = function (pageContainer) {\n pageContainer = $(pageContainer);\n pageContainer.find('.progressbar').each(function () {\n var p = $(this);\n if (p.children('span').length === 0) p.append('');\n if (p.attr('data-progress')) app.setProgressbar(p, p.attr('data-progress'));\n });\n };\n"," /*======================================================\n ************ Panels ************\n ======================================================*/\n app.allowPanelOpen = true;\n app.openPanel = function (panelPosition, animated) {\n if (typeof animated === 'undefined') animated = true;\n if (!app.allowPanelOpen) return false;\n var panel = $('.panel-' + panelPosition);\n if (panel.length === 0 || panel.hasClass('active') || panel.hasClass('panel-visible-by-breakpoint')) return false;\n app.closePanel(); // Close if some panel is opened\n app.allowPanelOpen = false;\n var effect = panel.hasClass('panel-reveal') ? 'reveal' : 'cover';\n panel[animated ? 'removeClass' : 'addClass']('not-animated');\n panel.css({display: 'block'}).addClass('active');\n panel.trigger('open panel:open');\n \n var panelOverlay = $('.panel-overlay');\n panelOverlay[animated ? 'removeClass' : 'addClass']('not-animated');\n panelOverlay.show();\n \n if (panel.find('.' + app.params.viewClass).length > 0) {\n if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]);\n }\n \n // Trigger reLayout\n var clientLeft = panel[0].clientLeft;\n \n // Transition End;\n var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : panel;\n \n function panelTransitionEnd() {\n transitionEndTarget.transitionEnd(function (e) {\n if ($(e.target).is(transitionEndTarget)) {\n if (panel.hasClass('active')) {\n panel.trigger('opened panel:opened');\n }\n else {\n panel.trigger('closed panel:closed');\n }\n panelOverlay.css({display: ''});\n app.allowPanelOpen = true;\n }\n else panelTransitionEnd();\n });\n }\n if (animated) {\n panelTransitionEnd();\n }\n else {\n panel.trigger('opened panel:opened');\n panelOverlay.css({display: ''});\n app.allowPanelOpen = true;\n }\n \n $('body').addClass('with-panel-' + panelPosition + '-' + effect);\n return true;\n };\n app.closePanel = function (animated) {\n if (typeof animated === 'undefined') animated = true;\n var activePanel = $('.panel.active');\n if (activePanel.length === 0 || activePanel.hasClass('panel-visible-by-breakpoint')) return false;\n var effect = activePanel.hasClass('panel-reveal') ? 'reveal' : 'cover';\n var panelPosition = activePanel.hasClass('panel-left') ? 'left' : 'right';\n activePanel[animated ? 'removeClass' : 'addClass']('not-animated');\n activePanel.removeClass('active');\n \n var panelOverlay = $('.panel-overlay');\n panelOverlay.removeClass('not-animated');\n \n var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : activePanel;\n activePanel.trigger('close panel:close');\n app.allowPanelOpen = false;\n if (animated) {\n transitionEndTarget.transitionEnd(function () {\n if (activePanel.hasClass('active')) return;\n activePanel.css({display: ''});\n activePanel.trigger('closed panel:closed');\n $('body').removeClass('panel-closing');\n app.allowPanelOpen = true;\n });\n $('body').addClass('panel-closing').removeClass('with-panel-' + panelPosition + '-' + effect);\n }\n else {\n activePanel.css({display: ''});\n activePanel.trigger('closed panel:closed');\n activePanel.removeClass('not-animated');\n $('body').removeClass('with-panel-' + panelPosition + '-' + effect);\n app.allowPanelOpen = true;\n }\n };\n /*======================================================\n ************ Panels breakpoints ************\n ======================================================*/\n app.initPanelsBreakpoints = function () {\n var panelLeft = $('.panel-left');\n var panelRight = $('.panel-right');\n var views = app.root.children('.views');\n var wasVisible;\n function setPanels() {\n // Left Panel\n if (app.params.panelLeftBreakpoint && panelLeft.length > 0) {\n wasVisible = panelLeft.hasClass('panel-visible-by-breakpoint');\n if (app.width >= app.params.panelLeftBreakpoint) {\n if (!wasVisible) {\n $('body').removeClass('with-panel-left-reveal with-panel-left-cover');\n panelLeft.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active');\n panelLeft.trigger('open panel:open opened panel:opened');\n views.css({\n 'margin-left': panelLeft.width() + 'px'\n });\n app.allowPanelOpen = true;\n }\n }\n else {\n if (wasVisible) {\n panelLeft.css('display', '').removeClass('panel-visible-by-breakpoint active');\n panelLeft.trigger('close panel:close closed panel:closed');\n views.css({\n 'margin-left': ''\n });\n app.allowPanelOpen = true;\n }\n }\n }\n // Right Panel\n if (app.params.panelRightBreakpoint && panelRight.length > 0) {\n wasVisible = panelRight.hasClass('panel-visible-by-breakpoint');\n if (app.width >= app.params.panelRightBreakpoint) {\n if (!wasVisible) {\n $('body').removeClass('with-panel-right-reveal with-panel-right-cover');\n panelRight.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active');\n panelRight.trigger('open panel:open opened panel:opened');\n views.css({\n 'margin-right': panelRight.width() + 'px'\n });\n app.allowPanelOpen = true;\n }\n }\n else {\n if (wasVisible) {\n panelRight.css('display', '').removeClass('panel-visible-by-breakpoint active');\n panelRight.trigger('close panel:close closed panel:closed');\n views.css({\n 'margin-right': ''\n });\n app.allowPanelOpen = true;\n }\n }\n }\n }\n app.onResize(setPanels);\n setPanels();\n };\n /*======================================================\n ************ Swipe panels ************\n ======================================================*/\n app.initSwipePanels = function () {\n var panel, side;\n if (app.params.swipePanel) {\n panel = $('.panel.panel-' + app.params.swipePanel);\n side = app.params.swipePanel;\n if (panel.length === 0 && side !== 'both') return;\n }\n else {\n if (app.params.swipePanelOnlyClose) {\n if ($('.panel').length === 0) return;\n }\n else return;\n }\n \n var panelOverlay = $('.panel-overlay');\n var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, translate, overlayOpacity, opened, panelWidth, effect, direction;\n var views = $('.' + app.params.viewsClass);\n \n function handleTouchStart(e) {\n if (!app.allowPanelOpen || (!app.params.swipePanel && !app.params.swipePanelOnlyClose) || isTouched) return;\n if ($('.modal-in, .photo-browser-in').length > 0) return;\n if (!(app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose)) {\n if ($('.panel.active').length > 0 && !panel.hasClass('active')) return;\n }\n if (e.target && e.target.nodeName.toLowerCase() === 'input' && e.target.type === 'range') return;\n if ($(e.target).closest('.tabs-swipeable-wrap').length > 0) return;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n if (app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose) {\n if ($('.panel.active').length > 0) {\n side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right';\n }\n else {\n if (app.params.swipePanelOnlyClose) return;\n side = app.params.swipePanel;\n }\n if (!side) return;\n }\n panel = $('.panel.panel-' + side);\n opened = panel.hasClass('active');\n if (app.params.swipePanelActiveArea && !opened) {\n if (side === 'left') {\n if (touchesStart.x > app.params.swipePanelActiveArea) return;\n }\n if (side === 'right') {\n if (touchesStart.x < app.width - app.params.swipePanelActiveArea) return;\n }\n }\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n \n touchStartTime = (new Date()).getTime();\n direction = undefined;\n }\n function handleTouchMove(e) {\n if (!isTouched) return;\n if (e.f7PreventPanelSwipe) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling) {\n isTouched = false;\n return;\n }\n if (!direction) {\n if (pageX > touchesStart.x) {\n direction = 'to-right';\n }\n else {\n direction = 'to-left';\n }\n \n if(side === 'both'){\n if ($('.panel.active').length > 0) {\n side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right';\n }\n else {\n side = direction === 'to-right' ? 'left' : 'right';\n }\n if (app.params.swipePanelActiveArea > 0) {\n if (side === 'left' && touchesStart.x > app.params.swipePanelActiveArea) {\n isTouched = false;\n return;\n }\n if (side === 'right' && touchesStart.x < app.width - app.params.swipePanelActiveArea) {\n isTouched = false;\n return;\n }\n }\n panel = $('.panel.panel-' + side);\n }\n if (panel.hasClass('panel-visible-by-breakpoint')) {\n isTouched = false;\n return;\n }\n \n if (\n side === 'left' &&\n (\n direction === 'to-left' && !panel.hasClass('active')\n ) ||\n side === 'right' &&\n (\n direction === 'to-right' && !panel.hasClass('active')\n )\n )\n {\n isTouched = false;\n return;\n }\n }\n \n if (app.params.swipePanelNoFollow) {\n var timeDiff = (new Date()).getTime() - touchStartTime;\n if (timeDiff < 300) {\n if (direction === 'to-left') {\n if (side === 'right') app.openPanel(side);\n if (side === 'left' && panel.hasClass('active')) app.closePanel();\n }\n if (direction === 'to-right') {\n if (side === 'left') app.openPanel(side);\n if (side === 'right' && panel.hasClass('active')) app.closePanel();\n }\n }\n isTouched = false;\n isMoved = false;\n return;\n }\n \n if (!isMoved) {\n effect = panel.hasClass('panel-cover') ? 'cover' : 'reveal';\n if (!opened) {\n panel.show();\n panelOverlay.show();\n }\n panelWidth = panel[0].offsetWidth;\n panel.transition(0);\n if (panel.find('.' + app.params.viewClass).length > 0) {\n if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]);\n }\n }\n \n isMoved = true;\n \n e.preventDefault();\n var threshold = opened ? 0 : -app.params.swipePanelThreshold;\n if (side === 'right') threshold = -threshold;\n \n touchesDiff = pageX - touchesStart.x + threshold;\n \n if (side === 'right') {\n if (effect === 'cover') {\n translate = touchesDiff + (opened ? 0 : panelWidth);\n if (translate < 0) translate = 0;\n if (translate > panelWidth) {\n translate = panelWidth;\n }\n }\n else {\n translate = touchesDiff - (opened ? panelWidth : 0);\n if (translate > 0) translate = 0;\n if (translate < -panelWidth) {\n translate = -panelWidth;\n }\n }\n }\n else {\n translate = touchesDiff + (opened ? panelWidth : 0);\n if (translate < 0) translate = 0;\n if (translate > panelWidth) {\n translate = panelWidth;\n }\n }\n if (effect === 'reveal') {\n views.transform('translate3d(' + translate + 'px,0,0)').transition(0);\n panelOverlay.transform('translate3d(' + translate + 'px,0,0)').transition(0);\n \n panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)});\n app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth));\n }\n else {\n if (side === 'left') translate = translate - panelWidth;\n panel.transform('translate3d(' + (translate) + 'px,0,0)').transition(0);\n \n panelOverlay.transition(0);\n overlayOpacity = 1 - Math.abs(translate/panelWidth);\n panelOverlay.css({opacity: overlayOpacity});\n \n panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)});\n app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth));\n }\n }\n function handleTouchEnd(e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n isTouched = false;\n isMoved = false;\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var action;\n var edge = (translate === 0 || Math.abs(translate) === panelWidth);\n \n if (!opened) {\n if (effect === 'cover') {\n if (translate === 0) {\n action = 'swap'; //open\n }\n else if (timeDiff < 300 && Math.abs(translate) > 0) {\n action = 'swap'; //open\n }\n else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n action = 'swap'; //open\n }\n else {\n action = 'reset'; //close\n }\n }\n else {\n if (translate === 0) {\n action = 'reset';\n }\n else if (\n timeDiff < 300 && Math.abs(translate) > 0 ||\n timeDiff >= 300 && (Math.abs(translate) >= panelWidth / 2)\n ) {\n action = 'swap';\n }\n else {\n action = 'reset';\n }\n }\n }\n else {\n if (effect === 'cover') {\n if (translate === 0) {\n action = 'reset'; //open\n }\n else if (timeDiff < 300 && Math.abs(translate) > 0) {\n action = 'swap'; //open\n }\n else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n action = 'reset'; //open\n }\n else {\n action = 'swap'; //close\n }\n }\n else {\n if (translate === -panelWidth) {\n action = 'reset';\n }\n else if (\n timeDiff < 300 && Math.abs(translate) >= 0 ||\n timeDiff >= 300 && (Math.abs(translate) <= panelWidth / 2)\n ) {\n if (side === 'left' && translate === panelWidth) action = 'reset';\n else action = 'swap';\n }\n else {\n action = 'reset';\n }\n }\n }\n if (action === 'swap') {\n app.allowPanelOpen = true;\n if (opened) {\n app.closePanel();\n if (edge) {\n panel.css({display: ''});\n $('body').removeClass('panel-closing');\n }\n }\n else {\n app.openPanel(side);\n }\n if (edge) app.allowPanelOpen = true;\n }\n if (action === 'reset') {\n if (opened) {\n app.allowPanelOpen = true;\n app.openPanel(side);\n }\n else {\n app.closePanel();\n if (edge) {\n app.allowPanelOpen = true;\n panel.css({display: ''});\n }\n else {\n var target = effect === 'reveal' ? views : panel;\n panel.trigger('close panel:close');\n $('body').addClass('panel-closing');\n target.transitionEnd(function () {\n if (panel.hasClass('active')) return;\n panel.trigger('close panel:closed');\n panel.css({display: ''});\n $('body').removeClass('panel-closing');\n app.allowPanelOpen = true;\n });\n }\n }\n }\n if (effect === 'reveal') {\n views.transition('');\n views.transform('');\n }\n panel.transition('').transform('');\n panelOverlay.css({display: ''}).transform('').transition('').css('opacity', '');\n }\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on(app.touchEvents.start, handleTouchStart, passiveListener);\n $(document).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, handleTouchEnd, passiveListener);\n };\n \n"," /*======================================================\n ************ Image Lazy Loading ************\n ************ Based on solution by Marc Godard, https://github.com/MarcGodard ************\n ======================================================*/\n app.initImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n \n // Lazy images\n var lazyLoadImages;\n if (pageContainer.hasClass('lazy')) {\n lazyLoadImages = pageContainer;\n pageContainer = lazyLoadImages.parents('.page');\n }\n else {\n lazyLoadImages = pageContainer.find('.lazy');\n }\n if (lazyLoadImages.length === 0) return;\n \n // Scrollable page content\n var pageContent;\n if (pageContainer.hasClass('page-content')) {\n pageContent = pageContainer;\n pageContainer = pageContainer.parents('.page');\n }\n else {\n pageContent = pageContainer.find('.page-content');\n }\n if (pageContent.length === 0) return;\n \n // Placeholder\n var placeholderSrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n if (typeof app.params.imagesLazyLoadPlaceholder === 'string') {\n placeholderSrc = app.params.imagesLazyLoadPlaceholder;\n }\n if (app.params.imagesLazyLoadPlaceholder !== false) lazyLoadImages.each(function(){\n if ($(this).attr('data-src') && !$(this).attr('src')) $(this).attr('src', placeholderSrc);\n });\n \n // load image\n var imagesSequence = [];\n var imageIsLoading = false;\n function loadImage(el) {\n el = $(el);\n \n var bg = el.attr('data-background');\n var src = bg ? bg : el.attr('data-src');\n if (!src) return;\n \n function onLoad() {\n el.removeClass('lazy').addClass('lazy-loaded');\n if (bg) {\n el.css('background-image', 'url(' + src + ')');\n }\n else {\n el.attr('src', src);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n imageIsLoading = false;\n if (imagesSequence.length > 0) {\n loadImage(imagesSequence.shift());\n }\n }\n el.trigger('lazy-loaded');\n if (app.params.onLazyLoaded) app.params.onLazyLoaded(el);\n }\n \n function onError() {\n el.removeClass('lazy').addClass('lazy-loaded');\n if (bg) {\n el.css('background-image', 'url(' + placeholderSrc + ')');\n }\n else {\n el.attr('src', placeholderSrc);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n imageIsLoading = false;\n if (imagesSequence.length > 0) {\n loadImage(imagesSequence.shift());\n }\n }\n el.trigger('lazy-error');\n if (app.params.onLazyError) app.params.onLazyError(el);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n if (imageIsLoading) {\n if (imagesSequence.indexOf(el[0]) < 0) imagesSequence.push(el[0]);\n return;\n }\n }\n \n // Loading flag\n imageIsLoading = true;\n \n var image = new Image();\n image.onload = onLoad;\n image.onerror = onError;\n image.src =src;\n \n // Add loaded callback and events\n el.trigger('lazy-load');\n if (app.params.onLazyLoad && !el.hasClass('lazy-loaded')) app.params.onLazyLoad(el);\n }\n function lazyHandler() {\n lazyLoadImages = pageContainer.find('.lazy');\n lazyLoadImages.each(function(index, el) {\n el = $(el);\n if (el.parents('.tab:not(.active)').length > 0) {\n return;\n }\n if (isElementInViewport(el[0])) {\n loadImage(el);\n }\n });\n }\n \n function isElementInViewport (el) {\n var rect = el.getBoundingClientRect();\n var threshold = app.params.imagesLazyLoadThreshold || 0;\n return (\n rect.top >= (0 - threshold) &&\n rect.left >= (0 - threshold) &&\n rect.top <= (app.height + threshold) &&\n rect.left <= (app.width + threshold)\n );\n }\n \n function attachEvents(destroy) {\n var method = destroy ? 'off' : 'on';\n lazyLoadImages[method]('lazy', lazyHandler);\n lazyLoadImages.parents('.tab')[method]('show', lazyHandler);\n pageContainer[method]('lazy', lazyHandler);\n pageContent[method]('lazy', lazyHandler);\n pageContent[method]('scroll', lazyHandler);\n app[method === 'on' ? 'onResize' : 'offResize'](lazyHandler);\n }\n function detachEvents() {\n attachEvents(true);\n }\n \n // Store detach function\n pageContainer[0].f7DestroyImagesLazyLoad = detachEvents;\n \n // Attach events\n attachEvents();\n \n // Destroy on page remove\n if (pageContainer.hasClass('page')) {\n pageContainer.once('page:beforeremove', detachEvents);\n }\n \n // Run loader on page load/init\n lazyHandler();\n \n // Run after page animation\n pageContainer.once('page:afteranimation', lazyHandler);\n };\n app.destroyImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0 && pageContainer[0].f7DestroyImagesLazyLoad) {\n pageContainer[0].f7DestroyImagesLazyLoad();\n }\n };\n app.reinitImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0) {\n pageContainer.trigger('lazy');\n }\n };\n \n"," /*======================================================\n ************ Material Preloader ************\n ======================================================*/\n app.initPageMaterialPreloader = function (pageContainer) {\n $(pageContainer).find('.preloader').each(function () {\n if ($(this).children().length === 0) {\n $(this).html(app.params.materialPreloaderHtml);\n }\n });\n };\n"," /*======================================================\n ************ Messages ************\n ======================================================*/\n var Messages = function (container, params) {\n var defaults = {\n autoLayout: true,\n newMessagesFirst: false,\n scrollMessages: true,\n scrollMessagesOnlyOnEdge: false,\n messageTemplate:\n '{{#if day}}' +\n '
{{day}} {{#if time}}, {{time}}{{/if}}
' +\n '{{/if}}' +\n '
' +\n '{{#if name}}
{{name}}
{{/if}}' +\n '
{{text}}{{#if date}}
{{date}}
{{/if}}
' +\n '{{#if avatar}}
{{/if}}' +\n '{{#if label}}
{{label}}
{{/if}}' +\n '
'\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var m = this;\n \n // Params\n m.params = params;\n \n // Container\n m.container = $(container);\n if (m.container.length === 0) return;\n \n // Autolayout\n if (m.params.autoLayout) m.container.addClass('messages-auto-layout');\n \n // New messages first\n if (m.params.newMessagesFirst) m.container.addClass('messages-new-first');\n \n // Is In Page\n m.pageContainer = m.container.parents('.page').eq(0);\n m.pageContent = m.pageContainer.find('.page-content');\n \n // Compiled template\n m.template = Template7.compile(m.params.messageTemplate);\n \n // Auto Layout\n m.layout = function () {\n if (!m.container.hasClass('messages-auto-layout')) m.container.addClass('messages-auto-layout');\n m.container.find('.message').each(function () {\n var message = $(this);\n if (message.find('.message-text img').length > 0) {\n var childNodes = message.find('.message-text')[0].childNodes;\n var onlyPic = true;\n for (var i = 0 ; i < childNodes.length; i++) {\n if (childNodes[i].nodeType === 1 && childNodes[i].nodeName.toLowerCase() !== 'img') onlyPic = false;\n if (childNodes[i].nodeType === 3 && childNodes[i].textContent.trim() !== '') onlyPic = false;\n }\n if (onlyPic) message.addClass('message-pic');\n else message.removeClass('message-pic');\n }\n if (message.find('.message-avatar').length > 0) message.addClass('message-with-avatar');\n });\n m.container.find('.message').each(function () {\n var message = $(this);\n var isSent = message.hasClass('message-sent');\n var next = message.next('.message-' + (isSent ? 'sent' : 'received'));\n var prev = message.prev('.message-' + (isSent ? 'sent' : 'received'));\n if (next.length === 0) {\n message.addClass('message-last message-with-tail');\n }\n else message.removeClass('message-last message-with-tail');\n \n if (prev.length === 0) {\n message.addClass('message-first');\n }\n else message.removeClass('message-first');\n \n if (prev.length > 0 && prev.find('.message-name').length > 0 && message.find('.message-name').length > 0) {\n if (prev.find('.message-name').text() !== message.find('.message-name').text()) {\n prev.addClass('message-last message-with-tail');\n message.addClass('message-first');\n }\n }\n });\n };\n \n // Add Message\n m.appendMessage = function (props, animate) {\n return m.addMessage(props, 'append', animate);\n };\n m.prependMessage = function (props, animate) {\n return m.addMessage(props, 'prepend', animate);\n };\n m.addMessage = function (props, method, animate) {\n return m.addMessages([props], method, animate);\n };\n m.addMessages = function (newMessages, method, animate) {\n if (typeof animate === 'undefined') {\n animate = true;\n }\n if (typeof method === 'undefined') {\n method = m.params.newMessagesFirst ? 'prepend' : 'append';\n }\n var newMessagesHTML = '', i;\n for (i = 0; i < newMessages.length; i++) {\n var props = newMessages[i] || {};\n props.type = props.type || 'sent';\n if (!props.text) continue;\n props.hasImage = props.text.indexOf('= 0;\n if (props.onlyImage === false) props.hasImage = false;\n if (animate) props.position = method === 'append' ? 'bottom' : 'top';\n \n newMessagesHTML += m.template(props);\n }\n var scrollHeightBefore = m.pageContent[0].scrollHeight,\n heightBefore = m.pageContent[0].offsetHeight,\n scrollBefore = m.pageContent[0].scrollTop;\n m.container[method](newMessagesHTML);\n if (m.params.autoLayout) m.layout();\n if (method === 'prepend') {\n m.pageContent[0].scrollTop = scrollBefore + (m.pageContent[0].scrollHeight - scrollHeightBefore);\n }\n if (m.params.scrollMessages && (method === 'append' && !m.params.newMessagesFirst) || (method === 'prepend' && m.params.newMessagesFirst)) {\n if (m.params.scrollMessagesOnlyOnEdge) {\n var onEdge = false;\n if (m.params.newMessagesFirst) {\n if (scrollBefore === 0) onEdge = true;\n }\n else {\n if (scrollBefore - (scrollHeightBefore - heightBefore) >= -10) onEdge = true;\n }\n if (onEdge) m.scrollMessages(animate ? undefined : 0);\n }\n else m.scrollMessages(animate ? undefined : 0);\n }\n var messages = m.container.find('.message');\n if (newMessages.length === 1) {\n return method === 'append' ? messages[messages.length - 1] : messages[0];\n }\n else {\n var messagesToReturn = [];\n if (method === 'append') {\n for (i = messages.length - newMessages.length; i < messages.length; i++) {\n messagesToReturn.push(messages[i]);\n }\n }\n else {\n for (i = 0; i < newMessages.length; i++) {\n messagesToReturn.push(messages[i]);\n }\n }\n return messagesToReturn;\n }\n \n };\n m.removeMessage = function (message) {\n message = $(message);\n if (message.length === 0) {\n return false;\n }\n else {\n message.remove();\n if (m.params.autoLayout) m.layout();\n return true;\n }\n };\n m.removeMessages = function (messages) {\n m.removeMessage(messages);\n };\n m.clean = function () {\n m.container.html('');\n };\n \n // Scroll\n m.scrollMessages = function (duration, scrollTop) {\n if (typeof duration === 'undefined') duration = 400;\n var currentScroll = m.pageContent[0].scrollTop;\n var newScroll;\n if (typeof scrollTop !== 'undefined') newScroll = scrollTop;\n else {\n newScroll = m.params.newMessagesFirst ? 0 : m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight;\n if (newScroll === currentScroll) return;\n }\n m.pageContent.scrollTop(newScroll, duration);\n };\n \n // Init Destroy\n m.init = function () {\n if (m.params.messages) {\n m.addMessages(m.params.messages, undefined, false);\n }\n else {\n if (m.params.autoLayout) m.layout();\n m.scrollMessages(0);\n }\n \n };\n m.destroy = function () {\n m = null;\n };\n \n // Init\n m.init();\n \n m.container[0].f7Messages = m;\n return m;\n };\n app.messages = function (container, params) {\n return new Messages (container, params);\n };\n app.initPageMessages = function (pageContainer) {\n pageContainer = $(pageContainer);\n var messages = pageContainer.find('.messages');\n if (messages.length === 0) return;\n if (!messages.hasClass('messages-init')) {\n return;\n }\n var m = app.messages(messages, messages.dataset());\n \n // Destroy on page remove\n function pageBeforeRemove() {\n m.destroy();\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n if (pageContainer.hasClass('page')) {\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n }\n };\n \n"," /*===============================================================================\n ************ Swipeout Actions (Swipe to delete) ************\n ===============================================================================*/\n app.swipeoutOpenedEl = undefined;\n app.allowSwipeout = true;\n app.initSwipeout = function (swipeoutEl) {\n var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, swipeOutEl, swipeOutContent, actionsRight, actionsLeft, actionsLeftWidth, actionsRightWidth, translate, opened, openedActions, buttonsLeft, buttonsRight, direction, overswipeLeftButton, overswipeRightButton, overswipeLeft, overswipeRight, noFoldLeft, noFoldRight;\n \n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n \n $(document).on(app.touchEvents.start, function (e) {\n if (app.swipeoutOpenedEl) {\n var target = $(e.target);\n if (!(\n app.swipeoutOpenedEl.is(target[0]) ||\n target.parents('.swipeout').is(app.swipeoutOpenedEl) ||\n target.hasClass('modal-in') ||\n target.hasClass('modal-overlay') ||\n target.hasClass('actions-modal') || \n target.parents('.actions-modal.modal-in, .modal.modal-in').length > 0\n )) {\n app.swipeoutClose(app.swipeoutOpenedEl);\n }\n }\n }, activeListener);\n \n function handleTouchStart(e) {\n if (!app.allowSwipeout) return;\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n }\n function handleTouchMove(e) {\n if (!isTouched) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling) {\n isTouched = false;\n return;\n }\n \n if (!isMoved) {\n if ($('.list-block.sortable-opened').length > 0) return;\n /*jshint validthis:true */\n swipeOutEl = $(this);\n swipeOutContent = swipeOutEl.find('.swipeout-content');\n actionsRight = swipeOutEl.find('.swipeout-actions-right');\n actionsLeft = swipeOutEl.find('.swipeout-actions-left');\n actionsLeftWidth = actionsRightWidth = buttonsLeft = buttonsRight = overswipeRightButton = overswipeLeftButton = null;\n noFoldLeft = actionsLeft.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold;\n noFoldRight = actionsRight.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold;\n if (actionsLeft.length > 0) {\n actionsLeftWidth = actionsLeft.outerWidth();\n buttonsLeft = actionsLeft.children('a');\n overswipeLeftButton = actionsLeft.find('.swipeout-overswipe');\n }\n if (actionsRight.length > 0) {\n actionsRightWidth = actionsRight.outerWidth();\n buttonsRight = actionsRight.children('a');\n overswipeRightButton = actionsRight.find('.swipeout-overswipe');\n }\n opened = swipeOutEl.hasClass('swipeout-opened');\n if (opened) {\n openedActions = swipeOutEl.find('.swipeout-actions-left.swipeout-actions-opened').length > 0 ? 'left' : 'right';\n }\n swipeOutEl.removeClass('transitioning');\n if (!app.params.swipeoutNoFollow) {\n swipeOutEl.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n swipeOutEl.removeClass('swipeout-opened');\n }\n }\n isMoved = true;\n e.preventDefault();\n \n touchesDiff = pageX - touchesStart.x;\n translate = touchesDiff;\n \n if (opened) {\n if (openedActions === 'right') translate = translate - actionsRightWidth;\n else translate = translate + actionsLeftWidth;\n }\n \n if (translate > 0 && actionsLeft.length === 0 || translate < 0 && actionsRight.length === 0) {\n if (!opened) {\n isTouched = isMoved = false;\n swipeOutContent.transform('');\n if (buttonsRight && buttonsRight.length > 0) {\n buttonsRight.transform('');\n }\n if (buttonsLeft && buttonsLeft.length > 0) {\n buttonsLeft.transform('');\n }\n return;\n }\n translate = 0;\n }\n \n if (translate < 0) direction = 'to-left';\n else if (translate > 0) direction = 'to-right';\n else {\n if (!direction) direction = 'to-left';\n }\n \n var i, buttonOffset, progress;\n \n e.f7PreventPanelSwipe = true;\n if (app.params.swipeoutNoFollow) {\n if (opened) {\n if (openedActions === 'right' && touchesDiff > 0) {\n app.swipeoutClose(swipeOutEl);\n }\n if (openedActions === 'left' && touchesDiff < 0) {\n app.swipeoutClose(swipeOutEl);\n }\n }\n else {\n if (touchesDiff < 0 && actionsRight.length > 0) {\n app.swipeoutOpen(swipeOutEl, 'right');\n }\n if (touchesDiff > 0 && actionsLeft.length > 0) {\n app.swipeoutOpen(swipeOutEl, 'left');\n }\n }\n isTouched = false;\n isMoved = false;\n return;\n }\n overswipeLeft = false;\n overswipeRight = false;\n var $button;\n if (actionsRight.length > 0) {\n // Show right actions\n progress = translate / actionsRightWidth;\n if (translate < -actionsRightWidth) {\n translate = -actionsRightWidth - Math.pow(-translate - actionsRightWidth, 0.8);\n if (overswipeRightButton.length > 0) {\n overswipeRight = true;\n }\n }\n for (i = 0; i < buttonsRight.length; i++) {\n if (typeof buttonsRight[i]._buttonOffset === 'undefined') {\n buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft;\n }\n buttonOffset = buttonsRight[i]._buttonOffset;\n $button = $(buttonsRight[i]);\n if (overswipeRightButton.length > 0 && $button.hasClass('swipeout-overswipe')) {\n $button.css({left: (overswipeRight ? -buttonOffset : 0) + 'px'});\n if (overswipeRight) {\n $button.addClass('swipeout-overswipe-active');\n }\n else {\n $button.removeClass('swipeout-overswipe-active'); \n }\n }\n $button.transform('translate3d(' + (translate - buttonOffset * (1 + Math.max(progress, -1))) + 'px,0,0)');\n }\n }\n if (actionsLeft.length > 0) {\n // Show left actions\n progress = translate / actionsLeftWidth;\n if (translate > actionsLeftWidth) {\n translate = actionsLeftWidth + Math.pow(translate - actionsLeftWidth, 0.8);\n if (overswipeLeftButton.length > 0) {\n overswipeLeft = true;\n }\n }\n for (i = 0; i < buttonsLeft.length; i++) {\n if (typeof buttonsLeft[i]._buttonOffset === 'undefined') {\n buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth;\n }\n buttonOffset = buttonsLeft[i]._buttonOffset;\n $button = $(buttonsLeft[i]);\n if (overswipeLeftButton.length > 0 && $button.hasClass('swipeout-overswipe')) {\n $button.css({left: (overswipeLeft ? buttonOffset : 0) + 'px'});\n if (overswipeLeft) {\n $button.addClass('swipeout-overswipe-active');\n }\n else {\n $button.removeClass('swipeout-overswipe-active'); \n }\n }\n if (buttonsLeft.length > 1) {\n $button.css('z-index', buttonsLeft.length - i); \n }\n $button.transform('translate3d(' + (translate + buttonOffset * (1 - Math.min(progress, 1))) + 'px,0,0)');\n }\n }\n swipeOutContent.transform('translate3d(' + translate + 'px,0,0)');\n }\n function handleTouchEnd(e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n \n isTouched = false;\n isMoved = false;\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var action, actionsWidth, actions, buttons, i;\n \n actions = direction === 'to-left' ? actionsRight : actionsLeft;\n actionsWidth = direction === 'to-left' ? actionsRightWidth : actionsLeftWidth;\n \n if (\n timeDiff < 300 && (touchesDiff < -10 && direction === 'to-left' || touchesDiff > 10 && direction === 'to-right') ||\n timeDiff >= 300 && Math.abs(translate) > actionsWidth / 2\n ) {\n action = 'open';\n }\n else {\n action = 'close';\n }\n if (timeDiff < 300) {\n if (Math.abs(translate) === 0) action = 'close';\n if (Math.abs(translate) === actionsWidth) action = 'open';\n }\n \n if (action === 'open') {\n app.swipeoutOpenedEl = swipeOutEl;\n swipeOutEl.trigger('open swipeout:open');\n swipeOutEl.addClass('swipeout-opened transitioning');\n var newTranslate = direction === 'to-left' ? -actionsWidth : actionsWidth;\n swipeOutContent.transform('translate3d(' + newTranslate + 'px,0,0)');\n actions.addClass('swipeout-actions-opened');\n buttons = direction === 'to-left' ? buttonsRight : buttonsLeft;\n if (buttons) {\n for (i = 0; i < buttons.length; i++) {\n $(buttons[i]).transform('translate3d(' + newTranslate + 'px,0,0)');\n }\n }\n if (overswipeRight) {\n actionsRight.find('.swipeout-overswipe')[0].click();\n }\n if (overswipeLeft) {\n actionsLeft.find('.swipeout-overswipe')[0].click();\n }\n }\n else {\n swipeOutEl.trigger('close swipeout:close');\n app.swipeoutOpenedEl = undefined;\n swipeOutEl.addClass('transitioning').removeClass('swipeout-opened');\n swipeOutContent.transform('');\n actions.removeClass('swipeout-actions-opened');\n }\n \n var buttonOffset;\n if (buttonsLeft && buttonsLeft.length > 0 && buttonsLeft !== buttons) {\n for (i = 0; i < buttonsLeft.length; i++) {\n buttonOffset = buttonsLeft[i]._buttonOffset;\n if (typeof buttonOffset === 'undefined') {\n buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth;\n }\n $(buttonsLeft[i]).transform('translate3d(' + (buttonOffset) + 'px,0,0)');\n }\n }\n if (buttonsRight && buttonsRight.length > 0 && buttonsRight !== buttons) {\n for (i = 0; i < buttonsRight.length; i++) {\n buttonOffset = buttonsRight[i]._buttonOffset;\n if (typeof buttonOffset === 'undefined') {\n buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft;\n }\n $(buttonsRight[i]).transform('translate3d(' + (-buttonOffset) + 'px,0,0)');\n }\n }\n swipeOutContent.transitionEnd(function (e) {\n if (opened && action === 'open' || closed && action === 'close') return;\n swipeOutEl.trigger(action === 'open' ? 'opened' : 'closed');\n if (opened && action === 'close') {\n if (actionsRight.length > 0) {\n buttonsRight.transform('');\n }\n if (actionsLeft.length > 0) {\n buttonsLeft.transform('');\n }\n }\n });\n }\n if (swipeoutEl) {\n $(swipeoutEl).on(app.touchEvents.start, handleTouchStart, activeListener);\n $(swipeoutEl).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(swipeoutEl).on(app.touchEvents.end, handleTouchEnd, activeListener);\n }\n else {\n $(document).on(app.touchEvents.start, '.list-block li.swipeout', handleTouchStart, activeListener);\n $(document).on(app.touchEvents.move, '.list-block li.swipeout', handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, '.list-block li.swipeout', handleTouchEnd, activeListener);\n }\n \n };\n app.swipeoutOpen = function (el, dir, callback) {\n el = $(el);\n if (arguments.length === 2) {\n if (typeof arguments[1] === 'function') {\n callback = dir;\n }\n }\n \n if (el.length === 0) return;\n if (el.length > 1) el = $(el[0]);\n if (!el.hasClass('swipeout') || el.hasClass('swipeout-opened')) return;\n if (!dir) {\n if (el.find('.swipeout-actions-right').length > 0) dir = 'right';\n else dir = 'left';\n }\n var swipeOutActions = el.find('.swipeout-actions-' + dir);\n if (swipeOutActions.length === 0) return;\n el.trigger('open swipeout:open').addClass('swipeout-opened').removeClass('transitioning');\n swipeOutActions.addClass('swipeout-actions-opened');\n var buttons = swipeOutActions.children('a');\n var swipeOutActionsWidth = swipeOutActions.outerWidth();\n var translate = dir === 'right' ? -swipeOutActionsWidth : swipeOutActionsWidth;\n var i;\n if (buttons.length > 1) {\n for (i = 0; i < buttons.length; i++) {\n if (dir === 'right') {\n $(buttons[i]).transform('translate3d(' + (- buttons[i].offsetLeft) + 'px,0,0)');\n }\n else {\n $(buttons[i]).css('z-index', buttons.length - i).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)');\n }\n }\n var clientLeft = buttons[1].clientLeft;\n }\n el.addClass('transitioning');\n for (i = 0; i < buttons.length; i++) {\n $(buttons[i]).transform('translate3d(' + (translate) + 'px,0,0)');\n }\n el.find('.swipeout-content').transform('translate3d(' + translate + 'px,0,0)').transitionEnd(function () {\n el.trigger('opened swipeout:opened');\n if (callback) callback.call(el[0]);\n });\n app.swipeoutOpenedEl = el;\n };\n app.swipeoutClose = function (el, callback) {\n el = $(el);\n if (el.length === 0) return;\n if (!el.hasClass('swipeout-opened')) return;\n var dir = el.find('.swipeout-actions-opened').hasClass('swipeout-actions-right') ? 'right' : 'left';\n var swipeOutActions = el.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n var buttons = swipeOutActions.children('a');\n var swipeOutActionsWidth = swipeOutActions.outerWidth();\n app.allowSwipeout = false;\n el.trigger('close swipeout:close');\n el.removeClass('swipeout-opened').addClass('transitioning');\n \n var closeTO;\n function onSwipeoutClose() {\n app.allowSwipeout = true;\n if (el.hasClass('swipeout-opened')) return;\n el.removeClass('transitioning');\n buttons.transform('');\n el.trigger('closed swipeout:closed');\n if (callback) callback.call(el[0]);\n if (closeTO) clearTimeout(closeTO);\n }\n el.find('.swipeout-content').transform('').transitionEnd(onSwipeoutClose);\n closeTO = setTimeout(onSwipeoutClose, 500);\n \n for (var i = 0; i < buttons.length; i++) {\n if (dir === 'right') {\n $(buttons[i]).transform('translate3d(' + (-buttons[i].offsetLeft) + 'px,0,0)');\n }\n else {\n $(buttons[i]).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)');\n }\n $(buttons[i]).css({left:0 + 'px'}).removeClass('swipeout-overswipe-active');\n }\n if (app.swipeoutOpenedEl && app.swipeoutOpenedEl[0] === el[0]) app.swipeoutOpenedEl = undefined;\n };\n app.swipeoutDelete = function (el, callback) {\n el = $(el);\n if (el.length === 0) return;\n if (el.length > 1) el = $(el[0]);\n app.swipeoutOpenedEl = undefined;\n el.trigger('delete swipeout:delete');\n el.css({height: el.outerHeight() + 'px'});\n var clientLeft = el[0].clientLeft;\n el.css({height: 0 + 'px'}).addClass('deleting transitioning').transitionEnd(function () {\n el.trigger('deleted swipeout:deleted');\n if (callback) callback.call(el[0]);\n if (el.parents('.virtual-list').length > 0) {\n var virtualList = el.parents('.virtual-list')[0].f7VirtualList;\n var virtualIndex = el[0].f7VirtualListIndex;\n if (virtualList && typeof virtualIndex !== 'undefined') virtualList.deleteItem(virtualIndex);\n }\n else {\n if (app.params.swipeoutRemoveWithTimeout) {\n setTimeout(function () {\n el.remove();\n }, 0);\n }\n else el.remove();\n }\n });\n var translate = '-100%';\n el.find('.swipeout-content').transform('translate3d(' + translate + ',0,0)');\n };\n \n"," /*===============================================================================\n ************ Sortable ************\n ===============================================================================*/\n app.sortableToggle = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.toggleClass('sortable-opened');\n if (sortableContainer.hasClass('sortable-opened')) {\n sortableContainer.trigger('open sortable:open');\n }\n else {\n sortableContainer.trigger('close sortable:close');\n }\n return sortableContainer;\n };\n app.sortableOpen = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.addClass('sortable-opened');\n sortableContainer.trigger('open sortable:open');\n return sortableContainer;\n };\n app.sortableClose = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.removeClass('sortable-opened');\n sortableContainer.trigger('close sortable:close');\n return sortableContainer;\n };\n app.initSortable = function () {\n var isTouched, isMoved, touchStartY, touchesDiff, sortingEl, sortingElHeight, sortingItems, minTop, maxTop, insertAfter, insertBefore, sortableContainer, startIndex;\n \n function handleTouchStart(e) {\n isMoved = false;\n isTouched = true;\n touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n /*jshint validthis:true */\n sortingEl = $(this).parent();\n startIndex = sortingEl.index();\n sortingItems = sortingEl.parent().children('li');\n sortableContainer = sortingEl.parents('.sortable');\n e.preventDefault();\n app.allowPanelOpen = app.allowSwipeout = false;\n }\n function handleTouchMove(e) {\n if (!isTouched || !sortingEl) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (!isMoved) {\n sortingEl.addClass('sorting');\n sortableContainer.addClass('sortable-sorting');\n minTop = sortingEl[0].offsetTop;\n maxTop = sortingEl.parent().height() - sortingEl[0].offsetTop - sortingEl.height();\n sortingElHeight = sortingEl[0].offsetHeight;\n }\n isMoved = true;\n \n e.preventDefault();\n e.f7PreventPanelSwipe = true;\n touchesDiff = pageY - touchStartY;\n var translate = touchesDiff;\n if (translate < -minTop) translate = -minTop;\n if (translate > maxTop) translate = maxTop;\n sortingEl.transform('translate3d(0,' + translate + 'px,0)');\n \n insertBefore = insertAfter = undefined;\n \n sortingItems.each(function () {\n var currentEl = $(this);\n if (currentEl[0] === sortingEl[0]) return;\n var currentElOffset = currentEl[0].offsetTop;\n var currentElHeight = currentEl.height();\n var sortingElOffset = sortingEl[0].offsetTop + translate;\n \n if ((sortingElOffset >= currentElOffset - currentElHeight / 2) && sortingEl.index() < currentEl.index()) {\n currentEl.transform('translate3d(0, '+(-sortingElHeight)+'px,0)');\n insertAfter = currentEl;\n insertBefore = undefined;\n }\n else if ((sortingElOffset <= currentElOffset + currentElHeight / 2) && sortingEl.index() > currentEl.index()) {\n currentEl.transform('translate3d(0, '+(sortingElHeight)+'px,0)');\n insertAfter = undefined;\n if (!insertBefore) insertBefore = currentEl;\n }\n else {\n $(this).transform('translate3d(0, 0%,0)');\n }\n });\n }\n function handleTouchEnd(e) {\n app.allowPanelOpen = app.allowSwipeout = true;\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n e.preventDefault();\n sortingItems.transform('');\n sortingEl.removeClass('sorting');\n sortableContainer.removeClass('sortable-sorting');\n var virtualList, oldIndex, newIndex;\n if (insertAfter) {\n sortingEl.insertAfter(insertAfter);\n sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()});\n }\n if (insertBefore) {\n sortingEl.insertBefore(insertBefore);\n sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()});\n }\n if ((insertAfter || insertBefore) && sortableContainer.hasClass('virtual-list')) {\n virtualList = sortableContainer[0].f7VirtualList;\n oldIndex = sortingEl[0].f7VirtualListIndex;\n newIndex = insertBefore ? insertBefore[0].f7VirtualListIndex : insertAfter[0].f7VirtualListIndex;\n if (virtualList) virtualList.moveItem(oldIndex, newIndex);\n }\n insertAfter = insertBefore = undefined;\n isTouched = false;\n isMoved = false;\n }\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on(app.touchEvents.start, '.list-block.sortable .sortable-handler', handleTouchStart, activeListener);\n if (app.support.touch) {\n $(document).on(app.touchEvents.move, '.list-block.sortable .sortable-handler', handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, '.list-block.sortable .sortable-handler', handleTouchEnd, activeListener);\n }\n else {\n $(document).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, handleTouchEnd, activeListener);\n }\n };\n \n"," /*===============================================================================\n ************ Smart Select ************\n ===============================================================================*/\n app.initSmartSelects = function (pageContainer) {\n pageContainer = $(pageContainer);\n var selects;\n if (pageContainer.is('.smart-select')) {\n selects = pageContainer;\n }\n else {\n selects = pageContainer.find('.smart-select');\n }\n if (selects.length === 0) return;\n \n selects.each(function () {\n var smartSelect = $(this);\n \n var $select = smartSelect.find('select');\n if ($select.length === 0) return;\n \n var select = $select[0];\n if (select.length === 0) return;\n \n var valueText = [];\n var displayAs;\n for (var i = 0; i < select.length; i++) {\n if (select[i].selected) {\n displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as');\n if (displayAs && typeof displayAs !== 'undefined') {\n \t\t\t\t\tvalueText.push(displayAs);\n \t\t\t\t} else {\n \t\t\t\t\tvalueText.push(select[i].textContent.trim());\n \t\t\t\t}\n \t\t\t}\n }\n \n var itemAfter = smartSelect.find('.item-after');\n if (itemAfter.length === 0) {\n smartSelect.find('.item-inner').append('
' + valueText.join(', ') + '
');\n }\n else {\n var selectedText = itemAfter.text();\n if (itemAfter.hasClass('smart-select-value')) {\n for (i = 0; i < select.length; i++) {\n select[i].selected = select[i].textContent.trim() === selectedText.trim();\n }\n } else {\n itemAfter.text(valueText.join(', '));\n }\n }\n \n $select.on('change', function () {\n var valueText = [];\n for (var i = 0; i < select.length; i++) {\n if (select[i].selected) {\n var displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as');\n \tif (displayAs && typeof displayAs !== 'undefined') {\n \t\t\t\t\t\tvalueText.push(displayAs);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tvalueText.push(select[i].textContent.trim());\n \t\t\t\t\t}\n \t\t\t\t}\n }\n smartSelect.find('.item-after').text(valueText.join(', '));\n });\n \n });\n \n };\n app.smartSelectAddOption = function (select, option, index) {\n select = $(select);\n var smartSelect = select.parents('.smart-select');\n if (typeof index === 'undefined') {\n select.append(option);\n }\n else {\n $(option).insertBefore(select.find('option').eq(index));\n }\n app.initSmartSelects(smartSelect);\n var selectName = smartSelect.find('select').attr('name');\n var opened = $('.page.smart-select-page[data-select-name=\"' + selectName + '\"]').length > 0;\n if (opened) {\n app.smartSelectOpen(smartSelect, true);\n }\n };\n app.smartSelectOpen = function (smartSelect, reLayout) {\n smartSelect = $(smartSelect);\n if (smartSelect.length === 0) return;\n \n // Find related view\n var view = smartSelect.parents('.' + app.params.viewClass);\n if (view.length === 0) return;\n view = view[0].f7View;\n \n // Parameters\n var openIn = smartSelect.attr('data-open-in') || app.params.smartSelectOpenIn;\n if (openIn === 'popup') {\n if ($('.popup.smart-select-popup').length > 0) return;\n }\n else if (openIn === 'picker') {\n if ($('.picker-modal.modal-in').length > 0 && !reLayout){\n if (smartSelect[0].f7SmartSelectPicker !== $('.picker-modal.modal-in:not(.modal-out)')[0]) app.closeModal($('.picker-modal.modal-in:not(.modal-out)'));\n else return;\n }\n }\n else {\n if (!view) return;\n }\n \n var smartSelectData = smartSelect.dataset();\n var pageTitle = smartSelectData.pageTitle || smartSelect.find('.item-title').text();\n var backText = smartSelectData.backText || app.params.smartSelectBackText;\n var closeText;\n if (openIn === 'picker') {\n closeText = smartSelectData.pickerCloseText || smartSelectData.backText || app.params.smartSelectPickerCloseText ;\n }\n else {\n closeText = smartSelectData.popupCloseText || smartSelectData.backText || app.params.smartSelectPopupCloseText ;\n }\n var backOnSelect = smartSelectData.backOnSelect !== undefined ? smartSelectData.backOnSelect : app.params.smartSelectBackOnSelect;\n var formTheme = smartSelectData.formTheme || app.params.smartSelectFormTheme;\n var navbarTheme = smartSelectData.navbarTheme || app.params.smartSelectNavbarTheme;\n var toolbarTheme = smartSelectData.toolbarTheme || app.params.smartSelectToolbarTheme;\n var virtualList = smartSelectData.virtualList;\n var virtualListHeight = smartSelectData.virtualListHeight;\n var material = app.params.material;\n var pickerHeight = smartSelectData.pickerHeight || app.params.smartSelectPickerHeight;\n \n // Collect all options/values\n var select = smartSelect.find('select')[0];\n var $select = $(select);\n var $selectData = $select.dataset();\n if (select.disabled || smartSelect.hasClass('disabled') || $select.hasClass('disabled')) {\n return;\n }\n var values = [];\n var id = (new Date()).getTime();\n var inputType = select.multiple ? 'checkbox' : 'radio';\n var inputName = inputType + '-' + id;\n var maxLength = $select.attr('maxlength');\n var selectName = select.name;\n var option, optionHasMedia, optionImage, optionIcon, optionGroup, optionGroupLabel, optionPreviousGroup, optionIsLabel, previousGroup, optionColor, optionClassName, optionData;\n for (var i = 0; i < select.length; i++) {\n option = $(select[i]);\n optionData = option.dataset();\n optionImage = optionData.optionImage || $selectData.optionImage || smartSelectData.optionImage;\n optionIcon = optionData.optionIcon || $selectData.optionIcon || smartSelectData.optionIcon;\n optionHasMedia = optionImage || optionIcon || inputType === 'checkbox';\n if (material) optionHasMedia = optionImage || optionIcon;\n optionColor = optionData.optionColor;\n optionClassName = optionData.optionClass;\n if (option[0].disabled) optionClassName += ' disabled';\n optionGroup = option.parent('optgroup')[0];\n optionGroupLabel = optionGroup && optionGroup.label;\n optionIsLabel = false;\n if (optionGroup) {\n if (optionGroup !== previousGroup) {\n optionIsLabel = true;\n previousGroup = optionGroup;\n values.push({\n groupLabel: optionGroupLabel,\n isLabel: optionIsLabel\n });\n }\n }\n values.push({\n value: option[0].value,\n text: option[0].textContent.trim(),\n selected: option[0].selected,\n group: optionGroup,\n groupLabel: optionGroupLabel,\n image: optionImage,\n icon: optionIcon,\n color: optionColor,\n className: optionClassName,\n disabled: option[0].disabled,\n inputType: inputType,\n id: id,\n hasMedia: optionHasMedia,\n checkbox: inputType === 'checkbox',\n inputName: inputName,\n material: app.params.material\n });\n }\n \n \n // Item template/HTML\n if (!app._compiledTemplates.smartSelectItem) {\n app._compiledTemplates.smartSelectItem = t7.compile(app.params.smartSelectItemTemplate ||\n '{{#if isLabel}}' +\n '
  • {{groupLabel}}
  • ' +\n '{{else}}' +\n '' +\n '' +\n '' +\n '{{/if}}'\n );\n }\n var smartSelectItemTemplate = app._compiledTemplates.smartSelectItem;\n \n var inputsHTML = '';\n if (!virtualList) {\n for (var j = 0; j < values.length; j++) {\n inputsHTML += smartSelectItemTemplate(values[j]);\n }\n }\n \n // Toolbar / Navbar\n var toolbarHTML = '', navbarHTML;\n var noNavbar = '', noToolbar = '', noTabbar = '', navbarLayout;\n \n if (openIn === 'picker') {\n if (!app._compiledTemplates.smartSelectToolbar) {\n app._compiledTemplates.smartSelectToolbar = t7.compile(app.params.smartSelectToolbarTemplate ||\n '
    ' +\n '
    ' +\n '
    ' +\n '' +\n '
    ' +\n '
    '\n );\n }\n \n toolbarHTML = app._compiledTemplates.smartSelectToolbar({\n pageTitle: pageTitle,\n closeText: closeText,\n openIn: openIn,\n toolbarTheme: toolbarTheme,\n inPicker: openIn === 'picker'\n });\n }\n else {\n // Navbar HTML\n if (!app._compiledTemplates.smartSelectNavbar) {\n app._compiledTemplates.smartSelectNavbar = t7.compile(app.params.smartSelectNavbarTemplate ||\n '
    ' +\n '
    ' +\n '{{leftTemplate}}' +\n '
    {{pageTitle}}
    ' +\n '
    ' +\n '
    '\n );\n }\n navbarHTML = app._compiledTemplates.smartSelectNavbar({\n pageTitle: pageTitle,\n backText: backText,\n closeText: closeText,\n openIn: openIn,\n navbarTheme: navbarTheme,\n inPopup: openIn === 'popup',\n inPage: openIn === 'page',\n leftTemplate: openIn === 'popup' ?\n (app.params.smartSelectPopupCloseTemplate || (material ? '
    ' : '')).replace(/{{closeText}}/g, closeText) :\n (app.params.smartSelectBackTemplate || (material ? '
    ' : '')).replace(/{{backText}}/g, backText)\n });\n // Determine navbar layout type - static/fixed/through\n if (openIn === 'page') {\n navbarLayout = 'static';\n if (smartSelect.parents('.navbar-through').length > 0) navbarLayout = 'through';\n if (smartSelect.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = smartSelect.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = smartSelect.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n noTabbar = smartSelect.parents('.page').hasClass('no-tabbar') ? 'no-tabbar' : '';\n }\n else {\n navbarLayout = 'fixed';\n }\n }\n \n \n // Page Layout\n var pageName = 'smart-select-' + inputName;\n \n var useSearchbar = typeof smartSelect.data('searchbar') === 'undefined' ? app.params.smartSelectSearchbar : (smartSelect.data('searchbar') === 'true' ? true : false);\n var searchbarPlaceholder, searchbarCancel;\n \n if (useSearchbar) {\n searchbarPlaceholder = smartSelect.data('searchbar-placeholder') || 'Search';\n searchbarCancel = smartSelect.data('searchbar-cancel') || 'Cancel';\n }\n \n var searchbarHTML = '
    ' +\n '
    ' +\n '' +\n '' +\n '
    ' +\n (material ? '' : '' + searchbarCancel + '') +\n '
    ' +\n '
    ';\n \n var pageHTML =\n (openIn !== 'picker' && navbarLayout === 'through' ? navbarHTML : '') +\n '
    ' +\n '
    ' +\n (openIn !== 'picker' && navbarLayout === 'fixed' ? navbarHTML : '') +\n (useSearchbar ? searchbarHTML : '') +\n '
    ' +\n (openIn !== 'picker' && navbarLayout === 'static' ? navbarHTML : '') +\n '
    ' +\n '
      ' +\n (virtualList ? '' : inputsHTML) +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n \n // Define popup and picker\n var popup, picker;\n \n // Scroll SS Picker To Input\n function scrollToInput() {\n var pageContent = smartSelect.parents('.page-content');\n if (pageContent.length === 0) return;\n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - picker.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - picker.height(),\n newPaddingBottom;\n var inputTop = smartSelect.offset().top - paddingTop + smartSelect[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = picker.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n // Close SS Picker on HTML Click\n function closeOnHTMLClick(e) {\n var close = true;\n if (e.target === smartSelect[0] || $(e.target).parents(smartSelect[0]).length > 0) {\n close = false;\n }\n if ($(e.target).parents('.picker-modal').length > 0) {\n close = false;\n }\n if (close) {\n app.closeModal('.smart-select-picker.modal-in');\n }\n }\n \n // Check max length\n function checkMaxLength(container) {\n if (select.selectedOptions.length >= maxLength) {\n container.find('input[type=\"checkbox\"]').each(function () {\n if (!this.checked) {\n $(this).parents('li').addClass('disabled');\n }\n else {\n $(this).parents('li').removeClass('disabled');\n }\n });\n }\n else {\n container.find('.disabled').removeClass('disabled');\n }\n }\n // Event Listeners on new page\n function handleInputs(container) {\n container = $(container);\n if (virtualList) {\n var virtualListInstance = app.virtualList(container.find('.virtual-list'), {\n items: values,\n template: smartSelectItemTemplate,\n height: virtualListHeight || undefined,\n searchByItem: function (query, index, item) {\n if (item.text && item.text.toLowerCase().indexOf(query.trim().toLowerCase()) >=0 ) return true;\n return false;\n }\n });\n container.once(openIn === 'popup' || openIn === 'picker' ? 'closed': 'pageBeforeRemove', function () {\n if (virtualListInstance && virtualListInstance.destroy) virtualListInstance.destroy();\n });\n }\n if (maxLength) {\n checkMaxLength(container);\n }\n if (backOnSelect) {\n container.find('input[type=\"radio\"][name=\"' + inputName + '\"]:checked').parents('label').once('click', function () {\n if (openIn === 'popup') app.closeModal(popup);\n else if (openIn === 'picker') app.closeModal(picker);\n else view.router.back();\n });\n }\n container.on('change', 'input[name=\"' + inputName + '\"]', function () {\n \t\t\tvar option, text;\n var input = this;\n var value = input.value;\n var optionText = [];\n var displayAs;\n if (input.type === 'checkbox') {\n var values = [];\n for (var i = 0; i < select.options.length; i++) {\n option = select.options[i];\n if (option.value === value) {\n option.selected = input.checked;\n }\n if (option.selected) {\n displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as');\n text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent;\n optionText.push(text.trim());\n }\n }\n if (maxLength) {\n checkMaxLength(container);\n }\n }\n else {\n option = smartSelect.find('option[value=\"' + value + '\"]')[0];\n displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as');\n text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent;\n optionText = [text];\n select.value = value;\n }\n \n $select.trigger('change');\n smartSelect.find('.item-after').text(optionText.join(', '));\n if (backOnSelect && inputType === 'radio') {\n if (openIn === 'popup') app.closeModal(popup);\n else if (openIn === 'picker') app.closeModal(picker);\n else view.router.back();\n }\n });\n }\n function pageInit(e) {\n var page = e.detail.page;\n if (page.name === pageName) {\n handleInputs(page.container);\n }\n }\n if (openIn === 'popup') {\n if (reLayout) {\n popup = $('.popup.smart-select-popup .view');\n popup.html(pageHTML);\n }\n else {\n popup = app.popup(\n '
    ' +\n '
    ' +\n pageHTML +\n '
    ' +\n '
    '\n );\n popup = $(popup);\n }\n app.initPage(popup.find('.page'));\n handleInputs(popup);\n }\n else if (openIn === 'picker') {\n if (reLayout) {\n picker = $('.picker-modal.smart-select-picker .view');\n picker.html(pageHTML);\n }\n else {\n picker = app.pickerModal(\n '
    ' +\n toolbarHTML +\n '
    ' +\n '
    ' +\n pageHTML +\n '
    ' +\n '
    ' +\n '
    '\n );\n picker = $(picker);\n \n // Scroll To Input\n scrollToInput();\n \n // Close On Click\n $('html').on('click', closeOnHTMLClick);\n \n // On Close\n picker.once('picker:close', function () {\n // Reset linked picker\n smartSelect[0].f7SmartSelectPicker = undefined;\n \n // Detach html click\n $('html').off('click', closeOnHTMLClick);\n \n // Restore page padding bottom\n smartSelect.parents('.page-content').css({paddingBottom: ''});\n });\n \n // Link Picker\n smartSelect[0].f7SmartSelectPicker = picker[0];\n }\n \n // Init Page\n app.initPage(picker.find('.page'));\n \n // Attach events\n handleInputs(picker);\n }\n else {\n $(document).once('page:init', '.smart-select-page', pageInit);\n view.router.load({\n content: pageHTML,\n reload: reLayout ? true : undefined\n });\n }\n };\n \n"," /*===============================================================================\n ************ Virtual List ************\n ===============================================================================*/\n var VirtualList = function (listBlock, params) {\n var defaults = {\n cols: 1,\n height: app.params.material ? 48 : 44,\n cache: true,\n dynamicHeightBufferSize: 1,\n showFilteredItemsOnly: false,\n renderExternal: undefined,\n template:\n '
  • ' +\n '
    ' +\n '
    ' +\n '
    {{this}}
    ' +\n '
    ' +\n '
    ' +\n '
  • '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n \n // Preparation\n var vl = this;\n vl.listBlock = $(listBlock);\n vl.params = params;\n vl.items = vl.params.items;\n if (vl.params.showFilteredItemsOnly) {\n vl.filteredItems = [];\n }\n if (vl.params.template && !vl.params.renderItem) {\n if (typeof vl.params.template === 'string') vl.template = t7.compile(vl.params.template);\n else if (typeof vl.params.template === 'function') vl.template = vl.params.template;\n }\n vl.pageContent = vl.listBlock.parents('.page-content');\n \n // Bad scroll\n var updatableScroll;\n if (typeof vl.params.updatableScroll !== 'undefined') {\n updatableScroll = vl.params.updatableScroll;\n }\n else {\n updatableScroll = true;\n if (app.device.ios && app.device.osVersion.split('.')[0] < 8) {\n updatableScroll = false;\n }\n vl.params.updatableScroll = updatableScroll;\n }\n \n // Append
      \n vl.ul = vl.params.ul ? $(vl.params.ul) : vl.listBlock.children('ul');\n if (vl.ul.length === 0) {\n vl.listBlock.append('
        ');\n vl.ul = vl.listBlock.children('ul');\n }\n \n // DOM cached items\n vl.domCache = {};\n vl.displayDomCache = {};\n \n // Temporary DOM Element\n vl.tempDomElement = document.createElement('ul');\n \n // Last repain position\n vl.lastRepaintY = null;\n \n // Fragment\n vl.fragment = document.createDocumentFragment();\n \n // Filter\n vl.filterItems = function (indexes, resetScrollTop) {\n vl.filteredItems = [];\n var firstIndex = indexes[0];\n var lastIndex = indexes[indexes.length - 1];\n for (var i = 0; i < indexes.length; i++) {\n vl.filteredItems.push(vl.items[indexes[i]]);\n }\n if (typeof resetScrollTop === 'undefined') resetScrollTop = true;\n if (resetScrollTop) {\n vl.pageContent[0].scrollTop = 0;\n }\n vl.update();\n };\n vl.resetFilter = function () {\n if (vl.params.showFilteredItemsOnly) {\n vl.filteredItems = [];\n }\n else {\n vl.filteredItems = null;\n delete vl.filteredItems;\n }\n vl.update();\n };\n \n var pageHeight, rowsPerScreen, rowsBefore, rowsAfter, rowsToRender, maxBufferHeight = 0, listHeight;\n var dynamicHeight = typeof vl.params.height === 'function';\n \n // Set list size\n vl.setListSize = function () {\n var items = vl.filteredItems || vl.items;\n pageHeight = vl.pageContent[0].offsetHeight;\n if (dynamicHeight) {\n listHeight = 0;\n vl.heights = [];\n for (var i = 0; i < items.length; i++) {\n var itemHeight = vl.params.height(items[i]);\n listHeight += itemHeight;\n vl.heights.push(itemHeight);\n }\n }\n else {\n listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height;\n rowsPerScreen = Math.ceil(pageHeight / vl.params.height);\n rowsBefore = vl.params.rowsBefore || rowsPerScreen * 2;\n rowsAfter = vl.params.rowsAfter || rowsPerScreen;\n rowsToRender = (rowsPerScreen + rowsBefore + rowsAfter);\n maxBufferHeight = rowsBefore / 2 * vl.params.height;\n }\n \n if (updatableScroll) {\n vl.ul.css({height: listHeight + 'px'});\n }\n };\n \n // Render items\n vl.render = function (force, forceScrollTop) {\n if (force) vl.lastRepaintY = null;\n \n var scrollTop = -(vl.listBlock[0].getBoundingClientRect().top - vl.pageContent[0].getBoundingClientRect().top);\n \n if (typeof forceScrollTop !== 'undefined') scrollTop = forceScrollTop;\n \n if (vl.lastRepaintY === null || Math.abs(scrollTop - vl.lastRepaintY) > maxBufferHeight || (!updatableScroll && (vl.pageContent[0].scrollTop + pageHeight >= vl.pageContent[0].scrollHeight))) {\n vl.lastRepaintY = scrollTop;\n }\n else {\n return;\n }\n \n var items = vl.filteredItems || vl.items,\n fromIndex, toIndex, heightBeforeFirstItem = 0, heightBeforeLastItem = 0;\n if (dynamicHeight) {\n var itemTop = 0, j, itemHeight;\n maxBufferHeight = pageHeight;\n \n for (j = 0; j < vl.heights.length; j++) {\n itemHeight = vl.heights[j];\n if (typeof fromIndex === 'undefined') {\n if (itemTop + itemHeight >= scrollTop - pageHeight * 2 * vl.params.dynamicHeightBufferSize) fromIndex = j;\n else heightBeforeFirstItem += itemHeight;\n }\n \n if (typeof toIndex === 'undefined') {\n if (itemTop + itemHeight >= scrollTop + pageHeight * 2 * vl.params.dynamicHeightBufferSize || j === vl.heights.length - 1) toIndex = j + 1;\n heightBeforeLastItem += itemHeight;\n }\n itemTop += itemHeight;\n }\n toIndex = Math.min(toIndex, items.length);\n }\n else {\n fromIndex = (parseInt(scrollTop / vl.params.height) - rowsBefore) * vl.params.cols;\n if (fromIndex < 0) {\n fromIndex = 0;\n }\n toIndex = Math.min(fromIndex + rowsToRender * vl.params.cols, items.length);\n }\n \n var topPosition, renderExternalItems = [];\n vl.reachEnd = false;\n for (var i = fromIndex; i < toIndex; i++) {\n var item, index;\n // Define real item index\n index = vl.items.indexOf(items[i]);\n \n if (i === fromIndex) vl.currentFromIndex = index;\n if (i === toIndex - 1) vl.currentToIndex = index;\n if (vl.filteredItems) {\n if (vl.items[index] === vl.filteredItems[vl.filteredItems.length - 1]) vl.reachEnd = true;\n }\n else {\n if (index === vl.items.length - 1) vl.reachEnd = true;\n }\n \n // Find items\n if (vl.params.renderExternal) {\n renderExternalItems.push(items[i])\n }\n else {\n if (vl.domCache[index]) {\n item = vl.domCache[index];\n item.f7VirtualListIndex = index;\n }\n else {\n if (vl.template && !vl.params.renderItem) {\n vl.tempDomElement.innerHTML = vl.template(items[i], {index: index}).trim();\n }\n else if (vl.params.renderItem) {\n vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]).trim();\n }\n else {\n vl.tempDomElement.innerHTML = items[i].toString().trim();\n }\n item = vl.tempDomElement.childNodes[0];\n if (vl.params.cache) vl.domCache[index] = item;\n item.f7VirtualListIndex = index;\n }\n }\n \n // Set item top position\n if (i === fromIndex) {\n if (dynamicHeight) {\n topPosition = heightBeforeFirstItem;\n }\n else {\n topPosition = (i * vl.params.height / vl.params.cols);\n }\n }\n if (!vl.params.renderExternal) {\n item.style.top = topPosition + 'px';\n \n // Before item insert\n if (vl.params.onItemBeforeInsert) vl.params.onItemBeforeInsert(vl, item);\n \n // Append item to fragment\n vl.fragment.appendChild(item);\n }\n }\n \n // Update list height with not updatable scroll\n if (!updatableScroll) {\n if (dynamicHeight) {\n vl.ul[0].style.height = heightBeforeLastItem + 'px';\n }\n else {\n vl.ul[0].style.height = i * vl.params.height / vl.params.cols + 'px';\n }\n }\n \n // Update list html\n if (vl.params.renderExternal) {\n if (items && items.length === 0) {\n vl.reachEnd = true;\n }\n }\n else {\n if (vl.params.onBeforeClear) vl.params.onBeforeClear(vl, vl.fragment);\n vl.ul[0].innerHTML = '';\n \n if (vl.params.onItemsBeforeInsert) vl.params.onItemsBeforeInsert(vl, vl.fragment);\n if (items && items.length === 0) {\n vl.reachEnd = true;\n if (vl.params.emptyTemplate) vl.ul[0].innerHTML = vl.params.emptyTemplate;\n }\n else {\n vl.ul[0].appendChild(vl.fragment);\n }\n \n if (vl.params.onItemsAfterInsert) vl.params.onItemsAfterInsert(vl, vl.fragment);\n }\n \n if (typeof forceScrollTop !== 'undefined' && force) {\n vl.pageContent.scrollTop(forceScrollTop, 0);\n }\n if (vl.params.renderExternal) {\n vl.params.renderExternal(vl, {\n fromIndex: fromIndex,\n toIndex: toIndex,\n listHeight: listHeight,\n topPosition: topPosition,\n items: renderExternalItems\n });\n }\n };\n \n vl.scrollToItem = function (index) {\n if (index > vl.items.length) return false;\n \n var itemTop = 0, listTop;\n if (dynamicHeight) {\n for (var i = 0; i < index; i++) {\n itemTop += vl.heights[i];\n }\n }\n else {\n itemTop = index * vl.params.height;\n }\n listTop = vl.listBlock[0].offsetTop;\n vl.render(true, listTop + itemTop - parseInt(vl.pageContent.css('padding-top'), 10));\n return true;\n };\n \n // Handle scroll event\n vl.handleScroll = function (e) {\n vl.render();\n };\n // Handle resize event\n vl._isVisible = function (el) {\n return !!( el.offsetWidth || el.offsetHeight || el.getClientRects().length );\n };\n vl.handleResize = function (e) {\n if (vl._isVisible(vl.listBlock[0])) {\n vl.setListSize();\n vl.render(true);\n }\n };\n \n vl.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n vl.pageContent[action]('scroll', vl.handleScroll);\n vl.listBlock.parents('.tab').eq(0)[action]('tab:show', vl.handleResize);\n vl.listBlock.parents('.panel').eq(0)[action]('panel:open', vl.handleResize);\n vl.listBlock.parents('.popup').eq(0)[action]('popup:open', vl.handleResize);\n app[action === 'on' ? 'onResize' : 'offResize'](vl.handleResize);\n };\n \n // Init Virtual List\n vl.init = function () {\n vl.attachEvents();\n vl.setListSize();\n vl.render();\n };\n \n // Append\n vl.appendItems = function (items) {\n for (var i = 0; i < items.length; i++) {\n vl.items.push(items[i]);\n }\n vl.update();\n };\n vl.appendItem = function (item) {\n vl.appendItems([item]);\n };\n // Replace\n vl.replaceAllItems = function (items) {\n vl.items = items;\n delete vl.filteredItems;\n vl.domCache = {};\n vl.update();\n };\n vl.replaceItem = function (index, item) {\n vl.items[index] = item;\n if (vl.params.cache) delete vl.domCache[index];\n vl.update();\n };\n // Prepend\n vl.prependItems = function (items) {\n for (var i = items.length - 1; i >= 0; i--) {\n vl.items.unshift(items[i]);\n }\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n newCache[parseInt(cached, 10) + items.length] = vl.domCache[cached];\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n vl.prependItem = function (item) {\n vl.prependItems([item]);\n };\n \n // Move\n vl.moveItem = function (oldIndex, newIndex) {\n if (oldIndex === newIndex) return;\n // remove item from array\n var item = vl.items.splice(oldIndex, 1)[0];\n if (newIndex >= vl.items.length) {\n // Add item to the end\n vl.items.push(item);\n newIndex = vl.items.length - 1;\n }\n else {\n // Add item to new index\n vl.items.splice(newIndex, 0, item);\n }\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n var leftIndex = oldIndex < newIndex ? oldIndex : newIndex;\n var rightIndex = oldIndex < newIndex ? newIndex : oldIndex;\n var indexShift = oldIndex < newIndex ? -1 : 1;\n if (cachedIndex < leftIndex || cachedIndex > rightIndex) newCache[cachedIndex] = vl.domCache[cachedIndex];\n if (cachedIndex === leftIndex) newCache[rightIndex] = vl.domCache[cachedIndex];\n if (cachedIndex > leftIndex && cachedIndex <= rightIndex) newCache[cachedIndex + indexShift] = vl.domCache[cachedIndex];\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n // Insert before\n vl.insertItemBefore = function (index, item) {\n if (index === 0) {\n vl.prependItem(item);\n return;\n }\n if (index >= vl.items.length) {\n vl.appendItem(item);\n return;\n }\n vl.items.splice(index, 0, item);\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n if (cachedIndex >= index) {\n newCache[cachedIndex + 1] = vl.domCache[cachedIndex];\n }\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n // Delete\n vl.deleteItems = function (indexes) {\n var prevIndex, indexShift = 0;\n for (var i = 0; i < indexes.length; i++) {\n var index = indexes[i];\n if (typeof prevIndex !== 'undefined') {\n if (index > prevIndex) {\n indexShift = -i;\n }\n }\n index = index + indexShift;\n prevIndex = indexes[i];\n // Delete item\n var deletedItem = vl.items.splice(index, 1)[0];\n \n // Delete from filtered\n if (vl.filteredItems && vl.filteredItems.indexOf(deletedItem) >= 0) {\n vl.filteredItems.splice(vl.filteredItems.indexOf(deletedItem), 1);\n }\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n if (cachedIndex === index) {\n delete vl.domCache[index];\n }\n else if (parseInt(cached, 10) > index) {\n newCache[cachedIndex - 1] = vl.domCache[cached];\n }\n else {\n newCache[cachedIndex] = vl.domCache[cached];\n }\n }\n vl.domCache = newCache;\n }\n }\n vl.update();\n };\n vl.deleteAllItems = function () {\n vl.items = [];\n delete vl.filteredItems;\n if (vl.params.cache) vl.domCache = {};\n vl.update();\n };\n vl.deleteItem = function (index) {\n vl.deleteItems([index]);\n };\n \n // Clear cache\n vl.clearCache = function () {\n vl.domCache = {};\n };\n \n // Update Virtual List\n vl.update = function () {\n vl.setListSize();\n vl.render(true);\n };\n \n // Destroy\n vl.destroy = function () {\n vl.attachEvents(true);\n delete vl.items;\n delete vl.domCache;\n };\n \n // Init Virtual List\n vl.init();\n \n // Store vl in container\n vl.listBlock[0].f7VirtualList = vl;\n return vl;\n };\n \n // App Method\n app.virtualList = function (listBlock, params) {\n return new VirtualList(listBlock, params);\n };\n \n app.reinitVirtualList = function (pageContainer) {\n var page = $(pageContainer);\n var vlists = page.find('.virtual-list');\n if (vlists.length === 0) return;\n for (var i = 0; i < vlists.length; i++) {\n var vlistInstance = vlists[i].f7VirtualList;\n if (vlistInstance) {\n vlistInstance.update();\n }\n }\n };\n \n"," /*======================================================\n ************ Pull To Refresh ************\n ======================================================*/\n app.initPullToRefresh = function (pageContainer) {\n var eventsTarget = $(pageContainer);\n if (!eventsTarget.hasClass('pull-to-refresh-content')) {\n eventsTarget = eventsTarget.find('.pull-to-refresh-content');\n }\n if (!eventsTarget || eventsTarget.length === 0) return;\n \n var touchId, isTouched, isMoved, touchesStart = {}, isScrolling, touchesDiff, touchStartTime, container, refresh = false, useTranslate = false, startTranslate = 0, translate, scrollTop, wasScrolled, layer, triggerDistance, dynamicTriggerDistance, pullStarted;\n var page = eventsTarget.hasClass('page') ? eventsTarget : eventsTarget.parents('.page');\n var hasNavbar = false;\n if (page.find('.navbar').length > 0 || page.parents('.navbar-fixed, .navbar-through').length > 0 || page.hasClass('navbar-fixed') || page.hasClass('navbar-through')) hasNavbar = true;\n if (page.hasClass('no-navbar')) hasNavbar = false;\n if (!hasNavbar) eventsTarget.addClass('pull-to-refresh-no-navbar');\n \n container = eventsTarget;\n \n // Define trigger distance\n if (container.attr('data-ptr-distance')) {\n dynamicTriggerDistance = true;\n }\n else {\n triggerDistance = 44;\n }\n \n function handleTouchStart(e) {\n if (isTouched) {\n if (app.device.os === 'android') {\n if ('targetTouches' in e && e.targetTouches.length > 1) return;\n }\n else return;\n }\n \n /*jshint validthis:true */\n container = $(this);\n if (container.hasClass('refreshing')) {\n return;\n }\n \n isMoved = false;\n pullStarted = false;\n isTouched = true;\n isScrolling = undefined;\n wasScrolled = undefined;\n if (e.type === 'touchstart') touchId = e.targetTouches[0].identifier;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n \n }\n \n function handleTouchMove(e) {\n if (!isTouched) return;\n var pageX, pageY, touch;\n if (e.type === 'touchmove') {\n if (touchId && e.touches) {\n for (var i = 0; i < e.touches.length; i++) {\n if (e.touches[i].identifier === touchId) {\n touch = e.touches[i];\n }\n }\n }\n if (!touch) touch = e.targetTouches[0];\n pageX = touch.pageX;\n pageY = touch.pageY;\n }\n else {\n pageX = e.pageX;\n pageY = e.pageY;\n }\n if (!pageX || !pageY) return;\n \n \n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (!isScrolling) {\n isTouched = false;\n return;\n }\n \n scrollTop = container[0].scrollTop;\n if (typeof wasScrolled === 'undefined' && scrollTop !== 0) wasScrolled = true;\n \n if (!isMoved) {\n /*jshint validthis:true */\n container.removeClass('transitioning');\n if (scrollTop > container[0].offsetHeight) {\n isTouched = false;\n return;\n }\n if (dynamicTriggerDistance) {\n triggerDistance = container.attr('data-ptr-distance');\n if (triggerDistance.indexOf('%') >= 0) triggerDistance = container[0].offsetHeight * parseInt(triggerDistance, 10) / 100;\n }\n startTranslate = container.hasClass('refreshing') ? triggerDistance : 0;\n if (container[0].scrollHeight === container[0].offsetHeight || app.device.os !== 'ios') {\n useTranslate = true;\n }\n else {\n useTranslate = false;\n }\n }\n isMoved = true;\n touchesDiff = pageY - touchesStart.y;\n \n if (touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0) {\n // iOS 8 fix\n if (app.device.os === 'ios' && parseInt(app.device.osVersion.split('.')[0], 10) > 7 && scrollTop === 0 && !wasScrolled) useTranslate = true;\n \n if (useTranslate) {\n e.preventDefault();\n translate = (Math.pow(touchesDiff, 0.85) + startTranslate);\n container.transform('translate3d(0,' + translate + 'px,0)');\n }\n if ((useTranslate && Math.pow(touchesDiff, 0.85) > triggerDistance) || (!useTranslate && touchesDiff >= triggerDistance * 2)) {\n refresh = true;\n container.addClass('pull-up').removeClass('pull-down');\n }\n else {\n refresh = false;\n container.removeClass('pull-up').addClass('pull-down');\n }\n if (!pullStarted) {\n container.trigger('pullstart ptr:pullstart');\n pullStarted = true;\n }\n container.trigger('pullmove ptr:pullmove', {\n event: e,\n scrollTop: scrollTop,\n translate: translate,\n touchesDiff: touchesDiff\n });\n }\n else {\n pullStarted = false;\n container.removeClass('pull-up pull-down');\n refresh = false;\n return;\n }\n }\n function handleTouchEnd(e) {\n if (e.type === 'touchend' && e.changedTouches && e.changedTouches.length > 0 && touchId) {\n if (e.changedTouches[0].identifier !== touchId) return;\n }\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n if (translate) {\n container.addClass('transitioning');\n translate = 0;\n }\n container.transform('');\n if (refresh) {\n container.addClass('refreshing');\n container.trigger('refresh ptr:refresh', {\n done: function () {\n app.pullToRefreshDone(container);\n }\n });\n }\n else {\n container.removeClass('pull-down');\n }\n isTouched = false;\n isMoved = false;\n if (pullStarted) container.trigger('pullend ptr:pullend');\n }\n \n // Attach Events\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n eventsTarget.on(app.touchEvents.start, handleTouchStart, passiveListener);\n eventsTarget.on(app.touchEvents.move, handleTouchMove, activeListener);\n eventsTarget.on(app.touchEvents.end, handleTouchEnd, passiveListener);\n \n // Detach Events on page remove\n if (page.length === 0) return;\n function destroyPullToRefresh(destroyTarget) {\n destroyTarget.off(app.touchEvents.start, handleTouchStart, passiveListener);\n destroyTarget.off(app.touchEvents.move, handleTouchMove, activeListener);\n destroyTarget.off(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n for (var i = 0; i < eventsTarget.length; i++) {\n eventsTarget[i].f7DestroyPullToRefresh = destroyPullToRefresh;\n }\n function detachEvents() {\n destroyPullToRefresh(eventsTarget);\n page.off('page:beforeremove', detachEvents);\n }\n page.on('page:beforeremove', detachEvents);\n \n };\n \n app.pullToRefreshDone = function (container) {\n container = $(container);\n if (container.length === 0) container = $('.pull-to-refresh-content.refreshing');\n container.removeClass('refreshing').addClass('transitioning');\n container.transitionEnd(function () {\n container.removeClass('transitioning pull-up pull-down');\n container.trigger('refreshdone ptr:done');\n });\n };\n app.pullToRefreshTrigger = function (container) {\n container = $(container);\n if (container.length === 0) container = $('.pull-to-refresh-content');\n if (container.hasClass('refreshing')) return;\n container.addClass('transitioning refreshing');\n container.trigger('refresh ptr:refresh', {\n done: function () {\n app.pullToRefreshDone(container);\n }\n });\n };\n \n app.destroyPullToRefresh = function (pageContainer) {\n pageContainer = $(pageContainer);\n var pullToRefreshContent = pageContainer.hasClass('pull-to-refresh-content') ? pageContainer : pageContainer.find('.pull-to-refresh-content');\n if (pullToRefreshContent.length === 0) return;\n if (pullToRefreshContent[0].f7DestroyPullToRefresh) pullToRefreshContent[0].f7DestroyPullToRefresh(pageContainer);\n };\n \n"," /* ===============================================================================\n ************ Infinite Scroll ************\n =============================================================================== */\n function handleInfiniteScroll() {\n /*jshint validthis:true */\n var inf = $(this);\n var scrollTop = inf[0].scrollTop;\n var scrollHeight = inf[0].scrollHeight;\n var height = inf[0].offsetHeight;\n var distance = inf[0].getAttribute('data-distance');\n var virtualListContainer = inf.find('.virtual-list');\n var virtualList;\n var onTop = inf.hasClass('infinite-scroll-top');\n if (!distance) distance = 50;\n if (typeof distance === 'string' && distance.indexOf('%') >= 0) {\n distance = parseInt(distance, 10) / 100 * height;\n }\n if (distance > height) distance = height;\n if (onTop) {\n if (scrollTop < distance) {\n inf.trigger('infinite');\n }\n }\n else {\n if (scrollTop + height >= scrollHeight - distance) {\n if (virtualListContainer.length > 0) {\n virtualList = virtualListContainer.eq(-1)[0].f7VirtualList;\n if (virtualList && !virtualList.reachEnd && !virtualList.params.updatableScroll) {\n return;\n }\n }\n inf.trigger('infinite');\n }\n }\n \n }\n app.attachInfiniteScroll = function (infiniteContent) {\n $(infiniteContent).on('scroll', handleInfiniteScroll);\n };\n app.detachInfiniteScroll = function (infiniteContent) {\n $(infiniteContent).off('scroll', handleInfiniteScroll);\n };\n \n app.initPageInfiniteScroll = function (pageContainer) {\n pageContainer = $(pageContainer);\n var infiniteContent = pageContainer.find('.infinite-scroll');\n if (infiniteContent.length === 0) return;\n app.attachInfiniteScroll(infiniteContent);\n function detachEvents() {\n app.detachInfiniteScroll(infiniteContent);\n pageContainer.off('page:beforeremove', detachEvents);\n }\n pageContainer.on('page:beforeremove', detachEvents);\n };\n"," /*=============================================================\n ************ Hide/show Toolbar/Navbar on scroll ************\n =============================================================*/\n app.initPageScrollToolbars = function (pageContainer) {\n pageContainer = $(pageContainer);\n var scrollContent = pageContainer.find('.page-content');\n if (scrollContent.length === 0) return;\n var hideNavbar = (app.params.hideNavbarOnPageScroll || scrollContent.hasClass('hide-navbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-navbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll'));\n var hideToolbar = (app.params.hideToolbarOnPageScroll || scrollContent.hasClass('hide-toolbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-toolbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll'));\n var hideTabbar = (app.params.hideTabbarOnPageScroll || scrollContent.hasClass('hide-tabbar-on-scroll')) && !(scrollContent.hasClass('keep-tabbar-on-scroll'));\n \n if (!(hideNavbar || hideToolbar || hideTabbar)) return;\n \n var viewContainer = scrollContent.parents('.' + app.params.viewClass);\n if (viewContainer.length === 0) return;\n \n var navbar = viewContainer.find('.navbar'),\n toolbar = viewContainer.find('.toolbar'),\n tabbar;\n if (hideTabbar) {\n tabbar = viewContainer.find('.tabbar');\n if (tabbar.length === 0) tabbar = viewContainer.parents('.' + app.params.viewsClass).find('.tabbar');\n }\n \n var hasNavbar = navbar.length > 0,\n hasToolbar = toolbar.length > 0,\n hasTabbar = tabbar && tabbar.length > 0;\n \n var previousScroll, currentScroll;\n previousScroll = currentScroll = scrollContent[0].scrollTop;\n \n var scrollHeight, offsetHeight, reachEnd, action, navbarHidden, toolbarHidden, tabbarHidden;\n \n var toolbarHeight = (hasToolbar && hideToolbar) ? toolbar[0].offsetHeight : 0;\n var tabbarHeight = (hasTabbar && hideTabbar) ? tabbar[0].offsetHeight : 0;\n var bottomBarHeight = tabbarHeight || toolbarHeight;\n \n function handleScroll(e) {\n if (pageContainer.hasClass('page-on-left')) return;\n currentScroll = scrollContent[0].scrollTop;\n scrollHeight = scrollContent[0].scrollHeight;\n offsetHeight = scrollContent[0].offsetHeight;\n reachEnd = currentScroll + offsetHeight >= scrollHeight - bottomBarHeight;\n navbarHidden = navbar.hasClass('navbar-hidden');\n toolbarHidden = toolbar.hasClass('toolbar-hidden');\n tabbarHidden = tabbar && tabbar.hasClass('toolbar-hidden');\n \n if (reachEnd) {\n if (app.params.showBarsOnPageScrollEnd) {\n action = 'show';\n }\n }\n else if (previousScroll > currentScroll) {\n if (app.params.showBarsOnPageScrollTop || currentScroll <= 44) {\n action = 'show';\n }\n else {\n action = 'hide';\n }\n }\n else {\n if (currentScroll > 44) {\n action = 'hide';\n }\n else {\n action = 'show';\n }\n }\n \n if (action === 'show') {\n if (hasNavbar && hideNavbar && navbarHidden) {\n app.showNavbar(navbar);\n pageContainer.removeClass('no-navbar-by-scroll');\n navbarHidden = false;\n }\n if (hasToolbar && hideToolbar && toolbarHidden) {\n app.showToolbar(toolbar);\n pageContainer.removeClass('no-toolbar-by-scroll');\n toolbarHidden = false;\n }\n if (hasTabbar && hideTabbar && tabbarHidden) {\n app.showToolbar(tabbar);\n pageContainer.removeClass('no-tabbar-by-scroll');\n tabbarHidden = false;\n }\n }\n else {\n if (hasNavbar && hideNavbar && !navbarHidden) {\n app.hideNavbar(navbar);\n pageContainer.addClass('no-navbar-by-scroll');\n navbarHidden = true;\n }\n if (hasToolbar && hideToolbar && !toolbarHidden) {\n app.hideToolbar(toolbar);\n pageContainer.addClass('no-toolbar-by-scroll');\n toolbarHidden = true;\n }\n if (hasTabbar && hideTabbar && !tabbarHidden) {\n app.hideToolbar(tabbar);\n pageContainer.addClass('no-tabbar-by-scroll');\n tabbarHidden = true;\n }\n }\n \n previousScroll = currentScroll;\n }\n scrollContent.on('scroll', handleScroll);\n scrollContent[0].f7ScrollToolbarsHandler = handleScroll;\n };\n app.destroyScrollToolbars = function (pageContainer) {\n pageContainer = $(pageContainer);\n var scrollContent = pageContainer.find('.page-content');\n if (scrollContent.length === 0) return;\n var handler = scrollContent[0].f7ScrollToolbarsHandler;\n if (!handler) return;\n scrollContent.off('scroll', scrollContent[0].f7ScrollToolbarsHandler);\n };\n \n"," /*======================================================\n ************ Material Tabbar ************\n ======================================================*/\n app.materialTabbarSetHighlight = function (tabbar, activeLink) {\n $(tabbar).each(function () {\n var tabbar = $(this);\n activeLink = activeLink || tabbar.find('.tab-link.active');\n \n if (activeLink && activeLink.length > 0) {\n var tabLinkWidth, highlightTranslate;\n if (tabbar.hasClass('tabbar-scrollable')) {\n tabLinkWidth = activeLink[0].offsetWidth + 'px';\n highlightTranslate = activeLink[0].offsetLeft + 'px';\n }\n else {\n tabLinkWidth = 1 / tabbar.find('.tab-link').length * 100 + '%';\n highlightTranslate = (app.rtl ? - activeLink.index(): activeLink.index()) * 100 + '%';\n }\n \n tabbar.find('.tab-link-highlight')\n .css({width: tabLinkWidth})\n .transform('translate3d(' + highlightTranslate + ',0,0)');\n }\n });\n };\n app.initPageMaterialTabbar = function (pageContainer) {\n pageContainer = $(pageContainer);\n var tabbar = pageContainer.find('.tabbar');\n if (tabbar.length === 0 && pageContainer.hasClass('tabbar')) tabbar = pageContainer;\n \n function tabbarSetHighlight() {\n app.materialTabbarSetHighlight(tabbar);\n }\n if (tabbar.length > 0) {\n if (tabbar.find('.tab-link-highlight').length === 0) {\n tabbar.find('.toolbar-inner').append('');\n }\n \n tabbarSetHighlight();\n app.onResize(tabbarSetHighlight);\n pageContainer.once('page:beforeremove', function () {\n app.offResize(tabbarSetHighlight);\n });\n }\n };\n app.initMaterialTabbar = function (tabbar) {\n return app.initPageMaterialTabbar(tabbar);\n };\n \n"," /* ===============================================================================\n ************ Tabs ************\n =============================================================================== */\n app.showTab = function (tab, tabLink, animated, force) {\n var newTab = $(tab);\n if (arguments.length === 2 && typeof arguments[1] === 'boolean') {\n tab = arguments[0];\n animated = arguments[1];\n }\n if (arguments.length === 3 && typeof arguments[1] === 'boolean' && typeof arguments[2] === 'boolean') {\n tab = arguments[0];\n animated = arguments[1];\n force = arguments[2];\n }\n if (typeof animated === 'undefined') animated = true;\n if (newTab.length === 0) return false;\n if (newTab.hasClass('active')) {\n if (force) newTab.trigger('show tab:show');\n return false;\n }\n var tabs = newTab.parent('.tabs');\n if (tabs.length === 0) return false;\n \n // Return swipeouts in hidden tabs\n app.allowSwipeout = true;\n \n // Animated tabs\n var isAnimatedTabs = tabs.parent().hasClass('tabs-animated-wrap');\n if (isAnimatedTabs) {\n tabs.parent()[animated ? 'removeClass' : 'addClass']('not-animated');\n var tabTranslate = (app.rtl ? newTab.index() : -newTab.index()) * 100;\n tabs.transform('translate3d(' + tabTranslate + '%,0,0)');\n }\n \n // Swipeable tabs\n var isSwipeableTabs = tabs.parent().hasClass('tabs-swipeable-wrap'), swiper;\n if (isSwipeableTabs) {\n swiper = tabs.parent()[0].swiper;\n if (swiper.activeIndex !== newTab.index()) swiper.slideTo(newTab.index(), animated ? undefined : 0, false);\n }\n \n // Remove active class from old tabs\n var oldTab = tabs.children('.tab.active').removeClass('active').trigger('hide tab:hide');\n // Add active class to new tab\n newTab.addClass('active');\n // Trigger 'show' event on new tab\n newTab.trigger('show tab:show');\n \n // Update navbars in new tab\n if (!isAnimatedTabs && !isSwipeableTabs && newTab.find('.navbar').length > 0) {\n // Find tab's view\n var viewContainer;\n if (newTab.hasClass(app.params.viewClass)) viewContainer = newTab[0];\n else viewContainer = newTab.parents('.' + app.params.viewClass)[0];\n app.sizeNavbars(viewContainer);\n }\n \n // Find related link for new tab\n if (tabLink) tabLink = $(tabLink);\n else {\n // Search by id\n if (typeof tab === 'string') tabLink = $('.tab-link[href=\"' + tab + '\"]');\n else tabLink = $('.tab-link[href=\"#' + newTab.attr('id') + '\"]');\n // Search by data-tab\n if (!tabLink || tabLink && tabLink.length === 0) {\n $('[data-tab]').each(function () {\n if (newTab.is($(this).attr('data-tab'))) tabLink = $(this);\n });\n }\n }\n if (tabLink.length === 0) return;\n \n // Find related link for old tab\n var oldTabLink;\n if (oldTab && oldTab.length > 0) {\n // Search by id\n var oldTabId = oldTab.attr('id');\n if (oldTabId) oldTabLink = $('.tab-link[href=\"#' + oldTabId + '\"]');\n // Search by data-tab\n if (!oldTabLink || oldTabLink && oldTabLink.length === 0) {\n $('[data-tab]').each(function () {\n if (oldTab.is($(this).attr('data-tab'))) oldTabLink = $(this);\n });\n }\n }\n \n // Update links' classes\n if (tabLink && tabLink.length > 0) {\n tabLink.addClass('active');\n // Material Highlight\n if (app.params.material) {\n var tabbar = tabLink.parents('.tabbar');\n if (tabbar.length > 0) {\n if (tabbar.find('.tab-link-highlight').length === 0) {\n tabbar.find('.toolbar-inner').append('');\n }\n app.materialTabbarSetHighlight(tabbar, tabLink);\n }\n }\n }\n if (oldTabLink && oldTabLink.length > 0) oldTabLink.removeClass('active');\n \n return true;\n };\n"," /*===============================================================================\n ************ Accordion ************\n ===============================================================================*/\n app.accordionToggle = function (item) {\n item = $(item);\n if (item.length === 0) return;\n if (item.hasClass('accordion-item-expanded')) app.accordionClose(item);\n else app.accordionOpen(item);\n };\n app.accordionOpen = function (item) {\n item = $(item);\n var list = item.parents('.accordion-list').eq(0);\n var content = item.children('.accordion-item-content');\n if (content.length === 0) content = item.find('.accordion-item-content');\n var expandedItem = list.length > 0 && item.parent().children('.accordion-item-expanded');\n if (expandedItem.length > 0) {\n app.accordionClose(expandedItem);\n }\n content.css('height', content[0].scrollHeight + 'px').transitionEnd(function () {\n if (item.hasClass('accordion-item-expanded')) {\n content.transition(0);\n content.css('height', 'auto');\n var clientLeft = content[0].clientLeft;\n content.transition('');\n item.trigger('opened accordion:opened');\n }\n else {\n content.css('height', '');\n item.trigger('closed accordion:closed');\n }\n });\n item.trigger('open accordion:open');\n item.addClass('accordion-item-expanded');\n };\n app.accordionClose = function (item) {\n item = $(item);\n var content = item.children('.accordion-item-content');\n if (content.length === 0) content = item.find('.accordion-item-content');\n item.removeClass('accordion-item-expanded');\n content.transition(0);\n content.css('height', content[0].scrollHeight + 'px');\n // Relayout\n var clientLeft = content[0].clientLeft;\n // Close\n content.transition('');\n content.css('height', '').transitionEnd(function () {\n if (item.hasClass('accordion-item-expanded')) {\n content.transition(0);\n content.css('height', 'auto');\n var clientLeft = content[0].clientLeft;\n content.transition('');\n item.trigger('opened accordion:opened');\n }\n else {\n content.css('height', '');\n item.trigger('closed accordion:closed');\n }\n });\n item.trigger('close accordion:close');\n };\n"," /*===============================================================================\n ************ Fast Clicks ************\n ************ Inspired by https://github.com/ftlabs/fastclick ************\n ===============================================================================*/\n app.initFastClicks = function () {\n if (app.params.activeState) {\n $('html').addClass('watch-active-state');\n }\n if (app.device.ios && app.device.webView) {\n // Strange hack required for iOS 8 webview to work on inputs\n window.addEventListener('touchstart', function () {});\n }\n \n var touchStartX, touchStartY, touchStartTime, targetElement, trackClick, activeSelection, scrollParent, lastClickTime, isMoved, tapHoldFired, tapHoldTimeout;\n var activableElement, activeTimeout, needsFastClick, needsFastClickTimeOut;\n var rippleWave, rippleTarget, rippleTransform, rippleTimeout;\n function findActivableElement(el) {\n var target = $(el);\n var parents = target.parents(app.params.activeStateElements);\n var activable;\n if (target.is(app.params.activeStateElements)) {\n activable = target;\n }\n if (parents.length > 0) {\n activable = activable ? activable.add(parents) : parents;\n }\n return activable ? activable : target;\n }\n function isInsideScrollableView(el) {\n var pageContent = el.parents('.page-content, .panel');\n \n if (pageContent.length === 0) {\n return false;\n }\n \n // This event handler covers the \"tap to stop scrolling\".\n if (pageContent.prop('scrollHandlerSet') !== 'yes') {\n pageContent.on('scroll', function() {\n clearTimeout(activeTimeout);\n clearTimeout(rippleTimeout);\n });\n pageContent.prop('scrollHandlerSet', 'yes');\n }\n \n return true;\n }\n function addActive() {\n if (!activableElement) return;\n activableElement.addClass('active-state');\n }\n function removeActive(el) {\n if (!activableElement) return;\n activableElement.removeClass('active-state');\n activableElement = null;\n }\n function isFormElement(el) {\n var nodes = ('input select textarea label').split(' ');\n if (el.nodeName && nodes.indexOf(el.nodeName.toLowerCase()) >= 0) return true;\n return false;\n }\n function androidNeedsBlur(el) {\n var noBlur = ('button input textarea select').split(' ');\n if (document.activeElement && el !== document.activeElement && document.activeElement !== document.body) {\n if (noBlur.indexOf(el.nodeName.toLowerCase()) >= 0) {\n return false;\n }\n else {\n return true;\n }\n }\n else {\n return false;\n }\n }\n function targetNeedsFastClick(el) {\n var $el = $(el);\n if (el.nodeName.toLowerCase() === 'input' && (el.type === 'file' || el.type === 'range')) return false;\n if (el.nodeName.toLowerCase() === 'select' && app.device.android) return false;\n if ($el.hasClass('no-fastclick') || $el.parents('.no-fastclick').length > 0) return false;\n if (app.params.fastClicksExclude && $el.is(app.params.fastClicksExclude)) return false;\n return true;\n }\n function targetNeedsFocus(el) {\n if (document.activeElement === el) {\n return false;\n }\n var tag = el.nodeName.toLowerCase();\n var skipInputs = ('button checkbox file image radio submit').split(' ');\n if (el.disabled || el.readOnly) return false;\n if (tag === 'textarea') return true;\n if (tag === 'select') {\n if (app.device.android) return false;\n else return true;\n }\n if (tag === 'input' && skipInputs.indexOf(el.type) < 0) return true;\n }\n function targetNeedsPrevent(el) {\n el = $(el);\n var prevent = true;\n if (el.is('label') || el.parents('label').length > 0) {\n if (app.device.android) {\n prevent = false;\n }\n else if (app.device.ios && el.is('input')) {\n prevent = true;\n }\n else prevent = false;\n }\n return prevent;\n }\n \n // Mouse Handlers\n function handleMouseDown (e) {\n findActivableElement(e.target).addClass('active-state');\n if ('which' in e && e.which === 3) {\n setTimeout(function () {\n $('.active-state').removeClass('active-state');\n }, 0);\n }\n if (app.params.material && app.params.materialRipple) {\n touchStartX = e.pageX;\n touchStartY = e.pageY;\n rippleTouchStart(e.target, e.pageX, e.pageY);\n }\n }\n function handleMouseMove (e) {\n $('.active-state').removeClass('active-state');\n if (app.params.material && app.params.materialRipple) {\n rippleTouchMove();\n }\n }\n function handleMouseUp (e) {\n $('.active-state').removeClass('active-state');\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n }\n \n // Material Touch Ripple Effect\n function findRippleElement(el) {\n var needsRipple = app.params.materialRippleElements;\n var $el = $(el);\n if ($el.is(needsRipple)) {\n if ($el.hasClass('no-ripple')) {\n return false;\n }\n return $el;\n }\n else if ($el.parents(needsRipple).length > 0) {\n var rippleParent = $el.parents(needsRipple).eq(0);\n if (rippleParent.hasClass('no-ripple')) {\n return false;\n }\n return rippleParent;\n }\n else return false;\n }\n function createRipple(x, y, el) {\n if (!el) return;\n var box = el[0].getBoundingClientRect();\n var center = {\n x: x - box.left,\n y: y - box.top\n },\n height = box.height,\n width = box.width;\n var diameter = Math.max(Math.pow((Math.pow(height, 2) + Math.pow(width, 2)), 0.5), 48);\n \n rippleWave = $(\n '
        '\n );\n el.prepend(rippleWave);\n var clientLeft = rippleWave[0].clientLeft;\n rippleTransform = 'translate3d('+(-center.x + width/2)+'px, '+(-center.y + height/2)+'px, 0) scale(1)';\n rippleWave.transform(rippleTransform);\n }\n \n function removeRipple() {\n if (!rippleWave) return;\n var toRemove = rippleWave;\n \n var removeTimeout = setTimeout(function () {\n toRemove.remove();\n }, 400);\n \n rippleWave\n .addClass('ripple-wave-fill')\n .transform(rippleTransform.replace('scale(1)', 'scale(1.01)'))\n .transitionEnd(function () {\n clearTimeout(removeTimeout);\n \n var rippleWave = $(this)\n .addClass('ripple-wave-out')\n .transform(rippleTransform.replace('scale(1)', 'scale(1.01)'));\n \n removeTimeout = setTimeout(function () {\n rippleWave.remove();\n }, 700);\n \n setTimeout(function () {\n rippleWave.transitionEnd(function(){\n clearTimeout(removeTimeout);\n $(this).remove();\n });\n }, 0);\n });\n \n rippleWave = rippleTarget = undefined;\n }\n \n function rippleTouchStart (el, x, y) {\n rippleTarget = findRippleElement(el);\n if (!rippleTarget || rippleTarget.length === 0) {\n rippleTarget = undefined;\n return;\n }\n if (!isInsideScrollableView(rippleTarget)) {\n createRipple(touchStartX, touchStartY, rippleTarget);\n }\n else {\n rippleTimeout = setTimeout(function () {\n createRipple(touchStartX, touchStartY, rippleTarget);\n }, 80);\n }\n }\n function rippleTouchMove() {\n clearTimeout(rippleTimeout);\n removeRipple();\n }\n function rippleTouchEnd() {\n if (rippleWave) {\n removeRipple();\n }\n else if (rippleTarget && !isMoved) {\n clearTimeout(rippleTimeout);\n createRipple(touchStartX, touchStartY, rippleTarget);\n setTimeout(removeRipple, 0);\n }\n else {\n removeRipple();\n }\n }\n \n // Send Click\n function sendClick(e) {\n var touch = e.changedTouches[0];\n var evt = document.createEvent('MouseEvents');\n var eventType = 'click';\n if (app.device.android && targetElement.nodeName.toLowerCase() === 'select') {\n eventType = 'mousedown';\n }\n evt.initMouseEvent(eventType, true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n evt.forwardedTouchEvent = true;\n targetElement.dispatchEvent(evt);\n }\n \n // Touch Handlers\n function handleTouchStart(e) {\n isMoved = false;\n tapHoldFired = false;\n if (e.targetTouches.length > 1) {\n if (activableElement) removeActive();\n return true;\n }\n if (e.touches.length > 1 && activableElement) {\n removeActive();\n }\n if (app.params.tapHold) {\n if (tapHoldTimeout) clearTimeout(tapHoldTimeout);\n tapHoldTimeout = setTimeout(function () {\n if (e && e.touches && e.touches.length > 1) return;\n tapHoldFired = true;\n e.preventDefault();\n $(e.target).trigger('taphold');\n }, app.params.tapHoldDelay);\n }\n if (needsFastClickTimeOut) clearTimeout(needsFastClickTimeOut);\n needsFastClick = targetNeedsFastClick(e.target);\n \n if (!needsFastClick) {\n trackClick = false;\n return true;\n }\n if (app.device.ios || (app.device.android && 'getSelection' in window)) {\n var selection = window.getSelection();\n if (selection.rangeCount && selection.focusNode !== document.body && (!selection.isCollapsed || document.activeElement === selection.focusNode)) {\n activeSelection = true;\n return true;\n }\n else {\n activeSelection = false;\n }\n }\n if (app.device.android) {\n if (androidNeedsBlur(e.target)) {\n document.activeElement.blur();\n }\n }\n \n trackClick = true;\n targetElement = e.target;\n touchStartTime = (new Date()).getTime();\n touchStartX = e.targetTouches[0].pageX;\n touchStartY = e.targetTouches[0].pageY;\n \n // Detect scroll parent\n if (app.device.ios) {\n scrollParent = undefined;\n $(targetElement).parents().each(function () {\n var parent = this;\n if (parent.scrollHeight > parent.offsetHeight && !scrollParent) {\n scrollParent = parent;\n scrollParent.f7ScrollTop = scrollParent.scrollTop;\n }\n });\n }\n if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) {\n e.preventDefault();\n }\n \n if (app.params.activeState) {\n activableElement = findActivableElement(targetElement);\n // If it's inside a scrollable view, we don't trigger active-state yet,\n // because it can be a scroll instead. Based on the link:\n // http://labnote.beedesk.com/click-scroll-and-pseudo-active-on-mobile-webk\n if (!isInsideScrollableView(activableElement)) {\n addActive();\n } else {\n activeTimeout = setTimeout(addActive, 80);\n }\n }\n if (app.params.material && app.params.materialRipple) {\n rippleTouchStart(targetElement, touchStartX, touchStartY);\n }\n }\n function handleTouchMove(e) {\n if (!trackClick) return;\n var _isMoved = false;\n var distance = app.params.fastClicksDistanceThreshold;\n if (distance) {\n var pageX = e.targetTouches[0].pageX;\n var pageY = e.targetTouches[0].pageY;\n if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) {\n _isMoved = true;\n }\n }\n else {\n _isMoved = true;\n }\n if (_isMoved) {\n trackClick = false;\n targetElement = null;\n isMoved = true;\n if (app.params.tapHold) {\n clearTimeout(tapHoldTimeout);\n }\n \t\t\tif (app.params.activeState) {\n \t\t\t\tclearTimeout(activeTimeout);\n \t\t\t\tremoveActive();\n \t\t\t}\n if (app.params.material && app.params.materialRipple) {\n rippleTouchMove();\n }\n }\n }\n function handleTouchEnd(e) {\n clearTimeout(activeTimeout);\n clearTimeout(tapHoldTimeout);\n \n if (!trackClick) {\n if (!activeSelection && needsFastClick) {\n if (!(app.device.android && !e.cancelable)) {\n e.preventDefault();\n }\n }\n return true;\n }\n \n if (document.activeElement === e.target) {\n if (app.params.activeState) removeActive();\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n return true;\n }\n \n if (!activeSelection) {\n e.preventDefault();\n }\n \n if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) {\n setTimeout(removeActive, 0);\n return true;\n }\n \n lastClickTime = e.timeStamp;\n \n trackClick = false;\n \n if (app.device.ios && scrollParent) {\n if (scrollParent.scrollTop !== scrollParent.f7ScrollTop) {\n return false;\n }\n }\n \n // Add active-state here because, in a very fast tap, the timeout didn't\n // have the chance to execute. Removing active-state in a timeout gives\n // the chance to the animation execute.\n if (app.params.activeState) {\n addActive();\n setTimeout(removeActive, 0);\n }\n // Remove Ripple\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n \n // Trigger focus when required\n if (targetNeedsFocus(targetElement)) {\n if (app.device.ios && app.device.webView) {\n if ((event.timeStamp - touchStartTime) > 159) {\n targetElement = null;\n return false;\n }\n targetElement.focus();\n return false;\n }\n else {\n targetElement.focus();\n }\n }\n \n // Blur active elements\n if (document.activeElement && targetElement !== document.activeElement && document.activeElement !== document.body && targetElement.nodeName.toLowerCase() !== 'label') {\n document.activeElement.blur();\n }\n \n // Send click\n e.preventDefault();\n sendClick(e);\n return false;\n }\n function handleTouchCancel(e) {\n trackClick = false;\n targetElement = null;\n \n // Remove Active State\n clearTimeout(activeTimeout);\n clearTimeout(tapHoldTimeout);\n if (app.params.activeState) {\n removeActive();\n }\n \n // Remove Ripple\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n }\n \n function handleClick(e) {\n var allowClick = false;\n \n if (trackClick) {\n targetElement = null;\n trackClick = false;\n return true;\n }\n if (e.target.type === 'submit' && e.detail === 0 || e.target.type === 'file') {\n return true;\n }\n if (!targetElement) {\n if (!isFormElement(e.target)) {\n allowClick = true;\n }\n }\n if (!needsFastClick) {\n allowClick = true;\n }\n if (document.activeElement === targetElement) {\n allowClick = true;\n }\n if (e.forwardedTouchEvent) {\n allowClick = true;\n }\n if (!e.cancelable) {\n allowClick = true;\n }\n if (app.params.tapHold && app.params.tapHoldPreventClicks && tapHoldFired) {\n allowClick = false;\n }\n if (!allowClick) {\n e.stopImmediatePropagation();\n e.stopPropagation();\n if (targetElement) {\n if (targetNeedsPrevent(targetElement) || isMoved) {\n e.preventDefault();\n }\n }\n else {\n e.preventDefault();\n }\n targetElement = null;\n }\n needsFastClickTimeOut = setTimeout(function () {\n needsFastClick = false;\n }, (app.device.ios || app.device.androidChrome ? 100 : 400));\n \n if (app.params.tapHold) {\n tapHoldTimeout = setTimeout(function () {\n tapHoldFired = false;\n }, (app.device.ios || app.device.androidChrome ? 100 : 400));\n }\n \n return allowClick;\n }\n if (app.support.touch) {\n document.addEventListener('click', handleClick, true);\n \n document.addEventListener('touchstart', handleTouchStart);\n document.addEventListener('touchmove', handleTouchMove);\n document.addEventListener('touchend', handleTouchEnd);\n document.addEventListener('touchcancel', handleTouchCancel);\n }\n else {\n if (app.params.activeState) {\n document.addEventListener('mousedown', handleMouseDown);\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n }\n }\n if (app.params.material && app.params.materialRipple) {\n document.addEventListener('contextmenu', function (e) {\n if (activableElement) removeActive();\n rippleTouchEnd();\n });\n }\n \n };\n \n"," /*===============================================================================\n ************ Handle clicks and make them fast (on tap); ************\n ===============================================================================*/\n app.initClickEvents = function () {\n function handleScrollTop(e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var target = $(e.target);\n var isLink = clicked[0].nodeName.toLowerCase() === 'a' ||\n clicked.parents('a').length > 0 ||\n target[0].nodeName.toLowerCase() === 'a' ||\n target.parents('a').length > 0;\n \n if (isLink) return;\n var pageContent, page;\n if (app.params.scrollTopOnNavbarClick && clicked.is('.navbar .center')) {\n // Find active page\n var navbar = clicked.parents('.navbar');\n \n // Static Layout\n pageContent = navbar.parents('.page-content');\n \n if (pageContent.length === 0) {\n // Fixed Layout\n if (navbar.parents('.page').length > 0) {\n pageContent = navbar.parents('.page').find('.page-content');\n }\n // Through Layout\n if (pageContent.length === 0) {\n if (navbar.nextAll('.pages').length > 0) {\n pageContent = navbar.nextAll('.pages').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n }\n }\n }\n if (app.params.scrollTopOnStatusbarClick && clicked.is('.statusbar-overlay')) {\n if ($('.popup.modal-in').length > 0) {\n // Check for opened popup\n pageContent = $('.popup.modal-in').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else if ($('.panel.active').length > 0) {\n // Check for opened panel\n pageContent = $('.panel.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else if ($('.views > .view.active').length > 0) {\n // View in tab bar app layout\n pageContent = $('.views > .view.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else {\n // Usual case\n pageContent = $('.views').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n }\n \n if (pageContent && pageContent.length > 0) {\n // Check for tab\n if (pageContent.hasClass('tab')) {\n pageContent = pageContent.parent('.tabs').children('.page-content.active');\n }\n if (pageContent.length > 0) pageContent.scrollTop(0, 300);\n }\n }\n function handleClicks(e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var url = clicked.attr('href');\n var isLink = clicked[0].nodeName.toLowerCase() === 'a';\n \n // Check if link is external\n if (isLink) {\n if (clicked.is(app.params.externalLinks) || (url && url.indexOf('javascript:') >= 0)) {\n if(url && clicked.attr('target') === '_system') {\n e.preventDefault();\n window.open(url, '_system');\n }\n return;\n }\n }\n \n // Collect Clicked data- attributes\n var clickedData = clicked.dataset();\n \n // Smart Select\n if (clicked.hasClass('smart-select')) {\n if (app.smartSelectOpen) app.smartSelectOpen(clicked);\n }\n \n // Open Panel\n if (clicked.hasClass('open-panel')) {\n if ($('.panel').length === 1) {\n if ($('.panel').hasClass('panel-left')) app.openPanel('left');\n else app.openPanel('right');\n }\n else {\n if (clickedData.panel === 'right') app.openPanel('right');\n else app.openPanel('left');\n }\n }\n \n // Close Panel\n if (clicked.hasClass('close-panel')) {\n app.closePanel();\n }\n \n // Panel Overlay\n if (clicked.hasClass('panel-overlay')) {\n $('.panel.active').trigger('panel:overlay-click');\n if (app.params.panelsCloseByOutside) app.closePanel();\n }\n \n // Popover\n if (clicked.hasClass('open-popover')) {\n var popover;\n if (clickedData.popover) {\n popover = clickedData.popover;\n }\n else popover = '.popover';\n app.popover(popover, clicked);\n }\n if (clicked.hasClass('close-popover')) {\n app.closeModal('.popover.modal-in');\n }\n // Popup\n var popup;\n if (clicked.hasClass('open-popup')) {\n if (clickedData.popup) {\n popup = clickedData.popup;\n }\n else popup = '.popup';\n app.popup(popup);\n }\n if (clicked.hasClass('close-popup')) {\n if (clickedData.popup) {\n popup = clickedData.popup;\n }\n else popup = '.popup.modal-in';\n app.closeModal(popup);\n }\n // Login Screen\n var loginScreen;\n if (clicked.hasClass('open-login-screen')) {\n if (clickedData.loginScreen) {\n loginScreen = clickedData.loginScreen;\n }\n else loginScreen = '.login-screen';\n app.loginScreen(loginScreen);\n }\n if (clicked.hasClass('close-login-screen')) {\n app.closeModal('.login-screen.modal-in');\n }\n // Close Modal\n if (clicked.hasClass('modal-overlay')) {\n if ($('.modal.modal-in').length > 0 && app.params.modalCloseByOutside)\n app.closeModal('.modal.modal-in');\n if ($('.actions-modal.modal-in').length > 0 && app.params.actionsCloseByOutside)\n app.closeModal('.actions-modal.modal-in');\n \n if ($('.popover.modal-in').length > 0 && app.params.popoverCloseByOutside)\n app.closeModal('.popover.modal-in');\n }\n if (clicked.hasClass('popup-overlay')) {\n if ($('.popup.modal-in').length > 0 && app.params.popupCloseByOutside)\n app.closeModal('.popup.modal-in');\n }\n if (clicked.hasClass('picker-modal-overlay')) {\n if ($('.picker-modal.modal-in').length > 0)\n app.closeModal('.picker-modal.modal-in');\n }\n \n // Picker\n if (clicked.hasClass('close-picker')) {\n var pickerToClose = $('.picker-modal.modal-in');\n if (pickerToClose.length > 0) {\n app.closeModal(pickerToClose);\n }\n else {\n pickerToClose = $('.popover.modal-in .picker-modal');\n if (pickerToClose.length > 0) {\n app.closeModal(pickerToClose.parents('.popover'));\n }\n }\n }\n if (clicked.hasClass('open-picker')) {\n var pickerToOpen;\n if (clickedData.picker) {\n pickerToOpen = clickedData.picker;\n }\n else pickerToOpen = '.picker-modal';\n app.pickerModal(pickerToOpen, clicked);\n }\n \n // Tabs\n var isTabLink;\n if (clicked.hasClass('tab-link')) {\n isTabLink = true;\n app.showTab(clickedData.tab || clicked.attr('href'), clicked);\n }\n // Swipeout Close\n if (clicked.hasClass('swipeout-close')) {\n app.swipeoutClose(clicked.parents('.swipeout-opened'));\n }\n // Swipeout Delete\n if (clicked.hasClass('swipeout-delete')) {\n if (clickedData.confirm) {\n var text = clickedData.confirm;\n var title = clickedData.confirmTitle;\n if (title) {\n app.confirm(text, title, function () {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }, function () {\n if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));\n });\n }\n else {\n app.confirm(text, function () {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }, function () {\n if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));\n });\n }\n }\n else {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }\n \n }\n // Sortable\n if (clicked.hasClass('toggle-sortable')) {\n app.sortableToggle(clickedData.sortable);\n }\n if (clicked.hasClass('open-sortable')) {\n app.sortableOpen(clickedData.sortable);\n }\n if (clicked.hasClass('close-sortable')) {\n app.sortableClose(clickedData.sortable);\n }\n // Accordion\n if (clicked.hasClass('accordion-item-toggle') || (clicked.hasClass('item-link') && clicked.parent().hasClass('accordion-item'))) {\n var accordionItem = clicked.parent('.accordion-item');\n if (accordionItem.length === 0) accordionItem = clicked.parents('.accordion-item');\n if (accordionItem.length === 0) accordionItem = clicked.parents('li');\n app.accordionToggle(accordionItem);\n }\n \n // Speed Dial\n if (clicked.hasClass('floating-button') && clicked.parent().hasClass('speed-dial')) {\n clicked.parent().toggleClass('speed-dial-opened');\n }\n if (clicked.hasClass('close-speed-dial')) {\n $('.speed-dial-opened').removeClass('speed-dial-opened');\n }\n \n // Load Page\n if (app.params.ajaxLinks && !clicked.is(app.params.ajaxLinks) || !isLink || !app.params.router) {\n return;\n }\n if (isLink) {\n e.preventDefault();\n }\n \n var validUrl = url && url.length > 0 && url !== '#' && !isTabLink;\n var template = clickedData.template;\n if (validUrl || clicked.hasClass('back') || template) {\n var view;\n if (clickedData.view) {\n view = $(clickedData.view)[0].f7View;\n }\n else {\n view = clicked.parents('.' + app.params.viewClass)[0] && clicked.parents('.' + app.params.viewClass)[0].f7View;\n if (view && view.params.linksView) {\n if (typeof view.params.linksView === 'string') view = $(view.params.linksView)[0].f7View;\n else if (view.params.linksView instanceof View) view = view.params.linksView;\n }\n }\n if (!view) {\n if (app.mainView) view = app.mainView;\n }\n if (!view) return;\n \n var pageName;\n if (!template) {\n if (url && url.indexOf('#') === 0 && url !== '#') {\n if (view.params.domCache) {\n pageName = url.split('#')[1];\n }\n else return;\n }\n if (url === '#' && !clicked.hasClass('back')) return;\n }\n else {\n url = undefined;\n }\n \n var animatePages;\n if (typeof clickedData.animatePages !== 'undefined') {\n animatePages = clickedData.animatePages;\n }\n else {\n if (clicked.hasClass('with-animation')) animatePages = true;\n if (clicked.hasClass('no-animation')) animatePages = false;\n }\n \n var options = {\n animatePages: animatePages,\n ignoreCache: clickedData.ignoreCache,\n force: clickedData.force,\n reload: clickedData.reload,\n reloadPrevious: clickedData.reloadPrevious,\n pageName: pageName,\n pushState: clickedData.pushState,\n url: url\n };\n \n if (app.params.template7Pages) {\n options.contextName = clickedData.contextName;\n var context = clickedData.context;\n if (context) {\n options.context = JSON.parse(context);\n }\n }\n if (template && template in t7.templates) {\n options.template = t7.templates[template];\n }\n \n if (clicked.hasClass('back')) view.router.back(options);\n else view.router.load(options);\n }\n }\n $(document).on('click', 'a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay', handleClicks);\n if (app.params.scrollTopOnNavbarClick || app.params.scrollTopOnStatusbarClick) {\n $(document).on('click', '.statusbar-overlay, .navbar .center', handleScrollTop);\n }\n \n // Prevent scrolling on overlays\n function preventScrolling(e) {\n e.preventDefault();\n }\n if (app.support.touch && !app.device.android) {\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on((app.params.fastClicks ? 'touchstart' : 'touchmove'), '.panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay', preventScrolling, activeListener);\n }\n };\n \n"," /*======================================================\n ************ App Resize Actions ************\n ======================================================*/\n // Prevent iPad horizontal body scrolling when soft keyboard is opened\n function _fixIpadBodyScrolLeft() {\n if (app.device.ipad) {\n document.body.scrollLeft = 0;\n setTimeout(function () {\n document.body.scrollLeft = 0;\n }, 0);\n }\n }\n var appResizeCallbacks = [];\n app.getSize = function () {\n var offset = app.root.offset();\n app.width = app.root[0].offsetWidth;\n app.height = app.root[0].offsetHeight;\n app.left = offset.left;\n app.top = offset.top;\n };\n app.onResize = function (callback) {\n appResizeCallbacks.push(callback);\n };\n app.offResize = function (callback) {\n for (var i = 0; i < appResizeCallbacks.length; i++) {\n if (appResizeCallbacks[i] === callback) {\n appResizeCallbacks.splice(i, 1);\n }\n }\n };\n app.resize = function () {\n _fixIpadBodyScrolLeft();\n app.getSize();\n if (app.sizeNavbars) app.sizeNavbars();\n for (var i = 0; i < appResizeCallbacks.length; i++) {\n appResizeCallbacks[i]();\n }\n };\n app.orientationchange = function () {\n if (app.device && app.device.minimalUi) {\n if (window.orientation === 90 || window.orientation === -90) document.body.scrollTop = 0;\n }\n _fixIpadBodyScrolLeft();\n };\n app.initResize = function () {\n $(window).on('resize', app.resize);\n $(window).on('orientationchange', app.orientationchange);\n app.getSize();\n };\n \n"," /*===============================================================================\n ************ Store and parse forms data ************\n ===============================================================================*/\n app.formsData = {};\n app.formStoreData = function (formId, formJSON) {\n // Store form data in app.formsData\n app.formsData[formId] = formJSON;\n \n // Store form data in local storage also\n app.ls['f7form-' + formId] = JSON.stringify(formJSON);\n };\n app.formDeleteData = function (formId) {\n // Delete form data from app.formsData\n if (app.formsData[formId]) {\n app.formsData[formId] = '';\n delete app.formsData[formId];\n }\n \n // Delete form data from local storage also\n if (app.ls['f7form-' + formId]) {\n app.ls['f7form-' + formId] = '';\n app.ls.removeItem('f7form-' + formId);\n }\n };\n app.formGetData = function (formId) {\n // First of all check in local storage\n if (app.ls['f7form-' + formId]) {\n return JSON.parse(app.ls['f7form-' + formId]);\n }\n // Try to get it from formsData obj\n else if (app.formsData[formId]) return app.formsData[formId];\n };\n app.formToData = function (form) {\n form = $(form);\n if (form.length !== 1) return false;\n \n // Form data\n var formData = {};\n \n // Skip input types\n var skipTypes = ['submit', 'image', 'button', 'file'];\n var skipNames = [];\n form.find('input, select, textarea').each(function () {\n var input = $(this);\n var name = input.attr('name');\n var type = input.attr('type');\n var tag = this.nodeName.toLowerCase();\n if (skipTypes.indexOf(type) >= 0) return;\n if (skipNames.indexOf(name) >= 0 || !name) return;\n if (tag === 'select' && input.prop('multiple')) {\n skipNames.push(name);\n formData[name] = [];\n form.find('select[name=\"' + name + '\"] option').each(function () {\n if (this.selected) formData[name].push(this.value);\n });\n }\n else {\n switch (type) {\n case 'checkbox' :\n skipNames.push(name);\n formData[name] = [];\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (this.checked) formData[name].push(this.value);\n });\n break;\n case 'radio' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (this.checked) formData[name] = this.value;\n });\n break;\n default :\n formData[name] = input.val();\n break;\n }\n }\n });\n form.trigger('formToJSON formToData form:todata', {formData: formData});\n \n return formData;\n };\n app.formToJSON = app.formToData;\n app.formFromData = function (form, formData) {\n form = $(form);\n if (form.length !== 1) return false;\n \n // Skip input types\n var skipTypes = ['submit', 'image', 'button', 'file'];\n var skipNames = [];\n \n form.find('input, select, textarea').each(function () {\n var input = $(this);\n var name = input.attr('name');\n var type = input.attr('type');\n var tag = this.nodeName.toLowerCase();\n if (typeof formData[name] === 'undefined' || formData[name] === null) return;\n if (skipTypes.indexOf(type) >= 0) return;\n if (skipNames.indexOf(name) >= 0 || !name) return;\n if (tag === 'select' && input.prop('multiple')) {\n skipNames.push(name);\n form.find('select[name=\"' + name + '\"] option').each(function () {\n if (formData[name].indexOf(this.value) >= 0) this.selected = true;\n else this.selected = false;\n });\n }\n else {\n switch (type) {\n case 'checkbox' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (formData[name].indexOf(this.value) >= 0) this.checked = true;\n else this.checked = false;\n });\n break;\n case 'radio' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (formData[name] === this.value) this.checked = true;\n else this.checked = false;\n });\n break;\n default :\n input.val(formData[name]);\n break;\n }\n }\n if (tag === 'select' || tag === 'input' || tag === 'textarea') {\n input.trigger('change');\n }\n });\n form.trigger('formFromJSON formFromData form:fromdata', {formData: formData});\n };\n app.formFromJSON = app.formFromData;\n \n app.initFormsStorage = function (pageContainer) {\n pageContainer = $(pageContainer);\n var forms = pageContainer.find('form.store-data');\n if (forms.length === 0) return;\n \n // Parse forms data and fill form if there is such data\n forms.each(function () {\n var id = this.getAttribute('id');\n if (!id) return;\n var formData = app.formGetData(id);\n if (formData) app.formFromData(this, formData);\n });\n // Update forms data on inputs change\n function storeForm() {\n /*jshint validthis:true */\n var form = $(this);\n var formId = form[0].id;\n if (!formId) return;\n var formJSON = app.formToData(form);\n if (!formJSON) return;\n app.formStoreData(formId, formJSON);\n form.trigger('store form:storedata', {data: formJSON});\n }\n forms.on('change submit', storeForm);\n \n // Detach Listeners\n function pageBeforeRemove() {\n forms.off('change submit', storeForm);\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n };\n"," /*===============================================================================\n ************ Ajax submit for forms ************\n ===============================================================================*/\n // Ajax submit on forms\n $(document).on('submit change', 'form.ajax-submit, form.ajax-submit-onchange', function (e) {\n var form = $(this);\n if (e.type === 'change' && !form.hasClass('ajax-submit-onchange')) return;\n if (e.type === 'submit') e.preventDefault();\n \n var method = (form.attr('method') || 'GET').toUpperCase();\n var contentType = form.prop('enctype') || form.attr('enctype');\n \n var url = form.attr('action');\n if (!url) return;\n \n var data;\n if (method === 'POST') data = new FormData(form[0]);\n else data = $.serializeObject(app.formToJSON(form[0]));\n \n var xhr = $.ajax({\n method: method,\n url: url,\n contentType: contentType,\n data: data,\n beforeSend: function (xhr) {\n form.trigger('beforeSubmit form:beforesend', {data:data, xhr: xhr});\n },\n error: function (xhr) {\n form.trigger('submitError form:error', {data:data, xhr: xhr});\n },\n success: function (data) {\n form.trigger('submitted form:success', {data: data, xhr: xhr});\n }\n });\n });\n \n \n"," /*===============================================================================\n ************ Resizable textarea ************\n ===============================================================================*/\n app.resizeTextarea = function (textarea) {\n textarea = $(textarea);\n if (!textarea.hasClass('resizable')) {\n return;\n }\n textarea.css({'height': ''});\n var height = textarea[0].offsetHeight;\n var diff = height - textarea[0].clientHeight;\n var scrollHeight = textarea[0].scrollHeight;\n \n if (scrollHeight + diff > height) {\n var newAreaHeight = scrollHeight + diff;\n textarea.css('height', newAreaHeight + 'px');\n }\n };\n app.resizableTextarea = function (textarea) {\n textarea = $(textarea);\n if (textarea.length === 0) return;\n var textareaTimeout;\n function handleTextarea() {\n clearTimeout(textareaTimeout);\n textareaTimeout = setTimeout(function () {\n app.resizeTextarea(textarea);\n }, 0);\n }\n textarea[0].f7DestroyResizableTextarea = function () {\n textarea.off('change keydown keypress keyup paste cut', handleTextarea);\n };\n return textarea.on('change keydown keypress keyup paste cut', handleTextarea);\n };\n app.destroyResizableTextarea = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0 && pageContainer.is('textarea') && pageContainer[0].f7DestroyResizableTextarea) {\n pageContainer[0].f7DestroyResizableTextarea();\n }\n else if (pageContainer.length > 0) {\n pageContainer.find('textarea.resiable').each(function () {\n var textarea = this;\n if (textarea.f7DestroyResizableTextarea) {\n textarea.f7DestroyResizableTextarea ();\n }\n });\n }\n };\n app.initPageResizableTextarea = function (pageContainer) {\n pageContainer = $(pageContainer);\n var textareas = pageContainer.find('textarea.resizable');\n textareas.each(function () {\n app.resizableTextarea(this);\n });\n };\n"," /*======================================================\n ************ Material Text Inputs ************\n ======================================================*/\n app.initPageMaterialInputs = function (pageContainer) {\n pageContainer = $(pageContainer);\n var textareas = pageContainer.find('textarea.resizable');\n pageContainer.find('.item-input').each(function () {\n var itemInput = $(this);\n var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image'];\n itemInput.find('input, select, textarea').each(function () {\n var input = $(this);\n if (notInputs.indexOf(input.attr('type')) < 0) {\n itemInput.addClass('item-input-field');\n if (input.val().trim() !== '') {\n input.parents('.item-input, .input-field').add(input.parents('.item-inner')).addClass('not-empty-state');\n }\n }\n });\n if (itemInput.parents('.input-item, .inputs-list').length > 0) return;\n itemInput.parents('.list-block').eq(0).addClass('inputs-list');\n });\n };\n /*======================================================\n ************ Material Focus Inputs ************\n ======================================================*/\n app.initMaterialWatchInputs = function () {\n var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image'];\n function addFocusState(e) {\n /*jshint validthis:true*/\n var i = $(this);\n var type = i.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0));\n els.removeClass('not-empty-state').addClass('focus-state');\n }\n function removeFocusState(e) {\n /*jshint validthis:true*/\n var i = $(this), value = i.val();\n var type = i.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0));\n els.removeClass('focus-state');\n if (value && value.trim() !== '') {\n els.removeClass('focus-state').addClass('not-empty-state');\n }\n else {\n els.removeClass('not-empty-state');\n }\n }\n function watchChangeState(e) {\n /*jshint validthis:true*/\n var input = $(this),\n value = input.val();\n var type = input.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = input.add(input.parents('.item-input, .input-field')).add(input.parents('.item-inner').eq(0));\n if (els.length === 0) return;\n if (value && (typeof value === 'string' && value.trim() !== '') || (Array.isArray(value) && value.length > 0)) {\n els.addClass('not-empty-state');\n }\n else {\n els.removeClass('not-empty-state');\n }\n }\n $(document).on('change', 'input, textarea, select', watchChangeState, true);\n $(document).on('focus', 'input, textarea, select', addFocusState, true);\n $(document).on('blur', 'input, textarea, select', removeFocusState, true);\n };\n \n"," /*======================================================\n ************ Handle Browser's History ************\n ======================================================*/\n app.pushStateQueue = [];\n app.pushStateClearQueue = function () {\n if (app.pushStateQueue.length === 0) return;\n var queue = app.pushStateQueue.pop();\n var animatePages;\n if (app.params.pushStateNoAnimation === true) animatePages = false;\n if (queue.action === 'back') {\n app.router.back(queue.view, {animatePages: animatePages});\n }\n if (queue.action === 'loadPage') {\n app.router.load(queue.view, {url: queue.stateUrl, animatePages: animatePages, pushState: false});\n }\n if (queue.action === 'loadContent') {\n app.router.load(queue.view, {content: queue.stateContent, animatePages: animatePages, pushState: false});\n }\n if (queue.action === 'loadPageName') {\n app.router.load(queue.view, {pageName: queue.statePageName, url: queue.stateUrl, animatePages: animatePages, pushState: false});\n }\n };\n \n app.initPushState = function () {\n var blockPopstate = true;\n $(window).on('load', function () {\n setTimeout(function () {\n blockPopstate = false;\n }, 0);\n });\n \n if (document.readyState && document.readyState === 'complete') {\n blockPopstate = false;\n }\n \n function handlePopState(e) {\n if (blockPopstate) return;\n var mainView = app.mainView;\n if (!mainView) return;\n var state = e.state;\n if (!state) {\n state = {\n viewIndex: app.views.indexOf(mainView),\n url : mainView.history[0]\n };\n }\n if (state.viewIndex < 0) return;\n var view = app.views[state.viewIndex];\n var stateUrl = state && state.url || undefined;\n var stateContent = state && state.content || undefined;\n var statePageName = state && state.pageName || undefined;\n var animatePages;\n \n if (app.params.pushStateNoAnimation === true) animatePages = false;\n \n if (stateUrl !== view.url) {\n if (view.history.indexOf(stateUrl) >= 0) {\n // Go Back\n if (view.allowPageChange) {\n app.router.back(view, {url:undefined, animatePages: animatePages, pushState: false, preloadOnly:false});\n }\n else {\n app.pushStateQueue.push({\n action: 'back',\n view: view\n });\n }\n }\n else if (stateContent) {\n // Load Page\n if (view.allowPageChange) {\n app.router.load(view, {content:stateContent, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadContent',\n stateContent: stateContent,\n view: view\n });\n }\n \n }\n else if (statePageName) {\n // Load Page by page name with Dom Cache\n if (view.allowPageChange) {\n app.router.load(view, {pageName:statePageName, url: stateUrl, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadPageName',\n statePageName: statePageName,\n view: view\n });\n }\n }\n else {\n // Load Page\n if (view.allowPageChange) {\n app.router.load(view, {url:stateUrl, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadPage',\n stateUrl: stateUrl,\n view: view\n });\n }\n }\n }\n }\n $(window).on('popstate', handlePopState);\n };\n \n"," /*===========================\n Framework7 Swiper Additions\n ===========================*/\n app.swiper = function (container, params) {\n return new Swiper(container, params);\n };\n app.initPageSwiper = function (pageContainer) {\n pageContainer = $(pageContainer);\n var swipers = pageContainer.find('.swiper-init, .tabs-swipeable-wrap');\n if (swipers.length === 0) return;\n function destroySwiperOnRemove(slider) {\n function destroySwiper() {\n slider.destroy();\n pageContainer.off('page:beforeremove', destroySwiper);\n }\n pageContainer.on('page:beforeremove', destroySwiper);\n }\n swipers.each(function () {\n var swiper = $(this), initialSlide;\n var params;\n if (swiper.hasClass('tabs-swipeable-wrap')) {\n swiper.addClass('swiper-container').children('.tabs').addClass('swiper-wrapper').children('.tab').addClass('swiper-slide');\n initialSlide = swiper.children('.tabs').children('.tab.active').index();\n }\n if (swiper.data('swiper')) {\n params = JSON.parse(swiper.data('swiper'));\n }\n else {\n params = swiper.dataset();\n }\n if (typeof params.initialSlide === 'undefined' && typeof initialSlide !== 'undefined') {\n params.initialSlide = initialSlide;\n }\n if (swiper.hasClass('tabs-swipeable-wrap')) {\n params.onSlideChangeStart = function (s) {\n app.showTab(s.slides.eq(s.activeIndex));\n };\n }\n var _slider = app.swiper(swiper[0], params);\n destroySwiperOnRemove(_slider);\n });\n };\n app.reinitPageSwiper = function (pageContainer) {\n pageContainer = $(pageContainer);\n var sliders = pageContainer.find('.swiper-init, .tabs-swipeable-wrap');\n if (sliders.length === 0) return;\n for (var i = 0; i < sliders.length; i++) {\n var sliderInstance = sliders[0].swiper;\n if (sliderInstance) {\n sliderInstance.update(true);\n }\n }\n };\n \n"," /*======================================================\n ************ Photo Browser ************\n ======================================================*/\n var PhotoBrowser = function (params) {\n var pb = this, i;\n \n var defaults = {\n photos : [],\n initialSlide: 0,\n spaceBetween: 20,\n speed: 300,\n zoom: true,\n zoomMax: 3,\n zoomMin: 1,\n exposition: true,\n expositionHideCaptions: false,\n type: 'standalone',\n navbar: true,\n toolbar: true,\n theme: 'light',\n swipeToClose: true,\n backLinkText: 'Close',\n ofText: 'of',\n loop: false,\n lazyLoading: false,\n lazyLoadingInPrevNext: false,\n lazyLoadingOnTransitionStart: false,\n material: app.params.material,\n materialPreloaderSvg: app.params.materialPreloaderSvg,\n materialPreloaderHtml: app.params.materialPreloaderHtml,\n /*\n Callbacks:\n onLazyImageLoad(pb, slide, img)\n onLazyImageReady(pb, slide, img)\n onOpen(pb)\n onClose(pb)\n onTransitionStart(swiper)\n onTransitionEnd(swiper)\n onSlideChangeStart(swiper)\n onSlideChangeEnd(swiper)\n onTap(swiper, e)\n onClick(swiper, e)\n onDoubleTap(swiper, e)\n onSwipeToClose(pb)\n */\n };\n \n params = params || {};\n if (!params.backLinkText && app.params.material) defaults.backLinkText = '';\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n if (params.maxZoom) {\n params.zoomMax = params.maxZoom;\n }\n if (params.minZoom) {\n params.zoomMin = params.minZoom;\n }\n \n pb.params = params;\n pb.params.iconsColorClass = pb.params.iconsColor ? 'color-' + pb.params.iconsColor : (pb.params.theme === 'dark' ? 'color-white' : '');\n pb.params.preloaderColorClass = pb.params.theme === 'dark' ? 'preloader-white' : '';\n \n // Templates\n var photoTemplate = pb.params.photoTemplate ||\n '
        ' +\n '' +\n '' +\n '' +\n '
        ';\n var photoLazyTemplate = pb.params.lazyPhotoTemplate ||\n '
        ' +\n '
        {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
        ' +\n '' +\n '' +\n '' +\n '
        ';\n var objectTemplate = pb.params.objectTemplate ||\n '
        {{js \"this.html || this\"}}
        ';\n var captionTemplate = pb.params.captionTemplate ||\n '
        ' +\n '{{caption}}' +\n '
        ';\n var navbarTemplate = pb.params.navbarTemplate ||\n '
        ' +\n '
        ' +\n '' +\n '
        ' +\n ' ' +\n '{{ofText}} ' +\n '' +\n '
        ' +\n '
        ' +\n '
        ' +\n '
        ';\n var toolbarTemplate = pb.params.toolbarTemplate ||\n '
        ' +\n '
        ' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
        ' +\n '
        ';\n \n var htmlTemplate = t7.compile('
        ' +\n '
        ' +\n '{{#unless material}}{{#if navbar}}' +\n navbarTemplate +\n '{{/if}}{{/unless}}' +\n '
        ' +\n '{{#if material}}{{#if navbar}}' +\n navbarTemplate +\n '{{/if}}{{/if}}' +\n '{{#if toolbar}}' +\n toolbarTemplate +\n '{{/if}}' +\n '
        ' +\n '{{#each photos}}{{#if caption}}' +\n captionTemplate +\n '{{/if}}{{/each}}' +\n '
        ' +\n '
        ' +\n '
        ' +\n '{{#each photos}}' +\n '{{#js_compare \"this.html || ((typeof this === \\'string\\' || this instanceof String) && (this.indexOf(\\'<\\') >= 0 || this.indexOf(\\'>\\') >= 0))\"}}' +\n objectTemplate +\n '{{else}}' +\n '{{#if @root.lazyLoading}}' +\n photoLazyTemplate +\n '{{else}}' +\n photoTemplate +\n '{{/if}}' +\n '{{/js_compare}}' +\n '{{/each}}' +\n '
        ' +\n '
        ' +\n '
        ' +\n '
        ' +\n '
        ')(pb.params);\n \n pb.activeIndex = pb.params.initialSlide;\n pb.openIndex = pb.activeIndex;\n pb.opened = false;\n \n pb.open = function (index) {\n if (typeof index === 'undefined') index = pb.activeIndex;\n index = parseInt(index, 10);\n if (pb.opened && pb.swiper) {\n pb.swiper.slideTo(index);\n return;\n }\n pb.opened = true;\n pb.openIndex = index;\n if (pb.params.type === 'standalone') {\n app.root.append(htmlTemplate);\n }\n if (pb.params.type === 'popup') {\n pb.popup = app.popup('
        ' + htmlTemplate + '
        ');\n $(pb.popup).on('popup:closed', pb.onPopupClose);\n }\n if (pb.params.type === 'page') {\n $(document).once('page:beforeinit', pb.onPageBeforeInit);\n $(document).once('page:beforeremove', pb.onPageBeforeRemove);\n if (!pb.params.view) pb.params.view = app.mainView;\n pb.params.view.loadContent(htmlTemplate);\n return;\n }\n pb.layout(pb.openIndex);\n if (pb.params.onOpen) {\n pb.params.onOpen(pb);\n }\n \n };\n pb.close = function () {\n pb.opened = false;\n if (!pb.swiperContainer || pb.swiperContainer.length === 0) {\n return;\n }\n if (pb.params.onClose) {\n pb.params.onClose(pb);\n }\n // Detach events\n pb.attachEvents(true);\n // Delete from DOM\n if (pb.params.type === 'standalone') {\n pb.container.removeClass('photo-browser-in').addClass('photo-browser-out').animationEnd(function () {\n pb.container.remove();\n });\n }\n // Destroy slider\n pb.swiper.destroy();\n // Delete references\n pb.swiper = pb.swiperContainer = pb.swiperWrapper = pb.slides = undefined; //gestureSlide = gestureImg = gestureImgWrap = undefined;\n };\n \n pb.onPopupClose = function (e) {\n pb.close();\n $(pb.popup).off('page:beforeinit', pb.onPopupClose);\n };\n pb.onPageBeforeInit = function (e) {\n if (e.detail.page.name === 'photo-browser-slides') {\n pb.layout(pb.openIndex);\n if (pb.params.onOpen) {\n pb.params.onOpen(pb);\n }\n }\n };\n pb.onPageBeforeRemove = function (e) {\n if (e.detail.page.name === 'photo-browser-slides') {\n pb.close();\n }\n };\n \n pb.onSliderTransitionStart = function (swiper) {\n pb.activeIndex = swiper.activeIndex;\n \n var current = swiper.activeIndex + 1;\n var total = swiper.slides.length;\n if (pb.params.loop) {\n total = total - 2;\n current = current - swiper.loopedSlides;\n if (current < 1) current = total + current;\n if (current > total) current = current - total;\n }\n pb.container.find('.photo-browser-current').text(current);\n pb.container.find('.photo-browser-total').text(total);\n \n $('.photo-browser-prev, .photo-browser-next').removeClass('photo-browser-link-inactive');\n \n if (swiper.isBeginning && !pb.params.loop) {\n $('.photo-browser-prev').addClass('photo-browser-link-inactive');\n }\n if (swiper.isEnd && !pb.params.loop) {\n $('.photo-browser-next').addClass('photo-browser-link-inactive');\n }\n \n // Update captions\n if (pb.captions.length > 0) {\n pb.captionsContainer.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active');\n var captionIndex = pb.params.loop ? swiper.slides.eq(swiper.activeIndex).attr('data-swiper-slide-index') : pb.activeIndex;\n pb.captionsContainer.find('[data-caption-index=\"' + captionIndex + '\"]').addClass('photo-browser-caption-active');\n }\n \n \n // Stop Video\n var previousSlideVideo = swiper.slides.eq(swiper.previousIndex).find('video');\n if (previousSlideVideo.length > 0) {\n if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause();\n }\n // Callback\n if (pb.params.onTransitionStart) pb.params.onTransitionStart(swiper);\n };\n pb.onSliderTransitionEnd = function (swiper) {\n if (pb.params.onTransitionEnd) pb.params.onTransitionEnd(swiper);\n };\n \n pb.layout = function (index) {\n if (pb.params.type === 'page') {\n pb.container = $('.photo-browser-swiper-container').parents('.view');\n }\n else {\n pb.container = $('.photo-browser');\n }\n if (pb.params.type === 'standalone') {\n pb.container.addClass('photo-browser-in');\n app.sizeNavbars(pb.container);\n }\n pb.swiperContainer = pb.container.find('.photo-browser-swiper-container');\n pb.swiperWrapper = pb.container.find('.photo-browser-swiper-wrapper');\n pb.slides = pb.container.find('.photo-browser-slide');\n pb.captionsContainer = pb.container.find('.photo-browser-captions');\n pb.captions = pb.container.find('.photo-browser-caption');\n \n var sliderSettings = {\n nextButton: pb.params.nextButton || '.photo-browser-next',\n prevButton: pb.params.prevButton || '.photo-browser-prev',\n indexButton: pb.params.indexButton,\n initialSlide: index,\n spaceBetween: pb.params.spaceBetween,\n speed: pb.params.speed,\n loop: pb.params.loop,\n lazyLoading: pb.params.lazyLoading,\n lazyLoadingInPrevNext: pb.params.lazyLoadingInPrevNext,\n lazyLoadingOnTransitionStart: pb.params.lazyLoadingOnTransitionStart,\n preloadImages: pb.params.lazyLoading ? false : true,\n zoom: pb.params.zoom,\n zoomMax: pb.params.zoomMax,\n zoomMin: pb.params.zoomMin,\n onTap: function (swiper, e) {\n if (pb.params.onTap) pb.params.onTap(swiper, e);\n },\n onClick: function (swiper, e) {\n if (pb.params.exposition) pb.toggleExposition();\n if (pb.params.onClick) pb.params.onClick(swiper, e);\n },\n onDoubleTap: function (swiper, e) {\n // pb.toggleZoom(e);\n if (pb.params.onDoubleTap) pb.params.onDoubleTap(swiper, e);\n },\n onTransitionStart: function (swiper) {\n pb.onSliderTransitionStart(swiper);\n },\n onTransitionEnd: function (swiper) {\n pb.onSliderTransitionEnd(swiper);\n },\n onSlideChangeStart: pb.params.onSlideChangeStart,\n onSlideChangeEnd: pb.params.onSlideChangeEnd,\n onLazyImageLoad: function (swiper, slide, img) {\n if (pb.params.onLazyImageLoad) pb.params.onLazyImageLoad(pb, slide, img);\n },\n onLazyImageReady: function (swiper, slide, img) {\n $(slide).removeClass('photo-browser-slide-lazy');\n if (pb.params.onLazyImageReady) pb.params.onLazyImageReady(pb, slide, img);\n }\n };\n \n if (pb.params.swipeToClose && pb.params.type !== 'page') {\n sliderSettings.onTouchStart = pb.swipeCloseTouchStart;\n sliderSettings.onTouchMoveOpposite = pb.swipeCloseTouchMove;\n sliderSettings.onTouchEnd = pb.swipeCloseTouchEnd;\n }\n \n pb.swiper = app.swiper(pb.swiperContainer, sliderSettings);\n if (index === 0) {\n pb.onSliderTransitionStart(pb.swiper);\n }\n pb.attachEvents();\n };\n pb.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n pb.container.find('.photo-browser-close-link')[action]('click', pb.close);\n };\n \n \n // Expose\n pb.exposed = false;\n pb.toggleExposition = function () {\n if (pb.container) pb.container.toggleClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.toggleClass('photo-browser-captions-exposed');\n pb.exposed = !pb.exposed;\n };\n pb.enableExposition = function () {\n if (pb.container) pb.container.addClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.addClass('photo-browser-captions-exposed');\n pb.exposed = true;\n };\n pb.disableExposition = function () {\n if (pb.container) pb.container.removeClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.removeClass('photo-browser-captions-exposed');\n pb.exposed = false;\n };\n \n // Swipe Up To Close\n var swipeToCloseIsTouched = false;\n var allowSwipeToClose = true;\n var swipeToCloseDiff, swipeToCloseStart, swipeToCloseCurrent, swipeToCloseStarted = false, swipeToCloseActiveSlide, swipeToCloseTimeStart;\n pb.swipeCloseTouchStart = function (swiper, e) {\n if (!allowSwipeToClose) return;\n swipeToCloseIsTouched = true;\n };\n pb.swipeCloseTouchMove = function (swiper, e) {\n if (!swipeToCloseIsTouched) return;\n if (!swipeToCloseStarted) {\n swipeToCloseStarted = true;\n swipeToCloseStart = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n swipeToCloseActiveSlide = pb.swiper.slides.eq(pb.swiper.activeIndex);\n swipeToCloseTimeStart = (new Date()).getTime();\n }\n e.preventDefault();\n swipeToCloseCurrent = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n swipeToCloseDiff = swipeToCloseStart - swipeToCloseCurrent;\n var opacity = 1 - Math.abs(swipeToCloseDiff) / 300;\n swipeToCloseActiveSlide.transform('translate3d(0,' + (-swipeToCloseDiff) + 'px,0)');\n pb.swiper.container.css('opacity', opacity).transition(0);\n };\n pb.swipeCloseTouchEnd = function (swiper, e) {\n swipeToCloseIsTouched = false;\n if (!swipeToCloseStarted) {\n swipeToCloseStarted = false;\n return;\n }\n swipeToCloseStarted = false;\n allowSwipeToClose = false;\n var diff = Math.abs(swipeToCloseDiff);\n var timeDiff = (new Date()).getTime() - swipeToCloseTimeStart;\n if ((timeDiff < 300 && diff > 20) || (timeDiff >= 300 && diff > 100)) {\n setTimeout(function () {\n if (pb.params.type === 'standalone') {\n pb.close();\n }\n if (pb.params.type === 'popup') {\n app.closeModal(pb.popup);\n }\n if (pb.params.onSwipeToClose) {\n pb.params.onSwipeToClose(pb);\n }\n allowSwipeToClose = true;\n }, 0);\n return;\n }\n if (diff !== 0) {\n swipeToCloseActiveSlide.addClass('transitioning').transitionEnd(function () {\n allowSwipeToClose = true;\n swipeToCloseActiveSlide.removeClass('transitioning');\n });\n }\n else {\n allowSwipeToClose = true;\n }\n pb.swiper.container.css('opacity', '').transition('');\n swipeToCloseActiveSlide.transform('');\n };\n \n return pb;\n };\n \n app.photoBrowser = function (params) {\n return new PhotoBrowser(params);\n };\n \n"," /*===============================================================================\n ************ Autocomplete ************\n ===============================================================================*/\n var Autocomplete = function (params) {\n var a = this;\n \n // Params\n var defaults = {\n // Standalone Options\n /*\n opener: undefined,\n */\n popupCloseText: 'Close',\n backText: 'Back',\n searchbarPlaceholderText: 'Search...',\n searchbarCancelText: 'Cancel',\n openWithAnimation: true,\n // When opened in page should the searchbar be focused by default\n autoFocus: false,\n openIn: 'page',\n backOnSelect: false,\n notFoundText: 'Nothing found',\n requestSourceOnOpen: false,\n /*\n pageTitle: undefined,\n */\n \n // Handle Data\n /*\n source: undefined,\n limit: undefined,\n */\n valueProperty: 'id',\n textProperty: 'text',\n \n // Dropdown Options\n highlightMatches: true,\n \n /*\n dropdownPlaceholderText: 'Type anything...',\n */\n updateInputValueOnSelect: true,\n expandInput: false,\n \n // Preloader\n preloaderColor: false,\n preloader: false,\n \n // Templates\n /*\n itemTemplate: undefined,\n navbarTemplate: undefined,\n dropdownTemplate: undefined\n dropdownItemTemplate: undefined,\n dropdownPlaceholderTemplate: undefined\n */\n \n // Color themes\n /*\n navbarTheme: undefined,\n formTheme: undefined,\n */\n \n // Callbacks\n /*\n onChange: function (a, value) - for not dropdown\n onOpen: function (a)\n onClose: function (a)\n */\n };\n \n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n a.params = params;\n \n // Opener Link & View\n if (a.params.opener) {\n a.opener = $(a.params.opener);\n }\n var view = a.params.view;\n if (!a.params.view && a.opener && a.opener.length) {\n // Find related view\n view = a.opener.parents('.' + app.params.viewClass);\n if (view.length === 0) return;\n view = view[0].f7View;\n }\n \n // Input\n if (a.params.input) {\n a.input = $(a.params.input);\n if (a.input.length === 0 && a.params.openIn === 'dropdown') return;\n }\n \n // Array with selected items\n a.value = a.params.value || [];\n \n // ID & Inputs\n a.id = (new Date()).getTime();\n a.inputType = a.params.multiple ? 'checkbox' : 'radio';\n a.inputName = a.inputType + '-' + a.id;\n \n // Is Material\n var material = app.params.material;\n \n // Back On Select\n var backOnSelect = a.params.backOnSelect;\n \n if (a.params.openIn !== 'dropdown') {\n // Item Template\n a.itemTemplate = t7.compile(a.params.itemTemplate ||\n '
      • ' +\n '' +\n '
      • '\n );\n // Page Layout\n var pageTitle = a.params.pageTitle || '';\n if (!pageTitle && a.opener && a.opener.length) {\n pageTitle = a.opener.find('.item-title').text();\n }\n var pageName = 'autocomplete-' + a.inputName;\n \n var navbarTheme = a.params.navbarTheme,\n formTheme = a.params.formTheme;\n \n // Navbar HTML\n var navbarHTML;\n var noNavbar = '', noToolbar = '', navbarLayout;\n \n a.navbarTemplate = t7.compile(a.params.navbarTemplate ||\n '
        ' +\n '
        ' +\n '
        ' +\n '{{#if material}}' +\n '' +\n '{{else}}' +\n '' +\n '' +\n '{{#if inPopup}}' +\n '{{popupCloseText}}' +\n '{{else}}' +\n '{{backText}}' +\n '{{/if}}' +\n '' +\n '{{/if}}' +\n '
        ' +\n '
        {{pageTitle}}
        ' +\n '{{#if preloader}}' +\n '
        ' +\n '
        ' +\n '
        ' +\n '{{/if}}' +\n '
        ' +\n '
        '\n );\n navbarHTML = a.navbarTemplate({\n pageTitle: pageTitle,\n backText: a.params.backText,\n popupCloseText: a.params.popupCloseText,\n openIn: a.params.openIn,\n navbarTheme: navbarTheme,\n inPopup: a.params.openIn === 'popup',\n inPage: a.params.openIn === 'page',\n material: material,\n preloader: a.params.preloader,\n preloaderColor: a.params.preloaderColor,\n animated: a.params.openWithAnimation\n });\n \n // Determine navbar layout type - static/fixed/through\n if (a.params.openIn === 'page') {\n navbarLayout = 'static';\n if (a.opener) {\n if (a.opener.parents('.navbar-through').length > 0) navbarLayout = 'through';\n if (a.opener.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = a.opener.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = a.opener.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n }\n else if (view.container) {\n if ($(view.container).hasClass('navbar-through') || $(view.container).find('.navbar-through').length > 0) navbarLayout = 'through';\n if ($(view.container).hasClass('navbar-fixed') || $(view.container).find('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = $(view.activePage.container).hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = $(view.activePage.container).hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n }\n }\n else {\n navbarLayout = 'fixed';\n }\n var searchbarHTML =\n '
        ' +\n '
        ' +\n '' +\n '' +\n '
        ' +\n (material ? '' : '' + a.params.searchbarCancelText + '') +\n '
        ' +\n '
        ';\n var pageHTML =\n (navbarLayout === 'through' ? navbarHTML : '') +\n '
        ' +\n '
        ' +\n (navbarLayout === 'fixed' ? navbarHTML : '') +\n searchbarHTML +\n '
        ' +\n (navbarLayout === 'static' ? navbarHTML : '') +\n '
        ' +\n '
          ' +\n '
          ' +\n '
          ' +\n '
          • ' + a.params.notFoundText + '
          ' +\n '
          ' +\n '
          ' +\n '
            ' +\n '
            ' +\n '
            ' +\n '
            ' +\n '
            ';\n }\n else {\n a.dropdownItemTemplate = t7.compile(a.params.dropdownItemTemplate ||\n '
          • ' +\n '' +\n '
          • '\n );\n a.dropdownPlaceholderTemplate = t7.compile(a.params.dropdownPlaceholderTemplate ||\n '
          • ' +\n '
            ' +\n '
            ' +\n '
            {{text}}
            ' +\n '
            ' +\n '' +\n '
          • '\n );\n a.dropdownTemplate = t7.compile(a.params.dropdownTemplate ||\n '
            ' +\n '
            ' +\n '
            ' +\n '
              ' +\n '
              ' +\n '
              ' +\n '{{#if preloader}}' +\n '
              {{#if material}}{{materialPreloaderHtml}}{{/if}}
              ' +\n '{{/if}}' +\n '
              '\n );\n }\n \n // Define popup\n a.popup = undefined;\n \n // Define Dropdown\n a.dropdown = undefined;\n \n // Handle Input Value Change\n function handleInputValue (e) {\n var query = a.input.val();\n if (a.params.source) {\n a.params.source(a, query, function (items) {\n var itemsHTML = '';\n var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length;\n a.items = items;\n var i, j, regExp;\n if (a.params.highlightMatches) {\n query = query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n regExp = new RegExp('('+query+')', 'i');\n }\n \n for (i = 0; i < limit; i++) {\n var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i];\n var itemText = typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty];\n itemsHTML += a.dropdownItemTemplate({\n value: itemValue,\n text: a.params.highlightMatches ? itemText.replace(regExp, '$1') : itemText\n });\n }\n if (itemsHTML === '' && query === '' && a.params.dropdownPlaceholderText) {\n itemsHTML += a.dropdownPlaceholderTemplate({\n text: a.params.dropdownPlaceholderText,\n });\n }\n a.dropdown.find('ul').html(itemsHTML);\n });\n }\n }\n // Handle Drop Down Click\n function handleDropdownClick (e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var clickedItem;\n for (var i = 0; i < a.items.length; i++) {\n var itemValue = typeof a.items[i] === 'object' ? a.items[i][a.params.valueProperty] : a.items[i];\n var value = clicked.attr('data-value');\n if (itemValue === value || itemValue * 1 === value * 1) {\n clickedItem = a.items[i];\n }\n }\n if (a.params.updateInputValueOnSelect) {\n a.input.val(typeof clickedItem === 'object' ? clickedItem[a.params.valueProperty] : clickedItem);\n a.input.trigger('input change');\n }\n \n if (a.params.onChange) {\n a.params.onChange(a, clickedItem);\n }\n \n a.close();\n }\n \n // Handle HTML Click to close Dropdown\n function closeOnHTMLClick (e) {\n var target = $(e.target);\n if (!(target.is(a.input[0]) || a.dropdown && target.parents(a.dropdown[0]).length > 0)) {\n a.close();\n }\n }\n \n a.positionDropDown = function () {\n var listBlock = a.input.parents('.list-block'),\n pageContent = a.input.parents('.page-content'),\n paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-top'), 10),\n // inputOffset = a.input.offset(),\n listBlockOffsetLeft = listBlock.length > 0 ? listBlock.offset().left - listBlock.parent().offset().left : 0,\n inputOffsetLeft = a.input.offset().left - (listBlock.length > 0 ? listBlock.offset().left : 0),\n inputOffsetTop = a.input.offset().top - (pageContent.offset().top - pageContent[0].scrollTop),\n maxHeight = pageContent[0].scrollHeight - paddingBottom - (inputOffsetTop + pageContent[0].scrollTop) - a.input[0].offsetHeight;\n \n a.dropdown.css({\n left: (listBlock.length > 0 ? listBlockOffsetLeft : inputOffsetLeft) + 'px',\n top: inputOffsetTop + pageContent[0].scrollTop + a.input[0].offsetHeight + 'px',\n width: (listBlock.length > 0 ? listBlock[0].offsetWidth : a.input[0].offsetWidth) + 'px'\n });\n a.dropdown.children('.autocomplete-dropdown-inner').css({\n maxHeight: maxHeight + 'px',\n paddingLeft: listBlock.length > 0 && !a.params.expandInput ? inputOffsetLeft - (material ? 16 : 15) + 'px' : ''\n });\n };\n \n a.pageInit = function (e) {\n var page = e.detail.page;\n a.page = $(page.container);\n a.pageData = page;\n if (page.name !== pageName) {\n return;\n }\n var container = $(page.container);\n \n // Source\n function onSource(query) {\n if (!a.params.source) return;\n var i, j, k;\n \n a.params.source(a, query, function(items) {\n var itemsHTML = '';\n var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length;\n a.items = items;\n for (i = 0; i < limit; i++) {\n var selected = false;\n var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i];\n for (j = 0; j < a.value.length; j++) {\n var aValue = typeof a.value[j] === 'object' ? a.value[j][a.params.valueProperty] : a.value[j];\n if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true;\n }\n itemsHTML += a.itemTemplate({\n value: itemValue,\n text: typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty],\n inputType: a.inputType,\n id: a.id,\n inputName: a.inputName,\n selected: selected,\n checkbox: a.inputType === 'checkbox',\n material: material\n });\n }\n container.find('.autocomplete-found ul').html(itemsHTML);\n if (items.length === 0) {\n if (query.length !== 0) {\n container.find('.autocomplete-not-found').show();\n container.find('.autocomplete-found, .autocomplete-values').hide();\n }\n else {\n container.find('.autocomplete-values').show();\n container.find('.autocomplete-found, .autocomplete-not-found').hide();\n }\n }\n else {\n container.find('.autocomplete-found').show();\n container.find('.autocomplete-not-found, .autocomplete-values').hide();\n }\n });\n }\n \n // Init Search Bar\n var searchbar = app.searchbar(container.find('.searchbar'), {\n customSearch: true,\n onSearch: function (searchbar, data) {\n if (data.query.length === 0 && searchbar.active) {\n searchbar.overlay.addClass('searchbar-overlay-active');\n }\n else {\n searchbar.overlay.removeClass('searchbar-overlay-active');\n }\n \n onSource(data.query);\n }\n });\n \n // Save searchbar instance\n a.searchbar = searchbar;\n \n // Update values\n function updateValues() {\n var valuesHTML = '';\n var i;\n for (i = 0; i < a.value.length; i++) {\n \n valuesHTML += a.itemTemplate({\n value: typeof a.value[i] === 'object' ? a.value[i][a.params.valueProperty] : a.value[i],\n text: typeof a.value[i] === 'object' ? a.value[i][a.params.textProperty]: a.value[i],\n inputType: a.inputType,\n id: a.id,\n inputName: a.inputName + '-checked',\n checkbox: a.inputType === 'checkbox',\n material: material,\n selected: true\n });\n }\n container.find('.autocomplete-values ul').html(valuesHTML);\n }\n \n // Handle Inputs\n if (!a.params.multiple && a.params.backOnSelect) {\n container.once('click', '.list-block label', function () {\n if (a.params.openIn === 'popup') app.closeModal(a.popup);\n else view.router.back({animatePages: a.params.openWithAnimation});\n });\n }\n container.on('change', 'input[type=\"radio\"], input[type=\"checkbox\"]', function () {\n var i;\n var input = this;\n var value = input.value;\n var text = $(input).parents('li').find('.item-title').text();\n var isValues = $(input).parents('.autocomplete-values').length > 0;\n var item, itemValue, aValue;\n if (isValues) {\n if (a.inputType === 'checkbox' && !input.checked) {\n for (i = 0; i < a.value.length; i++) {\n aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty];\n if (aValue === value || aValue * 1 === value * 1) {\n a.value.splice(i, 1);\n }\n }\n updateValues();\n if (a.params.onChange) a.params.onChange(a, a.value);\n }\n return;\n }\n \n // Find Related Item\n for (i = 0; i < a.items.length; i++) {\n itemValue = typeof a.items[i] === 'string' ? a.items[i] : a.items[i][a.params.valueProperty];\n if (itemValue === value || itemValue * 1 === value * 1) item = a.items[i];\n }\n // Update Selected Value\n if (a.inputType === 'radio') {\n a.value = [item];\n }\n else {\n if (input.checked) {\n a.value.push(item);\n }\n else {\n for (i = 0; i < a.value.length; i++) {\n aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty];\n if (aValue === value || aValue * 1 === value * 1) {\n a.value.splice(i, 1);\n }\n }\n }\n }\n \n // Update Values Block\n updateValues();\n \n // On Select Callback\n if ((a.inputType === 'radio' && input.checked || a.inputType === 'checkbox') && a.params.onChange ) {\n a.params.onChange(a, a.value);\n }\n });\n \n // Update Values On Page Init\n updateValues();\n \n // Source on load\n if (a.params.requestSourceOnOpen) onSource('');\n \n // On Open Callback\n if (a.params.onOpen) a.params.onOpen(a);\n };\n \n // Show Hide Preloader\n a.showPreloader = function () {\n if (a.params.openIn === 'dropdown') {\n if (a.dropdown) a.dropdown.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n }\n else $('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n };\n \n a.hidePreloader = function () {\n if (a.params.openIn === 'dropdown') {\n if (a.dropdown) a.dropdown.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n }\n else $('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n };\n \n // Autofocus\n a.autoFocus = function (e) {\n var self = this;\n setTimeout(function () {\n $(self).find('input[type=search]').focus();\n }, 0);\n };\n \n // Open Autocomplete Page/Popup\n a.open = function () {\n if (a.opened) return;\n a.opened = true;\n if (a.params.openIn === 'dropdown') {\n if (!a.dropdown) {\n a.dropdown = $(a.dropdownTemplate({\n preloader: a.params.preloader,\n preloaderColor: a.params.preloaderColor,\n material: material,\n materialPreloaderHtml: app.params.materialPreloaderHtml\n }));\n a.dropdown.on('click', 'label', handleDropdownClick);\n \n }\n var listBlock = a.input.parents('.list-block');\n if (listBlock.length && a.input.parents('.item-content').length > 0 && a.params.expandInput) {\n a.input.parents('.item-content').addClass('item-content-dropdown-expand');\n }\n a.positionDropDown();\n a.input.parents('.page-content').append(a.dropdown);\n a.dropdown.addClass('autocomplete-dropdown-in');\n a.input.trigger('input');\n app.onResize(a.positionDropDown);\n if (a.params.onOpen) a.params.onOpen(a);\n }\n else {\n $(document).once('page:init', '.autocomplete-page', a.pageInit);\n if (a.params.openIn === 'popup') {\n a.popup = app.popup(\n '
              ' +\n '
              ' +\n pageHTML +\n '
              ' +\n '
              ',\n true,\n a.params.openWithAnimation\n );\n a.popup = $(a.popup);\n if (a.params.autoFocus) {\n if (a.params.openWithAnimation) a.popup.once('popup:opened', a.autoFocus);\n else a.autoFocus.bind(a.popup)();\n }\n a.popup.once('popup:closed', function () {\n a.popup = undefined;\n a.opened = false;\n if (a.params.onClose) a.params.onClose(a);\n });\n }\n else {\n if (a.params.autoFocus) {\n $(document).once(a.params.openWithAnimation ? 'page:afteranimation' : 'page:init', '.autocomplete-page', a.autoFocus);\n }\n view.router.load({\n content: pageHTML,\n animatePages: a.params.openWithAnimation\n });\n $(document).once('page:back', '.autocomplete-page', function () {\n a.opened = false;\n if (a.params.onClose) a.params.onClose(a);\n });\n }\n }\n };\n a.close = function (e) {\n if (!a.opened) return;\n if (a.params.openIn === 'dropdown') {\n if (e && e.type === 'blur' && a.dropdown.find('label.active-state').length > 0) return;\n a.dropdown.removeClass('autocomplete-dropdown-in').remove();\n a.input.parents('.item-content-dropdown-expand').removeClass('item-content-dropdown-expand');\n a.opened = false;\n app.offResize(a.positionDropDown);\n if (a.params.onClose) a.params.onClose(a);\n }\n if (a.params.openIn === 'popup') {\n if (a.popup) app.closeModal(a.popup);\n }\n };\n \n // Init Events\n a.initEvents = function (detach) {\n var method = detach ? 'off' : 'on';\n if (a.params.openIn !== 'dropdown' && a.opener) {\n a.opener[method]('click', a.open);\n }\n if (a.params.openIn === 'dropdown' && a.input) {\n a.input[method]('focus', a.open);\n a.input[method]('input', handleInputValue);\n if (app.device.android) {\n $('html')[method]('click', closeOnHTMLClick);\n }\n else {\n a.input[method]('blur', a.close);\n }\n }\n if (detach && a.dropdown) {\n a.dropdown = null;\n }\n };\n \n // Init/Destroy Methods\n a.init = function () {\n a.initEvents();\n };\n a.destroy = function () {\n a.initEvents(true);\n a = null;\n };\n \n // Init\n a.init();\n \n return a;\n };\n app.autocomplete = function (params) {\n return new Autocomplete(params);\n };\n \n"," /*======================================================\n ************ Picker ************\n ======================================================*/\n var Picker = function (params) {\n var p = this;\n var defaults = {\n updateValuesOnMomentum: false,\n updateValuesOnTouchmove: true,\n rotateEffect: false,\n momentumRatio: 7,\n freeMode: false,\n // Common settings\n closeByOutsideClick: true,\n scrollToInput: true,\n inputReadOnly: true,\n convertToPopover: true,\n onlyInPopover: false,\n toolbar: true,\n toolbarCloseText: 'Done',\n toolbarTemplate:\n '
              ' +\n '
              ' +\n '
              ' +\n '
              ' +\n '{{closeText}}' +\n '
              ' +\n '
              ' +\n '
              '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n p.params = params;\n p.cols = [];\n p.initialized = false;\n \n // Inline flag\n p.inline = p.params.container ? true : false;\n \n // 3D Transforms origin bug, only on safari\n var originBug = app.device.ios || (navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && navigator.userAgent.toLowerCase().indexOf('chrome') < 0) && !app.device.android;\n \n // Should be converted to popover\n function isPopover() {\n var toPopover = false;\n if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover;\n if (!p.inline && p.params.input) {\n if (p.params.onlyInPopover) toPopover = true;\n else {\n if (app.device.ios) {\n toPopover = app.device.ipad ? true : false;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n }\n return toPopover;\n }\n function inPopover() {\n if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true;\n else return false;\n }\n \n // Value\n p.setValue = function (arrValues, transition) {\n var valueIndex = 0;\n if (p.cols.length === 0) {\n p.value = arrValues;\n p.updateValue(arrValues);\n return;\n }\n for (var i = 0; i < p.cols.length; i++) {\n if (p.cols[i] && !p.cols[i].divider) {\n p.cols[i].setValue(arrValues[valueIndex], transition);\n valueIndex++;\n }\n }\n };\n p.updateValue = function (forceValues) {\n var newValue = forceValues || [];\n var newDisplayValue = [], i, column;\n if (p.cols.length === 0) {\n for (i = 0; i < p.params.cols.length; i++) {\n column = p.params.cols[i];\n if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== undefined) {\n newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]);\n }\n else {\n newDisplayValue.push(newValue[i]);\n }\n }\n }\n else {\n for (i = 0; i < p.cols.length; i++) {\n if (!p.cols[i].divider) {\n newValue.push(p.cols[i].value);\n newDisplayValue.push(p.cols[i].displayValue);\n }\n }\n }\n \n if (newValue.indexOf(undefined) >= 0) {\n return;\n }\n p.value = newValue;\n p.displayValue = newDisplayValue;\n if (p.params.onChange) {\n p.params.onChange(p, p.value, p.displayValue);\n }\n if (p.input && p.input.length > 0) {\n $(p.input).val(p.params.formatValue ? p.params.formatValue(p, p.value, p.displayValue) : p.value.join(' '));\n $(p.input).trigger('change');\n }\n };\n \n // Columns Handlers\n p.initPickerCol = function (colElement, updateItems) {\n var colContainer = $(colElement);\n var colIndex = colContainer.index();\n var col = p.cols[colIndex];\n if (col.divider) return;\n col.container = colContainer;\n col.wrapper = col.container.find('.picker-items-col-wrapper');\n col.items = col.wrapper.find('.picker-item');\n \n var i, j;\n var wrapperHeight, itemHeight, itemsHeight, minTranslate, maxTranslate;\n col.replaceValues = function (values, displayValues) {\n col.destroyEvents();\n col.values = values;\n col.displayValues = displayValues;\n var newItemsHTML = p.columnHTML(col, true);\n col.wrapper.html(newItemsHTML);\n col.items = col.wrapper.find('.picker-item');\n col.calcSize();\n col.setValue(col.values[0], 0, true);\n col.initEvents();\n };\n var resizeTimeout;\n col.calcSize = function () {\n if (p.params.rotateEffect) {\n col.container.removeClass('picker-items-col-absolute');\n if (!col.width) col.container.css({width:''});\n }\n var colWidth, colHeight;\n colWidth = 0;\n colHeight = col.container[0].offsetHeight;\n wrapperHeight = col.wrapper[0].offsetHeight;\n itemHeight = col.items[0].offsetHeight;\n itemsHeight = itemHeight * col.items.length;\n minTranslate = colHeight / 2 - itemsHeight + itemHeight / 2;\n maxTranslate = colHeight / 2 - itemHeight / 2;\n if (col.width) {\n colWidth = col.width;\n if (parseInt(colWidth, 10) === colWidth) colWidth = colWidth + 'px';\n col.container.css({width: colWidth});\n }\n if (p.params.rotateEffect) {\n if (!col.width) {\n col.items.each(function () {\n var item = $(this).children('span');\n colWidth = Math.max(colWidth, item[0].offsetWidth);\n });\n col.container.css({width: (colWidth + 2) + 'px'});\n }\n col.container.addClass('picker-items-col-absolute');\n }\n };\n col.calcSize();\n \n col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)').transition(0);\n \n \n var activeIndex = 0;\n var animationFrameId;\n \n // Set Value Function\n col.setValue = function (newValue, transition, valueCallbacks) {\n if (typeof transition === 'undefined') transition = '';\n var newActiveIndex = col.wrapper.find('.picker-item[data-picker-value=\"' + newValue + '\"]').index();\n if(typeof newActiveIndex === 'undefined' || newActiveIndex === -1) {\n return;\n }\n var newTranslate = -newActiveIndex * itemHeight + maxTranslate;\n // Update wrapper\n col.wrapper.transition(transition);\n col.wrapper.transform('translate3d(0,' + (newTranslate) + 'px,0)');\n \n // Watch items\n if (p.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex ) {\n $.cancelAnimationFrame(animationFrameId);\n col.wrapper.transitionEnd(function(){\n $.cancelAnimationFrame(animationFrameId);\n });\n updateDuringScroll();\n }\n \n // Update items\n col.updateItems(newActiveIndex, newTranslate, transition, valueCallbacks);\n };\n \n col.updateItems = function (activeIndex, translate, transition, valueCallbacks) {\n if (typeof translate === 'undefined') {\n translate = $.getTranslate(col.wrapper[0], 'y');\n }\n if(typeof activeIndex === 'undefined') activeIndex = -Math.round((translate - maxTranslate)/itemHeight);\n if (activeIndex < 0) activeIndex = 0;\n if (activeIndex >= col.items.length) activeIndex = col.items.length - 1;\n var previousActiveIndex = col.activeIndex;\n col.activeIndex = activeIndex;\n col.wrapper.find('.picker-selected').removeClass('picker-selected');\n \n col.items.transition(transition);\n \n var selectedItem = col.items.eq(activeIndex).addClass('picker-selected').transform('');\n \n // Set 3D rotate effect\n if (p.params.rotateEffect) {\n var percentage = (translate - (Math.floor((translate - maxTranslate)/itemHeight) * itemHeight + maxTranslate)) / itemHeight;\n \n col.items.each(function () {\n var item = $(this);\n var itemOffsetTop = item.index() * itemHeight;\n var translateOffset = maxTranslate - translate;\n var itemOffset = itemOffsetTop - translateOffset;\n var percentage = itemOffset / itemHeight;\n \n var itemsFit = Math.ceil(col.height / itemHeight / 2) + 1;\n \n var angle = (-18*percentage);\n if (angle > 180) angle = 180;\n if (angle < -180) angle = -180;\n // Far class\n if (Math.abs(percentage) > itemsFit) item.addClass('picker-item-far');\n else item.removeClass('picker-item-far');\n // Set transform\n item.transform('translate3d(0, ' + (-translate + maxTranslate) + 'px, ' + (originBug ? -110 : 0) + 'px) rotateX(' + angle + 'deg)');\n });\n }\n \n if (valueCallbacks || typeof valueCallbacks === 'undefined') {\n // Update values\n col.value = selectedItem.attr('data-picker-value');\n col.displayValue = col.displayValues ? col.displayValues[activeIndex] : col.value;\n // On change callback\n if (previousActiveIndex !== activeIndex) {\n if (col.onChange) {\n col.onChange(p, col.value, col.displayValue);\n }\n p.updateValue();\n }\n }\n };\n \n function updateDuringScroll() {\n animationFrameId = $.requestAnimationFrame(function () {\n col.updateItems(undefined, undefined, 0);\n updateDuringScroll();\n });\n }\n \n // Update items on init\n if (updateItems) col.updateItems(0, maxTranslate, 0);\n \n var allowItemClick = true;\n var isTouched, isMoved, touchStartY, touchCurrentY, touchStartTime, touchEndTime, startTranslate, returnTo, currentTranslate, prevTranslate, velocityTranslate, velocityTime;\n function handleTouchStart (e) {\n if (isMoved || isTouched) return;\n e.preventDefault();\n isTouched = true;\n touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n \n allowItemClick = true;\n startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y');\n }\n function handleTouchMove (e) {\n if (!isTouched) return;\n e.preventDefault();\n allowItemClick = false;\n touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (!isMoved) {\n // First move\n $.cancelAnimationFrame(animationFrameId);\n isMoved = true;\n startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y');\n col.wrapper.transition(0);\n }\n \n var diff = touchCurrentY - touchStartY;\n currentTranslate = startTranslate + diff;\n returnTo = undefined;\n \n // Normalize translate\n if (currentTranslate < minTranslate) {\n currentTranslate = minTranslate - Math.pow(minTranslate - currentTranslate, 0.8);\n returnTo = 'min';\n }\n if (currentTranslate > maxTranslate) {\n currentTranslate = maxTranslate + Math.pow(currentTranslate - maxTranslate, 0.8);\n returnTo = 'max';\n }\n // Transform wrapper\n col.wrapper.transform('translate3d(0,' + currentTranslate + 'px,0)');\n \n // Update items\n col.updateItems(undefined, currentTranslate, 0, p.params.updateValuesOnTouchmove);\n \n // Calc velocity\n velocityTranslate = currentTranslate - prevTranslate || currentTranslate;\n velocityTime = (new Date()).getTime();\n prevTranslate = currentTranslate;\n }\n function handleTouchEnd (e) {\n if (!isTouched || !isMoved) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n col.wrapper.transition('');\n if (returnTo) {\n if (returnTo === 'min') {\n col.wrapper.transform('translate3d(0,' + minTranslate + 'px,0)');\n }\n else col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)');\n }\n touchEndTime = new Date().getTime();\n var velocity, newTranslate;\n if (touchEndTime - touchStartTime > 300) {\n newTranslate = currentTranslate;\n }\n else {\n velocity = Math.abs(velocityTranslate / (touchEndTime - velocityTime));\n newTranslate = currentTranslate + velocityTranslate * p.params.momentumRatio;\n }\n \n newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate);\n \n // Active Index\n var activeIndex = -Math.floor((newTranslate - maxTranslate)/itemHeight);\n \n // Normalize translate\n if (!p.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate;\n \n // Transform wrapper\n col.wrapper.transform('translate3d(0,' + (parseInt(newTranslate,10)) + 'px,0)');\n \n // Update items\n col.updateItems(activeIndex, newTranslate, '', true);\n \n // Watch items\n if (p.params.updateValuesOnMomentum) {\n updateDuringScroll();\n col.wrapper.transitionEnd(function(){\n $.cancelAnimationFrame(animationFrameId);\n });\n }\n \n // Allow click\n setTimeout(function () {\n allowItemClick = true;\n }, 100);\n }\n \n function handleClick(e) {\n if (!allowItemClick) return;\n $.cancelAnimationFrame(animationFrameId);\n /*jshint validthis:true */\n var value = $(this).attr('data-picker-value');\n col.setValue(value);\n }\n \n col.initEvents = function (detach) {\n var method = detach ? 'off' : 'on';\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n col.container[method](app.touchEvents.start, handleTouchStart, activeListener);\n col.container[method](app.touchEvents.move, handleTouchMove, activeListener);\n col.container[method](app.touchEvents.end, handleTouchEnd, activeListener);\n col.items[method]('click', handleClick);\n };\n col.destroyEvents = function () {\n col.initEvents(true);\n };\n \n col.container[0].f7DestroyPickerCol = function () {\n col.destroyEvents();\n };\n \n col.initEvents();\n \n };\n p.destroyPickerCol = function (colContainer) {\n colContainer = $(colContainer);\n if ('f7DestroyPickerCol' in colContainer[0]) colContainer[0].f7DestroyPickerCol();\n };\n // Resize cols\n function resizeCols() {\n if (!p.opened) return;\n for (var i = 0; i < p.cols.length; i++) {\n if (!p.cols[i].divider) {\n p.cols[i].calcSize();\n p.cols[i].setValue(p.cols[i].value, 0, false);\n }\n }\n }\n app.onResize(resizeCols);\n \n // HTML Layout\n p.columnHTML = function (col, onlyItems) {\n var columnItemsHTML = '';\n var columnHTML = '';\n if (col.divider) {\n columnHTML += '
              ' + col.content + '
              ';\n }\n else {\n for (var j = 0; j < col.values.length; j++) {\n columnItemsHTML += '
              ' + (col.displayValues ? col.displayValues[j] : col.values[j]) + '
              ';\n }\n columnHTML += '
              ' + columnItemsHTML + '
              ';\n }\n return onlyItems ? columnItemsHTML : columnHTML;\n };\n p.layout = function () {\n var pickerHTML = '';\n var pickerClass = '';\n var i;\n p.cols = [];\n var colsHTML = '';\n for (i = 0; i < p.params.cols.length; i++) {\n var col = p.params.cols[i];\n colsHTML += p.columnHTML(p.params.cols[i]);\n p.cols.push(col);\n }\n pickerClass = 'picker-modal picker-columns ' + (p.params.cssClass || '') + (p.params.rotateEffect ? ' picker-3d' : '');\n pickerHTML =\n '
              ' +\n (p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '') +\n '
              ' +\n colsHTML +\n '
              ' +\n '
              ' +\n '
              ';\n \n p.pickerHTML = pickerHTML;\n };\n \n // Input Events\n function openOnInput(e) {\n e.preventDefault();\n if (p.opened) return;\n p.open();\n if (p.params.scrollToInput && !isPopover()) {\n var pageContent = p.input.parents('.page-content');\n if (pageContent.length === 0) return;\n \n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(),\n newPaddingBottom;\n var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = p.container.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n }\n function closeOnHTMLClick(e) {\n if (inPopover()) return;\n if (p.input && p.input.length > 0) {\n if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close();\n }\n else {\n if ($(e.target).parents('.picker-modal').length === 0) p.close();\n }\n }\n \n if (p.params.input) {\n p.input = $(p.params.input);\n if (p.input.length > 0) {\n if (p.params.inputReadOnly) p.input.prop('readOnly', true);\n if (!p.inline) {\n p.input.on('click', openOnInput);\n }\n if (p.params.inputReadOnly) {\n p.input.on('focus mousedown', function (e) {\n e.preventDefault();\n });\n }\n }\n \n }\n \n if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick);\n \n // Open\n function onPickerClose() {\n p.opened = false;\n if (p.input && p.input.length > 0) {\n p.input.parents('.page-content').css({'padding-bottom': ''});\n if (app.params.material) p.input.trigger('blur');\n }\n if (p.params.onClose) p.params.onClose(p);\n \n // Destroy events\n p.container.find('.picker-items-col').each(function () {\n p.destroyPickerCol(this);\n });\n }\n \n p.opened = false;\n p.open = function () {\n var toPopover = isPopover();\n \n if (!p.opened) {\n \n // Layout\n p.layout();\n \n // Append\n if (toPopover) {\n p.pickerHTML = '
              ' + p.pickerHTML + '
              ';\n p.popover = app.popover(p.pickerHTML, p.params.input, true);\n p.container = $(p.popover).find('.picker-modal');\n $(p.popover).on('popover:close', function () {\n onPickerClose();\n });\n }\n else if (p.inline) {\n p.container = $(p.pickerHTML);\n p.container.addClass('picker-modal-inline');\n $(p.params.container).append(p.container);\n }\n else {\n p.container = $(app.pickerModal(p.pickerHTML));\n $(p.container)\n .on('picker:close', function () {\n onPickerClose();\n });\n }\n \n // Store picker instance\n p.container[0].f7Picker = p;\n \n // Init Events\n p.container.find('.picker-items-col').each(function () {\n var updateItems = true;\n if ((!p.initialized && p.params.value) || (p.initialized && p.value)) updateItems = false;\n p.initPickerCol(this, updateItems);\n });\n \n // Set value\n if (!p.initialized) {\n if (p.value) p.setValue(p.value, 0);\n else if (p.params.value) {\n p.setValue(p.params.value, 0);\n }\n }\n else {\n if (p.value) p.setValue(p.value, 0);\n }\n \n // Material Focus\n if (p.input && p.input.length > 0 && app.params.material) {\n p.input.trigger('focus');\n }\n }\n \n // Set flag\n p.opened = true;\n p.initialized = true;\n \n if (p.params.onOpen) p.params.onOpen(p);\n };\n \n // Close\n p.close = function () {\n if (!p.opened || p.inline) return;\n if (inPopover()) {\n app.closeModal(p.popover);\n return;\n }\n else {\n app.closeModal(p.container);\n return;\n }\n };\n \n // Destroy\n p.destroy = function () {\n p.close();\n if (p.params.input && p.input.length > 0) {\n p.input.off('click focus', openOnInput);\n }\n $('html').off('click', closeOnHTMLClick);\n app.offResize(resizeCols);\n };\n \n if (p.inline) {\n p.open();\n }\n else {\n if (!p.initialized && p.params.value) p.setValue(p.params.value);\n }\n \n return p;\n };\n app.picker = function (params) {\n return new Picker(params);\n };\n \n"," /*======================================================\n ************ Calendar ************\n ======================================================*/\n var Calendar = function (params) {\n var p = this;\n var defaults = {\n monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August' , 'September' , 'October', 'November', 'December'],\n monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n firstDay: 1, // First day of the week, Monday\n weekendDays: [0, 6], // Sunday and Saturday\n multiple: false,\n rangePicker: false,\n dateFormat: 'yyyy-mm-dd',\n direction: 'horizontal', // or 'vertical'\n minDate: null,\n maxDate: null,\n disabled: null, // dates range of disabled days\n events: null, // dates range of days with events\n rangesClasses: null, //array with custom classes date ranges\n touchMove: true,\n animate: true,\n closeOnSelect: false,\n monthPicker: true,\n monthPickerTemplate:\n '
              ' +\n '' +\n '' +\n '' +\n '
              ',\n yearPicker: true,\n yearPickerTemplate:\n '
              ' +\n '' +\n '' +\n '' +\n '
              ',\n weekHeader: true,\n // Common settings\n closeByOutsideClick: true,\n scrollToInput: true,\n inputReadOnly: true,\n convertToPopover: true,\n onlyInPopover: false,\n toolbar: true,\n toolbarCloseText: 'Done',\n headerPlaceholder: 'Select date',\n header: app.params.material,\n footer: app.params.material,\n toolbarTemplate:\n '
              ' +\n '
              ' +\n '{{monthPicker}}' +\n '{{yearPicker}}' +\n '
              ' +\n '
              ',\n headerTemplate:\n '
              ' +\n '
              {{placeholder}}
              ' +\n '
              ',\n footerTemplate:\n '
              ' +\n '{{closeText}}' +\n '
              ',\n \n /* Callbacks\n onMonthAdd\n onChange\n onOpen\n onClose\n onDayClick\n onMonthYearChangeStart\n onMonthYearChangeEnd\n */\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n p.params = params;\n p.initialized = false;\n \n // Inline flag\n p.inline = p.params.container ? true : false;\n \n // Is horizontal\n p.isH = p.params.direction === 'horizontal';\n \n // RTL inverter\n var inverter = p.isH ? (app.rtl ? -1 : 1) : 1;\n \n // Animating flag\n p.animating = false;\n \n // Should be converted to popover\n function isPopover() {\n var toPopover = false;\n if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover;\n if (!p.inline && p.params.input) {\n if (p.params.onlyInPopover) toPopover = true;\n else {\n if (app.device.ios) {\n toPopover = app.device.ipad ? true : false;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n }\n return toPopover;\n }\n function inPopover() {\n if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true;\n else return false;\n }\n \n // Format date\n function formatDate(date) {\n date = new Date(date);\n var year = date.getFullYear();\n var month = date.getMonth();\n var month1 = month + 1;\n var day = date.getDate();\n var weekDay = date.getDay();\n \n return p.params.dateFormat\n .replace(/yyyy/g, year)\n .replace(/yy/g, (year + '').substring(2))\n .replace(/mm/g, month1 < 10 ? '0' + month1 : month1)\n .replace(/m(\\W+)/g, month1 + '$1')\n .replace(/MM/g, p.params.monthNames[month])\n .replace(/M(\\W+)/g, p.params.monthNamesShort[month] + '$1')\n .replace(/dd/g, day < 10 ? '0' + day : day)\n .replace(/d(\\W+)/g, day + '$1')\n .replace(/DD/g, p.params.dayNames[weekDay])\n .replace(/D(\\W+)/g, p.params.dayNamesShort[weekDay] + '$1');\n }\n \n \n // Value\n p.addValue = function (value) {\n if (p.params.multiple) {\n if (!p.value) p.value = [];\n var inValuesIndex;\n for (var i = 0; i < p.value.length; i++) {\n if (new Date(value).getTime() === new Date(p.value[i]).getTime()) {\n inValuesIndex = i;\n }\n }\n if (typeof inValuesIndex === 'undefined') {\n p.value.push(value);\n }\n else {\n p.value.splice(inValuesIndex, 1);\n }\n p.updateValue();\n }\n else if (p.params.rangePicker) {\n if (!p.value) p.value = [];\n if (p.value.length === 2 || p.value.length === 0) {\n p.value = [];\n }\n if (p.value[0] !== value) p.value.push(value);\n else p.value = [];\n p.value.sort(function (a,b) {\n return a - b;\n });\n p.updateValue();\n }\n else {\n p.value = [value];\n p.updateValue();\n }\n };\n p.setValue = function (arrValues) {\n p.value = arrValues;\n p.updateValue();\n };\n p.updateValue = function (onlyHeader) {\n var i, inputValue;\n if (p.container && p.container.length > 0) {\n p.wrapper.find('.picker-calendar-day-selected').removeClass('picker-calendar-day-selected');\n var valueDate;\n if (p.params.rangePicker && p.value.length === 2) {\n for (i = new Date(p.value[0]).getTime(); i <= new Date(p.value[1]).getTime(); i += 24*60*60*1000) {\n valueDate = new Date(i);\n p.wrapper.find('.picker-calendar-day[data-date=\"' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '\"]').addClass('picker-calendar-day-selected');\n }\n }\n else {\n for (i = 0; i < p.value.length; i++) {\n valueDate = new Date(p.value[i]);\n p.wrapper.find('.picker-calendar-day[data-date=\"' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '\"]').addClass('picker-calendar-day-selected');\n }\n }\n }\n \n if (p.params.onChange) {\n p.params.onChange(p, p.value);\n }\n if ((p.input && p.input.length > 0) || (app.params.material && p.params.header)) {\n if (p.params.formatValue) inputValue = p.params.formatValue(p, p.value);\n else {\n inputValue = [];\n for (i = 0; i < p.value.length; i++) {\n inputValue.push(formatDate(p.value[i]));\n }\n inputValue = inputValue.join(p.params.rangePicker ? ' - ' : ', ');\n }\n if (app.params.material && p.params.header && p.container && p.container.length > 0) {\n p.container.find('.picker-calendar-selected-date').text(inputValue);\n }\n if (p.input && p.input.length > 0 && !onlyHeader) {\n $(p.input).val(inputValue);\n $(p.input).trigger('change');\n }\n \n }\n };\n \n // Columns Handlers\n p.initCalendarEvents = function () {\n var col;\n var allowItemClick = true;\n var isTouched, isMoved, touchStartX, touchStartY, touchCurrentX, touchCurrentY, touchStartTime, touchEndTime, startTranslate, currentTranslate, wrapperWidth, wrapperHeight, percentage, touchesDiff, isScrolling;\n function handleTouchStart (e) {\n if (isMoved || isTouched) return;\n // e.preventDefault();\n isTouched = true;\n touchStartX = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n percentage = 0;\n allowItemClick = true;\n isScrolling = undefined;\n startTranslate = currentTranslate = p.monthsTranslate;\n }\n function handleTouchMove (e) {\n if (!isTouched) return;\n \n touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX));\n }\n if (p.isH && isScrolling) {\n isTouched = false;\n return;\n }\n e.preventDefault();\n if (p.animating) {\n isTouched = false;\n return;\n }\n allowItemClick = false;\n if (!isMoved) {\n // First move\n isMoved = true;\n wrapperWidth = p.wrapper[0].offsetWidth;\n wrapperHeight = p.wrapper[0].offsetHeight;\n p.wrapper.transition(0);\n }\n \n touchesDiff = p.isH ? touchCurrentX - touchStartX : touchCurrentY - touchStartY;\n percentage = touchesDiff/(p.isH ? wrapperWidth : wrapperHeight);\n currentTranslate = (p.monthsTranslate * inverter + percentage) * 100;\n \n // Transform wrapper\n p.wrapper.transform('translate3d(' + (p.isH ? currentTranslate : 0) + '%, ' + (p.isH ? 0 : currentTranslate) + '%, 0)');\n \n }\n function handleTouchEnd (e) {\n if (!isTouched || !isMoved) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n \n touchEndTime = new Date().getTime();\n if (touchEndTime - touchStartTime < 300) {\n if (Math.abs(touchesDiff) < 10) {\n p.resetMonth();\n }\n else if (touchesDiff >= 10) {\n if (app.rtl) p.nextMonth();\n else p.prevMonth();\n }\n else {\n if (app.rtl) p.prevMonth();\n else p.nextMonth();\n }\n }\n else {\n if (percentage <= -0.5) {\n if (app.rtl) p.prevMonth();\n else p.nextMonth();\n }\n else if (percentage >= 0.5) {\n if (app.rtl) p.nextMonth();\n else p.prevMonth();\n }\n else {\n p.resetMonth();\n }\n }\n \n // Allow click\n setTimeout(function () {\n allowItemClick = true;\n }, 100);\n }\n \n function handleDayClick(e) {\n if (!allowItemClick) return;\n var day = $(e.target).parents('.picker-calendar-day');\n if (day.length === 0 && $(e.target).hasClass('picker-calendar-day')) {\n day = $(e.target);\n }\n if (day.length === 0) return;\n if (day.hasClass('picker-calendar-day-disabled')) return;\n if (!p.params.rangePicker) {\n if (day.hasClass('picker-calendar-day-next')) p.nextMonth();\n if (day.hasClass('picker-calendar-day-prev')) p.prevMonth();\n }\n var dateYear = day.attr('data-year');\n var dateMonth = day.attr('data-month');\n var dateDay = day.attr('data-day');\n if (p.params.onDayClick) {\n p.params.onDayClick(p, day[0], dateYear, dateMonth, dateDay);\n }\n if (!day.hasClass('picker-calendar-day-selected') || p.params.multiple || p.params.rangePicker) {\n p.addValue(new Date(dateYear, dateMonth, dateDay, 0, 0, 0));\n }\n if (p.params.closeOnSelect) {\n if (p.params.rangePicker && p.value.length === 2 || !p.params.rangePicker) p.close();\n }\n }\n \n p.container.find('.picker-calendar-prev-month').on('click', p.prevMonth);\n p.container.find('.picker-calendar-next-month').on('click', p.nextMonth);\n p.container.find('.picker-calendar-prev-year').on('click', p.prevYear);\n p.container.find('.picker-calendar-next-year').on('click', p.nextYear);\n p.wrapper.on('click', handleDayClick);\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n if (p.params.touchMove) {\n p.wrapper.on(app.touchEvents.start, handleTouchStart, passiveListener);\n p.wrapper.on(app.touchEvents.move, handleTouchMove, activeListener);\n p.wrapper.on(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n \n p.container[0].f7DestroyCalendarEvents = function () {\n p.container.find('.picker-calendar-prev-month').off('click', p.prevMonth);\n p.container.find('.picker-calendar-next-month').off('click', p.nextMonth);\n p.container.find('.picker-calendar-prev-year').off('click', p.prevYear);\n p.container.find('.picker-calendar-next-year').off('click', p.nextYear);\n p.wrapper.off('click', handleDayClick);\n if (p.params.touchMove) {\n p.wrapper.off(app.touchEvents.start, handleTouchStart, passiveListener);\n p.wrapper.off(app.touchEvents.move, handleTouchMove, activeListener);\n p.wrapper.off(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n };\n \n \n };\n p.destroyCalendarEvents = function (colContainer) {\n if ('f7DestroyCalendarEvents' in p.container[0]) p.container[0].f7DestroyCalendarEvents();\n };\n \n // Scan Dates Range\n p.dateInRange = function (dayDate, range) {\n var match = false;\n var i;\n if (!range) return false;\n if (Array.isArray(range)) {\n for (i = 0; i < range.length; i ++) {\n if (range[i].from || range[i].to) {\n if (range[i].from && range[i].to) {\n if ((dayDate <= new Date(range[i].to).getTime()) && (dayDate >= new Date(range[i].from).getTime())) {\n match = true;\n }\n }\n else if (range[i].from) {\n if (dayDate >= new Date(range[i].from).getTime()) {\n match = true;\n }\n }\n else if (range[i].to) {\n if (dayDate <= new Date(range[i].to).getTime()) {\n match = true;\n }\n }\n } else if (dayDate === new Date(range[i]).getTime()) {\n match = true;\n }\n }\n }\n else if (range.from || range.to) {\n if (range.from && range.to) {\n if ((dayDate <= new Date(range.to).getTime()) && (dayDate >= new Date(range.from).getTime())) {\n match = true;\n }\n }\n else if (range.from) {\n if (dayDate >= new Date(range.from).getTime()) {\n match = true;\n }\n }\n else if (range.to) {\n if (dayDate <= new Date(range.to).getTime()) {\n match = true;\n }\n }\n }\n else if (typeof range === 'function') {\n match = range(new Date(dayDate));\n }\n return match;\n };\n // Calendar Methods\n p.daysInMonth = function (date) {\n var d = new Date(date);\n return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();\n };\n p.monthHTML = function (date, offset) {\n date = new Date(date);\n var year = date.getFullYear(),\n month = date.getMonth(),\n day = date.getDate();\n if (offset === 'next') {\n if (month === 11) date = new Date(year + 1, 0);\n else date = new Date(year, month + 1, 1);\n }\n if (offset === 'prev') {\n if (month === 0) date = new Date(year - 1, 11);\n else date = new Date(year, month - 1, 1);\n }\n if (offset === 'next' || offset === 'prev') {\n month = date.getMonth();\n year = date.getFullYear();\n }\n var daysInPrevMonth = p.daysInMonth(new Date(date.getFullYear(), date.getMonth()).getTime() - 10 * 24 * 60 * 60 * 1000),\n daysInMonth = p.daysInMonth(date),\n firstDayOfMonthIndex = new Date(date.getFullYear(), date.getMonth()).getDay();\n if (firstDayOfMonthIndex === 0) firstDayOfMonthIndex = 7;\n \n var dayDate, currentValues = [], i, j, k,\n rows = 6, cols = 7,\n monthHTML = '',\n dayIndex = 0 + (p.params.firstDay - 1),\n today = new Date().setHours(0,0,0,0),\n minDate = p.params.minDate ? new Date(p.params.minDate).getTime() : null,\n maxDate = p.params.maxDate ? new Date(p.params.maxDate).getTime() : null,\n disabled,\n hasEvent;\n \n if (p.value && p.value.length) {\n for (i = 0; i < p.value.length; i++) {\n currentValues.push(new Date(p.value[i]).setHours(0,0,0,0));\n }\n }\n \n for (i = 1; i <= rows; i++) {\n var rowHTML = '';\n var row = i;\n for (j = 1; j <= cols; j++) {\n var col = j;\n dayIndex ++;\n var dayNumber = dayIndex - firstDayOfMonthIndex;\n var weekDayIndex = (col - 1 + p.params.firstDay > 6) ? (col - 1 - 7 + p.params.firstDay) : (col - 1 + p.params.firstDay);\n var addClass = '';\n if (dayNumber < 0) {\n dayNumber = daysInPrevMonth + dayNumber + 1;\n addClass += ' picker-calendar-day-prev';\n dayDate = new Date(month - 1 < 0 ? year - 1 : year, month - 1 < 0 ? 11 : month - 1, dayNumber).getTime();\n }\n else {\n dayNumber = dayNumber + 1;\n if (dayNumber > daysInMonth) {\n dayNumber = dayNumber - daysInMonth;\n addClass += ' picker-calendar-day-next';\n dayDate = new Date(month + 1 > 11 ? year + 1 : year, month + 1 > 11 ? 0 : month + 1, dayNumber).getTime();\n }\n else {\n dayDate = new Date(year, month, dayNumber).getTime();\n }\n }\n // Today\n if (dayDate === today) addClass += ' picker-calendar-day-today';\n // Selected\n if (p.params.rangePicker && currentValues.length === 2) {\n if (dayDate >= currentValues[0] && dayDate <= currentValues[1]) addClass += ' picker-calendar-day-selected';\n }\n else {\n if (currentValues.indexOf(dayDate) >= 0) addClass += ' picker-calendar-day-selected';\n }\n // Weekend\n if (p.params.weekendDays.indexOf(weekDayIndex) >= 0) {\n addClass += ' picker-calendar-day-weekend';\n }\n // Has Events\n hasEvent = false;\n if (p.params.events) {\n if (p.dateInRange(dayDate, p.params.events)) {\n hasEvent = true;\n }\n }\n if (hasEvent) {\n addClass += ' picker-calendar-day-has-events';\n }\n // Custom Ranges\n if (p.params.rangesClasses) {\n for (k = 0; k < p.params.rangesClasses.length; k++) {\n if (p.dateInRange(dayDate, p.params.rangesClasses[k].range)) {\n addClass += ' ' + p.params.rangesClasses[k].cssClass;\n }\n }\n }\n // Disabled\n disabled = false;\n if ((minDate && dayDate < minDate) || (maxDate && dayDate > maxDate)) {\n disabled = true;\n }\n if (p.params.disabled) {\n if (p.dateInRange(dayDate, p.params.disabled)) {\n disabled = true;\n }\n }\n if (disabled) {\n addClass += ' picker-calendar-day-disabled';\n }\n \n \n dayDate = new Date(dayDate);\n var dayYear = dayDate.getFullYear();\n var dayMonth = dayDate.getMonth();\n rowHTML += '
              '+dayNumber+'
              ';\n }\n monthHTML += '
              ' + rowHTML + '
              ';\n }\n monthHTML = '
              ' + monthHTML + '
              ';\n return monthHTML;\n };\n p.animating = false;\n p.updateCurrentMonthYear = function (dir) {\n if (typeof dir === 'undefined') {\n p.currentMonth = parseInt(p.months.eq(1).attr('data-month'), 10);\n p.currentYear = parseInt(p.months.eq(1).attr('data-year'), 10);\n }\n else {\n p.currentMonth = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-month'), 10);\n p.currentYear = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-year'), 10);\n }\n p.container.find('.current-month-value').text(p.params.monthNames[p.currentMonth]);\n p.container.find('.current-year-value').text(p.currentYear);\n \n };\n p.onMonthChangeStart = function (dir) {\n p.updateCurrentMonthYear(dir);\n p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next');\n var currentIndex = dir === 'next' ? p.months.length - 1 : 0;\n \n p.months.eq(currentIndex).addClass('picker-calendar-month-current');\n p.months.eq(dir === 'next' ? currentIndex - 1 : currentIndex + 1).addClass(dir === 'next' ? 'picker-calendar-month-prev' : 'picker-calendar-month-next');\n \n if (p.params.onMonthYearChangeStart) {\n p.params.onMonthYearChangeStart(p, p.currentYear, p.currentMonth);\n }\n };\n p.onMonthChangeEnd = function (dir, rebuildBoth) {\n p.animating = false;\n var nextMonthHTML, prevMonthHTML, newMonthHTML;\n p.wrapper.find('.picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)').remove();\n \n if (typeof dir === 'undefined') {\n dir = 'next';\n rebuildBoth = true;\n }\n if (!rebuildBoth) {\n newMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), dir);\n }\n else {\n p.wrapper.find('.picker-calendar-month-next, .picker-calendar-month-prev').remove();\n prevMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'prev');\n nextMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'next');\n }\n if (dir === 'next' || rebuildBoth) {\n p.wrapper.append(newMonthHTML || nextMonthHTML);\n }\n if (dir === 'prev' || rebuildBoth) {\n p.wrapper.prepend(newMonthHTML || prevMonthHTML);\n }\n p.months = p.wrapper.find('.picker-calendar-month');\n p.setMonthsTranslate(p.monthsTranslate);\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]);\n }\n if (p.params.onMonthYearChangeEnd) {\n p.params.onMonthYearChangeEnd(p, p.currentYear, p.currentMonth);\n }\n };\n p.setMonthsTranslate = function (translate) {\n translate = translate || p.monthsTranslate || 0;\n if (typeof p.monthsTranslate === 'undefined') p.monthsTranslate = translate;\n p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next');\n var prevMonthTranslate = -(translate + 1) * 100 * inverter;\n var currentMonthTranslate = -translate * 100 * inverter;\n var nextMonthTranslate = -(translate - 1) * 100 * inverter;\n p.months.eq(0).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n p.months.eq(1).transform('translate3d(' + (p.isH ? currentMonthTranslate : 0) + '%, ' + (p.isH ? 0 : currentMonthTranslate) + '%, 0)').addClass('picker-calendar-month-current');\n p.months.eq(2).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n };\n p.nextMonth = function (transition) {\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var nextMonth = parseInt(p.months.eq(p.months.length - 1).attr('data-month'), 10);\n var nextYear = parseInt(p.months.eq(p.months.length - 1).attr('data-year'), 10);\n var nextDate = new Date(nextYear, nextMonth);\n var nextDateTime = nextDate.getTime();\n var transitionEndCallback = p.animating ? false : true;\n if (p.params.maxDate) {\n if (nextDateTime > new Date(p.params.maxDate).getTime()) {\n return p.resetMonth();\n }\n }\n p.monthsTranslate --;\n if (nextMonth === p.currentMonth) {\n var nextMonthTranslate = -(p.monthsTranslate) * 100 * inverter;\n var nextMonthHTML = $(p.monthHTML(nextDateTime, 'next')).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n p.wrapper.append(nextMonthHTML[0]);\n p.months = p.wrapper.find('.picker-calendar-month');\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, p.months.eq(p.months.length - 1)[0]);\n }\n }\n p.animating = true;\n p.onMonthChangeStart('next');\n var translate = (p.monthsTranslate * 100) * inverter;\n \n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd('next');\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd('next');\n }\n };\n p.prevMonth = function (transition) {\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var prevMonth = parseInt(p.months.eq(0).attr('data-month'), 10);\n var prevYear = parseInt(p.months.eq(0).attr('data-year'), 10);\n var prevDate = new Date(prevYear, prevMonth + 1, -1);\n var prevDateTime = prevDate.getTime();\n var transitionEndCallback = p.animating ? false : true;\n if (p.params.minDate) {\n if (prevDateTime < new Date(p.params.minDate).getTime()) {\n return p.resetMonth();\n }\n }\n p.monthsTranslate ++;\n if (prevMonth === p.currentMonth) {\n var prevMonthTranslate = -(p.monthsTranslate) * 100 * inverter;\n var prevMonthHTML = $(p.monthHTML(prevDateTime, 'prev')).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n p.wrapper.prepend(prevMonthHTML[0]);\n p.months = p.wrapper.find('.picker-calendar-month');\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, p.months.eq(0)[0]);\n }\n }\n p.animating = true;\n p.onMonthChangeStart('prev');\n var translate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd('prev');\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd('prev');\n }\n };\n p.resetMonth = function (transition) {\n if (typeof transition === 'undefined') transition = '';\n var translate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n };\n p.setYearMonth = function (year, month, transition) {\n if (typeof year === 'undefined') year = p.currentYear;\n if (typeof month === 'undefined') month = p.currentMonth;\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var targetDate;\n if (year < p.currentYear) {\n targetDate = new Date(year, month + 1, -1).getTime();\n }\n else {\n targetDate = new Date(year, month).getTime();\n }\n if (p.params.maxDate && targetDate > new Date(p.params.maxDate).getTime()) {\n return false;\n }\n if (p.params.minDate && targetDate < new Date(p.params.minDate).getTime()) {\n return false;\n }\n var currentDate = new Date(p.currentYear, p.currentMonth).getTime();\n var dir = targetDate > currentDate ? 'next' : 'prev';\n var newMonthHTML = p.monthHTML(new Date(year, month));\n p.monthsTranslate = p.monthsTranslate || 0;\n var prevTranslate = p.monthsTranslate;\n var monthTranslate, wrapperTranslate;\n var transitionEndCallback = p.animating ? false : true;\n if (targetDate > currentDate) {\n // To next\n p.monthsTranslate --;\n if (!p.animating) p.months.eq(p.months.length - 1).remove();\n p.wrapper.append(newMonthHTML);\n p.months = p.wrapper.find('.picker-calendar-month');\n monthTranslate = -(prevTranslate - 1) * 100 * inverter;\n p.months.eq(p.months.length - 1).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n }\n else {\n // To prev\n p.monthsTranslate ++;\n if (!p.animating) p.months.eq(0).remove();\n p.wrapper.prepend(newMonthHTML);\n p.months = p.wrapper.find('.picker-calendar-month');\n monthTranslate = -(prevTranslate + 1) * 100 * inverter;\n p.months.eq(0).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n }\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]);\n }\n p.animating = true;\n p.onMonthChangeStart(dir);\n wrapperTranslate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? wrapperTranslate : 0) + '%, ' + (p.isH ? 0 : wrapperTranslate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd(dir, true);\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd(dir);\n }\n };\n p.nextYear = function () {\n p.setYearMonth(p.currentYear + 1);\n };\n p.prevYear = function () {\n p.setYearMonth(p.currentYear - 1);\n };\n \n \n // HTML Layout\n p.layout = function () {\n var pickerHTML = '';\n var pickerClass = '';\n var i;\n \n var layoutDate = p.value && p.value.length ? p.value[0] : new Date().setHours(0,0,0,0);\n var prevMonthHTML = p.monthHTML(layoutDate, 'prev');\n var currentMonthHTML = p.monthHTML(layoutDate);\n var nextMonthHTML = p.monthHTML(layoutDate, 'next');\n var monthsHTML = '
              ' + (prevMonthHTML + currentMonthHTML + nextMonthHTML) + '
              ';\n // Week days header\n var weekHeaderHTML = '';\n if (p.params.weekHeader) {\n for (i = 0; i < 7; i++) {\n var weekDayIndex = (i + p.params.firstDay > 6) ? (i - 7 + p.params.firstDay) : (i + p.params.firstDay);\n var dayName = p.params.dayNamesShort[weekDayIndex];\n weekHeaderHTML += '
              = 0) ? 'picker-calendar-week-day-weekend' : '') + '\"> ' + dayName + '
              ';\n \n }\n weekHeaderHTML = '
              ' + weekHeaderHTML + '
              ';\n }\n pickerClass = 'picker-modal picker-calendar' +\n (p.params.rangePicker ? ' picker-calendar-range' : '') +\n (p.params.cssClass ? ' ' + p.params.cssClass : '');\n var toolbarHTML = p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '';\n if (p.params.toolbar) {\n toolbarHTML = p.params.toolbarTemplate\n .replace(/{{closeText}}/g, p.params.toolbarCloseText)\n .replace(/{{monthPicker}}/g, (p.params.monthPicker ? p.params.monthPickerTemplate : ''))\n .replace(/{{yearPicker}}/g, (p.params.yearPicker ? p.params.yearPickerTemplate : ''));\n }\n var headerHTML = p.params.header ? p.params.headerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText).replace(/{{placeholder}}/g, p.params.headerPlaceholder) : '';\n var footerHTML = p.params.footer ? p.params.footerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '';\n \n pickerHTML =\n '
              ' +\n headerHTML +\n footerHTML +\n toolbarHTML +\n '
              ' +\n weekHeaderHTML +\n monthsHTML +\n '
              ' +\n '
              ';\n \n \n p.pickerHTML = pickerHTML;\n };\n \n // Input Events\n function openOnInput(e) {\n e.preventDefault();\n if (p.opened) return;\n p.open();\n if (p.params.scrollToInput && !isPopover() && !app.params.material) {\n var pageContent = p.input.parents('.page-content');\n if (pageContent.length === 0) return;\n \n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(),\n newPaddingBottom;\n \n var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = p.container.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n }\n function closeOnHTMLClick(e) {\n if (inPopover()) return;\n if (p.input && p.input.length > 0) {\n if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close();\n }\n else {\n if ($(e.target).parents('.picker-modal').length === 0) p.close();\n }\n }\n \n if (p.params.input) {\n p.input = $(p.params.input);\n if (p.input.length > 0) {\n if (p.params.inputReadOnly) p.input.prop('readOnly', true);\n if (!p.inline) {\n p.input.on('click', openOnInput);\n }\n if (p.params.inputReadOnly) {\n p.input.on('focus mousedown', function (e) {\n e.preventDefault();\n });\n }\n }\n \n }\n \n if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick);\n \n // Open\n function onPickerClose() {\n p.opened = false;\n if (p.input && p.input.length > 0) {\n p.input.parents('.page-content').css({'padding-bottom': ''});\n if (app.params.material) p.input.trigger('blur');\n }\n if (p.params.onClose) p.params.onClose(p);\n \n // Destroy events\n p.destroyCalendarEvents();\n }\n \n p.opened = false;\n p.open = function () {\n var toPopover = isPopover();\n var updateValue = false;\n if (!p.opened) {\n // Set date value\n if (!p.value) {\n if (p.params.value) {\n p.value = p.params.value;\n updateValue = true;\n }\n }\n \n // Layout\n p.layout();\n \n // Append\n if (toPopover) {\n p.pickerHTML = '
              ' + p.pickerHTML + '
              ';\n p.popover = app.popover(p.pickerHTML, p.params.input, true);\n p.container = $(p.popover).find('.picker-modal');\n $(p.popover).on('popover:close', function () {\n onPickerClose();\n });\n }\n else if (p.inline) {\n p.container = $(p.pickerHTML);\n p.container.addClass('picker-modal-inline');\n $(p.params.container).append(p.container);\n }\n else {\n p.container = $(app.pickerModal(p.pickerHTML));\n $(p.container)\n .on('picker:close', function () {\n onPickerClose();\n });\n }\n \n // Store calendar instance\n p.container[0].f7Calendar = p;\n p.wrapper = p.container.find('.picker-calendar-months-wrapper');\n \n // Months\n p.months = p.wrapper.find('.picker-calendar-month');\n \n // Update current month and year\n p.updateCurrentMonthYear();\n \n // Set initial translate\n p.monthsTranslate = 0;\n p.setMonthsTranslate();\n \n // Init events\n p.initCalendarEvents();\n \n // Update input value\n if (updateValue) p.updateValue();\n else if (app.params.material && p.value) p.updateValue(true);\n \n // Material Focus\n if (p.input && p.input.length > 0 && app.params.material) {\n p.input.trigger('focus');\n }\n \n }\n \n // Set flag\n p.opened = true;\n p.initialized = true;\n if (p.params.onMonthAdd) {\n p.months.each(function () {\n p.params.onMonthAdd(p, this);\n });\n }\n if (p.params.onOpen) p.params.onOpen(p);\n };\n \n // Close\n p.close = function () {\n if (!p.opened || p.inline) return;\n if (inPopover()) {\n app.closeModal(p.popover);\n return;\n }\n else {\n app.closeModal(p.container);\n return;\n }\n };\n \n // Destroy\n p.destroy = function () {\n p.close();\n if (p.params.input && p.input.length > 0) {\n p.input.off('click focus', openOnInput);\n }\n $('html').off('click', closeOnHTMLClick);\n };\n \n if (p.inline) {\n p.open();\n }\n else {\n if (!p.initialized && p.params.value) p.setValue(p.params.value);\n }\n \n return p;\n };\n app.calendar = function (params) {\n return new Calendar(params);\n };\n \n"," /*======================================================\n ************ Notifications ************\n ======================================================*/\n var _tempNotificationElement;\n app.addNotification = function (params) {\n if (!params) return;\n \n if (typeof params.media === 'undefined') params.media = app.params.notificationMedia;\n if (typeof params.title === 'undefined') params.title = app.params.notificationTitle;\n if (typeof params.subtitle === 'undefined') params.subtitle = app.params.notificationSubtitle;\n if (typeof params.closeIcon === 'undefined') params.closeIcon = app.params.notificationCloseIcon;\n if (typeof params.hold === 'undefined') params.hold = app.params.notificationHold;\n if (typeof params.closeOnClick === 'undefined') params.closeOnClick = app.params.notificationCloseOnClick;\n if (typeof params.button === 'undefined') params.button = app.params.notificationCloseButtonText && {\n text: app.params.notificationCloseButtonText,\n close: true\n };\n \n if (!_tempNotificationElement) _tempNotificationElement = document.createElement('div');\n \n params.material = app.params.material;\n \n var container = $('.notifications');\n if (container.length === 0) {\n app.root.append('
                ');\n container = $('.notifications');\n }\n var list = container.children('ul');\n \n var notificationTemplate = app.params.notificationTemplate || \n '{{#if custom}}' +\n '
              • {{custom}}
              • ' +\n '{{else}}' +\n '
              • ' +\n '
                ' +\n '{{#if material}}' +\n '
                ' +\n '
                {{js \"this.message || this.title || this.subtitle\"}}
                ' +\n '{{#if ../button}}{{#button}}' +\n '
                ' +\n '{{text}}' +\n '
                ' +\n '{{/button}}{{/if}}' +\n '
                ' +\n '{{else}}' +\n '{{#if media}}' +\n '
                {{media}}
                ' +\n '{{/if}}' +\n '
                ' +\n '
                ' +\n '{{#if title}}' +\n '
                {{title}}
                ' +\n '{{/if}}' +\n '{{#if closeIcon}}' +\n '
                ' +\n '{{/if}}' +\n '
                ' +\n '{{#if subtitle}}' +\n '
                {{subtitle}}
                ' +\n '{{/if}}' +\n '{{#if message}}' +\n '
                {{message}}
                ' +\n '
                ' +\n '{{/if}}' +\n '{{/if}}' +\n '
                ' +\n '
              • ' +\n '{{/if}}';\n if (!app._compiledTemplates.notification) {\n app._compiledTemplates.notification = t7.compile(notificationTemplate);\n }\n _tempNotificationElement.innerHTML = app._compiledTemplates.notification(params);\n \n var item = $(_tempNotificationElement).children();\n \n item.on('click', function (e) {\n var close = false;\n var target = $(e.target);\n if (params.material && target.hasClass('button')) {\n if (params.button && params.button.onClick) params.button.onClick.call(target[0], e, item[0]);\n }\n if (target.is('.close-notification') || $(e.target).parents('.close-notification').length > 0) {\n close = true;\n }\n else {\n if (params.onClick) params.onClick(e, item[0]);\n if (params.closeOnClick) close = true;\n }\n if (close) app.closeNotification(item[0], e);\n });\n if (params.onClose) {\n item.data('f7NotificationOnClose', function (e) {\n params.onClose(item[0], e);\n });\n }\n if (params.additionalClass) {\n item.addClass(params.additionalClass);\n }\n if (params.hold) {\n setTimeout(function () {\n if (item.length > 0) app.closeNotification(item[0]);\n }, params.hold);\n }\n \n if (!app.params.material) {\n app.closeNotification(list.children('li.notification-item:last-child'));\n }\n list.append(item[0]);\n container.show();\n \n var itemHeight = item.outerHeight(), clientLeft;\n if (params.material) {\n container.transform('translate3d(0, '+itemHeight+'px, 0)');\n container.transition(0);\n \n clientLeft = item[0].clientLeft;\n \n container.transform('translate3d(0, 0, 0)');\n container.transition('');\n }\n else {\n item.transform('translate3d(0,' + (-itemHeight) + 'px,0)');\n item.transition(0);\n \n clientLeft = item[0].clientLeft;\n \n item.transition('');\n item.transform('translate3d(0,0px,0)');\n }\n \n container.transform('translate3d(0, 0,0)');\n item.removeClass('notification-hidden');\n \n return item[0];\n };\n app.closeNotification = function (item, event) {\n item = $(item);\n if (item.length === 0) return;\n if (item.hasClass('notification-item-removing')) return;\n var container = $('.notifications');\n \n var itemHeight = item.outerHeight();\n item.css('height', itemHeight + 'px').transition(0).addClass('notification-item-removing');\n var clientLeft = item[0].clientLeft;\n \n item.css({\n height: '0px',\n marginBottom: '0px'\n }).transition('');\n \n if (item.data('f7NotificationOnClose')) item.data('f7NotificationOnClose')(event);\n \n if (container.find('.notification-item:not(.notification-item-removing)').length === 0) {\n container.transform('');\n }\n \n item.addClass('notification-hidden').transitionEnd(function () {\n item.remove();\n if (container.find('.notification-item').length === 0) {\n container.hide();\n }\n });\n };\n"," /*===============================================================================\n ************ Data Table ************\n ===============================================================================*/\n app.initDataTable = function (table) {\n table = $(table);\n var tableHeader = table.find('.data-table-header');\n var tableHeaderSelected = table.find('.data-table-header-selected');\n \n // Handle selected\n function checkSelectedHeader() {\n if (tableHeader.length > 0 && tableHeaderSelected.length > 0) {\n var checkedItems = table.find('tbody .checkbox-cell input:checked').length;\n table[checkedItems > 0 ? 'addClass' : 'removeClass']('data-table-has-checked');\n tableHeaderSelected.find('.data-table-selected-count').text(checkedItems);\n }\n }\n table.on('change', '.checkbox-cell input[type=\"checkbox\"]', function (e) {\n if (e.detail && e.detail._sentByF7DataTable) {\n // Scripted event, don't do anything\n return;\n }\n var input = $(this);\n var checked = input[0].checked;\n if (input.parents('thead').length > 0) {\n table\n .find('tbody tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected')\n .find('input').prop('checked', checked).trigger('change', {_sentByF7DataTable: true});\n }\n else {\n input.parents('tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected');\n if (!checked) {\n table.find('thead .checkbox-cell input[type=\"checkbox\"]').prop('checked', false);\n }\n else {\n // Check for all checked\n if (table.find('tbody .checkbox-cell input[type=\"checkbox\"]:checked').length === table.find('tbody tr').length) {\n table.find('thead .checkbox-cell input[type=\"checkbox\"]').prop('checked', true).trigger('change', {_sentByF7DataTable: true});\n }\n }\n }\n checkSelectedHeader();\n });\n checkSelectedHeader();\n \n // Sortable\n table.find('thead .sortable-cell').on('click', function () {\n var cell = $(this);\n var isActive = cell.hasClass('sortable-active');\n var currentSort;\n if (isActive) {\n currentSort = cell.hasClass('sortable-desc') ? 'desc' : 'asc';\n cell.removeClass('sortable-desc sortable-asc').addClass('sortable-' + (currentSort === 'desc' ? 'asc' : 'desc'));\n }\n else {\n table.find('thead .sortable-active').removeClass('sortable-active');\n cell.addClass('sortable-active');\n }\n });\n \n // Collapsible\n if (table.hasClass('data-table-collapsible')) {\n table.find('tbody td:not(.checkbox-cell)').each(function () {\n var index = $(this).index();\n var collpsibleTitle = $(this).attr('data-collapsible-title');\n if (!collpsibleTitle && collpsibleTitle !== '') {\n $(this).attr('data-collapsible-title', table.find('thead th').eq(index).text());\n }\n });\n }\n };\n app.initPageDataTables = function (pageContainer) {\n pageContainer = $(pageContainer);\n var dataTables = pageContainer.find('.data-table-init');\n if (dataTables.length === 0 && pageContainer.hasClass('data-table-init')) {\n dataTables = pageContainer;\n }\n dataTables.each(function () {\n app.initDataTable(this);\n });\n };\n \n"," /*===========================\n Compile Template7 Templates On App Init\n ===========================*/\n app.initTemplate7Templates = function () {\n if (!window.Template7) return;\n Template7.templates = Template7.templates || app.params.templates || {};\n Template7.data = Template7.data || app.params.template7Data || {};\n Template7.cache = Template7.cache || {};\n \n app.templates = Template7.templates;\n app.template7Data = Template7.data;\n app.template7Cache = Template7.cache;\n \n // Precompile templates on app init\n if (!app.params.precompileTemplates) return;\n $('script[type=\"text/template7\"]').each(function () {\n var id = $(this).attr('id');\n if (!id) return;\n Template7.templates[id] = Template7.compile($(this).html());\n });\n };\n \n"," /*=======================================\n ************ Plugins API ************\n =======================================*/\n var _plugins = [];\n app.initPlugins = function () {\n // Initialize plugins\n for (var plugin in app.plugins) {\n var p = app.plugins[plugin](app, app.params[plugin]);\n if (p) _plugins.push(p);\n }\n };\n // Plugin Hooks\n app.pluginHook = function (hook) {\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].hooks && hook in _plugins[i].hooks) {\n _plugins[i].hooks[hook](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n };\n // Prevented by plugin\n app.pluginPrevent = function (action) {\n var prevent = false;\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].prevents && action in _plugins[i].prevents) {\n if (_plugins[i].prevents[action](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])) prevent = true;\n }\n }\n return prevent;\n };\n // Preprocess content by plugin\n app.pluginProcess = function (process, data) {\n var processed = data;\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].preprocess && process in _plugins[i].preprocess) {\n processed = _plugins[i].preprocess[process](data, arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);\n }\n }\n return processed;\n };\n \n \n"," /*======================================================\n ************ App Init ************\n ======================================================*/\n app.init = function () {\n // Compile Template7 templates on app load\n if (app.initTemplate7Templates) app.initTemplate7Templates();\n \n // Init Plugins\n if (app.initPlugins) app.initPlugins();\n \n // Init Device\n if (app.getDeviceInfo) app.getDeviceInfo();\n \n // Init resize events and calc app sizes\n if (app.initResize) app.initResize();\n \n // Init Panels Breakpoints\n if (app.initPanelsBreakpoints && (app.params.panelLeftBreakpoint || app.params.panelRightBreakpoint)) app.initPanelsBreakpoints();\n \n // Init Click events\n if (app.initFastClicks && app.params.fastClicks) app.initFastClicks();\n if (app.initClickEvents) app.initClickEvents();\n \n // Init each page callbacks\n $('.page:not(.cached)').each(function () {\n app.initPageWithCallback(this);\n });\n \n // Init each navbar callbacks\n $('.navbar:not(.cached)').each(function () {\n app.initNavbarWithCallback(this);\n });\n \n // Init push state\n if (app.initPushState && app.params.pushState) app.initPushState();\n \n // Init Live Swipeouts events\n if (app.initSwipeout && app.params.swipeout) app.initSwipeout();\n \n // Init Live Sortable events\n if (app.initSortable && app.params.sortable) app.initSortable();\n \n // Init Live Swipe Panels\n if (app.initSwipePanels && (app.params.swipePanel || app.params.swipePanelOnlyClose)) app.initSwipePanels();\n \n // Init Material Inputs\n if (app.params.material && app.initMaterialWatchInputs) app.initMaterialWatchInputs();\n \n // Init Material Tabbar\n if (app.params.material) {\n $('.tabbar').each(function (index, el) {\n if ($(el).parents('.page').length === 0) {\n app.initMaterialTabbar(el);\n }\n });\n }\n \n // App Init callback\n if (app.params.onAppInit) app.params.onAppInit();\n \n // Plugin app init hook\n app.pluginHook('appInit');\n };\n if (app.params.init) app.init();\n \n"," //Return instance\n return app;\n };\n \n // Save Dom7\n Framework7.$ = window.Dom7;\n \n"," /*===========================\n Features Support Detection\n ===========================*/\n Framework7.prototype.support = (function () {\n var support = {\n touch: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch),\n passiveListener: (function () {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {}\n return supportsPassive;\n })()\n };\n \n // Export object\n return support;\n })();\n \n"," /*===========================\n Device/OS Detection\n ===========================*/\n Framework7.prototype.device = (function () {\n var device = {};\n var ua = navigator.userAgent;\n var $ = Dom7;\n \n var windows = ua.match(/(Windows Phone);?[\\s\\/]+([\\d.]+)?/);\n var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n \n device.ios = device.android = device.windows = device.iphone = device.ipod = device.ipad = device.androidChrome = false;\n \n // Windows\n if (windows) {\n device.os = 'windows';\n device.osVersion = windows[2];\n device.windows = true;\n }\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.osVersion = android[2];\n device.android = true;\n device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n // iOS\n if (iphone && !ipod) {\n device.osVersion = iphone[2].replace(/_/g, '.');\n device.iphone = true;\n }\n if (ipad) {\n device.osVersion = ipad[2].replace(/_/g, '.');\n device.ipad = true;\n }\n if (ipod) {\n device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n device.iphone = true;\n }\n // iOS 8+ changed UA\n if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {\n if (device.osVersion.split('.')[0] === '10') {\n device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];\n }\n }\n \n // Webview\n device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);\n \n // Minimal UI\n if (device.os && device.os === 'ios') {\n var osVersionArr = device.osVersion.split('.');\n device.minimalUi = !device.webView &&\n (ipod || iphone) &&\n (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) &&\n $('meta[name=\"viewport\"]').length > 0 && $('meta[name=\"viewport\"]').attr('content').indexOf('minimal-ui') >= 0;\n }\n \n // Check for status bar and fullscreen app mode\n var windowWidth = $(window).width();\n var windowHeight = $(window).height();\n \n device.needsStatusBar = function () {\n if (device.webView && (windowWidth * windowHeight === screen.width * screen.height)) {\n return true;\n }\n return false;\n };\n device.statusBar = device.needsStatusBar();\n \n // Classes\n var classNames = [];\n \n // Pixel Ratio\n device.pixelRatio = window.devicePixelRatio || 1;\n classNames.push('pixel-ratio-' + Math.floor(device.pixelRatio));\n if (device.pixelRatio >= 2) {\n classNames.push('retina');\n }\n \n // OS classes\n if (device.os) {\n classNames.push(device.os, device.os + '-' + device.osVersion.split('.')[0], device.os + '-' + device.osVersion.replace(/\\./g, '-'));\n if (device.os === 'ios') {\n var major = parseInt(device.osVersion.split('.')[0], 10);\n for (var i = major - 1; i >= 6; i--) {\n classNames.push('ios-gt-' + i);\n }\n }\n \n }\n // Status bar classes\n if (device.statusBar) {\n classNames.push('with-statusbar-overlay');\n }\n else {\n $('html').removeClass('with-statusbar-overlay');\n }\n \n // Add html classes\n if (classNames.length > 0) $('html').addClass(classNames.join(' '));\n \n // Export object\n return device;\n })();\n \n"," /*===========================\n Plugins prototype\n ===========================*/\n Framework7.prototype.plugins = {};\n \n"," /*===========================\n Swiper\n ===========================*/\n window.Swiper = function (container, params) {\n if (!(this instanceof Swiper)) return new Swiper(container, params);\n \n var defaults = {\n direction: 'horizontal',\n touchEventsTarget: 'container',\n initialSlide: 0,\n speed: 300,\n // autoplay\n autoplay: false,\n autoplayDisableOnInteraction: true,\n autoplayStopOnLast: false,\n // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n iOSEdgeSwipeDetection: false,\n iOSEdgeSwipeThreshold: 20,\n // Free mode\n freeMode: false,\n freeModeMomentum: true,\n freeModeMomentumRatio: 1,\n freeModeMomentumBounce: true,\n freeModeMomentumBounceRatio: 1,\n freeModeMomentumVelocityRatio: 1,\n freeModeSticky: false,\n freeModeMinimumVelocity: 0.02,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n coverflow: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n modifier: 1,\n slideShadows : true\n },\n flip: {\n slideShadows : true,\n limitRotation: true\n },\n cube: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n },\n fade: {\n crossFade: false\n },\n // Parallax\n parallax: false,\n // Zoom\n zoom: false,\n zoomMax: 3,\n zoomMin: 1,\n zoomToggle: true,\n // Scrollbar\n scrollbar: null,\n scrollbarHide: true,\n scrollbarDraggable: false,\n scrollbarSnapOnRelease: false,\n // Keyboard Mousewheel\n keyboardControl: false,\n mousewheelControl: false,\n mousewheelReleaseOnEdges: false,\n mousewheelInvert: false,\n mousewheelForceToAxis: false,\n mousewheelSensitivity: 1,\n mousewheelEventsTarged: 'container',\n // Hash Navigation\n hashnav: false,\n hashnavWatchState: false,\n // History\n history: false,\n // Commong Nav State\n replaceState: false,\n // Breakpoints\n breakpoints: undefined,\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerColumnFill: 'column',\n slidesPerGroup: 1,\n centeredSlides: false,\n slidesOffsetBefore: 0, // in px\n slidesOffsetAfter: 0, // in px\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n onlyExternal: false,\n threshold: 0,\n touchMoveStopPropagation: true,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Pagination\n pagination: null,\n paginationElement: 'span',\n paginationClickable: false,\n paginationHide: false,\n paginationBulletRender: null,\n paginationProgressRender: null,\n paginationFractionRender: null,\n paginationCustomRender: null,\n paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Next/prev buttons\n nextButton: null,\n prevButton: null,\n // Progress\n watchSlidesProgress: false,\n watchSlidesVisibility: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Lazy Loading\n lazyLoading: false,\n lazyLoadingInPrevNext: false,\n lazyLoadingInPrevNextAmount: 1,\n lazyLoadingOnTransitionStart: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n // Control\n control: undefined,\n controlInverse: false,\n controlBy: 'slide', //or 'container'\n normalizeSlideIndex: true,\n // Swiping/no swiping\n allowSwipeToPrev: true,\n allowSwipeToNext: true,\n swipeHandler: null, //'.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-container-', // NEW\n slideClass: 'swiper-slide',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n bulletClass: 'swiper-pagination-bullet',\n bulletActiveClass: 'swiper-pagination-bullet-active',\n buttonDisabledClass: 'swiper-button-disabled',\n paginationCurrentClass: 'swiper-pagination-current',\n paginationTotalClass: 'swiper-pagination-total',\n paginationHiddenClass: 'swiper-pagination-hidden',\n paginationProgressbarClass: 'swiper-pagination-progressbar',\n paginationClickableClass: 'swiper-pagination-clickable', // NEW\n paginationModifierClass: 'swiper-pagination-', // NEW\n lazyLoadingClass: 'swiper-lazy',\n lazyStatusLoadingClass: 'swiper-lazy-loading',\n lazyStatusLoadedClass: 'swiper-lazy-loaded',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n notificationClass: 'swiper-notification',\n preloaderClass: 'preloader',\n zoomContainerClass: 'swiper-zoom-container',\n \n // Observer\n observer: false,\n observeParents: false,\n // Accessibility\n a11y: false,\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n // Callbacks\n runCallbacksOnInit: true\n /*\n Callbacks:\n onInit: function (swiper)\n onDestroy: function (swiper)\n onBeforeResize: function (swiper)\n onAfterResize: function (swiper)\n onClick: function (swiper, e)\n onTap: function (swiper, e)\n onDoubleTap: function (swiper, e)\n onSliderMove: function (swiper, e)\n onSlideChangeStart: function (swiper)\n onSlideChangeEnd: function (swiper)\n onTransitionStart: function (swiper)\n onTransitionEnd: function (swiper)\n onImagesReady: function (swiper)\n onProgress: function (swiper, progress)\n onTouchStart: function (swiper, e)\n onTouchMove: function (swiper, e)\n onTouchMoveOpposite: function (swiper, e)\n onTouchEnd: function (swiper, e)\n onReachBeginning: function (swiper)\n onReachEnd: function (swiper)\n onSetTransition: function (swiper, duration)\n onSetTranslate: function (swiper, translate)\n onAutoplayStart: function (swiper)\n onAutoplayStop: function (swiper),\n onLazyImageLoad: function (swiper, slide, image)\n onLazyImageReady: function (swiper, slide, image)\n onKeyPress: function (swiper, keyCode)\n */\n \n };\n var initialVirtualTranslate = params && params.virtualTranslate;\n \n params = params || {};\n var originalParams = {};\n for (var param in params) {\n if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {\n originalParams[param] = {};\n for (var deepParam in params[param]) {\n originalParams[param][deepParam] = params[param][deepParam];\n }\n }\n else {\n originalParams[param] = params[param];\n }\n }\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n else if (typeof params[def] === 'object') {\n for (var deepDef in defaults[def]) {\n if (typeof params[def][deepDef] === 'undefined') {\n params[def][deepDef] = defaults[def][deepDef];\n }\n }\n }\n }\n \n // Swiper\n var s = this;\n \n // Params\n s.params = params;\n s.originalParams = originalParams;\n \n // Classname\n s.classNames = [];\n /*=========================\n Dom Library and plugins\n ===========================*/\n var $ = $;\n if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){\n $ = Dom7;\n }\n if (typeof $ === 'undefined') {\n if (typeof Dom7 === 'undefined') {\n $ = window.Dom7 || window.Zepto || window.jQuery;\n }\n else {\n $ = Dom7;\n }\n if (!$) return;\n }\n // Export it to Swiper instance\n s.$ = $;\n \n /*=========================\n Breakpoints\n ===========================*/\n s.currentBreakpoint = undefined;\n s.getActiveBreakpoint = function () {\n //Get breakpoint for window width\n if (!s.params.breakpoints) return false;\n var breakpoint = false;\n var points = [], point;\n for ( point in s.params.breakpoints ) {\n if (s.params.breakpoints.hasOwnProperty(point)) {\n points.push(point);\n }\n }\n points.sort(function (a, b) {\n return parseInt(a, 10) > parseInt(b, 10);\n });\n for (var i = 0; i < points.length; i++) {\n point = points[i];\n if (point >= window.innerWidth && !breakpoint) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n };\n s.setBreakpoint = function () {\n //Set breakpoint for window width and update parameters\n var breakpoint = s.getActiveBreakpoint();\n if (breakpoint && s.currentBreakpoint !== breakpoint) {\n var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;\n var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);\n for ( var param in breakPointsParams ) {\n s.params[param] = breakPointsParams[param];\n }\n s.currentBreakpoint = breakpoint;\n if(needsReLoop && s.destroyLoop) {\n s.reLoop(true);\n }\n }\n };\n // Set breakpoint on load\n if (s.params.breakpoints) {\n s.setBreakpoint();\n }\n \n /*=========================\n Preparation - Define Container, Wrapper and Pagination\n ===========================*/\n s.container = $(container);\n if (s.container.length === 0) return;\n if (s.container.length > 1) {\n var swipers = [];\n s.container.each(function () {\n var container = this;\n swipers.push(new Swiper(this, params));\n });\n return swipers;\n }\n \n // Save instance in container HTML Element and in data\n s.container[0].swiper = s;\n s.container.data('swiper', s);\n \n s.classNames.push(s.params.containerModifierClass + s.params.direction);\n \n if (s.params.freeMode) {\n s.classNames.push(s.params.containerModifierClass + 'free-mode');\n }\n if (!s.support.flexbox) {\n s.classNames.push(s.params.containerModifierClass + 'no-flexbox');\n s.params.slidesPerColumn = 1;\n }\n if (s.params.autoHeight) {\n s.classNames.push(s.params.containerModifierClass + 'autoheight');\n }\n // Enable slides progress when required\n if (s.params.parallax || s.params.watchSlidesVisibility) {\n s.params.watchSlidesProgress = true;\n }\n // Max resistance when touchReleaseOnEdges\n if (s.params.touchReleaseOnEdges) {\n s.params.resistanceRatio = 0;\n }\n // Coverflow / 3D\n if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {\n if (s.support.transforms3d) {\n s.params.watchSlidesProgress = true;\n s.classNames.push(s.params.containerModifierClass + '3d');\n }\n else {\n s.params.effect = 'slide';\n }\n }\n if (s.params.effect !== 'slide') {\n s.classNames.push(s.params.containerModifierClass + s.params.effect);\n }\n if (s.params.effect === 'cube') {\n s.params.resistanceRatio = 0;\n s.params.slidesPerView = 1;\n s.params.slidesPerColumn = 1;\n s.params.slidesPerGroup = 1;\n s.params.centeredSlides = false;\n s.params.spaceBetween = 0;\n s.params.virtualTranslate = true;\n }\n if (s.params.effect === 'fade' || s.params.effect === 'flip') {\n s.params.slidesPerView = 1;\n s.params.slidesPerColumn = 1;\n s.params.slidesPerGroup = 1;\n s.params.watchSlidesProgress = true;\n s.params.spaceBetween = 0;\n if (typeof initialVirtualTranslate === 'undefined') {\n s.params.virtualTranslate = true;\n }\n }\n \n // Grab Cursor\n if (s.params.grabCursor && s.support.touch) {\n s.params.grabCursor = false;\n }\n \n // Wrapper\n s.wrapper = s.container.children('.' + s.params.wrapperClass);\n \n // Pagination\n if (s.params.pagination) {\n s.paginationContainer = $(s.params.pagination);\n if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {\n s.paginationContainer = s.container.find(s.params.pagination);\n }\n \n if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {\n s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable');\n }\n else {\n s.params.paginationClickable = false;\n }\n s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType);\n }\n // Next/Prev Buttons\n if (s.params.nextButton || s.params.prevButton) {\n if (s.params.nextButton) {\n s.nextButton = $(s.params.nextButton);\n if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {\n s.nextButton = s.container.find(s.params.nextButton);\n }\n }\n if (s.params.prevButton) {\n s.prevButton = $(s.params.prevButton);\n if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {\n s.prevButton = s.container.find(s.params.prevButton);\n }\n }\n }\n \n // Is Horizontal\n s.isHorizontal = function () {\n return s.params.direction === 'horizontal';\n };\n // s.isH = isH;\n \n // RTL\n s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');\n if (s.rtl) {\n s.classNames.push(s.params.containerModifierClass + 'rtl');\n }\n \n // Wrong RTL support\n if (s.rtl) {\n s.wrongRTL = s.wrapper.css('display') === '-webkit-box';\n }\n \n // Columns\n if (s.params.slidesPerColumn > 1) {\n s.classNames.push(s.params.containerModifierClass + 'multirow');\n }\n \n // Check for Android\n if (s.device.android) {\n s.classNames.push(s.params.containerModifierClass + 'android');\n }\n \n // Add classes\n s.container.addClass(s.classNames.join(' '));\n \n // Translate\n s.translate = 0;\n \n // Progress\n s.progress = 0;\n \n // Velocity\n s.velocity = 0;\n \n /*=========================\n Locks, unlocks\n ===========================*/\n s.lockSwipeToNext = function () {\n s.params.allowSwipeToNext = false;\n if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {\n s.unsetGrabCursor();\n }\n };\n s.lockSwipeToPrev = function () {\n s.params.allowSwipeToPrev = false;\n if (s.params.allowSwipeToNext === false && s.params.grabCursor) {\n s.unsetGrabCursor();\n }\n };\n s.lockSwipes = function () {\n s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;\n if (s.params.grabCursor) s.unsetGrabCursor();\n };\n s.unlockSwipeToNext = function () {\n s.params.allowSwipeToNext = true;\n if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {\n s.setGrabCursor();\n }\n };\n s.unlockSwipeToPrev = function () {\n s.params.allowSwipeToPrev = true;\n if (s.params.allowSwipeToNext === true && s.params.grabCursor) {\n s.setGrabCursor();\n }\n };\n s.unlockSwipes = function () {\n s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;\n if (s.params.grabCursor) s.setGrabCursor();\n };\n \n /*=========================\n Round helper\n ===========================*/\n function round(a) {\n return Math.floor(a);\n }\n /*=========================\n Set grab cursor\n ===========================*/\n s.setGrabCursor = function(moving) {\n s.container[0].style.cursor = 'move';\n s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n s.container[0].style.cursor = moving ? 'grabbing': 'grab';\n };\n s.unsetGrabCursor = function () {\n s.container[0].style.cursor = '';\n };\n if (s.params.grabCursor) {\n s.setGrabCursor();\n }\n /*=========================\n Update on Images Ready\n ===========================*/\n s.imagesToLoad = [];\n s.imagesLoaded = 0;\n \n s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) {\n var image;\n function onReady () {\n if (callback) callback();\n }\n if (!imgElement.complete || !checkForComplete) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n if (sizes) {\n image.sizes = sizes;\n }\n if (srcset) {\n image.srcset = srcset;\n }\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n \n } else {//image already loaded...\n onReady();\n }\n };\n s.preloadImages = function () {\n s.imagesToLoad = s.container.find('img');\n function _onReady() {\n if (typeof s === 'undefined' || s === null || !s) return;\n if (s.imagesLoaded !== undefined) s.imagesLoaded++;\n if (s.imagesLoaded === s.imagesToLoad.length) {\n if (s.params.updateOnImagesReady) s.update();\n s.emit('onImagesReady', s);\n }\n }\n for (var i = 0; i < s.imagesToLoad.length; i++) {\n s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady);\n }\n };\n \n /*=========================\n Autoplay\n ===========================*/\n s.autoplayTimeoutId = undefined;\n s.autoplaying = false;\n s.autoplayPaused = false;\n function autoplay() {\n var autoplayDelay = s.params.autoplay;\n var activeSlide = s.slides.eq(s.activeIndex);\n if (activeSlide.attr('data-swiper-autoplay')) {\n autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay;\n }\n s.autoplayTimeoutId = setTimeout(function () {\n if (s.params.loop) {\n s.fixLoop();\n s._slideNext();\n s.emit('onAutoplay', s);\n }\n else {\n if (!s.isEnd) {\n s._slideNext();\n s.emit('onAutoplay', s);\n }\n else {\n if (!params.autoplayStopOnLast) {\n s._slideTo(0);\n s.emit('onAutoplay', s);\n }\n else {\n s.stopAutoplay();\n }\n }\n }\n }, autoplayDelay);\n }\n s.startAutoplay = function () {\n if (typeof s.autoplayTimeoutId !== 'undefined') return false;\n if (!s.params.autoplay) return false;\n if (s.autoplaying) return false;\n s.autoplaying = true;\n s.emit('onAutoplayStart', s);\n autoplay();\n };\n s.stopAutoplay = function (internal) {\n if (!s.autoplayTimeoutId) return;\n if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n s.autoplaying = false;\n s.autoplayTimeoutId = undefined;\n s.emit('onAutoplayStop', s);\n };\n s.pauseAutoplay = function (speed) {\n if (s.autoplayPaused) return;\n if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n s.autoplayPaused = true;\n if (speed === 0) {\n s.autoplayPaused = false;\n autoplay();\n }\n else {\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.autoplayPaused = false;\n if (!s.autoplaying) {\n s.stopAutoplay();\n }\n else {\n autoplay();\n }\n });\n }\n };\n /*=========================\n Min/Max Translate\n ===========================*/\n s.minTranslate = function () {\n return (-s.snapGrid[0]);\n };\n s.maxTranslate = function () {\n return (-s.snapGrid[s.snapGrid.length - 1]);\n };\n /*=========================\n Slider/slides sizes\n ===========================*/\n s.updateAutoHeight = function () {\n var activeSlides = [];\n var newHeight = 0;\n var i;\n \n // Find slides currently in view\n if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) {\n for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) {\n var index = s.activeIndex + i;\n if(index > s.slides.length) break;\n activeSlides.push(s.slides.eq(index)[0]);\n }\n } else {\n activeSlides.push(s.slides.eq(s.activeIndex)[0]);\n }\n \n // Find new height from heighest slide in view\n for (i = 0; i < activeSlides.length; i++) {\n if (typeof activeSlides[i] !== 'undefined') {\n var height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n \n // Update Height\n if (newHeight) s.wrapper.css('height', newHeight + 'px');\n };\n s.updateContainerSize = function () {\n var width, height;\n if (typeof s.params.width !== 'undefined') {\n width = s.params.width;\n }\n else {\n width = s.container[0].clientWidth;\n }\n if (typeof s.params.height !== 'undefined') {\n height = s.params.height;\n }\n else {\n height = s.container[0].clientHeight;\n }\n if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {\n return;\n }\n \n //Subtract paddings\n width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);\n height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);\n \n // Store values\n s.width = width;\n s.height = height;\n s.size = s.isHorizontal() ? s.width : s.height;\n };\n \n s.updateSlidesSize = function () {\n s.slides = s.wrapper.children('.' + s.params.slideClass);\n s.snapGrid = [];\n s.slidesGrid = [];\n s.slidesSizesGrid = [];\n \n var spaceBetween = s.params.spaceBetween,\n slidePosition = -s.params.slidesOffsetBefore,\n i,\n prevSlideSize = 0,\n index = 0;\n if (typeof s.size === 'undefined') return;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;\n }\n \n s.virtualSize = -spaceBetween;\n // reset margins\n if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});\n else s.slides.css({marginRight: '', marginBottom: ''});\n \n var slidesNumberEvenToRows;\n if (s.params.slidesPerColumn > 1) {\n if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {\n slidesNumberEvenToRows = s.slides.length;\n }\n else {\n slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;\n }\n if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);\n }\n }\n \n // Calc slides\n var slideSize;\n var slidesPerColumn = s.params.slidesPerColumn;\n var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);\n for (i = 0; i < s.slides.length; i++) {\n slideSize = 0;\n var slide = s.slides.eq(i);\n if (s.params.slidesPerColumn > 1) {\n // Set slides order\n var newSlideOrderIndex;\n var column, row;\n if (s.params.slidesPerColumnFill === 'column') {\n column = Math.floor(i / slidesPerColumn);\n row = i - column * slidesPerColumn;\n if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {\n if (++row >= slidesPerColumn) {\n row = 0;\n column++;\n }\n }\n newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;\n slide\n .css({\n '-webkit-box-ordinal-group': newSlideOrderIndex,\n '-moz-box-ordinal-group': newSlideOrderIndex,\n '-ms-flex-order': newSlideOrderIndex,\n '-webkit-order': newSlideOrderIndex,\n 'order': newSlideOrderIndex\n });\n }\n else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n slide\n .css(\n 'margin-' + (s.isHorizontal() ? 'top' : 'left'),\n (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')\n )\n .attr('data-swiper-column', column)\n .attr('data-swiper-row', row);\n \n }\n if (slide.css('display') === 'none') continue;\n if (s.params.slidesPerView === 'auto') {\n slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n if (s.params.roundLengths) slideSize = round(slideSize);\n }\n else {\n slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;\n if (s.params.roundLengths) slideSize = round(slideSize);\n \n if (s.isHorizontal()) {\n s.slides[i].style.width = slideSize + 'px';\n }\n else {\n s.slides[i].style.height = slideSize + 'px';\n }\n }\n s.slides[i].swiperSlideSize = slideSize;\n s.slidesSizesGrid.push(slideSize);\n \n \n if (s.params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n s.slidesGrid.push(slidePosition);\n }\n else {\n if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n s.slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n \n s.virtualSize += slideSize + spaceBetween;\n \n prevSlideSize = slideSize;\n \n index ++;\n }\n s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;\n var newSlidesGrid;\n \n if (\n s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {\n s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n }\n if (!s.support.flexbox || s.params.setWrapperSize) {\n if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n }\n \n if (s.params.slidesPerColumn > 1) {\n s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;\n s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;\n if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n if (s.params.centeredSlides) {\n newSlidesGrid = [];\n for (i = 0; i < s.snapGrid.length; i++) {\n if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);\n }\n s.snapGrid = newSlidesGrid;\n }\n }\n \n // Remove last grid elements depending on width\n if (!s.params.centeredSlides) {\n newSlidesGrid = [];\n for (i = 0; i < s.snapGrid.length; i++) {\n if (s.snapGrid[i] <= s.virtualSize - s.size) {\n newSlidesGrid.push(s.snapGrid[i]);\n }\n }\n s.snapGrid = newSlidesGrid;\n if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {\n s.snapGrid.push(s.virtualSize - s.size);\n }\n }\n if (s.snapGrid.length === 0) s.snapGrid = [0];\n \n if (s.params.spaceBetween !== 0) {\n if (s.isHorizontal()) {\n if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});\n else s.slides.css({marginRight: spaceBetween + 'px'});\n }\n else s.slides.css({marginBottom: spaceBetween + 'px'});\n }\n if (s.params.watchSlidesProgress) {\n s.updateSlidesOffset();\n }\n };\n s.updateSlidesOffset = function () {\n for (var i = 0; i < s.slides.length; i++) {\n s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;\n }\n };\n \n /*=========================\n Dynamic Slides Per View\n ===========================*/\n s.currentSlidesPerView = function () {\n var spv = 1, i, j;\n if (s.params.centeredSlides) {\n var size = s.slides[s.activeIndex].swiperSlideSize;\n var breakLoop;\n for (i = s.activeIndex + 1; i < s.slides.length; i++) {\n if (s.slides[i] && !breakLoop) {\n size += s.slides[i].swiperSlideSize;\n spv ++;\n if (size > s.size) breakLoop = true;\n }\n }\n for (j = s.activeIndex - 1; j >= 0; j--) {\n if (s.slides[j] && !breakLoop) {\n size += s.slides[j].swiperSlideSize;\n spv ++;\n if (size > s.size) breakLoop = true;\n }\n }\n }\n else {\n for (i = s.activeIndex + 1; i < s.slides.length; i++) {\n if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) {\n spv++;\n }\n }\n }\n return spv;\n };\n /*=========================\n Slider/slides progress\n ===========================*/\n s.updateSlidesProgress = function (translate) {\n if (typeof translate === 'undefined') {\n translate = s.translate || 0;\n }\n if (s.slides.length === 0) return;\n if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();\n \n var offsetCenter = -translate;\n if (s.rtl) offsetCenter = translate;\n \n // Visible Slides\n s.slides.removeClass(s.params.slideVisibleClass);\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides[i];\n var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);\n if (s.params.watchSlidesVisibility) {\n var slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n var slideAfter = slideBefore + s.slidesSizesGrid[i];\n var isVisible =\n (slideBefore >= 0 && slideBefore < s.size) ||\n (slideAfter > 0 && slideAfter <= s.size) ||\n (slideBefore <= 0 && slideAfter >= s.size);\n if (isVisible) {\n s.slides.eq(i).addClass(s.params.slideVisibleClass);\n }\n }\n slide.progress = s.rtl ? -slideProgress : slideProgress;\n }\n };\n s.updateProgress = function (translate) {\n if (typeof translate === 'undefined') {\n translate = s.translate || 0;\n }\n var translatesDiff = s.maxTranslate() - s.minTranslate();\n var wasBeginning = s.isBeginning;\n var wasEnd = s.isEnd;\n if (translatesDiff === 0) {\n s.progress = 0;\n s.isBeginning = s.isEnd = true;\n }\n else {\n s.progress = (translate - s.minTranslate()) / (translatesDiff);\n s.isBeginning = s.progress <= 0;\n s.isEnd = s.progress >= 1;\n }\n if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);\n if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);\n \n if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);\n s.emit('onProgress', s, s.progress);\n };\n s.updateActiveIndex = function () {\n var translate = s.rtl ? s.translate : -s.translate;\n var newActiveIndex, i, snapIndex;\n for (i = 0; i < s.slidesGrid.length; i ++) {\n if (typeof s.slidesGrid[i + 1] !== 'undefined') {\n if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {\n newActiveIndex = i;\n }\n else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {\n newActiveIndex = i + 1;\n }\n }\n else {\n if (translate >= s.slidesGrid[i]) {\n newActiveIndex = i;\n }\n }\n }\n // Normalize slideIndex\n if(s.params.normalizeSlideIndex){\n if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;\n }\n // for (i = 0; i < s.slidesGrid.length; i++) {\n // if (- translate >= s.slidesGrid[i]) {\n // newActiveIndex = i;\n // }\n // }\n snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);\n if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;\n \n if (newActiveIndex === s.activeIndex) {\n return;\n }\n s.snapIndex = snapIndex;\n s.previousIndex = s.activeIndex;\n s.activeIndex = newActiveIndex;\n s.updateClasses();\n s.updateRealIndex();\n };\n s.updateRealIndex = function(){\n s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10);\n };\n \n /*=========================\n Classes\n ===========================*/\n s.updateClasses = function () {\n s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass);\n var activeSlide = s.slides.eq(s.activeIndex);\n // Active classes\n activeSlide.addClass(s.params.slideActiveClass);\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + s.realIndex + '\"]').addClass(s.params.slideDuplicateActiveClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + s.realIndex + '\"]').addClass(s.params.slideDuplicateActiveClass);\n }\n }\n // Next Slide\n var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);\n if (s.params.loop && nextSlide.length === 0) {\n nextSlide = s.slides.eq(0);\n nextSlide.addClass(s.params.slideNextClass);\n }\n // Prev Slide\n var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);\n if (s.params.loop && prevSlide.length === 0) {\n prevSlide = s.slides.eq(-1);\n prevSlide.addClass(s.params.slidePrevClass);\n }\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + nextSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicateNextClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + nextSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicateNextClass);\n }\n if (prevSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + prevSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicatePrevClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + prevSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicatePrevClass);\n }\n }\n \n // Pagination\n if (s.paginationContainer && s.paginationContainer.length > 0) {\n // Current/Total\n var current,\n total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n if (s.params.loop) {\n current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);\n if (current > s.slides.length - 1 - s.loopedSlides * 2) {\n current = current - (s.slides.length - s.loopedSlides * 2);\n }\n if (current > total - 1) current = current - total;\n if (current < 0 && s.params.paginationType !== 'bullets') current = total + current;\n }\n else {\n if (typeof s.snapIndex !== 'undefined') {\n current = s.snapIndex;\n }\n else {\n current = s.activeIndex || 0;\n }\n }\n // Types\n if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) {\n s.bullets.removeClass(s.params.bulletActiveClass);\n if (s.paginationContainer.length > 1) {\n s.bullets.each(function () {\n if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass);\n });\n }\n else {\n s.bullets.eq(current).addClass(s.params.bulletActiveClass);\n }\n }\n if (s.params.paginationType === 'fraction') {\n s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1);\n s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total);\n }\n if (s.params.paginationType === 'progress') {\n var scale = (current + 1) / total,\n scaleX = scale,\n scaleY = 1;\n if (!s.isHorizontal()) {\n scaleY = scale;\n scaleX = 1;\n }\n s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed);\n }\n if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {\n s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));\n s.emit('onPaginationRendered', s, s.paginationContainer[0]);\n }\n }\n \n // Next/active buttons\n if (!s.params.loop) {\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n if (s.isBeginning) {\n s.prevButton.addClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);\n }\n else {\n s.prevButton.removeClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);\n }\n }\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n if (s.isEnd) {\n s.nextButton.addClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);\n }\n else {\n s.nextButton.removeClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);\n }\n }\n }\n };\n \n /*=========================\n Pagination\n ===========================*/\n s.updatePagination = function () {\n if (!s.params.pagination) return;\n if (s.paginationContainer && s.paginationContainer.length > 0) {\n var paginationHTML = '';\n if (s.params.paginationType === 'bullets') {\n var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n for (var i = 0; i < numberOfBullets; i++) {\n if (s.params.paginationBulletRender) {\n paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass);\n }\n else {\n paginationHTML += '<' + s.params.paginationElement+' class=\"' + s.params.bulletClass + '\">';\n }\n }\n s.paginationContainer.html(paginationHTML);\n s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);\n if (s.params.paginationClickable && s.params.a11y && s.a11y) {\n s.a11y.initPagination();\n }\n }\n if (s.params.paginationType === 'fraction') {\n if (s.params.paginationFractionRender) {\n paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass);\n }\n else {\n paginationHTML =\n '' +\n ' / ' +\n '';\n }\n s.paginationContainer.html(paginationHTML);\n }\n if (s.params.paginationType === 'progress') {\n if (s.params.paginationProgressRender) {\n paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass);\n }\n else {\n paginationHTML = '';\n }\n s.paginationContainer.html(paginationHTML);\n }\n if (s.params.paginationType !== 'custom') {\n s.emit('onPaginationRendered', s, s.paginationContainer[0]);\n }\n }\n };\n /*=========================\n Common update method\n ===========================*/\n s.update = function (updateTranslate) {\n if (!s) return;\n s.updateContainerSize();\n s.updateSlidesSize();\n s.updateProgress();\n s.updatePagination();\n s.updateClasses();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n }\n var newTranslate;\n function forceSetTranslate() {\n var translate = s.rtl ? -s.translate : s.translate;\n newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n s.setWrapperTranslate(newTranslate);\n s.updateActiveIndex();\n s.updateClasses();\n }\n if (updateTranslate) {\n var translated;\n if (s.controller && s.controller.spline) {\n s.controller.spline = undefined;\n }\n if (s.params.freeMode) {\n forceSetTranslate();\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n }\n else {\n if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n translated = s.slideTo(s.slides.length - 1, 0, false, true);\n }\n else {\n translated = s.slideTo(s.activeIndex, 0, false, true);\n }\n if (!translated) {\n forceSetTranslate();\n }\n }\n }\n else if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n };\n \n /*=========================\n Resize Handler\n ===========================*/\n s.onResize = function (forceUpdatePagination) {\n if (s.params.onBeforeResize) s.params.onBeforeResize(s);\n //Breakpoints\n if (s.params.breakpoints) {\n s.setBreakpoint();\n }\n \n // Disable locks on resize\n var allowSwipeToPrev = s.params.allowSwipeToPrev;\n var allowSwipeToNext = s.params.allowSwipeToNext;\n s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;\n \n s.updateContainerSize();\n s.updateSlidesSize();\n if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n }\n if (s.controller && s.controller.spline) {\n s.controller.spline = undefined;\n }\n var slideChangedBySlideTo = false;\n if (s.params.freeMode) {\n var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n s.setWrapperTranslate(newTranslate);\n s.updateActiveIndex();\n s.updateClasses();\n \n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n }\n else {\n s.updateClasses();\n if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);\n }\n else {\n slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);\n }\n }\n if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {\n s.lazy.load();\n }\n // Return locks after resize\n s.params.allowSwipeToPrev = allowSwipeToPrev;\n s.params.allowSwipeToNext = allowSwipeToNext;\n if (s.params.onAfterResize) s.params.onAfterResize(s);\n };\n \n /*=========================\n Events\n ===========================*/\n \n //Define Touch Events\n s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'};\n if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'};\n else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'};\n s.touchEvents = {\n start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start,\n move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move,\n end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end\n };\n \n \n // WP8 Touch Events Fix\n if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {\n (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);\n }\n \n // Attach/detach events\n s.initEvents = function (detach) {\n var actionDom = detach ? 'off' : 'on';\n var action = detach ? 'removeEventListener' : 'addEventListener';\n var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];\n var target = s.support.touch ? touchEventsTarget : document;\n \n var moveCapture = s.params.nested ? true : false;\n \n //Touch Events\n if (s.browser.ie) {\n touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n target[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n target[action](s.touchEvents.end, s.onTouchEnd, false);\n }\n else {\n if (s.support.touch) {\n var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;\n touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener);\n touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener);\n }\n if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) {\n touchEventsTarget[action]('mousedown', s.onTouchStart, false);\n document[action]('mousemove', s.onTouchMove, moveCapture);\n document[action]('mouseup', s.onTouchEnd, false);\n }\n }\n window[action]('resize', s.onResize);\n \n // Next, Prev, Index\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n s.nextButton[actionDom]('click', s.onClickNext);\n if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);\n }\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n s.prevButton[actionDom]('click', s.onClickPrev);\n if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);\n }\n if (s.params.pagination && s.params.paginationClickable) {\n s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);\n if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);\n }\n \n // Prevent Links Clicks\n if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);\n };\n s.attachEvents = function () {\n s.initEvents();\n };\n s.detachEvents = function () {\n s.initEvents(true);\n };\n \n /*=========================\n Handle Clicks\n ===========================*/\n // Prevent Clicks\n s.allowClick = true;\n s.preventClicks = function (e) {\n if (!s.allowClick) {\n if (s.params.preventClicks) e.preventDefault();\n if (s.params.preventClicksPropagation && s.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n };\n // Clicks\n s.onClickNext = function (e) {\n e.preventDefault();\n if (s.isEnd && !s.params.loop) return;\n s.slideNext();\n };\n s.onClickPrev = function (e) {\n e.preventDefault();\n if (s.isBeginning && !s.params.loop) return;\n s.slidePrev();\n };\n s.onClickIndex = function (e) {\n e.preventDefault();\n var index = $(this).index() * s.params.slidesPerGroup;\n if (s.params.loop) index = index + s.loopedSlides;\n s.slideTo(index);\n };\n \n /*=========================\n Handle Touches\n ===========================*/\n function findElementInEvent(e, selector) {\n var el = $(e.target);\n if (!el.is(selector)) {\n if (typeof selector === 'string') {\n el = el.parents(selector);\n }\n else if (selector.nodeType) {\n var found;\n el.parents().each(function (index, _el) {\n if (_el === selector) found = selector;\n });\n if (!found) return undefined;\n else return selector;\n }\n }\n if (el.length === 0) {\n return undefined;\n }\n return el[0];\n }\n s.updateClickedSlide = function (e) {\n var slide = findElementInEvent(e, '.' + s.params.slideClass);\n var slideFound = false;\n if (slide) {\n for (var i = 0; i < s.slides.length; i++) {\n if (s.slides[i] === slide) slideFound = true;\n }\n }\n \n if (slide && slideFound) {\n s.clickedSlide = slide;\n s.clickedIndex = $(slide).index();\n }\n else {\n s.clickedSlide = undefined;\n s.clickedIndex = undefined;\n return;\n }\n if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {\n var slideToIndex = s.clickedIndex,\n realIndex,\n duplicatedSlides,\n slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView;\n if (s.params.loop) {\n if (s.animating) return;\n realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);\n if (s.params.centeredSlides) {\n if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) {\n s.fixLoop();\n slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();\n setTimeout(function () {\n s.slideTo(slideToIndex);\n }, 0);\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n else {\n if (slideToIndex > s.slides.length - slidesPerView) {\n s.fixLoop();\n slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();\n setTimeout(function () {\n s.slideTo(slideToIndex);\n }, 0);\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n };\n \n var isTouched,\n isMoved,\n allowTouchCallbacks,\n touchStartTime,\n isScrolling,\n currentTranslate,\n startTranslate,\n allowThresholdMove,\n // Form elements to match\n formElements = 'input, select, textarea, button, video',\n // Last click time\n lastClickTime = Date.now(), clickTimeout,\n //Velocities\n velocities = [],\n allowMomentumBounce;\n \n // Animating Flag\n s.animating = false;\n \n // Touches information\n s.touches = {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n };\n \n // Touch handlers\n var isTouchEvent, startMoving;\n s.onTouchStart = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n isTouchEvent = e.type === 'touchstart';\n if (!isTouchEvent && 'which' in e && e.which === 3) return;\n if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {\n s.allowClick = true;\n return;\n }\n if (s.params.swipeHandler) {\n if (!findElementInEvent(e, s.params.swipeHandler)) return;\n }\n \n var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n \n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {\n return;\n }\n \n isTouched = true;\n isMoved = false;\n allowTouchCallbacks = true;\n isScrolling = undefined;\n startMoving = undefined;\n s.touches.startX = startX;\n s.touches.startY = startY;\n touchStartTime = Date.now();\n s.allowClick = true;\n s.updateContainerSize();\n s.swipeDirection = undefined;\n if (s.params.threshold > 0) allowThresholdMove = false;\n if (e.type !== 'touchstart') {\n var preventDefault = true;\n if ($(e.target).is(formElements)) preventDefault = false;\n if (document.activeElement && $(document.activeElement).is(formElements)) {\n document.activeElement.blur();\n }\n if (preventDefault) {\n e.preventDefault();\n }\n }\n s.emit('onTouchStart', s, e);\n };\n \n s.onTouchMove = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n if (isTouchEvent && e.type === 'mousemove') return;\n if (e.preventedByNestedSwiper) {\n s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n return;\n }\n if (s.params.onlyExternal) {\n // isMoved = true;\n s.allowClick = false;\n if (isTouched) {\n s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = Date.now();\n }\n return;\n }\n if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) {\n if (!s.isHorizontal()) {\n // Vertical\n if (\n (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) ||\n (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate())\n ) {\n return;\n }\n }\n else {\n if (\n (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) ||\n (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate())\n ) {\n return;\n }\n }\n }\n if (isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(formElements)) {\n isMoved = true;\n s.allowClick = false;\n return;\n }\n }\n if (allowTouchCallbacks) {\n s.emit('onTouchMove', s, e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n \n s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n \n if (typeof isScrolling === 'undefined') {\n var touchAngle;\n if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) {\n isScrolling = false;\n }\n else {\n touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;\n isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);\n }\n }\n if (isScrolling) {\n s.emit('onTouchMoveOpposite', s, e);\n }\n if (typeof startMoving === 'undefined') {\n if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {\n startMoving = true;\n }\n }\n if (!isTouched) return;\n if (isScrolling) {\n isTouched = false;\n return;\n }\n if (!startMoving) {\n return;\n }\n s.allowClick = false;\n s.emit('onSliderMove', s, e);\n e.preventDefault();\n if (s.params.touchMoveStopPropagation && !s.params.nested) {\n e.stopPropagation();\n }\n \n if (!isMoved) {\n if (params.loop) {\n s.fixLoop();\n }\n startTranslate = s.getWrapperTranslate();\n s.setWrapperTransition(0);\n if (s.animating) {\n s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');\n }\n if (s.params.autoplay && s.autoplaying) {\n if (s.params.autoplayDisableOnInteraction) {\n s.stopAutoplay();\n }\n else {\n s.pauseAutoplay();\n }\n }\n allowMomentumBounce = false;\n //Grab Cursor\n if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {\n s.setGrabCursor(true);\n }\n }\n isMoved = true;\n \n var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n \n diff = diff * s.params.touchRatio;\n if (s.rtl) diff = -diff;\n \n s.swipeDirection = diff > 0 ? 'prev' : 'next';\n currentTranslate = diff + startTranslate;\n \n var disableParentSwiper = true;\n if ((diff > 0 && currentTranslate > s.minTranslate())) {\n disableParentSwiper = false;\n if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);\n }\n else if (diff < 0 && currentTranslate < s.maxTranslate()) {\n disableParentSwiper = false;\n if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);\n }\n \n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n \n // Directions locks\n if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {\n currentTranslate = startTranslate;\n }\n if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {\n currentTranslate = startTranslate;\n }\n \n \n // Threshold\n if (s.params.threshold > 0) {\n if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {\n if (!allowThresholdMove) {\n allowThresholdMove = true;\n s.touches.startX = s.touches.currentX;\n s.touches.startY = s.touches.currentY;\n currentTranslate = startTranslate;\n s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n return;\n }\n }\n else {\n currentTranslate = startTranslate;\n return;\n }\n }\n \n if (!s.params.followFinger) return;\n \n // Update active index in free mode\n if (s.params.freeMode || s.params.watchSlidesProgress) {\n s.updateActiveIndex();\n }\n if (s.params.freeMode) {\n //Velocity\n if (velocities.length === 0) {\n velocities.push({\n position: s.touches[s.isHorizontal() ? 'startX' : 'startY'],\n time: touchStartTime\n });\n }\n velocities.push({\n position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'],\n time: (new window.Date()).getTime()\n });\n }\n // Update progress\n s.updateProgress(currentTranslate);\n // Update translate\n s.setWrapperTranslate(currentTranslate);\n };\n s.onTouchEnd = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n if (allowTouchCallbacks) {\n s.emit('onTouchEnd', s, e);\n }\n allowTouchCallbacks = false;\n if (!isTouched) return;\n //Return Grab Cursor\n if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {\n s.setGrabCursor(false);\n }\n \n // Time diff\n var touchEndTime = Date.now();\n var timeDiff = touchEndTime - touchStartTime;\n \n // Tap, doubleTap, Click\n if (s.allowClick) {\n s.updateClickedSlide(e);\n s.emit('onTap', s, e);\n if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {\n if (clickTimeout) clearTimeout(clickTimeout);\n clickTimeout = setTimeout(function () {\n if (!s) return;\n if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {\n s.paginationContainer.toggleClass(s.params.paginationHiddenClass);\n }\n s.emit('onClick', s, e);\n }, 300);\n \n }\n if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {\n if (clickTimeout) clearTimeout(clickTimeout);\n s.emit('onDoubleTap', s, e);\n }\n }\n \n lastClickTime = Date.now();\n setTimeout(function () {\n if (s) s.allowClick = true;\n }, 0);\n \n if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n \n var currentPos;\n if (s.params.followFinger) {\n currentPos = s.rtl ? s.translate : -s.translate;\n }\n else {\n currentPos = -currentTranslate;\n }\n if (s.params.freeMode) {\n if (currentPos < -s.minTranslate()) {\n s.slideTo(s.activeIndex);\n return;\n }\n else if (currentPos > -s.maxTranslate()) {\n if (s.slides.length < s.snapGrid.length) {\n s.slideTo(s.snapGrid.length - 1);\n }\n else {\n s.slideTo(s.slides.length - 1);\n }\n return;\n }\n \n if (s.params.freeModeMomentum) {\n if (velocities.length > 1) {\n var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();\n \n var distance = lastMoveEvent.position - velocityEvent.position;\n var time = lastMoveEvent.time - velocityEvent.time;\n s.velocity = distance / time;\n s.velocity = s.velocity / 2;\n if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {\n s.velocity = 0;\n }\n // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {\n s.velocity = 0;\n }\n } else {\n s.velocity = 0;\n }\n s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio;\n \n velocities.length = 0;\n var momentumDuration = 1000 * s.params.freeModeMomentumRatio;\n var momentumDistance = s.velocity * momentumDuration;\n \n var newPosition = s.translate + momentumDistance;\n if (s.rtl) newPosition = - newPosition;\n var doBounce = false;\n var afterBouncePosition;\n var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;\n if (newPosition < s.maxTranslate()) {\n if (s.params.freeModeMomentumBounce) {\n if (newPosition + s.maxTranslate() < -bounceAmount) {\n newPosition = s.maxTranslate() - bounceAmount;\n }\n afterBouncePosition = s.maxTranslate();\n doBounce = true;\n allowMomentumBounce = true;\n }\n else {\n newPosition = s.maxTranslate();\n }\n }\n else if (newPosition > s.minTranslate()) {\n if (s.params.freeModeMomentumBounce) {\n if (newPosition - s.minTranslate() > bounceAmount) {\n newPosition = s.minTranslate() + bounceAmount;\n }\n afterBouncePosition = s.minTranslate();\n doBounce = true;\n allowMomentumBounce = true;\n }\n else {\n newPosition = s.minTranslate();\n }\n }\n else if (s.params.freeModeSticky) {\n var j = 0,\n nextSlide;\n for (j = 0; j < s.snapGrid.length; j += 1) {\n if (s.snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n \n }\n if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {\n newPosition = s.snapGrid[nextSlide];\n } else {\n newPosition = s.snapGrid[nextSlide - 1];\n }\n if (!s.rtl) newPosition = - newPosition;\n }\n //Fix duration\n if (s.velocity !== 0) {\n if (s.rtl) {\n momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);\n }\n else {\n momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);\n }\n }\n else if (s.params.freeModeSticky) {\n s.slideReset();\n return;\n }\n \n if (s.params.freeModeMomentumBounce && doBounce) {\n s.updateProgress(afterBouncePosition);\n s.setWrapperTransition(momentumDuration);\n s.setWrapperTranslate(newPosition);\n s.onTransitionStart();\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s || !allowMomentumBounce) return;\n s.emit('onMomentumBounce', s);\n \n s.setWrapperTransition(s.params.speed);\n s.setWrapperTranslate(afterBouncePosition);\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd();\n });\n });\n } else if (s.velocity) {\n s.updateProgress(newPosition);\n s.setWrapperTransition(momentumDuration);\n s.setWrapperTranslate(newPosition);\n s.onTransitionStart();\n if (!s.animating) {\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd();\n });\n }\n \n } else {\n s.updateProgress(newPosition);\n }\n \n s.updateActiveIndex();\n }\n if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {\n s.updateProgress();\n s.updateActiveIndex();\n }\n return;\n }\n \n // Find current slide\n var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];\n for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {\n if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {\n if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {\n stopIndex = i;\n groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];\n }\n }\n else {\n if (currentPos >= s.slidesGrid[i]) {\n stopIndex = i;\n groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];\n }\n }\n }\n \n // Find current slide size\n var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;\n \n if (timeDiff > s.params.longSwipesMs) {\n // Long touches\n if (!s.params.longSwipes) {\n s.slideTo(s.activeIndex);\n return;\n }\n if (s.swipeDirection === 'next') {\n if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);\n else s.slideTo(stopIndex);\n \n }\n if (s.swipeDirection === 'prev') {\n if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);\n else s.slideTo(stopIndex);\n }\n }\n else {\n // Short swipes\n if (!s.params.shortSwipes) {\n s.slideTo(s.activeIndex);\n return;\n }\n if (s.swipeDirection === 'next') {\n s.slideTo(stopIndex + s.params.slidesPerGroup);\n \n }\n if (s.swipeDirection === 'prev') {\n s.slideTo(stopIndex);\n }\n }\n };\n /*=========================\n Transitions\n ===========================*/\n s._slideTo = function (slideIndex, speed) {\n return s.slideTo(slideIndex, speed, true, true);\n };\n s.slideTo = function (slideIndex, speed, runCallbacks, internal) {\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (typeof slideIndex === 'undefined') slideIndex = 0;\n if (slideIndex < 0) slideIndex = 0;\n s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);\n if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;\n \n var translate = - s.snapGrid[s.snapIndex];\n // Stop autoplay\n if (s.params.autoplay && s.autoplaying) {\n if (internal || !s.params.autoplayDisableOnInteraction) {\n s.pauseAutoplay(speed);\n }\n else {\n s.stopAutoplay();\n }\n }\n // Update progress\n s.updateProgress(translate);\n \n // Normalize slideIndex\n if(s.params.normalizeSlideIndex){\n for (var i = 0; i < s.slidesGrid.length; i++) {\n if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {\n slideIndex = i;\n }\n }\n }\n \n // Directions locks\n if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {\n return false;\n }\n if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {\n if ((s.activeIndex || 0) !== slideIndex ) return false;\n }\n \n // Update Index\n if (typeof speed === 'undefined') speed = s.params.speed;\n s.previousIndex = s.activeIndex || 0;\n s.activeIndex = slideIndex;\n s.updateRealIndex();\n if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {\n // Update Height\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n s.updateClasses();\n if (s.params.effect !== 'slide') {\n s.setWrapperTranslate(translate);\n }\n return false;\n }\n s.updateClasses();\n s.onTransitionStart(runCallbacks);\n \n if (speed === 0 || s.browser.lteIE9) {\n s.setWrapperTranslate(translate);\n s.setWrapperTransition(0);\n s.onTransitionEnd(runCallbacks);\n }\n else {\n s.setWrapperTranslate(translate);\n s.setWrapperTransition(speed);\n if (!s.animating) {\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd(runCallbacks);\n });\n }\n \n }\n \n return true;\n };\n \n s.onTransitionStart = function (runCallbacks) {\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n if (s.lazy) s.lazy.onTransitionStart();\n if (runCallbacks) {\n s.emit('onTransitionStart', s);\n if (s.activeIndex !== s.previousIndex) {\n s.emit('onSlideChangeStart', s);\n if (s.activeIndex > s.previousIndex) {\n s.emit('onSlideNextStart', s);\n }\n else {\n s.emit('onSlidePrevStart', s);\n }\n }\n \n }\n };\n s.onTransitionEnd = function (runCallbacks) {\n s.animating = false;\n s.setWrapperTransition(0);\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (s.lazy) s.lazy.onTransitionEnd();\n if (runCallbacks) {\n s.emit('onTransitionEnd', s);\n if (s.activeIndex !== s.previousIndex) {\n s.emit('onSlideChangeEnd', s);\n if (s.activeIndex > s.previousIndex) {\n s.emit('onSlideNextEnd', s);\n }\n else {\n s.emit('onSlidePrevEnd', s);\n }\n }\n }\n if (s.params.history && s.history) {\n s.history.setHistory(s.params.history, s.activeIndex);\n }\n if (s.params.hashnav && s.hashnav) {\n s.hashnav.setHash();\n }\n \n };\n s.slideNext = function (runCallbacks, speed, internal) {\n if (s.params.loop) {\n if (s.animating) return false;\n s.fixLoop();\n var clientLeft = s.container[0].clientLeft;\n return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n }\n else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n };\n s._slideNext = function (speed) {\n return s.slideNext(true, speed, true);\n };\n s.slidePrev = function (runCallbacks, speed, internal) {\n if (s.params.loop) {\n if (s.animating) return false;\n s.fixLoop();\n var clientLeft = s.container[0].clientLeft;\n return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n }\n else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n };\n s._slidePrev = function (speed) {\n return s.slidePrev(true, speed, true);\n };\n s.slideReset = function (runCallbacks, speed, internal) {\n return s.slideTo(s.activeIndex, speed, runCallbacks);\n };\n \n s.disableTouchControl = function () {\n s.params.onlyExternal = true;\n return true;\n };\n s.enableTouchControl = function () {\n s.params.onlyExternal = false;\n return true;\n };\n \n /*=========================\n Translate/transition helpers\n ===========================*/\n s.setWrapperTransition = function (duration, byController) {\n s.wrapper.transition(duration);\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n s.effects[s.params.effect].setTransition(duration);\n }\n if (s.params.parallax && s.parallax) {\n s.parallax.setTransition(duration);\n }\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.setTransition(duration);\n }\n if (s.params.control && s.controller) {\n s.controller.setTransition(duration, byController);\n }\n s.emit('onSetTransition', s, duration);\n };\n s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {\n var x = 0, y = 0, z = 0;\n if (s.isHorizontal()) {\n x = s.rtl ? -translate : translate;\n }\n else {\n y = translate;\n }\n \n if (s.params.roundLengths) {\n x = round(x);\n y = round(y);\n }\n \n if (!s.params.virtualTranslate) {\n if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');\n else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');\n }\n \n s.translate = s.isHorizontal() ? x : y;\n \n // Check if we need to update progress\n var progress;\n var translatesDiff = s.maxTranslate() - s.minTranslate();\n if (translatesDiff === 0) {\n progress = 0;\n }\n else {\n progress = (translate - s.minTranslate()) / (translatesDiff);\n }\n if (progress !== s.progress) {\n s.updateProgress(translate);\n }\n \n if (updateActiveIndex) s.updateActiveIndex();\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n s.effects[s.params.effect].setTranslate(s.translate);\n }\n if (s.params.parallax && s.parallax) {\n s.parallax.setTranslate(s.translate);\n }\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.setTranslate(s.translate);\n }\n if (s.params.control && s.controller) {\n s.controller.setTranslate(s.translate, byController);\n }\n s.emit('onSetTranslate', s, s.translate);\n };\n \n s.getTranslate = function (el, axis) {\n var matrix, curTransform, curStyle, transformMatrix;\n \n // automatic axis detection\n if (typeof axis === 'undefined') {\n axis = 'x';\n }\n \n if (s.params.virtualTranslate) {\n return s.rtl ? -s.translate : s.translate;\n }\n \n curStyle = window.getComputedStyle(el, null);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(function(a){\n return a.replace(',','.');\n }).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n }\n else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n \n if (axis === 'x') {\n //Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix)\n curTransform = transformMatrix.m41;\n //Crazy IE10 Matrix\n else if (matrix.length === 16)\n curTransform = parseFloat(matrix[12]);\n //Normal Browsers\n else\n curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n //Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix)\n curTransform = transformMatrix.m42;\n //Crazy IE10 Matrix\n else if (matrix.length === 16)\n curTransform = parseFloat(matrix[13]);\n //Normal Browsers\n else\n curTransform = parseFloat(matrix[5]);\n }\n if (s.rtl && curTransform) curTransform = -curTransform;\n return curTransform || 0;\n };\n s.getWrapperTranslate = function (axis) {\n if (typeof axis === 'undefined') {\n axis = s.isHorizontal() ? 'x' : 'y';\n }\n return s.getTranslate(s.wrapper[0], axis);\n };\n \n /*=========================\n Observer\n ===========================*/\n s.observers = [];\n function initObserver(target, options) {\n options = options || {};\n // create an observer instance\n var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n var observer = new ObserverFunc(function (mutations) {\n mutations.forEach(function (mutation) {\n s.onResize(true);\n s.emit('onObserverUpdate', s, mutation);\n });\n });\n \n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n \n s.observers.push(observer);\n }\n s.initObservers = function () {\n if (s.params.observeParents) {\n var containerParents = s.container.parents();\n for (var i = 0; i < containerParents.length; i++) {\n initObserver(containerParents[i]);\n }\n }\n \n // Observe container\n initObserver(s.container[0], {childList: false});\n \n // Observe wrapper\n initObserver(s.wrapper[0], {attributes: false});\n };\n s.disconnectObservers = function () {\n for (var i = 0; i < s.observers.length; i++) {\n s.observers[i].disconnect();\n }\n s.observers = [];\n };\n /*=========================\n Loop\n ===========================*/\n // Create looped slides\n s.createLoop = function () {\n // Remove duplicated slides\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n \n var slides = s.wrapper.children('.' + s.params.slideClass);\n \n if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;\n \n s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);\n s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;\n if (s.loopedSlides > slides.length) {\n s.loopedSlides = slides.length;\n }\n \n var prependSlides = [], appendSlides = [], i;\n slides.each(function (index, el) {\n var slide = $(this);\n if (index < s.loopedSlides) appendSlides.push(el);\n if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);\n slide.attr('data-swiper-slide-index', index);\n });\n for (i = 0; i < appendSlides.length; i++) {\n s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n }\n for (i = prependSlides.length - 1; i >= 0; i--) {\n s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n }\n };\n s.destroyLoop = function () {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n s.slides.removeAttr('data-swiper-slide-index');\n };\n s.reLoop = function (updatePosition) {\n var oldIndex = s.activeIndex - s.loopedSlides;\n s.destroyLoop();\n s.createLoop();\n s.updateSlidesSize();\n if (updatePosition) {\n s.slideTo(oldIndex + s.loopedSlides, 0, false);\n }\n \n };\n s.fixLoop = function () {\n var newIndex;\n //Fix For Negative Oversliding\n if (s.activeIndex < s.loopedSlides) {\n newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;\n newIndex = newIndex + s.loopedSlides;\n s.slideTo(newIndex, 0, false, true);\n }\n //Fix For Positive Oversliding\n else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {\n newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;\n newIndex = newIndex + s.loopedSlides;\n s.slideTo(newIndex, 0, false, true);\n }\n };\n /*=========================\n Append/Prepend/Remove Slides\n ===========================*/\n s.appendSlide = function (slides) {\n if (s.params.loop) {\n s.destroyLoop();\n }\n if (typeof slides === 'object' && slides.length) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i]) s.wrapper.append(slides[i]);\n }\n }\n else {\n s.wrapper.append(slides);\n }\n if (s.params.loop) {\n s.createLoop();\n }\n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n };\n s.prependSlide = function (slides) {\n if (s.params.loop) {\n s.destroyLoop();\n }\n var newActiveIndex = s.activeIndex + 1;\n if (typeof slides === 'object' && slides.length) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i]) s.wrapper.prepend(slides[i]);\n }\n newActiveIndex = s.activeIndex + slides.length;\n }\n else {\n s.wrapper.prepend(slides);\n }\n if (s.params.loop) {\n s.createLoop();\n }\n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n s.slideTo(newActiveIndex, 0, false);\n };\n s.removeSlide = function (slidesIndexes) {\n if (s.params.loop) {\n s.destroyLoop();\n s.slides = s.wrapper.children('.' + s.params.slideClass);\n }\n var newActiveIndex = s.activeIndex,\n indexToRemove;\n if (typeof slidesIndexes === 'object' && slidesIndexes.length) {\n for (var i = 0; i < slidesIndexes.length; i++) {\n indexToRemove = slidesIndexes[i];\n if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex--;\n }\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n else {\n indexToRemove = slidesIndexes;\n if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex--;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n \n if (s.params.loop) {\n s.createLoop();\n }\n \n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n if (s.params.loop) {\n s.slideTo(newActiveIndex + s.loopedSlides, 0, false);\n }\n else {\n s.slideTo(newActiveIndex, 0, false);\n }\n \n };\n s.removeAllSlides = function () {\n var slidesIndexes = [];\n for (var i = 0; i < s.slides.length; i++) {\n slidesIndexes.push(i);\n }\n s.removeSlide(slidesIndexes);\n };\n \n \n /*=========================\n Effects\n ===========================*/\n s.effects = {\n fade: {\n setTranslate: function () {\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var offset = slide[0].swiperSlideOffset;\n var tx = -offset;\n if (!s.params.virtualTranslate) tx = tx - s.translate;\n var ty = 0;\n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n var slideOpacity = s.params.fade.crossFade ?\n Math.max(1 - Math.abs(slide[0].progress), 0) :\n 1 + Math.min(Math.max(slide[0].progress, -1), 0);\n slide\n .css({\n opacity: slideOpacity\n })\n .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');\n \n }\n \n },\n setTransition: function (duration) {\n s.slides.transition(duration);\n if (s.params.virtualTranslate && duration !== 0) {\n var eventTriggered = false;\n s.slides.transitionEnd(function () {\n if (eventTriggered) return;\n if (!s) return;\n eventTriggered = true;\n s.animating = false;\n var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n for (var i = 0; i < triggerEvents.length; i++) {\n s.wrapper.trigger(triggerEvents[i]);\n }\n });\n }\n }\n },\n flip: {\n setTranslate: function () {\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var progress = slide[0].progress;\n if (s.params.flip.limitRotation) {\n progress = Math.max(Math.min(slide[0].progress, 1), -1);\n }\n var offset = slide[0].swiperSlideOffset;\n var rotate = -180 * progress,\n rotateY = rotate,\n rotateX = 0,\n tx = -offset,\n ty = 0;\n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n }\n else if (s.rtl) {\n rotateY = -rotateY;\n }\n \n slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;\n \n if (s.params.flip.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n \n slide\n .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');\n }\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n if (s.params.virtualTranslate && duration !== 0) {\n var eventTriggered = false;\n s.slides.eq(s.activeIndex).transitionEnd(function () {\n if (eventTriggered) return;\n if (!s) return;\n if (!$(this).hasClass(s.params.slideActiveClass)) return;\n eventTriggered = true;\n s.animating = false;\n var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n for (var i = 0; i < triggerEvents.length; i++) {\n s.wrapper.trigger(triggerEvents[i]);\n }\n });\n }\n }\n },\n cube: {\n setTranslate: function () {\n var wrapperRotate = 0, cubeShadow;\n if (s.params.cube.shadow) {\n if (s.isHorizontal()) {\n cubeShadow = s.wrapper.find('.swiper-cube-shadow');\n if (cubeShadow.length === 0) {\n cubeShadow = $('
                ');\n s.wrapper.append(cubeShadow);\n }\n cubeShadow.css({height: s.width + 'px'});\n }\n else {\n cubeShadow = s.container.find('.swiper-cube-shadow');\n if (cubeShadow.length === 0) {\n cubeShadow = $('
                ');\n s.container.append(cubeShadow);\n }\n }\n }\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var slideAngle = i * 90;\n var round = Math.floor(slideAngle / 360);\n if (s.rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n var progress = Math.max(Math.min(slide[0].progress, 1), -1);\n var tx = 0, ty = 0, tz = 0;\n if (i % 4 === 0) {\n tx = - round * 4 * s.size;\n tz = 0;\n }\n else if ((i - 1) % 4 === 0) {\n tx = 0;\n tz = - round * 4 * s.size;\n }\n else if ((i - 2) % 4 === 0) {\n tx = s.size + round * 4 * s.size;\n tz = s.size;\n }\n else if ((i - 3) % 4 === 0) {\n tx = - s.size;\n tz = 3 * s.size + s.size * 4 * round;\n }\n if (s.rtl) {\n tx = -tx;\n }\n \n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n \n var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';\n if (progress <= 1 && progress > -1) {\n wrapperRotate = i * 90 + progress * 90;\n if (s.rtl) wrapperRotate = -i * 90 - progress * 90;\n }\n slide.transform(transform);\n if (s.params.cube.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n s.wrapper.css({\n '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n 'transform-origin': '50% 50% -' + (s.size / 2) + 'px'\n });\n \n if (s.params.cube.shadow) {\n if (s.isHorizontal()) {\n cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');\n }\n else {\n var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n var scale1 = s.params.cube.shadowScale,\n scale2 = s.params.cube.shadowScale / multiplier,\n offset = s.params.cube.shadowOffset;\n cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');\n }\n }\n var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;\n s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n if (s.params.cube.shadow && !s.isHorizontal()) {\n s.container.find('.swiper-cube-shadow').transition(duration);\n }\n }\n },\n coverflow: {\n setTranslate: function () {\n var transform = s.translate;\n var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;\n var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;\n var translate = s.params.coverflow.depth;\n //Each slide offset from center\n for (var i = 0, length = s.slides.length; i < length; i++) {\n var slide = s.slides.eq(i);\n var slideSize = s.slidesSizesGrid[i];\n var slideOffset = slide[0].swiperSlideOffset;\n var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;\n \n var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;\n var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;\n // var rotateZ = 0\n var translateZ = -translate * Math.abs(offsetMultiplier);\n \n var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);\n var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;\n \n //Fix for ultra small values\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n \n var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';\n \n slide.transform(slideTransform);\n slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n if (s.params.coverflow.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;\n }\n }\n \n //Set correct perspective for IE10\n if (s.browser.ie) {\n var ws = s.wrapper[0].style;\n ws.perspectiveOrigin = center + 'px 50%';\n }\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n }\n }\n };\n \n \n /*=========================\n Images Lazy Loading\n ===========================*/\n s.lazy = {\n initialImageLoaded: false,\n loadImageInSlide: function (index, loadInDuplicate) {\n if (typeof index === 'undefined') return;\n if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;\n if (s.slides.length === 0) return;\n \n var slide = s.slides.eq(index);\n var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')');\n if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) {\n img = img.add(slide[0]);\n }\n if (img.length === 0) return;\n \n img.each(function () {\n var _img = $(this);\n _img.addClass(s.params.lazyStatusLoadingClass);\n var background = _img.attr('data-background');\n var src = _img.attr('data-src'),\n srcset = _img.attr('data-srcset'),\n sizes = _img.attr('data-sizes');\n s.loadImage(_img[0], (src || background), srcset, sizes, false, function () {\n if (typeof s === 'undefined' || s === null || !s) return;\n if (background) {\n _img.css('background-image', 'url(\"' + background + '\")');\n _img.removeAttr('data-background');\n }\n else {\n if (srcset) {\n _img.attr('srcset', srcset);\n _img.removeAttr('data-srcset');\n }\n if (sizes) {\n _img.attr('sizes', sizes);\n _img.removeAttr('data-sizes');\n }\n if (src) {\n _img.attr('src', src);\n _img.removeAttr('data-src');\n }\n \n }\n \n _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass);\n slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove();\n if (s.params.loop && loadInDuplicate) {\n var slideOriginalIndex = slide.attr('data-swiper-slide-index');\n if (slide.hasClass(s.params.slideDuplicateClass)) {\n var originalSlide = s.wrapper.children('[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')');\n s.lazy.loadImageInSlide(originalSlide.index(), false);\n }\n else {\n var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]');\n s.lazy.loadImageInSlide(duplicatedSlide.index(), false);\n }\n }\n s.emit('onLazyImageReady', s, slide[0], _img[0]);\n });\n \n s.emit('onLazyImageLoad', s, slide[0], _img[0]);\n });\n \n },\n load: function () {\n var i;\n var slidesPerView = s.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true;\n if (s.params.watchSlidesVisibility) {\n s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {\n s.lazy.loadImageInSlide($(this).index());\n });\n }\n else {\n if (slidesPerView > 1) {\n for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n }\n else {\n s.lazy.loadImageInSlide(s.activeIndex);\n }\n }\n if (s.params.lazyLoadingInPrevNext) {\n if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {\n var amount = s.params.lazyLoadingInPrevNextAmount;\n var spv = slidesPerView;\n var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);\n var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);\n // Next Slides\n for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n // Prev Slides\n for (i = minIndex; i < s.activeIndex ; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n }\n else {\n var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);\n if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());\n \n var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);\n if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());\n }\n }\n },\n onTransitionStart: function () {\n if (s.params.lazyLoading) {\n if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {\n s.lazy.load();\n }\n }\n },\n onTransitionEnd: function () {\n if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {\n s.lazy.load();\n }\n }\n };\n \n \n /*=========================\n Scrollbar\n ===========================*/\n s.scrollbar = {\n isTouched: false,\n setDragPosition: function (e) {\n var sb = s.scrollbar;\n var x = 0, y = 0;\n var translate;\n var pointerPosition = s.isHorizontal() ?\n ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :\n ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;\n var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;\n var positionMin = -s.minTranslate() * sb.moveDivider;\n var positionMax = -s.maxTranslate() * sb.moveDivider;\n if (position < positionMin) {\n position = positionMin;\n }\n else if (position > positionMax) {\n position = positionMax;\n }\n position = -position / sb.moveDivider;\n s.updateProgress(position);\n s.setWrapperTranslate(position, true);\n },\n dragStart: function (e) {\n var sb = s.scrollbar;\n sb.isTouched = true;\n e.preventDefault();\n e.stopPropagation();\n \n sb.setDragPosition(e);\n clearTimeout(sb.dragTimeout);\n \n sb.track.transition(0);\n if (s.params.scrollbarHide) {\n sb.track.css('opacity', 1);\n }\n s.wrapper.transition(100);\n sb.drag.transition(100);\n s.emit('onScrollbarDragStart', s);\n },\n dragMove: function (e) {\n var sb = s.scrollbar;\n if (!sb.isTouched) return;\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n sb.setDragPosition(e);\n s.wrapper.transition(0);\n sb.track.transition(0);\n sb.drag.transition(0);\n s.emit('onScrollbarDragMove', s);\n },\n dragEnd: function (e) {\n var sb = s.scrollbar;\n if (!sb.isTouched) return;\n sb.isTouched = false;\n if (s.params.scrollbarHide) {\n clearTimeout(sb.dragTimeout);\n sb.dragTimeout = setTimeout(function () {\n sb.track.css('opacity', 0);\n sb.track.transition(400);\n }, 1000);\n \n }\n s.emit('onScrollbarDragEnd', s);\n if (s.params.scrollbarSnapOnRelease) {\n s.slideReset();\n }\n },\n draggableEvents: (function () {\n if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop;\n else return s.touchEvents;\n })(),\n enableDraggable: function () {\n var sb = s.scrollbar;\n var target = s.support.touch ? sb.track : document;\n $(sb.track).on(sb.draggableEvents.start, sb.dragStart);\n $(target).on(sb.draggableEvents.move, sb.dragMove);\n $(target).on(sb.draggableEvents.end, sb.dragEnd);\n },\n disableDraggable: function () {\n var sb = s.scrollbar;\n var target = s.support.touch ? sb.track : document;\n $(sb.track).off(sb.draggableEvents.start, sb.dragStart);\n $(target).off(sb.draggableEvents.move, sb.dragMove);\n $(target).off(sb.draggableEvents.end, sb.dragEnd);\n },\n set: function () {\n if (!s.params.scrollbar) return;\n var sb = s.scrollbar;\n sb.track = $(s.params.scrollbar);\n if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {\n sb.track = s.container.find(s.params.scrollbar);\n }\n sb.drag = sb.track.find('.swiper-scrollbar-drag');\n if (sb.drag.length === 0) {\n sb.drag = $('
                ');\n sb.track.append(sb.drag);\n }\n sb.drag[0].style.width = '';\n sb.drag[0].style.height = '';\n sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;\n \n sb.divider = s.size / s.virtualSize;\n sb.moveDivider = sb.divider * (sb.trackSize / s.size);\n sb.dragSize = sb.trackSize * sb.divider;\n \n if (s.isHorizontal()) {\n sb.drag[0].style.width = sb.dragSize + 'px';\n }\n else {\n sb.drag[0].style.height = sb.dragSize + 'px';\n }\n \n if (sb.divider >= 1) {\n sb.track[0].style.display = 'none';\n }\n else {\n sb.track[0].style.display = '';\n }\n if (s.params.scrollbarHide) {\n sb.track[0].style.opacity = 0;\n }\n },\n setTranslate: function () {\n if (!s.params.scrollbar) return;\n var diff;\n var sb = s.scrollbar;\n var translate = s.translate || 0;\n var newPos;\n \n var newSize = sb.dragSize;\n newPos = (sb.trackSize - sb.dragSize) * s.progress;\n if (s.rtl && s.isHorizontal()) {\n newPos = -newPos;\n if (newPos > 0) {\n newSize = sb.dragSize - newPos;\n newPos = 0;\n }\n else if (-newPos + sb.dragSize > sb.trackSize) {\n newSize = sb.trackSize + newPos;\n }\n }\n else {\n if (newPos < 0) {\n newSize = sb.dragSize + newPos;\n newPos = 0;\n }\n else if (newPos + sb.dragSize > sb.trackSize) {\n newSize = sb.trackSize - newPos;\n }\n }\n if (s.isHorizontal()) {\n if (s.support.transforms3d) {\n sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');\n }\n else {\n sb.drag.transform('translateX(' + (newPos) + 'px)');\n }\n sb.drag[0].style.width = newSize + 'px';\n }\n else {\n if (s.support.transforms3d) {\n sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');\n }\n else {\n sb.drag.transform('translateY(' + (newPos) + 'px)');\n }\n sb.drag[0].style.height = newSize + 'px';\n }\n if (s.params.scrollbarHide) {\n clearTimeout(sb.timeout);\n sb.track[0].style.opacity = 1;\n sb.timeout = setTimeout(function () {\n sb.track[0].style.opacity = 0;\n sb.track.transition(400);\n }, 1000);\n }\n },\n setTransition: function (duration) {\n if (!s.params.scrollbar) return;\n s.scrollbar.drag.transition(duration);\n }\n };\n \n \n /*=========================\n Controller\n ===========================*/\n s.controller = {\n LinearSpline: function (x, y) {\n var binarySearch = (function() {\n var maxIndex, minIndex, guess;\n return function(array, val) {\n minIndex = -1;\n maxIndex = array.length;\n while (maxIndex - minIndex > 1)\n if (array[guess = maxIndex + minIndex >> 1] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n return maxIndex;\n };\n })();\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1;\n // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n var i1, i3;\n var l = this.x.length;\n \n this.interpolate = function (x2) {\n if (!x2) return 0;\n \n // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1;\n \n // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n },\n //xxx: for now i will just save one spline function to to\n getInterpolateFunction: function(c){\n if(!s.controller.spline) s.controller.spline = s.params.loop ?\n new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :\n new s.controller.LinearSpline(s.snapGrid, c.snapGrid);\n },\n setTranslate: function (translate, byController) {\n var controlled = s.params.control;\n var multiplier, controlledTranslate;\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;\n if (s.params.controlBy === 'slide') {\n s.controller.getInterpolateFunction(c);\n // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n controlledTranslate = -s.controller.spline.interpolate(-translate);\n }\n \n if(!controlledTranslate || s.params.controlBy === 'container'){\n multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());\n controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();\n }\n \n if (s.params.controlInverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n c.updateProgress(controlledTranslate);\n c.setWrapperTranslate(controlledTranslate, false, s);\n c.updateActiveIndex();\n }\n if (Array.isArray(controlled)) {\n for (var i = 0; i < controlled.length; i++) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n }\n else if (controlled instanceof Swiper && byController !== controlled) {\n \n setControlledTranslate(controlled);\n }\n },\n setTransition: function (duration, byController) {\n var controlled = s.params.control;\n var i;\n function setControlledTransition(c) {\n c.setWrapperTransition(duration, s);\n if (duration !== 0) {\n c.onTransitionStart();\n c.wrapper.transitionEnd(function(){\n if (!controlled) return;\n if (c.params.loop && s.params.controlBy === 'slide') {\n c.fixLoop();\n }\n c.onTransitionEnd();\n \n });\n }\n }\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i++) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n }\n else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n };\n \n \n /*=========================\n Parallax\n ===========================*/\n function setParallaxTransform(el, progress) {\n el = $(el);\n var p, pX, pY;\n var rtlFactor = s.rtl ? -1 : 1;\n \n p = el.attr('data-swiper-parallax') || '0';\n pX = el.attr('data-swiper-parallax-x');\n pY = el.attr('data-swiper-parallax-y');\n if (pX || pY) {\n pX = pX || '0';\n pY = pY || '0';\n }\n else {\n if (s.isHorizontal()) {\n pX = p;\n pY = '0';\n }\n else {\n pY = p;\n pX = '0';\n }\n }\n \n if ((pX).indexOf('%') >= 0) {\n pX = parseInt(pX, 10) * progress * rtlFactor + '%';\n }\n else {\n pX = pX * progress * rtlFactor + 'px' ;\n }\n if ((pY).indexOf('%') >= 0) {\n pY = parseInt(pY, 10) * progress + '%';\n }\n else {\n pY = pY * progress + 'px' ;\n }\n \n el.transform('translate3d(' + pX + ', ' + pY + ',0px)');\n }\n s.parallax = {\n setTranslate: function () {\n s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n setParallaxTransform(this, s.progress);\n \n });\n s.slides.each(function () {\n var slide = $(this);\n slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {\n var progress = Math.min(Math.max(slide[0].progress, -1), 1);\n setParallaxTransform(this, progress);\n });\n });\n },\n setTransition: function (duration) {\n if (typeof duration === 'undefined') duration = s.params.speed;\n s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n var el = $(this);\n var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n el.transition(parallaxDuration);\n });\n }\n };\n \n \n /*=========================\n Zoom\n ===========================*/\n s.zoom = {\n // \"Global\" Props\n scale: 1,\n currentScale: 1,\n isScaling: false,\n gesture: {\n slide: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n image: undefined,\n imageWrap: undefined,\n zoomMax: s.params.zoomMax\n },\n image: {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n },\n velocity: {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n },\n // Calc Scale From Multi-touches\n getDistanceBetweenTouches: function (e) {\n if (e.targetTouches.length < 2) return 1;\n var x1 = e.targetTouches[0].pageX,\n y1 = e.targetTouches[0].pageY,\n x2 = e.targetTouches[1].pageX,\n y2 = e.targetTouches[1].pageY;\n var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return distance;\n },\n // Events\n onGestureStart: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n z.gesture.scaleStart = z.getDistanceBetweenTouches(e);\n }\n if (!z.gesture.slide || !z.gesture.slide.length) {\n z.gesture.slide = $(this);\n if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex);\n z.gesture.image = z.gesture.slide.find('img, svg, canvas');\n z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);\n z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ;\n if (z.gesture.imageWrap.length === 0) {\n z.gesture.image = undefined;\n return;\n }\n }\n z.gesture.image.transition(0);\n z.isScaling = true;\n },\n onGestureChange: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n z.gesture.scaleMove = z.getDistanceBetweenTouches(e);\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (s.support.gestures) {\n z.scale = e.scale * z.currentScale;\n }\n else {\n z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale;\n }\n if (z.scale > z.gesture.zoomMax) {\n z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5);\n }\n if (z.scale < s.params.zoomMin) {\n z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5);\n }\n z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')');\n },\n onGestureEnd: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) {\n return;\n }\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin);\n z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')');\n z.currentScale = z.scale;\n z.isScaling = false;\n if (z.scale === 1) z.gesture.slide = undefined;\n },\n onTouchStart: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (z.image.isTouched) return;\n if (s.device.os === 'android') e.preventDefault();\n z.image.isTouched = true;\n z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n },\n onTouchMove: function (e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n s.allowClick = false;\n if (!z.image.isTouched || !z.gesture.slide) return;\n \n if (!z.image.isMoved) {\n z.image.width = z.gesture.image[0].offsetWidth;\n z.image.height = z.gesture.image[0].offsetHeight;\n z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0;\n z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0;\n z.gesture.slideWidth = z.gesture.slide[0].offsetWidth;\n z.gesture.slideHeight = z.gesture.slide[0].offsetHeight;\n z.gesture.imageWrap.transition(0);\n if (s.rtl) z.image.startX = -z.image.startX;\n if (s.rtl) z.image.startY = -z.image.startY;\n }\n // Define if we need image drag\n var scaledWidth = z.image.width * z.scale;\n var scaledHeight = z.image.height * z.scale;\n \n if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return;\n \n z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);\n z.image.maxX = -z.image.minX;\n z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);\n z.image.maxY = -z.image.minY;\n \n z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n \n if (!z.image.isMoved && !z.isScaling) {\n if (s.isHorizontal() &&\n (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) ||\n (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x)\n ) {\n z.image.isTouched = false;\n return;\n }\n else if (!s.isHorizontal() &&\n (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) ||\n (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y)\n ) {\n z.image.isTouched = false;\n return;\n }\n }\n e.preventDefault();\n e.stopPropagation();\n \n z.image.isMoved = true;\n z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX;\n z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY;\n \n if (z.image.currentX < z.image.minX) {\n z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8);\n }\n if (z.image.currentX > z.image.maxX) {\n z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8);\n }\n \n if (z.image.currentY < z.image.minY) {\n z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8);\n }\n if (z.image.currentY > z.image.maxY) {\n z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8);\n }\n \n //Velocity\n if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x;\n if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y;\n if (!z.velocity.prevTime) z.velocity.prevTime = Date.now();\n z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2;\n z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2;\n if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0;\n if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0;\n z.velocity.prevPositionX = z.image.touchesCurrent.x;\n z.velocity.prevPositionY = z.image.touchesCurrent.y;\n z.velocity.prevTime = Date.now();\n \n z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');\n },\n onTouchEnd: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (!z.image.isTouched || !z.image.isMoved) {\n z.image.isTouched = false;\n z.image.isMoved = false;\n return;\n }\n z.image.isTouched = false;\n z.image.isMoved = false;\n var momentumDurationX = 300;\n var momentumDurationY = 300;\n var momentumDistanceX = z.velocity.x * momentumDurationX;\n var newPositionX = z.image.currentX + momentumDistanceX;\n var momentumDistanceY = z.velocity.y * momentumDurationY;\n var newPositionY = z.image.currentY + momentumDistanceY;\n \n //Fix duration\n if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x);\n if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y);\n var momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n \n z.image.currentX = newPositionX;\n z.image.currentY = newPositionY;\n \n // Define if we need image drag\n var scaledWidth = z.image.width * z.scale;\n var scaledHeight = z.image.height * z.scale;\n z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);\n z.image.maxX = -z.image.minX;\n z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);\n z.image.maxY = -z.image.minY;\n z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX);\n z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY);\n \n z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');\n },\n onTransitionEnd: function (s) {\n var z = s.zoom;\n if (z.gesture.slide && s.previousIndex !== s.activeIndex) {\n z.gesture.image.transform('translate3d(0,0,0) scale(1)');\n z.gesture.imageWrap.transform('translate3d(0,0,0)');\n z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined;\n z.scale = z.currentScale = 1;\n }\n },\n // Toggle Zoom\n toggleZoom: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.slide) {\n z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex);\n z.gesture.image = z.gesture.slide.find('img, svg, canvas');\n z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n \n var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight;\n \n if (typeof z.image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n }\n else {\n touchX = z.image.touchesStart.x;\n touchY = z.image.touchesStart.y;\n }\n \n if (z.scale && z.scale !== 1) {\n // Zoom Out\n z.scale = z.currentScale = 1;\n z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)');\n z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)');\n z.gesture.slide = undefined;\n }\n else {\n // Zoom In\n z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax;\n if (e) {\n slideWidth = z.gesture.slide[0].offsetWidth;\n slideHeight = z.gesture.slide[0].offsetHeight;\n offsetX = z.gesture.slide.offset().left;\n offsetY = z.gesture.slide.offset().top;\n diffX = offsetX + slideWidth/2 - touchX;\n diffY = offsetY + slideHeight/2 - touchY;\n \n imageWidth = z.gesture.image[0].offsetWidth;\n imageHeight = z.gesture.image[0].offsetHeight;\n scaledWidth = imageWidth * z.scale;\n scaledHeight = imageHeight * z.scale;\n \n translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0);\n translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n \n translateX = diffX * z.scale;\n translateY = diffY * z.scale;\n \n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n \n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n }\n else {\n translateX = 0;\n translateY = 0;\n }\n z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)');\n z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')');\n }\n },\n // Attach/Detach Events\n attachEvents: function (detach) {\n var action = detach ? 'off' : 'on';\n \n if (s.params.zoom) {\n var target = s.slides;\n var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;\n // Scale image\n if (s.support.gestures) {\n s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener);\n s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener);\n s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener);\n }\n else if (s.touchEvents.start === 'touchstart') {\n s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener);\n s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener);\n s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener);\n }\n \n // Move image\n s[action]('touchStart', s.zoom.onTouchStart);\n s.slides.each(function (index, slide){\n if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) {\n $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove);\n }\n });\n s[action]('touchEnd', s.zoom.onTouchEnd);\n \n // Scale Out\n s[action]('transitionEnd', s.zoom.onTransitionEnd);\n if (s.params.zoomToggle) {\n s.on('doubleTap', s.zoom.toggleZoom);\n }\n }\n },\n init: function () {\n s.zoom.attachEvents();\n },\n destroy: function () {\n s.zoom.attachEvents(true);\n }\n };\n \n \n /*=========================\n Plugins API. Collect all and init all plugins\n ===========================*/\n s._plugins = [];\n for (var plugin in s.plugins) {\n var p = s.plugins[plugin](s, s.params[plugin]);\n if (p) s._plugins.push(p);\n }\n // Method to call all plugins event/method\n s.callPlugins = function (eventName) {\n for (var i = 0; i < s._plugins.length; i++) {\n if (eventName in s._plugins[i]) {\n s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n };\n \n \n /*=========================\n Events/Callbacks/Plugins Emitter\n ===========================*/\n function normalizeEventName (eventName) {\n if (eventName.indexOf('on') !== 0) {\n if (eventName[0] !== eventName[0].toUpperCase()) {\n eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);\n }\n else {\n eventName = 'on' + eventName;\n }\n }\n return eventName;\n }\n s.emitterEventListeners = {\n \n };\n s.emit = function (eventName) {\n // Trigger callbacks\n if (s.params[eventName]) {\n s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n var i;\n // Trigger events\n if (s.emitterEventListeners[eventName]) {\n for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n // Trigger plugins\n if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n };\n s.on = function (eventName, handler) {\n eventName = normalizeEventName(eventName);\n if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];\n s.emitterEventListeners[eventName].push(handler);\n return s;\n };\n s.off = function (eventName, handler) {\n var i;\n eventName = normalizeEventName(eventName);\n if (typeof handler === 'undefined') {\n // Remove all handlers for such event\n s.emitterEventListeners[eventName] = [];\n return s;\n }\n if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;\n for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);\n }\n return s;\n };\n s.once = function (eventName, handler) {\n eventName = normalizeEventName(eventName);\n var _handler = function () {\n handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);\n s.off(eventName, _handler);\n };\n s.on(eventName, _handler);\n return s;\n };\n \n \n // Accessibility tools\n s.a11y = {\n makeFocusable: function ($el) {\n $el.attr('tabIndex', '0');\n return $el;\n },\n addRole: function ($el, role) {\n $el.attr('role', role);\n return $el;\n },\n \n addLabel: function ($el, label) {\n $el.attr('aria-label', label);\n return $el;\n },\n \n disable: function ($el) {\n $el.attr('aria-disabled', true);\n return $el;\n },\n \n enable: function ($el) {\n $el.attr('aria-disabled', false);\n return $el;\n },\n \n onEnterKey: function (event) {\n if (event.keyCode !== 13) return;\n if ($(event.target).is(s.params.nextButton)) {\n s.onClickNext(event);\n if (s.isEnd) {\n s.a11y.notify(s.params.lastSlideMessage);\n }\n else {\n s.a11y.notify(s.params.nextSlideMessage);\n }\n }\n else if ($(event.target).is(s.params.prevButton)) {\n s.onClickPrev(event);\n if (s.isBeginning) {\n s.a11y.notify(s.params.firstSlideMessage);\n }\n else {\n s.a11y.notify(s.params.prevSlideMessage);\n }\n }\n if ($(event.target).is('.' + s.params.bulletClass)) {\n $(event.target)[0].click();\n }\n },\n \n liveRegion: $(''),\n \n notify: function (message) {\n var notification = s.a11y.liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n },\n init: function () {\n // Setup accessibility\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n s.a11y.makeFocusable(s.nextButton);\n s.a11y.addRole(s.nextButton, 'button');\n s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);\n }\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n s.a11y.makeFocusable(s.prevButton);\n s.a11y.addRole(s.prevButton, 'button');\n s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);\n }\n \n $(s.container).append(s.a11y.liveRegion);\n },\n initPagination: function () {\n if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {\n s.bullets.each(function () {\n var bullet = $(this);\n s.a11y.makeFocusable(bullet);\n s.a11y.addRole(bullet, 'button');\n s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));\n });\n }\n },\n destroy: function () {\n if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();\n }\n };\n \n \n /*=========================\n Init/Destroy\n ===========================*/\n s.init = function () {\n if (s.params.loop) s.createLoop();\n s.updateContainerSize();\n s.updateSlidesSize();\n s.updatePagination();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n if (s.params.scrollbarDraggable) {\n s.scrollbar.enableDraggable();\n }\n }\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n if (!s.params.loop) s.updateProgress();\n s.effects[s.params.effect].setTranslate();\n }\n if (s.params.loop) {\n s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);\n }\n else {\n s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);\n if (s.params.initialSlide === 0) {\n if (s.parallax && s.params.parallax) s.parallax.setTranslate();\n if (s.lazy && s.params.lazyLoading) {\n s.lazy.load();\n s.lazy.initialImageLoaded = true;\n }\n }\n }\n s.attachEvents();\n if (s.params.observer && s.support.observer) {\n s.initObservers();\n }\n if (s.params.preloadImages && !s.params.lazyLoading) {\n s.preloadImages();\n }\n if (s.params.zoom && s.zoom) {\n s.zoom.init();\n }\n if (s.params.autoplay) {\n s.startAutoplay();\n }\n if (s.params.keyboardControl) {\n if (s.enableKeyboardControl) s.enableKeyboardControl();\n }\n if (s.params.mousewheelControl) {\n if (s.enableMousewheelControl) s.enableMousewheelControl();\n }\n // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history\n if (s.params.hashnavReplaceState) {\n s.params.replaceState = s.params.hashnavReplaceState;\n }\n if (s.params.history) {\n if (s.history) s.history.init();\n }\n if (s.params.hashnav) {\n if (s.hashnav) s.hashnav.init();\n }\n if (s.params.a11y && s.a11y) s.a11y.init();\n s.emit('onInit', s);\n };\n \n // Cleanup dynamic styles\n s.cleanupStyles = function () {\n // Container\n s.container.removeClass(s.classNames.join(' ')).removeAttr('style');\n \n // Wrapper\n s.wrapper.removeAttr('style');\n \n // Slides\n if (s.slides && s.slides.length) {\n s.slides\n .removeClass([\n s.params.slideVisibleClass,\n s.params.slideActiveClass,\n s.params.slideNextClass,\n s.params.slidePrevClass\n ].join(' '))\n .removeAttr('style')\n .removeAttr('data-swiper-column')\n .removeAttr('data-swiper-row');\n }\n \n // Pagination/Bullets\n if (s.paginationContainer && s.paginationContainer.length) {\n s.paginationContainer.removeClass(s.params.paginationHiddenClass);\n }\n if (s.bullets && s.bullets.length) {\n s.bullets.removeClass(s.params.bulletActiveClass);\n }\n \n // Buttons\n if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n \n // Scrollbar\n if (s.params.scrollbar && s.scrollbar) {\n if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');\n if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');\n }\n };\n \n // Destroy\n s.destroy = function (deleteInstance, cleanupStyles) {\n // Detach evebts\n s.detachEvents();\n // Stop autoplay\n s.stopAutoplay();\n // Disable draggable\n if (s.params.scrollbar && s.scrollbar) {\n if (s.params.scrollbarDraggable) {\n s.scrollbar.disableDraggable();\n }\n }\n // Destroy loop\n if (s.params.loop) {\n s.destroyLoop();\n }\n // Cleanup styles\n if (cleanupStyles) {\n s.cleanupStyles();\n }\n // Disconnect observer\n s.disconnectObservers();\n \n // Destroy zoom\n if (s.params.zoom && s.zoom) {\n s.zoom.destroy();\n }\n // Disable keyboard/mousewheel\n if (s.params.keyboardControl) {\n if (s.disableKeyboardControl) s.disableKeyboardControl();\n }\n if (s.params.mousewheelControl) {\n if (s.disableMousewheelControl) s.disableMousewheelControl();\n }\n // Disable a11y\n if (s.params.a11y && s.a11y) s.a11y.destroy();\n // Delete history popstate\n if (s.params.history && !s.params.replaceState) {\n window.removeEventListener('popstate', s.history.setHistoryPopState);\n }\n if (s.params.hashnav && s.hashnav) {\n s.hashnav.destroy();\n }\n // Destroy callback\n s.emit('onDestroy');\n // Delete instance\n if (deleteInstance !== false) s = null;\n };\n \n s.init();\n \n \n \n // Return swiper instance\n return s;\n };\n \n /*==================================================\n Prototype\n ====================================================*/\n Swiper.prototype = {\n isSafari: (function () {\n var ua = window.navigator.userAgent.toLowerCase();\n return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);\n })(),\n isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),\n isArray: function (arr) {\n return Object.prototype.toString.apply(arr) === '[object Array]';\n },\n /*==================================================\n Browser\n ====================================================*/\n browser: {\n ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,\n ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1),\n lteIE9: (function() {\n // create temporary DIV\n var div = document.createElement('div');\n // add content to tmp DIV which is wrapped into the IE HTML conditional statement\n div.innerHTML = '';\n // return true / false value based on what will browser render\n return div.getElementsByTagName('i').length === 1;\n })()\n },\n /*==================================================\n Devices\n ====================================================*/\n device: (function () {\n var ua = window.navigator.userAgent;\n var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n return {\n ios: ipad || iphone || ipod,\n android: android\n };\n })(),\n /*==================================================\n Feature Detection\n ====================================================*/\n support: {\n touch : (window.Modernizr && Modernizr.touch === true) || (function () {\n return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);\n })(),\n \n transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {\n var div = document.createElement('div').style;\n return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);\n })(),\n \n flexbox: (function () {\n var div = document.createElement('div').style;\n var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');\n for (var i = 0; i < styles.length; i++) {\n if (styles[i] in div) return true;\n }\n })(),\n \n observer: (function () {\n return ('MutationObserver' in window || 'WebkitMutationObserver' in window);\n })(),\n \n passiveListener: (function () {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {}\n return supportsPassive;\n })(),\n \n gestures: (function () {\n return 'ongesturestart' in window;\n })()\n },\n /*==================================================\n Plugins\n ====================================================*/\n plugins: {}\n };\n \n","})();\n"]}