if(typeof jQuery !== 'undefined') {if(typeof Cookies==='undefined'){/*! js-cookie v2.2.0 | MIT */
!function(e){var n=!1;if('function'==typeof define&&define.amd&&(define(e),n=!0),'object'==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}
return n}
function n(o){function t(n,r,i){var c;if('undefined'!=typeof document){if(arguments.length>1){if('number'==typeof(i=e({path:'/'},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}
i.expires=i.expires?i.expires.toUTCString():'';try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}
r=o.write?o.write(r,n):encodeURIComponent(r+'').replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(n+'')).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s='';for(var f in i)i[f]&&(s+='; '+f,!0!==i[f]&&(s+='='+i[f]));return document.cookie=n+'='+r+s}
n||(c={});for(var p=document.cookie?document.cookie.split('; '):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split('='),C=l.slice(1).join('=');this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var m=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,m):o(C,m)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}
if(n===m){c=C;break}
n||(c[m]=C)}catch(e){}}
return c}}
return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,'',e(o,{expires:-1}))},t.withConverter=n,t}
return n(function(){})})}
var PDGData=(function($){var t={};t.key='pdg_lead_stage';t.getData=function(){var item=localStorage.getItem(t.key);if(item===null){return null}
return JSON.parse(item)};t.setData=function(data){localStorage.setItem(t.key,JSON.stringify(data))};t.clearData=function(){localStorage.removeItem(t.key)};return t})(jQuery);var PDG=(function($){var t={};t.base_url=null;t.ignore_ids=[];t.positions=[];t.position_requests=[];t.critical_path=null;t.tracks=[];t.url=null;t.getBaseUrl=function(){var self=$('script[src*="pdg/v1/scripts"]');var pathArray=self.attr('src').split('/');var protocol=pathArray[0];var host=pathArray[2];t.base_url=protocol+'//'+host};t.getUrlParameter=function(name){name=name.replace(/[\[]/,'\\[').replace(/[\]]/,'\\]');var regex=new RegExp('[\\?&]'+name+'=([^&#]*)');var results=regex.exec(location.search);return results===null?'':decodeURIComponent(results[1].replace(/\+/g,' '))};t.collectPositions=function(){$('[data-content-position]').each(function(){var attr=$(this).data('content-position');if(attr!==''){t.positions.push(attr)}})};t.getPath=function(){t.critical_path=null;var lead_stage=PDGData.getData();if(lead_stage!==null){t.critical_path=lead_stage}};t.getTracks=function(){return $.ajax(t.base_url+'/wp-json/pdg/v1/conversation_track',{method:'POST',global:!1,data:{lead_stage:t.critical_path,},})};t.getPositions=function(result){t.tracks=result;t.position_requests=t.positions;var position=t.position_requests.shift();if(position){t.getContentPosition(position)}};t.getContentPosition=function(slug){return $.ajax(t.base_url+'/wp-json/pdg/v1/search',{method:'GET',global:!1,data:{content_position:slug,tracks:t.tracks,url:t.url,ignore_ids:t.ignore_ids,},success:function(result){if(result.hasOwnProperty('results')){result=result.results}
var position_element=$('[data-content-position='+slug+']');t.positionCallback(slug,position_element,result);t.dispatchEvent('pdg_position_loaded',{slug:slug,position_element:position_element});var position=t.position_requests.shift();if(position){t.getContentPosition(position)}else{t.dispatchEvent('pdg_all_positions_loaded')}},})};t.positionCallback=function(content_position,position_element,html){$(position_element).html(html);var serial_numbers=[];$('div[data-id]',position_element).each(function(){if($(this).data('id')===''){return}
var offer_data=$(this).data();t.ignore_ids.push(offer_data.id);serial_numbers.push(offer_data.serial)});t.loadPositionCallback(content_position,position_element);t.trackDisplay(serial_numbers)};t.loadPositionCallback=function(content_position,position_element){return null};t.getUrl=function(){t.url=window.location.origin+window.location.pathname+window.location.hash};t.trackDisplay=function(serial_numbers){return;for(var i in serial_numbers){if(!serial_numbers.hasOwnProperty(i)){return}
$.ajax(t.base_url+'/wp-admin/admin-ajax.php',{method:'POST',global:!1,data:{action:'pdg_track_event',type:'display',serial_number:serial_numbers[i],source:'Content Position',},})}};t.trackView=function(){$.ajax(t.base_url+'/wp-json/pdg/v1/track_event',{method:'GET',global:!1,data:{url:t.url,},})};t.offerData=function(){$.ajax(t.base_url+'/wp-admin/admin-ajax.php',{method:'POST',global:!1,data:{action:'pdg_offer_data',url:t.url,},success:function(result){},})};t.dispatchEvent=function(event_name,args,element){if(!element){element=window}
var event=document.createEvent('CustomEvent');event.initCustomEvent(event_name,!0,!0,args);element.dispatchEvent(event)};t.init=function(){t.collectPositions();t.getBaseUrl();t.getUrl();if(window.PDGTrackViews===undefined||window.PDGTrackViews!==!1){t.trackView()}
if(!t.positions.length){return}
t.getPath();if(t.critical_path!==null&&Object.keys(t.critical_path).length){t.getTracks().then(t.getPositions)}else{t.getPositions([])}};return t})(jQuery);jQuery(document).ready(function(){PDG.init()});var Fulfillment=(function($){var t={};t.base_url='';t.getBaseUrl=function(){if(t.base_url){return t.base_url}
var self=$('script[src*="pdg/v1/scripts"]');var pathArray=self.attr('src').split('/');var protocol=pathArray[0];var host=pathArray[2];t.base_url=protocol+'//'+host;return t.base_url};t.runMarketo=function(data){var options={url:window.location.href,email:data.form.vals().Email,};if(data.lead_id!==null&&data.lead_id!==''){options.lead_id=data.lead_id}
t.sendFulfillment(t.base_url+'/wp-json/pdg/v1/marketo_fulfillment_send',options)};t.runEloqua=function(data){var options={url:window.location.href,};if(data.lead_id===null){options.email=MIT.getEmailAddress()}else{options.lead_id=data.lead_id}
t.sendFulfillment(t.base_url+'/wp-json/pdg/v1/eloqua_fulfillment_send',options)};t.sendFulfillment=function(url,data){var sent=!1;if(navigator&&navigator.sendBeacon){sent=navigator.sendBeacon(url,t.toFormData(data))}
if(!sent){$.post(url,data).done(function(data){})}};t.toFormData=function(data){var formData=new FormData();Object.keys(data).forEach(function(key){formData.append(key,data[key])});return formData}
t.init=function(){t.base_url=t.getBaseUrl();window.addEventListener('marketo_form_success',function(e){t.runMarketo({form:e.detail.form,form_id:e.detail.form,lead_id:e.detail.lead_id})});window.addEventListener('eloqua_form_success',function(e){t.runEloqua(e.detail)})};return t})(jQuery);jQuery(function(){Fulfillment.init()});var MarketoCleanup=(function($){var t={};t.cleanSelects=function(){$('select.mktoField option[value=""]').text('')};t.init=function(){$('#mktoForms2BaseStyle, #mktoForms2ThemeStyle, .mktoForm style').remove();$('.mktoForm [style], .mktoForm').removeAttr('style');var rows=$('.mktoFormRow');$('input.mktoField[type=hidden]').closest('.mktoFormRow').addClass('mktoFormRow--hidden');$('.mktoForm fieldset').closest('.mktoFormRow').addClass('mktoFormRow--fieldset');rows.not('.mktoFormRow--hidden, .mktoFormRow--fieldset').each(function(){var row=$(this);var fields=$('.mktoFormCol',this);var count_classes=['mktoFormRow--count-0','mktoFormRow--count-1','mktoFormRow--count-2','mktoFormRow--count-3','mktoFormRow--count-4','mktoFormRow--heading'];row.removeClass(count_classes.join(' ')).addClass('mktoFormRow--count-'+fields.length);if(!$('input, select, textarea, .mktoPlaceholder',this).length){row.addClass('mktoFormRow--heading')}});$('#emailOptin').closest('.mktoFormRow').addClass('mktoFormRow--optin');$('#Free_Trial_Opt_In__c').closest('.mktoFormRow').addClass('mktoFormRow--optin');$('select[multiple]').closest('.mktoFormRow').addClass('mktoFormRow--multi-select');t.cleanSelects();$('input.mktoField').attr('placeholder','');var textareas=$('textarea.mktoField');textareas.parents('.mktoFieldWrap').addClass('label-static');textareas.closest('.mktoFormCol').addClass('no-border');$('.mktoCheckboxList').parents('.mktoFieldWrap').addClass('label-basic checkbox-list').closest('.mktoFormCol').addClass('mktoFormCol--no-line');$('.mktoLabel').each(function(){var label=$(this);var html=label.html();html=html.replace(/\\n/g,'<br />');label.html(html)});$('.mktoField').not('[type=hidden]').each(function(){var name=$(this).attr('name');$(this).closest('.mktoFormCol').addClass('mktoFormCol--'+name);$(this).closest('.mktoFormRow').addClass(name)});var forms=$('form[id^=mktoForm]');forms.on('change','select.mktoField',function(e){setTimeout(t.cleanSelects,100)});var style_blocks=$('head style');style_blocks.each(function(){var style_block=$(this);if(style_block.text().indexOf('.mktoForm')!==-1){style_block.remove()}})};return t})(jQuery);var MarketoErrors=(function(){var t={};t.errors={};t.addError=function(key,message){t.errors[key]=message};t.removeError=function(key){delete t.errors[key]};t.hasErrors=function(){for(var key in t.errors){if(t.errors.hasOwnProperty(key)){return!0}}
return!1};t.init=function(){t.errors={}};return t})();var MarketoData=(function($){var t={};t.query_key='marketo_params';t.fetchData=function(key,fields,callback){$.post(MarketoOversight.getBaseUrl()+'/wp-json/marketo/v1/get_fields?_='+new Date().getTime()).done(function(data){var item={time:Date.now(),fields:data,};if(data.success!==!1){localStorage.setItem(key,JSON.stringify(item))}
t.sendData(item,callback)})};t.getStorage=function(key){var item=localStorage.getItem(key);if(item===null){return null}
return JSON.parse(item)};t.getData=function(key,fields,callback){var item=t.getStorage(key);if(t.dataIsFresh(item)){t.sendData(item,callback)}else{t.fetchData(key,fields,callback)}};t.dataIsFresh=function(item){if(item===null){return!1}
var time=Date.now();return(time-item.time<=900000)};t.clearData=function(key){localStorage.removeItem(key)};t.sendData=function(data,callback){callback(data.fields)};return t})(jQuery);var Marketo=(function($){var t={};t.form_data={};t.form=null;t.content_offer='';t.content_offer_field='';t.lead_source='';t.redirect_callback=null;t.redirect_url=null;t.invalid_domains=[];t.cta_label='';t.lead_id=null;t.strip_styles=!0;t.fixCheckboxValidation=function(form){form.onValidate(function(native){var formEl=form.getFormElem()[0],topInvalid=formEl.querySelector('.mktoInvalid'),topInvalidCheckbox=formEl.querySelector('.mktoInvalid.mktoCheckboxList'),errorMessage='This field is required.';if(!native&&topInvalidCheckbox===topInvalid){form.showErrorMessage(errorMessage,MktoForms2.$(topInvalidCheckbox))}})};t.checkEmail=function(form){form.onValidate(function(){t.validateBusinessEmail(form)});$('#Email').on('blur',function(){t.validateBusinessEmail(form)})};t.validateBusinessEmail=function(form){var email=form.vals().Email;if(email){if(!t.isGoodEmail(email)){form.submitable(!1);var emailElem=form.getFormElem().find('#Email');form.showErrorMessage('Please use a business email.',emailElem)}else{form.submitable(!0)}}};t.isGoodEmail=function(email){var invalidDomains=t.invalid_domains;for(var i=0;i<invalidDomains.length;i++){var domain=invalidDomains[i].trim();if(email.indexOf(domain)!==-1){return!1}}
return!0};t.prefillCallback=function(mkt_usr,form){var form_values={};var lead_id=null;if(mkt_usr!==undefined){lead_id=mkt_usr.id;if(t.hasOwnProperty('prefill_lp')){for(var m in mkt_usr){if(mkt_usr.hasOwnProperty(m)&&mkt_usr[m]!==''){form_values[m]=mkt_usr[m]}}}else{for(var i in t.prefill_fields){if(t.prefill_fields.hasOwnProperty(i)&&mkt_usr.hasOwnProperty(t.prefill_fields[i])){form_values[i]=mkt_usr[t.prefill_fields[i]]}}}}
t.lead_id=lead_id;form.vals(form_values);var lead_stage={track:'',stage:'',};if(form_values.hasOwnProperty('ConversationTrack')){lead_stage.track=form_values.ConversationTrack}
if(form_values.hasOwnProperty('LQS')){lead_stage.stage=form_values.LQS}
if(lead_stage.track!==''||lead_stage.stage!==''){PDGData.setData(lead_stage)}
if(t.strip_styles===1){MarketoCleanup.init()}
t.checkEmail(form);t.fixCheckboxValidation(form);t.dispatchEvent('marketo_form_prefill',{form:form,form_values:form_values,form_id:form.getId(),user:mkt_usr,})};t.getMainDomain=function(){var host=window.location.host;var host_parts=host.split('.');if(host_parts.length<=2){return host}
host_parts=host_parts.slice(-2);return host_parts.join('.')};t.prefill=function(form){if(t.hasOwnProperty('prefill_lp')){var DTO=new SimpleDTO({domain:t.getMainDomain(),dataSrc:t.prefill_lp,debug:!0,mode:'receive',cb:function(instance){var mktoFields=DTO.getGlobal()['mktoPreFillFields'];t.prefillCallback(mktoFields,form)},})}else{MarketoData.getData('prefill_fields',null,function(data){var mkt_usr;var mkt_obj=data;if(typeof data!=='object'){mkt_obj=$.parseJSON(data)}
var status='false';if(mkt_obj!==null){status=mkt_obj.success}
if(status===!0){var mkt_array=mkt_obj.result;mkt_usr=mkt_array[0]}
t.prefillCallback(mkt_usr,form)})}};t.collectData=function(fields){for(var i in fields){t.form_data[i]=fields[i]}};t.onValidate=function(form){form.onValidate(function(){if(MarketoErrors.hasErrors()){form.submittable(!1)}else{form.submittable(!0)}})};t.skipStep2=function(){return!1};t.formSuccess=function(form){MarketoData.clearData('prefill_fields');var values=form.getValues();t.collectData(values);var dataLayer=window.dataLayer=window.dataLayer||[];if(typeof ga!=='undefined'){ga('send','event','MarketoForm','submit',form.getId().toString())}
dataLayer.push({'event':'mkto.form.submit','mkto.form.id':form.getId(),'mkto.form.values':form.getValues(),})};t.dispatchEvent=function(event_name,args,element){if(!element){element=window}
var event=document.createEvent('CustomEvent');event.initCustomEvent(event_name,!0,!0,args);element.dispatchEvent(event)};t.init=function(options){if(options.redirect_url){t.redirect_url=options.redirect_url}
if(options.redirect_callback){t.redirect_callback=options.redirect_callback}
if(options.prefill_fields){t.prefill_fields=options.prefill_fields}
if(options.prefill_lp){t.prefill_lp=options.prefill_lp}
if(options.lead_source){t.lead_source=options.lead_source}
if(options.content_offer){t.content_offer=options.content_offer}else{t.content_offer='None'}
if(options.content_offer_field){t.content_offer_field=options.content_offer_field}
if(options.cta_label){t.cta_label=options.cta_label}
if(options.strip_styles){t.strip_styles=parseInt(options.strip_styles)}
t.form_id=options.form_id;t.invalid_domains=options.invalid_domains;MktoForms2.loadForm('//'+options.marketo_url,options.marketo_id,options.form_id,function(form){t.form=form;t.dispatchEvent('marketo_form_load',{form:form,form_id:form.getId()});if(t.strip_styles===1){MarketoCleanup.init()}
if(t.cta_label!==''){$('button[type=submit]',form.getFormElem()).text(t.cta_label)}
if(options.prefill){t.prefill(form)}
if(t.content_offer_field!==''){var vals={};vals[t.content_offer_field]=t.content_offer;vals[t.content_offer_field.replace('Last_','Original_')]=t.content_offer;form.vals(vals)}
t.onValidate(form);form.onSuccess(function(){t.formSuccess(form);t.dispatchEvent('marketo_form_success',{form:form,form_id:form.getId(),lead_id:t.lead_id});var wait=500;setTimeout(function(){if(t.redirect_url!==null){window.location=t.redirect_url}
if(t.redirect_callback!==null){window[t.redirect_callback](form)}},wait);return!1});t.dispatchEvent('marketo_form_post_load',{form:form,form_id:form.getId()})})};return t})(jQuery);var MarketoForm=(function(){var t={};t.queue=[];t.loading=!1;t.enqueueScript=function(forms_url){if(t.loading===!0){return}
t.loading=!0;jQuery.getScript(forms_url,t.runQueue)};t.runQueue=function(){for(var i in t.queue){if(t.queue.hasOwnProperty(i)){t.callForm(t.queue[i])}}};t.addForm=function(options,forms_url){if(typeof MktoForms2!=='undefined'){t.callForm(options);return}
t.queue.push(options);t.enqueueScript(forms_url)};t.callForm=function(options){var marketo_class=Object.assign({},Marketo);marketo_class.init(options)};return t})();var MarketoOversight=(function($){var t={};t.base_url=null;t.getBaseUrl=function(){if(t.base_url){return t.base_url}
var self=$('script[src*="pdg/v1/scripts"]');var pathArray=self.attr('src').split('/');var protocol=pathArray[0];var host=pathArray[2];t.base_url=protocol+'//'+host;return t.base_url};t.getUrl=function(){return window.location.origin+window.location.pathname};t.addForm=function(el){var form_id=el.data('marketo-form-id');if(window.pdgMktoFormScriptsLoaded===!0){Marketo.dispatchEvent('pdg_load_mkto_form',{form_id:form_id});return}
var mobile_id=el.data('marketo-mobile-form-id');var redirect_url=el.data('marketo-redirect-url');var success_callback=el.data('marketo-success-callback');var mobile_redirect_url=el.data('marketo-mobile-redirect-url');var mobile_success_callback=el.data('marketo-mobile-success-callback');var submit_cta=el.data('marketo-cta-label');var url=t.getUrl();if(form_id===undefined){return!1}
var script_url=MarketoOversight.getBaseUrl()+'/form-script/?form_id='+form_id;if(mobile_id!==undefined){script_url+='&mobile_form_id='+mobile_id}
if(redirect_url!==undefined){script_url+='&redirect_url='+encodeURIComponent(redirect_url)}
if(success_callback!==undefined){script_url+='&success_callback='+encodeURIComponent(success_callback)}
if(mobile_redirect_url!==undefined){script_url+='&mobile_redirect_url='+encodeURIComponent(mobile_redirect_url)}
if(mobile_success_callback!==undefined){script_url+='&mobile_success_callback='+encodeURIComponent(mobile_success_callback)}
if(submit_cta!==undefined){script_url+='&submit_cta='+encodeURIComponent(submit_cta)}
if(url!==undefined){script_url+='&url='+encodeURIComponent(url)}
el.html('<form id="mktoForm_'+form_id+'"></form>');$.getScript(script_url,function(data,textStatus,jqxhr){})};t.init=function(){var forms=$('[data-marketo-form-id]');if(!forms.length){return}
t.getBaseUrl();forms.each(function(){t.addForm($(this))})};return t})(jQuery);jQuery(document).ready(function(){MarketoOversight.init()});function SimpleDTO(a){var e=Function.prototype.call.bind(Array.prototype.slice);try{a.debug&&console.log('SimpleDTO: Unifying domains '+[document.domain,a.domain].join(', ')),document.domain=a.domain}catch(b){throw 'SimpleDTO: Domain unification error, domain: '+a.domain}
if('receive'===a.mode){var c=document.createElement('iframe');this.setSource=function(b){c.src=b};this.getSource=function(){return d};c.addEventListener('load',function(){this.data||this.src?(a.debug&&console.log('SimpleDTO: running callback'),a.cb&&a.cb.call(this,f)):console.warn('SimpleDTO: skipping load event due to empty data src or callback')});c.setAttribute('data-transfer-object','true');[['visibility','hidden'],['position','absolute'],['height','0']].forEach(function(b){c.style.setProperty.apply(c.style,b)});var d=document.createElement('a');d.href=a.dataSrc||'';a.noReplaceQuery||(d.search=document.location.search);window.__mktTokVal&&(d.search+=(1<d.search.length?'&':'')+['mkt_tok',window.__mktTokVal].join('='));a.noInit||this.setSource(d.href);document.body.appendChild(c)}
var f=this;return{getGlobal:function(){return c.contentWindow},cleanup:function(){var b=c.contentWindow.frameElement;b.parentNode.removeChild(b)},parse:function(b){b=document.querySelector('.dto-xml[data-field-collection="'+b+'"]').text;b=(new DOMParser()).parseFromString(b,'application/xml');var a=b.querySelector('mktoPreFillFields');a=a.getAttribute('varName')||a.tagName;var c={};e(b.querySelectorAll('mktoPreFillFields mktoField')).forEach(function(a){c[a.getAttribute('inputName')]=a.textContent});return self[a]=c},}}
window.SimpleDTO=SimpleDTO;!function(){function e(e){return e&&e.__esModule?e.default:e}String.prototype.padStart||Object.defineProperty(String.prototype,"padStart",{configurable:!0,writable:!0,value:function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}});var t={};function r(e){return e<10?"0".concat(e):e}function n(){var e,t,n,a,i=new Date,o=r(i.getUTCMonth()+1),s=r(i.getUTCDate()),u=(t=r((e=i).getUTCHours()),n=r(e.getUTCMinutes()),a=r(e.getUTCSeconds()),"".concat(t,":").concat(n,":").concat(a));return"".concat(i.getUTCFullYear(),"-").concat(o,"-").concat(s,"T").concat(u,"Z")}function a(e){return window.fetch(e,{method:"GET"}).then((function(e){return e.json()}))}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new FormData;return Object.keys(e).forEach((function(n){var a=n;t&&(a="".concat(t,"[").concat(n,"]")),r.append(a,e[n])})),r}function o(r,n){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;navigator&&navigator.sendBeacon&&(o=navigator.sendBeacon(r,i(n,a))),o||(a&&(n=e(t)({},a,n)),jQuery.ajax(r,{method:"POST",global:!1,data:n}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r;return e};var s=function(){var e={send_result:!0,start_time:null,multiTrackStartTime:function(){return n()},submitTime:function(){return n()}};return e.getDevice=function(){return e=navigator.userAgent,/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"Tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"Mobile":"Desktop";var e},e.generateUUID=function(){return"ANN"+Math.random().toString(36).substring(2,9)+Math.random().toString(36).substring(2,3)+Math.random().toString(36).substring(2,9)},e.getFieldValueFromSet=function(e,t){var r="",n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value,c=t?"#".concat(t,' [name="').concat(u,'"]'):'[name="'.concat(u,'"]'),l=document.querySelectorAll(c);if(l&&l.length){var f=!0,m=!1,d=void 0;try{for(var g,h=l.values()[Symbol.iterator]();!(f=(g=h.next()).done);f=!0){var v=g.value;if(""!==v.value){r=v.value;break}}}catch(e){m=!0,d=e}finally{try{f||null==h.return||h.return()}finally{if(m)throw d}}}if(""!==r)break}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r},e.getEmailAddress=function(t){return e.getFieldValueFromSet(["Email","email","EmailAddress","emailAddress","email_address"],t)},e.getFormCount=function(t){return e.getFieldValueFromSet(["formCount","FormCount","formcount","form_count"],t)},e.getContentOffer=function(){return null!==window.MITMap.settings.offer&&window.MITMap.settings.offer.hasOwnProperty("serial_number")?window.MITMap.settings.offer.serial_number:"undefined"!=typeof pdg_vars&&pdg_vars.hasOwnProperty("serial_number")?pdg_vars.serial_number:"none"},e.getData=function(t){return{email_address:e.getEmailAddress(t),uuid:e.generateUUID(),interaction_timestamp:e.submitTime(),visit_timestamp:e.start_time,device:e.getDevice(),form:"Formfill",form_count:e.getFormCount(t),content_offer_serial:e.getContentOffer(),action_url:window.location.href,previous_url:MITData.getPreviousUrl(),referrer_url:MITData.getReferrerUrl(),query_params:JSON.stringify(MITData.getAllParameters())}},e.save=function(t,r){r||(r=!1),!1!==e.send_result&&!0!==r?(window.MITMap.settings&&window.MITMap.settings.nonce&&(t.nonce=window.MITMap.settings.nonce),o(window.MITMap.base_url+"/wp-json/mit/v1/save_mit_data",t,"data")):console.table(t)},e.debug=function(){window.MITMap.debug()},e.run=function(t,r){t||(t=!1);var n=e.getData(r);window.MITMap.run((function(r){Object.values(r).forEach((function(e){n[e.mit_name]=e.value})),"function"==typeof window.mit_data_filter&&(n=window.mit_data_filter(n)),e.save(n,t)}),null,r)},e.test=function(t){e.run(!0,t)},e.init=function(){e.start_time||(e.start_time=e.multiTrackStartTime())},e},u=function(){var e={activeForm:null,forms:{},settings:null,results:{},callback:null,callback_options:{},base_url:"",requestedSettings:!1,settingsLoaded:!1,runFormCallback:function(t){var r=e.results;t&&e.forms[t]&&"function"==typeof e.forms[t].callback&&(r=e.forms[t].results,e.forms[t].callback(r,e.forms[t].callbackArgs),e.forms[t].callback=null,e.forms[t].callbackArgs=null),"function"==typeof e.callback&&(e.callback(r,e.callback_options),e.callback=null,e.callback_options=null)},cleanupRule:function(e){return e?("string"!=typeof e&&(e=e.toString()),e.toLowerCase().replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/^,|,$/g,"").replace(/^\s+|\s+$/g,"").split(",")):[""]},checkRule:function(t){var r="";switch(t.type){case"parameter":r=window.MITData.getParameter(t.parameter);break;case"referrer":r=window.MITData.getReferrerUrl();break;case"previous_url":r=window.MITData.getPreviousUrl();break;case"current_url":r=window.location.href}if("string"!=typeof r)return!1;r=r.toLowerCase();var n=e.cleanupRule(t.matches||"");switch(t.operation){case"equals":return n.includes(r);case"not-equals":return!n.includes(r);case"contains":return void 0!==n.find((function(e){if(e.length&&-1!==r.indexOf(e))return!0}));case"not-contains":return void 0===n.find((function(e){if(e.length&&-1!==r.indexOf(e))return!0}));case"is-set":return""!==r;case"is-not-set":return""===r}return!1},setResultValue:function(t,r,n){n&&e.forms[n]&&(e.forms[n].results[t.mit_name]={mit_name:t.mit_name,field_name:t.field_name,value:r}),e.results[t.mit_name]={mit_name:t.mit_name,field_name:t.field_name,value:r}},processParameter:function(t,r){var n=window.MITData.getParameter(t.parameter_name);null!==n&&""!==n&&e.setResultValue(t,n,r)},processSetting:function(t,r){if(t.rules&&t.rules.length){var n=t.rules;Object.keys(n).every((function(t){return!0===e.checkRule(n[t])}))&&e.setResultValue(t,t.mapped_value,r)}},processDefault:function(t,r){var n=!0;if((r&&e.forms[r]&&e.forms[r].results[t.mit_name]||!r&&e.results.hasOwnProperty(t.mit_name))&&(n=!1),n){var a=t.default_value||"";if(a.includes("{{")){var i=a.replace(/{{|}}/g,"").split("="),o=i[0];if(r&&e.forms[r])try{a=e.forms[r].formEl.querySelector("[name='".concat(o,"']")).value}catch(e){a=i[1]}else try{a=document.querySelector("[name='".concat(o,"']")).value}catch(e){a=i[1]}""!==a&&void 0!==i[1]||(a="none")}e.setResultValue(t,a,r)}},processFormSettings:function(t){(!t||e.forms[t]&&!e.forms[t].processed)&&(Object.keys(e.settings.parameters).forEach((function(r){return e.processParameter(e.settings.parameters[r],t)})),Object.keys(e.settings.mappings).forEach((function(r){return e.processSetting(e.settings.mappings[r],t)})),Object.keys(e.settings.defaults).forEach((function(r){return e.processDefault(e.settings.defaults[r],t)})),t&&e.forms[t]&&(e.forms[t].processed=!0))},setup:function(t){e.settings=t,e.results={},e.runFormCallback()}};return e.getSettings=function(t){if(e.requestedSettings&&e.settingsLoaded&&(t&&e.forms[t]?(e.forms[t].processed?e.results=e.forms[t].results:e.processFormSettings(t),e.runFormCallback(t)):e.runFormCallback()),!e.requestedSettings){e.requestedSettings=!0;var r=encodeURIComponent(window.location.origin+window.location.pathname+window.location.hash);a("".concat(e.base_url,"/wp-json/mit/v1/get_settings?url=").concat(r)).then((function(t){e.setup(t)})).catch(console.error).finally((function(){e.settingsLoaded=!0;var t=new CustomEvent("mit_settings_loaded",{bubbles:!0});window.dispatchEvent(t)}))}},e.run=function(t,r,n){t&&(e.callback=t),r&&(e.callback_options=r),e.getSettings(n)},e.parseResults=function(e){var t={};return Object.values(e).forEach((function(e){t[e.field_name]=e.value})),t},e.mapMarketo=function(t,r){var n=r.form,a=e.parseResults(t),i=Object.keys(n.vals()),o={};Object.keys(a).forEach((function(e){if(e.includes("*")){var t=e.replace("*","");i.forEach((function(r){r.includes(t)&&(o[r]=a[e])}))}else o[e]=a[e]})),n.vals(o),n.onSubmit((function(t){!0===t.submittable()&&(e.form=t.getFormElem(),window.MIT.run(!1,e.form[0].id))}))},e.setupForm=function(t,r,n){e.forms[t.id]={id:t.id,formEl:t,callback:r,callbackArgs:n,results:{},processed:!1},e.settingsLoaded?(e.processFormSettings(t.id),e.runFormCallback(t.id)):window.addEventListener("mit_settings_loaded",(function(){e.processFormSettings(t.id),e.runFormCallback(t.id)})),e.run()},e.defaultChecks=function(){window.addEventListener("marketo_form_load",(function(t){var r=t.detail.form.getFormElem()[0];e.setupForm(r,e.mapMarketo,{form:t.detail.form})})),window.addEventListener("eloqua_form_load",(function(t){e.setupForm(t.detail.form,e.mapEloqua,{form:t.detail.form})}))},e.getBaseUrl=function(){if(e.base_url)return e.base_url;var t;if(window.MITScriptEl&&window.MITScriptEl.src)t=window.MITScriptEl.src;else{var r=document.querySelector('script[src*="pdg/v1/scripts"]');(r&&r.src||(r=document.querySelector("script[data-pdg-script]"))&&r.src)&&(t=r.src)}if(t&&t.length){var n;try{n=new URL(t)}catch(t){return e.base_url}e.base_url="".concat(n.protocol,"//").concat(n.hostname)}return e.base_url},e.debug=function(){e.run((function(e){console.table(e)}))},e.init=function(){e.getBaseUrl(),e.defaultChecks()},e},c={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.default=function(e){return e&&e.constructor===Symbol?"symbol":typeof e},function(t,r){var n={version:"2.13.1",areas:{},apis:{},inherit:function(e,t){for(var r in e)t.hasOwnProperty(r)||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t},stringify:function(e,t){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e,t||n.replace)},parse:function(e,t){try{return JSON.parse(e,t||n.revive)}catch(t){return e}},fn:function(e,t){for(var r in n.storeAPI[e]=t,n.apis)n.apis[r][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,r){e.setItem(t,r)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,r){var a=n.inherit(n.storeAPI,(function(e,t,r){return 0===arguments.length?a.getAll():"function"==typeof t?a.transact(e,t,r):void 0!==t?a.set(e,t,r):"string"==typeof e||"number"==typeof e?a.get(e):"function"==typeof e?a.each(e):e?a.setAll(e,t):a.clear()}));a._id=e;try{var i="__store2_test";t.setItem(i,"ok"),a._area=t,t.removeItem(i)}catch(e){a._area=n.storage("fake")}return a._ns=r||"",n.areas[e]||(n.areas[e]=a._area),n.apis[a._ns+a._id]||(n.apis[a._ns+a._id]=a),a},storeAPI:{area:function(e,t){var r=this[e];return r&&r.area||(r=n.Store(e,t,this._ns),this[e]||(this[e]=r)),r},namespace:function(e,t){if(!e)return this._ns?this._ns.substring(0,this._ns.length-1):"";var r=e,a=this[r];if(!(a&&a.namespace||(a=n.Store(this._id,this._area,this._ns+r+"."),this[r]||(this[r]=a),t)))for(var i in n.areas)a.area(i,n.areas[i]);return a},isFake:function(e){return e?(this._real=this._area,this._area=n.storage("fake")):!1===e&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(e){return this._area.has?this._area.has(this._in(e)):!!(this._in(e)in this._area)},size:function(){return this.keys().length},each:function(e,t){for(var r=0,a=n.length(this._area);r<a;r++){var i=this._out(n.key(this._area,r));if(void 0!==i&&!1===e.call(this,i,this.get(i),t))break;a>n.length(this._area)&&(a--,r--)}return t||this},keys:function(e){return this.each((function(e,t,r){r.push(e)}),e||[])},get:function(e,t){var r,a=n.get(this._area,this._in(e));return"function"==typeof t&&(r=t,t=null),null!==a?n.parse(a,r):null!=t?t:a},getAll:function(e){return this.each((function(e,t,r){r[e]=t}),e||{})},transact:function(e,t,r){var n=this.get(e,r),a=t(n);return this.set(e,void 0===a?n:a),this},set:function(e,t,r){var a,i=this.get(e);return null!=i&&!1===r?t:("boolean"!=typeof r&&(a=r),n.set(this._area,this._in(e),n.stringify(t,a))||i)},setAll:function(e,t){var r,n;for(var a in e)n=e[a],this.set(a,n,t)!==n&&(r=!0);return r},add:function(t,r,a){var i=this.get(t);if(i instanceof Array)r=i.concat(r);else if(null!==i){var o=void 0===i?"undefined":e(l)(i);if(o===(void 0===r?"undefined":e(l)(r))&&"object"===o){for(var s in r)i[s]=r[s];r=i}else r=i+r}return n.set(this._area,this._in(t),n.stringify(r,a)),r},remove:function(e,t){var r=this.get(e,t);return n.remove(this._area,this._in(e)),r},clear:function(){return this._ns?this.each((function(e){n.remove(this._area,this._in(e))}),1):n.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in n.areas)n.areas.hasOwnProperty(t)&&(this._area=n.areas[t],this.clear());return this._area=e,this},_in:function(e){return"string"!=typeof e&&(e=n.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&0===e.indexOf(this._ns)?e.substring(this._ns.length):void 0:e}},storage:function(e){return n.inherit(n.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var r in this.items)if(this.has(r)&&e===t++)return r},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.items)this.removeItem(e)}}},a=n.Store("local",function(){try{return localStorage}catch(e){}}());a.local=a,a._=n,a.area("session",function(){try{return sessionStorage}catch(e){}}()),a.area("page",n.storage("page")),"function"==typeof r&&void 0!==r.amd?r("store2",[],(function(){return a})):c?c=a:(t.store&&(n.conflict=t.store),t.store=a)}(void 0,void 0),e(c)._.revive=function(e,t){if("string"==typeof t&&isNaN(t))try{return JSON.parse(t)}catch(e){return t}return t},e(c)._.replacer=function(e){return"object"==typeof e?JSON.stringify(e):e};var f,m;window.MITScriptEl=document.currentScript,window.MIT=Object.assign(s(),window.MIT||{}),window.MITMap=Object.assign(u(),window.MITMap||{}),window.MITData=Object.assign(f={query_key:"mit_params",referrerKey:"mit_referrer",previousUrlKey:"mit_previous_url",minuteInMicroseconds:6e4,getStorage:function(t){return e(c).get(t)},setStorage:function(t,r){return e(c).set(t,r)},sessionGet:function(t){return e(c).session.get(t)},sessionSet:function(t,r){return e(c).session.set(t,r)},getUrlParameter:function(e){try{return new window.URL(window.location.href).searchParams.get(e)}catch(e){return null}},getAllParameters:function(){var e=f.getStorage(f.query_key);return null===e||"object"!=typeof e?{}:e},getParameterFromStorage:function(e){var t=f.getAllParameters();return t.hasOwnProperty(e)?t[e]:null},saveParameterToStorage:function(e,t){var r=f.getAllParameters();r[e]=t,void 0===r.time&&(r.time=Date.now()),void 0===r[f.referrerKey]&&(r[f.referrerKey]=window.document.referrer),f.setStorage(f.query_key,r)},getHostname:function(e){try{return new window.URL(e).hostname}catch(e){return null}},getParameter:function(e){var t,r=f.getUrlParameter(e);return null!==r?(f.saveParameterToStorage(e,r),r):null!==(t=f.getParameterFromStorage(e))&&void 0!==t?t:""},clearParameterStorage:function(){e(c).remove(f.query_key)},maybeTrackData:function(){var e=""!==window.location.search;!window.document.referrer&&!e||window.document.referrer&&f.getHostname(window.document.referrer)===f.getHostname(window.location.href)||(f.clearParameterStorage(),f.trackAllParams())},maybeClearOldLocalStorage:function(){var e=Date.now(),t=f.getAllParameters();Object.keys(t).length&&t.time&&e-t.time>30*f.minuteInMicroseconds&&f.clearParameterStorage()},trackAllParams:function(){var e;f.saveParameterToStorage(f.referrerKey,window.document.referrer);try{e=new URL(window.location.href)}catch(e){return}e.searchParams.forEach((function(e,t){f.saveParameterToStorage(t,e)}))},getReferrerUrl:function(){return f.getParameterFromStorage(f.referrerKey)},getPreviousUrl:function(){return window.document.referrer},init:function(){f.maybeClearOldLocalStorage(),f.maybeTrackData()}},window.MITData||{}),m=function(){window.MIT.init(),window.MITMap.init(),window.MITData.init()},"loading"!==document.readyState?m():document.addEventListener("DOMContentLoaded",m)}();function mit_data_filter(mit){var getCookie=function(name){var v=document.cookie.match('(^|;) ?'+name+'=([^;]*)(;|$)');return v?v[2]:null};var id=Marketo.lead_id;if(id===null||id===''){id=getCookie('_mkto_trk')}
mit.email_address=id;return mit}
jQuery(function(){if(window.location.host==='info.nwea.org'&&typeof MktoForms2!=='undefined'){MktoForms2.whenReady(function(form){var event=document.createEvent('CustomEvent');var args={form:form,form_id:form.getId(),};event.initCustomEvent('marketo_form_load',!0,!0,args);window.dispatchEvent(event)})}
var leadid=MITData.getUrlParameter('leadId');if(window.location.pathname.indexOf('/resource-center/')===-1||leadid!==null){return}
var getCookie=function(name){var v=document.cookie.match('(^|;) ?'+name+'=([^;]*)(;|$)');return v?v[2]:null};window.addEventListener('marketo_form_prefill',function(e){if(typeof e.detail.user==='undefined'){return}
var lead_id=e.detail.user.id;var lead_cookie=getCookie('_mkto_trk');var serial_number=Marketo.content_offer;if(lead_id===''||serial_number.toLowerCase()==='none'){return}
var url=MarketoOversight.getBaseUrl()+'/wp-json/pdg/v1/lead_submitted?lead_id='+lead_id+'&serial_number='+serial_number+'&lead_cookie='+encodeURIComponent(lead_cookie);jQuery.get(url,function(data){if(data.hasOwnProperty('submitted')&&data.submitted===!0){if(typeof window.offer_unlock==='function'){window.offer_unlock()}}else{if(typeof window.offer_lock==='function'){window.offer_lock()}}})})});function marketoResetLink(data,form){var form_parent=form.getFormElem().parents('div[data-marketo-form-id]');var form_data=form_parent.data();if(!form_data.hasOwnProperty('resetField')){return}
if(data.hasOwnProperty('Email')&&data.hasOwnProperty(form_data.resetField)&&data.Email!==''){jQuery('[name='+form_data.resetField+']',form_parent).each(function(){var input_element=jQuery(this);var input_row=input_element.closest('.mktoFormRow');var form=input_element.closest('.mktoForm');if(input_element.length&&!jQuery('.not-me',form).length){var txt='<div class="not-me">Not you? click <a href="#">here</a></div>';input_row.after(txt)}})}}
function removeParam(key,sourceURL){var rtn=sourceURL.split('?')[0],param,params_arr=[],queryString=(sourceURL.indexOf('?')!==-1)?sourceURL.split('?')[1]:'';if(queryString!==''){params_arr=queryString.split('&');for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split('=')[0];if(param===key){params_arr.splice(i,1)}}
rtn=rtn+'?'+params_arr.join('&')}
return rtn}
function marketoResetForm(e){var form=jQuery(e.target).closest('.mktoForm');var form_id=jQuery('[name=formid]',form).val();var form_zone=2;switch(form_id){case '3087':form_zone=1;break;case '2673':form_zone=2;break;case '2678':form_zone=3;break}
var cookie_names=['_mkto_trk','_mkto_trk_http',];var domains=[window.location.hostname,'.marketo.com','.nwea.org','info.nwea.org',];for(var i in domains){for(var c in cookie_names){Cookies.remove(cookie_names[c],{path:'/',domain:domains[i]})}}
MarketoData.clearData('prefill_fields');var hostname=window.location.host;var pathname=window.location.pathname;var new_url=hostname+pathname;var x=location.search;var altered_url=removeParam('mkt_tok',x);var params='form-reset=1&form-type='+form_zone;if(altered_url===''){altered_url='?'+params}else{altered_url=altered_url+'&'+params}
setTimeout(function(){window.location=window.location.protocol+'//'+new_url+altered_url},250)}
jQuery(function(){jQuery('body').on('click','.not-me a',function(e){e.preventDefault();marketoResetForm(e)});window.addEventListener('marketo_form_prefill',function(e){var form_values=e.detail.form_values;var form=e.detail.form;if(form_values.hasOwnProperty('Enrollment__c_contact')){setTimeout(function(){form.vals({'Enrollment__c_contact':form_values.Enrollment__c_contact})},250)}
if(form_values.hasOwnProperty('Current_Testing_Provider_Other__c')){setTimeout(function(){form.vals({'Current_Testing_Provider_Other__c':form_values.Current_Testing_Provider_Other__c})},250)}
if(form_values.hasOwnProperty('Contact_Me_Details__c')){setTimeout(function(){form.vals({'Contact_Me_Details__c':form_values.Contact_Me_Details__c})},250)}});window.addEventListener('marketo_form_prefill',function(e){var data={event:'marketo_prefill',};if(typeof e.detail.user!=='undefined'){var user_data=e.detail.user;data.known=!0;data.user_id=user_data.id;data.track=user_data.Track;data.stage=user_data.Stage;marketoResetLink(user_data,e.detail.form)}else{data.known=!1;data.user_id=0;data.track='';data.stage=''}
window.dataLayer=window.dataLayer||[];dataLayer.push(data)});if(window.location.pathname.indexOf('/resource-center/')===-1){return}
jQuery.ajax(MarketoOversight.getBaseUrl()+'/wp-json/pdg/v1/offer_data',{method:'GET',global:!1,data:{url:window.location.origin+window.location.pathname+window.location.hash,},success:function(result){if(result.hasOwnProperty('id')){var data=result;data.event='pdg_ready';window.dataLayer=window.dataLayer||[];dataLayer.push(data)}},})})}