(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function n(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}var a=window.ag_stepped.age,o=n((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"init",(function(){t.form.setAttribute("novalidate",!0),t.inputSubmit.style.display="none",t.wrapper.classList.add("age-gate--stepped"),t.inputYear.addEventListener("keyup",t.handleYear),t.inputMonth.addEventListener("keyup",t.handleMonth)})),i(this,"handleYear",(function(e){t.inputYear.value.length===t.inputYear.maxLength&&(parseInt(t.inputYear.value)!==t.minYear?t.passed||(t.passed=!0,t.inputDay.value="01",t.inputMonth.value="01",t.form.requestSubmit()):(t.inputMonth.value="",t.inputDay.value="",t.inputMonth.focus()))})),i(this,"handleMonth",(function(e){t.inputMonth.value.length===t.inputMonth.maxLength&&(t.inputMonth.value<t.minMonth?(t.inputDay.value="01",t.passed||t.form.requestSubmit()):(t.inputSubmit.style.display="",t.wrapper.classList.remove("age-gate--stepped"),t.inputYear.removeEventListener("keyup",t.handleYear),t.inputMonth.removeEventListener("keyup",t.handleMonth),t.inputDay.value="",t.inputDay.focus()))}));var n=new Date;n.setFullYear(n.getFullYear()-a);var r=n.toISOString().split("T").slice(0,1)[0].split("-");this.form=document.querySelector(".age-gate-form, .age-gate__form"),"requestSubmit"in this.form!=!1&&(this.passed=!1,this.inputDay=this.form.querySelector('[name="age_gate[d]"]'),this.inputMonth=this.form.querySelector('[name="age_gate[m]"]'),this.inputYear=this.form.querySelector('[name="age_gate[y]"]'),this.inputSubmit=this.form.querySelector(".age-gate-submit, .age-gate__submit"),this.elements=this.form.querySelector(".age-gate-form-elements, .age-gate__form-elements"),this.wrapper=this.form.parentNode,this.inputDay.tabIndex="-1",this.inputMonth.tabIndex="-1",this.current="y",this.userYear=0,this.userMonth=0,this.userDay=0,this.minYear=parseInt(r[0]),this.minMonth=parseInt(r[1]),this.minDay=parseInt(r[2]),this.init())}));window.addEventListener("age_gate_shown",(function(){new o}))})();