function jslog(){rwx_signalR_Logging&&(arguments.length>1?console.log(arguments[0],arguments[1]):arguments.length==1&&console.log(arguments[0]))}function handlePageVisibilityChange(){var n=document[docHiddenPropName],t=new Date,i=t-lastVisibilityChangeTimestamp;lastVisibilityChangeTimestamp=t;jslog("Visibility changed to {0}. (Previously {1} for {2} MS)".formatUnicorn(n?"hidden":"visible",n?"visible":"hidden",i));n?(jslog("Suspending countdowns and animations..."),rwx_CountdownsActive=!1,rwx_ProcessSignalrMessages=!1):rwx_ForceMobileBrowserRefreshOnVisibilityChange&&$(window).width()<750&&interestingListings.length>0?window.location.reload(!0):(jslog("Resuming countdowns and animations..."),RestartCountdowns(ResumeSignalRMessageProcessing))}function RestartCountdowns(n){Proxy.invokeAsync("GetSiteTime",{},function(t){rwx_CountdownsActive=!0;browserDateTime=new Date(t);jslog("Browser Time updated (resume countdowns): "+t);rwx_countdownIntervalId==0?rwx_countdownIntervalId=setInterval(function(){browserDateTime!=null&&(browserDateTime.setTime(browserDateTime.getTime()+1e3),UpdateAllCountdowns());rwx_CountdownsActive||(jslog("stopping countdown loop...(2)"),clearInterval(rwx_countdownIntervalId),rwx_countdownIntervalId=0)},1e3):jslog("countdown loop was still enabled, skipping re-enable...(2)");n()},function(n){jslog("Error Updating Browser Time(2): "+n)})}function ResumeSignalRMessageProcessing(){rwx_ProcessSignalrMessages=!0;rwx_QueuedSignalrMessages.length>0&&(rwx_QueuedSignalrMessages.forEach(function(n){jslog("Firing queued message '"+n.EventName+"'");$.event.trigger(n.EventName,n.MessageData)}),rwx_QueuedSignalrMessages=[]);rwx_AbortHiddenTabMessageQueuing&&(write_log({title:"Page hidden too long",message:"page reloaded",URL:document.location.href,"Max Queue Length":rwx_MaxInactiveMessageQueueLength,UserAgent:navigator.userAgent,"Messages Ignored":rwx_IgnoredMessageCount}),window.location.reload(!0))}function RegisterInterestingListing(n){interestingListings.indexOf(n)<0?($.connection.listingHub.server.registerListingInterest(n),interestingListings[interestingListings.length]=n,jslog("RegisterInterestingListing: "+n)):jslog("RegisterInterestingListing: (skipped) "+n)}function RegisterInterestingEvent(n){interestingEvents.indexOf(n)<0?($.connection.listingHub.server.registerEventInterest(n),interestingEvents[interestingEvents.length]=n,jslog("RegisterInterestingEvent: "+n)):jslog("RegisterInterestingEvent: (skipped) "+n)}function RegisterAllInterestingObjects(){var n=[];interestingListings=[];$("[data-listingid]").each(function(){var t=$(this).data("listingid");interestingListings.indexOf(t)<0?(n[n.length]=t,interestingListings[interestingListings.length]=t,jslog("queued Interesting Listing: "+t)):jslog("queued Interesting Listing: (skipped) "+t)});interestingEvents=[];$("[data-eventid]").each(function(){var t=$(this).data("eventid");interestingEvents.indexOf(t)<0?(interestingEvents[interestingEvents.length]=t,n[n.length]=t,jslog("queued Interesting Event: "+t)):jslog("queued Interesting Event: (skipped) "+t)});n.length>0&&($.connection.listingHub.server.registerMultipleInterest(n,aweUserName),jslog("registered queued Interesting Objects: "+n.length))}function RegisterAdditionalInterestingListings(n,t){var i=[];$(n+" [data-listingid]").each(function(){var n=$(this).data("listingid");interestingListings.indexOf(n)<0?(i[i.length]=n,interestingListings[interestingListings.length]=n,jslog("queued Interesting Listing: "+n)):jslog("queued Interesting Listing: (skipped) "+n)});i.length>0&&($.connection.listingHub.server.registerMultipleInterest(i,aweUserName),jslog("registered queued Interesting Objects: "+i.length));t()}function QueueSignalrMessage(n,t){if(!rwx_AbortHiddenTabMessageQueuing&&rwx_QueuedSignalrMessages.length>rwx_MaxInactiveMessageQueueLength&&(jslog("Message queue limit reached, aborting further message queuing."),rwx_AbortHiddenTabMessageQueuing=!0,rwx_IgnoredMessageCount=rwx_QueuedSignalrMessages.length,rwx_QueuedSignalrMessages=[]),rwx_AbortHiddenTabMessageQueuing){jslog("Ignoring message '"+n+"'");rwx_IgnoredMessageCount++;return}jslog("Queuing message '"+n+"'");rwx_QueuedSignalrMessages[rwx_QueuedSignalrMessages.length]={EventName:n,MessageData:t}}function CompleteSignalRHandling(){$(document).on("SignalR_Started",function(){$("#SignalRStatus").html('<div title="'+signalrIndicatorTitlesDictionary.Started+'"><span class="glyphicon glyphicon-stats SignalRStatus-connected"><\/span><\/div>');abortSignalRAlert=!0;HideSignalRAlert()});$(document).on("SignalR_ConnectionSlow",function(){$("#SignalRStatus").html('<div title="'+signalrIndicatorTitlesDictionary.ConnectionSlow+'"><span class="glyphicon glyphicon-stats SignalRStatus-reconnect"><\/span><\/div>')});$(document).on("SignalR_Reconnecting",function(){$("#SignalRStatus").html('<div title="'+signalrIndicatorTitlesDictionary.Reconnecting+'"><span class="glyphicon glyphicon-stats SignalRStatus-reconnect"><\/span><\/div>');abortSignalRAlert=!1;jslog("SignalR Connection Slow, delay til aert: "+rwx_DisconnectAlertDelayMS);setTimeout(function(){jslog("Alert Delay Reached -- Abort? "+abortSignalRAlert);abortSignalRAlert||ShowSignalRAlert()},rwx_DisconnectAlertDelayMS)});$(document).on("SignalR_Reconnected",function(){$("#SignalRStatus").html('<div title="'+signalrIndicatorTitlesDictionary.Reconnected+'"><span class="glyphicon glyphicon-stats SignalRStatus-connected"><\/span><\/div>');abortSignalRAlert=!0;HideSignalRAlert()});$(document).on("SignalR_Disconnected",function(){$("#SignalRStatus").html('<div title="'+signalrIndicatorTitlesDictionary.Disconnected+'"><span class="glyphicon glyphicon-stats SignalRStatus-stopped"><\/span><\/div>');abortSignalRAlert=!1});$(document).on("SignalR_UpdateCurrentTime",function(){var n=Globalize.formatDate(browserDateTime,{date:"full"})+" "+Globalize.formatDate(browserDateTime,{time:"short"});timeZoneLabel&&(n+=" "+timeZoneLabel);$("#Time").text(n);abortSignalRAlert=!0;HideSignalRAlert()});UpdateAllCountdowns();!rwx_SignalRDisabled&&rwx_CountdownsActive&&($("[data-action-time]").length>0?(jslog("starting countdown loop..."),rwx_countdownIntervalId==0?rwx_countdownIntervalId=setInterval(function(){browserDateTime!=null&&(browserDateTime.setTime(browserDateTime.getTime()+1e3),UpdateAllCountdowns());rwx_CountdownsActive||(jslog("stopping countdown loop...(1)"),clearInterval(rwx_countdownIntervalId),rwx_countdownIntervalId=0)},1e3):jslog("countdown loop was still enabled, skipping re-enable...(1)")):jslog("skipping countdown loop because no countdowns exist on page"));$(document).on("SignalR_Started",function(){RegisterAllInterestingObjects()});$(document).on("SignalR_Reconnected",function(){RegisterAllInterestingObjects()});$(document).on("SignalR_UpdateListingAction",function(n,t){var i,r,u;$('[data-listingid="'+t.ListingID+'"] .awe-rt-Quantity').each(function(){$(this).html(Globalize.formatNumber(t.Quantity,{minimumFractionDigits:0,maximumFractionDigits:0}));$(this).pulse()});$('[data-listingid="'+t.ListingID+'"] .awe-rt-AcceptedListingActionCount').each(function(){$(this).data("previousValue")!=t.AcceptedActionCount&&($(this).data("previousValue",t.AcceptedActionCount),$(this).html(t.AcceptedActionCount),$(this).pulse())});$('[data-listingid="'+t.ListingID+'"] .awe-rt-CurrentPrice span.NumberPart').each(function(){$(this).html(Globalize.formatNumber(t.Price,{minimumFractionDigits:2,maximumFractionDigits:2}));$(this).pulse()});i=$("[data-currency]").data("currency");r=$.cookie("currency");i!=r&&(u=ConvertPrice(t.Price,i,r),$(".Bidding_Local_Price span.NumberPart").html(Globalize.formatNumber(u,{minimumFractionDigits:2,maximumFractionDigits:2})),$(".Bidding_Local_Price").pulse())});$(document).on("SignalR_UpdateListingDTTM",function(n,t){$('[data-listingid="'+t.ListingID+'"] [data-epoch="'+t.Epoch+'"]').each(function(){var n,i;$(this).data("actionTime",t.DTTMString);n=new Date($(this).data("actionTime"));$(this).data("actionMilliseconds",n.getTime());i=n.getTime()-browserDateTime.getTime();$(this).html(TimeDifference(i))});var i=Globalize.formatDate(new Date(t.DTTMString),{date:"full"})+" "+Globalize.formatDate(new Date(t.DTTMString),{time:"short"}),r=Globalize.formatDate(new Date(t.DTTMString),{date:"short"}),u=r+" "+Globalize.formatDate(new Date(t.DTTMString),{time:"short"});timeZoneLabel&&(i+=" "+timeZoneLabel);$('[data-listingid="'+t.ListingID+'"] .awe-rt-'+t.Epoch+"DTTM").each(function(){$(this).hasClass("awe-short-date")?$(this).html(u):$(this).hasClass("awe-date-only")?$(this).html(r):$(this).html(i);$(this).pulse()})});$(document).on("SignalR_UpdateListingStatus",function(n,t){jslog("SignalR_UpdateListingStatus: "+t.ListingID+", "+t.Source+", "+t.Status);t.Source=="UPDATELISTING_ORIGIN"?$('[data-listingid="'+t.ListingID+'"] .awe-rt-RefreshAlert').each(function(){$(this).show()}):(t.Status=="Active"?$('[data-listingid="'+t.ListingID+'"] [data-epoch="starting"]').each(function(){var n,t,i;$(this).removeAttr("data-action-time");$(this).removeAttr("data-action-milliseconds");$(this).removeAttr("data-epoch");n=$(this).attr("data-end-value");typeof n!=typeof undefined&&n!=!1&&($(this).html($(this).data("endValue")),$(this).pulse());t=$(this).attr("data-end-hide-selector");typeof t!=typeof undefined&&t!=!1&&$($(this).data("endHideSelector")).hide();i=$(this).attr("data-end-show-selector");typeof i!=typeof undefined&&i!=!1&&$($(this).data("endShowSelector")).show()}):$('[data-listingid="'+t.ListingID+'"] [data-epoch="ending"]').each(function(){var n,t,i;$(this).removeAttr("data-action-time");$(this).removeAttr("data-action-milliseconds");$(this).removeAttr("data-epoch");n=$(this).attr("data-end-value");typeof n!=typeof undefined&&n!=!1&&($(this).html($(this).data("endValue")),$(this).pulse());t=$(this).attr("data-end-hide-selector");typeof t!=typeof undefined&&t!=!1&&$($(this).data("endHideSelector")).hide();i=$(this).attr("data-end-show-selector");typeof i!=typeof undefined&&i!=!1&&$($(this).data("endShowSelector")).show()}),$('[data-listingid="'+t.ListingID+'"] .awe-rt-BuyBox').each(function(){t.Status=="Active"?$(this).is(":visible")||$(this).slideDown(500):$(this).is(":visible")&&$(this).slideUp(500)}),$('[data-listingid="'+t.ListingID+'"] .awe-rt-hideable').each(function(){$(this).hide()}),$('[data-listingid="'+t.ListingID+'"] .awe-rt-ShowStatus'+t.Status).each(function(){$(this).show()}),$('[data-listingid="'+t.ListingID+'"] .awe-rt-Status').each(function(){$(this).html(statusDictionary[t.Status]);$(this).pulse()}),$('[data-listingid="'+t.ListingID+'"] .awe-rt-ColoredStatus').each(function(){$(this).html(lotStatusHtmlDictionary[t.Status]);$(this).pulse()}));RefreshListingContextualStatus(t.ListingID);(t.Status=="Ended"||t.Status=="Unsuccessful"||t.Status=="Successful")&&$('[data-listingid="'+t.ListingID+'"] .awe-rt-ListingClosedMessage').each(function(){$(this).slideDown()})});$(document).on("SignalR_UpdateEventStatus",function(n,t){jslog("onSignalR_UpdateEventStatus: "+t.EventID+", "+t.Source+", "+t.Status);t.Source=="EVENT_PUBLICATION_FINISHED_ORIGIN"&&($('[data-eventid="'+t.EventID+'"] .awe-rt-PublishIndicator').hide(),$('[data-eventid="'+t.EventID+'"] .awe-rt-PublishCompletedMessage').show());t.Source=="EVENT_DRAFT_VALIDATION_FINISHED_ORIGIN"&&($('[data-eventid="'+t.EventID+'"] .awe-rt-ValidationIndicator').hide(),$('[data-eventid="'+t.EventID+'"] .awe-rt-ValidationCompletedMessage').show(),$("#ValidateAllDraftsLink").prop("disabled",!1));$('[data-eventid="'+t.EventID+'"] .awe-rt-hideable').each(function(){$(this).hide()});$('[data-eventid="'+t.EventID+'"] .awe-rt-ShowStatus'+t.Status).each(function(){$(this).show()});$('[data-eventid="'+t.EventID+'"] .awe-rt-Status').each(function(){$(this).html(statusDictionary[t.Status]).pulse()});$('[data-eventid="'+t.EventID+'"] .awe-rt-ColoredStatus').each(function(){$(this).html(eventStatusHtmlDictionary[t.Status]).pulse()});$('[data-eventid="'+t.EventID+'"] .awe-rt-eventtimelabel').each(function(){$(this).html(eventHomepageTimeLabelHtmlDictionary[t.Status]).pulse_block()});$('[data-eventid="'+t.EventID+'"] .awe-rt-eventbidstatuslabel').each(function(){$(this).html(eventHomepageStatusHtmlDictionary[t.Status]).pulse_block()});$('[data-eventid="'+t.EventID+'"] .awe-rt-eventtimecountdown').each(function(){t.Status=="Active"&&($(this).find(".awe-rt-Pending").hide(),$(this).find(".awe-rt-Active").show());t.Status=="Closing"&&$(this).find(".awe-rt-Active").hide();t.Status=="Closed"&&($(this).find(".awe-rt-Active").hide(),$(this).find(".awe-rt-Ended").show())})})}function UpdateAllCountdowns(){browserDateTime!=null&&$("[data-action-time]").each(function(){var n=$(this),r=$(this).attr("data-action-milliseconds"),u,i,t,f,e;(typeof r==typeof undefined||r==!1)&&(u=new Date($(this).data("actionTime")),$(this).attr("data-action-milliseconds",u.getTime()));i=n.data("actionMilliseconds")-browserDateTime.getTime();i<=0?(t=n.closest("[data-listingid]").attr("data-listingid"),t?n.data("epoch")=="ending"?rwx_CountDownUpdateRetriesDisabled||rwx_DelayCountDownUpdateRetries||(f=new Date($(this).data("actionTime")),e=Proxy.invokeAsync("GetTimeRemaining",{listingId:t},function(i){if(i.error==""){var r=0;r=i.secondsRemaining*1e3;r<=1e3?ProcessCountdownFinished(n):(n.data("actionMilliseconds",browserDateTime.getTime()+r),n.html(TimeDifference(r)),n.pulse(),RefreshListingVitals(t,f,r),jslog("corrected EndDTTM for listing #"+t))}else jslog("error (1) retrieving EndDTTM for #"+t)},function(){jslog("error (2) retrieving EndDTTM for #"+t)}),e.fail(function(){jslog("error (3) retrieving EndDTTM for #"+t);rwx_DelayCountDownUpdateRetries||(rwx_DelayCountDownUpdateRetries=!0,rwx_CurrentCountDownUpdateRetries++,setTimeout(function(){rwx_DelayCountDownUpdateRetries=!1;console.log("rwx_CurrentCountDownUpdateRetries: ",rwx_CurrentCountDownUpdateRetries)},rwx_CountDownUpdateRetryDelayMS));rwx_CurrentCountDownUpdateRetries>rwx_MaxCountDownUpdateRetries&&(rwx_CountDownUpdateRetriesDisabled=!0,console.log("Disabled further Countdown Update Retries after reaching the maximum number of attempts:",rwx_MaxCountDownUpdateRetries))})):ProcessCountdownFinished(n):ProcessCountdownFinished(n)):n.html(TimeDifference(i))})}function ProcessCountdownFinished(n){var t,i,r;jslog("processing countdown ended... "+n.attr("data-end-hide-selector"),n);n.removeAttr("data-action-time");n.removeAttr("data-action-milliseconds");n.removeAttr("data-epoch");t=n.attr("data-end-value");typeof t!=typeof undefined&&t!=!1&&(n.html(n.data("endValue")),n.pulse());i=n.attr("data-end-hide-selector");typeof i!=typeof undefined&&i!=!1&&$(n.data("endHideSelector")).hide();r=n.attr("data-end-show-selector");typeof r!=typeof undefined&&r!=!1&&$(n.data("endShowSelector")).show()}function ConvertPrice(n,t,i){var r=new Number(n);return t!=i&&(r=PriceFromUSD(PriceToUSD(r,t),i)),r}function RefreshListingVitals(n,t,i){var r=Proxy.invokeAsync("GetListingVitals",{listingId:n},function(r){var c="",e="",l="",o="",a="",s="",u,f,h;$('[data-listingid="'+n+'"] .awe-rt-Quantity').each(function(){c=$(this).html();e=Globalize.formatNumber(r.Quantity,{minimumFractionDigits:0,maximumFractionDigits:0});$(this).html(e);$(this).pulse()});$('[data-listingid="'+n+'"] .awe-rt-AcceptedListingActionCount').each(function(){l=$(this).html();$(this).data("previousValue")!=r.AcceptedActionCount&&($(this).data("previousValue",r.AcceptedActionCount),o=r.AcceptedActionCount,$(this).html(o),$(this).pulse())});$('[data-listingid="'+n+'"] .awe-rt-CurrentPrice span.NumberPart').each(function(){a=$(this).html();s=Globalize.formatNumber(r.Price,{minimumFractionDigits:2,maximumFractionDigits:2});$(this).html(s);$(this).pulse()});u=r.Currency;f=$.cookie("currency");u!=f&&(h=ConvertPrice(r.Price,u,f),$(".Bidding_Local_Price span.NumberPart").html(Globalize.formatNumber(h,{minimumFractionDigits:2,maximumFractionDigits:2})),$(".Bidding_Local_Price").pulse());write_log({title:"Update(s) missed",message:"A countdown reached 0 incorrectly","Listing ID":n,"Old EndDTTM":t,"Corrected EndDTTM":r.EndDTTM,"Browser Time":browserDateTime,"Updated Seconds Remaining":i/1e3,URL:document.location.href,UserAgent:navigator.userAgent})},function(){ShowSignalRAlert();jslog("error (1) retrieving vital stats for listing #"+n)});r.fail(function(){ShowSignalRAlert();jslog("error (2) retrieving vital stats for listing #"+n)})}function RefreshListingContextualStatus(n){var i=$(".ContextualStatus"),t=$('[data-listingid="'+n+'"] .InlineContextualStatus'),r;(i.length>0||t.length>0)&&aweUserName&&(r=Proxy.invokeAsync("GetListingContextStatus",{listingId:n},function(r){var u,f,e,o;if(r.Disregard||r.Error)i.each(function(){$(this).is(":visible")&&$(this).slideUp(500)}),t.hide();else{if(u="",f="",i.length>0){contextMessageDictionary[r.Status]?u=contextMessageDictionary[r.Status].format(r.Parameters):(console.log("Dev Error: contextMessageDictionary['"+r.Status+"'] is not defined."),u="Unknown Status");switch(r.Disposition){case 0:f="alert alert-success";break;case 1:f="alert alert-warning";break;case 2:f="alert alert-danger"}i.each(function(){$(this).html("<div class='"+f+"'>"+u+"<\/div>");$(this).is(":visible")||$(this).fadeTo(1e3,1,function(){$(this).slideDown(500)})})}if(t.length>0){shortContextMessages[r.Status]?u=shortContextMessages[r.Status].format(r.Parameters):(console.log("Dev Error: shortContextMessages['"+r.Status+"'] is not defined."),u="");switch(r.Disposition){case 0:e="label-success";o="alert-success";break;case 1:e="label-danger";o="alert-danger";break;case 2:e="label-danger";o="alert-danger"}u!=""?t.each(function(){$(this).hasClass("alert")?$(this).html(u).removeClass("alert-success").removeClass("alert-danger").addClass(o).show().pulse_block():$(this).html(u).removeClass("label-success").removeClass("label-danger").addClass(e).show().pulse()}):t.hide()}}r.Error&&console.log("Error updating contextual status for listing #"+n+": ",r.Error,r)},function(t){ShowSignalRAlert();jslog("error (1) retrieving contextual status for listing #"+n+": "+t)}),r.fail(function(t,i){ShowSignalRAlert();jslog("error (2) retrieving contextual status for listing #"+n+": "+i)}))}function write_log(n){record_SignalR_Errors&&$.post("RealTime/LogError",n)}var basic_signalR_Logging=!1,rwx_signalR_Logging=!0,record_SignalR_Errors=!0;String.prototype.formatUnicorn=String.prototype.formatUnicorn||function(){"use strict";var n=this.toString(),t,i,r;if(arguments.length){t=typeof arguments[0];r="string"===t||"number"===t?Array.prototype.slice.call(arguments):arguments[0];for(i in r)n=n.replace(new RegExp("\\{"+i+"\\}","gi"),r[i])}return n};var interestingListings=[],interestingEvents=[],abortSignalRAlert=!1,rwx_MaxInactiveMessageQueueLength=1e3,rwx_AbortHiddenTabMessageQueuing=!1,rwx_IgnoredMessageCount=0,rwx_CountdownsActive=!0,rwx_ProcessSignalrMessages=!0,rwx_QueuedSignalrMessages=[],rwx_MaxCountDownUpdateRetries=1600,rwx_CurrentCountDownUpdateRetries=0,rwx_CountDownUpdateRetriesDisabled=!1,rwx_DelayCountDownUpdateRetries=!1,rwx_CountDownUpdateRetryDelayMS=5e3,rwx_MaxReConnectRetries=1600,rwx_CurrentReConnectRetries=0,rwx_ReConnectRetriesDisabled=!1,rwx_countdownIntervalId=0,visibilityDetectionSupported=!0,pageInitiallyHidden=!1,docHiddenPropName,visibilityChangeEventName,lastVisibilityChangeTimestamp=new Date;typeof document.hidden!="undefined"?(docHiddenPropName="hidden",visibilityChangeEventName="visibilitychange"):typeof document.mozHidden!="undefined"?(docHiddenPropName="mozHidden",visibilityChangeEventName="mozvisibilitychange"):typeof document.msHidden!="undefined"?(docHiddenPropName="msHidden",visibilityChangeEventName="msvisibilitychange"):typeof document.webkitHidden!="undefined"?(docHiddenPropName="webkitHidden",visibilityChangeEventName="webkitvisibilitychange"):(visibilityDetectionSupported=!1,jslog("Page Visibility API not supported."));visibilityDetectionSupported&&(document.addEventListener(visibilityChangeEventName,handlePageVisibilityChange,!1),pageInitiallyHidden=document[docHiddenPropName],jslog("Page/Tab Initially Hidden: "+pageInitiallyHidden),pageInitiallyHidden&&(jslog("Suspending countdowns and animations..."),rwx_CountdownsActive=!1,rwx_ProcessSignalrMessages=!1));var browserDateTime=null,timeDifferenceDictionary={},statusDictionary={},lotStatusHtmlDictionary={},eventStatusHtmlDictionary={},eventHomepageStatusHtmlDictionary={},eventHomepageTimeLabelHtmlDictionary={},eventHomepageTimeHtmlDictionary={},contextMessageDictionary={},shortContextMessages={},signalrIndicatorTitlesDictionary={};String.prototype.format||(String.prototype.format=function(){var n=arguments[0];return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})});jQuery.fn.quickEach=function(){var n=jQuery([1]);return function(t){var i=-1,r,u=this.length;try{while(++i<u&&(r=n[0]=this[i])&&t.call(n,i,r)!==!1);}catch(f){delete n[0];throw f;}return delete n[0],this}}();$.fn.pulse=function(){$(this).addClass("signalr-pulse",10,function(){$(this).removeClass("signalr-pulse",3e3)})};$.fn.pulse_block=function(){$(this).addClass("signalr-pulse-block",10,function(){$(this).removeClass("signalr-pulse-block",3e3)})};$(document).ready(function(){if(!rwx_SignalRDisabled){basic_signalR_Logging&&($.connection.hub.logging=!0);$.connection.hub.disconnected(function(){$.event.trigger({type:"SignalR_Disconnected"});rwx_CurrentReConnectRetries++;console.log("rwx_CurrentReConnectRetries: ",rwx_CurrentReConnectRetries);rwx_CurrentReConnectRetries>rwx_MaxReConnectRetries&&(rwx_ReConnectRetriesDisabled=!0,console.log("Disabled further Reconnect Retries after reaching the maximum number of attempts:",rwx_MaxReConnectRetries));rwx_ReConnectRetriesDisabled||setTimeout(function(){$.connection.hub.start().done(function(){$.event.trigger({type:"SignalR_Started"})})},5e3)});$.connection.hub.connectionSlow(function(){$.event.trigger({type:"SignalR_ConnectionSlow"})});$.connection.hub.reconnecting(function(){$.event.trigger({type:"SignalR_Reconnecting"})});$.connection.hub.reconnected(function(){$.event.trigger({type:"SignalR_Reconnected"})});var n=$.connection.listingHub;n.client.updateCurrentTime=function(n){rwx_ProcessSignalrMessages&&(browserDateTime=new Date(n),jslog("Browser Time Set (signalR): "+n),$.event.trigger("SignalR_UpdateCurrentTime"))};n.client.updateListingAction=function(n){rwx_ProcessSignalrMessages?$.event.trigger("SignalR_UpdateListingAction",n):QueueSignalrMessage("SignalR_UpdateListingAction",n)};n.client.updateListingDTTM=function(n){rwx_ProcessSignalrMessages?$.event.trigger("SignalR_UpdateListingDTTM",n):QueueSignalrMessage("SignalR_UpdateListingDTTM",n)};n.client.updateListingStatus=function(n){rwx_ProcessSignalrMessages?$.event.trigger("SignalR_UpdateListingStatus",n):QueueSignalrMessage("SignalR_UpdateListingStatus",n)};n.client.listingActionResponse=function(n){rwx_ProcessSignalrMessages?$.event.trigger("SignalR_ListingActionResponse",n):QueueSignalrMessage("SignalR_ListingActionResponse",n)};n.client.updateEventStatus=function(n){rwx_ProcessSignalrMessages?$.event.trigger("SignalR_UpdateEventStatus",n):QueueSignalrMessage("SignalR_UpdateEventStatus",n)};n.client.updateInvoiceStatus=function(n){rwx_ProcessSignalrMessages?$.event.trigger("SignalR_UpdateInvoiceStatus",n):QueueSignalrMessage("SignalR_UpdateInvoiceStatus",n)};$.connection.hub.start().done(function(){$.event.trigger({type:"SignalR_Started"})})}})