{ "version": 3, "file": "simply-framework.js", "sources": [ "src/simply-framework/js/plugins-and-libraries/uuid.js", "src/simply-framework/js/plugins-and-libraries/jquery.transit.min.js", "src/simply-framework/js/plugins-and-libraries/tooltipster/tooltipster.bundle.min.js", "src/simply-framework/js/plugins-and-libraries/jquery-deparam.js", "src/simply-framework/js/plugins-and-libraries/jquery.scrollTo.min.js", "src/simply-framework/js/plugins-and-libraries/jquery.alterclass.js", "src/simply-framework/js/plugins-and-libraries/jquery.event.move.js", "node_modules/validator/validator.js", "src/simply-framework/js/general-framework/basic-jquery-wrappers.js", "src/simply-framework/js/general-framework/fallback-localstorage-clear.js", "src/simply-framework/js/utilities/transitions-functions-wrapper.js", "src/simply-framework/js/general-framework/initial-preloading.js", "src/simply-framework/js/utilities/semantic-shortcuts.js", "src/simply-framework/js/general-framework/state-manager.js", "src/simply-framework/js/general-framework/state-manager-array-operations.js", "src/simply-framework/js/general-framework/data-binding-and-data-lists.js", "src/simply-framework/js/general-framework/showing-or-hiding-based-on-state.js", "src/simply-framework/js/utilities/event-binding-utilities.js", "src/simply-framework/js/utilities/utility-functions.js", "src/simply-framework/js/general-framework/reactiveLocalStorageValidation.js", "src/simply-framework/js/utilities/collapsible-sections.js", "src/simply-framework/js/utilities/showWithSlide.js", "src/simply-framework/js/components/tooltipster-for-webflow.js", "src/simply-framework/js/components/select-dropdowns.js", "src/simply-framework/js/components/hamburger-menu.js", "src/simply-framework/js/components/modals.js", "src/simply-framework/js/components/flashing-notifications.js", "src/simply-framework/js/components/tabs.js", "src/simply-framework/js/components/forms.js", "src/simply-framework/js/components/radio-buttons.js", "src/simply-framework/js/components/text-input-fields.js", "src/simply-framework/js/components/checkboxes.js", "src/simply-framework/js/components/slider.js", "src/simply-framework/js/components/stars.js", "src/simply-framework/js/components/buttons-with-spinner.js", "src/simply-framework/js/components/dropdown-menus.js", "src/simply-framework/js/components/toggle-switch.js", "src/simply-framework/js/components/form-sections-with-add-another-field.js", "src/simply-framework/js/components/file-input.js", "src/simply-framework/js/interaction-elements/on-click-set-state.js", "src/simply-framework/js/interaction-elements/text-input-binded-to-state.js", "src/simply-framework/js/interaction-elements/add-class-when.js", "src/simply-framework/js/interaction-elements/is-shown-when.js", "src/simply-framework/js/interaction-elements/on-pageload-set-default.js", "src/simply-framework/js/interaction-elements/on-pageload-set-value.js", "src/simply-framework/js/interaction-elements/on-click-go-back.js", "src/simply-framework/js/interaction-elements/tooltip.js", "src/simply-framework/js/interaction-elements/attribute-of-parent.js" ], "names": [], "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;;ACAA;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;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrsDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;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;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", "sourcesContent": [ "/*\nCopyright (c) 2010 Aaron BLohowiak\nDual licensed under the MIT and GPL licenses.\n*/\n\nvar BASE64URICHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split('');\n\nvar newId = function(len, radix) {\n\tvar chars = BASE64URICHARS, newId = [], i=0;\n\tradix = radix || chars.length;\n\tlen = len || 22;\n\n\tfor (i = 0; i < len; i++) newId[i] = chars[0 | Math.random()*radix];\n\n\treturn newId.join('');\n};", "(function(t,e){if(typeof define===\"function\"&&define.amd){define([\"jquery\"],e)}else if(typeof exports===\"object\"){module.exports=e(require(\"jquery\"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:\"0.9.12\",propertyMap:{marginLeft:\"margin\",marginRight:\"margin\",marginBottom:\"margin\",marginTop:\"margin\",paddingLeft:\"padding\",paddingRight:\"padding\",paddingBottom:\"padding\",paddingTop:\"padding\"},enabled:true,useTransitionEnd:false};var e=document.createElement(\"div\");var n={};function i(t){if(t in e.style)return t;var n=[\"Moz\",\"Webkit\",\"O\",\"ms\"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r-1;n.transition=i(\"transition\");n.transitionDelay=i(\"transitionDelay\");n.transform=i(\"transform\");n.transformOrigin=i(\"transformOrigin\");n.filter=i(\"Filter\");n.transform3d=r();var a={transition:\"transitionend\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd\",WebkitTransition:\"webkitTransitionEnd\",msTransition:\"MSTransitionEnd\"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]===\"undefined\"){t.support[u]=n[u]}}e=null;t.cssEase={_default:\"ease\",\"in\":\"ease-in\",out:\"ease-out\",\"in-out\":\"ease-in-out\",snap:\"cubic-bezier(0,1,.5,1)\",easeInCubic:\"cubic-bezier(.550,.055,.675,.190)\",easeOutCubic:\"cubic-bezier(.215,.61,.355,1)\",easeInOutCubic:\"cubic-bezier(.645,.045,.355,1)\",easeInCirc:\"cubic-bezier(.6,.04,.98,.335)\",easeOutCirc:\"cubic-bezier(.075,.82,.165,1)\",easeInOutCirc:\"cubic-bezier(.785,.135,.15,.86)\",easeInExpo:\"cubic-bezier(.95,.05,.795,.035)\",easeOutExpo:\"cubic-bezier(.19,1,.22,1)\",easeInOutExpo:\"cubic-bezier(1,0,0,1)\",easeInQuad:\"cubic-bezier(.55,.085,.68,.53)\",easeOutQuad:\"cubic-bezier(.25,.46,.45,.94)\",easeInOutQuad:\"cubic-bezier(.455,.03,.515,.955)\",easeInQuart:\"cubic-bezier(.895,.03,.685,.22)\",easeOutQuart:\"cubic-bezier(.165,.84,.44,1)\",easeInOutQuart:\"cubic-bezier(.77,0,.175,1)\",easeInQuint:\"cubic-bezier(.755,.05,.855,.06)\",easeOutQuint:\"cubic-bezier(.23,1,.32,1)\",easeInOutQuint:\"cubic-bezier(.86,0,.07,1)\",easeInSine:\"cubic-bezier(.47,0,.745,.715)\",easeOutSine:\"cubic-bezier(.39,.575,.565,1)\",easeInOutSine:\"cubic-bezier(.445,.05,.55,.95)\",easeInBack:\"cubic-bezier(.6,-.28,.735,.045)\",easeOutBack:\"cubic-bezier(.175, .885,.32,1.275)\",easeInOutBack:\"cubic-bezier(.68,-.55,.265,1.55)\"};t.cssHooks[\"transit:transform\"]={get:function(e){return t(e).data(\"transform\")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform===\"WebkitTransform\"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data(\"transform\",r)}};t.cssHooks.transform={set:t.cssHooks[\"transit:transform\"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<\"1.8\"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p(\"scale\");p(\"scaleX\");p(\"scaleY\");p(\"translate\");p(\"rotate\");p(\"rotateX\");p(\"rotateY\");p(\"rotate3d\");p(\"perspective\");p(\"skewX\");p(\"skewY\");p(\"x\",true);p(\"y\",true);function f(t){if(typeof t===\"string\"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e===\"string\"?e.split(\",\"):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(\",\")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,\"deg\")},rotateX:function(t){this.rotateX=b(t,\"deg\")},rotateY:function(t){this.rotateY=b(t,\"deg\")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+\",\"+e},skewX:function(t){this.skewX=b(t,\"deg\")},skewY:function(t){this.skewY=b(t,\"deg\")},perspective:function(t){this.perspective=b(t,\"px\")},x:function(t){this.set(\"translate\",t,null)},y:function(t){this.set(\"translate\",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,\"px\")}if(e!==null&&e!==undefined){this._translateY=b(e,\"px\")}this.translate=this._translateX+\",\"+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||\"1,1\").split(\",\");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||\"0,0,0,0deg\").split(\",\");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],\"deg\")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\\((.*?)\\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i===\"rotateX\"||i===\"rotateY\"||i===\"perspective\"||i===\"transformOrigin\")){continue}if(i[0]!==\"_\"){if(t&&i===\"scale\"){e.push(i+\"3d(\"+this[i]+\",1)\")}else if(t&&i===\"translate\"){e.push(i+\"3d(\"+this[i]+\",0)\")}else{e.push(i+\"(\"+this[i]+\")\")}}}}return e.join(\" \")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=\"\"+y(n)+\" \"+i;if(parseInt(r,10)>0){a+=\" \"+y(r)}var o=[];t.each(s,function(t,e){o.push(e+\" \"+a)});return o.join(\", \")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i===\"function\"){s=i;i=undefined}if(typeof i===\"object\"){r=i.easing;u=i.delay||0;f=typeof i.queue===\"undefined\"?true:i.queue;s=i.complete;i=i.duration}if(typeof r===\"function\"){s=r;r=undefined}if(typeof l.easing!==\"undefined\"){r=l.easing;delete l.easing}if(typeof l.duration!==\"undefined\"){i=l.duration;delete l.duration}if(typeof l.complete!==\"undefined\"){s=l.complete;delete l.complete}if(typeof l.queue!==\"undefined\"){f=l.queue;delete l.queue}if(typeof l.delay!==\"undefined\"){u=l.delay;delete l.delay}if(typeof i===\"undefined\"){i=t.fx.speeds._default}if(typeof r===\"undefined\"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s===\"function\"){s.apply(a)}if(typeof e===\"function\"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css(\"transit:transform\");return i.get(e)},set:function(n,i){var r=t(n).css(\"transit:transform\");r.setFromString(e,i);t(n).css({\"transit:transform\":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return\"-\"+t.toLowerCase()})}function b(t,e){if(typeof t===\"string\"&&!t.match(/^[\\-0-9\\.]+$/)){return t}else{return\"\"+t+e}}function y(e){var n=e;if(typeof n===\"string\"&&!n.match(/^[\\-0-9\\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,\"ms\")}t.transit.getTransitionValue=d;return t});", "/*! tooltipster v4.2.3 */!function(a,b){\"function\"==typeof define&&define.amd?define([\"jquery\"],function(a){return b(a)}):\"object\"==typeof exports?module.exports=b(require(\"jquery\")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr(\"id\"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c=\"transition\",d=[\"Moz\",\"Webkit\",\"Khtml\",\"O\",\"ms\"];if(\"string\"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)==\".\"+d?(e=b,!1):void 0}),e}if(b.name.indexOf(\".\")<0)throw new Error(\"Plugins must be namespaced\");return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return\"string\"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||\".tooltipstered\";return a(d).each(function(){var b=a(this),d=b.data(\"tooltipster-ns\");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+\" \":\"\";return a(c+\".tooltipstered\").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace=\"tooltipster-\"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state=\"closed\",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data(\"tooltipster-initialTitle\")&&(e=d._$origin.attr(\"title\"),void 0===e&&(e=null),d._$origin.data(\"tooltipster-initialTitle\",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr(\"data-tooltip-content\");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr(\"title\").addClass(\"tooltipstered\"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on(\"touchmove.\"+d.__namespace+\"-triggerOpen\",function(a){d._touchRecordEvent(a)}),d._on(\"created\",function(){d.__prepareTooltip()})._on(\"repositioned\",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(\".tooltipster-content\"),c=a.__Content,d=function(a){c=a};return a._trigger({type:\"format\",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),\"string\"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:\"updated\",content:b}),this},__destroyError:function(){throw new Error(\"This tooltip has been destroyed and cannot execute your method call.\")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is(\"area\");if(d){var e=b._$origin.parent().attr(\"name\");c=a('img[usemap=\"#'+e+'\"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr(\"shape\"),m=b._$origin.attr(\"coords\");if(m&&(m=m.split(\",\"),a.map(m,function(a,b){m[b]=parseInt(a)})),\"default\"!=l)switch(l){case\"circle\":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case\"rect\":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case\"poly\":for(var w=0,x=0,y=0,z=0,A=\"even\",B=0;By&&(y=C,0===B&&(w=y)),w>C&&(w=C),A=\"odd\"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A=\"even\")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:\"geometry\",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};\"html\"!=j[0].tagName.toLowerCase();){if(\"fixed\"==j.css(\"position\")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return\"number\"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),\"number\"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),\"number\"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),\"string\"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):\"string\"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),\"hover\"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):\"click\"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger(\"options\"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off(\".\"+a.__namespace+\"-triggerOpen\"),h.hasTouchCapability&&a._$origin.on(\"touchstart.\"+a.__namespace+\"-triggerOpen touchend.\"+a.__namespace+\"-triggerOpen touchcancel.\"+a.__namespace+\"-triggerOpen\",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b=\"\";a.__options.triggerOpen.click&&(b+=\"click.\"+a.__namespace+\"-triggerOpen \"),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+=\"touchend.\"+a.__namespace+\"-triggerOpen\"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b=\"\";a.__options.triggerOpen.mouseenter&&(b+=\"mouseenter.\"+a.__namespace+\"-triggerOpen \"),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+=\"touchstart.\"+a.__namespace+\"-triggerOpen\"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b=\"\";a.__options.triggerClose.mouseleave&&(b+=\"mouseleave.\"+a.__namespace+\"-triggerOpen \"),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+=\"touchend.\"+a.__namespace+\"-triggerOpen touchcancel.\"+a.__namespace+\"-triggerOpen\"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?\"auto\":\"\";return b._$tooltip.attr(\"id\",b.__namespace).css({\"pointer-events\":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else if(d(c._$origin)&&d(c._$tooltip)){if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{var e=c.__geometry(),f=!1;if(\"fixed\"!=c._$origin.css(\"position\")&&c.__$originParents.each(function(b,c){var d=a(c),g=d.css(\"overflow-x\"),h=d.css(\"overflow-y\");if(\"visible\"!=g||\"visible\"!=h){var i=c.getBoundingClientRect();if(\"visible\"!=g&&(e.origin.windowOffset.lefti.right))return f=!0,!1;if(\"visible\"!=h&&(e.origin.windowOffset.topi.bottom))return f=!0,!1}return\"fixed\"==d.css(\"position\")?!1:void 0}),f)c._$tooltip.css(\"visibility\",\"hidden\");else if(c._$tooltip.css(\"visibility\",\"visible\"),c.__options.repositionOnScroll)c.reposition(b);else{var g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:\"scroll\",event:b})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:\"state\",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(\".tooltipster-content\");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var e=this,f=!0;if(e._trigger({type:\"close\",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if(\"closed\"!=e.__state){var i=!0,j=new Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if(\"disappearing\"==e.__state&&l>e.__closingTime&&(i=!1),i){e.__closingTime=l,\"disappearing\"!=e.__state&&e.__stateSet(\"disappearing\");var m=function(){clearInterval(e.__tracker),e._trigger({type:\"closing\",event:b}),e._$tooltip.off(\".\"+e.__namespace+\"-triggerClose\").removeClass(\"tooltipster-dying\"),a(h.window).off(\".\"+e.__namespace+\"-triggerClose\"),e.__$originParents.each(function(b,c){a(c).off(\"scroll.\"+e.__namespace+\"-triggerClose\")}),e.__$originParents=null,a(h.window.document.body).off(\".\"+e.__namespace+\"-triggerClose\"),e._$origin.off(\".\"+e.__namespace+\"-triggerClose\"),e._off(\"dismissable\"),e.__stateSet(\"closed\"),e._trigger({type:\"after\",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({\"-moz-animation-duration\":e.__options.animationDuration[1]+\"ms\",\"-ms-animation-duration\":e.__options.animationDuration[1]+\"ms\",\"-o-animation-duration\":e.__options.animationDuration[1]+\"ms\",\"-webkit-animation-duration\":e.__options.animationDuration[1]+\"ms\",\"animation-duration\":e.__options.animationDuration[1]+\"ms\",\"transition-duration\":e.__options.animationDuration[1]+\"ms\"}),e._$tooltip.clearQueue().removeClass(\"tooltipster-show\").addClass(\"tooltipster-dying\"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else g()}return e},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if(\"closed\"==e.__state&&(e._trigger({type:\"before\",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){\"stable\"!=e.__state&&e.__stateSet(\"stable\"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if(\"closed\"!==e.__state)g=0,\"disappearing\"===e.__state?(e.__stateSet(\"appearing\"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass(\"tooltipster-dying\").addClass(\"tooltipster-show\"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):\"stable\"==e.__state&&i();else{if(e.__stateSet(\"appearing\"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass(\"tooltipster-\"+e.__options.animation).addClass(\"tooltipster-initial\").css({\"-moz-animation-duration\":e.__options.animationDuration[0]+\"ms\",\"-ms-animation-duration\":e.__options.animationDuration[0]+\"ms\",\"-o-animation-duration\":e.__options.animationDuration[0]+\"ms\",\"-webkit-animation-duration\":e.__options.animationDuration[0]+\"ms\",\"animation-duration\":e.__options.animationDuration[0]+\"ms\",\"transition-duration\":e.__options.animationDuration[0]+\"ms\"}),setTimeout(function(){\"closed\"!=e.__state&&(e._$tooltip.addClass(\"tooltipster-show\").removeClass(\"tooltipster-initial\"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css(\"display\",\"none\").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on(\"resize.\"+e.__namespace+\"-triggerClose\",function(b){var c=a(document.activeElement);(c.is(\"input\")||c.is(\"textarea\"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on(\"scroll.\"+e.__namespace+\"-triggerClose\",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on(\"scroll.\"+e.__namespace+\"-triggerClose\",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on(\"dismissable\",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k=\"\",l=\"\",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+=\"mouseenter.\"+e.__namespace+\"-triggerClose \",l+=\"mouseleave.\"+e.__namespace+\"-triggerClose \"),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+=\"touchstart.\"+e.__namespace+\"-triggerClose\",l+=\"touchend.\"+e.__namespace+\"-triggerClose touchcancel.\"+e.__namespace+\"-triggerClose\"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b=\"mouseleave\"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:\"dismissable\"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:\"dismissable\"})})}e.__options.triggerClose.originClick&&e._$origin.on(\"click.\"+e.__namespace+\"-triggerClose\",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if(\"closed\"!=e.__state){var b=\"\",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+=\"click.\"+e.__namespace+\"-triggerClose \"),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+=\"touchend.\"+e.__namespace+\"-triggerClose\"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on(\"touchstart.\"+e.__namespace+\"-triggerClose\",function(a){e._touchRecordEvent(a)})}},0),e._trigger(\"ready\"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if(\"stable\"!=b.__state&&\"appearing\"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:\"start\",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf(\"touch\")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger(\"startend\"),b._open(a)):b._trigger(\"startcancel\")},d[0]):(b._trigger(\"startend\"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&(\"object\"!=typeof c||c instanceof Array||null==c||\"object\"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The \"'+b+'\" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf(\"touch\")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if(\"touchmove\"==d.type){b=!0;break}if(\"touchstart\"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return\"string\"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if(\"closed\"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass(\"tooltipster-update-\"+c),setTimeout(function(){\"closed\"!=b.__state&&b._$tooltip.removeClass(\"tooltipster-update-\"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){\"closed\"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;if(b.__destroyed)b.__destroyError();else{\"closed\"!=b.__state&&b.option(\"animationDuration\",0)._close(null,null,!0),b._trigger(\"destroy\"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off(\".\"+b.__namespace+\"-triggerOpen\"),a(h.window.document.body).off(\".\"+b.__namespace+\"-triggerOpen\");var c=b._$origin.data(\"tooltipster-ns\");if(c)if(1===c.length){var d=null;\"previous\"==b.__options.restoration?d=b._$origin.data(\"tooltipster-initialTitle\"):\"current\"==b.__options.restoration&&(d=\"string\"==typeof b.__Content?b.__Content:a(\"
\").append(b.__Content).html()),d&&b._$origin.attr(\"title\",d),b._$origin.removeClass(\"tooltipstered\"),b._$origin.removeData(\"tooltipster-ns\").removeData(\"tooltipster-initialTitle\")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data(\"tooltipster-ns\",c);b._trigger(\"destroyed\"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)}return b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,[\"trigger\",\"triggerClose\",\"triggerOpen\"])>=0&&this.__prepareOrigin(),\"selfDestruction\"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():\"closed\"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:\"reposition\",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:\"closed\"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c=\"You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.\";if(0===this.length)return this;if(\"string\"==typeof b[0]){var d=\"#*$~&\";return this.each(function(){var e=a(this).data(\"tooltipster-ns\"),f=e?a(this).data(e[0]):null;if(!f)throw new Error(\"You called Tooltipster's \\\"\"+b[0]+'\" method on an uninitialized element');if(\"function\"!=typeof f[b[0]])throw new Error('Unknown method \"'+b[0]+'\"');this.length>1&&\"content\"==b[0]&&(b[1]instanceof a||\"object\"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||\"instance\"===b[0]?(d=g,!1):void 0}),\"#*$~&\"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||\"object\"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data(\"tooltipster-ns\"),f=null;e?g?c=!0:m&&(console.log(\"Tooltipster: one or more tooltips are already attached to the element below. Ignoring.\"),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data(\"tooltipster-ns\",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger(\"init\")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:\"hidden\",position:\"absolute\",top:0}).find(\".tooltipster-content\").css(\"overflow\",\"auto\"),this.$container=a('
').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:\"block\",height:\"\",overflow:\"auto\",width:a}),this},destroy:function(){this.__$tooltip.detach().find(\".tooltipster-content\").css({display:\"\",overflow:\"\"}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:\"\",height:\"\",overflow:\"visible\",width:\"\"}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var c=this.__$tooltip.find(\".tooltipster-content\"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf(\"msie\")?h.IE=parseInt(j.split(\"msie\")[1]):-1!==j.toLowerCase().indexOf(\"trident\")&&-1!==j.indexOf(\" rv:11\")?h.IE=11:-1!=j.toLowerCase().indexOf(\"edge/\")&&(h.IE=parseInt(j.toLowerCase().split(\"edge/\")[1]));var k=\"tooltipster.sideTip\";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:\"top\",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace=\"tooltipster-sideTip-\"+Math.round(1e6*Math.random()),b.__previousState=\"closed\",b.__options,b.__optionsFormat(),b.__instance._on(\"state.\"+b.__namespace,function(a){\"closed\"==a.state?b.__close():\"appearing\"==a.state&&\"closed\"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on(\"options.\"+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on(\"reposition.\"+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('
');this.__options.arrow||b.find(\".tooltipster-box\").css(\"margin\",0).end().find(\".tooltipster-arrow\").hide(),this.__options.minWidth&&b.css(\"min-width\",this.__options.minWidth+\"px\"),this.__options.maxWidth&&b.css(\"max-width\",this.__options.maxWidth+\"px\"),this.__instance._$tooltip=b,this.__instance._trigger(\"created\");\n},__destroy:function(){this.__instance._off(\".\"+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),\"object\"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1]),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]}),\"string\"==typeof b.__options.side){var c={top:\"bottom\",right:\"left\",bottom:\"top\",left:\"right\"};b.__options.side=[b.__options.side,c[b.__options.side]],\"left\"==b.__options.side[0]||\"right\"==b.__options.side[0]?b.__options.side.push(\"top\",\"bottom\"):b.__options.side.push(\"right\",\"left\")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option(\"animation\");switch(k&&h.removeClass(\"tooltipster-\"+k),a.each([\"window\",\"document\"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:\"positionTest\"}),1==l||0!=l&&0==j&&(\"window\"!=k||e.__options.viewportAware))for(var d=0;d=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,\"window\"==k&&(h.fits?\"top\"==n||\"bottom\"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if(\"natural\"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:\"positionTested\"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:\"natural\"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:\"natural\"==a.mode?-1:1}return\"document\"==a.container&&\"bottom\"==a.side&&\"natural\"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case\"left\":case\"right\":d.coord.top=Math.floor(d.target-d.size.height/2);break;case\"bottom\":case\"top\":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case\"left\":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case\"right\":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case\"top\":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case\"bottom\":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}\"window\"==d.container?\"top\"==d.side||\"bottom\"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option(\"parent\").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:\"position\"}),e.__options.functionPosition){var m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var n,o;\"top\"==d.side||\"bottom\"==d.side?(n={prop:\"left\",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:\"top\",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.valo&&(n.val=o);var p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css(\"position\",\"fixed\"):e.__instance._$tooltip.css(\"position\",\"\"),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(\".tooltipster-arrow\").css({left:\"\",top:\"\"}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option(\"parent\")),e.__instance._trigger({type:\"repositioned\",event:b,position:d})},__sideChange:function(a,b){a.removeClass(\"tooltipster-bottom\").removeClass(\"tooltipster-left\").removeClass(\"tooltipster-right\").removeClass(\"tooltipster-top\").addClass(\"tooltipster-\"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css(\"opacity\");1==d&&(this.__instance._$origin.css(\"opacity\",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css(\"opacity\",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a});", "(function(deparam){\n if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {\n try {\n var jquery = require('jquery');\n } catch (e) {\n }\n module.exports = deparam(jquery);\n } else if (typeof define === 'function' && define.amd){\n define(['jquery'], function(jquery){\n return deparam(jquery);\n });\n } else {\n var global;\n try {\n global = (false || eval)('this'); // best cross-browser way to determine global for < ES5\n } catch (e) {\n global = window; // fails only if browser (https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives)\n }\n global.deparam = deparam(global.jQuery); // assume jQuery is in global namespace\n }\n})(function ($) {\n var deparam = function( params, coerce ) {\n var obj = {},\n coerce_types = { 'true': !0, 'false': !1, 'null': null };\n\n // If params is an empty string or otherwise falsy, return obj.\n if (!params) {\n return obj;\n }\n\n // Iterate over all name=value pairs.\n params.replace(/\\+/g, ' ').split('&').forEach(function(v){\n var param = v.split( '=' ),\n key = decodeURIComponent( param[0] ),\n val,\n cur = obj,\n i = 0,\n\n // If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it\n // into its component parts.\n keys = key.split( '][' ),\n keys_last = keys.length - 1;\n\n // If the first keys part contains [ and the last ends with ], then []\n // are correctly balanced.\n if ( /\\[/.test( keys[0] ) && /\\]$/.test( keys[ keys_last ] ) ) {\n // Remove the trailing ] from the last keys part.\n keys[ keys_last ] = keys[ keys_last ].replace( /\\]$/, '' );\n\n // Split first keys part into two parts on the [ and add them back onto\n // the beginning of the keys array.\n keys = keys.shift().split('[').concat( keys );\n\n keys_last = keys.length - 1;\n } else {\n // Basic 'foo' style key.\n keys_last = 0;\n }\n\n // Are we dealing with a name=value pair, or just a name?\n if ( param.length === 2 ) {\n val = decodeURIComponent( param[1] );\n\n // Coerce values.\n if ( coerce ) {\n val = val && !isNaN(val) && ((+val + '') === val) ? +val // number\n : val === 'undefined' ? undefined // undefined\n : coerce_types[val] !== undefined ? coerce_types[val] // true, false, null\n : val; // string\n }\n\n if ( keys_last ) {\n // Complex key, build deep object structure based on a few rules:\n // * The 'cur' pointer starts at the object top-level.\n // * [] = array push (n is set to array length), [n] = array if n is\n // numeric, otherwise object.\n // * If at the last keys part, set the value.\n // * For each keys part, if the current level is undefined create an\n // object or array based on the type of the next keys part.\n // * Move the 'cur' pointer to the next level.\n // * Rinse & repeat.\n for ( ; i <= keys_last; i++ ) {\n key = keys[i] === '' ? cur.length : keys[i];\n cur = cur[key] = i < keys_last\n ? cur[key] || ( keys[i+1] && isNaN( keys[i+1] ) ? {} : [] )\n : val;\n }\n\n } else {\n // Simple key, even simpler rules, since only scalars and shallow\n // arrays are allowed.\n\n if ( Object.prototype.toString.call( obj[key] ) === '[object Array]' ) {\n // val is already an array, so push on the next value.\n obj[key].push( val );\n\n } else if ( {}.hasOwnProperty.call(obj, key) ) {\n // val isn't an array, but since a second value has been specified,\n // convert val into an array.\n obj[key] = [ obj[key], val ];\n\n } else {\n // val is a scalar.\n obj[key] = val;\n }\n }\n\n } else if ( key ) {\n // No value was defined, so set something meaningful.\n obj[key] = coerce\n ? undefined\n : '';\n }\n });\n\n return obj;\n };\n if ($) {\n $.prototype.deparam = $.deparam = deparam;\n }\n return deparam;\n});\n", "/**\n * Copyright (c) 2007-2015 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com\n * Licensed under MIT\n * @author Ariel Flesler\n * @version 2.1.0\n */\n;(function(l){'use strict';l(['jquery'],function($){var k=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};k.defaults={axis:'xy',duration:0,limit:true};function isWin(a){return!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!==-1}$.fn.scrollTo=function(f,g,h){if(typeof g==='object'){h=g;g=0}if(typeof h==='function'){h={onAfter:h}}if(f==='max'){f=9e9}h=$.extend({},k.defaults,h);g=g||h.duration;var j=h.queue&&h.axis.length>1;if(j){g/=2}h.offset=both(h.offset);h.over=both(h.over);return this.each(function(){if(f===null)return;var d=isWin(this),elem=d?this.contentWindow||window:this,$elem=$(elem),targ=f,attr={},toff;switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\\d+(\\.\\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=d?$(targ):$(targ,elem);if(!targ.length)return;case'object':if(targ.is||targ.style){toff=(targ=$(targ)).offset()}}var e=$.isFunction(h.offset)&&h.offset(elem,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a==='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,prev=$elem[key](),max=k.max(elem,a);if(toff){attr[key]=toff[pos]+(d?0:prev-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b),10)||0;attr[key]-=parseInt(targ.css('border'+b+'Width'),10)||0}attr[key]+=e[pos]||0;if(h.over[pos]){attr[key]+=targ[a==='x'?'width':'height']()*h.over[pos]}}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)==='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\\d+$/.test(attr[key])){attr[key]=attr[key]<=0?0:Math.min(attr[key],max)}if(!i&&h.axis.length>1){if(prev===attr[key]){attr={}}else if(j){animate(h.onAfterFirst);attr={}}}});animate(h.onAfter);function animate(a){var b=$.extend({},h,{queue:true,duration:g,complete:a&&function(){a.call(elem,targ,h)}});$elem.animate(attr,b)}})};k.max=function(a,b){var c=b==='x'?'Width':'Height',scroll='scroll'+c;if(!isWin(a))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,doc=a.ownerDocument||a.document,html=doc.documentElement,body=doc.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(t){return $(t.elem)[t.prop]()},set:function(t){var a=this.get(t);if(t.options.interrupt&&t._last&&t._last!==a){return $(t.elem).stop()}var b=Math.round(t.now);if(a!==b){$(t.elem)[t.prop](b);t._last=this.get(t)}}};return k})}(typeof define==='function'&&define.amd?define:function(a,b){'use strict';if(typeof module!=='undefined'&&module.exports){module.exports=b(require('jquery'))}else{b(jQuery)}}));\n", "/**\n * jQuery alterClass plugin\n *\n * Remove element classes with wildcard matching. Optionally add classes:\n * $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )\n *\n * Copyright (c) 2011 Pete Boere (the-echoplex.net)\n * Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php\n *\n */\n(function ( $ ) {\n\t\n$.fn.alterClass = function ( removals, additions ) {\n\t\n\tvar self = this;\n\t\n\tif ( removals.indexOf( '*' ) === -1 ) {\n\t\t// Use native jQuery methods if there is no wildcard matching\n\t\tself.removeClass( removals );\n\t\treturn !additions ? self : self.addClass( additions );\n\t}\n\n\tvar patt = new RegExp( '\\\\s' + \n\t\t\tremovals.\n\t\t\t\treplace( /\\*/g, '[A-Za-z0-9-_]+' ).\n\t\t\t\tsplit( ' ' ).\n\t\t\t\tjoin( '\\\\s|\\\\s' ) + \n\t\t\t'\\\\s', 'g' );\n\n\tself.each( function ( i, it ) {\n\t\tvar cn = ' ' + it.className + ' ';\n\t\twhile ( patt.test( cn ) ) {\n\t\t\tcn = cn.replace( patt, ' ' );\n\t\t}\n\t\tit.className = $.trim( cn );\n\t});\n\n\treturn !additions ? self : self.addClass( additions );\n};\n\n})( jQuery );", "//!!! Careful! One line in this lib changed to enable scroll on iPhone!!!\n\n\n// DOM.event.move\n//\n// 2.0.0\n//\n// Stephen Band\n//\n// Triggers 'movestart', 'move' and 'moveend' events after\n// mousemoves following a mousedown cross a distance threshold,\n// similar to the native 'dragstart', 'drag' and 'dragend' events.\n// Move events are throttled to animation frames. Move event objects\n// have the properties:\n//\n// pageX:\n// pageY: Page coordinates of pointer.\n// startX:\n// startY: Page coordinates of pointer at movestart.\n// distX:\n// distY: Distance the pointer has moved since movestart.\n// deltaX:\n// deltaY: Distance the finger has moved since last event.\n// velocityX:\n// velocityY: Average velocity over last few events.\n\n(function(fn) {\n if (typeof define === 'function' && define.amd) {\n define([], fn);\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = fn;\n } else {\n fn();\n }\n})(function(){\n var assign = Object.assign || window.jQuery && jQuery.extend;\n\n // Number of pixels a pressed pointer travels before movestart\n // event is fired.\n var threshold = 8;\n\n // Shim for requestAnimationFrame, falling back to timer. See:\n // see http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n var requestFrame = (function(){\n return (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n function(fn, element){\n return window.setTimeout(function(){\n fn();\n }, 25);\n }\n );\n })();\n\n var ignoreTags = {\n textarea: true,\n input: true,\n select: true,\n button: true\n };\n\n var mouseevents = {\n move: 'mousemove',\n cancel: 'mouseup dragstart',\n end: 'mouseup'\n };\n\n var touchevents = {\n move: 'touchmove',\n cancel: 'touchend',\n end: 'touchend'\n };\n\n var rspaces = /\\s+/;\n\n\n // DOM Events\n\n var eventOptions = { bubbles: true, cancelable: true };\n\n var eventsSymbol = Symbol('events');\n\n function createEvent(type) {\n return new CustomEvent(type, eventOptions);\n }\n\n function getEvents(node) {\n return node[eventsSymbol] || (node[eventsSymbol] = {});\n }\n\n function on(node, types, fn, data, selector) {\n types = types.split(rspaces);\n\n var events = getEvents(node);\n var i = types.length;\n var handlers, type;\n\n function handler(e) { fn(e, data); }\n\n while (i--) {\n type = types[i];\n handlers = events[type] || (events[type] = []);\n handlers.push([fn, handler]);\n node.addEventListener(type, handler);\n }\n }\n\n function off(node, types, fn, selector) {\n types = types.split(rspaces);\n\n var events = getEvents(node);\n var i = types.length;\n var type, handlers, k;\n\n if (!events) { return; }\n\n while (i--) {\n type = types[i];\n handlers = events[type];\n if (!handlers) { continue; }\n k = handlers.length;\n while (k--) {\n if (handlers[k][0] === fn) {\n node.removeEventListener(type, handlers[k][1]);\n handlers.splice(k, 1);\n }\n }\n }\n }\n\n function trigger(node, type, properties) {\n // Don't cache events. It prevents you from triggering an event of a\n // given type from inside the handler of another event of that type.\n var event = createEvent(type);\n if (properties) { assign(event, properties); }\n node.dispatchEvent(event);\n }\n\n\n // Constructors\n\n function Timer(fn){\n var callback = fn,\n active = false,\n running = false;\n\n function trigger(time) {\n if (active){\n callback();\n requestFrame(trigger);\n running = true;\n active = false;\n }\n else {\n running = false;\n }\n }\n\n this.kick = function(fn) {\n active = true;\n if (!running) { trigger(); }\n };\n\n this.end = function(fn) {\n var cb = callback;\n\n if (!fn) { return; }\n\n // If the timer is not running, simply call the end callback.\n if (!running) {\n fn();\n }\n // If the timer is running, and has been kicked lately, then\n // queue up the current callback and the end callback, otherwise\n // just the end callback.\n else {\n callback = active ?\n function(){ cb(); fn(); } :\n fn ;\n\n active = true;\n }\n };\n }\n\n\n // Functions\n\n function noop() {}\n\n function preventDefault(e) {\n e.preventDefault();\n }\n\n function isIgnoreTag(e) {\n return !!ignoreTags[e.target.tagName.toLowerCase()];\n }\n\n function isPrimaryButton(e) {\n // Ignore mousedowns on any button other than the left (or primary)\n // mouse button, or when a modifier key is pressed.\n return (e.which === 1 && !e.ctrlKey && !e.altKey);\n }\n\n function identifiedTouch(touchList, id) {\n var i, l;\n\n if (touchList.identifiedTouch) {\n return touchList.identifiedTouch(id);\n }\n\n // touchList.identifiedTouch() does not exist in\n // webkit yet… we must do the search ourselves...\n\n i = -1;\n l = touchList.length;\n\n while (++i < l) {\n if (touchList[i].identifier === id) {\n return touchList[i];\n }\n }\n }\n\n function changedTouch(e, data) {\n var touch = identifiedTouch(e.changedTouches, data.identifier);\n\n // This isn't the touch you're looking for.\n if (!touch) { return; }\n\n // Chrome Android (at least) includes touches that have not\n // changed in e.changedTouches. That's a bit annoying. Check\n // that this touch has changed.\n if (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; }\n\n return touch;\n }\n\n\n // Handlers that decide when the first movestart is triggered\n\n function mousedown(e){\n // Ignore non-primary buttons\n if (!isPrimaryButton(e)) { return; }\n\n // Ignore form and interactive elements\n if (isIgnoreTag(e)) { return; }\n\n on(document, mouseevents.move, mousemove, e);\n on(document, mouseevents.cancel, mouseend, e);\n }\n\n function mousemove(e, data){\n checkThreshold(e, data, e, removeMouse);\n }\n\n function mouseend(e, data) {\n removeMouse();\n }\n\n function removeMouse() {\n off(document, mouseevents.move, mousemove);\n off(document, mouseevents.cancel, mouseend);\n }\n\n function touchstart(e) {\n // Don't get in the way of interaction with form elements\n if (ignoreTags[e.target.tagName.toLowerCase()]) { return; }\n\n var touch = e.changedTouches[0];\n\n // iOS live updates the touch objects whereas Android gives us copies.\n // That means we can't trust the touchstart object to stay the same,\n // so we must copy the data. This object acts as a template for\n // movestart, move and moveend event objects.\n var data = {\n target: touch.target,\n pageX: touch.pageX,\n pageY: touch.pageY,\n identifier: touch.identifier,\n\n // The only way to make handlers individually unbindable is by\n // making them unique.\n touchmove: function(e, data) { touchmove(e, data); },\n touchend: function(e, data) { touchend(e, data); }\n };\n\n on(document, touchevents.move, data.touchmove, data);\n on(document, touchevents.cancel, data.touchend, data);\n }\n\n function touchmove(e, data) {\n var touch = changedTouch(e, data);\n if (!touch) { return; }\n checkThreshold(e, data, touch, removeTouch);\n }\n\n function touchend(e, data) {\n var touch = identifiedTouch(e.changedTouches, data.identifier);\n if (!touch) { return; }\n removeTouch(data);\n }\n\n function removeTouch(data) {\n off(document, touchevents.move, data.touchmove);\n off(document, touchevents.cancel, data.touchend);\n }\n\n function checkThreshold(e, data, touch, fn) {\n var distX = touch.pageX - data.pageX;\n var distY = touch.pageY - data.pageY;\n\n // Do nothing if the threshold has not been crossed.\n if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }\n\n triggerStart(e, data, touch, distX, distY, fn);\n }\n\n function triggerStart(e, data, touch, distX, distY, fn) {\n var touches = e.targetTouches;\n var time = e.timeStamp - data.timeStamp;\n\n // Create a movestart object with some special properties that\n // are passed only to the movestart handlers.\n var template = {\n altKey: e.altKey,\n ctrlKey: e.ctrlKey,\n shiftKey: e.shiftKey,\n startX: data.pageX,\n startY: data.pageY,\n distX: distX,\n distY: distY,\n deltaX: distX,\n deltaY: distY,\n pageX: touch.pageX,\n pageY: touch.pageY,\n velocityX: distX / time,\n velocityY: distY / time,\n identifier: data.identifier,\n targetTouches: touches,\n finger: touches ? touches.length : 1,\n enableMove: function() {\n this.moveEnabled = true;\n this.enableMove = noop;\n //e.preventDefault(); //commented out to allow scroll in menu on iphone\n }\n };\n\n // Trigger the movestart event.\n trigger(data.target, 'movestart', template);\n\n // Unbind handlers that tracked the touch or mouse up till now.\n fn(data);\n }\n\n\n // Handlers that control what happens following a movestart\n\n function activeMousemove(e, data) {\n var timer = data.timer;\n\n data.touch = e;\n data.timeStamp = e.timeStamp;\n timer.kick();\n }\n\n function activeMouseend(e, data) {\n var target = data.target;\n var event = data.event;\n var timer = data.timer;\n\n removeActiveMouse();\n\n endEvent(target, event, timer, function() {\n // Unbind the click suppressor, waiting until after mouseup\n // has been handled.\n setTimeout(function(){\n off(target, 'click', preventDefault);\n }, 0);\n });\n }\n\n function removeActiveMouse() {\n off(document, mouseevents.move, activeMousemove);\n off(document, mouseevents.end, activeMouseend);\n }\n\n function activeTouchmove(e, data) {\n var event = data.event;\n var timer = data.timer;\n var touch = changedTouch(e, event);\n\n if (!touch) { return; }\n\n // Stop the interface from gesturing\n e.preventDefault();\n\n event.targetTouches = e.targetTouches;\n data.touch = touch;\n data.timeStamp = e.timeStamp;\n\n timer.kick();\n }\n\n function activeTouchend(e, data) {\n var target = data.target;\n var event = data.event;\n var timer = data.timer;\n var touch = identifiedTouch(e.changedTouches, event.identifier);\n\n // This isn't the touch you're looking for.\n if (!touch) { return; }\n\n removeActiveTouch(data);\n endEvent(target, event, timer);\n }\n\n function removeActiveTouch(data) {\n off(document, touchevents.move, data.activeTouchmove);\n off(document, touchevents.end, data.activeTouchend);\n }\n\n\n // Logic for triggering move and moveend events\n\n function updateEvent(event, touch, timeStamp) {\n var time = timeStamp - event.timeStamp;\n\n event.distX = touch.pageX - event.startX;\n event.distY = touch.pageY - event.startY;\n event.deltaX = touch.pageX - event.pageX;\n event.deltaY = touch.pageY - event.pageY;\n\n // Average the velocity of the last few events using a decay\n // curve to even out spurious jumps in values.\n event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;\n event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;\n event.pageX = touch.pageX;\n event.pageY = touch.pageY;\n }\n\n function endEvent(target, event, timer, fn) {\n timer.end(function(){\n trigger(target, 'moveend', event);\n return fn && fn();\n });\n }\n\n\n // Set up the DOM\n\n function movestart(e) {\n if (e.defaultPrevented) { return; }\n if (!e.moveEnabled) { return; }\n\n var event = {\n startX: e.startX,\n startY: e.startY,\n pageX: e.pageX,\n pageY: e.pageY,\n distX: e.distX,\n distY: e.distY,\n deltaX: e.deltaX,\n deltaY: e.deltaY,\n velocityX: e.velocityX,\n velocityY: e.velocityY,\n identifier: e.identifier,\n targetTouches: e.targetTouches,\n finger: e.finger\n };\n\n var data = {\n target: e.target,\n event: event,\n timer: new Timer(update),\n touch: undefined,\n timeStamp: e.timeStamp\n };\n\n function update(time) {\n updateEvent(event, data.touch, data.timeStamp);\n trigger(data.target, 'move', event);\n }\n\n if (e.identifier === undefined) {\n // We're dealing with a mouse event.\n // Stop clicks from propagating during a move\n on(e.target, 'click', preventDefault);\n on(document, mouseevents.move, activeMousemove, data);\n on(document, mouseevents.end, activeMouseend, data);\n }\n else {\n // In order to unbind correct handlers they have to be unique\n data.activeTouchmove = function(e, data) { activeTouchmove(e, data); };\n data.activeTouchend = function(e, data) { activeTouchend(e, data); };\n\n // We're dealing with a touch.\n on(document, touchevents.move, data.activeTouchmove, data);\n on(document, touchevents.end, data.activeTouchend, data);\n }\n }\n\n on(document, 'mousedown', mousedown);\n on(document, 'touchstart', touchstart);\n on(document, 'movestart', movestart);\n\n\n // jQuery special events\n //\n // jQuery event objects are copies of DOM event objects. They need\n // a little help copying the move properties across.\n\n if (!window.jQuery) { return; }\n\n var properties = (\"startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY\").split(' ');\n\n function enableMove1(e) { e.enableMove(); }\n function enableMove2(e) { e.enableMove(); }\n function enableMove3(e) { e.enableMove(); }\n\n function add(handleObj) {\n var handler = handleObj.handler;\n\n handleObj.handler = function(e) {\n // Copy move properties across from originalEvent\n var i = properties.length;\n var property;\n\n while(i--) {\n property = properties[i];\n e[property] = e.originalEvent[property];\n }\n\n handler.apply(this, arguments);\n };\n }\n\n jQuery.event.special.movestart = {\n setup: function() {\n // Movestart must be enabled to allow other move events\n on(this, 'movestart', enableMove1);\n\n // Do listen to DOM events\n return false;\n },\n\n teardown: function() {\n off(this, 'movestart', enableMove1);\n return false;\n },\n\n add: add\n };\n\n jQuery.event.special.move = {\n setup: function() {\n on(this, 'movestart', enableMove2);\n return false;\n },\n\n teardown: function() {\n off(this, 'movestart', enableMove2);\n return false;\n },\n\n add: add\n };\n\n jQuery.event.special.moveend = {\n setup: function() {\n on(this, 'movestart', enableMove3);\n return false;\n },\n\n teardown: function() {\n off(this, 'movestart', enableMove3);\n return false;\n },\n\n add: add\n };\n});\n\n//** END External Plugin **//\n//TODO Move to separate file", "/*!\n * Copyright (c) 2018 Chris O'Hara \n * \n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.validator = factory());\n}(this, (function () { 'use strict';\n\nfunction assertString(input) {\n var isString = typeof input === 'string' || input instanceof String;\n\n if (!isString) {\n throw new TypeError('This library (validator.js) validates strings only');\n }\n}\n\nfunction toDate(date) {\n assertString(date);\n date = Date.parse(date);\n return !isNaN(date) ? new Date(date) : null;\n}\n\nfunction toFloat(str) {\n assertString(str);\n return parseFloat(str);\n}\n\nfunction toInt(str, radix) {\n assertString(str);\n return parseInt(str, radix || 10);\n}\n\nfunction toBoolean(str, strict) {\n assertString(str);\n if (strict) {\n return str === '1' || str === 'true';\n }\n return str !== '0' && str !== 'false' && str !== '';\n}\n\nfunction equals(str, comparison) {\n assertString(str);\n return str === comparison;\n}\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nfunction toString(input) {\n if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && input !== null) {\n if (typeof input.toString === 'function') {\n input = input.toString();\n } else {\n input = '[object Object]';\n }\n } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) {\n input = '';\n }\n return String(input);\n}\n\nfunction contains(str, elem) {\n assertString(str);\n return str.indexOf(toString(elem)) >= 0;\n}\n\nfunction matches(str, pattern, modifiers) {\n assertString(str);\n if (Object.prototype.toString.call(pattern) !== '[object RegExp]') {\n pattern = new RegExp(pattern, modifiers);\n }\n return pattern.test(str);\n}\n\nfunction merge() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments[1];\n\n for (var key in defaults) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = defaults[key];\n }\n }\n return obj;\n}\n\n/* eslint-disable prefer-rest-params */\nfunction isByteLength(str, options) {\n assertString(str);\n var min = void 0;\n var max = void 0;\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isByteLength(str, min [, max])\n min = arguments[1];\n max = arguments[2];\n }\n var len = encodeURI(str).split(/%..|./).length - 1;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\n\nvar default_fqdn_options = {\n require_tld: true,\n allow_underscores: false,\n allow_trailing_dot: false\n};\n\nfunction isFQDN(str, options) {\n assertString(str);\n options = merge(options, default_fqdn_options);\n\n /* Remove the optional trailing dot before checking validity */\n if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n var parts = str.split('.');\n for (var i = 0; i < parts.length; i++) {\n if (parts[i].length > 63) {\n return false;\n }\n }\n if (options.require_tld) {\n var tld = parts.pop();\n if (!parts.length || !/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n }\n // disallow spaces\n if (/[\\s\\u2002-\\u200B\\u202F\\u205F\\u3000\\uFEFF\\uDB40\\uDC20]/.test(tld)) {\n return false;\n }\n }\n for (var part, _i = 0; _i < parts.length; _i++) {\n part = parts[_i];\n if (options.allow_underscores) {\n part = part.replace(/_/g, '');\n }\n if (!/^[a-z\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n }\n // disallow full-width chars\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n }\n if (part[0] === '-' || part[part.length - 1] === '-') {\n return false;\n }\n }\n return true;\n}\n\nvar ipv4Maybe = /^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/;\nvar ipv6Block = /^[0-9A-F]{1,4}$/i;\n\nfunction isIP(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n assertString(str);\n version = String(version);\n if (!version) {\n return isIP(str, 4) || isIP(str, 6);\n } else if (version === '4') {\n if (!ipv4Maybe.test(str)) {\n return false;\n }\n var parts = str.split('.').sort(function (a, b) {\n return a - b;\n });\n return parts[3] <= 255;\n } else if (version === '6') {\n var blocks = str.split(':');\n var foundOmissionBlock = false; // marker to indicate ::\n\n // At least some OS accept the last 32 bits of an IPv6 address\n // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says\n // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses,\n // and '::a.b.c.d' is deprecated, but also valid.\n var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4);\n var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8;\n\n if (blocks.length > expectedNumberOfBlocks) {\n return false;\n }\n // initial or final ::\n if (str === '::') {\n return true;\n } else if (str.substr(0, 2) === '::') {\n blocks.shift();\n blocks.shift();\n foundOmissionBlock = true;\n } else if (str.substr(str.length - 2) === '::') {\n blocks.pop();\n blocks.pop();\n foundOmissionBlock = true;\n }\n\n for (var i = 0; i < blocks.length; ++i) {\n // test for a :: which can not be at the string start/end\n // since those cases have been handled above\n if (blocks[i] === '' && i > 0 && i < blocks.length - 1) {\n if (foundOmissionBlock) {\n return false; // multiple :: in address\n }\n foundOmissionBlock = true;\n } else if (foundIPv4TransitionBlock && i === blocks.length - 1) {\n // it has been checked before that the last\n // block is a valid IPv4 address\n } else if (!ipv6Block.test(blocks[i])) {\n return false;\n }\n }\n if (foundOmissionBlock) {\n return blocks.length >= 1;\n }\n return blocks.length === expectedNumberOfBlocks;\n }\n return false;\n}\n\nvar default_email_options = {\n allow_display_name: false,\n require_display_name: false,\n allow_utf8_local_part: true,\n require_tld: true\n};\n\n/* eslint-disable max-len */\n/* eslint-disable no-control-regex */\nvar displayName = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\.\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\,\\.\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF\\s]*<(.+)>$/i;\nvar emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\nvar gmailUserPart = /^[a-z\\d]+$/;\nvar quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\nvar emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\nvar quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\n/* eslint-enable max-len */\n/* eslint-enable no-control-regex */\n\nfunction isEmail(str, options) {\n assertString(str);\n options = merge(options, default_email_options);\n\n if (options.require_display_name || options.allow_display_name) {\n var display_email = str.match(displayName);\n if (display_email) {\n str = display_email[1];\n } else if (options.require_display_name) {\n return false;\n }\n }\n\n var parts = str.split('@');\n var domain = parts.pop();\n var user = parts.join('@');\n\n var lower_domain = domain.toLowerCase();\n\n if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n /*\n Previously we removed dots for gmail addresses before validating.\n This was removed because it allows `multiple..dots@gmail.com`\n to be reported as valid, but it is not.\n Gmail only normalizes single dots, removing them from here is pointless,\n should be done in normalizeEmail\n */\n user = user.toLowerCase();\n\n // Removing sub-address from username before gmail validation\n var username = user.split('+')[0];\n\n // Dots are not included in gmail length restriction\n if (!isByteLength(username.replace('.', ''), { min: 6, max: 30 })) {\n return false;\n }\n\n var _user_parts = username.split('.');\n for (var i = 0; i < _user_parts.length; i++) {\n if (!gmailUserPart.test(_user_parts[i])) {\n return false;\n }\n }\n }\n\n if (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 254 })) {\n return false;\n }\n\n if (!isFQDN(domain, { require_tld: options.require_tld })) {\n if (!options.allow_ip_domain) {\n return false;\n }\n\n if (!isIP(domain)) {\n if (!domain.startsWith('[') || !domain.endsWith(']')) {\n return false;\n }\n\n var noBracketdomain = domain.substr(1, domain.length - 2);\n\n if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) {\n return false;\n }\n }\n }\n\n if (user[0] === '\"') {\n user = user.slice(1, user.length - 1);\n return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n }\n\n var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n\n var user_parts = user.split('.');\n for (var _i = 0; _i < user_parts.length; _i++) {\n if (!pattern.test(user_parts[_i])) {\n return false;\n }\n }\n\n return true;\n}\n\nvar default_url_options = {\n protocols: ['http', 'https', 'ftp'],\n require_tld: true,\n require_protocol: false,\n require_host: true,\n require_valid_protocol: true,\n allow_underscores: false,\n allow_trailing_dot: false,\n allow_protocol_relative_urls: false\n};\n\nvar wrapped_ipv6 = /^\\[([^\\]]+)\\](?::([0-9]+))?$/;\n\nfunction isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\n\nfunction checkHost(host, matches) {\n for (var i = 0; i < matches.length; i++) {\n var match = matches[i];\n if (host === match || isRegExp(match) && match.test(host)) {\n return true;\n }\n }\n return false;\n}\n\nfunction isURL(url, options) {\n assertString(url);\n if (!url || url.length >= 2083 || /[\\s<>]/.test(url)) {\n return false;\n }\n if (url.indexOf('mailto:') === 0) {\n return false;\n }\n options = merge(options, default_url_options);\n var protocol = void 0,\n auth = void 0,\n host = void 0,\n hostname = void 0,\n port = void 0,\n port_str = void 0,\n split = void 0,\n ipv6 = void 0;\n\n split = url.split('#');\n url = split.shift();\n\n split = url.split('?');\n url = split.shift();\n\n split = url.split('://');\n if (split.length > 1) {\n protocol = split.shift();\n if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {\n return false;\n }\n } else if (options.require_protocol) {\n return false;\n } else if (url.substr(0, 2) === '//') {\n if (!options.allow_protocol_relative_urls) {\n return false;\n }\n split[0] = url.substr(2);\n }\n url = split.join('://');\n\n if (url === '') {\n return false;\n }\n\n split = url.split('/');\n url = split.shift();\n\n if (url === '' && !options.require_host) {\n return true;\n }\n\n split = url.split('@');\n if (split.length > 1) {\n auth = split.shift();\n if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {\n return false;\n }\n }\n hostname = split.join('@');\n\n port_str = null;\n ipv6 = null;\n var ipv6_match = hostname.match(wrapped_ipv6);\n if (ipv6_match) {\n host = '';\n ipv6 = ipv6_match[1];\n port_str = ipv6_match[2] || null;\n } else {\n split = hostname.split(':');\n host = split.shift();\n if (split.length) {\n port_str = split.join(':');\n }\n }\n\n if (port_str !== null) {\n port = parseInt(port_str, 10);\n if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {\n return false;\n }\n }\n\n if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) {\n return false;\n }\n\n host = host || ipv6;\n\n if (options.host_whitelist && !checkHost(host, options.host_whitelist)) {\n return false;\n }\n if (options.host_blacklist && checkHost(host, options.host_blacklist)) {\n return false;\n }\n\n return true;\n}\n\nvar macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;\nvar macAddressNoColons = /^([0-9a-fA-F]){12}$/;\n\nfunction isMACAddress(str, options) {\n assertString(str);\n if (options && options.no_colons) {\n return macAddressNoColons.test(str);\n }\n return macAddress.test(str);\n}\n\nvar subnetMaybe = /^\\d{1,2}$/;\n\nfunction isIPRange(str) {\n assertString(str);\n var parts = str.split('/');\n\n // parts[0] -> ip, parts[1] -> subnet\n if (parts.length !== 2) {\n return false;\n }\n\n if (!subnetMaybe.test(parts[1])) {\n return false;\n }\n\n // Disallow preceding 0 i.e. 01, 02, ...\n if (parts[1].length > 1 && parts[1].startsWith('0')) {\n return false;\n }\n\n return isIP(parts[0], 4) && parts[1] <= 32 && parts[1] >= 0;\n}\n\nfunction isBoolean(str) {\n assertString(str);\n return ['true', 'false', '1', '0'].indexOf(str) >= 0;\n}\n\nvar alpha = {\n 'en-US': /^[A-Z]+$/i,\n 'bg-BG': /^[А-Я]+$/i,\n 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\n 'da-DK': /^[A-ZÆØÅ]+$/i,\n 'de-DE': /^[A-ZÄÖÜß]+$/i,\n 'el-GR': /^[Α-ω]+$/i,\n 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i,\n 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\n 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,\n 'nb-NO': /^[A-ZÆØÅ]+$/i,\n 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i,\n 'nn-NO': /^[A-ZÆØÅ]+$/i,\n 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\n 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\n 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,\n 'ru-RU': /^[А-ЯЁ]+$/i,\n 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\n 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i,\n 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i,\n 'sv-SE': /^[A-ZÅÄÖ]+$/i,\n 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,\n 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,\n 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/\n};\n\nvar alphanumeric = {\n 'en-US': /^[0-9A-Z]+$/i,\n 'bg-BG': /^[0-9А-Я]+$/i,\n 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\n 'da-DK': /^[0-9A-ZÆØÅ]+$/i,\n 'de-DE': /^[0-9A-ZÄÖÜß]+$/i,\n 'el-GR': /^[0-9Α-ω]+$/i,\n 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,\n 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\n 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,\n 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\n 'nb-NO': /^[0-9A-ZÆØÅ]+$/i,\n 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,\n 'nn-NO': /^[0-9A-ZÆØÅ]+$/i,\n 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\n 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,\n 'ru-RU': /^[0-9А-ЯЁ]+$/i,\n 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\n 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,\n 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,\n 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i,\n 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,\n 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,\n 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/\n};\n\nvar decimal = {\n 'en-US': '.',\n ar: '٫'\n};\n\nvar englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM'];\n\nfor (var locale, i = 0; i < englishLocales.length; i++) {\n locale = 'en-' + englishLocales[i];\n alpha[locale] = alpha['en-US'];\n alphanumeric[locale] = alphanumeric['en-US'];\n decimal[locale] = decimal['en-US'];\n}\n\n// Source: http://www.localeplanet.com/java/\nvar arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE'];\n\nfor (var _locale, _i = 0; _i < arabicLocales.length; _i++) {\n _locale = 'ar-' + arabicLocales[_i];\n alpha[_locale] = alpha.ar;\n alphanumeric[_locale] = alphanumeric.ar;\n decimal[_locale] = decimal.ar;\n}\n\n// Source: https://en.wikipedia.org/wiki/Decimal_mark\nvar dotDecimal = [];\nvar commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'es-ES', 'fr-FR', 'it-IT', 'ku-IQ', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA'];\n\nfor (var _i2 = 0; _i2 < dotDecimal.length; _i2++) {\n decimal[dotDecimal[_i2]] = decimal['en-US'];\n}\n\nfor (var _i3 = 0; _i3 < commaDecimal.length; _i3++) {\n decimal[commaDecimal[_i3]] = ',';\n}\n\nalpha['pt-BR'] = alpha['pt-PT'];\nalphanumeric['pt-BR'] = alphanumeric['pt-PT'];\ndecimal['pt-BR'] = decimal['pt-PT'];\n\n// see #862\nalpha['pl-Pl'] = alpha['pl-PL'];\nalphanumeric['pl-Pl'] = alphanumeric['pl-PL'];\ndecimal['pl-Pl'] = decimal['pl-PL'];\n\nfunction isAlpha(str) {\n var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n\n assertString(str);\n if (locale in alpha) {\n return alpha[locale].test(str);\n }\n throw new Error('Invalid locale \\'' + locale + '\\'');\n}\n\nfunction isAlphanumeric(str) {\n var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n\n assertString(str);\n if (locale in alphanumeric) {\n return alphanumeric[locale].test(str);\n }\n throw new Error('Invalid locale \\'' + locale + '\\'');\n}\n\nvar numeric = /^[+-]?([0-9]*[.])?[0-9]+$/;\nvar numericNoSymbols = /^[0-9]+$/;\n\nfunction isNumeric(str, options) {\n assertString(str);\n if (options && options.no_symbols) {\n return numericNoSymbols.test(str);\n }\n return numeric.test(str);\n}\n\nvar int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;\nvar intLeadingZeroes = /^[-+]?[0-9]+$/;\n\nfunction isInt(str, options) {\n assertString(str);\n options = options || {};\n\n // Get the regex to use for testing, based on whether\n // leading zeroes are allowed or not.\n var regex = options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ? int : intLeadingZeroes;\n\n // Check min/max/lt/gt\n var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min;\n var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max;\n var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt;\n var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt;\n\n return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;\n}\n\nfunction isPort(str) {\n return isInt(str, { min: 0, max: 65535 });\n}\n\nfunction isLowercase(str) {\n assertString(str);\n return str === str.toLowerCase();\n}\n\nfunction isUppercase(str) {\n assertString(str);\n return str === str.toUpperCase();\n}\n\n/* eslint-disable no-control-regex */\nvar ascii = /^[\\x00-\\x7F]+$/;\n/* eslint-enable no-control-regex */\n\nfunction isAscii(str) {\n assertString(str);\n return ascii.test(str);\n}\n\nvar fullWidth = /[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/;\n\nfunction isFullWidth(str) {\n assertString(str);\n return fullWidth.test(str);\n}\n\nvar halfWidth = /[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/;\n\nfunction isHalfWidth(str) {\n assertString(str);\n return halfWidth.test(str);\n}\n\nfunction isVariableWidth(str) {\n assertString(str);\n return fullWidth.test(str) && halfWidth.test(str);\n}\n\n/* eslint-disable no-control-regex */\nvar multibyte = /[^\\x00-\\x7F]/;\n/* eslint-enable no-control-regex */\n\nfunction isMultibyte(str) {\n assertString(str);\n return multibyte.test(str);\n}\n\nvar surrogatePair = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;\n\nfunction isSurrogatePair(str) {\n assertString(str);\n return surrogatePair.test(str);\n}\n\nfunction isFloat(str, options) {\n assertString(str);\n options = options || {};\n var float = new RegExp('^(?:[-+])?(?:[0-9]+)?(?:\\\\' + (options.locale ? decimal[options.locale] : '.') + '[0-9]*)?(?:[eE][\\\\+\\\\-]?(?:[0-9]+))?$');\n if (str === '' || str === '.' || str === '-' || str === '+') {\n return false;\n }\n var value = parseFloat(str.replace(',', '.'));\n return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt);\n}\n\nvar includes = function includes(arr, val) {\n return arr.some(function (arrVal) {\n return val === arrVal;\n });\n};\n\nfunction decimalRegExp(options) {\n var regExp = new RegExp('^[-+]?([0-9]+)?(\\\\' + decimal[options.locale] + '[0-9]{' + options.decimal_digits + '})' + (options.force_decimal ? '' : '?') + '$');\n return regExp;\n}\n\nvar default_decimal_options = {\n force_decimal: false,\n decimal_digits: '1,',\n locale: 'en-US'\n};\n\nvar blacklist = ['', '-', '+'];\n\nfunction isDecimal(str, options) {\n assertString(str);\n options = merge(options, default_decimal_options);\n if (options.locale in decimal) {\n return !includes(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str);\n }\n throw new Error('Invalid locale \\'' + options.locale + '\\'');\n}\n\nvar hexadecimal = /^[0-9A-F]+$/i;\n\nfunction isHexadecimal(str) {\n assertString(str);\n return hexadecimal.test(str);\n}\n\nfunction isDivisibleBy(str, num) {\n assertString(str);\n return toFloat(str) % parseInt(num, 10) === 0;\n}\n\nvar hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i;\n\nfunction isHexColor(str) {\n assertString(str);\n return hexcolor.test(str);\n}\n\n// see http://isrc.ifpi.org/en/isrc-standard/code-syntax\nvar isrc = /^[A-Z]{2}[0-9A-Z]{3}\\d{2}\\d{5}$/;\n\nfunction isISRC(str) {\n assertString(str);\n return isrc.test(str);\n}\n\nvar md5 = /^[a-f0-9]{32}$/;\n\nfunction isMD5(str) {\n assertString(str);\n return md5.test(str);\n}\n\nvar lengths = {\n md5: 32,\n md4: 32,\n sha1: 40,\n sha256: 64,\n sha384: 96,\n sha512: 128,\n ripemd128: 32,\n ripemd160: 40,\n tiger128: 32,\n tiger160: 40,\n tiger192: 48,\n crc32: 8,\n crc32b: 8\n};\n\nfunction isHash(str, algorithm) {\n assertString(str);\n var hash = new RegExp('^[a-f0-9]{' + lengths[algorithm] + '}$');\n return hash.test(str);\n}\n\nvar jwt = /^[a-zA-Z0-9\\-_]+\\.[a-zA-Z0-9\\-_]+\\.[a-zA-Z0-9\\-_]+$/;\n\nfunction isJWT(str) {\n assertString(str);\n return jwt.test(str);\n}\n\nfunction isJSON(str) {\n assertString(str);\n try {\n var obj = JSON.parse(str);\n return !!obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object';\n } catch (e) {/* ignore */}\n return false;\n}\n\nvar default_is_empty_options = {\n ignore_whitespace: false\n};\n\nfunction isEmpty(str, options) {\n assertString(str);\n options = merge(options, default_is_empty_options);\n\n return (options.ignore_whitespace ? str.trim().length : str.length) === 0;\n}\n\n/* eslint-disable prefer-rest-params */\nfunction isLength(str, options) {\n assertString(str);\n var min = void 0;\n var max = void 0;\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isLength(str, min [, max])\n min = arguments[1];\n max = arguments[2];\n }\n var surrogatePairs = str.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g) || [];\n var len = str.length - surrogatePairs.length;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\n\nvar uuid = {\n 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i\n};\n\nfunction isUUID(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';\n\n assertString(str);\n var pattern = uuid[version];\n return pattern && pattern.test(str);\n}\n\nfunction isMongoId(str) {\n assertString(str);\n return isHexadecimal(str) && str.length === 24;\n}\n\nfunction isAfter(str) {\n var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());\n\n assertString(str);\n var comparison = toDate(date);\n var original = toDate(str);\n return !!(original && comparison && original > comparison);\n}\n\nfunction isBefore(str) {\n var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());\n\n assertString(str);\n var comparison = toDate(date);\n var original = toDate(str);\n return !!(original && comparison && original < comparison);\n}\n\nfunction isIn(str, options) {\n assertString(str);\n var i = void 0;\n if (Object.prototype.toString.call(options) === '[object Array]') {\n var array = [];\n for (i in options) {\n if ({}.hasOwnProperty.call(options, i)) {\n array[i] = toString(options[i]);\n }\n }\n return array.indexOf(str) >= 0;\n } else if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n return options.hasOwnProperty(str);\n } else if (options && typeof options.indexOf === 'function') {\n return options.indexOf(str) >= 0;\n }\n return false;\n}\n\n/* eslint-disable max-len */\nvar creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$/;\n/* eslint-enable max-len */\n\nfunction isCreditCard(str) {\n assertString(str);\n var sanitized = str.replace(/[- ]+/g, '');\n if (!creditCard.test(sanitized)) {\n return false;\n }\n var sum = 0;\n var digit = void 0;\n var tmpNum = void 0;\n var shouldDouble = void 0;\n for (var i = sanitized.length - 1; i >= 0; i--) {\n digit = sanitized.substring(i, i + 1);\n tmpNum = parseInt(digit, 10);\n if (shouldDouble) {\n tmpNum *= 2;\n if (tmpNum >= 10) {\n sum += tmpNum % 10 + 1;\n } else {\n sum += tmpNum;\n }\n } else {\n sum += tmpNum;\n }\n shouldDouble = !shouldDouble;\n }\n return !!(sum % 10 === 0 ? sanitized : false);\n}\n\nvar isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;\n\nfunction isISIN(str) {\n assertString(str);\n if (!isin.test(str)) {\n return false;\n }\n\n var checksumStr = str.replace(/[A-Z]/g, function (character) {\n return parseInt(character, 36);\n });\n\n var sum = 0;\n var digit = void 0;\n var tmpNum = void 0;\n var shouldDouble = true;\n for (var i = checksumStr.length - 2; i >= 0; i--) {\n digit = checksumStr.substring(i, i + 1);\n tmpNum = parseInt(digit, 10);\n if (shouldDouble) {\n tmpNum *= 2;\n if (tmpNum >= 10) {\n sum += tmpNum + 1;\n } else {\n sum += tmpNum;\n }\n } else {\n sum += tmpNum;\n }\n shouldDouble = !shouldDouble;\n }\n\n return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10;\n}\n\nvar isbn10Maybe = /^(?:[0-9]{9}X|[0-9]{10})$/;\nvar isbn13Maybe = /^(?:[0-9]{13})$/;\nvar factor = [1, 3];\n\nfunction isISBN(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n assertString(str);\n version = String(version);\n if (!version) {\n return isISBN(str, 10) || isISBN(str, 13);\n }\n var sanitized = str.replace(/[\\s-]+/g, '');\n var checksum = 0;\n var i = void 0;\n if (version === '10') {\n if (!isbn10Maybe.test(sanitized)) {\n return false;\n }\n for (i = 0; i < 9; i++) {\n checksum += (i + 1) * sanitized.charAt(i);\n }\n if (sanitized.charAt(9) === 'X') {\n checksum += 10 * 10;\n } else {\n checksum += 10 * sanitized.charAt(9);\n }\n if (checksum % 11 === 0) {\n return !!sanitized;\n }\n } else if (version === '13') {\n if (!isbn13Maybe.test(sanitized)) {\n return false;\n }\n for (i = 0; i < 12; i++) {\n checksum += factor[i % 2] * sanitized.charAt(i);\n }\n if (sanitized.charAt(12) - (10 - checksum % 10) % 10 === 0) {\n return !!sanitized;\n }\n }\n return false;\n}\n\nvar issn = '^\\\\d{4}-?\\\\d{3}[\\\\dX]$';\n\nfunction isISSN(str) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n assertString(str);\n var testIssn = issn;\n testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn;\n testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i');\n if (!testIssn.test(str)) {\n return false;\n }\n var digits = str.replace('-', '').toUpperCase();\n var checksum = 0;\n for (var i = 0; i < digits.length; i++) {\n var digit = digits[i];\n checksum += (digit === 'X' ? 10 : +digit) * (8 - i);\n }\n return checksum % 11 === 0;\n}\n\n/* eslint-disable max-len */\nvar phones = {\n 'ar-AE': /^((\\+?971)|0)?5[024568]\\d{7}$/,\n 'ar-DZ': /^(\\+?213|0)(5|6|7)\\d{8}$/,\n 'ar-EG': /^((\\+?20)|0)?1[012]\\d{8}$/,\n 'ar-IQ': /^(\\+?964|0)?7[0-9]\\d{8}$/,\n 'ar-JO': /^(\\+?962|0)?7[789]\\d{7}$/,\n 'ar-KW': /^(\\+?965)[569]\\d{7}$/,\n 'ar-SA': /^(!?(\\+?966)|0)?5\\d{8}$/,\n 'ar-SY': /^(!?(\\+?963)|0)?9\\d{8}$/,\n 'ar-TN': /^(\\+?216)?[2459]\\d{7}$/,\n 'be-BY': /^(\\+?375)?(24|25|29|33|44)\\d{7}$/,\n 'bg-BG': /^(\\+?359|0)?8[789]\\d{7}$/,\n 'bn-BD': /\\+?(88)?0?1[156789][0-9]{8}\\b/,\n 'cs-CZ': /^(\\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n 'da-DK': /^(\\+?45)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'de-DE': /^(\\+?49[ \\.\\-]?)?([\\(]{1}[0-9]{1,6}[\\)])?([0-9 \\.\\-\\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,\n 'el-GR': /^(\\+?30|0)?(69\\d{8})$/,\n 'en-AU': /^(\\+?61|0)4\\d{8}$/,\n 'en-GB': /^(\\+?44|0)7\\d{9}$/,\n 'en-HK': /^(\\+?852\\-?)?[456789]\\d{3}\\-?\\d{4}$/,\n 'en-IN': /^(\\+?91|0)?[6789]\\d{9}$/,\n 'en-KE': /^(\\+?254|0)?[7]\\d{8}$/,\n 'en-NG': /^(\\+?234|0)?[789]\\d{9}$/,\n 'en-NZ': /^(\\+?64|0)[28]\\d{7,9}$/,\n 'en-PK': /^((\\+92)|(0092))-{0,1}\\d{3}-{0,1}\\d{7}$|^\\d{11}$|^\\d{4}-\\d{7}$/,\n 'en-RW': /^(\\+?250|0)?[7]\\d{8}$/,\n 'en-SG': /^(\\+65)?[89]\\d{7}$/,\n 'en-TZ': /^(\\+?255|0)?[67]\\d{8}$/,\n 'en-UG': /^(\\+?256|0)?[7]\\d{8}$/,\n 'en-US': /^(\\+?1?( |-)?)?(\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,\n 'en-ZA': /^(\\+?27|0)\\d{9}$/,\n 'en-ZM': /^(\\+?26)?09[567]\\d{7}$/,\n 'es-ES': /^(\\+?34)?(6\\d{1}|7[1234])\\d{7}$/,\n 'es-MX': /^(\\+?52)?(1|01)?\\d{10,11}$/,\n 'et-EE': /^(\\+?372)?\\s?(5|8[1-4])\\s?([0-9]\\s?){6,7}$/,\n 'fa-IR': /^(\\+?98[\\-\\s]?|0)9[0-39]\\d[\\-\\s]?\\d{3}[\\-\\s]?\\d{4}$/,\n 'fi-FI': /^(\\+?358|0)\\s?(4(0|1|2|4|5|6)?|50)\\s?(\\d\\s?){4,8}\\d$/,\n 'fo-FO': /^(\\+?298)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'fr-FR': /^(\\+?33|0)[67]\\d{8}$/,\n 'he-IL': /^(\\+972|0)([23489]|5[012345689]|77)[1-9]\\d{6}/,\n 'hu-HU': /^(\\+?36)(20|30|70)\\d{7}$/,\n 'id-ID': /^(\\+?62|0)(0?8?\\d\\d\\s?\\d?)([\\s?|\\d]{7,12})$/,\n 'it-IT': /^(\\+?39)?\\s?3\\d{2} ?\\d{6,7}$/,\n 'ja-JP': /^(\\+?81|0)[789]0[ \\-]?[1-9]\\d{2}[ \\-]?\\d{5}$/,\n 'kk-KZ': /^(\\+?7|8)?7\\d{9}$/,\n 'kl-GL': /^(\\+?299)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'ko-KR': /^((\\+?82)[ \\-]?)?0?1([0|1|6|7|8|9]{1})[ \\-]?\\d{3,4}[ \\-]?\\d{4}$/,\n 'lt-LT': /^(\\+370|8)\\d{8}$/,\n 'ms-MY': /^(\\+?6?01){1}(([145]{1}(\\-|\\s)?\\d{7,8})|([236789]{1}(\\s|\\-)?\\d{7}))$/,\n 'nb-NO': /^(\\+?47)?[49]\\d{7}$/,\n 'nl-BE': /^(\\+?32|0)4?\\d{8}$/,\n 'nn-NO': /^(\\+?47)?[49]\\d{7}$/,\n 'pl-PL': /^(\\+?48)? ?[5-8]\\d ?\\d{3} ?\\d{2} ?\\d{2}$/,\n 'pt-BR': /(?=^(\\+?5{2}\\-?|0)[1-9]{2}\\-?\\d{4}\\-?\\d{4}$)(^(\\+?5{2}\\-?|0)[1-9]{2}\\-?[6-9]{1}\\d{3}\\-?\\d{4}$)|(^(\\+?5{2}\\-?|0)[1-9]{2}\\-?9[6-9]{1}\\d{3}\\-?\\d{4}$)/,\n 'pt-PT': /^(\\+?351)?9[1236]\\d{7}$/,\n 'ro-RO': /^(\\+?4?0)\\s?7\\d{2}(\\/|\\s|\\.|\\-)?\\d{3}(\\s|\\.|\\-)?\\d{3}$/,\n 'ru-RU': /^(\\+?7|8)?9\\d{9}$/,\n 'sk-SK': /^(\\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n 'sr-RS': /^(\\+3816|06)[- \\d]{5,9}$/,\n 'sv-SE': /^(\\+?46|0)[\\s\\-]?7[\\s\\-]?[02369]([\\s\\-]?\\d){7}$/,\n 'th-TH': /^(\\+66|66|0)\\d{9}$/,\n 'tr-TR': /^(\\+?90|0)?5\\d{9}$/,\n 'uk-UA': /^(\\+?38|8)?0\\d{9}$/,\n 'vi-VN': /^(\\+?84|0)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,\n 'zh-CN': /^((\\+|00)86)?1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,\n 'zh-TW': /^(\\+?886\\-?|0)?9\\d{8}$/\n};\n/* eslint-enable max-len */\n\n// aliases\nphones['en-CA'] = phones['en-US'];\nphones['fr-BE'] = phones['nl-BE'];\nphones['zh-HK'] = phones['en-HK'];\n\nfunction isMobilePhone(str, locale, options) {\n assertString(str);\n if (options && options.strictMode && !str.startsWith('+')) {\n return false;\n }\n if (Array.isArray(locale)) {\n return locale.some(function (key) {\n if (phones.hasOwnProperty(key)) {\n var phone = phones[key];\n if (phone.test(str)) {\n return true;\n }\n }\n return false;\n });\n } else if (locale in phones) {\n return phones[locale].test(str);\n // alias falsey locale as 'any'\n } else if (!locale || locale === 'any') {\n for (var key in phones) {\n if (phones.hasOwnProperty(key)) {\n var phone = phones[key];\n if (phone.test(str)) {\n return true;\n }\n }\n }\n return false;\n }\n throw new Error('Invalid locale \\'' + locale + '\\'');\n}\n\nfunction currencyRegex(options) {\n var decimal_digits = '\\\\d{' + options.digits_after_decimal[0] + '}';\n options.digits_after_decimal.forEach(function (digit, index) {\n if (index !== 0) decimal_digits = decimal_digits + '|\\\\d{' + digit + '}';\n });\n var symbol = '(\\\\' + options.symbol.replace(/\\./g, '\\\\.') + ')' + (options.require_symbol ? '' : '?'),\n negative = '-?',\n whole_dollar_amount_without_sep = '[1-9]\\\\d*',\n whole_dollar_amount_with_sep = '[1-9]\\\\d{0,2}(\\\\' + options.thousands_separator + '\\\\d{3})*',\n valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],\n whole_dollar_amount = '(' + valid_whole_dollar_amounts.join('|') + ')?',\n decimal_amount = '(\\\\' + options.decimal_separator + '(' + decimal_digits + '))' + (options.require_decimal ? '' : '?');\n var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : '');\n\n // default is negative sign before symbol, but there are two other options (besides parens)\n if (options.allow_negatives && !options.parens_for_negatives) {\n if (options.negative_sign_after_digits) {\n pattern += negative;\n } else if (options.negative_sign_before_digits) {\n pattern = negative + pattern;\n }\n }\n\n // South African Rand, for example, uses R 123 (space) and R-123 (no space)\n if (options.allow_negative_sign_placeholder) {\n pattern = '( (?!\\\\-))?' + pattern;\n } else if (options.allow_space_after_symbol) {\n pattern = ' ?' + pattern;\n } else if (options.allow_space_after_digits) {\n pattern += '( (?!$))?';\n }\n\n if (options.symbol_after_digits) {\n pattern += symbol;\n } else {\n pattern = symbol + pattern;\n }\n\n if (options.allow_negatives) {\n if (options.parens_for_negatives) {\n pattern = '(\\\\(' + pattern + '\\\\)|' + pattern + ')';\n } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {\n pattern = negative + pattern;\n }\n }\n\n // ensure there's a dollar and/or decimal amount, and that\n // it doesn't start with a space or a negative sign followed by a space\n return new RegExp('^(?!-? )(?=.*\\\\d)' + pattern + '$');\n}\n\nvar default_currency_options = {\n symbol: '$',\n require_symbol: false,\n allow_space_after_symbol: false,\n symbol_after_digits: false,\n allow_negatives: true,\n parens_for_negatives: false,\n negative_sign_before_digits: false,\n negative_sign_after_digits: false,\n allow_negative_sign_placeholder: false,\n thousands_separator: ',',\n decimal_separator: '.',\n allow_decimal: true,\n require_decimal: false,\n digits_after_decimal: [2],\n allow_space_after_digits: false\n};\n\nfunction isCurrency(str, options) {\n assertString(str);\n options = merge(options, default_currency_options);\n return currencyRegex(options).test(str);\n}\n\n/* eslint-disable max-len */\n// from http://goo.gl/0ejHHW\nvar iso8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\n/* eslint-enable max-len */\n\nfunction isISO8601(str) {\n assertString(str);\n return iso8601.test(str);\n}\n\n/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */\n\nvar dateFullYear = /[0-9]{4}/;\nvar dateMonth = /(0[1-9]|1[0-2])/;\nvar dateMDay = /([12]\\d|0[1-9]|3[01])/;\n\nvar timeHour = /([01][0-9]|2[0-3])/;\nvar timeMinute = /[0-5][0-9]/;\nvar timeSecond = /([0-5][0-9]|60)/;\n\nvar timeSecFrac = /(\\.[0-9]+)?/;\nvar timeNumOffset = new RegExp('[-+]' + timeHour.source + ':' + timeMinute.source);\nvar timeOffset = new RegExp('([zZ]|' + timeNumOffset.source + ')');\n\nvar partialTime = new RegExp(timeHour.source + ':' + timeMinute.source + ':' + timeSecond.source + timeSecFrac.source);\n\nvar fullDate = new RegExp(dateFullYear.source + '-' + dateMonth.source + '-' + dateMDay.source);\nvar fullTime = new RegExp('' + partialTime.source + timeOffset.source);\n\nvar rfc3339 = new RegExp(fullDate.source + '[ tT]' + fullTime.source);\n\nfunction isRFC3339(str) {\n assertString(str);\n return rfc3339.test(str);\n}\n\n// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\nvar validISO31661Alpha2CountriesCodes = ['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW'];\n\nfunction isISO31661Alpha2(str) {\n assertString(str);\n return includes(validISO31661Alpha2CountriesCodes, str.toUpperCase());\n}\n\n// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3\nvar validISO31661Alpha3CountriesCodes = ['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE'];\n\nfunction isISO31661Alpha3(str) {\n assertString(str);\n return includes(validISO31661Alpha3CountriesCodes, str.toUpperCase());\n}\n\nvar notBase64 = /[^A-Z0-9+\\/=]/i;\n\nfunction isBase64(str) {\n assertString(str);\n var len = str.length;\n if (!len || len % 4 !== 0 || notBase64.test(str)) {\n return false;\n }\n var firstPaddingChar = str.indexOf('=');\n return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '=';\n}\n\nvar validMediaType = /^[a-z]+\\/[a-z0-9\\-\\+]+$/i;\n\nvar validAttribute = /^[a-z\\-]+=[a-z0-9\\-]+$/i;\n\nvar validData = /^[a-z0-9!\\$&'\\(\\)\\*\\+,;=\\-\\._~:@\\/\\?%\\s]*$/i;\n\nfunction isDataURI(str) {\n assertString(str);\n var data = str.split(',');\n if (data.length < 2) {\n return false;\n }\n var attributes = data.shift().trim().split(';');\n var schemeAndMediaType = attributes.shift();\n if (schemeAndMediaType.substr(0, 5) !== 'data:') {\n return false;\n }\n var mediaType = schemeAndMediaType.substr(5);\n if (mediaType !== '' && !validMediaType.test(mediaType)) {\n return false;\n }\n for (var i = 0; i < attributes.length; i++) {\n if (i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') {\n // ok\n } else if (!validAttribute.test(attributes[i])) {\n return false;\n }\n }\n for (var _i = 0; _i < data.length; _i++) {\n if (!validData.test(data[_i])) {\n return false;\n }\n }\n return true;\n}\n\nvar magnetURI = /^magnet:\\?xt=urn:[a-z0-9]+:[a-z0-9]{32,40}&dn=.+&tr=.+$/i;\n\nfunction isMagnetURI(url) {\n assertString(url);\n return magnetURI.test(url.trim());\n}\n\n/*\n Checks if the provided string matches to a correct Media type format (MIME type)\n\n This function only checks is the string format follows the\n etablished rules by the according RFC specifications.\n This function supports 'charset' in textual media types\n (https://tools.ietf.org/html/rfc6657).\n\n This function does not check against all the media types listed\n by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml)\n because of lightness purposes : it would require to include\n all these MIME types in this librairy, which would weigh it\n significantly. This kind of effort maybe is not worth for the use that\n this function has in this entire librairy.\n\n More informations in the RFC specifications :\n - https://tools.ietf.org/html/rfc2045\n - https://tools.ietf.org/html/rfc2046\n - https://tools.ietf.org/html/rfc7231#section-3.1.1.1\n - https://tools.ietf.org/html/rfc7231#section-3.1.1.5\n*/\n\n// Match simple MIME types\n// NB :\n// Subtype length must not exceed 100 characters.\n// This rule does not comply to the RFC specs (what is the max length ?).\nvar mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\\/[a-zA-Z0-9\\.\\-\\+]{1,100}$/i; // eslint-disable-line max-len\n\n// Handle \"charset\" in \"text/*\"\nvar mimeTypeText = /^text\\/[a-zA-Z0-9\\.\\-\\+]{1,100};\\s?charset=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?$/i; // eslint-disable-line max-len\n\n// Handle \"boundary\" in \"multipart/*\"\nvar mimeTypeMultipart = /^multipart\\/[a-zA-Z0-9\\.\\-\\+]{1,100}(;\\s?(boundary|charset)=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?){0,2}$/i; // eslint-disable-line max-len\n\nfunction isMimeType(str) {\n assertString(str);\n return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);\n}\n\nvar lat = /^\\(?[+-]?(90(\\.0+)?|[1-8]?\\d(\\.\\d+)?)$/;\nvar long = /^\\s?[+-]?(180(\\.0+)?|1[0-7]\\d(\\.\\d+)?|\\d{1,2}(\\.\\d+)?)\\)?$/;\n\nvar isLatLong = function (str) {\n assertString(str);\n if (!str.includes(',')) return false;\n var pair = str.split(',');\n return lat.test(pair[0]) && long.test(pair[1]);\n};\n\n// common patterns\nvar threeDigit = /^\\d{3}$/;\nvar fourDigit = /^\\d{4}$/;\nvar fiveDigit = /^\\d{5}$/;\nvar sixDigit = /^\\d{6}$/;\n\nvar patterns = {\n AD: /^AD\\d{3}$/,\n AT: fourDigit,\n AU: fourDigit,\n BE: fourDigit,\n BG: fourDigit,\n CA: /^[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][\\s\\-]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i,\n CH: fourDigit,\n CZ: /^\\d{3}\\s?\\d{2}$/,\n DE: fiveDigit,\n DK: fourDigit,\n DZ: fiveDigit,\n EE: fiveDigit,\n ES: fiveDigit,\n FI: fiveDigit,\n FR: /^\\d{2}\\s?\\d{3}$/,\n GB: /^(gir\\s?0aa|[a-z]{1,2}\\d[\\da-z]?\\s?(\\d[a-z]{2})?)$/i,\n GR: /^\\d{3}\\s?\\d{2}$/,\n HR: /^([1-5]\\d{4}$)/,\n HU: fourDigit,\n IL: fiveDigit,\n IN: sixDigit,\n IS: threeDigit,\n IT: fiveDigit,\n JP: /^\\d{3}\\-\\d{4}$/,\n KE: fiveDigit,\n LI: /^(948[5-9]|949[0-7])$/,\n LT: /^LT\\-\\d{5}$/,\n LU: fourDigit,\n LV: /^LV\\-\\d{4}$/,\n MX: fiveDigit,\n NL: /^\\d{4}\\s?[a-z]{2}$/i,\n NO: fourDigit,\n PL: /^\\d{2}\\-\\d{3}$/,\n PT: /^\\d{4}\\-\\d{3}?$/,\n RO: sixDigit,\n RU: sixDigit,\n SA: fiveDigit,\n SE: /^\\d{3}\\s?\\d{2}$/,\n SI: fourDigit,\n SK: /^\\d{3}\\s?\\d{2}$/,\n TN: fourDigit,\n TW: /^\\d{3}(\\d{2})?$/,\n US: /^\\d{5}(-\\d{4})?$/,\n ZA: fourDigit,\n ZM: fiveDigit\n};\n\nvar locales = Object.keys(patterns);\n\nvar isPostalCode = function (str, locale) {\n assertString(str);\n if (locale in patterns) {\n return patterns[locale].test(str);\n } else if (locale === 'any') {\n for (var key in patterns) {\n if (patterns.hasOwnProperty(key)) {\n var pattern = patterns[key];\n if (pattern.test(str)) {\n return true;\n }\n }\n }\n return false;\n }\n throw new Error('Invalid locale \\'' + locale + '\\'');\n};\n\nfunction ltrim(str, chars) {\n assertString(str);\n var pattern = chars ? new RegExp('^[' + chars + ']+', 'g') : /^\\s+/g;\n return str.replace(pattern, '');\n}\n\nfunction rtrim(str, chars) {\n assertString(str);\n var pattern = chars ? new RegExp('[' + chars + ']') : /\\s/;\n\n var idx = str.length - 1;\n for (; idx >= 0 && pattern.test(str[idx]); idx--) {}\n\n return idx < str.length ? str.substr(0, idx + 1) : str;\n}\n\nfunction trim(str, chars) {\n return rtrim(ltrim(str, chars), chars);\n}\n\nfunction escape(str) {\n assertString(str);\n return str.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\\//g, '/').replace(/\\\\/g, '\').replace(/`/g, '`');\n}\n\nfunction unescape(str) {\n assertString(str);\n return str.replace(/&/g, '&').replace(/"/g, '\"').replace(/'/g, \"'\").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\\\').replace(/`/g, '`');\n}\n\nfunction blacklist$1(str, chars) {\n assertString(str);\n return str.replace(new RegExp('[' + chars + ']+', 'g'), '');\n}\n\nfunction stripLow(str, keep_new_lines) {\n assertString(str);\n var chars = keep_new_lines ? '\\\\x00-\\\\x09\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F' : '\\\\x00-\\\\x1F\\\\x7F';\n return blacklist$1(str, chars);\n}\n\nfunction whitelist(str, chars) {\n assertString(str);\n return str.replace(new RegExp('[^' + chars + ']+', 'g'), '');\n}\n\nfunction isWhitelisted(str, chars) {\n assertString(str);\n for (var i = str.length - 1; i >= 0; i--) {\n if (chars.indexOf(str[i]) === -1) {\n return false;\n }\n }\n return true;\n}\n\nvar default_normalize_email_options = {\n // The following options apply to all email addresses\n // Lowercases the local part of the email address.\n // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024).\n // The domain is always lowercased, as per RFC 1035\n all_lowercase: true,\n\n // The following conversions are specific to GMail\n // Lowercases the local part of the GMail address (known to be case-insensitive)\n gmail_lowercase: true,\n // Removes dots from the local part of the email address, as that's ignored by GMail\n gmail_remove_dots: true,\n // Removes the subaddress (e.g. \"+foo\") from the email address\n gmail_remove_subaddress: true,\n // Conversts the googlemail.com domain to gmail.com\n gmail_convert_googlemaildotcom: true,\n\n // The following conversions are specific to Outlook.com / Windows Live / Hotmail\n // Lowercases the local part of the Outlook.com address (known to be case-insensitive)\n outlookdotcom_lowercase: true,\n // Removes the subaddress (e.g. \"+foo\") from the email address\n outlookdotcom_remove_subaddress: true,\n\n // The following conversions are specific to Yahoo\n // Lowercases the local part of the Yahoo address (known to be case-insensitive)\n yahoo_lowercase: true,\n // Removes the subaddress (e.g. \"-foo\") from the email address\n yahoo_remove_subaddress: true,\n\n // The following conversions are specific to Yandex\n // Lowercases the local part of the Yandex address (known to be case-insensitive)\n yandex_lowercase: true,\n\n // The following conversions are specific to iCloud\n // Lowercases the local part of the iCloud address (known to be case-insensitive)\n icloud_lowercase: true,\n // Removes the subaddress (e.g. \"+foo\") from the email address\n icloud_remove_subaddress: true\n};\n\n// List of domains used by iCloud\nvar icloud_domains = ['icloud.com', 'me.com'];\n\n// List of domains used by Outlook.com and its predecessors\n// This list is likely incomplete.\n// Partial reference:\n// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/\nvar outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com'];\n\n// List of domains used by Yahoo Mail\n// This list is likely incomplete\nvar yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com'];\n\n// List of domains used by yandex.ru\nvar yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru'];\n\n// replace single dots, but not multiple consecutive dots\nfunction dotsReplacer(match) {\n if (match.length > 1) {\n return match;\n }\n return '';\n}\n\nfunction normalizeEmail(email, options) {\n options = merge(options, default_normalize_email_options);\n\n var raw_parts = email.split('@');\n var domain = raw_parts.pop();\n var user = raw_parts.join('@');\n var parts = [user, domain];\n\n // The domain is always lowercased, as it's case-insensitive per RFC 1035\n parts[1] = parts[1].toLowerCase();\n\n if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') {\n // Address is GMail\n if (options.gmail_remove_subaddress) {\n parts[0] = parts[0].split('+')[0];\n }\n if (options.gmail_remove_dots) {\n // this does not replace consecutive dots like example..email@gmail.com\n parts[0] = parts[0].replace(/\\.+/g, dotsReplacer);\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.gmail_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1];\n } else if (icloud_domains.indexOf(parts[1]) >= 0) {\n // Address is iCloud\n if (options.icloud_remove_subaddress) {\n parts[0] = parts[0].split('+')[0];\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.icloud_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) {\n // Address is Outlook.com\n if (options.outlookdotcom_remove_subaddress) {\n parts[0] = parts[0].split('+')[0];\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.outlookdotcom_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n } else if (yahoo_domains.indexOf(parts[1]) >= 0) {\n // Address is Yahoo\n if (options.yahoo_remove_subaddress) {\n var components = parts[0].split('-');\n parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0];\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.yahoo_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n } else if (yandex_domains.indexOf(parts[1]) >= 0) {\n if (options.all_lowercase || options.yandex_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preffered\n } else if (options.all_lowercase) {\n // Any other address\n parts[0] = parts[0].toLowerCase();\n }\n return parts.join('@');\n}\n\nvar version = '10.7.0';\n\nvar validator = {\n version: version,\n toDate: toDate,\n toFloat: toFloat,\n toInt: toInt,\n toBoolean: toBoolean,\n equals: equals,\n contains: contains,\n matches: matches,\n isEmail: isEmail,\n isURL: isURL,\n isMACAddress: isMACAddress,\n isIP: isIP,\n isIPRange: isIPRange,\n isFQDN: isFQDN,\n isBoolean: isBoolean,\n isAlpha: isAlpha,\n isAlphanumeric: isAlphanumeric,\n isNumeric: isNumeric,\n isPort: isPort,\n isLowercase: isLowercase,\n isUppercase: isUppercase,\n isAscii: isAscii,\n isFullWidth: isFullWidth,\n isHalfWidth: isHalfWidth,\n isVariableWidth: isVariableWidth,\n isMultibyte: isMultibyte,\n isSurrogatePair: isSurrogatePair,\n isInt: isInt,\n isFloat: isFloat,\n isDecimal: isDecimal,\n isHexadecimal: isHexadecimal,\n isDivisibleBy: isDivisibleBy,\n isHexColor: isHexColor,\n isISRC: isISRC,\n isMD5: isMD5,\n isHash: isHash,\n isJWT: isJWT,\n isJSON: isJSON,\n isEmpty: isEmpty,\n isLength: isLength,\n isByteLength: isByteLength,\n isUUID: isUUID,\n isMongoId: isMongoId,\n isAfter: isAfter,\n isBefore: isBefore,\n isIn: isIn,\n isCreditCard: isCreditCard,\n isISIN: isISIN,\n isISBN: isISBN,\n isISSN: isISSN,\n isMobilePhone: isMobilePhone,\n isPostalCode: isPostalCode,\n isPostalCodeLocales: locales,\n isCurrency: isCurrency,\n isISO8601: isISO8601,\n isRFC3339: isRFC3339,\n isISO31661Alpha2: isISO31661Alpha2,\n isISO31661Alpha3: isISO31661Alpha3,\n isBase64: isBase64,\n isDataURI: isDataURI,\n isMagnetURI: isMagnetURI,\n isMimeType: isMimeType,\n isLatLong: isLatLong,\n ltrim: ltrim,\n rtrim: rtrim,\n trim: trim,\n escape: escape,\n unescape: unescape,\n stripLow: stripLow,\n whitelist: whitelist,\n blacklist: blacklist$1,\n isWhitelisted: isWhitelisted,\n normalizeEmail: normalizeEmail,\n toString: toString\n};\n\nreturn validator;\n\n})));\n", "\n/* shorter version of addClass and removeClass */\n(function( $ ) {\n $.fn.isHidden = function(customClass) {\n\n customClass = customClass || 'is-hidden';\n\n this.each(function() {\n $(this).addClass(customClass);\n });\n\n return this;\n };\n}( jQuery ));\n\n(function( $ ) {\n $.fn.isShown = function(customClass) {\n\n customClass = customClass || 'is-hidden';\n\n this.each(function() {\n $(this).removeClass(customClass);\n });\n\n return this;\n };\n}( jQuery ));\n\n/* Synonyms for above functions */\n(function( $ ) {\n $.fn.isNotShown = $.fn.isHidden;\n}( jQuery ));\n\n(function( $ ) {\n $.fn.isNotHidden = $.fn.isShown;\n}( jQuery ));\n\n\n/* One line show or hide based on expression */\n(function( $ ) {\n $.fn.isShownWhen = function(expression) {\n\n var thisInstance = this;\n\n if (!!expression) {\n thisInstance.each(function() {\n $(this).isShown();\n });\n } else {\n thisInstance.each(function() {\n $(this).isHidden();\n });\n }\n\n return this;\n };\n}( jQuery ));\n\n/* One line show or hide based on expression */\n(function( $ ) {\n $.fn.isHiddenWhen = function(expression) {\n\n var thisInstance = this;\n\n if (!!expression) {\n thisInstance.each(function() {\n $(this).isHidden();\n });\n } else {\n thisInstance.each(function() {\n $(this).isShown();\n });\n }\n\n return this;\n };\n}( jQuery ));\n\n/* One line show or hide based on expression */\n(function( $ ) {\n $.fn.addClassWhen = function(expression, classToAdd) {\n\n var thisInstance = this;\n\n if (!!expression) {\n thisInstance.each(function() {\n $(this).addClass(classToAdd);\n });\n } else {\n thisInstance.each(function() {\n $(this).removeClass(classToAdd);\n });\n }\n\n return this;\n };\n}( jQuery ));\n\n/* One line show or hide based on expression */\n(function( $ ) {\n $.fn.removeClassWhen = function(expression, classToAdd) {\n\n var thisInstance = this;\n\n if (!!expression) {\n thisInstance.each(function() {\n $(this).removeClass(classToAdd);\n });\n } else {\n thisInstance.each(function() {\n $(this).addClass(classToAdd);\n });\n }\n\n return this;\n };\n}( jQuery ));\n\n/* Easier to write selecting by attribute */\n(function( $ ) {\n $.elementWithAttr = function(attrName, attrValue) {\n if ($.isEmptyObject(attrValue)) {\n return $('['+attrName+']');\n } else {\n return $('['+attrName+'=\"'+attrValue+'\"]');\n }\n };\n}( jQuery ));\n\n/* Easier to write document on and provides Namespacing for events */\n(function( $ ) {\n $.On = function(event, selector, callbackFunction) {\n var returned = $(document).on(event+'.simplyFramework', selector, callbackFunction);\n return returned;\n };\n}( jQuery ));\n\n/* Easier to write on click element with attribute and attribute value */\n$.On.clickElementWithAttribute = function(attr, callbackFunction) {\n var returned = $.On('click', '['+attr+']', function(event) {\n var attrVal = $(this).attr(attr);\n callbackFunction(attrVal, event);\n });\n return returned;\n};\n\n/* Shorter way of declaring that only elements with attribute of specific value shoudl be shown */\n(function( $ ) {\n $.fn.isShownWhenItsAttrEquals = function(attr, valueToEqual) {\n\n var thisInstance = this;\n thisInstance.each(function() {\n var attrVal = $(this).attr(attr);\n $(this).isShownWhen(attrVal == valueToEqual);\n });\n\n return this;\n };\n}( jQuery ));", "(function() {\n\n try {\n // if twice in a row document preloading complete will not happen, we clear local storage\n var previousCounter = localStorage.getItem('fallback-local-storage-counter') || 0;\n var currentCounter = previousCounter + 1;\n localStorage.setItem('fallback-local-storage-counter', currentCounter);\n\n if (currentCounter > 2) {\n localStorage.clear();\n console.warn('Fallback clearing local storage...'); \n }\n\n $.On('preloadingComplete', function() {\n localStorage.setItem('fallback-local-storage-counter', 0);\n });\n\n //if last succesful document preloadingComplete happened more than specific time, we clear local storage\n var dateNow = Date.now();\n var previousTimestamp = localStorage.getItem('fallback-local-storage-timestamp') || dateNow;\n var currentTimestamp = dateNow;\n var timestampDifference = currentTimestamp - previousTimestamp;\n var timeToKeepLocalStorage = 259200000; //3 days\n\n if (timestampDifference > timeToKeepLocalStorage) {\n localStorage.clear();\n console.warn('Clearing old local storage...'); \n }\n\n $.On('preloadingComplete', function() {\n localStorage.setItem('fallback-local-storage-timestamp', currentTimestamp);\n });\n } catch (error) {\n console.error('Error while initialising local storage fallbacks... ');\n console.error(error);\n }\n \n})();", "jQuery.fn.extend({\n //TODO: remove transition JS from here?\n fadeOutAndHide: function(duration, classToAdd, functionAfterFadeOut) {\n\n if (typeof classToAdd === 'undefined') {\n classToAdd = 'is-hidden';\n } else if (typeof classToAdd === 'function') {\n functionAfterFadeOut = classToAdd;\n classToAdd = 'is-hidden';\n }\n\n \tif (this.hasClass(classToAdd) === false) {\n \t\tthis.transition({opacity: 0}, duration, function() {\n \t\t\t$(this).addClass(classToAdd);\n if (typeof functionAfterFadeOut !== 'undefined') functionAfterFadeOut();\n \t\t});\n \t}\n },\n showWithFunctionBeforeShowing: function(classToRemove, functionBeforeShowing) {\n if (typeof classToRemove === 'undefined') {\n classToRemove = 'is-hidden';\n } else if (typeof classToRemove === 'function') {\n functionBeforeShowing = classToRemove;\n classToRemove = 'is-hidden';\n }\n\n if (this.hasClass(classToRemove) === true) {\n if (typeof functionBeforeShowing !== 'undefined') {\n functionBeforeShowing();\n }\n\n $(this).removeClass(classToRemove);\n }\n },\n showAndFadeIn: function(duration, classToRemove, functionBeforeShowing) {\n \tif (typeof classToRemove === 'undefined') {\n classToRemove = 'is-hidden';\n } else if (typeof classToRemove === 'function') {\n functionBeforeShowing = classToRemove;\n classToRemove = 'is-hidden';\n }\n\n \tif (this.hasClass(classToRemove) === true) {\n\t \tthis.transition({opacity: 0}, 0, function() {\n $(this).removeClass(classToRemove);\n if (typeof functionBeforeShowing !== 'undefined') functionBeforeShowing();\n\t \t\t$(this).transition({opacity: 1}, duration);\n\t \t});\n \t}\n },\n hideWithScaleEffect: function(duration, classToToggle, functionAfterFadeOut) {\n\n if (typeof classToToggle === 'undefined') {\n classToToggle = 'is-hidden';\n } else if (typeof classToToggle === 'function') {\n functionAfterFadeOut = classToToggle;\n classToToggle = 'is-hidden';\n }\n\n if (this.hasClass(classToToggle) === false) {\n this.transition({opacity: 0, scale: 0.8}, duration, function() {\n $(this).addClass(classToToggle);\n if (typeof functionAfterFadeOut !== 'undefined') functionAfterFadeOut();\n });\n }\n },\n showWithScaleEffect: function(duration, classToToggle, functionBeforeShowing) {\n if (typeof classToToggle === 'undefined') {\n classToToggle = 'is-hidden';\n } else if (typeof classToToggle === 'function') {\n functionBeforeShowing = classToToggle;\n classToToggle = 'is-hidden';\n }\n\n if (typeof functionBeforeShowing === 'undefined') {\n functionBeforeShowing = function() {};\n }\n\n if (this.hasClass(classToToggle) === true) {\n this.transition({opacity: 0, scale: 0.8}, 0, function() {\n functionBeforeShowing();\n $(this).removeClass(classToToggle);\n $(this).transition({opacity: 1, scale: 1}, duration);\n });\n }\n },\n loadAndFadeIn: function(whatToLoad, duration, callbackFunctionBeforeFadeIn) {\n var containerToLoadAndFadeIn = this;\n containerToLoadAndFadeIn.transition({opacity: 0}, 0, function() {\n containerToLoadAndFadeIn.load(whatToLoad, function() {\n if (typeof callbackFunctionBeforeFadeIn !== 'undefined') callbackFunctionBeforeFadeIn();\n containerToLoadAndFadeIn.transition({opacity: 1}, duration);\n });\n });\n },\n // showWithVerticalSlideEffect: function(duration, classToToggle, functionBeforeShowing) {\n // if (typeof classToToggle === 'undefined') {\n // classToToggle = 'is-hidden';\n // } else if (typeof classToToggle === 'function') {\n // functionBeforeShowing = classToToggle;\n // classToToggle = 'is-hidden';\n // }\n\n // if ($(this).closest('.slide-transition-wrapper').length === 0) {\n // $(this).wrap('
');\n // }\n\n // var $thisTransitionWrapper = $(this).closest('.slide-transition-wrapper');\n // var $thisElement = $(this);\n\n // if ($thisElement.hasClass(classToToggle) === true) {\n // $thisTransitionWrapper.transition({opacity: 0, maxHeight: 0, overflow: 'hidden'}, 0, function() {\n // if (typeof functionBeforeShowing !== 'undefined') functionBeforeShowing();\n // $thisElement.removeClass(classToToggle);\n // var originalHeight = $thisElement.height();\n // $thisTransitionWrapper.transition({opacity: 1, maxHeight: originalHeight + 200}, duration, function() {\n // $thisTransitionWrapper.attr({style: ''});\n // });\n // });\n // }\n // },\n // hideWithVerticalSlideEffect: function(duration, classToToggle, functionAfterFadeOut) {\n\n // if (typeof classToToggle === 'undefined') {\n // classToToggle = 'is-hidden';\n // } else if (typeof classToToggle === 'function') {\n // functionAfterFadeOut = classToToggle;\n // classToToggle = 'is-hidden';\n // }\n\n // if ($(this).closest('.slide-transition-wrapper').length === 0) {\n // $(this).wrap('
');\n // }\n\n // var $thisTransitionWrapper = $(this).closest('.slide-transition-wrapper');\n // var $thisElement = $(this);\n\n // var originalHeight = $thisTransitionWrapper.height();\n // console.log(originalHeight);\n\n // if ($thisElement.hasClass(classToToggle) === false) {\n // $thisTransitionWrapper.transition({opacity: 1, maxHeight: originalHeight + 200, overflow: 'hidden'}, 0, function() {\n // $thisTransitionWrapper.transition({opacity: 0, maxHeight: 0}, duration, function() {\n // $thisElement.addClass(classToToggle);\n // if (typeof functionAfterFadeOut !== 'undefined') functionAfterFadeOut();\n // $thisElement.attr({style: ''});\n // });\n // });\n // }\n // },\n});\n\n//Idea: show with directional effect, coming from where mouse was clicked\n//Get XY coordinates where mouse was clicked on screen\n//Get coordinates where the target element is shown on screen\n//Calculate the delta between them\n//Use this delta for CSS transition XY\njQuery.fn.extend({\n showWithClickTransitionEffect: function(duration, classToToggle, functionBeforeShowing) {\n if (typeof classToToggle === 'undefined') {\n classToToggle = 'is-hidden';\n } else if (typeof classToToggle === 'function') {\n functionBeforeShowing = classToToggle;\n classToToggle = 'is-hidden';\n }\n\n if (typeof functionBeforeShowing === 'undefined') {\n functionBeforeShowing = function() {};\n }\n\n if (this.hasClass(classToToggle) === true) {\n this.transition({opacity: 0, scale: 0.2}, 0, function() {\n functionBeforeShowing();\n $(this).removeClass(classToToggle);\n\n var clickX = event.pageX;\n var clickY = event.pageY;\n\n var leftPos = this[0].getBoundingClientRect().left + $(window)['scrollLeft']();\n var rightPos = this[0].getBoundingClientRect().right + $(window)['scrollLeft']();\n var topPos = this[0].getBoundingClientRect().top + $(window)['scrollTop']();\n var bottomPos= this[0].getBoundingClientRect().bottom + $(window)['scrollTop']();\n var centerX = (leftPos+rightPos)/2;\n var centerY = (topPos+bottomPos)/2;\n\n var xDelta = centerX - clickX;\n var yDelta = centerY - clickY;\n\n console.log(event);\n console.log(clickY);\n console.log(topPos);\n console.log(xDelta);\n console.log(yDelta);\n\n $(this).transition({x: -xDelta*2.5, y: -yDelta*2.5}, 0, function() {\n $(this).transition({opacity: 1, scale: 1, x: 0, y: 0}, duration);\n });\n });\n }\n\n }\n});\n\n\n\n\n\n", "//preload all views into respective containers\n//until the subpages are loaded the UI is covered by loading overlay\n//after they are preloaded, we retrigger the state of all components\n//and fade in the UI to prevent flicker\n//we can define for what specific events we wait until we show the UI,\n//for example we may want to preload not only subpages, but additional promo modals etc.\n\n\nfunction recursivelyPreloadElements() {\n\tvar preloadMissingElements = function() {\n\t\tvar elementsThatWillBePreloaded = $('[preload-from]').not('[preloading-started]').not('[preloading-done]');\n\t\t//mark all elements that will be preloaded\n\t\telementsThatWillBePreloaded.attr('preloading-started', 'true');\n\n\t\telementsThatWillBePreloaded.each(function() {\n\t\t\tvar elemToLoad = $(this).attr('preload-from');\n\t\t\tvar $this = $(this);\n\t\t\tvar loadURL = window.location.origin+'/'+elemToLoad;\n\t\t\tvar loadElement = \"\";\n\t\t\tif (!elemToLoad.includes('[')) {\n\t\t\t\tloadElement = \" .content-to-load\";\n\t\t\t}\n\t\t\t//console.log(loadElement);\n\t\t\t$this.load(loadURL + loadElement, function() {\n\t\t\t\t$this.attr('preloading-done', 'true');\n\n\t\t\t\t//if loaded element first class is the same as parent we want to remove the doubled wrapper\n\n\t\t\t\tvar firstClassOfParent = $this.attr(\"class\").split(/\\s+/)[0];\n\t\t\t\tif ($this.children().length === 0) {\n\t\t\t\t\tconsole.log($this);\n\t\t\t\t\tconsole.log(\"Preloading failed - your child element probably doesn't have a correct attribute\")\n\t\t\t\t} else {\n\t\t\t\t\tvar firstClassOfLoaded = $this.children().first().attr(\"class\").split(/\\s+/)[0];\n\t\t\t\t\tif (firstClassOfParent === firstClassOfLoaded && $this.children().length === 1) {\n\t\t\t\t\t\t$this.children().children().unwrap();\n\t\t\t\t\t}\n\t\t\t\t\t//TODO this is not the best pattern, hard to document\n\t\t\t\t}\n\n\t\t\t\tcheckIfEverythingIsPreloaded();\n\t\t\t});\n\t\t});\n\t};\n\n\tvar checkIfEverythingIsPreloaded = function() {\n\t\t//check if there are no elements that has not yet been started preloading\n\t\tvar numberOfUnitialisedElements = $('[preload-from]').not('[preloading-started]').not('[preloading-done]').length;\n\t\tvar numberOfInProgressElements = $('[preload-from][preloading-started]').not('[preloading-done]').length;\n\n\t\tif (numberOfUnitialisedElements === 0 && numberOfInProgressElements === 0) {\n\t\t\t$(document).trigger('preloadedElementsReady');\n\t\t} else if (numberOfUnitialisedElements === 0 && numberOfInProgressElements > 0) {\n\t\t\t//console.log('Preloading still in progress...');\n\t\t\t//do nothing because other elements will continue recursive preloading\n\t\t} else if (numberOfUnitialisedElements > 0){\n\t\t\tconsole.log('Noticed elements to preload...');\n\t\t\tpreloadMissingElements(); //rerun the checking function\n\t\t}\n\t};\n\n\tcheckIfEverythingIsPreloaded();\n}\n\nfunction initInteractionElements() {\n\thandleProtoflowAttributeToParent();\n\thandleProtoflowAttributeToPreviousSibling();\n\tinitInteractionElement__addClassWhen();\n\tinitInteractionElement__isShownWhen();\n}\n\nfunction initTheUIAfterPreloading() {\n\tinitInteractionElements();\n\t$(document).trigger('preloadingComplete');\n\tsetTimeout(function() {\n\t\tStateURL.retriggerOnParamChangeForAll();\n\t}, 0);\n\tsetTimeout(function() {\n\t\tState.retriggerOnParamChangeForAll();\n\t}, 0);\t\n\tsetTimeout(function() {\n\t\tif ($('.initial-load-overlay').length > 0) {\n\t\t\t$('.initial-load-overlay').fadeOutAndHide(500);\n\t\t}\n\t}, 0);\n}\n\nfunction waitForInitialAjaxLoadingToFinishThenShowUI(eventsToWaitFor, callbackFunction) {\n\n\tvar numberOfEventsThatHappened = 0;\n\n\t$.each(eventsToWaitFor, function(index, value) {\n\t\t$(document).one(value, function() {\n\t\t\t//TODO refactor so that it checks if the specific events happened, not number of elements\n\t\t\tnumberOfEventsThatHappened = numberOfEventsThatHappened + 1;\n\t\t\tif (numberOfEventsThatHappened === eventsToWaitFor.length) {\n\t\t\t\tif (typeof callbackFunction === 'function') { callbackFunction(); }\n\t\t\t\tconsole.log('Preloading complete');\n\t\t\t}\n\t\t});\n\t});\n}\n\nvar preloadingComplete = false;\nwaitForInitialAjaxLoadingToFinishThenShowUI([\n\t// reserved place in case we need to wait for more events\n\t'preloadedElementsReady'\n], function() {\n\t$(document).ready(function() {\n\t\tif (preloadingComplete === false) {\n\t\t\tinitTheUIAfterPreloading();\n\t\t\tpreloadingComplete = true;\n\t\t}\n\t});\n});\n\nrecursivelyPreloadElements();\n\n", "//helpful shortcuts for shorter code\n\n/* One line to show or hide element selected by attribute if its value equal to specific value */\nfunction showOnlyElementsWithAttributeXMatchingY(attributeName, valueToMatch) {\n $('['+attributeName+']').each(function() {\n var attrVal = $(this).attr(attributeName);\n $(this).isShownWhen(attrVal == valueToMatch);\n });\n}\n\n/* One line to show or hide element selected by attribute if its value equal to specific value */\nfunction addClassToElementsWithAttributeXMatchingY(attributeName, valueToMatch, classToAdd) {\n $('['+attributeName+']').each(function() {\n var attrVal = $(this).attr(attributeName);\n $(this).addClassWhen(attrVal == valueToMatch, classToAdd);\n $(this).find('[simply-also-add-class-to-this]').addClassWhen(attrVal == valueToMatch, classToAdd);\n });\n}\n\n/* Quick one line showing or hiding element depending on reactive local storage param value */\n(function( $ ) {\n $.fn.onlyShowWhenReactiveLocalStorageParamEquals = function(paramName, valueToEqual) {\n\n var thisInstance = this;\n\n State.onParamChange(paramName, function(value) {\n thisInstance.each(function() {\n $(this).isShownWhen(value == valueToEqual);\n });\n });\n\n return this;\n };\n}( jQuery ));\n\n//easier to read syntax for attribute selectors\nfunction elementWithAttr(attrName, attrValue) {\n if ($.isEmptyObject(attrValue)) {\n return '['+attrName+']';\n } else {\n return '['+attrName+'=\"'+attrValue+'\"]';\n }\n}\n\n/* Synonyms for state management libraries */\n//TODO remove this\n(function( $ ) {\n $.State = function(storageType) {\n storageType = storageType || 'localStorage';\n\n if (storageType === 'localStorage') {\n return ReactiveLocalStorage;\n } else if (storageType.toLowerCase() === 'url') {\n return QueryStringRouter;\n } else if (storageType.toLowerCase() === 'session') {\n //TODO\n }\n };\n}( jQuery ));\n\n$(document).on('click', '[js-prevent-default]', function(e) {\n e.preventDefault();\n});\n\n$(document).on('click', '[js-stop-propagation]', function(e) {\n e.stopPropagation();\n});\n\n$.On.clickElementWithAttribute('js-go-to-url', function(attrVal) {\n window.location.href = attrVal;\n});\n\n$.On.clickElementWithAttribute('js-go-to-url-in-new-tab', function(attrVal) {\n window.open(attrVal, '_blank').focus();\n});\n\n/* Get attribute value from closest element with this attrubite */\n(function( $ ) {\n $.fn.closestElementAttrValue = function(attr) {\n\n var thisInstance = this;\n\n var closest = $(this).closest('['+attr+']');\n var attrValue = closest.attr(attr);\n\n return attrValue;\n };\n}( jQuery ));\n\n/* Adding class for odd and even elements */\n(function( $ ) {\n $.fn.addClassToOddChildren = function(className) {\n var thisInstance = this;\n var oddChildren = $(this).children().odd();\n oddChildren.addClass(className);\n return this;\n };\n}( jQuery ));\n\n$.On('preloadingComplete', function() {\n $('[js-add-class-to-odd-children]').each(function() {\n var classToAdd = $(this).attr('js-add-class-to-odd-children');\n $(this).addClassToOddChildren(classToAdd);\n });\n});\n\n(function( $ ) {\n $.fn.addClassToEvenChildren = function(className) {\n var thisInstance = this;\n var evenChildren = $(this).children().even();\n evenChildren.addClass(className);\n return this;\n };\n}( jQuery ));\n\n$.On('preloadingComplete', function() {\n $('[js-add-class-to-even-children]').each(function() {\n var classToAdd = $(this).attr('js-add-class-to-even-children');\n $(this).addClassToEvenChildren(classToAdd);\n });\n});\n\n$('[simply-webflow-video-player]').each(function() {\n $thisVideo = $(this).find('video');\n $thisVideo.attr('controls', '');\n $thisVideo.css('z-index', 'auto');\n});\n\n$('[simply-webflow-video-autoplay-off]').each(function() {\n $thisVideo = $(this).find('video');\n $thisVideo.removeAttr('autoplay');\n});\n\n", "var State = SimplyCreateStateStore('SimplyFrameworkState__localStorage', {type: 'localStorage'});\nvar StateSession = SimplyCreateStateStore('SimplyFrameworkState__sessionStorage', {type: 'sessionStorage'});\nvar StateNonPersistent = SimplyCreateStateStore('SimplyFrameworkState__nonPersistent', {type: 'nonPersistent'});\nvar StateURL = SimplyCreateStateStore('SimplyFrameworkState__URL', {type: 'URL'});\n\nfunction SimplyCreateStateStore(storageName, options) {\n\treturn (function() {\n\t\toptions = options || {};\n\n\t\tvar isLocalStorageNameSupported = (function() {\n\t var testKey = 'test';\n\t var storage = window.localStorage;\n\t try {\n\t storage.setItem(testKey, '1');\n\t storage.removeItem(testKey);\n\t return true;\n\t } catch (error) {\n\t \tconsole.error('Local Storage is not working... Fallback used.');\n\t return false;\n\t }\n\t\t})();\n\n\t\tvar isSessionStorageNameSupported = (function() {\n\t var testKey = 'test';\n\t var storage = window.sessionStorage;\n\t try {\n\t storage.setItem(testKey, '1');\n\t storage.removeItem(testKey);\n\t return true;\n\t } catch (error) {\n\t console.error('Session Storage is not working... Fallback used.');\n\t return false;\n\t }\n\t\t})();\n\n\t\t//the condition is to degrade to regular variables if localStorage is not supported,\n\t\t//especially happens in Safari iOS incognito mode\n\n\t\tvar typeOfStorage = (function() {\n\t\t\tif (isLocalStorageNameSupported && typeof options.type === 'undefined' ||\n\t\t\t\tisLocalStorageNameSupported && options.type === 'localStorage') {\n\t\t\t\treturn 'localStorage';\n\t\t\t} else if (isSessionStorageNameSupported && options.type === 'sessionStorage') {\n\t\t\t\treturn 'sessionStorage';\n\t\t\t} else if (!isSessionStorageNameSupported || options.type === 'nonPersistent') {\n\t\t\t\treturn \"nonPersistent\";\n\t\t\t} else if (options.type === \"URL\") {\n\t\t\t\treturn \"URL\";\n\t\t\t}\n\t\t})();\n\n\t\tvar storage = (function() {\n\t\t\tif (typeOfStorage === \"localStorage\") {\n\t\t\t\treturn window.localStorage;\n\t\t\t} else if (typeOfStorage === \"sessionStorage\") {\n\t\t\t\treturn window.sessionStorage;\n\t\t\t}\n\t\t})();\n\n\t\tvar parse = (function() {\n\t\t\tif (typeOfStorage === \"URL\") {\n\t\t\t\treturn deparam; //needed for decoding URL query strings\n\t\t\t} else {\n\t\t\t\treturn window.JSON.parse;\n\t\t\t}\n\t\t})();\n\n\t\tvar stringify = (function() {\n\t\t\tif (typeOfStorage === \"URL\") {\n\t\t\t\treturn $.param;\n\t\t\t} else {\n\t\t\t\treturn window.JSON.stringify;\n\t\t\t}\n\t\t})();\n\n\t\tvar storageString = stringify({}); //this will be a string containing params to save in local storage\n\t\tvar storageSavingTimer; //debouncing the slow storage operation\n\t\tvar doNotCreateHistoryState = true; //flag for recognizing if one of events should create history state\n\n\t\tvar saveParamObjectAsString = function(paramsObject, options) {\n\t\t\toptions = options || {};\n\n\t\t\tstorageString = stringify(paramsObject);\n\t\t\tclearTimeout(storageSavingTimer);\n\n\t\t\tif (typeOfStorage === 'localStorage' || typeOfStorage === 'sessionStorage') {\n\n\t\t\t\tstorageSavingTimer = setTimeout(function() {\n\t\t\t\t\tstorage.setItem(storageName, storageString);\n\t\t\t\t}, 50);\n\n\t\t\t} else if (typeOfStorage === 'URL') {\n\n\t\t\t\t//if at least one of triggers does not have the options doNotCreateHistoryState,\n\t\t\t\t//we should create a new state in the debounced function\n\t\t\t\tif (!options.doNotCreateHistoryState) {\n\t\t\t\t\tdoNotCreateHistoryState = false;\n\t\t\t\t}\n\n\t\t\t\tstorageSavingTimer = setTimeout(function() {\n\n\t\t\t\t\tvar docTitle = document.title;\n\t\t\t\t\tif (typeof docTitle === 'undefined') {\n\t\t\t\t\t\tdocTitle = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (doNotCreateHistoryState == true) {\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\twindow.history.replaceState(paramsObject, docTitle, '?'+storageString);\n\t\t\t\t\t\t}, 100);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\twindow.history.pushState(paramsObject, docTitle, '?'+storageString);\n\t\t\t\t\t\t\tdoNotCreateHistoryState = true;\n\t\t\t\t\t\t}, 100);\n\t\t\t\t\t}\n\n\t\t\t\t}, 50);\n\n\n\t\t\t}\n\t\t};\n\n\t\tfunction checkIfParamsAreAlreadyStoredInStorage() {\n\t\t\tif (typeof storage.getItem(storageName) == 'undefined' || storage.getItem(storageName) == null) {\n\t\t\t\tvar paramsObject = {};\n\t\t\t\tsaveParamObjectAsString(paramsObject);\n\t\t\t} else {\n\t\t\t\tvar stringFromLocalStorage = storage.getItem(storageName);\n\t\t\t\ttry {\n\t\t\t\t\tparse(stringFromLocalStorage);\n\t\t\t\t\tstorageString = stringFromLocalStorage;\n\t\t\t\t} catch(err) {\n\t\t\t\t\tconsole.error('Could not parse storage string');\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t\tstorageString = stringify({});\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshFromStorage() {\n\t\t\tif (typeOfStorage === \"localStorage\" || typeOfStorage === \"sessionStorage\") {\n\t\t\t\tcheckIfParamsAreAlreadyStoredInStorage();\n\t\t\t}\n\t\t}\n\t\trefreshFromStorage();\n\n\t\t//only if state is stored in URL, we need to handle history back and forward events\n\t\t//we diff against the previous params, so that we can remove the params that are not present\n\t\t//in the query string from the reactive params\n\t\tif (typeOfStorage === \"URL\") {\n\t\t\tvar queryString = window.location.search.substring(1);\n\t\t\tprocessQueryStringParams = function() {\n\t\t\t\tvar previous = parse(storageString);\n\t\t\t\tstorageString = queryString;\n\t\t\t\tvar paramsObject = parse(storageString);\n\n\t\t\t\t//check what previous params are not present in the new query string\n\t\t\t\t$.each(previous, function(key, value) {\n\t\t\t\t\tif (typeof paramsObject[key] == 'undefined') {\n\t\t\t\t\t\tdelete paramsObject[key];\n\t\t\t\t\t\t$(document).trigger(storageName+\".\"+key+'.paramChanged');\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t//only trigger params that changed from previous.\n\t\t\t\t//No need to resave as storage string because we treat queryString as source\n\t\t\t\t$.each(paramsObject, function(key, value) {\n\t\t\t\t\tif (JSON.stringify(paramsObject[key]) !== JSON.stringify(previous[key]) ) {\n\t\t\t\t\t\t$(document).trigger(storageName+'.'+key+'.paramChanged');\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tpreviousQueryString = stringify(paramsObject);\n\t\t\t};\n\t\t\tprocessQueryStringParams();\n\n\t\t\t$(window).on('popstate', function() {\n\t\t\t\tqueryString = window.location.search.substring(1);\n\t\t\t\tprocessQueryStringParams();\n\t\t\t});\n\t\t}\n\n\t\tfunction getParam(key) {\n\t\t\t//this return only values, not direct access to paramsObject\n\t\t\t//that's why we JSON.parse or deparam here\n\t\t\treturn parse(storageString)[key];\n\t\t}\n\n\t\tfunction getAllParams() {\n\t\t\treturn parse(storageString);\n\t\t}\n\n\t\tfunction setParam(key, value, options) {\n\t\t\toptions = options || {};\n\n\t\t\tvar paramsObject = parse(storageString);\n\t\t\tif (isNotEmpty(key)) {\n\t\t\t\tif (JSON.stringify(paramsObject[key]) !== JSON.stringify(value)) {\n\t\t\t\t\tparamsObject[key] = value;\n\t\t\t\t\tsaveParamObjectAsString(paramsObject, options);\n\t\t\t\t\t$(document).trigger(storageName+'.'+key+'.paramChanged');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('State manager info: cannot save empty param key');\n\t\t\t}\n\n\t\t}\n\n\t\tfunction setDefaultParam(key, value, options) {\n\t\t\tvar paramsObject = parse(storageString);\n\t\t\tif (typeof paramsObject[key] == 'undefined') {\n\t\t\t\tsetParam(key, value, options);\n\t\t\t}\n\n\t\t}\n\n\t\tfunction removeParam(key, options) {\n\t\t\toptions = options || {};\n\n\t\t\tvar paramsObject = parse(storageString);\n\n\t\t\tif (typeof paramsObject[key] !== 'undefined') {\n\t\t\t\tdelete paramsObject[key];\n\t\t\t\tsaveParamObjectAsString(paramsObject, options);\n\t\t\t\t$(document).trigger(storageName+\".\"+key+'.paramChanged');\n\t\t\t}\n\t\t}\n\n\t\tfunction setFreshParams(newParamsObj) {\n\t\t\tsaveParamObjectAsString(newParamsObj);\n\t\t\tretriggerOnParamChangeForAll();\n\t\t}\n\n\t\tvar actionsOnParamChange = {};\n\t\tfunction onParamChange(key, actionFunction, options) {\n\t\t\t$(document).on(storageName+'.'+key+'.paramChanged', function(event) {\n\t\t\t\tvar paramsObject = parse(storageString);\n\t\t\t\tvar value = paramsObject[key];\n\t\t\t\tactionFunction(value);\n\t\t\t});\n\n\t\t\t//store the action on param in a separate array, so that we can retrigger this manually\n\t\t\t//because this might be needed for ajax loaded content etc.\n\t\t\tif (typeof actionsOnParamChange[key] === 'undefined') {\n\t\t\t\tactionsOnParamChange[key] = [];\n\t\t\t}\n\t\t\tactionsOnParamChange[key].push(actionFunction);\n\t\t\t//console.log(actionsOnParamChange);\n\t\t}\n\n\t\tfunction retriggerOnParamChange(key) {\n\t\t\tvar paramsObject = parse(storageString);\n\t\t\tvar param = paramsObject[key];\n\t\t\tvar arrayOfFunctionsAssociatedWithThisParam = actionsOnParamChange[key];\n\t\t\t$.each(arrayOfFunctionsAssociatedWithThisParam, function(index, value) {\n\t\t\t\tvalue(param);\n\t\t\t});\n\t\t}\n\n\t\tfunction retriggerOnParamChangeForAll() {\n\t\t\t$.each(actionsOnParamChange, function(key, value) {\n\t\t\t\tretriggerOnParamChange(key);\n\t\t\t});\n\t\t}\n\n\t\tfunction toggleParam(key, value1, value2) {\n\t\t\tvar previousValue = getParam(key);\n\n\t\t\tif (previousValue !== value1) {\n\t\t\t\tsetParam(key, value1);\n\t\t\t} else if (previousValue !== value2) {\n\t\t\t\tsetParam(key, value2);\n\t\t\t}\n\t\t}\n\n\t\tfunction clearStorage() {\n\t\t\tparamsObject = {};\n\t\t\tsaveParamObjectAsString(paramsObject);\n\t\t}\n\n\t\tfunction clearAllButLeave(paramsToLeaveArray) {\n\n\t\t\tif (typeof paramsToLeaveArray === 'undefined') {\n\t\t\t\tconsole.error('You need to provide paramsToLeaveArray');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar allParams = getAllParams();\n\n\t\t\t$.each(allParams, function(key, value) {\n\t\t\t\tif ( $.inArray(key, paramsToLeaveArray) === -1 ) {\n\t\t\t\t\tdelete allParams[key];\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif ($.isEmptyObject(allParams)) {\n\t\t\t\tclearStorage();\n\t\t\t} else {\n\t\t\t\tsaveParamObjectAsString(allParams);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tstorageName: storageName,\n\t\t\tsetParam: setParam,\n\t\t\tset: setParam, //shorter synonym\n\t\t\ttoggleParam: toggleParam,\n\t\t\ttoggle: toggleParam,\n\t\t\tgetAllParams: getAllParams,\n\t\t\tsetFreshParams: setFreshParams,\n\t\t\tsetDefaultParam: setDefaultParam,\n\t\t\tsetDefault: setDefaultParam, //shorter synonym\n\t\t\tgetParam: getParam,\n\t\t\tget: getParam, //shorter synonym\n\t\t\tonParamChange: onParamChange,\n\t\t\tonChange: onParamChange, //shorter synonym\n\t\t\tretriggerOnParamChange: retriggerOnParamChange,\n\t\t\ttriggerParam: retriggerOnParamChange, //shorter alias\n\t\t\tretriggerOnParamChangeForAll: retriggerOnParamChangeForAll,\n\t\t\ttriggerAllParams: retriggerOnParamChangeForAll, //shorter synonym\n\t\t\tremoveParam: removeParam,\n\t\t\tremove: removeParam, //shorter synonym\n\t\t\tactionsOnParamChange: actionsOnParamChange,\n\t\t\tclearStorage: clearStorage,\n\t\t\tclearAllButLeave: clearAllButLeave,\n\t\t\trefreshFromStorage: refreshFromStorage, //useful to communicate between tabs\n\t\t\tversion: 1,\n\t\t};\n\n\t})();\n}\n\n\n\n", "SimplyExtendStoreWithArrayOperations(State);\nSimplyExtendStoreWithArrayOperations(StateSession);\nSimplyExtendStoreWithArrayOperations(StateNonPersistent);\n\nfunction SimplyExtendStoreWithArrayOperations(store) {\n\tstore.appendToBeginningOfTheArray = function(paramNameThatContainsArray, objectToAppend) {\n\t\tvar array = store.getParam(paramNameThatContainsArray);\n\n\t\tif (typeof array === 'undefined') {\n\t\t\tarray = [];\n\t\t}\n\n\t\tarray.unshift(objectToAppend);\n\n\t\tstore.setParam(paramNameThatContainsArray, array);\n\n\t\treturn array;\n\t};\n\n\tstore.appendToArray = function(paramNameThatContainsArray, objectToAppend) {\n\t\tvar array = store.getParam(paramNameThatContainsArray);\n\n\t\tif (typeof array === 'undefined') {\n\t\t\tarray = [];\n\t\t}\n\n\t\tarray.push(objectToAppend);\n\n\t\tstore.setParam(paramNameThatContainsArray, array);\n\n\t\treturn array;\n\t};\n\n\tstore.removeElementFromArrayXWithIdY = function(paramNameThatContainsArray, idThatShouldBeRemoved) {\n\t\tvar array = store.getParam(paramNameThatContainsArray);\n\n\t\tarray = $.grep(array, function(elementOfArray, indexInArray){\n\t\t\treturn elementOfArray.id != idThatShouldBeRemoved;\n\t\t});\n\n\t\tstore.setParam(paramNameThatContainsArray, array);\n\n\t\treturn array;\n\t};\n\n\tstore.removeElementFromArrayXWithIndexY = function(paramNameThatContainsArray, indexToRemove) {\n\t\tvar array = store.getParam(paramNameThatContainsArray);\n\n\t\tarray.splice(indexToRemove, 1);\n\n\t\tstore.setParam(paramNameThatContainsArray, array);\n\n\t\treturn array;\n\t};\n\n\tstore.updateObjectInArray = function(paramNameThatContainsArray, options) {\n\t\tvar array = store.getParam(paramNameThatContainsArray);\n\n\t\t//this is to show the schema of options here in code\n\t\tvar idToLookFor = options.findObjectWithId;\n\t\tvar propertyToUpdate = options.propertyToUpdate;\n\t\tvar newValue = options.newValue;\n\n\t\t$.grep(array, function(elementOfArray, indexInArray){\n\t\t\tif (elementOfArray['id'] === idToLookFor || elementOfArray['ID'] === idToLookFor) {\n\t\t\t\telementOfArray[propertyToUpdate] = newValue;\n\t\t\t}\n\t\t});\n\n\t\tstore.setParam(paramNameThatContainsArray, array);\n\n\t\treturn array;\n\t};\n\n\tstore.findInArrayXObjectWithPropertyYMatchingZ = function(paramNameThatContainsArray, objectPropertyToSearchIn, propertyValueThatShouldMatch) {\n\t\tvar array = store.getParam(paramNameThatContainsArray);\n\n\t\tif ($.isArray(array)) {\n\t\t\tvar filteredData = $.grep(array, function(elementOfArray, indexInArray){\n\t\t\t\treturn elementOfArray[objectPropertyToSearchIn] === propertyValueThatShouldMatch;\n\t\t\t});\n\t\t\tif (filteredData.length > 0) {\n\t\t\t\treturn filteredData[0];\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\n\t};\n\n\tstore.findInArrayXObjectWithIdY = function(paramNameWithArray, idThatShouldMatch) {\n\t\tvar result = store.findInArrayXObjectWithPropertyYMatchingZ(paramNameWithArray, 'id', idThatShouldMatch);\n\t\tif (typeof result === 'undefined' || result.length === 0) {\n\t\t\t//fallback for differt way to write id --> ID\n\t\t\tresult = store.findInArrayXObjectWithPropertyYMatchingZ(paramNameWithArray, 'ID', idThatShouldMatch);\n\t\t}\n\t\treturn result;\n\t};\n}", "/*\nHow to bind an array?\nAdd attributes to the DOM\n- data-bind-array=\"paramWithArrayToBind\"\n- data-bind-repeatable-template=\"true\"\n for the item that will repeat\n- data-bind-array-empty-state=\"true\" for empty state container\n\nThen initialise the binding by function, do it in a separate file related to the specific feature\nReactiveLocalStorageDataBindArrayList('transactionsInProgressList', function($elementToAppend, elementData) {\n\t//callback what to do with each item\n\t//so you can modify each of then depending on state,\n\n\tconsole.log(elementData);\n\tif (elementData.status === 'pending') {\n\t\t$elementToAppend.find('[data-bind=\"status__is-pending\"]').addClass('is-hidden');\n\t} else {\n\t\t$elementToAppend.find('[data-bind=\"status__is-pending\"]').removeClass('is-hidden');\n\t}\n});\n\n*/\n\n\nfunction ReactiveLocalStorageDataBindArrayList(paramNameWithArray, functionToModifyEachItemBeforeShowing) {\n\n\t//DON\"T SET DEFAULT EMPTY ARRAY, BECAUSE THERE\"S A BUG WITH $.PARAM IN REACTIVELOCALSTORAGE\n\t//State.setDefaultParam(paramNameWithArray, []);\n\n\tState.onParamChange(paramNameWithArray, function(value) {\n\n\t\tvar $thisList = $('[data-bind-array=\"'+paramNameWithArray+'\"]');\n\n\t\t//there might be more than one table binded to the same array, hence \"each\"\n\t\t$thisList.each(function(thisListIndex, thisListValue) {\n\n\t\t\tvar $repeatableElementTemplate = $thisList.find('[data-bind-repeatable-template]').first();\n\t\t\tvar $parentContainerWhereWeAppend = $repeatableElementTemplate.parent();\n\n\t\t\t//the template is stored in html, so we want to hide it and only use it later\n\t\t\t//as a tempalte source for repeatable items\n\t\t\t$repeatableElementTemplate.find('.tooltipstered').tooltipster('destroy');\n\t\t\t$repeatableElementTemplate.addClass('is-hidden');\n\t\t\t//$assembledList = $(\"
\");\n\n\t\t\t//empty the list before rerendering\n\t\t\t//$thisList.find('[data-bind-repeatable-clone]').remove();\n\n\n\t\t\tvar $allClones = $thisList.find('[data-bind-repeatable-clone]')\n\t\t\tvar currentNumberOfClones = $allClones.length;\n\t\t\t\n\t\t\t//remove excessive items slots (clones)\n\t\t\tif ($.isArray(value)) {\n\t\t\t\tif ($allClones.length > value.length) {\n\t\t\t\t\t$thisList.find('[data-bind-repeatable-clone]').slice(value.length).remove();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isNotEmpty(value)) {\n\t\t\t\t//hide empty state\n\t\t\t\t$thisList.find('[data-bind-array-empty-state]').addClass('is-hidden');\n\n\t\t\t\t//add the slots reusing the existing ones\n\t\t\t\tif ($allClones.length < value.length) {\n\t\t\t\t\tvar missingClones = value.length - $allClones.length;\n\t\t\t\t\tvar $elementToAppend = $repeatableElementTemplate.clone();\n\t\t\t\t\t$elementToAppend.removeAttr('data-bind-repeatable-template');\n\t\t\t\t\t$elementToAppend.attr('data-bind-repeatable-clone', 'true');\n\t\t\t\t\tfor (i = 0; i < missingClones; i++)\n\t\t\t\t\t{\n\t\t\t\t\t $elementToAppend.appendTo($parentContainerWhereWeAppend)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//update content of each corresponding clone\n\t\t\t\t$.each(value, function(arrayIndex, arrayValue) {\n\n\t\t\t\t\tvar $correspondingClone = $thisList.find('[data-bind-repeatable-clone]').eq(arrayIndex);\n\n\t\t\t\t\t//map object attributes as attributes to DOM\n\t\t\t\t\t//we need this to quickly reference respective object in ReactiveLocalStorage\n\t\t\t\t\tif (typeof arrayValue == 'object') {\n\t\t\t\t\t\t$.each(arrayValue, function(objectIndex, objectValue) {\n\t\t\t\t\t\t\t$correspondingClone.attr('item-data-'+objectIndex, objectValue);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tfunctionToModifyEachItemBeforeShowing && functionToModifyEachItemBeforeShowing($correspondingClone, arrayValue);\n\t\t\t\t\t$correspondingClone.removeClass('is-hidden');\n\t\t\t\t\t//$elementToAppend.appendTo($parentContainerWhereWeAppend);\n\n\t\t\t\t\t//$elementToAppend.showWithFunctionBeforeShowing(function() {\n\t\t\t\t\t\t//we pass the $elementToAppend to the function, so that we can\n\t\t\t\t\t\t//refer to it from other places where we init the binding\n\t\t\t\t\t\t//functionToModifyEachItemBeforeShowing($elementToAppend, arrayValue);\n\t\t\t\t\t//});\n\t\t\t\t});\n\n\t\t\t\t//$assembledList.children().appendTo($parentContainerWhereWeAppend).removeClass('is-hidden');\n\t\t\t} else {\n\t\t\t\t$thisList.find('[data-bind-array-empty-state]').removeClass('is-hidden');\n\t\t\t}\n\n\t\t\tinitTooltipster($thisList);\n\n\t\t});\n\t});\n}\n\n//use this to bind elements with attribute data-bind to selected reactive local storage params\n//TODO remove this\nfunction ReactiveLocalStorageDataBindText(objectWithAttrubiteValuePairs) {\n\t$.each(objectWithAttrubiteValuePairs, function(attribute, bidedParamValue) {\n\t\tState.onParamChange(bidedParamValue, function(value) {\n\t\t\t$('[data-bind=\"'+attribute+'\"]').text(value);\n\t\t});\n\t});\n}\n\n//automatically bind [data-bind-param] to related local storage param\n$.On('preloadingComplete', function() {\n\t$('[data-bind-param]').each(function() {\n\t\tvar paramToBind = $(this).attr('data-bind-param');\n\t\tState.onParamChange(paramToBind, function(value) {\n\t\t\t$('[data-bind-param=\"'+paramToBind+'\"]').text(value);\n\t\t});\n\t});\n});\n\nState.bindArrayList = ReactiveLocalStorageDataBindArrayList;\nif (isEmpty(initTooltipster)) {\n\tvar initTooltipster = initSimplyTooltipster;\n}\n\n\n\n\n", "function ReactiveLocalStorageOnParamChangeShowElementsOnlyWhenParamXEqualsY(param, paramValue) {\n\tState.onParamChange(param, function(value) {\n\t\tif (value === paramValue) {\n\t\t $('[show-when-'+param+']').not('[show-when-'+param+'='+paramValue+']').addClass('is-hidden');\n\t\t $('[show-when-'+param+'='+paramValue+']').removeClass('is-hidden');\n\t\t} else {\n\t\t\t$('[show-when-'+param+']').not('[show-when-'+param+'='+paramValue+']').addClass('is-hidden');\n\t\t}\n\t});\n}\n\nfunction ReactiveLocalStorageDependVisibilityOnParam(paramName) {\n\tState.onParamChange(paramName, function(value) {\n\t\t//TODO refactor needed\n\t\t$('[depends-on-param=\"'+paramName+'\"]').not('[action-show-when-param-equals=\"'+value+'\"]').not('[action-hide-when-param-equals]').not('[action-show-when-param-not-equals]').addClass('is-hidden');\n\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-show-when-param-equals=\"'+value+'\"]').removeClass('is-hidden');\n\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-show-when-param-not-equals]').each(function() {\n\t\t\tvar paramToCompare = $(this).attr('action-show-when-param-not-equals');\n\t\t\tif (paramToCompare !== value && typeof value !== 'undefined') {\n\t\t\t\t$(this).removeClass('is-hidden');\n\t\t\t} else if (typeof value !== 'undefined') {\n\t\t\t\t$(this).addClass('is-hidden');\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction ReactiveLocalStorageHideWhenParamEquals(paramName) {\n\tState.onParamChange(paramName, function(value) {\n\t\t$('[depends-on-param=\"'+paramName+'\"]').not('[action-hide-when-param-equals=\"'+value+'\"]').not('[action-show-when-param-equals]').not('[action-show-when-param-not-equals]').removeClass('is-hidden');\n\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-hide-when-param-equals=\"'+value+'\"]').addClass('is-hidden');\n\t});\n}\n\n\nfunction ReactiveLocalStorageHideIfParamNotUndefined(paramName) {\n\tState.onParamChange(paramName, function(value) {\n\t\tif ( (typeof value !== 'undefined') || (value !== 'not-selected') ) {\n\t\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-hide-when-not-undefined]').addClass('is-hidden');\n\t\t} else {\n\t\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-hide-when-not-undefined]').removeClass('is-hidden');\n\t\t}\n\t});\n}\n\nfunction ReactiveLocalStorageShowIfParamUndefined(paramName) {\n\tState.onParamChange(paramName, function(value) {\n\t\tif ( (typeof value === 'undefined') || (value === 'not-selected') ) {\n\t\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-show-when-undefined]').removeClass('is-hidden');\n\t\t} else {\n\t\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-show-when-undefined]').addClass('is-hidden');\n\t\t}\n\t});\n}\n\nfunction ReactiveLocalStorageHideIfParamUndefined(paramName) {\n\tState.onParamChange(paramName, function(value) {\n\t\tif ( (typeof value === 'undefined') || (value === 'not-selected') ) {\n\t\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-hide-when-undefined]').addClass('is-hidden');\n\t\t} else {\n\t\t\t$('[depends-on-param=\"'+paramName+'\"]').filter('[action-hide-when-undefined]').removeClass('is-hidden');\n\t\t}\n\t});\n}\n\n$.On('preloadingComplete', function() {\n\t$('[depends-on-param]').each(function() {\n\t\tvar paramToDependOn = $(this).attr('depends-on-param');\n\t\tReactiveLocalStorageDependVisibilityOnParam(paramToDependOn);\n\t\tReactiveLocalStorageHideWhenParamEquals(paramToDependOn);\n\t\tReactiveLocalStorageHideIfParamNotUndefined(paramToDependOn);\n\t\tReactiveLocalStorageShowIfParamUndefined(paramToDependOn);\n\t\tReactiveLocalStorageHideIfParamUndefined(paramToDependOn);\n\t});\n\n\t$('[is-hidden-on-load]').isHidden();\n\t$('[add-class-on-load]').each(function() {\n\t\tvar classToAdd = $(this).attr('add-class-on-load');\n\t\t$(this).addClass(classToAdd);\n\t});\n\t$('[is-hidden-on-load]').removeAttr('is-hidden-on-load').attr('was-hidden-on-load', 'true');\n});", "$.On.touchstartOrClick = function(selector, eventHandlerFunction) {\n\t$.On('click touchstart', selector, function(event) {\n\n\t\tvar clickedElement = $(event.currentTarget);\n\n\t\tif (typeof eventHandlerFunction === 'function') {\n\t\t\tif (event.type === 'touchstart') {\n\t\t\t $(document).off('click', selector);\n\t\t \teventHandlerFunction(event);\n\t\t \t$.On('click', selector, function(event) {\n\t\t \t\tevent.stopPropagation();\n\t\t \t\tevent.preventDefault();\n\t\t \t\treturn false;\n\t\t \t});\n\t\t\t} else {\n\t\t\t\teventHandlerFunction(event);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error('onTouchstartOrClick event handler is not a function');\n\t\t}\n\t});\n};\n\n$.On.touchendOrClick = function(selector, eventHandlerFunction) {\n\t$.On('click touchend', selector, function(event) {\n\n\t\tvar clickedElement = $(event.currentTarget);\n\n\t\tif (typeof eventHandlerFunction === 'function') {\n\t\t\tif (event.type === 'touchend') {\n\t\t\t $(document).off('click', selector);\n\t\t \teventHandlerFunction(event);\n\t\t \t$.On('click', selector, function(event) {\n\t\t \t\tevent.stopPropagation();\n\t\t \t\tevent.preventDefault();\n\t\t \t\treturn false;\n\t\t \t});\n\t\t\t} else {\n\t\t\t\teventHandlerFunction(event);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error('touchendOrClick event handler is not a function');\n\t\t}\n\t});\n};\n\n$.On.touchendOrMouseup = function(selector, eventHandlerFunction) {\n\t$.On('mouseup touchend', selector, function(event) {\n\n\t\tvar clickedElement = $(event.currentTarget);\n\n\t\tif (typeof eventHandlerFunction === 'function') {\n\t\t\tif (event.type === 'touchend') {\n\t\t\t $(document).off('mouseup', selector);\n\t\t \teventHandlerFunction(event);\n\t\t \t$.On('mouseup', selector, function(event) {\n\t\t \t\tevent.stopPropagation();\n\t\t \t\tevent.preventDefault();\n\t\t \t\treturn false;\n\t\t \t});\n\t\t\t} else {\n\t\t\t\teventHandlerFunction(event);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error('touchendOrMouseup event handler is not a function');\n\t\t}\n\t});\n};\n\n$.On.touchstartOrMousedown = function(selector, eventHandlerFunction) {\n\t$.On('mousedown touchstart', selector, function(event) {\n\n\t\tvar clickedElement = $(event.currentTarget);\n\n\t\tif (typeof eventHandlerFunction === 'function') {\n\t\t\tif (event.type === 'touchstart') {\n\t\t\t $(document).off('mousedown', selector);\n\t\t \teventHandlerFunction(event);\n\t\t \t$.On('mousedown', selector, function(event) {\n\t\t \t\tevent.stopPropagation();\n\t\t \t\tevent.preventDefault();\n\t\t \t\treturn false;\n\t\t \t});\n\t\t\t} else {\n\t\t\t\teventHandlerFunction(event);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error('touchstartOrMousedown event handler is not a function');\n\t\t}\n\t});\n};", "function formatDecimalNumber(numberToFormat, decimalNumbers) {\n if (typeof decimalNumbers === 'undefined') {\n decimalNumbers = 2;\n }\n var number = parseFloat(numberToFormat);\n var formatted = (number.toFixed(decimalNumbers)).replace('.', ',');\n return formatted;\n}\n\nfunction stringToDecimal(stringToFormat) {\n var number = stringToFormat.replace(',', '.');\n number = parseFloat(number);\n return number;\n}\n\nfunction replaceComa(stringToFormat) {\n var cleaned = stringToFormat.replace(',', '.');\n return cleaned;\n}\n\nfunction getPeriodTextForPredictedCost(period) {\n var textsToReturn = {\n 1: 'Płaciłbyś miesięcznie',\n 2: 'Płaciłbyś co 2' + String.fromCharCode(160) + 'miesiące',\n 4: 'Płaciłbyś co kwartał',\n 12: 'Płaciłbyś rocznie'\n }\n return textsToReturn[period] || textsToReturn[1]\n}\n\nfunction replaceStatementToBoolean(statement) {\n var booleanValue = {\n 'yes': true,\n 'no': false\n }\n return booleanValue[statement]\n}\n\nfunction compareValues(currentValue, newValue) {\n if (!$.isNumeric(currentValue) || !$.isNumeric(newValue)) {\n return \"cannot compare\";\n }\n\n currentValue = currentValue * 1;\n newValue = newValue * 1;\n if ( currentValue == newValue ) {\n return \"equal\";\n }\n else if ( newValue > currentValue ) {\n return \"new-is-larger\";\n }\n else if ( newValue < currentValue ) {\n return \"new-is-lower\";\n }\n}\n\nfunction arrayToString(arrayToConvert) {\n if ($.isArray(arrayToConvert)) {\n return arrayToConvert.join(' ');\n } else {\n return '';\n }\n}\n\nfunction isEmail(email) {\n var regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n return regex.test(email);\n}\n\n//https://stackoverflow.com/questions/4597900/checking-something-isempty-in-javascript\nfunction isEmpty(val) {\n\n // test results\n //---------------\n // [] true, empty array\n // {} true, empty object\n // null true\n // undefined true\n // \"\" true, empty string\n // '' true, empty string\n // 0 false, number\n // true false, boolean\n // false false, boolean\n // Date false\n // function false\n\n if (val === undefined)\n return true;\n\n if (typeof (val) == 'function' || typeof (val) == 'number' || typeof (val) == 'boolean' || Object.prototype.toString.call(val) === '[object Date]')\n return false;\n\n if (val == null || val.length === 0) // null or 0 length array\n return true;\n\n if (typeof (val) == \"object\") {\n // empty object\n\n var r = true;\n\n for (var f in val)\n r = false;\n\n return r;\n }\n\n return false;\n}\n\nfunction isNotEmpty(val) {\n return !isEmpty(val);\n}\n\nfunction isEmptyOrFalse(obj) {\n if (isEmpty(obj)) {\n return true \n } else if (obj === 'false' || obj === false) {\n return true \n } else {\n return false\n }\n}\n\n$.On('click', '[action-go-back]', function() {\n window.history.back();\n});\n\n//setting proper with of fixed top bar to show scroll bar\nfunction getWidthOfWrapperScrollbar() {\n var bodyWidth = $('body').outerWidth();\n var wrapperWidth = $('[js-page-wrapper]').outerWidth();\n var difference = bodyWidth - wrapperWidth;\n\n return difference;\n}\n\nfunction isNumeric(val) {\n return $.isNumeric(val);\n}\n\nfunction isNotNumeric(val) {\n return !isNumeric(val);\n}\n\n$(document).on('preloadingComplete', function() {\n $(document).on('mouseenter', '[js-parent-for-show-on-hover]', function() {\n $(this).find('[js-show-when-hover-on-parent]').isShown();\n });\n $(document).on('mouseleave', '[js-parent-for-show-on-hover]', function() {\n $(this).find('[js-show-when-hover-on-parent]').isHidden();\n });\n});\n\n//https://stackoverflow.com/questions/6921275/is-it-possible-to-chain-settimeout-functions-in-javascript\nfunction delay(t, fn) {\n // private instance variables\n var queue = [], self, timer;\n\n function schedule(t, fn) {\n timer = setTimeout(function() {\n timer = null;\n fn();\n\n if (queue.length) {\n var item = queue.shift();\n schedule(item.t, item.fn);\n }\n }, t);\n }\n self = {\n delay: function(t, fn) {\n // if already queuing things or running a timer,\n // then just add to the queue\n if (queue.length || timer) {\n queue.push({fn: fn, t: t});\n } else {\n // no queue or timer yet, so schedule the timer\n schedule(t, fn);\n }\n return self;\n },\n cancel: function() {\n clearTimeout(timer);\n queue = [];\n return self;\n }\n };\n return self.delay(t, fn);\n}\n\n//debouncing that allows easy code block handling in ReactibeLocalStorage, without separate functions and scopes\ndebounceGlobalTimers = {};\nfunction debounce(debounceName, wait, fn) {\n\n if (typeof wait === 'function') {\n fn = wait;\n wait = 100;\n }\n\n if (debounceGlobalTimers[debounceName]) {\n clearTimeout(debounceGlobalTimers[debounceName]);\n }\n\n debounceGlobalTimers[debounceName] = setTimeout(function() {\n fn();\n }, wait);\n\n}\n\nfunction roundToNextMultiple(x, multiple) {\n return Math.ceil(x/multiple)*multiple;\n}\n\nfunction roundToPrevMultiple(x, multiple) {\n return Math.floor(x/multiple)*multiple;\n}\n\nfunction randomChance() {\n return !!Math.floor(Math.random()*2);\n}\n\nfunction popupWindow(url, title, w, h) {\n var left = 100;\n var top = 100;\n return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);\n}\n\n//https://stackoverflow.com/questions/4068373/center-a-popup-window-on-screen\nvar popupWindowCenter = function popupCenter(_ref) {\n var url = _ref.url;\n var title = _ref.title;\n var w = _ref.w;\n var h = _ref.h;\n\n // Fixes dual-screen position Most browsers Firefox\n var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\n\n var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\n var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\n\n var systemZoom = width / window.screen.availWidth;\n var left = (width - w) / 2 / systemZoom + dualScreenLeft;\n var top = (height - h) / 2 / systemZoom + dualScreenTop;\n var newWindow = window.open(url, title, \"\\n scrollbars=yes,\\n width=\" + w / systemZoom + \", \\n height=\" + h / systemZoom + \", \\n top=\" + top + \", \\n left=\" + left + \"\\n \");\n\n if (window.focus) newWindow.focus();\n};\n\n\n$.On('preloadingComplete', function() {\n $('[js-scroll-shadow]').each(function() {\n var attr = $(this).attr('js-scroll-shadow');\n var header = $('[js-scroll-shadow-header=\"'+attr+'\"]');\n var area = $(this);\n header.addClassWhen(area.scrollTop() > 0, 'is-with-scroll-shadow');\n $(this).on('scroll', function() {\n header.addClassWhen(area.scrollTop() > 0, 'is-with-scroll-shadow');\n });\n });\n});", "/*=================================================================\n= ReactiveLocalStorage validation extension =\n=================================================================*/\n\nState.registeredValidators = {};\n\nState.setValidationRules = function(param, validationFunction) {\n\tState.registeredValidators[param] = validationFunction;\n};\n\nState.validateParam = function(paramToValidate, functionCallback) {\n\tvar currentValue = State.getParam(paramToValidate);\n\tvar validationResult = \"\";\n\tif (State.registeredValidators && State.registeredValidators[paramToValidate]) {\n\t\tvalidationResult = State.registeredValidators[paramToValidate](currentValue);\n\t} else {\n\t\tconsole.error('No validator registered for '+paramToValidate);\n\t}\n\n\tif (typeof functionCallback === 'function') {\n\t\tfunctionCallback(validationResult);\n\t}\n\n\treturn validationResult;\n};\n\nfunction showErrorForElement(elm, validationResult) {\n\tif (typeof validationResult === 'undefined') {\n\t\tvalidationResult === \"\";\n\t}\n\n\tvar errorMsg = \"⚠ ⚠ ⚠\"; //defaults to triangle exclamation\n\tvar errorDiv = elm.parent().find('[js-selector=\"validation-error-msg\"]');\n\tif (errorDiv.length === 0) {\n\t\terrorDiv = $('
');\n\t}\n\n\tvar errorMsgFromElm = elm.attr('err-txt__'+validationResult);\n\tif (typeof errorMsgFromElm !== \"undefined\") {\n\t\terrorMsg = errorMsgFromElm;\n\t}\n\n\terrorDiv.text(errorMsg);\n\telm.after(errorDiv);\n\telm.removeClass('is-correct');\n\telm.find('[validation-add-class]').removeClass('is-correct');\n\telm.addClass('is-error');\n elm.children().addClass('is-error');\n\telm.find('[validation-add-class]').addClass('is-error');\n\telm.attr('has-error', 'true');\n}\n\nfunction hideErrorForElement(elm) {\n\tvar errorDiv = elm.parent().find('[js-selector=\"validation-error-msg\"]');\n\telm.addClass('is-correct');\n\telm.find('[validation-add-class]').addClass('is-correct');\n\telm.removeClass('is-error');\n elm.children().removeClass('is-error');\n\telm.find('[validation-add-class]').removeClass('is-error');\n\telm.removeAttr('has-error');\n\terrorDiv.remove();\n}\n\nfunction handleErrorForElement(elm, validationResult) {\n\tif (validationResult === 'good') {\n\t\thideErrorForElement(elm);\n\t} else {\n\t\tshowErrorForElement(elm, validationResult);\n\t}\n}\n\n//automatically searches for DOM elements that need to be validated and show error for them\n//based on DOM attributes\nState.validateElementChildren = function(elm, callbacksObject) {\n elm.find('[has-error]').removeAttr('has-error');\n\n\telm.find('[simply-validate]').filter(':visible').each(function() {\n\t\tvar relatedField = $(this);\n\t\tvar paramToValidate = $(this).attr('simply-validate');\n\t\tState.validateParam(paramToValidate, function(validationResult) {\n\t\t\thandleErrorForElement(relatedField, validationResult);\n\t\t});\n\t});\n\tvar numberOfErrors = elm.find('[has-error]').length;\n\n\t//var numberOfErrors = elm.find('[has-error]').length;\n\tif (numberOfErrors === 0) {\n\t\tif (callbacksObject && callbacksObject.onSuccess) {\n\t\t\tcallbacksObject.onSuccess();\n\t\t}\n\t} else {\n\t\tif (callbacksObject && callbacksObject.onError) {\n\t\t\tcallbacksObject.onError();\n\t\t}\n\t}\n\t//IDEA/TODO: validateElementChildren could return an array of errors\n};\n\nState.setDefaultParamAndValidationRules = function(param, options) {\n\tif (options && typeof options.default !== 'undefined') {\n\t\tState.setDefaultParam(param, options.default);\n\t}\n\tState.setValidationRules(param, options.validationFunction);\n};\n\n// validation on blur for elements with additional attribute validate-on-blur\n// we will show errors only if usered focused the field at least once\n// if you want to validate after each entered character, you need to use \"update-on-input\" attr\n// for text inputs\n$.On('preloadingComplete', function() {\n\t$.On('focus', '[simply-validate][validate-on-blur]:not([is-touched])', function() {\n\n\t\tvar relatedInput = $(this);\n\n\t\tvar relatedParam = $(this).attr('simply-validate');\n\n \trelatedInput.attr('is-touched', 'true');\n\n relatedInput.on('blur', function() {\n \tState.validateParam(relatedParam, function(validationResult) {\n \t\thandleErrorForElement(relatedInput, validationResult);\n \t});\n });\n\n\t});\n});\n\n// you can decide if you want to revalidate the field after it was changed by user\n// just add attribute 'validate-on-click' -- better for radio buttons\n$.On('preloadingComplete', function() {\n\t$.On('click', '[simply-validate][validate-on-click]:not([is-touched])', function() {\n\t\tvar relatedParam = $(this).attr('simply-validate');\n \tvar relatedInput = $(this);\n\n \trelatedInput.attr('is-touched', 'true');\n\n \tState.validateParam(relatedParam, function(validationResult) {\n \t\thandleErrorForElement(relatedInput, validationResult);\n \t});\n\n \tState.onParamChange(relatedParam, function(value) {\n\t \tState.validateParam(relatedParam, function(validationResult) {\n\t \t\thandleErrorForElement(relatedInput, validationResult);\n\t \t});\n\t });\n\n\t});\n});\n\n// you can decide if you want to revalidate the field after it was changed by user\n// just add attribute 'validate-on-change' -- better for select dropdowns\n//TODO remove this and keep only one attribute validate-on-click\n$.On('preloadingComplete', function() {\n\t$.On('click', '[simply-validate][validate-on-change]:not([is-touched])', function() {\n\t\tvar relatedParam = $(this).attr('simply-validate');\n\t \tvar relatedInput = $(this);\n\n\t \trelatedInput.attr('is-touched', 'true');\n\n\t \tState.onParamChange(relatedParam, function(value) {\n\t \tState.validateParam(relatedParam, function(validationResult) {\n\t \t\thandleErrorForElement(relatedInput, validationResult);\n\t \t});\n\t });\n\t});\n});\n\n\n$.On('preloadingComplete', function() {\n $.On('click', 'input[simply-validate][has-error], textarea[validated-param][has-error]', function() {\n var relatedParam = $(this).attr('simply-validate');\n var relatedInput = $(this);\n\n if (!relatedInput.attr('was-clicked-when-had-error')) {\n \trelatedInput.on('input', function() {\n \t\tState.setParam(relatedParam, relatedInput.val());\n \t\tState.validateParam(relatedParam, function(validationResult) {\n \t\t handleErrorForElement(relatedInput, validationResult);\n \t\t});\n \t});\n\n \trelatedInput.attr('was-clicked-when-had-error', 'true');\n }\n\n });\n\n //always validate on click elements that had error and were clicked when had error\n $.On('click', '[simply-validate][has-error], [simply-validate][was-clicked-when-had-error]', function() {\n var relatedParam = $(this).attr('simply-validate');\n var relatedInput = $(this);\n\n if (!relatedInput.attr('was-clicked-when-had-error')) {\n relatedInput.attr('was-clicked-when-had-error', 'true');\n }\n\n State.validateParam(relatedParam, function(validationResult) {\n handleErrorForElement(relatedInput, validationResult);\n });\n });\n\n});\n\n/*===== End of ReactiveLocalStorage validation extension ======*/\n\n\n/* EXAMPLE\n\n1. First register validators for each param separately\n\nState.setValidationRules('registration-email', function(value) {\n\tif (value === \"\") {\n\t\treturn 'required';\n\t} else {\n\t\treturn 'good';\n\t}\n});\n\nState.setValidationRules('registration-password', function(value) {\n\tif (value === \"\") {\n\t\treturn 'required';\n\t} else if (value.length < 8) {\n\t\treturn 'too-short';\n\t} else {\n\t\treturn 'good';\n\t}\n});\n\n2. When submitting form, you can use validateElementChildren thah will automatically\nvalidate DOM elements that you marked with attribute \"simply-validate\". You should store error\nmessages in DOM attributes \"err-txt__your-validation-result\", since different fields can have indiviudal more contextual errors\n\nfunction submitEmailRegistrationForm() {\n\tvar thisForm = $('[js-selector=\"registration-email-form\"]');\n\tState.validateElementChildren(thisForm, {\n\t\tonSuccess: function() {\n\t\t\tregisterUser();\n\t\t},\n\t\tonError: function() {\n\t\t\tvar firstError = $('[has-error]').first();\n\t\t\t$('.page-wrapper').scrollTo(firstError); //you have full control of what happens after error\n\t\t}\n\t});\n}\n\n/*\nEXAMPLE 2: more flexible - manually check params and handle Errors for each element\nfunction submitEmailRegistrationForm() {\n\tvar thisForm = $('[js-selector=\"registration-email-form\"]');\n\n State.validateParam('registration-email', function(validationResult) {\n \tvar relatedField = thisForm.find('[simply-validate=\"registration-email\"]');\n\n \tif (validationResult !== 'good') {\n \t\thandleErrorForElement(relatedField, validationResult);\n\t\t\treturn;\n \t}\n\n \tregisterUser();\n });\n\n}\n*/", "$.On('click', '[action-collapse-next-div]', function() {\n\t$(this).next().toggleClass('is-hidden');\n\t$(this).find('[icon-to-rotate-when-expanding]').toggleClass('is-expanded');\n});\n\n$.On('click', '[action-show-next-section-and-hide-button]', function() {\n\t$(this).next().toggleClass('is-hidden');\n\t$(this).addClass('is-hidden');\n});\n\nfunction initSimplyCollapsibleSections() {\n $.On('click', '[simply-collapsible-section-header]', function() {\n var param = $(this).closest('[simply-collapsible-section]').attr('simply-collapsible-section');\n State.toggle(param, 'open', 'closed');\n });\n\n $('[simply-collapsible-section]').each(function() {\n var thisSection = $(this).closest('[simply-collapsible-section]');\n var thisChevron = thisSection.find('[simply-collapsible-section-chevron]');\n var thisHeader = thisSection.find('[simply-collapsible-section-header]');\n var thisContent = thisSection.find('[simply-collapsible-section-content]')\n\n var param = $(this).attr('simply-collapsible-section');\n State.onChange(param, function(value) {\n thisContent.isShownWhen(value === 'open');\n thisChevron.addClassWhen(value === 'open', 'is-expanded');\n thisHeader.addClassWhen(value === 'open', 'is-expanded');\n });\n });\n\n}\n\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n initSimplyCollapsibleSections();\n});", "/* One line show or hide based on expression */\n(function( $ ) {\n $.fn.isShownWithSlideWhen = function(expression) {\n\n var thisInstance = this;\n\n if (!!expression) {\n thisInstance.each(function() {\n $(this).isShownWithSlide();\n });\n } else {\n thisInstance.each(function() {\n $(this).isHiddenWithSlide();\n });\n }\n\n return this;\n };\n}( jQuery ));\n\n/* One line show or hide based on expression */\n(function( $ ) {\n $.fn.isHiddenWithSlideWhen = function(expression) {\n\n var thisInstance = this;\n\n if (!!expression) {\n thisInstance.each(function() {\n $(this).isHiddenWithSlide();\n });\n } else {\n thisInstance.each(function() {\n $(this).isShownWithSlide();\n });\n }\n\n return this;\n };\n}( jQuery ));\n\n(function( $ ) {\n $.fn.isShownWithSlide = function(transitionTime) {\n transitionTime = transitionTime || 700;\n var container = this[0];\n \n if (!container.classList.contains('is-in-transition')) {\n\n if (container.classList.contains('is-hidden')) {\n \n container.style.maxHeight = \"0px\" //temporary maxHeight to prevent blinking\n container.classList.remove('is-hidden')\n container.classList.add('is-in-transition')\n container.style.overflow = \"hidden\"\n\n var height = container.scrollHeight + \"px\"\n container.style.height = \"0px\"\n\n setTimeout(() => {\n container.style.maxHeight = \"\"\n container.style.height = height\n }, 30)\n\n setTimeout(() => {\n container.style.height = \"\";\n container.classList.remove('is-in-transition')\n container.style.overflow = \"\"\n }, transitionTime+50);\n }\n }\n\n return this;\n };\n}( jQuery ));\n\n(function( $ ) {\n $.fn.isHiddenWithSlide = function(transitionTime) {\n transitionTime = transitionTime || 700;\n var container = this[0];\n \n if (!container.classList.contains('is-in-transition')) {\n if (!container.classList.contains('is-hidden')) {\n container.classList.add('is-in-transition')\n container.style.overflow = \"hidden\"\n var height = container.scrollHeight + \"px\";\n container.style.height = height;\n\n setTimeout(() => {\n container.style.height = \"0px\";\n }, 30)\n\n setTimeout(() => {\n container.classList.add('is-hidden');\n container.classList.remove('is-in-transition')\n container.style.height = \"\";\n container.style.overflow = \"\"\n }, transitionTime+50);\n }\n }\n\n return this;\n };\n}( jQuery ));\n\n\n// var toggleButtons = document.querySelectorAll('[js-collapsible-toggle]');\n// var transitionTime = 500; //should be the same as defined in CSS\n\n// toggleButtons.forEach((button) => {\n// bindSlide(button);\n// });\n\n// function bindSlide(button) {\n// button.addEventListener('click', () => {\n// var container = button.closest('[js-collapsible]').querySelector('[js-collapsible-area]');\n// //https://www.npmjs.com/package/element-closest-polyfill for IE11\n \n// if (!container.classList.contains('is-in-transition')) {\n// /** Slide down. */\n// if (container.classList.contains('is-hidden')) {\n \n// container.style.maxHeight = \"0px\" //temporary maxHeight to prevent blinking\n// container.classList.remove('is-hidden')\n// container.classList.add('is-in-transition')\n// var height = container.scrollHeight + \"px\"\n// container.style.height = \"0px\"\n\n// setTimeout(() => {\n// container.style.maxHeight = \"\"\n// container.style.height = height\n// }, 30)\n\n// setTimeout(() => {\n// container.style.height = \"\";\n// container.classList.remove('is-in-transition')\n// }, transitionTime+50);\n\n// /** Slide up. */\n// } else {\n// container.classList.add('is-in-transition')\n\n// var height = container.scrollHeight + \"px\";\n// container.style.height = height;\n\n// setTimeout(() => {\n// container.style.height = \"0px\";\n// }, 30)\n\n// setTimeout(() => {\n// container.classList.add('is-hidden');\n// container.classList.remove('is-in-transition')\n// container.style.height = \"\";\n// }, transitionTime+50);\n// }\n// }\n// })\n// }\n\n", "//TODO refactor for simplicity\n\nfunction initSimplyTooltipster(containerToInit) {\n containerToInit = containerToInit || 'body';\n\n var tooltipsterTrigger = 'custom';\n\n var tooltipsterTriggerOpen = {\n mouseenter: true,\n touchstart: true,\n tap: true,\n click: true\n };\n\n var tooltipsterTriggerClose = {\n mouseleave: true,\n scroll: true,\n tap: true\n };\n\n var getTooltipOptions = function(position, tooltipContent, delay) {\n return {\n position: position,\n trigger: 'custom',\n triggerOpen: tooltipsterTriggerOpen,\n triggerClose: tooltipsterTriggerClose,\n hideOnClick: false,\n animation: 'fade',\n delay: parseInt(delay),\n animationDuration: 150,\n maxWidth: 300,\n theme: 'tooltipster-borderless',\n restoration: 'current',\n content: tooltipContent\n };\n };\n\n $(containerToInit).not('.tooltipstered').find('[simply-tooltip]:not(.tooltipstered)').each(function() {\n var tooltipPositionFromAttr = $(this).attr('simply-tooltip');\n var tooltipContent = $(this).attr('simply-tooltip-content');\n var tooltipDelay = $(this).attr('simply-tooltip-delay');\n if ($.isEmptyObject(tooltipContent)) {\n tooltipContent = $(this).attr('simply-tooltip-text');\n }\n if ($.isEmptyObject(tooltipDelay)) {\n tooltipDelay = 20;\n }\n $(this).tooltipster(getTooltipOptions(tooltipPositionFromAttr, tooltipContent, tooltipDelay));\n });\n\n (function( $ ) {\n $.fn.simplyAddTooltip = function(tooltipPosition, tooltipContent, tooltipDelay) {\n if ($.isEmptyObject(tooltipDelay)) {\n tooltipDelay = 20;\n }\n if ($.isEmptyObject(tooltipPosition)) {\n tooltipDelay = 'top';\n }\n $(this).tooltipster(getTooltipOptions(tooltipPosition, tooltipContent, tooltipDelay));\n return this;\n };\n }( jQuery ));\n\n (function( $ ) {\n $.fn.simplyDestroyTooltip = function() {\n $(this).filter('.tooltipstered').tooltipster('destroy');\n return this;\n };\n }( jQuery ));\n}\n\n$.On('preloadingComplete', function() {\n initSimplyTooltipster();\n});", "function hideSimplyDropdowns() {\n $('[simply-select-dropdown-list]').isHidden();\n $(document).trigger('hide-simply-dropdowns');\n //console.log(\"Hide select dropdowns...\");\n}\n\nfunction bindSimplySelectDropdownsToStateBasedOnItsAttributes() {\n $('[simply-select-dropdown]').not('[simply-binded]').each(function() {\n var paramToChange = $(this).attr('simply-select-dropdown');\n\n //default state is the first from the dropdown chosen-values options\n var firstAvailableChoice = $(this).find('[chosen-value]').first().attr('chosen-value');\n State.setDefaultParam(paramToChange, firstAvailableChoice );\n\n State.onParamChange(paramToChange, function(value) {\n var relDropdown = $('[simply-select-dropdown=\"'+paramToChange+'\"]');\n var chosenItem = relDropdown.find('[chosen-value=\"'+value+'\"]');\n var otherNotChosenItems = relDropdown.find('[chosen-value]').not(chosenItem);\n chosenItem.removeClass('is-hidden');\n otherNotChosenItems.addClass('is-hidden');\n var selectedChoice = relDropdown.find('[choice-value=\"'+value+'\"]').addClass('is-selected');\n var otherChoices = relDropdown.find('[choice-value]').not(selectedChoice);\n otherChoices.removeClass('is-selected');\n });\n\n $(this).attr('simply-binded', '');\n });\n}\n\nfunction initSimplySelectDropdownButtons() {\n $.On('click', '[simply-select-dropdown-buton],[simply-select-dropdown-button]', function() {\n var thisDropdown = $(this).closest('[simply-select-dropdown]');\n var dropdownList = thisDropdown.find('[simply-select-dropdown-list]');\n var allOtherDropdownLists = $('[simply-select-dropdown]').not(thisDropdown).find('[simply-select-dropdown-list]');\n allOtherDropdownLists.addClass('is-hidden');\n dropdownList.toggleClass('is-hidden');\n thisDropdownSearch = thisDropdown.find('[simply-select-dropdown-search-input]');\n thisDropdownSearch.focus();\n $('body').toggleClass('is-with-dropdown-open');\n });\n\n $.On('click', function(e) {\n //if clicked outside the dropdown button and content, close it\n if ($(event.target).closest(\"[simply-select-dropdown-buton]\").length === 0 && $(event.target).closest('[simply-select-dropdown-list]').length === 0) {\n hideSimplyDropdowns();\n }\n });\n\n $.On('click', '[choice-value]', function() {\n var valueToSet = $(this).attr('choice-value');\n var paramToSet = $(this).closest('[simply-select-dropdown]').attr('simply-select-dropdown');\n //console.log(isNotEmpty($(this).attr('do-not-select-on-click')));\n if (isEmpty($(this).attr('do-not-select-on-click'))) {\n State.setParam(paramToSet, valueToSet);\n }\n $(this).closest('[simply-select-dropdown]').find('.select-dropdown__list.w-dropdown-list').removeClass('w--open');\n hideSimplyDropdowns();\n });\n\n //search in dropdown - simple frontend filtering\n $('[simply-select-dropdown-search-input]').each(function() {\n var thisDropdownParam = $(this).closestElementAttrValue('simply-select-dropdown');\n State.set(thisDropdownParam+\"__search-input\", '');\n\n if ($(this).closest('[simply-select-dropdown-with-backend-search]').length === 0) {\n\n State.onChange(thisDropdownParam+\"__search-input\", function(value) {\n var thisDropdown = $('[simply-select-dropdown=\"'+thisDropdownParam+'\"]');\n var searchInput = thisDropdown.find('[simply-select-dropdown-search-input]');\n var searchNoResults = thisDropdown.find('[simply-select-dropdown-search-no-results]');\n\n searchInput.val(value); \n\n //store lowercase search string as attribute\n thisDropdown.find('[choice-value]').each(function() {\n var thisText = $(this).text().trim().toLowerCase();\n $(this).attr('simply-search-string', thisText);\n });\n\n if (isNotEmpty(value)) {\n var searchQueryLowercase = value.toLowerCase();\n var matchingOptions = thisDropdown.find('[simply-search-string*=\"'+searchQueryLowercase+'\"]');\n var notMatchingOptions = thisDropdown.find('[choice-value]').not(matchingOptions);\n notMatchingOptions.attr('is-hidden-by-search', '');\n matchingOptions.removeAttr('is-hidden-by-search');\n searchNoResults.isShownWhen(matchingOptions.length === 0);\n } else {\n thisDropdown.find('[choice-value]').removeAttr('is-hidden-by-search');\n searchNoResults.isHidden();\n }\n });\n\n\n } else {\n State.onChange(thisDropdownParam+\"__search-input\", function(value) {\n var thisDropdown = $('[simply-select-dropdown=\"'+thisDropdownParam+'\"]');\n var searchPrompt = thisDropdown.find('[simply-select-dropdown-search-prompt]');\n var searchResults = thisDropdown.find('[simply-select-dropdown-search-results]');\n var searchNoResults = thisDropdown.find('[simply-select-dropdown-search-no-results]');\n var searchSpinner = thisDropdown.find('[simply-select-dropdown-search-spinner]');\n searchPrompt.isShownWhen(isEmpty(value));\n searchResults.isShownWhen(isNotEmpty(value) && value.length <= 3);\n searchNoResults.isShownWhen(isNotEmpty(value) && value.length > 3);\n var spinnerTimer;\n searchSpinner.isShown();\n clearTimeout(spinnerTimer);\n spinnerTimer = setTimeout(function() {\n searchSpinner.isHidden();\n }, 1000);\n });\n }\n });\n\n $(document).on('input', '[simply-select-dropdown-search-input]', function() {\n var thisDropdown = $(this).closest('[simply-select-dropdown]');\n var thisDropdownParam = thisDropdown.attr('simply-select-dropdown');\n State.set(thisDropdownParam+\"__search-input\", $(this).val());\n });\n\n\n}\n\nfunction removeWebflowEmptyChoiceValueItems() {\n //For faster working with Webflow we remove empty fields from Protoflow components\n $('[choice-value]').each(function() {\n var $this = $(this);\n var text = $this.text();\n var textWebflowNormalized = text.split('\\n').join('').split(' ').join('').split(',').join('');\n //console.log(textWebflowNormalized);\n if (isEmpty(textWebflowNormalized)) {\n $this.remove();\n } \n });\n}\n\n//Webflow dropdowns as select dropdown\n//Each dropdown state is stored in a separate reactive local storage state\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n hideSimplyDropdowns();\n initSimplySelectDropdownButtons();\n bindSimplySelectDropdownsToStateBasedOnItsAttributes();\n removeWebflowEmptyChoiceValueItems(); \n});\n", "function showHamburgerMenu() {\n\t$('[js-selector=\"sidebar\"]').addClass('is-expanded');\n\t$('[js-selector=\"sidebar-overlay\"]').removeClass('is-hidden');\n\tsetTimeout(function() {\n\t\t$('[js-selector=\"sidebar-overlay\"]').removeClass('is-transparent');\n\t}, 100);\n}\n\nfunction hideHamburgerMenu() {\n\t$('[js-selector=\"sidebar\"]').removeClass('is-expanded');\n\t$('[js-selector=\"sidebar-overlay\"]').addClass('is-transparent');\n\tsetTimeout(function() {\n\t\t$('[js-selector=\"sidebar-overlay\"]').addClass('is-hidden');\n\t}, 800);\n}\n\n$.On('click', '[action-show-hamburger-menu]', function() {\n\tStateURL.setParam('hamburgerMenu', 'show');\n});\n\n$.On('click touchstart', '[action-hide-hamburger-menu]', function() {\n\tStateURL.removeParam('hamburgerMenu', {doNotCreateHistoryState: true});\n});\n\nStateURL.onParamChange('hamburgerMenu', function(value) {\n\tif (value === 'show') {\n\t\tshowHamburgerMenu();\n\t} else {\n\t\thideHamburgerMenu();\n\t}\n});", "//Elements with action-open-modal should show modals container and\n// and show the respective modal modal\n$.On('click', '[action-open-modal]', function(event) {\n var modalToLoad = $(this).attr(\"action-open-modal\");\n StateURL.setParam('modalContent', modalToLoad);\n\n hideSimplyDropdowns();\n});\n\n$.On('click', '[action-close-modal]', function(event) {\n StateURL.removeParam('modalContent');\n});\n\nfunction bindEscButtonToCloseModal() {\n $(document).one('keydown.modal', function(event) {\n if (event.which === 27) {\n StateURL.removeParam('modalContent');\n }\n });\n}\n\nfunction closeModal() {\n //deselectAll();\n $(\"[simply-modal-wrapper]\").fadeOutAndHide(300);\n}\n\nStateURL.onParamChange('modalContent', function(value) {\n if (typeof value != 'undefined') {\n var modalWrapper = $(\"[simply-modal-wrapper]\");\n if (modalWrapper.hasClass('is-hidden')) {\n modalWrapper.showAndFadeIn(200, function() {\n $('[modal-id]').not('[modal-id=\"'+value+'\"]').addClass('is-hidden');\n $('[modal-id=\"'+value+'\"]').removeClass('is-hidden');\n });\n } else {\n $('[modal-id]').not('[modal-id=\"'+value+'\"]').addClass('is-hidden');\n $('[modal-id=\"'+value+'\"]').removeClass('is-hidden');\n }\n\n //esc button closes modal, binded only after modal was opened\n bindEscButtonToCloseModal();\n } else {\n closeModal();\n }\n});\n\n\n//modal generic action\n$.On('click', '[action-show-modal]', function() {\n var modalContentToShow = $(this).attr('action-show-modal');\n StateURL.setParam('modalContent', modalContentToShow);\n});", "/*========================================================================================================\n= FLashing notifications https://github.com/maciejsaw/jQuery-FlashingNotifications =\n========================================================================================================*/\nvar FlashingNotifications = (function() {\n\n\tvar FlashingNotifications__timerOne = {};\n\tvar FlashingNotifications__timerTwo = {};\n\n\tfunction hideNotification(notificationType, timeReservedForAnimation) {\n\t\tif (typeof timeReservedForAnimation !== 'number') {\n\t\t\ttimeReservedForAnimation = 800;\n\t\t}\n\n\t\t//find and cache selected html object\n\t\tvar $notificationBox = $('[js-selector=\"flashing-notification__'+notificationType+'\"]');\n\n\t\t$notificationBox.addClass('is-transparent');\n\t\tclearTimeout(FlashingNotifications__timerTwo[notificationType]);\n\t\tFlashingNotifications__timerTwo[notificationType] = setTimeout(function() {\n\t\t\t$notificationBox.addClass('is-hidden');\n\t\t}, timeReservedForAnimation);\n\t}\n\n\tvar closeButtonAlreadyBinded = false;\n\tfunction bindCloseButton(timeReservedForAnimation) {\n\t\tif (typeof timeReservedForAnimation !== 'number') {\n\t\t\ttimeReservedForAnimation = 800;\n\t\t}\n\n\t\tif (closeButtonAlreadyBinded === false) {\n\t\t\t$.On('click.flashingNotifications', '[flashing-notifications__action-close-notification=\"true\"]', function() {\n\t\t\t\tcloseButtonAlreadyBinded = true;\n\t\t\t\tvar $notificationBox = $(this).closest('[js-selector^=\"flashing-notification__\"]');\n\t\t\t\t$notificationBox.addClass('is-transparent');\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$notificationBox.addClass('is-hidden');\n\t\t\t\t}, timeReservedForAnimation);\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction showNotification(notificationType, htmlToPlaceInsideNotification) {\n\t\tif (typeof notificationType === 'undefined' || notificationType === \"\") {\n\t\t\tnotificationType = \"neutral\";\n\t\t}\n\n\t\t//find and cache selected html object\n\t\tvar $notificationBox = $('[js-selector=\"flashing-notification__'+notificationType+'\"]');\n\n\t\tvar updateNotificationBoxText = function() {\n\t\t\t//only update html if argument provided\n\t\t\tif (htmlToPlaceInsideNotification !== \"\" || typeof htmlToPlaceInsideNotification !== 'undefined'); {\n\t\t\t\t$notificationBox.find('[js-selector=\"flashing-notification-text\"]').html(htmlToPlaceInsideNotification);\n\t\t\t}\n\t\t};\n\n\t\t$notificationBox.removeClass('is-hidden');\n\t\tsetTimeout(function() {\n\t\t\t$notificationBox.removeClass('is-transparent');\n\n\t\t\tclearTimeout(FlashingNotifications__timerOne[notificationType]);\n\t\t\tclearTimeout(FlashingNotifications__timerTwo[notificationType]);\n\t\t}, 20);\n\t}\n\n\tfunction showAndHideNotification(notificationType, htmlToPlaceInsideNotification, timeToWaitBeforeHiding) {\n\n\t\t//default arguments\n\t\tif (typeof notificationType === 'undefined' || notificationType === \"\") {\n\t\t\tnotificationType = \"neutral\";\n\t\t}\n\t\tif (typeof timeToWaitBeforeHiding === 'undefined' || timeToWaitBeforeHiding === \"\") {\n\t\t\ttimeToWaitBeforeHiding = 3500;\n\t\t}\n \n\t\t//find and cache selected html object\n\t\tvar $notificationBox = $('[js-selector=\"flashing-notification__'+notificationType+'\"]'); \n\n\t\tvar updateNotificationBoxText = function() {\n\t\t\t//only update html if argument provided\n\t\t\tif (htmlToPlaceInsideNotification !== \"\" || typeof htmlToPlaceInsideNotification !== 'undefined'); {\n\t\t\t\t$notificationBox.find('[js-selector=\"flashing-notification-text\"]').html(htmlToPlaceInsideNotification);\n\t\t\t}\n\t\t};\n\n\t\tvar showAndHideNotificationBox = function() {\n\t\t\t$notificationBox.removeClass('is-hidden');\n\t\t\tsetTimeout(function() {\n\t\t\t\t$notificationBox.removeClass('is-transparent');\n\n\t\t\t\tclearTimeout(FlashingNotifications__timerOne[notificationType]);\n\t\t\t\tclearTimeout(FlashingNotifications__timerTwo[notificationType]);\n\n\t\t\t\tFlashingNotifications__timerOne[notificationType] = setTimeout(function() {\n\t\t\t\t\thideNotification(notificationType);\n\t\t\t\t}, timeToWaitBeforeHiding);\n\n\t\t\t}, 20);\n\t\t};\n\n\t\t//If there's already a notification shown, first hide it and then show another one\n\t\tif ($notificationBox.hasClass('is-hidden') === false && $notificationBox.hasClass('is-transparent') === false) {\n\t\t\thideNotification(notificationType);\n\t\t\tsetTimeout(function() {\n\t\t\t\tupdateNotificationBoxText();\n\t\t\t\tshowAndHideNotificationBox();\n\t\t\t}, 1000);\n\t\t} else { //else simply show and hide notification\n\t\t\tupdateNotificationBoxText();\n\t\t\tshowAndHideNotificationBox();\n\t\t}\n\n\t\tbindCloseButton();\n\n\t}\n\n\tfunction hideAllNotifications() {\n\t\thideNotification('success');\n\t\thideNotification('error');\n\t\thideNotification('neutral');\n\t}\n\n\tfunction immediatelyHideAllNotifications() {\n\t\thideNotification('success', 0);\n\t\thideNotification('error', 0);\n\t\thideNotification('neutral', 0);\n\t}\n\n\t//TODO: options to disable hiding or separate method to just show and then automatically enforce X button, option to show and hide X button\n\n\treturn {\n\t\tshowAndHideNotification: showAndHideNotification,\n\t\thideNotification: hideNotification,\n\t\tshowNotification: showNotification,\n\t\thideAllNotifications: hideAllNotifications,\n\t\timmediatelyHideAllNotifications: immediatelyHideAllNotifications,\n\t};\n\n})();\n/*===== End of FLashing notifications https://github.com/maciejsaw/jQuery-FlashingNotifications ======*/", "function initSimplySetTabs() {\n\tvar bindedTabParams = {};\n\n\t$('[simply-tabs][simply-set-tab]').each(function() {\n\t\tvar tabsGroup = $(this).attr('simply-tabs');\n\t\tvar tabToActivate = $(this).attr('simply-set-tab');\n\n\t\tif (!bindedTabParams[tabsGroup]) {\n\t\t\tStateURL.onParamChange(tabsGroup, function(value) {\n\t\t\t\tif (typeof value != 'undefined') {\n\t\t\t\t\t$('[simply-tabs=\"'+tabsGroup+'\"][simply-tab-content=\"'+value+'\"]').removeClass('is-hidden');\n\t\t\t\t\t$('[simply-tabs=\"'+tabsGroup+'\"][simply-tab-content]').not('[simply-tab-content=\"'+value+'\"]').addClass('is-hidden');\n\n\t\t\t\t\t$('[simply-tabs=\"'+tabsGroup+'\"][simply-set-tab]').not('[simply-set-tab=\"'+value+'\"]').removeClass('is-current');\n\t\t\t\t\t$('[simply-tabs=\"'+tabsGroup+'\"][simply-set-tab=\"'+value+'\"]').addClass('is-current');\n\t\t\t\t}\n\t\t\t});\n\t\t\tbindedTabParams[tabsGroup] = true;\n\t\t}\n\t});\n\n\t$.On('click', '[simply-tabs][simply-set-tab]', function(event) {\n\t\tvar clickedTab = $(this).attr('simply-set-tab');\n\t\tvar clickedTabGroup = $(this).attr('simply-tabs');\n\t\tStateURL.setParam(clickedTabGroup, clickedTab, {doNotCreateHistoryState: true});\n\t});\n}\n\n$.On('preloadingComplete', function() {\n\tinitSimplySetTabs();\n});", "//prevent submitting forms by clicking enter\n$.On('preloadingComplete', function() {\n\t$('[js-prevent-default-form-submit]').each(function() {\n\t\t$(this).on('submit', function (event){\n\t\t\tevent.preventDefault();\n\t\t});\n\t});\n});\n\n$.On('click', '[prevent-default]', function(event) {\n\tevent.preventDefault();\n});\n\n$.On('click', '[stop-propagation]', function(event) {\n\tevent.stopPropagation();\n});\n\nfunction showSpinnerInClickedButton(clickedButtonElm, actionAfter) {\n\tclickedButtonElm.closest('[js-selector=\"button-with-spinner\"]').addClass('is-inactive-with-preloader')\n\t .find('[js-selector=\"button-spinner-icon\"]').removeClass('is-hidden');\n\n\tsetTimeout(function() {\n\t\tclickedButtonElm.closest('[js-selector=\"button-with-spinner\"]').removeClass('is-inactive-with-preloader')\n\t\t .find('[js-selector=\"button-spinner-icon\"]').addClass('is-hidden');\n\n\t\tactionAfter();\n\t}, 1500);\n}", "//Each checkbox state is stored in reactivelocalstorage\n$.On('click', '[simply-radio-buttons] [simply-radio-value]', function(event) {\n var paramToChange = $(this).closest('[simply-radio-buttons]').attr('simply-radio-buttons');\n var valueToSet = $(this).attr('simply-radio-value');\n State.setParam(paramToChange, valueToSet );\n});\n\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n $('[simply-radio-buttons]').each(function() {\n var paramToChange = $(this).attr('simply-radio-buttons');\n\n State.onParamChange(paramToChange, function(value) {\n var chosenItem = $('[simply-radio-buttons=\"'+paramToChange+'\"]').find('[simply-radio-value=\"'+value+'\"]');\n var otherNotChosenItems = $('[simply-radio-buttons=\"'+paramToChange+'\"]').find('[simply-radio-value]').not(chosenItem);\n chosenItem.addClass('is-selected');\n chosenItem.find('[simply-radio-icon]').removeClass('is-hidden');\n otherNotChosenItems.removeClass('is-selected');\n otherNotChosenItems.find('[simply-radio-icon]').addClass('is-hidden');\n });\n });\n});", "//This will bind all the input fields for the Reactive Local Storage, so that we can update rest ot the page based on this state\n//either on input or on focus out\n\n$.On('blur', '[simply-text-input]', function(event) {\n var thisAttr = $(this).attr('simply-text-input');\n State.setParam(thisAttr, $(this).val() );\n});\n\n$.On('input', '[simply-text-input][update-on-input]', function(event) {\n var thisAttr = $(this).attr('simply-text-input');\n var thisInputValue = $(this).val();\n if (typeof thisInputValue !== 'undefined' && event.target.validity.valid) {\n State.setParam(thisAttr, $(this).val() );\n } else if (isEmpty(thisInputValue)) {\n State.setParam(thisAttr, $(this).val() );\n }\n});\n\nfunction bindSimplyTextInputFieldsToStateBasedOnItsAttributes() {\n //for each input field existing in the html we check if there's a matching state\n $('[simply-text-input]').not('[simply-binded]').each(function() {\n var paramToChange = $(this).attr('simply-text-input');\n var clearButton = $(this).parent().parent().find('[simply-text-input-clear-button]');\n var thisInput = $(this);\n\n State.onParamChange(paramToChange, function(value) {\n $('[simply-text-input=\"'+paramToChange+'\"]').val(value);\n clearButton.isShownWhen(isNotEmpty(value));\n });\n\n //optional declaration of value on load\n var valueToSetOnLoad = $(this).attr('simply-text-value-on-load');\n if (isNotEmpty(valueToSetOnLoad)) {\n State.set(paramToChange, valueToSetOnLoad);\n }\n\n if (thisInput.attr('simply-input-type') === 'date') {\n thisInput.attr('type', 'date');\n }\n\n $(this).attr('simply-binded', '');\n });\n}\n\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n bindSimplyTextInputFieldsToStateBasedOnItsAttributes();\n});\n\n$.On('click', '[simply-text-input-clear-button]', function(event) {\n var thisParam = $(this).parent().parent().find('[simply-text-input]').attr('simply-text-input');\n State.setParam(thisParam, '');\n});\n\n$.On('preloadingComplete', function() {\n $('[simply-textarea-rows]').each(function() {\n var rows = $(this).attr('simply-textarea-rows');\n $(this).attr('rows', rows);\n });\n});\n\n//TODO Auto height for textarea", "//This will bind all checkboxes with attribute [simply-checkbox] the Reactive Local Storage, so that we can update rest ot the page based on this state\n//either on input or on focus out\n\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n\n //Each checkbox state is stored in reactivelocalstorage\n $.On('click', '[simply-checkbox]', function(event) {\n \tvar paramToChange = $(this).attr('simply-checkbox');\n \tvar valueToSet;\n \tif (State.getParam(paramToChange) == 'true') {\n \t\tvalueToSet = 'false';\n \t} else {\n \t\tvalueToSet = 'true';\n \t}\n\n \tState.setParam(paramToChange, valueToSet );\n });\n\n $('[simply-checkbox]').each(function() {\n var paramToChange = $(this).attr('simply-checkbox');\n\n //default state is the Webflow default state based on the class\n var $thisCheckmark = $(this).find('[simply-checkbox-checkmark]');\n\n State.onParamChange(paramToChange, function(value) {\n //fallback for weid autofill behaviour\n if (value !== \"false\" && value !== \"true\") {value = \"false\";}\n\n if (value == 'true') {\n \t$thisCheckmark.addClass('is-checked').removeClass('is-unchecked');\n } else if (value == 'false') {\n \t$thisCheckmark.removeClass('is-checked').addClass('is-unchecked');\n }\n });\n });\n\n});\n\n\n\n\n\n\n", "function initSlidersDragging() {\n\n function getAngleRatio(x, y) {\n if (y === 0) {y = 0.0001; } //prevent divide by zero\n var angleRatio = Math.abs(x) / Math.abs(y);\n return angleRatio;\n }\n\n function mathRound(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n }\n\n function roundToClosestMultipleOf(interval, inputNumber) {\n var intervalNumber = Number(interval);\n var inputNumberRounded = mathRound(inputNumber, 10);\n var int = mathRound(inputNumber/intervalNumber, 0);\n var toReturn = int*intervalNumber;\n return Number(toReturn);\n }\n\n $('[action-slider]').each(function() {\n\n var $swipableArea = $(this);\n var $sliderHandle = $(this).find('[js-slider-handle]');\n var $sliderPowerBar = $(this).find('[js-slider-powerbar]');\n var bindedParam = $(this).attr('action-slider');\n var minValue = Number($(this).attr('action-slider-min'));\n var maxValue = Number($(this).attr('action-slider-max'));\n var interval = Number($(this).attr('action-slider-interval')) || 1;\n\n function setSliderHandleToPercentage(percentageToSet) {\n $sliderHandle.css('left', maxWidth*percentageToSet + 'px');\n }\n\n function setSliderHandleToValue(valueToSet) {\n\n if (valueToSet > maxValue) { valueToSet = maxValue }\n if (valueToSet < minValue) { valueToSet = minValue }\n\n var percentage = (valueToSet - minValue)/(maxValue - minValue);\n var sliderWidth = $swipableArea.outerWidth();\n var pixels = (sliderWidth*percentage).toFixed(0)+'px';\n $sliderHandle.css('left', pixels);\n $sliderPowerBar.css('width', pixels);\n }\n\n /* Bind sliders positino to params value */\n State.onParamChange(bindedParam, function(value) {\n value = Number(value);\n\n //TODO replace with validation\n // if (value > maxValue) {\n // State.setParam(bindedParam, maxValue);\n // return;\n // }\n\n // if (value < minValue) {\n // State.setParam(bindedParam, minValue);\n // return;\n // }\n\n setSliderHandleToValue(value);\n });\n\n\n\n //we need function handler so that we can add and remove event listener later\n var handleTouchmovePreventDefault = function(e) {\n e.preventDefault();\n };\n\n $sliderHandle.on('movestart.sliderMove', function(event) {\n\n //console.log('test');\n\n //if move angle is less than 45 degrees...\n var angleRatio = getAngleRatio(event.deltaX, event.deltaY);\n if (angleRatio > 1 ) {\n\n //attempt to prevent window scrolling while vertical movement\n //https://stackoverflow.com/questions/21817397/event-handler-namespace-in-vanilla-javascript\n //not always works well on new iOS but helps a bit to prevent page bounce\n window.addEventListener('touchmove', handleTouchmovePreventDefault, { passive: false });\n\n var sliderWidth = $swipableArea.outerWidth();\n var currentHandlePosition = $sliderHandle.position().left;\n var distanceLimitRight = sliderWidth - currentHandlePosition;\n var distanceLimitLeft = -currentHandlePosition;\n\n //...we bind other events that handle dragging handle\n $swipableArea.on('move.sliderMove', function(moveEvent) {\n\n var distanceToMove = moveEvent.distX;\n\n //limit distance to move by amounts from left and right for the handle\n //wasn't enough to add this in condition, because the events are throttled\n //so with dropped frames it cause menu not to open/close fully\n if (distanceToMove > distanceLimitRight) { distanceToMove = distanceLimitRight; }\n if (distanceToMove < distanceLimitLeft) { distanceToMove = distanceLimitLeft; }\n\n //we round up pixels for better performance\n var pixelsToMove = (currentHandlePosition + distanceToMove).toFixed(0);\n\n var percetangeThatWasSet = pixelsToMove / sliderWidth;\n var resultNumber = (maxValue - minValue)*percetangeThatWasSet + Number(minValue);\n var resultNumberRounded = roundToClosestMultipleOf(interval, resultNumber);\n\n State.setParam(bindedParam, Number(resultNumberRounded));\n\n });\n\n $swipableArea.on('moveend.sliderMove', function(moveendEvent) {\n\n //unbind events previously attached on movestart\n $swipableArea.off('move.sliderMove');\n window.removeEventListener('touchmove', handleTouchmovePreventDefault, { passive: false });\n\n });\n }\n });\n\n $swipableArea.on('click', function(event) {\n //console.log(event);\n //only apply click logic if an area outside of handle is clicked\n if ($(event.target).closest('[js-slider-handle]').length === 0) {\n var eventVieportPageX = event.pageX - window.scrollX;\n var rect = $swipableArea[0].getBoundingClientRect();\n var clickedDistanceInElem = eventVieportPageX.toFixed(0) - rect.left.toFixed(0);\n var sliderWidth = $swipableArea.outerWidth();\n var clickedPercentage = clickedDistanceInElem / sliderWidth;\n var resultNumber = (maxValue - minValue)*clickedPercentage + Number(minValue);\n if (resultNumber > maxValue) {resultNumber = maxValue }\n if (resultNumber < minValue) {resultNumber = minValue }\n var resultNumberRounded = roundToClosestMultipleOf(interval, resultNumber);\n State.setParam(bindedParam, resultNumberRounded);\n }\n\n });\n\n });\n}\n\n$(document).on('preloadingComplete', function() {\n initSlidersDragging();\n});", "function fillBemStars($widget, value) {\n\t$widget.each(function() {\n\t\tstars = $(this).find('[bem-star]');\n\n\t\tif (isNotEmpty(value)) {\n\t\t\tstarsToFill = stars.slice(0, value);\n\t\t\tstarsToEmpty = stars.slice(value, 10);\n\t\t\tstarsToFill.each(function() {\n\t\t\t\t$(this).find('[bem-star-pic]').addClass('is-filled');\n\t\t\t});\n\t\t\tstarsToEmpty.each(function() {\n\t\t\t\t$(this).find('[bem-star-pic]').removeClass('is-filled');\n\t\t\t});\n\t\t}\n\t});\n}\n\n$.On('mouseenter touchstart', '[bem-star]', function(event) {\n\tvar param = $(this).closest('[action-bem-stars]').attr('action-bem-stars');\n\tvar valueToSet = $(this).attr('bem-star');\n\tState.set(param+\"__mouseover\", valueToSet);\n\tState.retriggerOnParamChange(param+\"__mouseover\");\n});\n\n$.On('mouseleave', '[action-bem-stars]', function(event) {\n\tvar param = $(this).attr('action-bem-stars');\n\tState.retriggerOnParamChange(param);\n});\n\n$.On('click touchend', '[bem-star]', function(event) {\n\tvar param = $(this).closest('[action-bem-stars]').attr('action-bem-stars');\n\tvar valueToSet = $(this).attr('bem-star');\n\tState.set(param, valueToSet);\n});\n\n$.On('preloadingComplete', function() {\n\t$('[action-bem-stars]').each(function() {\n\n\t\tvar thisWidget = $(this);\n\t\tvar param = thisWidget.attr('action-bem-stars');\n\n\t\tState.remove(param+\"__mouseover\");\n\t\tState.onChange(param+\"__mouseover\", function(value) {\n\t\t\tfillBemStars(thisWidget, value);\n\t\t});\n\n\t\tState.setDefault(param, 0);\n\t\tState.onChange(param, function(value) {\n\t\t\tfillBemStars(thisWidget, value);\n\t\t});\n\t});\n\n});", "function showLoadingInButton(elm) {\n\telm = $(elm);\n\telm.addClass('is-grayed-out');\n\telm.find('[simply-button-text-near-spinner]').addClass('is-with-spinner-shown');\n\telm.parent().attr('is-inactive-with-preloader', 'true')\n\t.find('[simply-button-spinner-icon]').removeClass('is-hidden').addClass('is-shown');\n}\n\nfunction hideLoadingInButton(elm) {\n\telm = $(elm);\n\telm.removeClass('is-grayed-out');\n\telm.find('[simply-button-text-near-spinner]').removeClass('is-with-spinner-shown');\n\telm.parent().removeAttr('is-inactive-with-preloader')\n\t.find('[simply-button-spinner-icon]').addClass('is-hidden').removeClass('is-shown');;\n}\n\nfunction showSuccessInButton(elm) {\n\telm = $(elm);\n\telm.addClass('is-with-success');\n\telm.find('[simply-button-text-near-spinner]').addClass('is-with-spinner-shown');\n\telm.parent().find('[simply-button-success-icon]').removeClass('is-hidden');\n}\n\nfunction hideSuccessInButton(elm) {\n\telm = $(elm);\n\telm.removeClass('is-with-success');\n\telm.find('[simply-button-text-near-spinner]').removeClass('is-with-spinner-shown');\n\telm.parent().find('[simply-button-success-icon]').addClass('is-hidden');\n}\n\nfunction initButtonsWithSpinner() {\n\t$('[simply-button-with-spinner]').each(function() {\n\t\tvar param = $(this).attr('simply-button-with-spinner');\n\t\tvar valueThatShowsSpinner = $(this).attr('simply-show-spinner-when-param-equals');\n\t\tvar thisButton = $(this);\n\n\t\tState.onChange(param, function(value) {\n\t\t\tif (value == valueThatShowsSpinner) {\n\t\t\t\tshowLoadingInButton(thisButton);\n\t\t\t} else if (value == 'success') {\n\t\t\t\thideLoadingInButton(thisButton);\n\t\t\t\tshowSuccessInButton(thisButton);\n\t\t\t} else {\n\t\t\t\thideLoadingInButton(thisButton);\n\t\t\t\thideSuccessInButton(thisButton);\n\t\t\t}\n\t\t});\n\t});\n\n\t$.On('click', '[is-inactive-with-preloader]', function(e) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\te.stopImmediatePropagation();\n\t\treturn false;\n\t});\n}\n\n$.On('preloadingComplete', function() {\n\tinitButtonsWithSpinner();\n});", "function hideSimplyDropdownMenus() {\n $('[simply-dropdown-menu-list]').isHidden();\n $('body').removeClass('is-with-dropdown-open');\n $('[simply-dropdown-menu-button]').removeClass('is-expanded').removeClass('is-current');\n $('[simply-dropdown-menu-chevron]').removeClass('is-expanded').removeClass('is-current');\n $('[simply-dropdown-menu-list]').removeClass('is-expanded').removeClass('is-current');\n $(document).trigger('hide-dropdown-menus');\n //console.log(\"Hide dropdowns menus...\");\n}\n\nfunction initSimplyDropdownMenus() {\n $.On('click', '[simply-dropdown-menu-button]', function() {\n var thisDropdown = $(this).closest('[simply-dropdown-menu]');\n var dropdownList = thisDropdown.find('[simply-dropdown-menu-list]').first();\n var dropdownButton = thisDropdown.find('[simply-dropdown-menu-button]');\n var allOtherDropdowns = $('[simply-dropdown-menu]').not(thisDropdown);\n var allOtherDropdownLists = allOtherDropdowns.find('[simply-dropdown-menu-list]');\n var allOtherDropdownButtons = allOtherDropdowns.find('[simply-dropdown-menu-button]');\n allOtherDropdownLists.addClass('is-hidden');\n allOtherDropdownLists.removeClass('is-expanded').removeClass('is-current');\n allOtherDropdownButtons.removeClass('is-expanded').removeClass('is-current');\n dropdownButton.toggleClass('is-expanded').toggleClass('is-current');\n dropdownButton.find('[simply-dropdown-menu-chevron]').toggleClass('is-expanded');\n dropdownList.toggleClass('is-hidden');\n $('body').toggleClass('is-with-dropdown-open'); //needed to add cursor pointer on iOS\n });\n\n $.On('click', function(e) {\n //if clicked outside the dropdown button and content, close it\n if ($(event.target).closest(\"[simply-dropdown-menu-button]\").length === 0 && $(event.target).closest('[simply-dropdown-menu-list]').length === 0) {\n hideSimplyDropdownMenus();\n }\n });\n\n $.On('click', '[simply-dropdown-menu-item]', function() {\n var thisDropdown = $(this).closest('[simply-dropdown-menu]');\n var dropdownList = thisDropdown.find('[simply-dropdown-menu-list]');\n dropdownList.addClass('is-hidden').removeClass('is-expanded').removeClass('is-current');\n });\n}\n\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n hideSimplyDropdownMenus();\n initSimplyDropdownMenus();\n});\n\n\n\n// Popover dropdowns - the same as dropdown menus but they do not disappear \n// when opening another popover and they can have other dropdown menus inside\nfunction hideSimplyPopovers() {\n $('[simply-popover-dropdown-list]').isHidden();\n $('body').removeClass('is-with-dropdown-open');\n $('[simply-popover-dropdown-button]').removeClass('is-expanded').removeClass('is-current');\n $('[simply-popover-dropdown-chevron]').removeClass('is-expanded').removeClass('is-current');\n $('[simply-popover-dropdown-list]').removeClass('is-expanded').removeClass('is-current');\n $(document).trigger('hide-dropdown-menus');\n //console.log(\"Hide popover dropdowns...\");\n}\n\nfunction initSimplyPopoverDropdowns() {\n $.On('click', '[simply-popover-dropdown-button]', function() {\n var thisDropdown = $(this).closest('[simply-popover-dropdown]');\n var dropdownList = thisDropdown.find('[simply-popover-dropdown-list]').first();\n var dropdownButton = thisDropdown.find('[simply-popover-dropdown-button]');\n var allOtherDropdowns = $('[simply-popover-dropdown]').not(thisDropdown);\n var allOtherDropdownLists = allOtherDropdowns.find('[simply-popover-dropdown-list]');\n var allOtherDropdownButtons = allOtherDropdowns.find('[simply-popover-dropdown-button]');\n allOtherDropdownLists.addClass('is-hidden');\n allOtherDropdownLists.removeClass('is-expanded').removeClass('is-current');\n allOtherDropdownButtons.removeClass('is-expanded').removeClass('is-current');\n dropdownButton.toggleClass('is-expanded').toggleClass('is-current');\n dropdownButton.find('[simply-popover-dropdown-chevron]').toggleClass('is-expanded');\n dropdownList.toggleClass('is-hidden');\n $('body').toggleClass('is-with-dropdown-open'); //needed to add cursor pointer on iOS\n });\n\n $.On('click', function(e) {\n //if clicked outside the dropdown button and content, close it\n if ($(event.target).closest(\"[simply-popover-dropdown-button]\").length === 0 && $(event.target).closest('[simply-popover-dropdown-list]').length === 0) {\n hideSimplyPopovers();\n }\n });\n\n $.On('click', '[simply-popover-dropdown-item]', function() {\n var thisDropdown = $(this).closest('[simply-popover-dropdown]');\n var dropdownList = thisDropdown.find('[simply-popover-dropdown-list]');\n dropdownList.addClass('is-hidden').removeClass('is-expanded').removeClass('is-current');\n });\n}\n\n$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n hideSimplyPopovers();\n initSimplyPopoverDropdowns();\n});", "$.On('preloadingComplete', function() { //need to wait for all the ajax to load\n\n //Each checkbox state is stored in reactivelocalstorage\n $.On('click', '[simply-toggle-switch]', function(event) {\n var paramToChange = $(this).attr('simply-toggle-switch');\n var valueToSet;\n if (State.getParam(paramToChange) == 'true') {\n valueToSet = 'false';\n } else {\n valueToSet = 'true';\n }\n\n State.setParam(paramToChange, valueToSet );\n });\n\n $('[simply-toggle-switch]').each(function() {\n var paramToChange = $(this).attr('simply-toggle-switch');\n\n //default state is the Webflow default state based on the class\n var $thisToggle = $(this); \n var $thisHandle = $(this).find('[simply-toggle-switch-handle]');; \n var $thisCircle = $(this).find('[simply-toggle-switch-circle]');\n\n State.onParamChange(paramToChange, function(value) {\n //fallback for weid autofill behaviour\n if (value !== \"false\" && value !== \"true\") {value = \"false\";}\n\n if (value == 'true') {\n $thisToggle.addClass('is-activated');\n $thisHandle.addClass('is-activated');\n $thisCircle.addClass('is-activated');\n } else if (value == 'false') {\n $thisToggle .removeClass('is-activated');\n $thisHandle.removeClass('is-activated');\n $thisCircle.removeClass('is-activated');\n }\n\n $thisToggle.find('[simply-toggle-switch-label=\"enabled\"]').isShownWhen(value === 'true');\n $thisToggle.find('[simply-toggle-switch-label=\"disabled\"]').isShownWhen(value === 'false');\n });\n });\n\n});\n", "$.On('click', '[js-add-another-field]', function(e) {\n var param = $(this).closest('[js-form-section-with-add-remove-fields]').attr('js-form-section-with-add-remove-fields');\n State.set(param+'__show-additional-add-remove-field-in-form', 'show');\n});\n\n$.On('click', '[js-remove-additional-field]', function(e) {\n var param = $(this).closest('[js-form-section-with-add-remove-fields]').attr('js-form-section-with-add-remove-fields');\n State.set(param+'__show-additional-add-remove-field-in-form', 'hide');\n});\n\n$.On('preloadingComplete', function() {\n $('[js-form-section-with-add-remove-fields]').each(function() {\n var param = $(this).attr('js-form-section-with-add-remove-fields');\n\n State.setDefault(param+'__show-additional-add-remove-field-in-form', 'hide');\n State.onChange(param+'__show-additional-add-remove-field-in-form', function(value) {\n var thisForm = $('[js-form-section-with-add-remove-fields=\"'+param+'\"]');\n thisForm.find('[js-additional-field]').isShownWhen(value === 'show')\n });\n });\n});\n", "function formatBytes(a,b=2){if(0===a)return\"0 Bytes\";const c=0>b?0:b,d=Math.floor(Math.log(a)/Math.log(1024));return parseFloat((a/Math.pow(1024,d)).toFixed(c))+\" \"+[\"Bytes\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"][d]};\n\nFile.prototype.toObject = function () {\n return Object({\n lastModified: parseInt(this.lastModified),\n lastModifiedDate: String(this.lastModifiedDate),\n name: String(this.name),\n size: parseInt(this.size),\n type: String(this.type)\n })\n}\n\nFileList.prototype.toArray = function () {\n return Array.from(this).map(function (file) {\n return file.toObject()\n })\n}\n\n$.On('preloadingComplete', function() {\n $('[simply-file-input]').each(function() {\n var param = $(this).attr('simply-file-input');\n var htmlInput = $(this).find('[simply-file-input-html-input]');\n\n\n\n State.setDefault(param, []);\n\n $.On('change', htmlInput, function() {\n //TODO in the future use uploaded files data\n //State.set(param, htmlInput.val());\n var filesFromInput = htmlInput[0].files.toArray();\n var filesPrevious = State.get(param);\n if (isEmpty(filesPrevious)) {\n filesPrevious = [];\n }\n\n $.each(filesFromInput, function(index, arrValue) {\n arrValue.status = 'not-uploaded-yet';\n arrValue.id = newId();\n arrValue.alreadyHandled = false;\n //TODO validate size etc.\n });\n\n var previousAndNewFiles = filesPrevious.concat(filesFromInput);\n State.set(param, previousAndNewFiles);\n\n //TODO remove this after tests\n // State.set(param, [\n // {\n // name: 'demofile.pdf',\n // size: '2.34 MB',\n // status: 'in-progress',\n // },\n // {\n // name: 'demofile.pdf',\n // size: '2.34 MB',\n // status: 'in-progress',\n // },\n // {\n // name: 'demofile.pdf',\n // size: '2.34 MB',\n // status: 'failed',\n // },\n // ]);\n\n\n\n // delay(3000, function() {\n // State.set(param, [\n // {\n // name: 'demofile.pdf',\n // size: '2.34 MB',\n // status: 'success',\n // },\n // {\n // name: 'demofile.pdf',\n // size: '2.34 MB',\n // status: 'success',\n // },\n // {\n // name: 'demofile.pdf',\n // size: '2.34 MB',\n // status: 'failed',\n // },\n // ]);\n // });\n\n delay(200, function() {\n htmlInput.val('');\n });\n });\n\n State.bindArrayList(param, function($elementToAppend, arrayValue) {\n //console.log(arrayValue);\n\n $elementToAppend.find('[simply-file-input-item-state=\"not-uploaded-yet\"]').isShownWhen(arrayValue.status === 'not-uploaded-yet');\n $elementToAppend.find('[simply-file-input-item-state=\"in-progress\"]').isShownWhen(arrayValue.status === 'in-progress');\n $elementToAppend.find('[simply-file-input-item-state=\"success\"]').isShownWhen(arrayValue.status === 'success' || arrayValue.status === 'uploaded');\n $elementToAppend.find('[simply-file-input-item-state=\"failed\"]').isShownWhen(arrayValue.status === 'failed');\n $elementToAppend.find('[simply-file-input-file-name]').text(arrayValue.name)\n $elementToAppend.find('[simply-file-input-file-size]').text(formatBytes(arrayValue.size));\n $elementToAppend.find('[simply-file-input-item-success]').addClass('is-transparent');\n if (arrayValue.status == 'success') {\n $elementToAppend.find('[simply-file-input-item-success]').removeClass('is-transparent');\n setTimeout(function() {\n $elementToAppend.find('[simply-file-input-item-success]').addClass('is-transparent');\n }, 1000);\n } else if (arrayValue.status == 'uploaded') {\n $elementToAppend.find('[simply-file-input-item-success]').addClass('is-transparent');\n }\n //TODO add more details, percentage, progress bar etc.\n });\n });\n\n $.On('click', '[simply-file-input-select-files-zone]', function() {\n var thisInput = $(this).closest('[simply-file-input]');\n var htmlInput = thisInput.find('[simply-file-input-html-input]');\n htmlInput.click();\n });\n\n $.On('click', '[simply-file-input-remove-file]', function() {\n //TODO\n //Get this input param name\n //Get index of the item\n //Remove the clicked index from param value\n var thisItem = $(this).closest('[simply-file-input-item]');\n var param = $(this).closest('[simply-file-input]').attr('simply-file-input');\n var index = thisItem.index() - 1 - 1; //minus one because of repeatable clone template in the DOM //TODO change to ID\n console.log(index);\n console.log(param);\n State.removeElementFromArrayXWithIndexY(param, index);\n });\n});\n\nfunction simplyPrototypeFakeFileUploadForParamX(paramName) {\n\n //check if there are unhandled files\n filesUploadArr = State.get(paramName);\n\n var thereAreNotHandledFiles = false;\n $.each(filesUploadArr, function(index, arrValue) {\n if (arrValue.alreadyHandled == false) {\n thereAreNotHandledFiles = true;\n }\n });\n\n //fake upload of unhandled files\n if (thereAreNotHandledFiles) {\n State.set(paramName+\"__all-uploads-finished\", '');\n\n $.each(filesUploadArr, function(index, arrValue) {\n\n filesUploadArr[index].alreadyHandled = true;\n\n if (filesUploadArr[index].status === 'not-uploaded-yet') {\n filesUploadArr[index].status = 'in-progress';\n //fake error\n if (index == 2) {\n filesUploadArr[index].status = 'failed';\n } \n State.set(paramName, filesUploadArr);\n\n var timer1 = setTimeout(function() {\n //console.log(filesUploadArr[index]);\n if (filesUploadArr[index].status === 'in-progress') {\n filesUploadArr[index].status = 'success';\n State.set(paramName, filesUploadArr);\n }\n }, 1500);\n\n var timer2 = setTimeout(function() {\n clearTimeout(timer1);\n //console.log(filesUploadArr[index].status);\n if (filesUploadArr[index].status === 'success') {\n filesUploadArr[index].status = 'uploaded';\n State.set(paramName, filesUploadArr);\n }\n\n if (index+1 === filesUploadArr.length) {\n checkAllUploadsStatus();\n }\n }, 3000)\n\n } \n\n });\n }\n\n //check all uploaded files status and trigger state change for handling success or failure callback\n function checkAllUploadsStatus() {\n var allSuccessful = true;\n $.each(filesUploadArr, function(index, arrValue) {\n if (filesUploadArr[index].status !== 'uploaded' && filesUploadArr[index].status !== 'success') {\n allSuccessful = false;\n }\n });\n\n if (allSuccessful === true) {\n State.set(paramName+\"__all-uploads-finished\", 'all-successful');\n } else {\n State.set(paramName+\"__all-uploads-finished\", 'not-all-successful');\n }\n }\n}\n\nvar simpyPrototypeFakeFileUploadForParamX = simplyPrototypeFakeFileUploadForParamX; //typo backwards compatibility", "$(document).on('preloadingComplete', function() {\n $('[protoflow-on-click-set-state]').each(function() {\n var thisParent = $(this).parent();\n thisParent.attr('protoflow-on-click-set-state__parent', '');\n });\n});\n\n$.On('click', '[protoflow-on-click-set-state__parent]', function(e) {\n e.stopPropagation();\n $(this).find('[protoflow-on-click-set-state]').each(function() {\n var key = $(this).find('[protoflow-on-click-set-state__key]').text().trim().split(' ').join('-');\n var value = $(this).find('[protoflow-on-click-set-state__value]').text().trim();\n var delayTime = $(this).find('[protoflow-on-click-set-state__delay]').text().trim();\n var createHistoryState = $(this).find('[protoflow-on-click-set-state__create-history-state]').text().trim().toLowerCase();\n if (createHistoryState === 'true') {\n createHistoryState = true;\n } else {\n createHistoryState = false;\n }\n if (isEmpty(delayTime) || !$.isNumeric(delayTime)) {\n delayTime = 0;\n }\n delay(delayTime, function() {\n if (isNotEmpty(key) && isNotEmpty(value)) {\n StateURL.set(key, value, {doNotCreateHistoryState: !createHistoryState});\n }\n });\n });\n});", "$(document).on('preloadingComplete', function() {\n $('[protoflow-text-input-bind-to-state]').each(function() {\n var parent = $(this).parent();\n var input = parent.find('input[type=\"text\"], input[type=\"textarea\"]');\n var key = parent.find('[protoflow-text-input-bind-to-state__key]').text().trim().split(' ').join('-');\n input.attr('protoflow-text-input-bind-to-state__input', key);\n var updateOnInput = parent.find('[protoflow-text-input-bind-to-state__update-on-input]').text().trim().toLowerCase();\n if (updateOnInput === 'true') {\n input.attr('update-on-input', 'true');\n } else {\n input.removeAttr('update-on-input');\n }\n\n StateURL.onChange(key, function(value) {\n input.val(value);\n });\n\n var defaultValue = parent.find('[protoflow-text-input-bind-to-state__default-value]').text();\n if (isNotEmpty(defaultValue)) {\n StateURL.setDefault(key, defaultValue);\n }\n });\n\n function protoflowTriggerBindedTextInput($input) {\n var thisInputValue = $input.val();\n var key = $input.attr('protoflow-text-input-bind-to-state__input');\n if (isNotEmpty(thisInputValue)) {\n StateURL.set(key, thisInputValue, {doNotCreateHistoryState: true});\n } else if (isEmpty(thisInputValue)) {\n StateURL.remove(key, {doNotCreateHistoryState: true});\n }\n }\n\n $.On('blur', '[protoflow-text-input-bind-to-state__input]', function(event) {\n protoflowTriggerBindedTextInput($(this));\n });\n\n $.On('input', '[protoflow-text-input-bind-to-state__input][update-on-input]', function(event) {\n protoflowTriggerBindedTextInput($(this));\n });\n});\n\n\n", "function initInteractionElement__addClassWhen() {\n $('[protoflow-add-class-when]').each(function() {\n var parent = $(this).parent();\n var key = $(this).find('[protoflow-add-class-when__key]').text().trim().split(' ').join('-');\n var valueToMatch = $(this).find('[protoflow-add-class-when__value]').text().trim();\n var classToAdd = $(this).find('[protoflow-add-class-when__class-name]').text().trim().split(' ').join('-').toLowerCase();\n var delayTimeAdding = $(this).find('[protoflow-add-class-when__delay-adding]').text().trim().split(' ').join('-').toLowerCase() || 0;\n var delayTimeRemoving = $(this).find('[protoflow-add-class-when__delay-removing]').text().trim().split(' ').join('-').toLowerCase() || 0;\n\n if (isNotEmpty(key) && isNotEmpty(valueToMatch) && isNotEmpty(classToAdd)) {\n StateURL.onChange(key, function(value) {\n var expression = value == valueToMatch;\n if (!!expression) {\n setTimeout(function() {\n parent.addClass(classToAdd);\n }, delayTimeAdding);\n } else {\n setTimeout(function() {\n parent.removeClass(classToAdd);\n }, delayTimeRemoving);\n }\n });\n }\n });\n}", "function initInteractionElement__isShownWhen() {\n $('[protoflow-is-shown-when]').each(function() {\n var parent = $(this).parent();\n var key = $(this).find('[protoflow-is-shown-when__key]').text().trim().split(' ').join('-');\n var valueToMatch = $(this).find('[protoflow-is-shown-when__value]').text().trim();\n\n if (isNotEmpty(key) && isNotEmpty(valueToMatch)) {\n StateURL.onChange(key, function(value) {\n parent.removeClassWhen(value == valueToMatch, 'is-hidden');\n parent.removeClassWhen(value == valueToMatch, 'is-hidden-by-protoflow');\n });\n\n // State.onChange(key, function(value) {\n // parent.removeClassWhen(value == valueToMatch, 'is-hidden');\n // parent.removeClassWhen(value == valueToMatch, 'is-hidden-by-protoflow');\n // });\n }\n });\n}", "$(document).on('preloadingComplete', function() {\n $('[protoflow-set-default]').each(function() {\n var key = $(this).find('[protoflow-set-default__key]').text().trim().split(' ').join('-');\n var valueToSet = $(this).find('[protoflow-set-default__value]').text().trim();\n\n if (isNotEmpty(key) && isNotEmpty(valueToSet)) {\n StateURL.setDefault(key, valueToSet, {doNotCreateHistoryState: true});\n }\n });\n});", "$(document).on('preloadingComplete', function() {\n $('[protoflow-on-pageload-set]').each(function() {\n var key = $(this).find('[protoflow-on-pageload-set__key]').text().trim().split(' ').join('-');\n var valueToSet = $(this).find('[protoflow-on-pageload-set__value]').text().trim();\n\n if (isNotEmpty(key) && isNotEmpty(valueToSet)) {\n StateURL.set(key, valueToSet, {doNotCreateHistoryState: true});\n }\n });\n});", "$(document).on('preloadingComplete', function() {\n $('[protoflow-on-click-go-back]').each(function() {\n var thisParent = $(this).parent();\n thisParent.attr('protoflow-on-click-go-back__parent', '');\n });\n});\n\n$.On('click', '[protoflow-on-click-go-back__parent]', function(e) {\n e.stopPropagation();\n window.history.back();\n});", "$.On('preloadingComplete', function() {\n var tooltipsterTrigger = 'custom';\n\n var tooltipsterTriggerOpen = {\n mouseenter: true,\n touchstart: true,\n tap: true,\n click: true\n };\n\n var tooltipsterTriggerClose = {\n mouseleave: true,\n scroll: true,\n tap: true\n };\n\n $('[protoflow-tooltip]').parent().not('.tooltipstered').each(function() {\n var tooltipPosition = $(this).find('[protoflow-tooltip__position]').text().toLowerCase().trim();\n var tooltipContent = $(this).find('[protoflow-tooltip__text]').html();\n var tooltipDelay = $(this).find('[protoflow-tooltip__delay]').text().trim();\n var tooltipMaxWidth = $(this).find('[protoflow-tooltip__max-width]').text().trim();\n $(this).tooltipster({\n position: tooltipPosition,\n trigger: 'custom',\n triggerOpen: tooltipsterTriggerOpen,\n triggerClose: tooltipsterTriggerClose,\n hideOnClick: false,\n animation: 'fade',\n delay: parseInt(tooltipDelay),\n animationDuration: 150,\n maxWidth: parseInt(tooltipMaxWidth) || 280,\n theme: 'tooltipster-borderless',\n restoration: 'current',\n contentAsHTML: true,\n content: tooltipContent\n });\n });\n});", "function handleProtoflowAttributeToParent() {\n $('[protoflow-attribute-of-parent]').each(function() {\n var key = $(this).find('[protoflow-attribute-of-parent__key]').text();\n var value = $(this).find('[protoflow-attribute-of-parent__value]').text();\n if (isEmpty(value)) {value = ''};\n if (isNotEmpty(key)) {\n $(this).parent().attr(key, value);\n }\n });\n}\n\nfunction handleProtoflowAttributeToPreviousSibling() {\n $('[protoflow-attribute-of-previous-sibling]').each(function() {\n var key = $(this).find('[protoflow-attribute-of-previous-sibling__key]').text();\n var value = $(this).find('[protoflow-attribute-of-previous-sibling__value]').text();\n if (isEmpty(value)) {value = ''};\n if (isNotEmpty(key)) {\n $(this).prevAll().not('[protoflow-attribute-of-previous-sibling]').first().attr(key, value);\n }\n });\n}" ] }