function AccountTypeClick(n) { var i = $(n).text().trim(), t = $($(n).parents(".acntype")).find(".selected").text(); return ( $($(n).parents(".acntype")).find(".selected").text(i), $(n).parent().parent().parent().toggleClass("open"), t != i && $.ajax({ type: "POST", url: fetchLoginTypeURL, datatype: "json", contentType: "application/json; charset=utf-8", data: JSON.stringify({ loginTypeName: i }), success: function (i) { if (i.StausCode == "200") { var r = new LoginTypeModel(n, i.Data); r.CheckIsDropDownOpenMode() ? (r.OpenTargetURLinNewWindow(), $($(n).parents(".acntype")).find(".selected").text(t)) : ((LoginTypes = i.Data), r.UpdateElement()); } else $($(n).parents(".acntype")).find(".selected").text(t); }, error: function () { $($(n).parents(".acntype")).find(".selected").text(t); }, }), !1 ); } function LoginClick(n, model) { n.preventDefault(); let formModel = model == "mobile" ? "LoginMobileModePage-form" : "LoginStickyModePage-form"; let mobileError = `
`; if(model == "mobile") { let bottomAlert = document.getElementById("LoginMobileModePage-bottom-alert"); bottomAlert.innerHTML = mobileError; } let err_container = model == "mobile" ? document.getElementById(formModel).nextElementSibling : document.getElementById("login-sticky-error"); let msgContainer = model == "mobile" ? document.getElementById("mobile_error_msg") : document.getElementById("login-sticky-message"); let usernameFld = document.getElementById(formModel).username; let passwordFld = document.getElementById(formModel).password; if (usernameFld.value == "" && passwordFld.value == "") { msgContainer.textContent = "Username and Password are required fields"; err_container.style.display = "block"; } else if (usernameFld.value == "") { msgContainer.textContent = "Please enter your Username"; err_container.style.display = "block"; } else if (passwordFld.value == "") { msgContainer.textContent = "Please enter your Password"; err_container.style.display = "block"; } else { document.getElementById(formModel).submit(); } // console.log(msgContainer); } function EnrollClick(n) { var t = new LoginTypeModel(n, LoginTypes); return t.EnrollGATag(); } function TogglePassword(n) { var t = "#" + $($(n).siblings(".toggle-passwrd-source")).attr("id"), i = $(n).siblings(".show-pword-hidden-label"); $(t).attr("type") === "password" ? ($(t).attr("type", "text"), $(n).text("Hide"), $(i).text("Hide Password"), $(n).attr("aria-label", "Password Shown, Hide Password")) : ($(t).attr("type", "password"), $(n).text("Show"), $(i).text("Show Password"), $(n).attr("aria-label", "Password Hidden, Show Password")); } function getQueryStringByName(n, t) { t || (t = window.location.href); n = n.replace(/[\[\]]/g, "\\$&"); var r = new RegExp("[?&]" + n + "(=([^]*)|&|#|$)"), i = r.exec(t); return i ? (i[2] ? decodeURIComponent(i[2].replace(/\+/g, " ")) : "") : null; } function getCookie(n) { for (var r = n + "=", u = document.cookie.split(";"), t, i = 0; i < u.length; i++) { for (t = u[i]; t.charAt(0) == " "; ) t = t.substring(1); if (t.indexOf(r) == 0) return t.substring(r.length, t.length); } return ""; } function setCookie(n, t, i) { var r = new Date(), u; r.setTime(r.getTime() + i * 864e5); u = "expires=" + r.toUTCString(); document.cookie = n + "=" + t + "; " + u; } function registerbtnlastkeyevent() { $(".modal:visible") .find(".btnmodallast") .keydown(function (n) { n.keyCode == 9 && ($(".modal:visible").find(".btnmodalfirst").length > 0 ? ($(".modal:visible").find(".btnmodalfirst").focus(), n.preventDefault()) : ($(".modal:visible").find(".btnmodallast").focus(), n.preventDefault())); }); $(".modal:visible") .find(".btnmodalfirst") .keydown(function (n) { n.shiftKey && n.key === "Tab" && $(".modal:visible").find(".btnmodallast").length > 0 && ($(".modal:visible").find(".btnmodallast").focus(), n.preventDefault()); }); } function registerSearchtextKeyEvent() { $("#searchmore") .find("#more") .keydown(function (n) { (n.shiftKey && n.key === "Tab") || (n.keyCode == 9 && $("#inputWrap").find("#txtSearch").length > 0 && ($("#inputWrap").find("#txtSearch").focus().select(), n.preventDefault())); }); $("#inputWrap") .find("#txtSearch") .keydown(function (n) { n.shiftKey && n.key === "Tab" && $("#searchmore").find("#more").length > 0 && $(".results-container.results-container-hide").length == 0 && ($("#searchmore").find("#more").focus(), n.preventDefault()); }); $("#btnclose").keydown(function (n) { (n.keyCode == 9 || n.keyCode == 13) && (n.preventDefault(), $(this).click()); }); $("#btnclose").on("click", function () { $("#globalmobilesearchicon").focus(); }); $("#search-label, #globalmobilesearchicon").on("click", function () { $(".yxt-SearchBar-button").attr("tabindex", "-1").attr("aria-hidden", "true"); }); } function changePromoImageAltAttr() { $("#productpromoimg > img").attr("alt", ""); } function CancelButtonBlur() { iscloseButton = !0; } function addSpeedBumpListeners() { $.each($(".speedbump"), function (n, t) { t = $(t); t.hasClass("SpeedBumpEventBound") == !1 && (t.click(function (n) { return showSpeedBump(n); }), t.contextmenu(function (n) { return (n.preventDefault(), showSpeedBump(n)); }), t.addClass("SpeedBumpEventBound")); }); Event.fire("afterSpeedBumpsBound"); } function showSpeedBump(n) { var t = $(n.currentTarget); return ( (focusedElBeforeOpen = $(n.currentTarget)), $("#speed-bump-label").html(_speedbumpMessages["Speedbump-Caption"]), $("#speed-bump-body").html(_speedbumpMessages["Speedbump-Body"]), window.setTimeout(function () { $("#speedBumpTriggerLink").click(); $(".navbar-synovus").attr("aria-hidden", "true"); $("#smartbanner").attr("aria-hidden", "true"); }, 50), (lastUrlRequested = t.attr("href")), !1 ); } function speedBumpContinue() { console.log("Continuing past Speedbump"); console.log("lastUrlRequested == " + lastUrlRequested); window.open(lastUrlRequested); } function __logError(n, t) { console.log(n); t === !0 && alert(n); } function calcBootstrapSizeState() { var n = $(document).width(); return n <= 319 ? "xs" : n >= 320 && n <= 767 ? "sm" : n >= 768 && n <= 1023 ? "md" : n >= 1024 && n <= 1484 ? "lg" : "xl"; } function decodeHtml(n) { return $("").html(n).text(); } function loadOnEvent(n, t, i, r, u, f) { $(t).on(n + ".loading", function (e) { $(i).children().length == 0 && $(i).data("loading") != !0 ? ($(i).data("loading", !0), e.preventDefault(), e.stopPropagation(), $(i).load("/api/sitecore/" + r, u, function () { f !== undefined && f !== "" ? $.cachedScript(f).done(function () { n === "click" && $(t).click(); }) : n === "click" && $(t).click(); $(i).data("loading", !1); })) : $(t).off(".loading"); }); } function loadMenu(n, t) { $(window).width() > 1188 && $(".navbar-center").children().length == 0 ? $(".navbar-center").load( "/api/sitecore/navigation/getprimarymenu", { currentItemId: n }, function () { $.cachedScript(t); }, ) : $(window).width() > 1188 && $.cachedScript(t); loadOnEvent( "click", ".navbar-toggle", ".navbar-center", "navigation/getprimarymenu", { currentItemId: n }, t, ); window.location.href.indexOf("locations") < 0 && setTimeout(function () { $(".navbar-center").children().length == 0 && ($(".navbar-center").data("loading", !0), $(".navbar-center").load( "/api/sitecore/navigation/getprimarymenu", { currentItemId: n }, function () { $.cachedScript(t); }, ), $(".navbar-center").data("loading", !1)); }, 5e3); } function equalHeights(n) { var t = []; n.each(function () { t.push($(this).height()); }).css("min-height", Math.max.apply(this, t)); } function equalOuterHeights(n) { n.outerHeight("unset"); var t = []; n.each(function () { t.push($(this).outerHeight()); }).outerHeight(Math.max.apply(this, t)); } function GALink(n) { ga("send", "event", { eventCategory: "link", eventAction: "click", eventLabel: n }); } function inIframe() { try { return window.self !== window.top; } catch (n) { return !0; } } var LoginTypeModel, lastUrlRequested, focusedElBeforeOpen, iscloseButton, Event; (function (n) { n(document).ready(function () { function e() { var e, o; i(); u = parseInt(n(".login-Sticky-container").css("margin-top")); r = u - f; o = n(window).scrollTop(); e = n("#login-sticky-error").css("display") == "none" || n("#login-sticky-error").css("visibility") == "hidden" ? n("body").height() - (n(".footer-inner").height() + 120 + 650) - r : n("body").height() - (n(".footer-inner").height() + 120 + 800) - r; o >= e ? (n("#loginSticky").addClass("stick"), n("#loginSticky").css("top", e + "px")) : (n("#loginSticky").removeClass("stick"), n("#loginSticky").css("top", ""), n("#loginSticky").css("position", "fixed"), n("#loginSticky").css("left", t)); } var t = 0, i = function () { var i = n(window).width(); t = i > 1284 ? (i - 1284) / 2 + 10 : 10; t = t + "px"; n("#loginSticky").css("left", t); }; i(); var f = -477, u = 0, r = 0; n(function () { n(window).scroll(e); }); n(window).on("resize", function () { i(); }); }); })(jQuery); $(document).ready(function () { $(".login-link-btn").bind("keydown", function (n) { $(this).parents(".login-pagemode").attr("id") === "LoginStickyModePage" || ((n.type === "blur" || n.keyCode === 9) && (n.shiftKey || ($($($(this).parents(".login-pagemode")).find(".enroll-link a")).css("display") == "none" && ($($($(this).parents(".login-pagemode")).find(".close")).focus(), n.preventDefault())))); }); $(".enroll-link").bind("keydown", function (n) { $(this).parents(".login-pagemode").attr("id") === "LoginStickyModePage" || ((n.type === "blur" || n.keyCode === 9) && (n.shiftKey || ($($($(this).parents(".login-pagemode")).find(".learn-more-link-btn a")).css("display") == "none" && ($($($(this).parents(".login-pagemode")).find(".close")).focus(), n.preventDefault())))); }); $(".learn-more").bind("keydown", function (n) { $(this).parents(".login-pagemode").attr("id") === "LoginStickyModePage" || ((n.type === "blur" || n.keyCode === 9) && (n.shiftKey || ($($($(this).parents(".login-pagemode")).find(".close")).focus(), n.preventDefault()))); }); $(".close").bind("keydown", function (n) { n.shiftKey && n.keyCode == 9 && n.preventDefault(); }); $(".login-mobile-toggle").on("click", function () { $("main").attr("aria-hidden", "true"); $("#footerContent").attr("aria-hidden", "true"); $("#smartbanner").attr("aria-hidden", "true"); $(".navbar-right").attr("aria-hidden", "true"); $(".navbar-center").attr("aria-hidden", "true"); $(".navbar-left .navbar-brand").attr("aria-hidden", "true"); $(".login-mobile-toggle").attr("aria-hidden", "true"); $(".navbar-toggle").attr("aria-hidden", "true"); setTimeout(function () { $(".close").focus(); }, 100); }); $(".login-mobile-toggle").on("keydown", function (n) { var t = n.keyCode || n.which; t == 13 && $(".login-pagemode").addClass("focus"); }); $(".dropdown-login").on("hidden.bs.dropdown", function () { $("main").attr("aria-hidden", "false"); $("#footerContent").attr("aria-hidden", "false"); $("#smartbanner").attr("aria-hidden", "false"); $(".navbar-right").attr("aria-hidden", "false"); $(".navbar-left .navbar-brand").attr("aria-hidden", "false"); $(".login-mobile-toggle").attr("aria-hidden", "false"); $(".navbar-toggle").attr("aria-hidden", "false"); }); $(".acntype").on("hidden.bs.dropdown", function () { $(this).closest(".row").siblings().attr("aria-hidden", !1); $(".login-form").find("label").attr("aria-hidden", !1); $(".close").attr("aria-hidden", !1); $("[role=combobox]").attr("aria-hidden", !1); }); $(document).on("keydown", ".dropdown-submenu.accntlogin", function (n) { var i = n.key === "Tab" || n.keyCode === 9, t; i && ((t = $(".dropdown-submenu.accntlogin").find(":tabbable")), (firstFocusableEl = t[0]), (lastFocusableEl = t[t.length - 1]), n.shiftKey ? document.activeElement === firstFocusableEl && (lastFocusableEl.focus(), n.preventDefault()) : document.activeElement === lastFocusableEl && (firstFocusableEl.focus(), n.preventDefault())); }); $(".close").on("keydown", function (n) { var t = n.keyCode || n.which; t == 13 && ($(this).click(), $(this).closest(".dropdown-login").find("a").first().focus()); }); $(".login-syn-toggle").on("click", function () { $(".btn-desktop-search").parent().removeClass("open"); $(".search-field").removeClass("open"); }); $(".dropdown-login .login-syn-toggle [data-toggle=dropdown]").on("click", function (n) { n.preventDefault(); n.stopPropagation(); $(this).parent().siblings().removeClass("open"); $(this).parent().toggleClass("open"); $(".subchild").attr("aria-selected", "false"); $(this).attr("aria-selected", "true"); $(".btn-desktop-search").parent().removeClass("btn-active"); }); $(".login-form").each(function () { new LoginTypeModel($(this), LoginTypes).UpdateElement(); }); }); LoginTypeModel = function (n, t) { var u = function (n) { return n.IsDisabled == "1" || n.URL == "" || n.URL == "#" ? !0 : !1; }, f = function (n) { return n.URL; }, y = function () { return u(i.ForgotPasswordLink); }, p = function () { return f(i.ForgotPasswordLink); }, w = function () { return u(i.ForgotUserNameLink); }, b = function () { return f(i.ForgotUserNameLink); }, k = function () { return u(i.EnrollLink); }, d = function () { return f(i.EnrollLink); }, e = function () { return u(i.LoginLink); }, g = function () { return i.LoginLink.NotificationIsEnabled == "1" ? !0 : !1; }, at = function () { return f(i.LoginLink); }, nt = function () { return u(i.ReferencePageLink); }, tt = function () { return f(i.ReferencePageLink); }, it = function () { return t; }, o = function (n) { $(n).hide(); $(n).attr("href", "#"); }, s = function (n, t, i) { $(n).show(); $(n).attr("href", t); i != undefined && i != "" && $(n).text(i); }, vt = "." + $($(n).parents(".login-pagemode")).attr("id"), r = "#" + $($(n).parents(".login-pagemode")).attr("id"), rt = r + "-accountType", yt = $(rt).find(".selected").html().trim(), i = it(), ut = function () { return !e() && i.OpenMode == "LoginButtomClick" ? !0 : !1; }, l = function (n, t) { var i = r + "-login-alert-box", u = r + "-bottom-alert", f = "#login-sticky-error", e = "#login-sticky-message"; $(f).hide(); $(e).html(""); $(i).hide(); $(u).html(""); r == "#LoginStickyModePage" && (t == "1" ? $("#login-sticky").removeClass("message-displayed").addClass("message-hidden") : ((i = f), (u = e), n == "" ? $("#login-sticky").removeClass("message-displayed").addClass("message-hidden") : $("#login-sticky").removeClass("message-hidden").addClass("message-displayed"))); n == "" || ($(u).html(n), $(i).show()); }, h = function () { l("", ""); }, c = function (n, t) { t == undefined && (t = "0"); l(n, t); }, ft = function () { h(); $("#login-sticky-error").css("display") == "block" && $("#login-sticky-error").css("display") == "none"; var n = v(); return n == "" ? (h(), !0) : (c(n), $("#login-sticky-error").css("display") == "block" ? $("#login-sticky-error").focus() : $(".dropdown-menu.login").parent().addClass("open"), !1); }, et = function () { var n = r + "-enroll"; k() ? ($(".enroll-link").hide(), o(n)) : ($(".enroll-link").show(), s(n, d(), i.EnrollLink.LableName)); }, ot = function () { var i = y(), n, t; st(i); n = w(); ht(n); t = r + "-link-splitter"; i || n ? $(t).hide() : $(t).show(); }, st = function (n) { var t = r + "-ForgotPassword"; n ? o(t) : s(t, p(), ""); }, ht = function (n) { var t = r + "-ForgotUserName"; n ? o(t) : s(t, b(), ""); }, ct = function () { var n = r + "-PageReference"; nt() ? o(n) : s(n, tt(), i.ReferencePageLink.LableName); }, lt = function () { g() ? c(i.LoginLink.NotificationMessage) : ($(r + "-Login").attr( "aria-label", i.LoginLink.LoginAriaLabel + " " + $(r + "-Login")[0].innerText, ), h()); }, a, v; return ( (this.OpenTargetURLinNewWindow = function () { window.open(i.LoginLink.URL); }), (this.CheckIsDropDownOpenMode = function () { return !e() && i.OpenMode == "DropDownChanged" ? !0 : !1; }), (this.UpdateElement = function () { $(r).attr("data-id", i.Name); var t = e(), n = r + "-loginpage"; t ? ($(n).hide(), c(i.LoginLink.DisableMessage, "1")) : ($(n).show(), lt(), et(), ot(), ct()); }), (a = function () { var n = $(r + "-UserName").val(), t = $(r + "-password").val(); return n == "" && t == "" ? ($('[name="username"]').focus(), ErrorMessage.UserIDandPasswordRequired) : n == "" ? ($('[name="username"]').focus(), ErrorMessage.UserIDRequired) : t == "" ? ($('[name="password"]').focus(), ErrorMessage.PasswordRequired) : ""; }), (v = function () { return e() ? i.LoginLink.DisableMessage : (h(), a()); }), (this.LoginPage = function () { if (ft()) if (ut()) window.open(i.LoginLink.URL); else { try { i.LoginGA == !0 && ga("send", "event", { eventCategory: "button", eventAction: "button_click", eventLabel: i.LoginGAEventLabel, }); } catch (u) {} var n = $(r + "-UserName").val(), t = $(r + "-password").val(); return ( $(r + "-UserName").val(n.replace(/\s/g, "")), $(r + "-password").val(t.replace(/\s/g, "")), i.FormUsername != "" && $(r + "-UserName").attr("name", i.FormUsername), i.FormPassword != "" && $(r + "-password").attr("name", i.FormPassword), $(r + "-form") .attr("action", i.LoginLink.URL) .submit(), !0 ); } return !1; }), (this.EnrollGATag = function () { try { i.EnrollGA == !0 && ga("send", "event", { eventCategory: "button", eventAction: "button_click", eventLabel: i.EnrollGAEventLabel, }); } catch (n) {} }), this ); }; String.prototype.format = function () { var n = this.toString(), t, i; if (!arguments.length) return n; t = "string" == typeof arguments[0] ? arguments : arguments[0]; for (i in t) n = n.replace(RegExp("\\{" + i + "\\}", "gi"), t[i]); return n; }; lastUrlRequested = ""; iscloseButton = !0; $(document).ready(function () { var t, n; $("#video").detach().prependTo("body"); $(".play-icon-area a").click(function () { $(".navbar-synovus").attr("aria-hidden", "true"); $("#smartbanner").attr("aria-hidden", "true"); }); Event.on("afterSpeedBumpsBound", function () {}); addSpeedBumpListeners(); registerSearchtextKeyEvent(); changePromoImageAltAttr(); $("#speed-bump").on("hidden.bs.modal", function () { focusedElBeforeOpen.focus(); $(".navbar-synovus").attr("aria-hidden", "false"); $("#smartbanner").attr("aria-hidden", "false"); }); $("#video-modal").focusin(function () { iscloseButton || ((iscloseButton = !0), $("#btnmodalcancel").focus()); iscloseButton = !1; }); $("#global-search-alert-modal").on("shown.bs.modal", function () { $(".navbar-synovus").attr("aria-hidden", "true"); $("#smartbanner").attr("aria-hidden", "true"); }); $("#global-search-alert-modal").on("hidden.bs.modal", function () { $(".navbar-synovus").attr("aria-hidden", "false"); $("#smartbanner").attr("aria-hidden", "false"); }); $(".skip-main").click(function (n) { n.preventDefault(); $(".maincontent").attr("tabindex", "-1").focus(); }); setTimeout(function () { $("html").hasClass("wf-active") || $("body").css("visibility", "visible"); }, 2e3); $(".superScript a").click(function () { $(".currentSupSelected").removeClass("currentSupSelected"); $(".superScript a").removeAttr("id"); $(this).addClass("currentSupSelected"); $(this).attr("id", $(this).attr("footersupid")); var n = $("#s_disclosure_" + $(this).attr("footerSupId").split("-")[1]); n.focus(); window.location.href = "#s_disclosure_" + $(this).attr("footerSupId").split("-")[1]; }); t = document.getElementsByTagName("head")[0]; _mobileMetaTag != "" && _mobileMetaTag.match("apple") && t.insertAdjacentHTML("beforeend", _mobileMetaTag); _mobileMetaTag != "" && _mobileMetaTag.match("google") && ((n = _mobileMetaTag.split("|")), (_imageUrl = n[2]), t.insertAdjacentHTML("beforeend", n[0] + n[1])); $(".cta a").on("click", function () { $(this).data("event") != "" && GALink($(this).data("event")); }); }); $(window).on("shown.bs.modal", function () { registerbtnlastkeyevent(); $(".modal:visible").length > 0 && $(".modal:visible").find(".btnmodalcancel").length > 0 && $(".modal:visible").find(".btnmodalcancel").focus(); $("#btnmodalcancel").click(function () { $(".navbar-synovus").attr("aria-hidden", "false"); $("#smartbanner").attr("aria-hidden", "false"); }); }); $(document).ready(function () { $(".div-dropdown").on("shown.bs.dropdown", function (n) { var t = $(this), u = $(n.target), r, i; r = t.find(".hidden-dropdown").length > 0 ? t.find(".hidden-dropdown").val() : t.find(".span-dropdown").text(); i = t.find("ul li a").filter(function () { return $.text([this]) === r; }); i.length > 0 ? i[0].focus() : t.find("ul li a:first").focus(); }); $(".div-dropdown").on("hidden.bs.dropdown", function (n) { var t = $(n.target); return (t.find(".dropdown-toggle").focus(), !1); }); }); Event = (function () { var n = this; return ( (n.queue = {}), (n.fired = []), { fire: function (t) { var i = n.queue[t]; if (typeof i != "undefined") { while (i.length) i.shift()(); n.fired[t] = !0; } }, on: function (t, i) { if (n.fired[t] === !0) return i(); typeof n.queue[t] == "undefined" && (n.queue[t] = []); n.queue[t].push(i); }, } ); })(); jQuery.cachedScript = function (n, t) { return ((t = $.extend(t || {}, { dataType: "script", cache: !0, url: n })), jQuery.ajax(t)); }; $(document).ready(function () { $(window).width() < 1189 && $(".navbar-center").children().length > 0 && typeof isMobileMode == "undefined" && $.getScript("/bundles/js/mobileMenu"); }); $(window).width() < 1025 && $.cachedScript("/js/jquery.smartbanner.min.js").done(function () { _mobileMetaTag.match("google") && $(function () { $.smartbanner({ title: "My Synovus Mobile Banking", icon: _imageUrl }); }); }); inIframe() && document.referrer.indexOf("synovus") > 0 && $("header, footer").hide(); inIframe() && $(".cd-rates").length > 0 && ($("body *:not(.cd-rates):not(.cd-rates *)").hide(), $("#cd-info").hide()); inIframe() && $(".table-responsive").length > 0 && $("body *:not(.table-responsive):not(.table-responsive *)").hide(); $(document).on("keydown", function (n) { n.key == "Tab" && $(window).width() < 769 && ($("button").addClass("mobile-focus"), $(".btn").addClass("mobile-focus"), $("a").addClass("mobile-focus")); }); (function (n) { var t = !1, r, i; typeof define == "function" && define.amd && (define(n), (t = !0)); typeof exports == "object" && ((module.exports = n()), (t = !0)); t || ((r = window.Cookies), (i = window.Cookies = n()), (i.noConflict = function () { return ((window.Cookies = r), i); })); })(function () { function n() { for (var n = 0, r = {}, t, i; n < arguments.length; n++) { t = arguments[n]; for (i in t) r[i] = t[i]; } return r; } function t(i) { function r(t, u, f) { var o, h, l, e, s; if (typeof document != "undefined") { if (arguments.length > 1) { f = n({ path: "/" }, r.defaults, f); typeof f.expires == "number" && ((h = new Date()), h.setMilliseconds(h.getMilliseconds() + f.expires * 864e5), (f.expires = h)); try { o = JSON.stringify(u); /^[\{\[]/.test(o) && (u = o); } catch (y) {} return ( (u = i.write ? i.write(u, t) : encodeURIComponent(String(u)).replace( /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent, )), (t = encodeURIComponent(String(t))), (t = t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)), (t = t.replace(/[\(\)]/g, escape)), (document.cookie = [ t, "=", u, f.expires ? "; expires=" + f.expires.toUTCString() : "", f.path ? "; path=" + f.path : "", f.domain ? "; domain=" + f.domain : "", f.secure ? "; secure" : "", ].join("")) ); } t || (o = {}); for ( var a = document.cookie ? document.cookie.split("; ") : [], v = /(%[0-9A-Z]{2})+/g, c = 0; c < a.length; c++ ) { l = a[c].split("="); e = l.slice(1).join("="); e.charAt(0) === '"' && (e = e.slice(1, -1)); try { if ( ((s = l[0].replace(v, decodeURIComponent)), (e = i.read ? i.read(e, s) : i(e, s) || e.replace(v, decodeURIComponent)), this.json) ) try { e = JSON.parse(e); } catch (y) {} if (t === s) { o = e; break; } t || (o[s] = e); } catch (y) {} } return o; } } return ( (r.set = r), (r.get = function (n) { return r.call(r, n); }), (r.getJSON = function () { return r.apply({ json: !0 }, [].slice.call(arguments)); }), (r.defaults = {}), (r.remove = function (t, i) { r(t, "", n(i, { expires: -1 })); }), (r.withConverter = t), r ); } return t(function () {}); });