/* Auto generated, hash = n1l9x196gtcyu7emmewjh124 */
/**
 * Hack to avoid dynamic concatenation of footer-scripts, the scripts was originallly
 * designed to only work in dynamic concat state due to interdependence of scripts on shared variables.
 * https://jira01.corp.linkedin.com:8443/browse/HUED-14097
 *
 * Extracting out all the shared variables b/w interdependent footer scripts and creates a new closure
 *
 * start of the dynamic concat fix closure
 */
(function(context) {
    context = context || {};
    var LI = context.LI;
    var globalNavAPI = window.globalNav || context.globalNav;
    var _namespaces = context._namespaces;
    var Injector = context.Injector;
    var Helpers = context.Helpers;
    var Promise = context.Promise;
    var Request = context.Request;
    var Delegate = context.Delegate;
    var CustomEvents = context.CustomEvents;
    var CookieManager = context.CookieManager;
    var WeightedQueue = context.WeightedQueue;
    var NodeStash = context.NodeStash;
    var NavMenu = context.NavMenu;
    var InboxNavAPI = context.InboxNavAPI;
    var SlidingNavView = context.SlidingNavView;
    var TourManager = context.TourManager;
    var AddConnectionsFactory = context.AddConnectionsFactory;
    var AddConnectionsDecorator = context.AddConnectionsDecorator;
    var PageShift = context.PageShift;
    var AutoHide = context.AutoHide;
    var AlertFactory = context.AlertFactory;
    var GlobalAlertManager = context.GlobalAlertManager;

(function(){function m(a,c){var b=new XMLHttpRequest,e=LIModules.requires("jsConfig").get("LoggedOutBadging").url;b.open("GET",e+"\x26midToken\x3d"+encodeURIComponent(a));b.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset\x3dUTF-8");b.timeout=3E3;b.onload=function(){var a;try{var d=JSON.parse(b.responseText);"ok"===d.status&&(a=d.content.badging_data)}catch(e){}c(a)};b.onerror=function(){c()};b.send()}function k(a){var c=document.querySelector("#minimal-util-nav .nav-joinnow"),
b=document.querySelector("#minimal-util-nav .nav-signin");if(null!==c&&null!==b)if(a&&a.badgeCount){var e=document.querySelector("#minimal-util-nav .nav-signin a"),h=document.querySelector("#minimal-util-nav ul.nav-bar"),d=document.createElement("li"),f=document.createElement("p"),g=document.querySelector(".logo_wrapper--dormant .logo-badge");c.parentNode.removeChild(c);b.classList.remove("hide");g&&(g.classList.remove("hidden"),g.textContent=a.badgeCount);e.classList.add("loggedout-badge");e.classList.add("highlight");
e.setAttribute("data-count",a.badgeCount);h.insertBefore(d,h.firstChild);d.classList.add("nav-item");d.classList.add("nav-notification-msg");d.appendChild(f);f.classList.add("nav-text");f.textContent=a.message}else c.classList.remove("hide"),b.classList.remove("hide")}function l(a){var c={},b=/[\?&]([^?&]+)=([^&#$]+)/g;a&&a.length&&(c={},a.replace(b,function(a,b,d){c[b]=decodeURIComponent(d)}));return c}(function(){var a;a=l(window.location.search);!a.midToken&&a.session_redirect&&(a=l(a.session_redirect));
(a=a.midToken||null)?m(a,k):k()})()})();
/**
 * Hack to avoid dynamic concatenation of footer-scripts, the scripts was originallly
 * designed to only work in dynamic concat state due to interdependence of scripts on shared variables.
 * https://jira01.corp.linkedin.com:8443/browse/HUED-14097
 *
 * Extracting out all the shared variables b/w interdependent footer scripts and updating the LIContext with the
 * new state.
 *
 * end of the dynamic concat fix closure
 */
var LIContext = {};
LIContext.LI = LI;
LIContext.globalNav = window.globalNav || {};
LIContext.Injector = Injector;
LIContext._namespaces = _namespaces;
LIContext.Helpers = Helpers;
LIContext.Promise = Promise;
LIContext.Request = Request;
LIContext.Delegate = Delegate;
LIContext.CustomEvents = CustomEvents;
LIContext.CookieManager = CookieManager;
try{LIContext.NavMenu = NavMenu;} catch(e) {LIContext.NavMenu=undefined;}
try{LIContext.WeightedQueue = WeightedQueue;} catch(e) {LIContext.WeightedQueue=undefined;}
try{LIContext.NodeStash = NodeStash;} catch(e) {LIContext.NodeStash=undefined;}
try{LIContext.InboxNavAPI = InboxNavAPI;} catch(e) {LIContext.InboxNavAPI=undefined;}
try{LIContext.SlidingNavView = SlidingNavView;} catch(e) {LIContext.SlidingNavView=undefined;}
try{LIContext.TourManager = TourManager;} catch(e) {LIContext.TourManager=undefined;}
try{LIContext.AddConnectionsFactory = AddConnectionsFactory;} catch(e) {LIContext.AddConnectionsFactory=undefined;}
try{LIContext.AddConnectionsDecorator = AddConnectionsDecorator;} catch(e) {LIContext.AddConnectionsDecorator=undefined;}
try{LIContext.PageShift = PageShift;} catch(e) {LIContext.PageShift=undefined;}
try{LIContext.AutoHide = AutoHide;} catch(e) {LIContext.AutoHide=undefined;}
try{LIContext.AlertFactory = AlertFactory;} catch(e) {LIContext.AlertFactory=undefined;}
try{LIContext.GlobalAlertManager = GlobalAlertManager;} catch(e) {LIContext.GlobalAlertManager=undefined;}
window.LIContext = LIContext;
})(window.LIContext);
