(function(n,t){function i(){t(n,n.jQuery)}if(n.jQuery)i();else{var r=function(){n.jQuery?i():setTimeout(r,50)};r()}})(window,function(n,t){function i(n,t){if(n)try{console.log("[Amplitude]",t)}catch(i){}}function o(n){var r=t(n),i=r.closest(".amplitude-event, .amplitude-event-class");return i.length?i[0]:null}function s(n,i){var r,u,f,c,l,s,h,e,o;try{for(r=[],u=t(i),u&&u.length&&(f=u.attr("data-lot-id"),f||(c=u.closest("[data-lot-id]"),c.length&&(f=c.attr("data-lot-id"))),f&&(l=document.getElementById("lot-"+f),l&&r.push(l)),s=u.closest('[id^="lot-"]'),s.length&&r.indexOf(s[0])<0&&r.push(s[0])),h=0;h<r.length;h++)if(e=r[h].querySelector(n),e)return(e.value||e.getAttribute("data-value")||e.textContent||"").trim();return o=document.querySelector(n),o&&(o.value||o.getAttribute("data-value")||o.textContent||"").trim()||""}catch(a){return""}}function r(n,t){for(var f=n&&n.indexOf&&n.indexOf("||")>=0?n.split("||"):n&&n.indexOf&&n.indexOf(",")>=0?n.split(","):[n],i,e,u,r=0;r<f.length;r++)if(i=(f[r]||"").trim(),i)if(e=i&&(i.charAt(0)==="#"||i.charAt(0)==="."||i.indexOf("[")>=0),e){if(u=s(i,t),u)return u}else return i;return""}function u(n){var f={},e,o,i,t,u;try{if(e=n.getAttribute("data-amplitude-props"),!e)return f;for(o=e.split(";"),i=0;i<o.length;i++)if((t=o[i].trim(),t)&&(u=t.indexOf(":"),!(u<0))){var s=t.slice(0,u).trim(),h=t.slice(u+1).trim(),c=r(h,n);s&&(f[s]=c)}}catch(l){}return f}function f(n,t,i,u){var e,f,o,s,l;try{if(!n||!t)return;if(e=n[t],!e||!e.props)return;for(f in e.props)if(Object.prototype.hasOwnProperty.call(e.props,f)){if(o=e.props[f],f==="BidAmount"&&u&&(s=h(u),s)){i[f]=s;continue}if(f==="BidType"&&u&&(l=c(u),l)){i[f]=l;continue}i[f]=typeof o=="string"?r(o,u):o}}catch(a){}}function h(n){var i,r,u,t,e,f;try{return(i=n.getAttribute("data-value"),i)?i:(r=n.querySelector(".bidValue"),r&&(u=r.getAttribute("value"),u))?u:(t=n.querySelector(".content-text"),t&&t.textContent)?(e=t.textContent.trim(),f=e.match(/[\d,]+\.?\d*/),f?f[0].replace(/,/g,""):null):null}catch(o){return null}}function c(n){try{var t=n.id;if(t){if(t.indexOf("lower-increment")>=0)return"LowerIncrement";if(t.indexOf("higher-increment")>=0)return"HigherIncrement";if(t.indexOf("minimum-amount")>=0)return"OffIncrementMinimum";if(t.indexOf("PrevValidBid")>=0)return"PreviousValidBid";if(t.indexOf("NextValidBid")>=0)return"NextValidBid";if(t.indexOf("MinimumValidBid")>=0)return"MinimumValidBid"}return null}catch(i){return null}}function e(n,i,r){var s,f,e;try{if(!n||!r)return;var u=null,h=t(r),o=h.closest('[data-lot-id], [id^="lot-"]');if(o.length&&(u=o.attr("data-lot-id"),u||(s=o.attr("id")||"",s.indexOf("lot-")===0&&(u=s.substring(4)))),u&&n[u]){f=n[u];for(e in f)Object.prototype.hasOwnProperty.call(f,e)&&(i[e]=f[e])}}catch(c){}}function l(r){function s(o){var c,s,y,b,p,l,a,k,v,h,w;if(o){if(o.classList.contains("amplitude-event")){if(c=o.getAttribute("data-amplitude-event"),c){if(s=t.extend({},r.baseProps),e(r.perItem,s,o),y=u(o),y)try{t.extend(s,y)}catch(d){}f(r.clientHints,c,s,o),i(r.debug,c+" "+JSON.stringify(s)),n.amplitude.logEvent(c,s)}return}if(o.classList.contains("amplitude-event-class"))for(b=o.getAttribute("data-amplitude-event-class")||"",p=b.split(";"),l=0;l<p.length;l++)if((a=p[l].split(":"),!(a.length<2))&&(k=a[0].trim(),v=a.slice(1).join(":").trim(),o.classList.contains(k))){if(h=t.extend({},r.baseProps),e(r.perItem,h,o),w=u(o),w)try{t.extend(h,w)}catch(d){}f(r.clientHints,v,h,o),i(r.debug,v+" "+JSON.stringify(h)),n.amplitude.logEvent(v,h);break}}}document.addEventListener("click",function(n){var t=o(n.target);t&&s(t)},!0),i(r.debug,"Amplitude handlers attached")}function a(n){function t(){try{var t=Array.isArray(n.autowire)?n.autowire:[];t.forEach(function(t){for(var f=document.querySelectorAll(t.selector),r,u=0;u<f.length;u++)(r=f[u],r.getAttribute("data-amplitude-wired")!=="1")&&(r.classList.contains("amplitude-event")||(r.classList.add("amplitude-event"),r.setAttribute("data-amplitude-event",t.eventName),i(n.debug,"[autowire] "+t.selector+" => "+t.eventName)),r.setAttribute("data-amplitude-wired","1"))})}catch(r){}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t();try{var r=new MutationObserver(function(){t()});r.observe(document.documentElement||document.body,{childList:!0,subtree:!0})}catch(u){}}n.Gap=n.Gap||{},Gap.Portal=Gap.Portal||{},Gap.Portal.UI=Gap.Portal.UI||{},Gap.Portal.UI.Amplitude={bootstrap:function(t){var u,f,e,o,h,c,s;try{if(!t||!t.enabled)return;if((t.pipeline||"").toLowerCase()!=="client-hints"){i(t.debug,"client-hints pipeline disabled");return}t.baseProps=t.baseProps||{},t.clientHints=t.clientHints||{},t.perItem=t.perItem||{},t.autowire=t.autowire||[];try{if(n.amplitude&&typeof n.amplitude.identify=="function"){var v=[{userProp:"Site Name",basePropKeys:["Site Name","SiteName"]},{userProp:"User Type",basePropKeys:["User Type","UserType"]},{userProp:"Country",basePropKeys:["Country","CountryCode"]},{userProp:"Locale",basePropKeys:["Locale"]},{userProp:"IsLoggedIn",basePropKeys:["IsLoggedIn"]}],r={},y=!1;for(u=0;u<v.length;u++){for(f=v[u],e=null,o=0;o<f.basePropKeys.length;o++)if(h=f.basePropKeys[o],t.baseProps[h]){e=t.baseProps[h];break}e&&(r[f.userProp]=e,y=!0)}if(y)if(typeof n.amplitude.Identify=="function"){c=new n.amplitude.Identify;for(s in r)r.hasOwnProperty(s)&&c.set(s,r[s]);n.amplitude.identify(c)}else n.amplitude.identify(r)}}catch(p){}l(t),a(t)}catch(p){}}}})