(function(n,t,i,r){"use strict";function a(n){var t=i.createElement("style");t.innerHTML=n;i.getElementsByTagName("head")[0].appendChild(t)}function f(t,i){this.el=n(t);this.options=n.extend({},v,i);this._init()}var h="Webkit Moz O ms".split(" "),c="",e=!1,l="",o="",v={duration:1e3,iterationCount:"infinite",auto:!0},u,s;if(i.documentElement.style.animationName&&(e=!0),!e)for(u=0;u<h.length;u++)if(i.documentElement.style[h[u]+"AnimationName"]!==r){c=h[u];l="-"+c.toLowerCase()+"-";e=!0;break}if(e){if(o="@"+l+"keyframes modernBlink { 50% { opacity: 0; }}",s=null,i.styleSheets&&i.styleSheets.length)for(u=0;u<i.styleSheets.length;u++)if(i.styleSheets[u].href!=null&&i.styleSheets[u].href.indexOf(t.location.hostname)!=-1){s=i.styleSheets[u];break}if(s!==null)try{s.insertRule(o,0)}catch(y){a(o)}else a(o)}f.prototype._init=function(){this.options.auto&&this.start();this._bindEventHandlers()};f.prototype.start=function(){e?this.el.css({"animation-name":"modernBlink","animation-duration":""+this.options.duration+"ms","animation-iteration-count":""+this.options.iterationCount}):this._fallbackAnimation(this.options.iterationCount)};f.prototype.stop=function(){return e?this.el.css({"animation-name":"","animation-duration":"","animation-iteration-count":""}):this.el.stop(!0,!0)};f.prototype._fallbackAnimation=function(n){var t=this,i=this.options.duration/2;(n>0||n==="infinite")&&(n=n==="infinite"?"infinite":n-1,this.el.animate({opacity:0},i).promise().done(function(){t.el.animate({opacity:1},i);t._fallbackAnimation(n)}))};f.prototype._bindEventHandlers=function(){this.el.on("modernBlink.start",n.proxy(this.start,this));this.el.on("modernBlink.stop",n.proxy(this.stop,this))};n.fn.modernBlink=function(t){return this.each(function(){n.data(this,"plugin_modernBlink")?(t=(t||"").replace(/^_/,""),n.isFunction(f.prototype[t])&&n.data(this,"plugin_modernBlink")[t]()):n.data(this,"plugin_modernBlink",new f(this,t))})}})(jQuery,window,document),function(n){function u(t){return this.each(function(){var i=n(this),u=i.data("advanced-search-plugin");option=n.extend({breakpoint:"xs"},i.data(),t);u||i.data("advanced-search-plugin",u=new r(this,option))})}var r=function(t){this.$element=n(t);var i=this.$element;this.$element.on("hidden.bs.collapse",function(){i.find(".advanced-search-content").css("height","")})},i=n(".saved-search-list li").size(),t=5;n(".saved-search-list li:lt("+t+")").show();i>t?n(".saved-search-show-more-divider, .saved-search-show-more-list-item").show():n(".saved-search-show-more-divider, .saved-search-show-more-list-item").hide();n(".saved-search-show-more-list-item").click(function(r){t=t+5<=i?t+5:i;n(".saved-search-list li:lt("+t+")").show("slide").delay(500);t>=i&&n(".saved-search-show-more-divider, .saved-search-show-more-list-item").hide();n(".saved-search-list").animate({scrollTop:n(".saved-search-list li:nth-child("+t+")").last().offset().top},"slow");r.stopPropagation()});n.fn.advancedSearch=u;n.fn.advancedSearch.Constructor=r}(jQuery),function(n,t,i,r){function o(n){var f,o,r,e;if(n.bidResponse!=null&&n.bidResponse!=""){t.bidResponse("show",n.bidResponse);return}if(n.bids.length==0){u.$loadingBar.loadingBar("setToggle","#bid-history-no-history");u.$loadingBar.loadingBar("hide");return}for(u.$tableBody.find("tr:gt(0)").remove(),f=n.bids,o=u.$tableBody.find("tr:first"),r=0;r<f.length;r++)f[r].bid=i.formatWithCurrAbbrev(n.currAbbrev,f[r].bid),e=o.clone().appendTo(u.$tableBody),e.find("td").each(function(n,i){switch(n){case 0:t(i).text(f[r].username);return;case 1:t(i).text(f[r].count);return;case 2:t(i).text(f[r].bid);return;default:t(i).text(f[r].datetime);return}}),e.removeClass("hidden"),f[r].count==0&&(showBidCount=0);u.$title.text(u.$title.data("title-format").format(n.lotNumber+n.lotSubNumber,n.lead));u.$disclaimer.text(n.disclaimer);u.$loadingBar.loadingBar("setToggle","#bid-history-grid");u.$loadingBar.loadingBar("hide");return}function e(n,i){return this.each(function(){var e=t(this),u=e.data("bid-history-plugin"),o=t.extend({},e.data(),i);u||e.data("bid-history-plugin",u=new f(this,o));n==r?u.show():u[n](o)})}var u=null,f=function(n,i){(this.$element=t(n),this.eventId=i.eventId,this.eventItemId=i.eventItemId,u==null)&&(u={$modal:t("#bid-history-modal"),$title:t("#bid-history-title"),$loadingBar:t("#bid-history-loading-bar"),$tableBody:t("#bid-history-table-body"),$disclaimer:t("#bid-history-disclaimer-text")},u.bidFormat=u.$modal.data("bid"),u.bidsFormat=u.$modal.data("bids"),u.liveBidding=u.$modal.data("live-bidding"))};f.prototype.show=function(){u.$loadingBar.loadingBar("show");u.$title.text(u.$title.data("title"));u.$modal.modal("show");t.ajax({url:"/api/v1/bid/list/"+this.eventItemId,data:{eventid:this.eventId},type:"GET",success:o})};f.prototype.update=function(n){var t=this,i,r;if(t.eventId=n.eventId,t.eventItemId=n.eventItemId,t.$element.data("event-id",t.eventId).data("event-item-id",t.eventItemId).attr("data-event-id",n.eventId).attr("data-event-item-id",n.eventItemId),i=n.lotStatus,i.sealed||i.status<=LOT_STATUS.POSTED||i.status!=LOT_STATUS.LIVE&&i.status>=LOT_STATUS.CLOSED&&!i.showBidStatus||t.$element.data("hide-on-live")&&i.status===LOT_STATUS.LIVE){t.$element.addClass("hidden");return}if(t.$element.removeClass("hidden"),i.bidCount>0&&t.$element.removeClass("disabled"),i.status==LOT_STATUS.LIVE){t.$element.addClass("disabled").text(u.liveBidding);return}r=u.bidsFormat;i.bidCount===1&&(r=u.bidFormat);t.$element.text(r.format(i.bidCount))};t.fn.bidHistory=e;t.fn.bidHistory.Constructor=f;t(n).on("click.bidopia.bidHistory.data-api",".lot-bid-history",function(n){var i=t(this);return i.is("a")&&n.preventDefault(),e.call(i),!1})}(document,jQuery,Globalize),function(n,t){function o(n){return u[n]}function e(i){var u=t,e=this,f;if(arguments.length>1)for(u=new Array(arguments.length-1),f=1;f<arguments.length;f++)u[f-1]=arguments[f];return this===n&&(e=n(".bid-status-"+u[0]),u.shift()),e.each(function(){var e=n(this),f=e.data("bid-status-plugin");f||e.data("bid-status-plugin",f=new r(this));i!==t&&f[i]!==t&&f[i].apply(f,u)})}function f(n){var t={isWatching:n.lotStatus.isWatching};return n.lotStatus.buyerBidStatus&&(t.buyerBidStatus=n.lotStatus.buyerBidStatus),t}var r=function(t){this.$element=n(t);this.statusCache={nobid:this.$element.find(".bid-status-nobid"),winning:this.$element.find(".bid-status-winning"),won:this.$element.find(".bid-status-won"),mayhavewon:this.$element.find(".bid-status-mayhavewon"),mayhavewonstatus:this.$element.find(".bid-status-mayhavewonstatus"),notaccepted:this.$element.find(".bid-status-notaccepted"),outbid:this.$element.find(".bid-status-outbid"),declined:this.$element.find(".bid-status-declined"),pending:this.$element.find(".bid-status-pending"),passed:this.$element.find(".bid-status-passed"),sealed:this.$element.find(".bid-status-sealed"),watching:this.$element.find(".bid-status-watching")};this.$watchButton=this._getWatchButton();this._update()},i,u;if(r.BID_STATUS={NO_BID:0,WINNING:1,WON:2,MAY_HAVE_WON:3,MAY_HAVE_WON_STATUS:4,NOT_ACCEPTED:9,OUT_BID:10,DECLINED:11,PENDING:12,PASSED:13,SEALED:14},i={NO_BID:"nobid",WINNING:"winning",WON:"won",MAY_HAVE_WON:"mayhavewon",MAY_HAVE_WON_STATUS:"mayhavewonstatus",NOT_ACCEPTED:"notaccepted",OUT_BID:"outbid",DECLINED:"declined",PENDING:"pending",PASSED:"passed",SEALED:"sealed",WATCHING:"watching"},u={},u[r.BID_STATUS.NO_BID]=i.NO_BID,u[r.BID_STATUS.WINNING]=i.WINNING,u[r.BID_STATUS.WON]=i.WON,u[r.BID_STATUS.MAY_HAVE_WON]=i.MAY_HAVE_WON,u[r.BID_STATUS.MAY_HAVE_WON_STATUS]=i.MAY_HAVE_WON_STATUS,u[r.BID_STATUS.NOT_ACCEPTED]=i.NOT_ACCEPTED,u[r.BID_STATUS.OUT_BID]=i.OUT_BID,u[r.BID_STATUS.DECLINED]=i.DECLINED,u[r.BID_STATUS.PENDING]=i.PENDING,u[r.BID_STATUS.PASSED]=i.PASSED,u[r.BID_STATUS.SEALED]=i.SEALED,r.prototype._getWatchButton=function(){return n("#lot-watch-button-"+this.$element.data("eventItemId"))},r.prototype._update=function(){var t,n;if(!this.$element.data("updateStatusOnly")){this.$watchButton.length||(this.$watchButton=this._getWatchButton());for(t in this.statusCache)this.statusCache[t].addClass("hidden");n=this.$element.data("status");this.statusCache[n]&&(this.statusCache[n].removeClass("hidden"),this.$element.removeClass("hidden"))}},r.prototype.setStatus=function(n,u){var e=this.$element.data("status"),f;(n.buyerBidStatus!==t||e===i.NO_BID||e===i.WATCHING)&&(f=i.NO_BID,n.status==LOT_STATUS.LIVE?f=i.NO_BID:n.buyerBidStatus==r.BID_STATUS.MAY_HAVE_WON&&n.mayHaveWonStatus!=null&&n.mayHaveWonStatus!=""?f=i.MAY_HAVE_WON_STATUS:n.buyerBidStatus?f=o(n.buyerBidStatus):!this.$element.data("hideWatching")&&n.isWatching&&(f=i.WATCHING),this.$element.data("status",f),this.$element.find(".bid-status-mayhavewonstatus").attr("data-content",n.mayHaveWonStatus),this.$element.data("status-category",this._getStatusCategory()),u!==t&&this.$element.data("updateStatusOnly",u),this._update())},r.prototype._getStatusCategory=function(){switch(this.$element.data("status")){case i.WINNING:case i.WON:case i.MAY_HAVE_WON:return"winning";case i.PENDING:case i.NOT_ACCEPTED:case i.SEALED:return"pending";case i.PASSED:case i.OUT_BID:case i.DECLINED:return"losing";case i.WATCHING:return"watching";case i.NO_BID:default:return"default"}},n.fn.bidStatus=e,n.fn.bidStatus.Constructor=r,n.bidStatus=e,n.BidStatus=r,n.lowrbEvents!=t){n(document).on(n.lowrbEvents.BIDDING_UPDATE_EVENT,function(t,i){n.bidStatus("setStatus",i.eventItemId,f(i))});n(document).on(n.lowrbEvents.WATCH_ADDED_EVENT,function(t,i){n.bidStatus("setStatus",i.eventItemId,f(i))});n(document).on(n.lowrbEvents.WATCH_REMOVED_EVENT,function(t,i){n.bidStatus("setStatus",i.eventItemId,f(i))})}}(jQuery),function(n){function i(i){return this.each(function(){var r=n(this),u=r.data("collapsible-panel-plugin"),f=n.extend({},t.DEFAULTS,r.data(),typeof i=="object"&&i);u||r.data("collapsible-panel-plugin",u=new t(this,f))})}var t=function(t,i){var r=this;r.$element=n(t).filter(".collapse-panel");r.options=i;this.$element.on("shown.bs.collapse",function(t){var i=n(t.target).closest(".panel, .well");r._updateCollapseIndicator(i,!0)});this.$element.on("hidden.bs.collapse",function(t){var i=n(t.target).closest(".panel, .well");r._updateCollapseIndicator(i,!1)});r._updateCollapseIndicator(r.$element.closest(".panel, .well"),!i.startCollapsed);r.$element.removeClass("hidden");i.startCollapsed?r.$element.addClass("collapse").removeClass("in"):r.$element.addClass("collapse in")};t.DEFAULTS={startCollapsed:!1};t.prototype._updateCollapseIndicator=function(t,i){var r=n(t);r.length!==0&&(i?(r.find(".collapse-indicator-collapsed").addClass("hidden"),r.find(".collapse-indicator-shown").removeClass("hidden")):(r.find(".collapse-indicator-collapsed").removeClass("hidden"),r.find(".collapse-indicator-shown").addClass("hidden")))};n.fn.collapsiblePanel=i;n.fn.collapsiblePanel.Constructor=t}(jQuery),function(n,t){function e(t){clearInterval(u);r=t;n("#auto-seconds").text(r);u=setInterval(c,1e3)}function c(){if(r--,r<=0)if(h=="True"){var o=t.location.href;o.toLowerCase().indexOf("auto=true")<0&&(o+=o.indexOf("?")>=0?"&auto=true":"?auto=true");t.location.href=o;clearInterval(u)}else i.data("prevent-scroll",!0),i.attr("data-refreshing",!0),n(s).triggerHandler("click"),e(f);n("#auto-seconds").text(r)}t.opener&&(t.opener=null);var f=60,r=0,u=0,i=n("#auto"),o=i.data("auto"),s=i.data("search-button-id"),h=i.data("url");i.data("prevent-scroll",!1);o=="True"?(i.prop("checked",!0),n("#auto-seconds-label").removeClass("hidden"),e(f)):n("#auto-seconds-label").addClass("hidden");i.click(function(){i.data("prevent-scroll",!1);i.prop("checked")?(n("#auto-seconds-label").removeClass("hidden"),e(f)):(clearInterval(u),n("#auto-seconds-label").addClass("hidden"))})}(jQuery,window),function(n,t){function y(){var i=n.cookie(h);return i===t?t:i==="true"}function p(t){n.cookie(h,t.toString(),{path:"/",expires:365})}function w(){var i=n.cookie(c);return i===t?t:i==="true"}function b(t){n.cookie(c,t.toString(),{path:"/",expires:365})}function k(){var i=n.cookie(l);return i===t?t:i==="true"}function d(t){n.cookie(l,t.toString(),{path:"/",expires:365})}function g(){var i=n.cookie(a);return i===t?t:i==="true"}function nt(t){n.cookie(a,t.toString(),{path:"/",expires:365})}function tt(){var i,u,r,e,f;n("#lot-tiles")&&(i=this,u=n(i).find("tbody > tr.group"),u.length>1?(u.each(function(r){var e=this,o=u[r+1],h=o===t?n(i).find("tr").length+1:o.rowIndex,f=n("#lot-tiles").clone(),s=n(i).find("tbody > tr").slice(e.rowIndex,h-1),c=s.find(".lot-tile");c.each(function(){var t=this;n(t).attr("id",n(t.closest("tr")).attr("id"));f.append(n(t))});s.addClass("delete-row");f.attr("id","lot-tiles-"+r);f.removeClass("hidden");n(e).find("td").append(f)}),n(i).find("tbody > tr.delete-row").remove()):(r=n("#lot-tiles").clone(),e=n(".lot-tiles"),r.attr("id","lot-tiles-"+e.length),r.removeClass("hidden"),n(".lot-tile:not(:last)").each(function(){var t=this,i=n(t).closest("tr"),u=i.attr("id");n(t).attr("id",u);r.append(n(t))}),f=n(i).find("tbody > tr:first"),f.attr("id",""),f.find("td").append(r),n(i).find("tr:gt(1)").remove()))}function v(){o=!1}function it(t){var i=n(this),u=i.data("lot-view-switcher-plugin"),f=n.extend({},i.data(),typeof t=="object"&&t);u||i.data("lot-view-switcher-plugin",u=new r(this,f))}function rt(t){var u=n(this).data("lot-view-switcher-plugin"),r=u.tableElement.bidopiaTable("datatable"),i;t&&(i=History.getState(),i.data&&i.data.cpage>1&&r.page.bidopiaPage(i.data.cpage));r.draw()}function ut(n){var i=Array.prototype.slice.call(arguments,1),t=typeof n=="string"&&e[n]?n:null,r=typeof n=="object"?n:null;return this.each(function(){t?e[t].apply(this,i):e.init.apply(this,[r])})}var f=12,u={BID_LIST:0,CATALOG:1,PENDING:2},i={FULL:0,CONDENSED:1,TILE:2},s={VIEW_CHANGED:"changed.lotviewswitcher.bidopia"},o=!1,r=function(t,i){function u(){if(o)return!1;o=!0;n(this).prop("checked",!0);r._toggleView()}var r=this;r.$element=n(t);r.$fullElement=n("#lot-list-view-full");r.$tileElement=n("#lot-list-view-tile");r.type=i.type;r.tableElement=i.tableElement;r.tableTemplate=r.tableElement.clone();r.tilesElement=i.tilesElement;r.getDatatableOptions=i.getDatatableOptions;r.currentData=r.getDatatableOptions().data;r.ui={fullTemplate:n("#lot-template").html(),condensedTemplate:n("#inline-lot-template").html(),tileTemplate:n("#lot-tile-template").html()};r.$element.on("change",u);r.$fullElement.on("change",u);r.$fullElement.on("change",u);r.$tileElement.on("change",u);r._initViewSwitcherState();r._createTable()},e;r.TYPE=u;r.VIEW_TYPE=i;r.EVENTS=s;var h="HibidLotViewCatalogUseCondensed",c="HibidLotViewCatalogUseTile",l="HibidLotViewBidListUseCondensed",a="HibidLotViewBidListUseTile";r.prototype._initViewSwitcherState=function(){var n=this,i=!1,r=!1,f,e,o,s;n.type===u.CATALOG?(f=y(),i=f===t?!1:f,e=w(),r=e!==t||i?e:!0):n.type===u.BID_LIST?(o=k(),i=o===t?!0:o,s=g(),r=s===t?!1:s):n.type===u.PENDING&&(i=!0);n.$element.prop("checked",i);n.$tileElement.prop("checked",r);n.$fullElement.prop("checked",!i&&!r);i&&n.$element.closest("label").addClass("active");r&&n.$tileElement.closest("label").addClass("active");i||r||n.$fullElement.closest("label").addClass("active");n.viewType=n._getViewType()};r.prototype._toggleView=function(){var t=this,r,f;t.viewType=t._getViewType();r=t.viewType===i.CONDENSED;t.type===u.CATALOG?p(r):t.type===u.BID_LIST&&d(r);f=t.viewType===i.TILE;t.type===u.CATALOG?b(f):t.type===u.BID_LIST&&nt(f);t.currentData=t.tableElement.DataTable().data();t.tableElement.off("init.dt",v).bidopiaTable().destroy();t._createTable();n(document).trigger(s.VIEW_CHANGED,{type:t.viewType,table:t.tableElement})};r.prototype._getViewType=function(){var n=this;return n.$element.is(":checked")?(f=8,i.CONDENSED):n.$tileElement.is(":checked")?(f=12,i.TILE):(f=6,i.FULL)};r.prototype._getCurrentTemplate=function(){var n=this;return n.viewType===i.FULL?n.ui.fullTemplate:n.viewType===i.CONDENSED?n.ui.condensedTemplate:n.viewType===i.TILE?n.ui.tileTemplate:""};r.prototype._createTable=function(){var n=this,r=n.tableTemplate.clone(),t;n.tableElement.before(r);n.tableElement.remove();n.tableElement=r;t=n.getDatatableOptions();t.destroy=!0;t.data=n.currentData;t.columnDefs[0].defaultContent=n._getCurrentTemplate();n.tableElement.on("init.dt",v).on("preDraw.dt",function(){n.currentData=n.tableElement.DataTable().data()}).on("draw.dt",function(t,r,u){n.viewType===i.TILE&&tt.call(n.tableElement,t,r,u);n._insertAdUnit(n.currentData.length)}).bidopiaTable(t);n.viewType===i.FULL&&n.tableElement.removeClass("table-striped");n.viewType===i.TILE?n.tableElement.removeClass("table-striped"):n.tableElement.addClass("table-striped")};r.prototype._insertAdUnit=function(n){var e=this,t,r,u,o;if(window.googletag&&window.googletag.hibidInsertInlineAdUnit){if(r=[],n>f){let t=0;for(u=1;u<n;u++)u%f==0&&(t+=f,r.push(t))}r.length>0&&(o=e.viewType===i.TILE?".lot-tiles>div":"tbody>tr",r.forEach(function(n){t=t?t.add(e.tableElement.find(o+":nth-child("+n+")")):e.tableElement.find(o+":nth-child("+n+")")}),window.googletag.hibidInsertInlineAdUnit(t))}};r.prototype._getTilesElement=function(){var n=this;return n.tilesElement};e={init:it,reloadTable:rt};n.fn.lotViewSwitcher=ut;n.fn.lotViewSwitcher.Constructor=r;n.LotViewSwitcher=r}(jQuery);!function(n,t){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("jquery")):n.jQueryBridget=t(n,n.jQuery)}(window,function(n,t){"use strict";function i(i,u,o){function s(n,t,r){var u,e="$()."+i+'("'+t+'")';return n.each(function(n,s){var h=o.data(s,i),c,l;if(!h)return void f(i+" not initialized. Cannot call methods, i.e. "+e);if(c=h[t],!c||"_"==t.charAt(0))return void f(e+" is not a valid method");l=c.apply(h,r);u=void 0===u?l:u}),void 0!==u?u:n}function h(n,t){n.each(function(n,r){var f=o.data(r,i);f?(f.option(t),f._init()):(f=new u(r,t),o.data(r,i,f))})}o=o||t||n.jQuery;o&&(u.prototype.option||(u.prototype.option=function(n){o.isPlainObject(n)&&(this.options=o.extend(!0,this.options,n))}),o.fn[i]=function(n){if("string"==typeof n){var t=e.call(arguments,1);return s(this,n,t)}return h(this,n),this},r(o))}function r(n){!n||n&&n.bridget||(n.bridget=i)}var e=Array.prototype.slice,u=n.console,f="undefined"==typeof u?function(){}:function(n){u.error(n)};return r(t||n.jQuery),i}),function(n,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():n.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function t(){}var n=t.prototype;return n.on=function(n,t){if(n&&t){var i=this._events=this._events||{},r=i[n]=i[n]||[];return r.indexOf(t)==-1&&r.push(t),this}},n.once=function(n,t){if(n&&t){this.on(n,t);var i=this._onceEvents=this._onceEvents||{},r=i[n]=i[n]||{};return r[t]=!0,this}},n.off=function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return r=i.indexOf(t),r!=-1&&i.splice(r,1),this},n.emitEvent=function(n,t){var i=this._events&&this._events[n],u,f,r,e;if(i&&i.length){for(i=i.slice(0),t=t||[],u=this._onceEvents&&this._onceEvents[n],f=0;f<i.length;f++)r=i[f],e=u&&u[r],e&&(this.off(n,r),delete u[r]),r.apply(this,t);return this}},n.allOff=function(){delete this._events;delete this._onceEvents},t}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",t):"object"==typeof module&&module.exports?module.exports=t():n.matchesSelector=t()}(window,function(){"use strict";var n=function(){var t=window.Element.prototype,i,n,u,r;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(i=["webkit","moz","ms","o"],n=0;n<i.length;n++)if(u=i[n],r=u+"MatchesSelector",t[r])return r}();return function(t,i){return t[n](i)}}),function(n,t){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("desandro-matches-selector")):n.fizzyUIUtils=t(n,n.matchesSelector)}(window,function(n,t){var i={},u,r;return i.extend=function(n,t){for(var i in t)n[i]=t[i];return n},i.modulo=function(n,t){return(n%t+t)%t},u=Array.prototype.slice,i.makeArray=function(n){if(Array.isArray(n))return n;if(null===n||void 0===n)return[];var t="object"==typeof n&&"number"==typeof n.length;return t?u.call(n):[n]},i.removeFrom=function(n,t){var i=n.indexOf(t);i!=-1&&n.splice(i,1)},i.getParent=function(n,i){for(;n.parentNode&&n!=document.body;)if(n=n.parentNode,t(n,i))return n},i.getQueryElement=function(n){return"string"==typeof n?document.querySelector(n):n},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.filterFindElements=function(n,r){n=i.makeArray(n);var u=[];return n.forEach(function(n){if(n instanceof HTMLElement){if(!r)return void u.push(n);t(n,r)&&u.push(n);for(var f=n.querySelectorAll(r),i=0;i<f.length;i++)u.push(f[i])}}),u},i.debounceMethod=function(n,t,i){i=i||100;var u=n.prototype[t],r=t+"Timeout";n.prototype[t]=function(){var f=this[r],t,n;clearTimeout(f);t=arguments;n=this;this[r]=setTimeout(function(){u.apply(n,t);delete n[r]},i)}},i.docReady=function(n){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(n):document.addEventListener("DOMContentLoaded",n)},i.toDashed=function(n){return n.replace(/(.)([A-Z])/g,function(n,t,i){return t+"-"+i}).toLowerCase()},r=n.console,i.htmlInit=function(t,u){i.docReady(function(){var e=i.toDashed(u),f="data-"+e,s=document.querySelectorAll("["+f+"]"),h=document.querySelectorAll(".js-"+e),c=i.makeArray(s).concat(i.makeArray(h)),l=f+"-options",o=n.jQuery;c.forEach(function(n){var i,e=n.getAttribute(f)||n.getAttribute(l),s;try{i=e&&JSON.parse(e)}catch(h){return void(r&&r.error("Error parsing "+f+" on "+n.className+": "+h))}s=new t(n,i);o&&o.data(n,u,s)})})},i}),function(n,t){"function"==typeof define&&define.amd?define("infinite-scroll/js/core",["ev-emitter/ev-emitter","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):"object"==typeof module&&module.exports?module.exports=t(n,require("ev-emitter"),require("fizzy-ui-utils")):n.InfiniteScroll=t(n,n.EvEmitter,n.fizzyUIUtils)}(window,function(n,t,i){function r(n,t){var u=i.getQueryElement(n),o;if(!u)return void console.error("Bad element for InfiniteScroll: "+(u||n));if(n=u,n.infiniteScrollGUID)return o=e[n.infiniteScrollGUID],o.option(t),o;this.element=n;this.options=i.extend({},r.defaults);this.option(t);f&&(this.$element=f(this.element));this.create()}var f=n.jQuery,e={},u,s,h,o;return r.defaults={},r.create={},r.destroy={},u=r.prototype,i.extend(u,t.prototype),s=0,u.create=function(){var n=this.guid=++s,t,i;if(this.element.infiniteScrollGUID=n,e[n]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),t=this.getPath&&this.getPath(),!t)return void console.error("Disabling InfiniteScroll");this.updateGetAbsolutePath();this.log("initialized",[this.element.className]);this.callOnInit();for(i in r.create)r.create[i].call(this)},u.option=function(n){i.extend(this.options,n)},u.callOnInit=function(){var n=this.options.onInit;n&&n.call(this,this)},u.dispatchEvent=function(n,t,i){var e,r,u;this.log(n,i);e=t?[t].concat(i):i;(this.emitEvent(n,e),f&&this.$element)&&(n+=".infiniteScroll",r=n,t&&(u=f.Event(t),u.type=n,r=u),this.$element.trigger(r,i))},h={initialized:function(n){return"on "+n},request:function(n){return"URL: "+n},load:function(n,t){return(n.title||"")+". URL: "+t},error:function(n,t){return n+". URL: "+t},append:function(n,t,i){return i.length+" items. URL: "+t},last:function(n,t){return"URL: "+t},history:function(n,t){return"URL: "+t},pageIndex:function(n,t){return"current page determined to be: "+n+" from "+t}},u.log=function(n,t){if(this.options.debug){var i="[InfiniteScroll] "+n,r=h[n];r&&(i+=". "+r.apply(this,t));console.log(i)}},u.updateMeasurements=function(){this.windowHeight=n.innerHeight;var t=this.element.getBoundingClientRect();this.top=t.top+n.pageYOffset},u.updateScroller=function(){var t=this.options.elementScroll;if(!t)return void(this.scroller=n);if(this.scroller=t===!0?this.element:i.getQueryElement(t),!this.scroller)throw"Unable to find elementScroll: "+t;},u.updateGetPath=function(){var n=this.options.path,t,i;return n?(t=typeof n,"function"==t)?void(this.getPath=n):(i="string"==t&&n.match("{{#}}"),i?void this.updateGetPathTemplate(n):void this.updateGetPathSelector(n)):void console.error("InfiniteScroll path option required. Set as: "+n)},u.updateGetPathTemplate=function(n){this.getPath=function(){var t=this.pageIndex+1;return n.replace("{{#}}",t)}.bind(this);var i=n.replace("{{#}}","(\\d\\d?\\d?)"),r=new RegExp(i),t=location.href.match(r);t&&(this.pageIndex=parseInt(t[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))},o=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/],u.updateGetPathSelector=function(n){var f=document.querySelector(n),t,e,i,r,u;if(!f)return void console.error("Bad InfiniteScroll path option. Next link not found: "+n);for(i=f.getAttribute("href"),r=0;i&&r<o.length;r++)if(e=o[r],u=i.match(e),u){t=u.slice(1);break}return t?(this.isPathSelector=!0,this.getPath=function(){var n=this.pageIndex+1;return t[0]+n+t[2]}.bind(this),this.pageIndex=parseInt(t[1],10)-1,void this.log("pageIndex",[this.pageIndex,"next link"])):void console.error("InfiniteScroll unable to parse next link href: "+i)},u.updateGetAbsolutePath=function(){var t=this.getPath(),r=t.match(/^http/)||t.match(/^\//),n,i;if(r)return void(this.getAbsolutePath=this.getPath);n=location.pathname;i=n.substring(0,n.lastIndexOf("/"));this.getAbsolutePath=function(){return i+"/"+this.getPath()}},r.create.hideNav=function(){var n=i.getQueryElement(this.options.hideNav);n&&(n.style.display="none",this.nav=n)},r.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},u.destroy=function(){this.allOff();for(var n in r.destroy)r.destroy[n].call(this);delete this.element.infiniteScrollGUID;delete e[this.guid];f&&this.$element&&f.removeData(this.element,"infiniteScroll")},r.throttle=function(n,t){t=t||200;var i,r;return function(){var u=+new Date,e=arguments,f=function(){i=u;n.apply(this,e)}.bind(this);i&&u<i+t?(clearTimeout(r),r=setTimeout(f,t)):f()}},r.data=function(n){n=i.getQueryElement(n);var t=n&&n.infiniteScrollGUID;return t&&e[t]},r.setJQuery=function(n){f=n},i.htmlInit(r,"infinite-scroll"),u._init=function(){},f&&f.bridget&&f.bridget("infiniteScroll",r),r}),function(n,t){"function"==typeof define&&define.amd?define("infinite-scroll/js/page-load",["./core"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("./core")):t(n,n.InfiniteScroll)}(window,function(n,t){function r(n){for(var i=document.createDocumentFragment(),t=0;n&&t<n.length;t++)i.appendChild(n[t]);return i}function u(n){for(var t,r,u=n.querySelectorAll("script"),i=0;i<u.length;i++)t=u[i],r=document.createElement("script"),f(t,r),r.innerHTML=t.innerHTML,t.parentNode.replaceChild(r,t)}function f(n,t){for(var u,r=n.attributes,i=0;i<r.length;i++)u=r[i],t.setAttribute(u.name,u.value)}function e(n,t,i,r){var u=new XMLHttpRequest;u.open("GET",n,!0);u.responseType=t||"";u.setRequestHeader("X-Requested-With","XMLHttpRequest");u.onload=function(){if(200==u.status)i(u.response);else{var n=new Error(u.statusText);r(n)}};u.onerror=function(){var t=new Error("Network error requesting "+n);r(t)};u.send()}var i=t.prototype;return t.defaults.loadOnScroll=!0,t.defaults.checkLastPage=!0,t.defaults.responseType="document",t.create.pageLoad=function(){this.canLoad=!0;this.on("scrollThreshold",this.onScrollThresholdLoad);this.on("load",this.checkLastPage);this.options.outlayer&&this.on("append",this.onAppendOutlayer)},i.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()},i.loadNextPage=function(){var n,t,i;!this.isLoading&&this.canLoad&&(n=this.getAbsolutePath(),this.isLoading=!0,t=function(t){this.onPageLoad(t,n)}.bind(this),i=function(t){this.onPageError(t,n)}.bind(this),e(n,this.options.responseType,t,i),this.dispatchEvent("request",null,[n]))},i.onPageLoad=function(n,t){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[n,t]),this.appendNextPage(n,t),n},i.appendNextPage=function(n,t){var u=this.options.append,o="document"==this.options.responseType;if(o&&u){var i=n.querySelectorAll(u),f=r(i),e=function(){this.appendItems(i,f);this.isLoading=!1;this.dispatchEvent("append",null,[n,t,i])}.bind(this);this.options.outlayer?this.appendOutlayerItems(f,e):e()}},i.appendItems=function(n,t){n&&n.length&&(t=t||r(n),u(t),this.element.appendChild(t))},i.appendOutlayerItems=function(i,r){var u=t.imagesLoaded||n.imagesLoaded;return u?void u(i,r):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},i.onAppendOutlayer=function(n,t,i){this.options.outlayer.appended(i)},i.checkLastPage=function(n,t){var r=this.options.checkLastPage,u,f,i,e;if(r){if(u=this.options.path,"function"==typeof u&&(f=this.getPath(),!f))return void this.lastPageReached(n,t);("string"==typeof r?i=r:this.isPathSelector&&(i=u),i&&n.querySelector)&&(e=n.querySelector(i),e||this.lastPageReached(n,t))}},i.lastPageReached=function(n,t){this.canLoad=!1;this.dispatchEvent("last",null,[n,t])},i.onPageError=function(n,t){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[n,t]),n},t.create.prefill=function(){if(this.options.prefill){var n=this.options.append;if(!n)return void console.error("append option required for prefill. Set as :"+n);this.updateMeasurements();this.updateScroller();this.isPrefilling=!0;this.on("append",this.prefill);this.once("error",this.stopPrefill);this.once("last",this.stopPrefill);this.prefill()}},i.prefill=function(){var n=this.getPrefillDistance();this.isPrefilling=n>=0;this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},i.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},i.stopPrefill=function(){this.log("stopPrefill");this.off("append",this.prefill)},t}),function(n,t){"function"==typeof define&&define.amd?define("infinite-scroll/js/scroll-watch",["./core","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):"object"==typeof module&&module.exports?module.exports=t(n,require("./core"),require("fizzy-ui-utils")):t(n,n.InfiniteScroll,n.fizzyUIUtils)}(window,function(n,t,i){var r=t.prototype;return t.defaults.scrollThreshold=400,t.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this);this.resizeHandler=this.onResize.bind(this);var n=this.options.scrollThreshold,t=n||0===n;t&&this.enableScrollWatch()},t.destroy.scrollWatch=function(){this.disableScrollWatch()},r.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},r.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},r.bindScrollWatchEvents=function(t){var i=t?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler);n[i]("resize",this.resizeHandler)},r.onPageScroll=t.throttle(function(){var n=this.getBottomDistance();n<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),r.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},r.getWindowBottomDistance=function(){var t=this.top+this.element.clientHeight,i=n.pageYOffset+this.windowHeight;return t-i},r.getElementBottomDistance=function(){var n=this.scroller.scrollHeight,t=this.scroller.scrollTop+this.scroller.clientHeight;return n-t},r.onResize=function(){this.updateMeasurements()},i.debounceMethod(t,"onResize",150),t}),function(n,t){"function"==typeof define&&define.amd?define("infinite-scroll/js/history",["./core","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):"object"==typeof module&&module.exports?module.exports=t(n,require("./core"),require("fizzy-ui-utils")):t(n,n.InfiniteScroll,n.fizzyUIUtils)}(window,function(n,t,i){var r=t.prototype,u;return t.defaults.history="replace",u=document.createElement("a"),t.create.history=function(){if(this.options.history){u.href=this.getAbsolutePath();var n=u.origin||u.protocol+"//"+u.host,t=n==location.origin;return t?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+u.origin+" on "+location.origin+" . History behavior disabled.")}},r.createHistoryAppend=function(){this.updateMeasurements();this.updateScroller();this.scrollPages=[{top:0,path:location.href,title:document.title}];this.scrollPageIndex=0;this.scrollHistoryHandler=this.onScrollHistory.bind(this);this.unloadHandler=this.onUnload.bind(this);this.scroller.addEventListener("scroll",this.scrollHistoryHandler);this.on("append",this.onAppendHistory);this.bindHistoryAppendEvents(!0)},r.bindHistoryAppendEvents=function(t){var i=t?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler);n[i]("unload",this.unloadHandler)},r.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},t.destroy.history=r.destroyHistory=function(){var n=this.options.history&&this.options.append;n&&this.bindHistoryAppendEvents(!1)},r.onAppendHistory=function(n,t,i){if(i&&i.length){var r=i[0],f=this.getElementScrollY(r);u.href=t;this.scrollPages.push({top:f,path:u.href,title:n.title})}},r.getElementScrollY=function(n){return this.options.elementScroll?this.getElementElementScrollY(n):this.getElementWindowScrollY(n)},r.getElementWindowScrollY=function(t){var i=t.getBoundingClientRect();return i.top+n.pageYOffset},r.getElementElementScrollY=function(n){return n.offsetTop-this.top},r.onScrollHistory=function(){for(var t,i,r,u=this.getScrollViewY(),n=0;n<this.scrollPages.length;n++){if(r=this.scrollPages[n],r.top>=u)break;t=n;i=r}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(i.title,i.path))},i.debounceMethod(t,"onScrollHistory",150),r.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:n.pageYOffset+this.windowHeight/2},r.setHistory=function(n,t){var i=this.options.history,r=i&&history[i+"State"];r&&(history[i+"State"](null,n,t),this.options.historyTitle&&(document.title=n),this.dispatchEvent("history",null,[n,t]))},r.onUnload=function(){var t=this.scrollPageIndex,i,r;0!==t&&(i=this.scrollPages[t],r=n.pageYOffset-i.top+this.top,this.destroyHistory(),scrollTo(0,r))},r.onPageLoadHistory=function(n,t){this.setHistory(n.title,t)},t}),function(n,t){"function"==typeof define&&define.amd?define("infinite-scroll/js/button",["./core","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):"object"==typeof module&&module.exports?module.exports=t(n,require("./core"),require("fizzy-ui-utils")):t(n,n.InfiniteScroll,n.fizzyUIUtils)}(window,function(n,t,i){function r(n,t){this.element=n;this.infScroll=t;this.clickHandler=this.onClick.bind(this);this.element.addEventListener("click",this.clickHandler);t.on("request",this.disable.bind(this));t.on("load",this.enable.bind(this));t.on("error",this.hide.bind(this));t.on("last",this.hide.bind(this))}return t.create.button=function(){var n=i.getQueryElement(this.options.button);n},t.destroy.button=function(){this.button&&this.button.destroy()},r.prototype.onClick=function(n){n.preventDefault();this.infScroll.loadNextPage()},r.prototype.enable=function(){this.element.removeAttribute("disabled")},r.prototype.disable=function(){this.element.disabled="disabled"},r.prototype.hide=function(){this.element.style.display="none"},r.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},t.Button=r,t}),function(n,t){"function"==typeof define&&define.amd?define("infinite-scroll/js/status",["./core","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):"object"==typeof module&&module.exports?module.exports=t(n,require("./core"),require("fizzy-ui-utils")):t(n,n.InfiniteScroll,n.fizzyUIUtils)}(window,function(n,t,i){function u(n){e(n,"none")}function f(n){e(n,"block")}function e(n,t){n&&(n.style.display=t)}var r=t.prototype;return t.create.status=function(){var n=i.getQueryElement(this.options.status);n&&(this.statusElement=n,this.statusEventElements={request:n.querySelector(".infinite-scroll-request"),error:n.querySelector(".infinite-scroll-error"),last:n.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},r.bindHideStatus=function(n){var t=this.options.append?"append":"load";this[n](t,this.hideAllStatus)},r.showRequestStatus=function(){this.showStatus("request")},r.showErrorStatus=function(){this.showStatus("error")},r.showLastStatus=function(){this.showStatus("last");this.bindHideStatus("off")},r.showStatus=function(n){f(this.statusElement);this.hideStatusEventElements();var t=this.statusEventElements[n];f(t)},r.hideAllStatus=function(){u(this.statusElement);this.hideStatusEventElements()},r.hideStatusEventElements=function(){var n,t;for(n in this.statusEventElements)t=this.statusEventElements[n],u(t)},t}),function(n,t){"function"==typeof define&&define.amd?define(["infinite-scroll/js/core","infinite-scroll/js/page-load","infinite-scroll/js/scroll-watch","infinite-scroll/js/history","infinite-scroll/js/button","infinite-scroll/js/status"],t):"object"==typeof module&&module.exports&&(module.exports=t(require("./core"),require("./page-load"),require("./scroll-watch"),require("./history"),require("./button"),require("./status")))}(window,function(n){return n}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("ev-emitter")):n.imagesLoaded=t(n,n.EvEmitter)}("undefined"!=typeof window?window:this,function(n,t){function o(n,t){for(var i in t)n[i]=t[i];return n}function h(n){if(Array.isArray(n))return n;var t="object"==typeof n&&"number"==typeof n.length;return t?c.call(n):[n]}function i(n,t,r){if(!(this instanceof i))return new i(n,t,r);var u=n;return"string"==typeof n&&(u=document.querySelectorAll(n)),u?(this.elements=h(u),this.options=o({},this.options),"function"==typeof t?r=t:o(this.options,t),r&&this.on("always",r),this.getImages(),f&&(this.jqDeferred=new f.Deferred),void setTimeout(this.check.bind(this))):void e.error("Bad element for imagesLoaded "+(u||n))}function r(n){this.img=n}function u(n,t){this.url=n;this.element=t;this.img=new Image}var f=n.jQuery,e=n.console,c=Array.prototype.slice,s;return i.prototype=Object.create(t.prototype),i.prototype.options={},i.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,this)},i.prototype.addElementImages=function(n){var i,r,t,f,u,e;if("IMG"==n.nodeName&&this.addImage(n),this.options.background===!0&&this.addElementBackgroundImages(n),i=n.nodeType,i&&s[i]){for(r=n.querySelectorAll("img"),t=0;t<r.length;t++)f=r[t],this.addImage(f);if("string"==typeof this.options.background)for(u=n.querySelectorAll(this.options.background),t=0;t<u.length;t++)e=u[t],this.addElementBackgroundImages(e)}},s={1:!0,9:!0,11:!0},i.prototype.addElementBackgroundImages=function(n){var i=getComputedStyle(n),r,t,u;if(i)for(r=/url\((['"])?(.*?)\1\)/gi,t=r.exec(i.backgroundImage);null!==t;)u=t&&t[2],u&&this.addBackground(u,n),t=r.exec(i.backgroundImage)},i.prototype.addImage=function(n){var t=new r(n);this.images.push(t)},i.prototype.addBackground=function(n,t){var i=new u(n,t);this.images.push(i)},i.prototype.check=function(){function n(n,i,r){setTimeout(function(){t.progress(n,i,r)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",n);t.check()}):void this.complete()},i.prototype.progress=function(n,t,i){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!n.isLoaded;this.emitEvent("progress",[this,n,t]);this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,n);this.progressedCount==this.images.length&&this.complete();this.options.debug&&e&&e.log("progress: "+i,n,t)},i.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done",n;(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred)&&(n=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[n](this))},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var n=this.getIsImageComplete();return n?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},r.prototype.onload=function(){this.confirm(!0,"onload");this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror");this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",this);this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},u.prototype=Object.create(r.prototype),u.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;var n=this.getIsImageComplete();n&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},u.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},u.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){t=t||n.jQuery;t&&(f=t,f.fn.imagesLoaded=function(n,t){var r=new i(this,n,t);return r.jqDeferred.promise(f(this))})},i.makeJQueryPlugin(),i}),function(n,t){function w(){var i=n.cookie(a);return i===t?t:i==="true"}function b(t){n.cookie(a,t.toString(),{path:"/",expires:365})}function k(){var i=n.cookie(v);return i===t?t:i==="true"}function d(t){n.cookie(v,t.toString(),{path:"/",expires:365})}function g(){var i=n.cookie(y);return i===t?t:i==="true"}function nt(t){n.cookie(y,t.toString(),{path:"/",expires:365})}function tt(){var i=n.cookie(p);return i===t?t:i==="true"}function it(t){n.cookie(p,t.toString(),{path:"/",expires:365})}function rt(){c=!1}function ut(t){var r=n(this),u=r.data("lot-view-switcher-plugin"),f=n.extend({},r.data(),typeof t=="object"&&t);u||r.data("lot-view-switcher-plugin",u=new i(this,f))}function ft(){var t=n(this).data("lot-view-switcher-plugin");t.loadComplete=!1;t.recsRequestedDownloaded=0;t.recsDownloaded=0;t.recsTotal=0;t.currentData=[];t.tableElement.find("tr").remove();t.tableElement.infiniteScroll("destroy");t.tableElement.infiniteScroll(t.infiniteScrollOptions);t.tableElement.infiniteScroll("loadNextPage")}function et(n){var i=Array.prototype.slice.call(arguments,1),t=typeof n=="string"&&s[n]?n:null,r=typeof n=="object"?n:null;return this.each(function(){t?s[t].apply(this,i):s.init.apply(this,[r])})}var o=0,f=12,e=0,h=0,u={BID_LIST:0,CATALOG:1,PENDING:2},r={FULL:0,CONDENSED:1,TILE:2},l={VIEW_CHANGED:"changed.LotViewSwitcherV2.bidopia"},c=!1,i=function(t,i){function u(){if(c)return!1;c=!0;n(this).prop("checked",!0);r._toggleView()}var r=this;r.infiniteScrollOptions={onInit:rt,path:r.getNextPathFunc(),append:!1,checkLastPage:!1,prefill:!1,responseType:"text",history:!1,loadOnScroll:!0,scrollThreshold:6e3};r.$element=n(t);r.$fullElement=n("#lot-list-view-full");r.$tileElement=n("#lot-list-view-tile");r.type=i.type;r.tableElement=i.tableElement;r.tableTemplate=r.tableElement.clone();r.tilesElement=i.tilesElement;r.getDatatableOptions=i.getDatatableOptions;r.recsTotal=r.getDatatableOptions().deferLoading;r.recsPerPage=10;r.recsDownloaded=0;r.recsRequestedDownloaded=0;r.loadComplete=!1;r.initData={language:{}};n.extend(r.initData,r.tableElement.data());r.initData.language.emptyTable="";r.initData.language.url&&n.ajax({dataType:"json",url:r.initData.language.url,success:function(t){n.extend(!0,r.initData.language,t)}});r.currentData=r.getDatatableOptions().data;r.ui={fullTemplate:n("#lot-template").html(),condensedTemplate:n("#inline-lot-template").html(),tileTemplate:n("#lot-tile-template").html()};r.$element.on("change",u);r.$fullElement.on("change",u);r.$tileElement.on("change",u);r._initViewSwitcherState();r._createTable()},s;i.TYPE=u;i.VIEW_TYPE=r;i.EVENTS=l;var a="HibidLotViewCatalogUseCondensed",v="HibidLotViewCatalogUseTile",y="HibidLotViewBidListUseCondensed",p="HibidLotViewBidListUseTile";i.prototype._initViewSwitcherState=function(){var n=this,i=!1,r=!1,f,e,o,s;n.type===u.CATALOG?(f=w(),i=f===t?!1:f,e=k(),r=e!==t||i?e:!0):n.type===u.BID_LIST?(o=g(),i=o===t?!0:o,s=tt(),r=s===t?!1:s):n.type===u.PENDING&&(i=!0);n.$element.prop("checked",i);n.$tileElement.prop("checked",r);n.$fullElement.prop("checked",!i&&!r);i&&n.$element.closest("label").addClass("active");r&&n.$tileElement.closest("label").addClass("active");i||r||n.$fullElement.closest("label").addClass("active");n.viewType=n._getViewType()};i.prototype.createRowsInTable=function(t){var i=this,s,c=i._getCurrentTemplate(),u=i.tableElement.find("tbody"),h,f,o;u.length===0&&(u=i.tableElement.append("<tbody><\/tbody>"));t&&t.length>0?(h=i.getDatatableOptions().createdRow,i.viewType===r.TILE?(f=u.find("#lot-tiles-1"),f.length===0&&(o=n("#lot-tiles").clone(),o.attr("id","lot-tiles-1"),o.removeClass("hidden"),u.append('<tr role="row" class="odd"><\/tr><td class="p-x-0"><\/td>'),u.find("td").append(o),f=u.find("#lot-tiles-1")),t.forEach(function(t,i){var r=n(n.trim(c));h(r,t,i);f.append(r);e++})):t.forEach(function(t,i){s=n('<tr role="row" class="odd"><\/tr>').append('<td class="p-x-0">'+c+"<\/td>");u.append(s);h(s,t,i);e++})):i.currentData&&i.currentData.length!==0||u.append('<tr class="odd"><td valign="top" colspan="1" class="dataTables_empty" style="text-align: center;">'+i.initData.language.emptyTable+"<\/td><\/tr>")};i.prototype.showLoading=function(t){var r=this.getDatatableOptions().loadingBar,i;r&&r.length&&(t?r.show():r.hide());i=n("#search-busy");i&&i.length&&(t?i.removeClass("hidden"):i.addClass("hidden"))};i.prototype._toggleView=function(){var t=this,i,f;t.viewType=t._getViewType();o=0;e=0;h=0;i=t.viewType===r.CONDENSED;t.type===u.CATALOG?b(i):t.type===u.BID_LIST&&nt(i);f=t.viewType===r.TILE;t.type===u.CATALOG?d(f):t.type===u.BID_LIST&&it(f);t._createTable();n(document).trigger(l.VIEW_CHANGED,{type:t.viewType,table:t.tableElement})};i.prototype._getViewType=function(){var n=this;return n.$element.is(":checked")?(f=8,r.CONDENSED):n.$tileElement.is(":checked")?(f=12,r.TILE):(f=6,r.FULL)};i.prototype._getCurrentTemplate=function(){var n=this;return n.viewType===r.FULL?n.ui.fullTemplate:n.viewType===r.CONDENSED?n.ui.condensedTemplate:n.viewType===r.TILE?n.ui.tileTemplate:""};i.prototype.getNextPathFunc=function(){function i(){var u,r,i,f;return console.log("_getNextPath: loadComplete="+t.loadComplete+", recsRequestedDownloaded="+t.recsRequestedDownloaded+", recsTotal="+t.recsTotal),!t.loadComplete&&(t.recsTotal===0||t.recsRequestedDownloaded<t.recsTotal)&&(r={ipp:t.recsPerPage},t.getDatatableOptions().customParams(r,!0),i=n.param(r),i&&(i="&"+i),f=Math.floor((t.recsRequestedDownloaded+1)/t.recsPerPage),u=t.getDatatableOptions().ajax.url+"?pn="+(f+1)+i),u}var t=this;return i};i.prototype._createTable=function(){function f(){var t=n(".scroll-header"),r=window.pageYOffset,f,i;r<=u&&r>500?(f=0,i=n(".full-width-header"),i.length&&i.css("position")==="fixed"&&(f=i.height()),t.css({top:f+"px"}),t.removeClass("hidden")):t.addClass("hidden");u=r;t.width(t.parent().width()-2)}var t=this,i=t.tableTemplate.clone(),e=i.data("btt-text"),u;t.recsRequestedDownloaded=t.recsDownloaded=t.currentData.length;t.tableElement.before(i);t.tableElement.remove();t.tableElement=i;t.tableElement.before('<div class="scroll-header text-center hidden"><button type = "button" class="btn btn-danger" onclick = "$(window).scrollTop(0);"><i class="fa fa-arrow-up" aria-hidden="true"><\/i>&nbsp;'+e+'&nbsp;<i class="fa fa-arrow-up" aria-hidden="true"><\/i><\/button><\/div>');t.tableElement.infiniteScroll(t.infiniteScrollOptions);t.tableElement.on("error.infiniteScroll",function(n,i,r){console.log("Could not load: '"+r+"', "+i);t.showLoading(!1);t._disableLoading()});t.tableElement.on("request.infiniteScroll",function(){t.recsRequestedDownloaded=t.recsDownloaded+t.recsPerPage;t.showLoading(!0)});t.tableElement.on("load.infiniteScroll",function(i,r){var u=JSON.parse(r);t.currentData=t.currentData.concat(u.results);t.recsTotal=u.total_count;t.recsDownloaded=t.currentData.length;u.results.length<t.recsPerPage&&t._disableLoading();n("#lot-list-infinite-total-count").text(u.total_count);t.showLoading(!1);t.createRowsInTable(u.results);t._insertAdUnit();console.log("Loaded "+u.pn+" of "+u.pageCount+" pages. ("+t.recsDownloaded+" of "+t.recsTotal+" records)")});u=window.pageYOffset;n(window).on("scroll",function(){f()});n(window).on("resize",function(){f()});t.viewType===r.FULL&&t.tableElement.removeClass("table-striped");t.viewType===r.TILE?t.tableElement.removeClass("table-striped"):t.tableElement.addClass("table-striped");t.showLoading(!1);t.createRowsInTable(t.currentData);t._insertAdUnit()};i.prototype._insertAdUnit=function(){var u=this,n,i,t,s;if(window.googletag&&window.googletag.hibidInsertInlineAdUnit){if(i=[],e>f)for(t=1;t<e;t++)t%f==0&&o<t&&(o+=f,i.push(o+h));i.length>0&&(s=u.viewType===r.TILE?".lot-tiles>div":"tbody>tr",i.forEach(function(t){h++;n=n?n.add(u.tableElement.find(s+":nth-child("+t+")")):u.tableElement.find(s+":nth-child("+t+")")}),window.googletag.hibidInsertInlineAdUnit(n))}};i.prototype._disableLoading=function(){var n=this;n.loadComplete=!0;n.tableElement.infiniteScroll("option",{loadOnScroll:!1})};i.prototype._getTilesElement=function(){var n=this;return n.tilesElement};s={init:ut,reloadTable:ft};n.fn.lotViewSwitcherV2=et;n.fn.lotViewSwitcherV2.Constructor=i;n.LotViewSwitcherV2=i}(jQuery),function(n,t){function u(r){var u=t,e=t,o=this,f;if(arguments.length>1)for(u=new Array(arguments.length-1),f=1;f<arguments.length;f++)u[f-1]=arguments[f];return this===n&&(e=u[0],u.shift(),o=n("#lot-watch-status-"+e),o.data("eventItemId",e)),o.each(function(){var e=n(this),f=e.data("watch-status-plugin");f||e.data("watch-status-plugin",f=new i(this));r!==t&&f[r]!==t&&f[r].apply(f,u)})}function r(n){return{isWatching:n.lotStatus.isWatching,isArchived:n.lotStatus.isArchived}}var i=function(t){this.$element=n(t);this.$watchButton=this._getWatchButton();this.$unwatchButton=this._getUnwatchButton();this._update()};i.prototype._getWatchButton=function(){return this.$element.closest("#lot-"+this.$element.data("eventItemId")).add(n("#lot-details-"+this.$element.data("eventItemId"))).find(".watch-lot").not(".unwatch-lot")};i.prototype._getUnwatchButton=function(){return this.$element.closest("#lot-"+this.$element.data("eventItemId")).add(n("#lot-details-"+this.$element.data("eventItemId"))).find(".unwatch-lot")};i.prototype._update=function(){this.$watchButton.length||(this.$watchButton=this._getWatchButton());this.$unwatchButton.length||(this.$unwatchButton=this._getUnwatchButton());this.$element.data("watching")?(this.$element.removeClass("hidden"),this.$watchButton.addClass("hidden").closest(".lot-watch-container").addClass("hidden"),this.$element.data("archived")||this.$unwatchButton.removeClass("hidden").closest(".lot-unwatch-container").removeClass("hidden")):(this.$element.addClass("hidden"),this.$unwatchButton.data("open")&&this.$watchButton.removeClass("hidden").closest(".lot-watch-container").removeClass("hidden"),this.$unwatchButton.addClass("hidden").closest(".lot-unwatch-container").addClass("hidden"))};i.prototype.setStatus=function(n){this.$element.data("watching",!!n.isWatching);this.$element.data("archived",!!n.isArchived);this._update()};n.fn.watchStatus=u;n.fn.watchStatus.Constructor=i;n.watchStatus=u;n(document).on(n.lowrbEvents.BIDDING_UPDATE_EVENT,function(t,i){n.watchStatus("setStatus",i.eventItemId,r(i))});n(document).on(n.lowrbEvents.WATCH_ADDED_EVENT,function(t,i){n.watchStatus("setStatus",i.eventItemId,r(i))});n(document).on(n.lowrbEvents.WATCH_REMOVED_EVENT,function(t,i){n.watchStatus("setStatus",i.eventItemId,r(i))})}(jQuery),function(n,t,i){function st(n){h||(et[ft]("reloadTable",n.isTrigger),n.stopPropagation(),n.preventDefault())}function ct(){w.click()}function ct(){k.val("");a.addClass("hidden")}function kt(){k.val()==""?a.addClass("hidden"):a.removeClass("hidden")}function lt(){var i=n.query.load(n(location).attr("href")),r;i=i.remove("ipp").remove("cpage").remove("m");r=dt(i);location.href=t.location.pathname+r}function dt(t){var r=[],u=[],f=function(n){return n=n+"",n=encodeURIComponent(n),n.replace(/%20/g,"+")},o=function(n,t,r){if(r!=i&&r!==null&&r!==!1){var u=[f(t)];r!==!0&&(u.push("="),u.push(f(r)));n.push(u.join(""))}},e=function(t,i){var r=function(n){return!i||i==""?[n].join(""):[i,"[",n,"]"].join("")};n.each(t,function(n,t){typeof t=="object"?e(t,r(n)):o(u,r(n),t)})};return e(t.keys),u.length>0&&r.push("?"),r.push(u.join("&")),r.join("")}function v(n,t,i){return n&&n.keys&&typeof n.keys[t]!="undefined"?n.keys[t]:i}var ot;t.opener&&(t.opener=null);var r={DEFAULT:0,LOT_NUMBER:1},y=50,s="lotsperpage",at=30,p="UseInfiniteScroll",d=3650,g=n(document).find("title").text(),f=n.query.load(n(location).attr("href")),nt=v(f,"ipp",y),tt=v(f,"cpage",0),e=n("#lot-list"),gt=n("#lot-search-form").advancedSearch(),vt=e.data("totalCount"),yt=e.data("lotCount"),pt=e.data("eventId"),wt=e.data("initialData"),it=e.data("searchType"),w=n("#auction-search-submit"),rt=n(".print-catalog-link"),bt=n("#auction-header-content").attr("aria-expanded")==="false";n("#auction-header-content").collapsiblePanel({startCollapsed:n(".responsive-breakpoint").responsiveBreakpoint("xs")||bt});n('[data-toggle="popover"]').popover();var h=!1,c=!1,l=!1,o=!1,u=i,b=40,ut=n.cookie(p)==="true",ft=ut?"lotViewSwitcherV2":"lotViewSwitcher",et=n("#lot-list-view-switcher");et[ft]({type:n.LotViewSwitcher.TYPE.CATALOG,tableElement:n("#lot-list"),getDatatableOptions:function(){return f=n.query.load(n(location).attr("href")),nt=v(f,"ipp",n.cookie(s)||y),tt=v(f,"cpage",0),{paginationPrevTemplate:n("#datatables-pagination-template-prev").html(),paginationNextTemplate:n("#datatables-pagination-template-next").html(),paginationBackToTopTemplate:n("#datatables-pagination-back-to-top"),data:t[wt],ajax:{url:"/api/v1/lot/list/"+pt},autoWidth:!1,pageLength:nt,currentPage:tt,deferLoading:vt,deferRender:!0,searching:!1,ordering:!1,customParams:function(i){var r={},u={},e,a,f,v,s;n("#hide:checked").val()&&(r.hide=i.hide=n("#hide").val());!o&&n("#auction-search-query").length&&n("#auction-search-query").val().length&&(r.q=i.q=n("#auction-search-query").val(),ut&&(r.m=i.m="1"));o&&(ct(),o=!1);n("#g").length&&n("#g").val().length&&(r.g=i.g=n("#g").val());n("#cat").length&&n("#cat").val()>0&&(r.cat=i.cat=n("#cat").val());n("#sortOrder").length&&n("#sortOrder").val()!=n("#sortOrder option:first").val()&&(r.sortOrder=i.sortOrder=n("#sortOrder").val());e=n("#auto");a=e.attr("data-refreshing");a&&(f=History.getState(),f.data&&f.data.cpage>1&&(i.pn=f.data.cpage,v=n("#lot-list").bidopiaTable("datatable"),v.page.bidopiaPage(f.data.cpage)),e.removeAttr("data-refreshing"));i.pn>1&&(r.cpage=i.pn);i.ipp!=y&&(r.ipp=i.ipp);s=n.param(r);u.q=r.q;u.m=r.m;u.g=r.g;u.cat=r.cat;h||(c=!0,l?l=!1:(rt.attr("href",rt.data("printAction")+"?"+n.param(u)),History.pushState(r,g,"?"+s),typeof pSUPERFLY!="undefined"&&pSUPERFLY.virtualPage(t.location.pathname+"?"+s,g)))},columnDefs:[{targets:"_all"}],processing:!1,loadingBar:n("#lot-list-loading-bar"),createdRow:n.LotRenderer({rendererType:n.LotRenderer.RENDER_TYPE.REGULAR_CATALOG,lotViewSwitcher:this}),preDrawCallback:function(t){var u,i;l||t.bAjaxDataGet||(u=n("#lot-list").bidopiaTable("datatable"),t.json.searchType==r.LOT_NUMBER&&(i=History.getState(),i.data.searchType=r.LOT_NUMBER,c=!0,History.replaceState(i.data,i.title,i.url),u.page.bidopiaPage(t.json.pn)))},drawCallback:function(f){function h(){var i=n("#auto").data("prevent-scroll");if(i)return n("#auto").data("prevent-scroll",!1);n(t).scrollTop(u.offset().top-b)}var e=f.json,s;(it==r.LOT_NUMBER&&(it=r.DEFAULT,s=n("#auction-search-query").val().trim(),u=n('.lot-number-lead[data-lot-number^="'+s+'"]').closest("tr"),b=n(t).height()/2,t.setTimeout(h,500)),n('[data-toggle="popover"]').popover(),l||e==i)||(n(".open-lot-count").text(e.openLotCount),document.title=e.headerModel.metaTagModel.title,n('meta[property="og:title"]').attr("content",e.headerModel.metaTagModel.title),n('meta[property="og:description"]').attr("content",e.headerModel.metaTagModel.description),n("meta[name=description]").attr("content",e.headerModel.metaTagModel.description),e.recordsTotal!=yt?(n(".catalog-lot-counts").addClass("show-matching-lot-count-container"),n(".matching-lot-count").text(e.recordsTotal)):n(".catalog-lot-counts").removeClass("show-matching-lot-count-container"),e.searchType!==r.DEFAULT&&(o=!0,e.searchType=r.DEFAULT,s=n("#auction-search-query").val().trim(),u=n('.lot-number-lead[data-lot-number^="'+s+'"]').closest("tr"),b=n(t).height()/2),u||(u=n(".scroll-target")),u&&u.length&&t.setTimeout(h))}}}});ot=History.getState();ot.data.searchType===r.LOT_NUMBER&&n("#lot-list").bidopiaTable("datatable").draw();History.Adapter.bind(t,"statechange",function(){var r,t,i;if(c){c=!1;return}h=!0;r=History.getState();t=n.query.load(r.url);t.keys&&typeof t.keys.cat!="undefined"?n("#cat").val(t.keys.cat):n("#cat").val(0);t.keys&&typeof t.keys.group!="undefined"?n("#g").val(t.keys.g):n("#g").val("");t.keys&&typeof t.keys.filter!="undefined"?n("#filter").val(t.keys.filter):n("#filter").val(0);t.keys&&typeof t.keys.q!="undefined"?n("#auction-search-query").val(t.keys.q):n("#auction-search-query").val("");t.keys&&typeof(t.keys.sortOrder!=="undefined")?n("#sortOrder").val(t.keys.sortOrder):n("#sortOrder").val(n("#sortOrder option:first").val());i=n("#lot-list").bidopiaTable("datatable");t.keys&&typeof t.keys.cpage!="undefined"?i.page.bidopiaPage(t.keys.cpage).draw(!1):i.draw();h=!1});n("#lot-list").on("length.dt",function(t,i,r){n.cookie(s,r,{path:"/",expires:at})});n("#g, #cat, #hide, #sortOrder").change(st);var k=n("#auction-search-query"),a=n("#auction-search-clear"),ht=null;w.on("click",function(n){return o=!1,st(n),!1});a.on("click",function(){return ct(),w.click(),!1});k.on("keyup",function(){n("#auto").data("prevent-scroll",!1);ht&&clearTimeout(ht);setTimeout(kt,10)});n(document).on("infinite.mode.on",function(){n.cookie(p,!0,{path:"/",expires:d});n.removeCookie(s,{path:"/"});lt()});n(document).on("infinite.mode.off",function(){n.cookie(p,!1,{path:"/",expires:d});n.removeCookie(s,{path:"/"});lt()});n(document).ready(function(){n(".blink").modernBlink()})}(jQuery,window)