!function(e,r,n){e(document).on("perlgem.user.authState",(function(e,r,n){if(generic&&generic.jsonrpc&&generic.jsonrpc.hasOwnProperty("fetch")){const e={method:"user.fullData",params:[{}],onSuccess:function(e){const r=function(e){const r="SIGNEDIN",n="ANONYMOUS",o="RECOGNIZED";return e&&1===e.signed_in?r:e&&null===e.recognized_user?n:o}(e.getValue());n.resolve(r)},onFailure:function(e){n.reject(e.getError())}};generic.jsonrpc.fetch(e)}})),r.applyHook((function(){return{beforeQuery:function(r,o,t){if(r===n.queries.GET_USER_AUTH_STATE){const r=e.Deferred();return e(document).trigger("perlgem.user.authState",[o,r]),r.promise()}return t(r,o)}}}))}(jQuery,window.GlobalServiceBus||{},window.ServiceBusTopics||{}); //# sourceMappingURL=perlgem_user_auth_state_hook.min.js.map