<div id=”crwnz-hs-connect” class=”crwnz-modal-container”>
<div class=”modal-wrapper”>
<div class=”modal-header”>
<span class=”close-modal”>CLOSE</span>
<img id=”modal-logo” src=”https://crwnzcigarillos.com/wp-content/uploads/2024/07/CRWNZ_logo_white.png” title=”Crwnz”>
<p> Sign up here to subscribe to product updates and releases. </p>
</div>
<div class=”modal-messages display-flex justify-center flex-align-center text-center”>
<div class=”success”>
<p>You’ve been successfully signed up to receive email updates, thank you!</p>
</div><div class=”failure”>
<p>Could not sign you up, please try again with the information on your government-issued photo ID.</p>
</div>
</div>
<div class=”modal-content”>
<form id=”hs-signup-form”><div class=”form-element col-half”>
<label>First name</label>
<input id=”firstname” type=”text” name=”firstname” required maxlength=”50″ autocomplete=”off”>
</div>
<div class=”form-element col-half”>
<label>Last name</label>
<input id=”lastname” type=”text” name=”lastname” required maxlength=”50″ autocomplete=”off”>
</div><div class=”form-element col-full”>
<label>Email address</label>
<input id=”email” type=”email” name=”email” id=”modal-email” required autocomplete=”off”>
</div><div class=”form-element col-third”>
<label>Birthday</label>
<select id=”bmonth” name=”bmonth” required>
<option value=””>Month</option>
</select>
</div>
<div class=”form-element col-third”>
<label> </label>
<select id=”bday” name=”bday” required>
<option value=””>Day</option>
</select>
</div>
<div class=”form-element col-third”>
<label> </label>
<select id=”byear” name=”byear” required>
<option value=””>Year</option>
</select>
</div>
<div class=”form-element col-three-fourths”>
<label>Street address</label>
<input id=”address1″ type=”text” name=”address1″ required maxlength=”100″ autocomplete=”off”>
</div>
<div class=”form-element col-one-fourth”>
<label>Apt/box</label>
<input id=”address2″ type=”text” name=”address2″ maxlength=”100″ autocomplete=”off”>
</div>
<div class=”form-element col-half”>
<label>City</label>
<input id=”city” type=”text” name=”city” required maxlength=”50″ autocomplete=”off”>
</div>
<div class=”form-element col-one-fourth”>
<label>State</label>
<select id=”state” name=”state” required>
<option value=””></option>
<option value=”AL”>Alabama</option>
<option value=”AK”>Alaska</option>
<option value=”AZ”>Arizona</option>
<option value=”AR”>Arkansas</option>
<option value=”CA”>California</option>
<option value=”CO”>Colorado</option>
<option value=”CT”>Connecticut</option>
<option value=”DE”>Delaware</option>
<option value=”DC”>District Of Columbia</option>
<option value=”FL”>Florida</option>
<option value=”GA”>Georgia</option>
<option value=”HI”>Hawaii</option>
<option value=”ID”>Idaho</option>
<option value=”IL”>Illinois</option>
<option value=”IN”>Indiana</option>
<option value=”IA”>Iowa</option>
<option value=”KS”>Kansas</option>
<option value=”KY”>Kentucky</option>
<option value=”LA”>Louisiana</option>
<option value=”ME”>Maine</option>
<option value=”MD”>Maryland</option>
<option value=”MA”>Massachusetts</option>
<option value=”MI”>Michigan</option>
<option value=”MN”>Minnesota</option>
<option value=”MS”>Mississippi</option>
<option value=”MO”>Missouri</option>
<option value=”MT”>Montana</option>
<option value=”NE”>Nebraska</option>
<option value=”NV”>Nevada</option>
<option value=”NH”>New Hampshire</option>
<option value=”NJ”>New Jersey</option>
<option value=”NM”>New Mexico</option>
<option value=”NY”>New York</option>
<option value=”NC”>North Carolina</option>
<option value=”ND”>North Dakota</option>
<option value=”OH”>Ohio</option>
<option value=”OK”>Oklahoma</option>
<option value=”OR”>Oregon</option>
<option value=”PA”>Pennsylvania</option>
<option value=”RI”>Rhode Island</option>
<option value=”SC”>South Carolina</option>
<option value=”SD”>South Dakota</option>
<option value=”TN”>Tennessee</option>
<option value=”TX”>Texas</option>
<option value=”UT”>Utah</option>
<option value=”VT”>Vermont</option>
<option value=”VA”>Virginia</option>
<option value=”WA”>Washington</option>
<option value=”WV”>West Virginia</option>
<option value=”WI”>Wisconsin</option>
<option value=”WY”>Wyoming</option>
<option value=”AS”>American Samoa</option>
<option value=”GU”>Guam</option>
<option value=”PR”>Puerto Rico</option>
<option value=”VI”>Virgin Islands</option>
</select>
</div>
<div class=”form-element col-one-fourth”>
<label>ZIP Code</label>
<input id=”zipcode” type=”text” name=”zipcode” required pattern=”[0-9]{5}” maxlength=”5″>
</div>
<div class=”buttons”>
<button type=”submit” id=”hs-signup-submit” class=”crwnz-button subscribe-button”>SUBSCRIBE</button>
</div>
</form>
</div><!– .modal-content–>
</div><!–modal-wrapper–>
</div><!– crwnz-modal-container –>
<noscript><meta http-equiv=”refresh” content=”0;url=https://agechecker.net/noscript”></noscript>
<script>
// swisher email signup functions
document.addEventListener(‘DOMContentLoaded’, function() {
const subscribeModal = document.getElementById(“crwnz-hs-connect”);
const subscribeForm = document.getElementById(“hs-signup-form”);
const success = subscribeModal.querySelector(“.success”);
const failed = subscribeModal.querySelector(“.failure”);
const openModal = document.querySelectorAll(“.modal-trigger”);
const closeModal = document.querySelectorAll(“.close-modal”);
const key = ‘wjoG0TuZPwEVZitBgcjvKwp0wKSWhnGT’;
(function(w,d) {
let config = {
autoload: false,
onready: function() {
// AgeChecker instance for sign up form on “New Account” page
window.AgeChecker = AgeCheckerAPI.createInstance({
key,
mode: “manual”,
});
}
};
w.AgeCheckerConfig=config;if(config.path&&(w.location.pathname+w.location.search).indexOf(config.path)) return;
var h=d.getElementsByTagName(“head”)[0];var a=d.createElement(“script”);a.src=”https://cdn.agechecker.net/static/popup/v1/popup.js”;a.crossOrigin=”anonymous”;
a.onerror=function(a){w.location.href=”https://agechecker.net/loaderror”;};h.insertBefore(a,h.firstChild);
})(window, document);
// populate months menu
const bmonth = subscribeForm.querySelector(“select[name=bmonth]”);
const months = [‘Jan’,’Feb’,’Mar’,’Apr’,’May’,’Jun’,’Jul’,’Aug’,’Sep’,’Oct’,’Nov’,’Dec’];
months.forEach(function(month, i) {
let option = document.createElement(“option”);
option.value = i + 1;
option.textContent = month;
bmonth.appendChild(option);
});
// populate days menu
const bday = subscribeForm.querySelector(“select[name=bday]”);
for (let i = 0; i < 31; i++) {
let option = document.createElement(“option”);
option.value = i + 1;
option.textContent = i + 1;
bday.appendChild(option);
}
// populate years menu
const byear = subscribeForm.querySelector(“select[name=byear]”);
const currentYear = new Date().getFullYear();
for (let i = currentYear – 21; i >= currentYear – 105; i–) {
let option = document.createElement(“option”);
option.value = i;
option.textContent = i;
byear.appendChild(option);
}
// handle click on a button/link to open the modal
openModal.forEach(function(element) {
element.addEventListener(‘click’, function(e) {
e.preventDefault();
subscribeModal.classList.add(“modal-open”);
});
});
// close modal when backdrop clicked
closeModal.forEach(function(element) {
element.addEventListener(‘click’, function(e) {
e.preventDefault();
subscribeModal.classList.remove(“modal-open”);
});
});
subscribeForm.addEventListener(‘submit’, function(e) {
e.preventDefault();
verifyCustomerAge();
});
async function verifyCustomerAge() {
const email = document.querySelector(‘#email’).value;
const firstname = document.querySelector(‘#firstname’).value;
const lastname = document.querySelector(‘#lastname’).value;
const address1 = document.querySelector(‘#address1’).value;
const city = document.querySelector(‘#city’).value;
const state = document.querySelector(‘#state’).value;
const zipcode = document.querySelector(‘#zipcode’).value;
const bmonth = document.querySelector(‘#bmonth’).value;
const bday = document.querySelector(‘#bday’).value;
const byear = document.querySelector(‘#byear’).value;
const body = {
sitename: ‘kayak’,
submission_url: ‘https://kayakdip.com//’,
email,
firstname,
lastname,
address1,
city,
state,
zipcode,
bmonth,
bday,
byear
};
const extraArgs = [];
extraArgs.push({name: ‘extra_prop1’, value: ‘extra_val1’});
extraArgs.forEach(arg => {
body[arg.name] = arg.value;
});
try {
const acResponse = await fetch(“https://rg-ecomm-services-dev-001.azurewebsites.net/api/Swisher-Age-Verify?”, {
method: ‘POST’,
headers: {‘Content-Type’: ‘application/json’},
body: JSON.stringify(body)
});
const response = await acResponse.json();
console.log(`Response: ${JSON.stringify(response)}`);
if (response.verified === true) {
console.log(‘Verified!’);
subscribeForm.style.display = “none”;
failed.style.display = “none”;
success.style.display = “block”;
} else {
success.style.display = “none”;
window.AgeChecker.show(response.uuid);
}
} catch(error) {
success.style.display = “none”;
failed.style.display = “block”;
console.error(`There was an error in the verification: ${error}`);
}
}
window.scrollTo(0, 0);
});