var AAN = AAN || {};
Formstone.NoConflict();
try {
AAN.nav_universal = function ($) {
var namespace = 'header';
var $doc = $(document);
var $html = $('html');
var $body = $('body');
var $nav = $('.nav-universal-container');
var $btnSiteSearch = $nav.find('.btn-site-search');
var btnSiteSearchTextDefault = $btnSiteSearch.text();
var btnSiteSearchTextHide = 'Hide Search';
var $siteSearch = $nav.find('.site-search-container');
var $btnPublications = $nav.find('.publications button')
var $modal = $('.modal-publications');
var $btnModalClose = $modal.find('.btn-close');
var $loginModal = $('#login');
var $btnLogin = $nav.find('.login button');
init = function () {
var closeModal = function () {
$(".hdr-global").show();
$("main").show();
$(".ftr-global-container").show();
$body.removeClass('modal-active-publications');
$modal.siblings().each(function () {
$(this)[0].inert = false;
});
$btnPublications.focus();
$doc.off('keyup.publicationsModal');
};
$btnPublications.on('click', function () {
$(".hdr-global").hide();
$("main").hide();
$(".ftr-global-container").hide();
$body.addClass('modal-active-publications');
$modal.scrollTop(0);
$modal.siblings().each(function () {
$(this)[0].inert = true;
});
$btnModalClose.focus();
$doc.on('keyup.publicationsModal', function (e) {
if (e.keyCode === 27) {
closeModal();
}
});
});
$btnModalClose.on('click', function () {
closeModal();
});
$btnSiteSearch.on('click', function () {
var $btn = $(this);
if ($nav.hasClass('search-active')) {
$nav.removeClass('search-active');
$siteSearch.fadeOut('fast');
$btn.text(btnSiteSearchTextDefault);
}
else {
$nav.addClass('search-active');
$btn.text(btnSiteSearchTextHide);
$siteSearch.fadeIn('fast');
$siteSearch.find('input[type="search"]').eq(0).focus();
}
});
$btnLogin.on('click', function () {
$loginModal.addClass('visible');
$loginModal.animate({
'opacity': 1,
}, 500);
$html.addClass('modal-open');
});
$loginModal.find('.overlay, .btn-close').on('click', function () {
$loginModal.animate({
'opacity': 0,
}, 500, function () {
$loginModal.removeClass('visible');
});
$html.removeClass('modal-open');
});
};
self.init();
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.main_nav = function ($) {
var namespace = 'main-nav';
var $html = $('html');
var $menu = $('#main-menu');
var $menuBtn = $menu.find('.btn-nav-main');
var $submenuTriggers = $menu.find('.icon-submenu-trigger');
var $navButtons = $menu.find('> ul > li');
init = function () {
$menuBtn.on('click.' + namespace, function () {
var $this = $(this);
if (!$html.hasClass('menu-open')) {
$this.find('span').html('Hide');
$this.attr('aria-expanded', 'true');
}
else {
$this.find('span').html('Display');
$this.attr('aria-expanded', 'false');
}
$html.toggleClass('menu-open');
});
$submenuTriggers.on('click.' + namespace, function () {
var $this = $(this),
$li = $this.closest('li');
$this.blur();
if (!$li.hasClass('submenu-open')) {
var $openMenu = $menu.find('.submenu-open');
$openMenu.find('button').attr('aria-expanded', 'false').find('span').html('Display');
$this.attr('aria-expanded', 'true').find('span').html('Hide');
}
else {
$this.attr('aria-expanded', 'false').find('span').html('Display');
}
$li.toggleClass('submenu-open');
});
$.fsMediaquery("bind", "mq-key", "(min-width: 959px)", {
enter: function () {
whatInput.registerOnChange(inputChange, 'intent');
// if the main input changes (touch -> mouse, mouse -> touch) we need to change how we handle the
// logic for the nav menu.
function inputChange(type) {
$html.removeClass('menu-open');
$navButtons.find('a').off('click');
if (type === 'touch') {
$navButtons.find('> a').on('click.' + namespace, function (e) {
var focusEvent,
li = $(this).closest('li');
if (!$(this).closest('li').hasClass('submenu-open')) {
e.preventDefault();
$menu.find('.submenu-open').removeClass('submenu-open');
li.addClass('submenu-open').focus();
li.one("focusout", function () {
li.removeClass('submenu-open');
});
}
});
}
}
var lastScrollPos;
var upDistance;
$(window).on('scroll.stickynav', $.throttle(150, function () {
var scrollTop = $(this).scrollTop();
var $body = $('body');
var headerOuterHeight = $('.hdr-global').outerHeight();
if (lastScrollPos) {
if (scrollTop > lastScrollPos && scrollTop > headerOuterHeight) {
$body.addClass('direction-down');
$body.removeClass('direction-up');
upDistance = null;
} else {
if (!upDistance) {
upDistance = scrollTop;
}
if (upDistance - scrollTop > 25 || scrollTop < headerOuterHeight) {
$body.addClass('direction-up');
$body.removeClass('direction-down');
}
}
}
lastScrollPos = scrollTop;
}));
},
leave: function () {
$navButtons.find('a').off('click.' + namespace);
$(window).unbind('scroll.stickynav');
$('body').removeClass('direction-down');
$('body').removeClass('direction-up');
}
});
};
self.init();
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.multistepForm = function ($) {
var $formContainer = $('#main').find('.multistep-form');
function init() {
$formContainer.find('fieldset.step').eq(0).removeClass('collapsed').find('.multistep-form-fields').slideDown();
$('.multistep-form .step .button-next').on('click', function () {
$error = false;
$(this).parents('fieldset.step').find('input').each(function () {
if ($(this)[0].checkValidity()) {
$(this).parents(".field").removeClass('error');
} else {
$error = true;
$(this).parents(".field").addClass('error');
}
});
if ($error === true) {
return false;
}
$(this)
.parents('fieldset.step')
.addClass('filled')
.toggleClass('expanded')
.toggleClass('collapsed')
.find('.multistep-form-fields')
.slideUp()
.parents()
.next('fieldset.step.collapsed')
.toggleClass('expanded')
.toggleClass('collapsed')
.find('.multistep-form-fields')
.slideDown();
return false;
});
$('.multistep-form .step .button').on('click', function () {
$error = false;
$(this).parents('fieldset.step').find('input').each(function () {
if ($(this)[0].checkValidity()) {
$(this).parents(".field").removeClass('error');
} else {
$error = true;
$(this).parents(".field").addClass('error');
}
});
if ($error === true) {
return false;
}
});
$('.multistep-form .step .multistep-form-modify').on('click', function () {
$formContainer.find('fieldset.step').addClass('collapsed').removeClass('expanded').find('.multistep-form-fields').slideUp();
$(this)
.parents('fieldset.step')
.removeClass('filled')
.addClass('expanded')
.removeClass('collapsed')
.find('.multistep-form-fields')
.slideDown()
});
$('#IDoNotSeeMyMedicalSchoolListed, #IDoNotSeeMyResidencyLocationListed').on('click', function () {
if ($(this).is(':checked')) {
$(this).parents('.field').next('.field').addClass('is-visible');
$(this).parents('.field').next('.field').find('input').prop('disabled', false);
$(this).parents('.field').next('.field').find('input').prop('required', true);
$(this).parents('.secondary-element').find('select').prop('disabled', true);
}
else {
$(this).parents('.field').next('.field').removeClass('is-visible');
$(this).parents('.field').next('.field').find('input').prop('disabled', true);
$(this).parents('.field').next('.field').find('input').prop('required', false);
$(this).parents('.secondary-element').find('select').prop('disabled', false);
}
})
}
if ($formContainer.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.slick_slider = function ($) {
var $window = $(window);
var $slick = $('.slick-slider');
var $pagination = $('.slider-pagination');
init = function () {
if ($window.width() < 768) {
$slick.slick({
arrows: false,
dots: true,
appendDots: $pagination
});
}
};
if ($slick.length) {
self.init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.alert = function ($) {
var $alert = $('main .alert-container:not([id])');
var $breaking = $('main .breaking-container:not([id])');
//migrate the flag from session storage to local storage.
if (window.sessionStorage.closedAlert !== undefined) {
window.localStorage.closedAlert = "true";
delete window.sessionStorage.closedAlert;
}
//If the cookie saying the user
if (document.querySelector("main > .breaking-container") !== null
&& window.localStorage.closedAlert !== "true") {
document.querySelector("main > .breaking-container")
.style.display = "";
}
init = function () {
$alert.each(function () {
var $this = $(this);
$this.find('.btn-close').on('click', function () {
$this.remove();
});
});
};
if ($alert.length) {
self.init();
}
if ($breaking.length) {
$breaking.each(function () {
var $this = $(this);
$this.find('.btn-close').on('click', function () {
window.localStorage.closedAlert = "true";
$this.hide();
});
});
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.seeMore = function ($) {
var $seeMoreItems = $('.see-more');
function init() {
// loop through each see more item on the page
$seeMoreItems.each(function (i, el) {
$(el).data('initialheight', $(el).find('.text').height());
$(el).on('click', 'button', function () {
toggle(el);
});
// append the button
$(el).append($('')
.attr('aria-expanded', false)
.text($(el).data('showmorelabel'))
.attr('aria-label', $(this).data('aria-label-show'))
);
});
}
function toggle(el) {
var initialHeight = $(el).data('initialheight');
var expandedHeight = $(el).find('.text-inner').innerHeight();
// if the component is open
if ($(el).hasClass('is-open')) {
$(el).find('.text').animate({
height: initialHeight
});
$(el).find('button')
.attr('aria-expanded', false)
.attr('aria-label', $(el).data('aria-label-show'))
.text($(el).data('showmorelabel'));
// if the component is closed
} else {
$(el).find('.text').animate({
height: expandedHeight
}, function () {
$(el).find('.text').css({
height: 'auto'
});
});
$(el).find('button')
.attr('aria-expanded', true)
.attr('aria-label', $(el).data('aria-label-hide'))
.text($(el).data('showlesslabel'));
}
// toggle the is-open class
$(el).toggleClass('is-open');
}
$(function () {
// if there are see more items on the page
if ($seeMoreItems.length > 0) {
init();
}
});
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.dateCarouselSlickSlider = function ($) {
var $window = $(window);
var $slick = $('.date-carousel .slickslider');
init = function () {
$slick.slick({
//arrows: true,
dots: false,
infinite: true,
slidesToShow: 7,
slidesToScroll: 7,
responsive: [
{
breakpoint: 768,
settings: {
dots: false,
infinite: true,
slidesToShow: 7,
slidesToScroll: 7
}
}
]
});
$('li.slick-slide').on('click', function () {
$('li.slick-slide.slick-current').toggleClass('slick-current');
$(this).toggleClass('slick-current');
});
};
if ($slick.length) {
self.init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.descriptionScroll = function ($) {
var $scrollFollow = $('.scroll-follow'),
$window = $(window),
topPadding = $('.hdr-global').length > 0 ? $('.hdr-global').outerHeight() + 20 : 70,
breakpoint = 960;
var init = function () {
if ($window.width() > breakpoint) {
$scrollFollow.each(function () {
var params = {
element: $(this),
elementOffset: $(this).offset(),
parentHeight: $(this).parent().innerHeight(),
elementHeight: $(this).outerHeight(),
topPadding: topPadding
};
// Attaching event handler
$window.scroll(params, scrollFollow);
// Triggering handler once to align scroll-follow elements if page reloaded
if ($window.scrollTop() > 0) {
$window.triggerHandler('scroll');
}
});
} else {
// Cleaning up event handler and removing style attributes
$scrollFollow.each(function () {
$(this).removeAttr('style');
});
$window.off('scroll', scrollFollow);
}
};
function scrollFollow(event) {
var y = event.currentTarget.scrollY || event.currentTarget.pageYOffset;
if (y > (event.data.elementOffset.top - event.data.topPadding)
&& (y - event.data.elementOffset.top + topPadding < (event.data.parentHeight - event.data.elementHeight))) {
event.data.element.css({
marginTop: y - event.data.elementOffset.top + event.data.topPadding
});
}
else if (y < (event.data.elementOffset.top - event.data.topPadding)) {
event.data.element.css({
marginTop: 0
});
}
}
$(function () {
// if there are items with scroll-follow on the page
if ($scrollFollow.length > 0) {
$window.resize(function () { init(); });
init();
}
});
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.coursesOverlay = function ($) {
var $courses = $('#main').find('.cme-moc-courses-container');
function calcOverlay() {
var $overlay = $courses.find('.member-only-overlay');
$.fsMediaquery("bind", "mq-key", "(max-width: 959px)", {
enter: function () {
var $secondCourse = $courses.find('.course-items li.second-item');
var $lastCourse = $courses.find('.course-items li:last-child');
var $overlayMobileHeight = $secondCourse.outerHeight() + $lastCourse.outerHeight();
$overlay.css('height', $overlayMobileHeight);
},
leave: function () {
$overlay.css('height', '');
}
});
}
if ($courses.length) {
calcOverlay();
}
$(window).resize(function () {
calcOverlay();
});
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.breadcrumbs = function ($) {
var $breadcrumbs = $('nav.breadcrumbs');
function init() {
if ($breadcrumbs.find('ol li').length >= 2) {
$breadcrumbs.find('ol li:nth-last-child(2)').addClass('back-to-link').text();
}
else {
$breadcrumbs.hide();
}
}
if ($breadcrumbs.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.leftNav = function ($) {
var $leftnav = $('#main').find('.left-nav');
init = function () {
// create dropdown select from list
$('').appendTo('.left-nav').attr('id', 'left-nav');
// populate dropdown with menu items
$('.left-nav a').each(function () {
var el = $(this);
if (el.hasClass('active')) {
$('', {
"selected": "selected",
'value': el.attr('href'),
'text': el.text()
}).appendTo('.left-nav > select');
}
else {
$('', {
'value': el.attr('href'),
'text': el.text()
}).appendTo('.left-nav > select');
}
});
//add an accessibility label for select
$('').prependTo('select').attr('for', 'left-nav').text('Side Navigation');
$(".left-nav select").change(function (event) {
if (!!event.target.value) {
window.location = event.target.value
}
});
};
if ($leftnav.length) {
self.init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.pageNotFound = function ($) {
var $pageNotFound = $('#main').find('.hero.page-not-found');
function init() {
checkSize();
$(window).on('resize', function () {
checkSize();
});
}
function checkSize() {
tmpHeight = $(window).height() - ($('.hdr-global').height() + $('.ftr-global-container').height());
$pageNotFound.css('height', tmpHeight);
}
if ($pageNotFound.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.scrollTabs = function ($) {
var $courses = $('main').find('.tabs');
function init() {
activeItem = $courses.find('.active');
setActive(activeItem);
}
function setActive(item) {
$courses.scrollLeft(item.position().left - item.outerWidth() / 2);
$('.tabs').scrollLeft($('.tab-menu li.active').position().left - (($(window).width() / 2) - ($('.tab-menu li.active').width() / 2)));
}
if ($courses.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.scrollTop = function ($) {
var $button = $('.scroll-top-container .button-green');
var $showpoint = $(window).height() / 2;
var $formActions = $('.form-actions-container');
if ($formActions.length) {
$('body').addClass('form-actions-page');
}
function scrollPosition() {
$(window).off('scroll.scrolltop').on('scroll.scrolltop', function () {
if ($(window).scrollTop() > $showpoint) { $button.addClass('visible'); }
if ($(window).scrollTop() <= $showpoint) { $button.removeClass('visible'); }
});
// scroll body to 0px on click
$button.off('click.scrolltop').on('click.scrolltop', function (e) {
e.preventDefault();
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
}
scrollPosition();
$(window).resize(function () {
scrollPosition();
});
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.showAbstract = function ($) {
var $abstractContainer = $('#main').find('.search-results .abstract-container');
function init() {
$abstractContainer.each(function (i, el) {
$(el).on('click', '.show-abstract-toggle', function (e) {
var $this = $(this),
$abstract = $this.next();
e.preventDefault();
// reset all abstracts
$('.search-results .show-abstract-toggle').removeClass('is-open').find('a').text('Show Abstract').attr('aria-label', 'Show Abstract');
$('.search-results .abstract-text').slideUp();
// abstract opens one at a time
if ($this.hasClass('is-open') && ($abstract.is(':visible'))) {
$this.removeClass('is-open').find('a').text('Show Abstract').attr('aria-label', 'Show Abstract');
$abstract.slideUp(400);
}
if (!($this.hasClass('is-open')) && (!($abstract.is(':visible')))) {
$this.addClass('is-open').find('a').text('Hide Abstract').attr('aria-label', 'Hide Abstract');
$abstract.slideDown(400);
}
});
});
}
if ($abstractContainer.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.showMore = function ($) {
var $moreLink = $('.layout-sidebar.left a#js-show-more');
function init() {
$($moreLink).on('click', function (e) {
if ($('.layout-sidebar.left .cut').hasClass('open')) {
$('.layout-sidebar.left .cut').hide().removeClass('open');
$moreLink[0].innerText = 'Show more';
} else {
$('.layout-sidebar.left .cut').show().addClass('open');
$moreLink[0].innerText = 'Show less';
}
});
}
if ($moreLink.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.showAccordion = function ($) {
var $accordionContainer = $('main').find('.accordion-container');
function init() {
$('.accordion-header').on('click', function () {
var $container = $(this.parentElement);
// abstract opens one at a time
if ($container.find('.accordion-list').hasClass('is-open')) {
$container.find('.accordion-list').removeClass('is-open').slideUp(400);
$container.find(".fa-chevron-down").show();
$container.find(".fa-chevron-up").hide();
} else {
$container.find('.accordion-list').addClass('is-open').slideDown(400);
$container.find(".fa-chevron-down").hide();
$container.find(".fa-chevron-up").show();
}
});
}
if ($accordionContainer.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.dropdown = function ($) {
var $dropdown = $('.dropdown');
function init($this) {
var $trigger = $this.find('.dropdown-trigger');
var $content = $this.find('.dropdown-content');
var $html = $('html');
var $document = $(document);
$trigger.on('click keyup', function (e) {
e.preventDefault();
if (e.type === 'click' || e.keyCode === 13 || e.keyCode == 32) {
$('.dropdown-content').not($(this).next()).removeClass('visible');
var triggerClass = $trigger.hasClass('active');
if (triggerClass) {
$trigger.removeClass('active');
} else {
$trigger.addClass('active');
}
$content.toggleClass('visible');
$html.attr('data-scrollpos', $(window).scrollTop());
$html.toggleClass('modal-open');
$html.removeClass('menu-open');
}
});
$document.on('click.dropdown', function (e) {
if (!$(e.target).closest('.dropdown').length) {
$content.removeClass('visible');
$trigger.removeClass('active');
}
});
$content.find('.cancel, .btn-close').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$content.find('input').each(function () {
$(this).val('');
});
$content.find('.fs-checkbox-checked').each(function () {
$(this).click();
});
$content.toggleClass('visible');
$html.removeClass('modal-open');
if ($(window).width() < 960) {
$('html, body').scrollTop($html.data('scrollpos'));
}
});
$content.find('.apply').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$content.toggleClass('visible');
$html.removeClass('modal-open');
if ($(window).width() < 960) {
$('html, body').scrollTop($html.data('scrollpos'));
}
});
}
if ($dropdown.length) {
$dropdown.each(function () {
init($(this));
})
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.formstoneElements = function ($) {
$("input[type='radio']").filter(function (x, y) {
//we want to exclude all the inputs that the css 'input[type="radio"] + label' or 'input[type="radio"] + input[type="hidden"] + label' selects
//as those radio inputs will be handled by the css.
if (y.nextElementSibling === null)
return true;
if (y.nextElementSibling.tagName === "LABEL")
return false;
if (y.nextElementSibling.tagName === "input" && y.nextElementSibling.nextElementSibling.tagName === "LABEL")
return false;
return true;
}).fsCheckbox();
function browserSupportsDateInput() {
var input = document.createElement("input");
input.setAttribute("type", "date");
return input.type == "date";
}
// showing the native datepicker only on touch
if (!Modernizr.touchevents && !browserSupportsDateInput()) {
$('input[type="date"]')
.attr('type', 'text')
.datepicker({
dateFormat: 'mm/dd/yy'
});
}
$('.date-input').on("click change focus", function () {
// removes pseudo placeholder text if input has changed
$(this).parent().removeClass('inputdate-active');
// resets pseudo placeholder text if input is empty
if ($('.date-input').val() === '') {
$(this).parent().addClass('inputdate-active');
}
});
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.convertCats = function ($) {
var $cats = $('.categories-list .search-results-categories');
function init() {
// create select dropdown
var $select = $('');
$select.appendTo(".categories-list");
// populate dropdown with list items
$(".categories-list .search-results-categories a").each(function () {
var el = $(this);
$("", {
"value": el.attr("href"),
"text": el.text()
}).appendTo($select);
});
// replace categories list with select
$cats.replaceWith($select);
// add an id to select
$select.attr('id', 'categories');
// set the first option as selected
$select.removeAttr('selected').find('option:first').attr('selected', 'selected');
$select[0].selectedIndex = 0;
}
if ($cats.length) {
init();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.customInputFile = function ($) {
var $browse = $('#main').find('input[type="file"]');
function customBrowse() {
$browse.each(function () {
var $input = $(this);
var $label = $input.next('label');
var labelPlaceholder = 'No Files Selected';
$label.find('span').html(labelPlaceholder);
$input.on('change', function (e) {
var fileName = e.target.value.split('\\').pop();;
if (fileName) {
$label.find('span').html(fileName);
}
});
// Firefox ignores input[type="file"]:focus
// fix: add toggle for has-focus class
$input
.on('focus', function () { $input.addClass('has-focus'); })
.on('blur', function () { $input.removeClass('has-focus'); });
});
}
if ($browse.length) {
customBrowse();
}
}(jQuery);
} catch (error) { console.error(error); }
try {
AAN.emailShare = function (subject, body) {
var url = window.location.href;
subject = subject || document.title;
if (window.location.hash === "") {
url = url.split("#")[0];
}
window.location = "mailto:?subject=" + subject + "&body=" + body + " " + url;
};
// This will handle hiding the top banners and remembering when the banners have been closed.
AAN.bannerBlocks = function ($) {
let breakings = Array.slice.call([], document.querySelectorAll(".breaking-container[id]")),
alerts = Array.slice.call([], document.querySelectorAll(".alert-container[id]")),
banners = breakings.concat(alerts);
// If a banner has not yet been closed, show it and add a click event for closing it.
banners
.forEach(function (container) {
const id = container.id;
if (window.localStorage["closed" + id + "Alert"] === "true") {
return;
}
container.style.display = "";
container.querySelector(".btn-close").onclick = function () {
window.localStorage["closed" + id + "Alert"] = "true";
container.style.display = "none";
};
});
// Clean up flags for closed banners that no longer exist.
let closedBanners = Object.keys(window.localStorage).filter(function (x) { return !!x.match(/closed[\w\d-]+Alert/g); });
closedBanners.forEach(function (bannerKey) {
if (!banners.find(function (banner) {
return "closed" + banner.id + "Alert" === bannerKey;
})) {
delete window.localStorage[bannerKey];
}
});
}(jQuery);
} catch (error) { console.error(error); }