1({676(){const e=window.location.host,t={local:["localhost","localhost:3000","appsflyer.local","localhost:10024"],staging:["staging.appsflyer.com"],production:["www.appsflyer.com"]},n=["localhost","localhost:3000","appsflyer.local","localhost:10024"].some(t=>e.includes(t));function a(){const a={baseUrlLocal:["localhost:3000","localhost:10194","appsflyer.local","appsflyer.local:3000","localhost:10024"],baseUrlStaging:"staging"===(o=t,i=e,Object.keys(o).find(e=>o[e].some(e=>e.includes(i))))?"staging.appsflyer.com":"www.appsflyer.com"};var o,i;return`${window.location.protocol}//${n?a.baseUrlLocal.filter(t=>!0===t.includes(e))[0]:e}`}let o;document.querySelector(".page-content");const i=document.querySelectorAll(".block-library__input"),s=(document.querySelector(".block-library__nav"),document.querySelectorAll(".block-library__toggle-button")),r=document.querySelector(".block-library__hover-labels-toggle-button"),l=document.querySelector(".block-library"),c=document.querySelectorAll(".page-content > *"),d=e=>{if(e.preventDefault(),e.currentTarget.hasAttribute("data-category")){const t=document.querySelectorAll('ul[data-category="'+e.currentTarget.getAttribute("data-category")+'"] .block-library__input');if(t.length){let n=!1;e.currentTarget.classList.contains("block-library__show-all")&&(n=!0),t.forEach(e=>{e.checked=n}),u()}}},u=()=>{const e=new URL(window.location);r&&r.classList.contains("active")?e.searchParams.append("hide-hover-labels","1"):e.searchParams.delete("hide-hover-labels"),i.forEach(t=>{const n=t.getAttribute("name");e.searchParams.delete(n),t.checked?(l.classList.add("visible-"+n),e.searchParams.append(n,"v")):(l.classList.remove("visible-"+n),e.searchParams.append(n,"h"))}),window.history.pushState({},"",e)},m=e=>{e.currentTarget.classList.contains("active")?(e.currentTarget.classList.remove("active"),l.classList.remove("hide-hover-labels")):(e.currentTarget.classList.add("active"),l.classList.add("hide-hover-labels")),u()};i&&(()=>{if(c.length){let e="",t="";c.forEach(n=>{n.classList.contains("block-library__section-placeholder")?(e=n.getAttribute("data-block-id"),t=n.getAttribute("data-block-title"),n.remove()):(n.setAttribute("data-block-id",e),n.setAttribute("data-block-title",t))})}i.length&&l&&i.forEach(e=>{e.addEventListener("change",u)}),s.length&&l&&s.forEach(e=>{e.addEventListener("click",d)}),r&&l&&r.addEventListener("click",m)})(),function(){if(document.querySelector(".copy-to-clipboard")){document.querySelector(".copy-to-clipboard").addEventListener("click",function(e){e.preventDefault()});let e=new ClipboardJS(".copy-to-clipboard");e.on("success",function(e){e.trigger.innerHTML=`${e.trigger.innerHTML}
1<span class="copy-to-clipboard--copied">Copied!</span>`,setTimeout(()=>{document.querySelector(".copy-to-clipboard--copied").remove()},3e3),e.clearSelection()}),e.on("error",function(e){console.error("Action:",e.action),console.error("Trigger:",e.trigger)})}}(),function(e){function t(){return"undefined"!=typeof appsflyerEventsLobby?appsflyerEventsLobby:null}function n(e){if(!e)return;e.setAttribute("data-exhausted","true");const t=e.closest(".events-lobby__load-more-wrap");t?t.style.display="none":e.style.display="none"}function a(e,t){e&&e.length&&e.toggleClass("events-lobby__card-grid--loading",!!t)}function o(e,t,n){e&&(e.disabled=!!t,e.setAttribute("aria-busy",t?"true":"false"),t&&n&&n.i18n&&n.i18n.loading?e.textContent=n.i18n.loading:n&&n.i18n&&n.i18n.loadMore&&(e.textContent=n.i18n.loadMore))}function i(i){const s=t();if(!(s&&s.ajaxUrl&&s.nonce&&s.action))return Promise.resolve(null);const r=i.tab,l=i.gridSelector,c=i.offset||0,d=!!i.replace,u=i.panelFilters||{},m=e(l),p=m.closest(".events-lobby__tab-panel"),f=p.find(".events-lobby__load-more-wrap"),h=p.find("[data-events-lobby-load-more]")[0];if(!m.length||!r)return Promise.resolve(null);const g=new FormData;return g.append("action",s.action),g.append("nonce",s.nonce),g.append("tab",r),g.append("offset",String(c)),g.append("replace",d?"1":"0"),function(e,t){t&&Object.keys(t).forEach(function(n){const a=t[n];a&&a.length&&a.forEach(function(t){e.append("filters["+n+"][]",String(t).replace(/^\./,""))})})}(g,u),a(m,!0),h&&o(h,!0,s),fetch(s.ajaxUrl,{method:"POST",body:g,credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(!e||!e.success||!e.data)return d&&m.empty(),n(h),null;const t=e.data,a=m[0];return d&&m.empty(),function(e,t){if(!e||!t)return;const n=document.createElement("div");for(n.innerHTML=t.trim();n.firstChild;)e.appendChild(n.firstChild)}(a,t.html),"function"==typeof window.afEventsLobbyEqualizeHeight&&window.afEventsLobbyEqualizeHeight(),function(e,t,a){e&&(e.setAttribute("data-total-matching",String(a.total||0)),a.has_more&&void 0!==a.next_offset?(e.setAttribute("data-next-offset",String(a.next_offset)),function(e,t){e&&(e.removeAttribute("data-exhausted"),t&&(t.style.display=""),e.style.display="")}(e,t)):n(e))}(h,f[0],t),t}).catch(function(){return null}).finally(function(){a(m,!1),h&&o(h,!1,s)})}window.fetchEventsLobbyPosts=i,e(function(){const n=t();n&&n.ajaxUrl&&n.nonce&&n.action&&document.querySelectorAll("[data-events-lobby-load-more]").forEach(function(t){t.addEventListener("click",function(){const n=t.getAttribute("data-tab"),a=t.getAttribute("data-grid");if(!n||!a)return;const o=e(t).closest(".events-lobby__tab-panel"),s="function"==typeof window.getEventsLobbyPanelFilters?window.getEventsLobbyPanelFilters(o):{},r=parseInt(t.getAttribute("data-next-offset"),10);i({tab:n,gridSelector:a,offset:isNaN(r)?0:r,replace:!1,panelFilters:s})})})})}(jQuery);const p=document.querySelector(".section-faq"),f=p&&p.querySelectorAll(".section-faq__item h3");f&&f.forEach(e=>{e.addEventListener("click",e=>{const t=e.target.parentNode.parentNode;p.classList.contains("multi")?(f.forEach(e=>e.parentNode.parentNode.classList.remove("on")),t.classList.add("on")):t.classList.toggle("on")})}),function(){const e=document.querySelector(".product-news-archive");if(!e)return;const t=window.location,n=t.protocol+"//"+t.host+"//wp-admin/admin-ajax.php",a=document.querySelector(".dates-results"),o=document.getElementById("product-news-archive__items"),i=document.querySelector(".product-news-archive__load-more"),s=()=>document.querySelectorAll(".product-news-archive .feed-item");let r=[];const l=(e,t)=>{switch(t){case"loading":e.classList.remove("d-none"),e.disabled=!0,e.innerHTML=`<div class="mr-3">${We[Ve].loading}</div><div class="spinner-border text-primary m-auto d-flex" role="status"><span class="sr-only"></span></div>`;break;case"loaded":e.classList.remove("d-none"),e.classList.contains("d-flex")||e.classList.add("d-flex"),e.disabled=!1,e.innerHTML=e.getAttribute("data-button-text");break;case"remove":e.classList.contains("d-flex")&&e.classList.remove("d-flex"),e.classList.add("d-none");break;default:console.log("Must declare state")}},c=async(e,t)=>{try{const o=new URLSearchParams;o.append("postType","product-news-item"),o.append("action","af_get_dates_by_term"),o.append("termId",t),o.append("queryType",e);const i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:o,credentials:"same-origin"});if(!i.ok)throw new Error(`HTTP error! Status: ${i.status}`);const s=await i.text();a.innerHTML=s}catch(e){console.error("Error in AJAX request:",e)}},d=async(e,t)=>{o.classList.add("loading");try{const a=new URLSearchParams;a.append("postType","product-news-item"),a.append("action","af_load_product_news"),a.append("data",JSON.stringify(e)),a.append("actionType",t),a.append("offset",s().length);const r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:a,credentials:"same-origin"});if(!r.ok)throw o.classList.remove("loading"),new Error(`HTTP error! Status: ${r.status}`);o.classList.remove("loading");const c=await r.text();let d=s().length;"loadMore"===t?(o.insertAdjacentHTML("beforeend",c),s().length-d<6?l(i,"remove"):l(i,"loaded")):(o.innerHTML=c,s().length<5&&l(i,"remove")),setTimeout(()=>
1{s().forEach(e=>e.classList.add("active"))},300),setTimeout(()=>{o.classList.remove("loading")},300),s().length.toString()===i.getAttribute("data-max-posts")&&l(i,"remove")}catch(e){console.error("Error in AJAX request:",e)}};e.addEventListener("click",function(e){const t=e.target;if(t.parentNode.classList.contains("sidebar-nav__item")||t.classList.contains("term_filter")||t.classList.contains("product-news-archive__load-more"))if(e.preventDefault(),t.classList.contains("product-news-archive__load-more"))d(r,"loadMore"),l(i,"loading");else{const e=t.dataset.query,n=t.dataset.product,a=t.parentNode;((e,t)=>{if(t.classList.contains("sidebar-nav__item")){const e=t.parentNode.querySelectorAll("li");t.classList.contains("active")?t.classList.remove("active"):(e.forEach(e=>{e.classList.remove("active")}),t.classList.add("active"))}else document.querySelectorAll(`.sidebar-nav__item a[data-product="${e}"]`).forEach(e=>{e.parentNode.parentNode.querySelectorAll("li").forEach(e=>{e.classList.remove("active")}),e.parentNode.classList.add("active")})})(n,a),((e,t)=>{const n=r.findIndex(t=>t.type===e);if(-1!==n){r[n].product=t;const e=r.filter(e=>"date"!==e.type);r=e}else r.push({type:e,product:t});let a=o.querySelector("article");a&&a.scrollIntoView({behavior:"smooth",block:"center"})})(e,n),((e,t,n)=>{const a=r.findIndex(n=>n.type===e&&n.product===t);n.classList.contains("sidebar-nav__item")?n.classList.contains("active")?"date"!==e&&c(e,t):-1!==a&&(r.splice(a,1),"date"!==e&&c(e,"all")):document.querySelectorAll(`.sidebar-nav__item a[data-product="${t}"]`).forEach(n=>{n.parentNode.parentNode.classList.contains("products")&&"date"!==e&&c(e,t)}),d(r,"")})(e,n,a)}})}();const h=$("#filter-data").length?JSON.parse($("#filter-data").val()):"";let g,v,y,b={},w=[],S=!1,L=$(".filter__load-more button"),_=".filter__filter-button",k=()=>$(".filter__item").length;const E=e=>{const t={};return e.length?(e.find("input:not(.all):checked").each(function(){const e=this.name;t[e]||(t[e]=[]),t[e].push(this.value)}),t):t};window.getEventsLobbyPanelFilters=E;let q=null;const T=e=>{e.length&&(clearTimeout(q),q=setTimeout(function(){const t=e.find("#events-lobby-grid-upcoming, #events-lobby-grid-ondemand");if(!t.length||"function"!=typeof window.fetchEventsLobbyPosts)return;const n=t.attr("id"),a="events-lobby-grid-ondemand"===n?"ondemand":"upcoming";window.fetchEventsLobbyPosts({tab:a,gridSelector:"#"+n,offset:0,replace:!0,panelFilters:E(e)})},300))};window.filterEventsLobbyGrids=()=>{};const A=e=>{let t=z(b);g=$(".filter__items").not("#events-lobby-grid-upcoming, #events-lobby-grid-ondemand"),g.length&&g.isotope({filter:t,layoutMode:"fitRows",itemSelector:".filter__item",transitionDuration:"0s"}),e||$(".filter__filter-panel--values").on("change",function(e){if((e=>{const t=$(e.target).closest(".events-lobby__tab-panel");return!!t.find("#events-lobby-grid-upcoming, #events-lobby-grid-ondemand").length&&(P(e),e.target&&e.target.name&&V(e.target.name),T(t),!0)})(e))return;L.hasClass("d-none")||L.addClass("d-none").removeClass("d-flex");let t=$(e.target);H(t);let n=z(b);g.length&&g.isotope({filter:n,layoutMode:"fitRows",transitionDuration:"0s"}),y=g.length?g.isotope("getFilteredItemElements"):[],S||(J(e),S=!0),M(y,e)})},x=e=>{document.querySelector("body").dataset.disableScroll=e},C=()=>{let e=[];return h.forEach(t=>{let n="video"===t.item_type?"popup-video":"",o="video"===t.item_type?'<i class="ico-video"></i>':"",i=t.secondary_image.url?`<img class="bg-image" src="${t.secondary_image.url}" alt="${t.secondary_image.alt}" title="${t.secondary_image.title}" />`:`<img class="bg-image" src="${a()}/wp-content/themes/AF2020/assets/images/img-placeholder.jpg" />`,s="video"===t.item_type?`${t.video_url}`:`${t.url}`,r=`<article id="item-${t.ID}"\n class="feed-item feed-item--layout-2 filter__item feed-item feed-item--layout-2 feed-item--customer align-items-center align-items-sm-start flex-sm-column col-sm-6 col-md-4 mb-30 mb-sm-40 all ${t.industries} ${t.locations} ${t.products}"\n data-customer-industries="${t.industries}"\n data-customer-locations="${t.locations}"\n data-products="${t.products}"\n data-aft="internal-link" \n data-aft-block="customers-feed">\n <figure class="position-relative overflow-hidden border-radius ">\n <a href="${s}" class="d-flex d-md-block align-items-md-center ${n}">\n ${o}\n ${i}\n </a>\n </figure>\n <header class="d-flex flex-column pt-sm-20 pb-0 pl-20 pl-sm-0">\n <a class="d-flex d-md-block align-items-md-center ${n}" href="${s}">\n <h2 class="d-inline font-weight-bold m-0 pt-2 pt-sm-4">${t.post_title}</h2>\n </a>\n </header>\n </article>`;e.push(r)}),e},M=(e,t)=>{let n=t.target.name;P(t),F(n),D(t.target);let a={},o={};
1e&&e.length&&(e.forEach(e=>{Object.entries(e.dataset).forEach((e,t)=>{a[e[0]]=a[e[0]]?a[e[0]]+=" "+e[1]:e[1]})}),Object.entries(a).forEach(e=>{o[G(e[0])]=[...new Set(e[1].split(" "))]}),w.length>0&&(w.forEach(e=>{let t=document.querySelectorAll(`[data-taxonomy="${e}"] input`),n=[];t.forEach(t=>{t.disabled=!o[e].includes(t.id),t.disabled||n.push(t)})}),delete o[n]),v===n&&delete o[v],Object.entries(o).forEach(e=>{document.querySelectorAll(`[data-taxonomy="${e[0]}"] input:not(.all)`).forEach(t=>{t.disabled=!o[e[0]].includes(t.attributes.id.value)})}),0===document.querySelectorAll('input:not([name="'+v+'"]):not(.all):checked').length)&&document.querySelectorAll(`input[name="${v}"]`).forEach(e=>{e.disabled=!1})},I=(e,t)=>{const n=t?t.querySelectorAll(".filter__action--clear-filters"):document.querySelectorAll(".filter__action--clear-filters"),a="hide"===e,o=e=>e?"d-none":"d-flex";n.forEach(e=>{const t=e.classList;t.contains(o(!a))?t.replace(o(!a),o(a)):t.contains(o(a))||t.add(o(a))}),a&&N()},N=()=>{$(".filter__items article:nth-child(n+10)").remove(),S=!1,A("afterReset"),L.removeClass("d-none").addClass("d-flex")},P=e=>{let t=!1,n=document.querySelector(`input[name="${e.target.name}"].all`);const a=e.target.closest(".events-lobby-af-filters")||e.target.closest(".filter");let o=a?a.querySelectorAll("input:not(.all)"):document.querySelectorAll(".filter__filter-panel--value input:not(.all), .events-lobby-af-filters input:not(.all)"),i=a?a.querySelectorAll("input:not(.all):checked").length:document.querySelectorAll(".filter__filter-panel--value input:not(.all):checked, .events-lobby-af-filters input:not(.all):checked").length;let s=document.querySelectorAll(`input[name="${e.target.name}"]:not(.all):not([disabled])`).length,r=document.querySelectorAll(`input[name="${e.target.name}"]:checked:not(.all)`).length,l=".all"===e.target.value,c=r===s&&s>0,d=0===r,u=0===i;return I(u?"hide":"show",a),l?(e.target.disabled=!0,e.target.checked=!0,document.querySelectorAll(`input[name="${e.target.name}"]:not(.all):checked`).forEach(e=>e.checked=!1),0===(a||document).querySelectorAll("input:not(.all):checked").length&&(N(),I("hide",a)),t=!0):c||d||u?(n&&(n.checked=!0,n.disabled=!0),t=!0,u&&setTimeout(function(){o.forEach(e=>{e.disabled=!1})},200)):n&&(n.checked=!1,n.disabled=!1,t=!1),t},F=e=>{document.querySelectorAll("input.all").length===document.querySelectorAll("input.all:checked").length?v=void 0:v?document.querySelectorAll(`input[name="${v}"]:checked`).length||(v=void 0):v=e},D=e=>{let t=document.getElementById(e.attributes.id.value),n=e.name,a=document.querySelectorAll('input[name="'+n+'"]:checked:not(.all)').length,o=document.querySelector(`.filter__filter-tags[data-taxonomy="${n}"]`);!0===t.checked&&".all"!==e.value?o?B(t):V(n):!1===t.checked&&".all"!==e.value?o?O(t):V(n):0===a&&(o?R(n):V(n))},B=e=>{let t=document.querySelector(`label[for="${e.attributes.id.value}"]`).textContent,n=document.querySelector(`.filter__filter-tags[data-taxonomy="${e.attributes.name.value}"]`),a=`<span class="filter__filter-tag" id="filter-tag-${e.attributes.id.value}">${t}<button class="filter__filter-tag-remove"><i class="icon-cancel"></i></button></span>`;n&&(n.innerHTML+=a)},O=e=>{let t="SPAN"===e.nodeName?e.attributes.id.value.slice(11):e.attributes.id.value;document.getElementById(`filter-tag-${t}`)&&(document.querySelector(`#filter-tag-${t}`).remove(),$(`input#${t}`).click())},R=e=>{let t=document.querySelector(`.filter__filter-tags[data-taxonomy="${e}"]`);t&&(t.innerHTML="")},G=e=>e.split(/(?=[A-Z])/).join("-").toLowerCase(),z=e=>{let t=0,n=[];for(let a in e){let o=e[a];if(o.length){if(0===t)n=o.slice(0);else{let e=[],t=n.slice(0);for(let n=0,a=o.length;n<a;n++)for(let a=0,i=t.length;a<i;
1a++)e.push(t[a]+o[n]);n=e}t++}}return n.join(", ")},H=e=>{let t=e[0],n=t.name,a=b[n];a||(b[n]=[],a=b[n]);let o=e.hasClass("all");o&&delete b[n];let i=$.inArray(t.value,a);t.checked&&!o&&-1===i?b[n].push(t.value):o||b[n].splice(i,1)},j=()=>{$(`.filter__filter-panels, .filter__filter-panel, ${_}`).removeClass("on"),U(),window.window.innerWidth<576&&x(!1)},U=()=>{document.querySelectorAll(".events-lobby-af-filters .af-filter__dropdown").forEach(e=>{e.style.display="none"}),document.querySelectorAll(".events-lobby-af-filters .af-filter__content").forEach(e=>{e.classList.remove("active"),e.setAttribute("aria-expanded","false")})},W=(e,t)=>{const n=e.dataset.filter||e.dataset.taxonomy,a=t.querySelector(`.af-filter__dropdown[data-filter="${n}"]`);a&&(t.querySelectorAll(".af-filter__dropdown").forEach(e=>{e.dataset.filter!==n&&(e.style.display="none")}),t.querySelectorAll(".af-filter__content").forEach(e=>{e.dataset.filter!==n&&(e.classList.remove("active"),e.setAttribute("aria-expanded","false"))}),e.classList.contains("active")?(a.style.display="none",e.classList.remove("active"),e.setAttribute("aria-expanded","false")):(a.style.display="block",e.classList.add("active"),e.setAttribute("aria-expanded","true")))},V=e=>{document.querySelectorAll(".events-lobby-af-filters").forEach(t=>{const n=t.querySelector(`.af-filter__content[data-taxonomy="${e}"]`);if(!n)return;const a=t.querySelectorAll(`input[name="${e}"]:checked:not(.all)`).length,o=n.querySelector(".af-filter__indicator");o&&(a>0?(o.textContent=a,o.style.display="flex"):o.style.display="none")})},K=e=>{if(e.target.classList.contains("filter__action--apply")&&j(),e.target.classList.contains("filter__action--close")&&j(),e.target.classList.contains("filter__action--clear")&&$(".filter__filter-panel.on input.all").click(),e.target.classList.contains("filter__action--clear-all")){e.preventDefault();const t=e.target.closest(".events-lobby-af-filters")||e.target.closest(".filter");t?$(t).find("input.all").click():$(".filter__filter-panel input.all").click(),I("hide",t),U();const n=$(t).closest(".events-lobby__tab-panel");n.length&&T(n)}},J=e=>{if(!h)return;let t=$(C().slice(k()).join(""));g.append(t).isotope("appended",t),y=g.isotope("getFilteredItemElements")},Z=$(_).length>0,Y=document.querySelectorAll(".events-lobby-af-filters").length>0;(Z||Y)&&($(function(){A()}),document.addEventListener("click",e=>{const t=document.querySelectorAll(".filter__filter-panel");let n=Array.from(t).some(t=>t.contains(e.target));const a=document.querySelectorAll(".events-lobby-af-filters .af-filter"),o=Array.from(a).some(t=>t.contains(e.target));if(n||o||e.target.classList.contains("filter__filter-button")||j(),e.target.parentNode&&e.target.classList.contains("filter__filter-tag-remove")){let t=e.target.parentNode;O(t)}e.target.classList.contains("filter__action")&&K(e)}),Z&&$(_).on("click",function(){let e=$(this).data("taxonomy");(()=>{$(this).hasClass("on")?j():(e=>{let t=`.filter__filter-panel[data-taxonomy="${e}"], .filter__filter-panels, ${_}[data-taxonomy="${e}"]`;$(`.filter__filter-panel, ${_}`).removeClass("on"),$(t).addClass("on"),window.window.innerWidth<576&&x(!0)})(e)})()}),Y&&document.querySelectorAll(".events-lobby-af-filters").forEach(e=>{e.querySelectorAll('.af-filter__content[role="button"]').forEach(t=>{t.addEventListener("click",n=>{n.preventDefault(),W(t,e)}),t.addEventListener("keydown",n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),W(t,e))})}),e.querySelectorAll('.af-filter__dropdown input[type="checkbox"]').forEach(t=>{t.addEventListener("change",function(){const t=e.querySelector(`input.all[name="${this.name}"]`);t&&(this.classList.contains("all")||this.classList.contains("af-filter-all")||this.checked&&(t.checked=!1,t.disabled=!1))})})})),L&&L.on("click",e=>{let t=k(),n=$(C().slice(t,t+9).join(""));g.append(n).isotope("appended",n),qt(),n.length<9&&e.target.classList.add("d-none")});const X=document.querySelector(".marketo-form__form-holder.marketo-form--report");if(X){const Wt=document.querySelector(".hero-banner-simple"),Vt=document.querySelector(".section-single-post"),Kt=()=>Number(window.getComputedStyle(Wt).paddingTop.slice(0,-2)),Jt=()=>Wt.offsetHeight+Vt.offsetHeight-Kt()+"px",Zt=()=>X.style.height=window.innerWidth>1024?Jt():null;Zt(),window.addEventListener("resize",Zt)}const Q=document.querySelectorAll("form:not(.mktoForm):not(.form-exclude-handler):not(.form-opt-out):not(.post-password-form)"),ee=document.querySelectorAll("form.mktoForm"),te="PostalCode",ne=new Set;let ae,oe,ie=!1,se=!1;window.userGeoLoc=null,window.userLang=null;const re=e=>{if(!e)return;e.dataset.isSubmitting="false";const t=e.querySelector('button[type="submit"]');t&&(t.disabled=!1,t.classList.remove("is-submitting"),t.style.pointerEvents="")},le=e=>{let t=new URL(window.location.href).searchParams.get(e);return e&&e.toLowerCase().startsWith("utm_")?(e=>{if(!e||!/%[0-9A-Fa-f]{2}/.test(e))return e;try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}})(t):t},ce=250,de=e=>"string"==typeof e&&e.length>
1ce?e.substring(0,ce):e,ue=(e,t,n)=>{let a,o=e;o&&(a=o?document.getElementById(o).querySelector(`[name="${t}"]`):null,a&&(a.value=de(n)))},me=(e,t)=>{t.forEach(t=>{let n=document.querySelector(`#${e} [name="${t[0]}"]`);n&&t[1]&&(n.value=de(t[1]))})},pe=(e,t,n,a,o)=>{const i=n||t;let s="session"===a?window.sessionStorage[t]:le(t);"session"===a&&s?ue(e,i,s):(!s&&o&&o[t]&&(s=o[t]),s&&ue(e,i,s))},fe=e=>{let t,n=window.innerWidth,a=document.querySelectorAll(`[name="${e}"]`);a&&(t=n<768?"mobile":n>=768&&n<=1120?"tablet":"desktop",a.forEach(e=>e.value=t))},he=e=>{let t=document.cookie.length>0?document.cookie.split(";"):null;if(t){for(let n=0;n<t.length;n++){let a=t[n].split("=");if(e===a[0].trim())return a[1]}return null}},ge=()=>{document.querySelectorAll(".mktoForm label:first-of-type").forEach(e=>{e.parentNode.querySelector("input, select, textarea").insertAdjacentElement("afterend",e)})},ve=e=>{document.querySelectorAll(`#mktoForm_${e} select`).forEach(e=>ye(e))},ye=e=>{e.addEventListener("focus",function(e){const t=()=>{e.target.classList.remove("mktoInvalid");const t=e.target.closest(".mktoFormRow");t&&t.classList.remove("mktoInvalid")};t(),setTimeout(t,10),setTimeout(t,50),setTimeout(t,100)}),e.addEventListener("change",function(e){e.target.value?(e.target.classList.add("has-value"),e.target.classList.remove("mktoInvalid")):e.target.classList.remove("has-value")})};let be=[["internalrefplat","HS_InternalRefPlat__c"],["inrefplat","HS_InternalRefPlat__c"],["inrefplat"],["internalrefplat"]],we=(e,t)=>{let n=null;return(...a)=>{n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,a)},t)}};const Se=e=>{let t=document.querySelector(`#${e} input[type="tel"]`),n=!!window.intlTelInputGlobals&&window.intlTelInputGlobals.getInstance(t);return!!n&&n.getSelectedCountryData()},Le=(e,t,n)=>{const a=n.querySelector(`[name="${te}"]`),o=a.closest(".mktoFormCol");switch(e){case"show":ae=!0,o.classList.remove("d-none"),o.closest(".mktoFormRow").classList.remove("hide-zipcode");break;case"hide":ae=!1,o.classList.add("d-none"),o.closest(".mktoFormRow").classList.add("hide-zipcode"),a.value="",a.dispatchEvent(new Event("blur"))}},_e=(e,t,n,a)=>{let o=n||"Phone",i=document.querySelector(`#${e}`),s=a||"phoneMKTO",r=i.querySelector(`input[name="${s}"]`),l=i.querySelector(`input[name="${o}"]`),c=null;if(r){if(c=t?`+(${t.dialCode}) ${r.value}`:r.value,!l){const e=document.createElement("input");e.type="hidden",e.name="phone",e.id="phone",i.appendChild(e)}i.querySelector(`input[name="${o}"]`).value=c}},ke=async()=>{try{const e=await fetch(afJs.ajax_url+"?action=user_location");if(!e.ok)throw new Error(`HTTP status ${e.status}`);const t=await e.json();window.userGeoLoc=t.location}catch(e){}},Ee=async()=>{try{const e=await fetch(afJs.ajax_url+"?action=user_lang");if(!e.ok)throw new Error(`HTTP status ${e.status}`);const t=await e.json();window.userLang=t.lang}catch(e){window.userLang="en"}},qe=(e,t)=>{setTimeout(()=>{e.showErrorMessage(We[Ve]["business-email-invalid"],t)},100),t&&t[0]&&(t[0].classList.remove("mktoValid"),t[0].classList.add("mktoInvalid")),e.submittable()&&e.submittable(!1)};let Te="false";const Ae="1"===he("afforms"),xe=async e=>{se||(se=await async function(){return await fetch(`${st}/wp-content/themes/AF2020/apis/freemails.json`).then(e=>e.json())}());let t="string"==typeof e?e.substring(e.lastIndexOf("@")+1):e.value.substring(e.value.lastIndexOf("@")+1);return!!se&&se.includes(t)},Ce=e=>{let t="string"==typeof e?e.substring(e.lastIndexOf("@")+1):e.value.substring(e.value.lastIndexOf("@")+1);return rt.includes(t)},$e=e=>{let t=e.attributes["form-cta"],n=e.dataset.itemName,a=e.attributes["redirect-url"],o=window.location.href,i=(he("_ga"),Ze("get",null,null)),s=[["formCTA",t],["formThankYouPageURL",a],["formLandingPageURL",o],["itemName",n]];me(e.id,s);let r=[["Google_ID_gclid__c",le("gclid")||i&&i.pixels&&i.pixels.gclid||null],["Facebook_ID_fclid__c",le("fbclid")||i&&i.pixels&&i.pixels.fbclid||null],["LinkedIn_ID_li_fat_id__c",le("li_fat_id")||i&&i.pixels&&i.pixels.li_fat_id||null]],l="afc",c=[[`${l}_source`,"HSUTMSource__c"],[`${l}_medium`,"HSUTMMediu__c"],[`${l}_campaign`,"HSUTMCampaign__c"],[`${l}_content`,"HSUTMContent__c"],[`${l}_term`,"HSUTMTerm__c"],["internalrefplat","HS_InternalRefPlat__c"],["inrefplat","HS_InternalRefPlat__c"]];me(e.id,r),((e,t,n)=>{let a=Ze("get-category",null,"utms");t.forEach(t=>pe(e,t[0],t[1],n,a))})(`${e.id}`,c,"session")},Me=e=>{document.querySelector('button[type="submit"].mktoButton').insertAdjacentHTML("afterend",'<div class="font-size-sm pt-4 text-center text-danger">Hmmm... something went wrong. <br>Don\'t worry, we let the team know. Try again in a few minutes.</div>')},Ie=(e,t,n)=>{const a=e.getFormElem()[0];if(!a.parentNode.querySelector(".form-steps")){let e=document.createElement("div"),n=document.createElement("div");n.classList.add("form-steps__buttons","d-flex","justify-content-center","pt-3");for(let e=0;e<t+1;e++){let t=document.createElement("span");t.classList.add("form-steps__button"),t.dataset.formStep=e+1,0===e&&t.classList.add("on"),n.appendChild(t)}return e.appendChild(n),e.classList.add("form-steps","d-flex","justify-content-center"),void a.parentNode.insertBefore(e,a)}if(n){const e=a.parentNode.querySelectorAll("[data-form-step]"),t=String(n);
1e.forEach(e=>{e.classList[e.dataset.formStep===t?"add":"remove"](["on"]),Number(e.dataset.formStep)<n&&e.classList.add("valid")})}},Ne=e=>{if(!e)return;const t=e.closest(".mktoFieldWrap")||e.closest(".field")||e.closest(".form__item")||e.parentElement;if(!t)return void console.log("No form row found for field:",e.name||e.id);const n=t.querySelector("label");if(!n)return void console.log("No label found in formRow for field:",e.name||e.id);const a="SELECT"===e.tagName,o=()=>{""!==e.value.trim()||document.activeElement===e?n.classList.add("label-hidden"):n.classList.remove("label-hidden")};o(),setTimeout(o,100),setTimeout(o,500),setTimeout(o,1e3),e.addEventListener("animationstart",e=>{"onAutoFillStart"===e.animationName&&n.classList.add("label-hidden")}),e.addEventListener("focus",()=>{n.classList.add("label-hidden");const t=()=>{e.classList.remove("mktoInvalid");const t=e.closest(".mktoFormRow");t&&t.classList.remove("mktoInvalid")};t(),setTimeout(t,10),setTimeout(t,50),setTimeout(t,100)}),e.addEventListener("blur",()=>{o()}),a?e.addEventListener("change",()=>{o()}):e.addEventListener("input",()=>{o(),e.classList.remove("mktoInvalid")}),"TEXTAREA"===e.tagName&&e.addEventListener("change",()=>{o()})},Pe=e=>{let t=e.attributes["data-client-id"].value,n=e.attributes.id.value,o=n.substring(9);if(!ne.has(n)){if(ne.add(n),document.querySelectorAll(`#${n} input[type="hidden"][data-get-param]`).forEach(e=>{let t=e.dataset.getParam;t&&le(t)&&ue(e.name,le(t))}),document.referrer){let e=new URL(document.referrer).hostname;e&&ue(n,"last_referer",e)}"undefined"!=typeof MktoForms2&&MktoForms2.loadForm("//app-ab41.marketo.com",t,o,function(e){let t=document.getElementById(n),o=t.dataset.action,i=e.getFormElem().find('[name="Email"]'),s=e.getFormElem().find(`[name="${te}"]`),r=e.getFormElem().find('[type="url"]'),l=t.dataset.redirectUrl,c=t.dataset.downloadUrl;t.dataset.isSubmitting="false",r.length>0&&r[0].addEventListener("blur",function(e){let t=e.target.value;!t||t.startsWith("http://")||t.startsWith("https://")||(e.target.value=`https://${t}`)}),ie=e.getValues().hasOwnProperty(te);const d=t.querySelector('button[type="submit"]');d.classList.add("btn","btn-primary","btn-primary--blue"),d.addEventListener("click",function(e){t.querySelectorAll(".mktoFormRow.mktoCheckboxList").forEach(e=>{const t=null!==e.querySelector(".mktoAsterix"),n=e.querySelector('input[type="checkbox"]');t&&n&&!n.checked&&e.classList.add("mktoInvalid")})},!0),t.querySelectorAll(".mktoFormRow.mktoCheckboxList").forEach(e=>{const t=e.querySelector('input[type="checkbox"]');t&&t.addEventListener("change",function(){this.checked&&e.classList.remove("mktoInvalid")})}),t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea').forEach(e=>Ne(e)),fe("deviceTypeMKTO"),fe("device_type"),(e=>{let t=$('[name="'+e+'"]');if(t){let e=("; "+document.cookie).split("; _mkto_trk=");if(2===e.length){let n=e[1].split(";")[0];t.val(n)}}})("mkto_trk");for(let e=document.querySelectorAll("#"+n+", #"+n+" [style]"),t=0,a=e.length;t<a;t++)e[t].removeAttribute("style");for(let e=document.styleSheets,n=0,a=e.length;n<a;n++){let a=document.createElement("A");a.href=e[n].href,-1===a.hostname.search(/\.marketo\.com$/)&&(e[n].ownerNode||e[n].owningElement).parentNode!==t||(e[n].disabled=!0)}document.querySelectorAll(`#${n} .mktoForm select option:nth-child(1)`).forEach(e=>e.disabled=!0);const u=t.querySelector('[type="email"]');let m=Ce(u);if(wt=document.querySelectorAll('input[name="phoneMKTO"]'),wt&&0<wt.length){const e=t.querySelector('[type="tel"]');if(e&&window.intlTelInput){const t=e=>Object.keys(e),n=t(Ue);e.placeholder="";const o=()=>{window.intlTelInputGlobals||(window.intlTelInputGlobals={instances:{}}),window.intlTelInput(e,{formatOnDisplay:!0,nationalMode:!0,separateDialCode:!0,initialCountry:"auto",onlyCountries:n,utilsScript:`${a()}/wp-content/themes/AF2020/assets/js/vendors/iti-utils.js`,geoIpLookup:function(e){const t=()=>{window.userGeoLoc?e(window.userGeoLoc):setTimeout(t,200)};t()}})};setTimeout(o,100)}else console.warn("intlTelInput plugin could not be loaded.");(e=>{let t=e.querySelector('input[type="tel"]');if(t){const n=()=>{const t=Se(e.id);_e(e.id,t),((e,t)=>{let n=document.querySelectorAll(`#${e} input[name="Country"], #${e} input[name="countryMKTO"]`);
1n&&t&&n.forEach(e=>{e.value=t.iso2})})(e.id,t),ie&&("us"===t.iso2?Le("show",0,e):!1!==ae&&Le("hide",0,e))};t.addEventListener("countrychange",n),t.addEventListener("change",n)}})(t)}e.onSuccess(function(a,i){if("true"!==t.dataset.isSubmitting)return!1;window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("demoFormSubmission",{formSubmittedSuccessfully:!0,demoFormSubmittedSuccessfully:!0}),VWO.event("demoAndSignupFormSubmission",{demoSignupFormSubmissionSuccessfully:!0}),(e=>{"undefined"!=typeof LDBookItV2&&LDBookItV2&&LDBookItV2.submit({formData:e})})(a),"step"!==o&&"undefined"!=typeof ChiliPiper&&"undefined"!==a.activeChiliPiperMKTO&&"Yes"===a.activeChiliPiperMKTO&&ChiliPiper.submit("appsflyer","inbound",{map:!0,formId:n,onRouted:()=>{window.dataLayer.push({event:"chilipiper_open"})},onSuccess:()=>{window.dataLayer.push({event:"chilipiper_submit",chili_success:"success"})}});try{if(window.afGTMTracking&&"function"==typeof window.afGTMTracking.trackRegisterToEvent){const e=document.body.classList.contains("single-webinar"),t=document.body.classList.contains("single-event");if(e||t){const t=document.querySelector("h1")?.textContent?.trim()||"",n=e?"Webinar":"In Person Event",o={...a,event_title:t,event_type:n};window.afGTMTracking.trackRegisterToEvent(o)}}}catch(e){console.log("GTM tracking error:",e)}c&&function(e){e.split("/").pop();const t=document.createElement("a");t.setAttribute("href",e),t.target="_blank",document.body.appendChild(t),t.click(),t.remove()}(c);let s=new Date;if(s.setTime(s.getTime()+2592e6),document.cookie=`afforms=1; domain=.appsflyer.com; expires="${s.toUTCString()}"; path=/; secure;`,void 0===o||"redirect"===o)return document.getElementById(e.getFormElem()[0].id).classList.add("d-none"),window.location.href=l,!1;if("step"===o)return t.querySelectorAll("button[data-form-step]").length,(e=>{const t=document.getElementById(`mktoForm_${e.getId()}`).dataset.redirectUrl;t?((e,t)=>{let n=new FormData;n.append("action","store_form_data"),n.append("formData",JSON.stringify(e.getValues())),fetch(afJs.ajax_url,{method:"POST",contentType:!1,processData:!1,body:n}).then(e=>e.json()).then(n=>{n.success?location.href=t:(console.error("An error occurred:",n),Me(),re(e.getFormElem()[0]))}).catch(t=>{console.error("An error occurred:",t),Me(),re(e.getFormElem()[0])})})(e,t):(e=>{e.getFormElem()[0].classList.add("d-none");const t=document.querySelector("#form-signup");let n=e.getValues();if(n.hasOwnProperty("Country")){const e=window.intlTelInputGlobals.getCountryData().find(e=>e.iso2===n.Country);n.Country=e.name}let a={FirstName:"fname",LastName:"lname",Email:"email",Phone:"phone",Country:"country",Company:"company",Website:"companywebsite",Title:"title"};for(let[e,o]of Object.entries(n)){let n=a[e];if(n){let e=t.elements[n];e&&(e.value=o,e.disabled=!0,e.closest(".field").classList.add("d-none"))}}t.classList.remove("d-none")})(e)})(e),document.getElementById(`mktoForm_${e.getId()}`).dataset.redirectUrl||re(t),!1;if("message"===o){St(t),document.getElementById(e.getFormElem()[0].id).classList.add("sent");const n=document.querySelector(".btn-back-form, .btn-back-form--agencies");return n&&(n.style.display="none"),!1}}),e.onValidate(function(){m=Ce(u),$(".mktoFormRow").removeClass("newFieldRow");let n=!0,a=/[<>{}]/;if(["FirstName","LastName"].forEach(function(t){let o=e.vals()[t];if(o&&a.test(o)){n=!1;let a=e.getFormElem().find(`[name="${t}"]`);e.submittable(!1),a.length>0&&(a[0].classList.toggle("mktoInvalid"),setTimeout(()=>{e.showErrorMessage("Letters only",a)},10))}}),!n)return e.submittable(!1),re(t),!1;let o=e.getFormElem().find('[name="Website"]');if(o.length>0){if(o.val()&&!dt(o[0]))return e.submittable(!1),o[0].classList.toggle("mktoInvalid"),setTimeout(()=>{e.showErrorMessage(We[Ve]["url-invalid"],o)},10),re(t),!1;e.submittable(!0)}
1return m?(qe(e,i),re(t),!1):!1===lt?(e.submittable(!1),setTimeout(()=>{e.showErrorMessage(We[Ve]["email-invalid"],i)},10),re(t),!1):(ae&&((e,t,n)=>{e?/^\d{5}(?:-\d{4})?$/.test(e)?(n[0].classList.remove("mktoInvalid"),t.submittable(!0)):(setTimeout(()=>{t.showErrorMessage(We[Ve]["invalid-zipcode"],n),n[0].classList.add("mktoInvalid")},10),t.submittable(!1)):(setTimeout(()=>{t.showErrorMessage(We[Ve].required,n),n[0].classList.add("mktoInvalid")},10),t.submittable(!1))})(e.getValues()[te],e,s),oe?(e.submittable(!1),qe(e,i),re(t),!1):void 0)}),e.onSubmit(function(e){if("true"===t.dataset.isSubmitting)return console.log("Form submission blocked - already submitting"),!1;const a=e.vals(),o={};for(const e in a){const t=a[e];"string"==typeof t&&t.length>ce&&(o[e]=t.substring(0,ce))}Object.keys(o).length>0&&e.vals(o),t.dataset.isSubmitting="true",setTimeout(()=>{"true"===t.dataset.isSubmitting&&(console.warn("Form submit timeout - auto-resetting isSubmitting flag"),re(t))},1e4);const s=t.querySelector('button[type="submit"]');if(s&&(s.disabled=!0,s.classList.add("is-submitting"),s.style.pointerEvents="none"),(m||oe)&&(qe(e,i),re
1(t)),wt&&wt.length>0&&_e(n,Se(n)),e.vals().My_company_is__c){let t="A brand with a mobile app"===e.vals().My_company_is__c?1:0;localStorage.setItem("MyCompanyIs",t)}})})}},Fe=e=>{e=String(e);let t=document.querySelector(".multisteps-titles");t&&t.querySelectorAll(".step-title").forEach(t=>{let n=t.dataset.steptitle;n=String(n),t.classList.remove("on"),t.classList.add("d-none"),e===n&&(t.classList.add("on"),t.classList.remove("d-none"))})},De=e=>e.forEach(e=>Pe(e)),Be=e=>{const t="function"==typeof e.getId?`mktoForm_${e.getId()}`:e.id,n=document.getElementById(t);if(!n)return;const a=n.querySelector('[type="email"]'),o="function"==typeof e.getId?".mktoButton":'[type="submit"]',i=document.querySelectorAll(o);if(!a||0===i.length)return;const s=we(Re,1e3);a.addEventListener("input",e=>{i.forEach(e=>{Oe(e,"disable")}),s(e,n,i)})},Oe=(e,t)=>{const n="enable"===t;e.disabled=!n,e.classList.toggle("loader",!n)},Re=async(e,t,n)=>{const a=e.target?.value||e,o=await ct(a),i=t.classList.contains("mktoForm"),s=t.getAttribute("data-allow-list");if(!a||!o){if(i){const e=t.dataset.formId,n=MktoForms2.getForm(e),a=n.getFormElem().find('[type="email"]');n.showErrorMessage(We[Ve]["email-invalid"],a)}else Ke(e.target,!0,"email-invalid");return void(n&&n.forEach(e=>{Oe(e,"enable")}))}let r,l,c,d,u=a.split("@")[1];if(i){const e=t.dataset.formId;r=MktoForms2.getForm(e),l=r.getFormElem().find('[type="email"]'),c=t.querySelector('[name="Company"]'),d=!!c&&c.closest(".mktoFormCol")}let m=[];s&&(m=s.split(",").map(e=>e.trim()));const p=m.includes(u),f=!p;if(f){const t=await xe(a);if(oe=t,t)return n?.forEach(e=>Oe(e,"enable")),void(i?(r.submittable(!1),r.showErrorMessage(We[Ve]["business-email-invalid"],l)):Ke(e.target,!1,"business-email-invalid"))}try{const o=await fetch(afJs.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"zerobounce_validate",email:a})}),s=await o.json();if(oe=!m.includes(u)&&s.freeEmail,i){if(oe&&f)return qe(i?r:t,l),n&&n.forEach(e=>{Oe(e,"enable")}),lt=!1,void r.submittable(!1);if(c&&(oe||p?d.classList.remove("d-none"):d.classList.add("d-none"),p?d.classList.remove("d-none"):d.classList.add("d-none"),c.value=oe||p?null:a.split("@").pop().split(".")[0]),"invalid"!==s.status)return lt=!0,r.submittable(!0),void(n&&n.forEach(e=>{Oe(e,"enable")}));"invalid"===s.status&&(r.showErrorMessage(We[Ve]["email-invalid"],l),lt=!1,r.submittable(!1),n&&n.forEach(e=>{Oe(e,"enable")}))}if(!i){lt="invalid"!==s.status;let t=e.target.classList.contains("validate-business-email");if(n&&n.forEach(e=>{Oe(e,"enable")}),oe&&t&&!p)return void Ke(e.target,!1,"business-email-invalid");lt?Ke(e.target,!0,"email-invalid"):!1===lt&&Ke(e.target,!1,"email-invalid")}return s}catch(t){console.error(t),lt=!0,n?.forEach(e=>{Oe(e,"enable")}
1),re(e.target.closest("form"))}};"undefined"!=typeof MktoForms2&&(MktoForms2.onFormRender(function(e){(e=>{let t=e.getFormElem()[0].querySelectorAll(".mktoFormRow");for(let e of t){const t=e.parentNode.parentNode,n=e.querySelectorAll("input, select, textarea"),a=e.querySelectorAll('input[type="hidden"]'),o=e.querySelectorAll(".mktoHtmlText").length>0,i=e.querySelectorAll(".mktoCheckboxList").length>0;"DIV"===t.nodeName&&t.classList.contains("mktoFormRow")||(o||n.length&&!(a.length>0)?(e.classList.remove("d-none"),o&&e.classList.add("mktoDisclaimer"),i&&e.classList.add("mktoCheckboxList")):e.classList.add("d-none"))}})(e),ve(e.getId()),$e(e.getFormElem()[0]);let t=e.getFormElem()[0],n="_"+(new Date).getTime()+Math.random();getSelection.call.bind([].slice)(t.querySelectorAll("label[for]")).forEach(function(e){let a=t.querySelector('[id="'+e.htmlFor+'"]');a&&(e.htmlFor=a.id=a.id+n)}),(()=>{const e=setInterval(()=>{if(window.userGeoLoc){clearInterval(e);const t=vt(window.userGeoLoc);document.querySelectorAll('[name="Country"], [name="countryMKTO"]').forEach(e=>{e.value=t})}},100)})(),ge(),ke(),Ee();const a=t.querySelector("label:not([for])");a&&a.previousElementSibling&&(a.htmlFor=a.previousElementSibling.htmlFor)}),MktoForms2.whenReady(function(e){console.log("Marketo form ready, form ID:",e.getId()),(async()=>{let e="false"===Te||void 0===Te?null:Te;document.querySelectorAll('.mktoFormRow input[type="email"]').forEach(t=>{t.value=e,t.disabled=!1,t.classList.contains("loading")&&t.classList.remove("loading")})})(),ge(),setTimeout(()=>{!function(){const e=document.querySelector(".mktoLogicalField.mktoCheckboxList"),t=e?.querySelectorAll("input").length>1;if(!e||!t)return;const n=e.cloneNode(!0);e.insertAdjacentElement("afterend",n),e.style.display="none";let a=document.getElementById("dropdownWrapper");a||(a=document.createElement("div"),a.id="dropdownWrapper",a.style="width:100%",n.parentNode.insertBefore(a,n.nextSibling));const o=document.createElement("div");o.className="dropdown-container",o.id="dropdownContainer";const i=document.createElement("div");i.className="dropdown-header",i.id="dropdownHeader",i.textContent="Which solutions are you interested in? (Select all that apply)*",o.appendChild(i);const s=document.createElement("div");s.className="dropdown-content",s.addEventListener("change",()=>{const e=s.querySelector("ul");null!==s.querySelector(":checked")?e.removeAttribute("mktoInvalid"):e.setAttribute("mktoInvalid","")}),o.appendChild(s);const r=document.createElement("ul");s.appendChild(r);const l=n.children;for(let e=0;e<l.length;e++){const t=l[e];if("INPUT"===t.tagName&&"checkbox"===t.type){t.id=`${t.id}-cloned`;const n=l[e+1];if(n&&"LABEL"===n.tagName){const a=document.createElement("li");n.setAttribute("for",`${n.getAttribute("for")}-cloned`),a.appendChild(t.cloneNode(!0)),a.appendChild(n.cloneNode(!0)),r.appendChild(a),e++}}}a.appendChild(o),n.parentNode.removeChild(n),i.addEventListener("click",function(){o.classList.toggle("open")});const c=r.querySelectorAll('input[type="checkbox"]');
1c.forEach(e=>{e.addEventListener("change",function(){let e=this.closest(".mktoFieldWrap").querySelector(".mktoCheckboxList").querySelector(`[value='${this.value}']`);this.checked?e.checked=!0:e.checked=!1;let t=[];c.forEach(e=>{e.checked&&t.push(e.value)}),i.textContent=t.length?t.join(", "):"Which solutions are you interested in? (Select all that apply)*",t.length>0&&o.classList.remove("showErrorMsg")})}),document.addEventListener("click",function(e){o.contains(e.target)||o.classList.remove("open")})}(),ve(e.getId())},500),$e(e.getFormElem()[0]),Ae&&"false"===Te&&(async()=>{const e=`${a()}/wp-admin/admin-ajax.php`,t=new FormData,n=document.querySelectorAll('.mktoFormRow input[type="email"]');t.append("action","prefill_marketo_forms"),t.append("form_status","true"),n.forEach(e=>{e.disabled=!0,e.classList.add("loading")});try{const a=await fetch(e,{method:"POST",body:t}),o=await a.text();Te=o,n.forEach(e=>{e.value=o;const t=e.closest("form"),n=t.querySelector('[name="Company"]');n&&(n.value=null,n.closest(".mktoFormCol").classList.add("d-none")),e.disabled=!1,e.classList.remove("loading"),e.value&&Re(e.value,t,t.querySelectorAll(".mktoButton"))})}catch(e){console.error(e)}})();const t=e.getFormElem()[0],n=t.querySelectorAll("fieldset");"undefined"!==n&&n.length>0&&((e,t)=>{const n=t.length,a=e.getFormElem()[0],o=a.querySelector('button[type="submit"]'),i=o.parentNode.parentNode;o.classList.add("d-none"),i&&i.classList.add("submitBtnRow");let s=!1;Ie(e,t.length),t.forEach((e,t)=>{const a=t+1,o=`step-${t+1}`,i=e.querySelector("legend");let s=document.createElement("div"),r=document.createElement("button");0===t&&e.classList.add("activeFieldset"),1===a&&Fe(a),e.classList.add(o),i.classList.add("d-none"),s.className="btnContainer px-3",e.dataset.formStep=a,n!==a&&(r.type="button",r.className="mktoButton btn btn-primary btn-primary--blue w-100",r.dataset.formStep=a,r.textContent=i.innerText,s.appendChild(r)),e.appendChild(s)}),a.addEventListener("click",function(a){if(!a.target.dataset.formStep)return;if(s)return void console.log("Step processing blocked - already processing");const i=a.target.dataset.formStep,r=a.target;if(i){s=!0,r.disabled=!0,console.log("Processing step:",i,"totalSteps:",n);const a=t[i-1],l=a.querySelectorAll("input[required], select[required], textarea[required], input.mktoRequired, select.mktoRequired, textarea.mktoRequired");let c=!0;l.forEach(e=>{e.value?.trim()?e.classList.remove("mktoInvalid"):(e.classList.add("mktoInvalid"),c=!1)});const d=a.querySelector(".dropdown-container");if(d){const e=d.querySelectorAll('input[type="checkbox"]:checked'),t=a.querySelector(".dropdown-container");0===e.length?(t&&t.classList.add("showErrorMsg"),c=!1,console.log("â Please select at least one checkbox option")):t&&t.classList.remove("showErrorMsg")}if(!c)return console.log("â Please fill all required fields before continuing"),s=!1,void(r.disabled=!1);console.log("â
All required fields filled in step",i),setTimeout(()=>{const l=a.querySelectorAll("input.mktoInvalid, select.mktoInvalid, textarea.mktoInvalid"),c=a.querySelector('input[type="email"]'),d=!!c&&oe&&true,u=!c||!0===lt;let m=0===l.length&&!d&&u;if(console.log("isEmailInvalid:",d,"isEmailValidByZb:",lt,"Next step:",Number(i)+1),m){a.classList.remove("activeFieldset");const r=Number(i)+1;Ie(e,n,r),Fe(r),t[r-1].classList.add("activeFieldset"),r===n&&o.classList.remove("d-none"),s=!1;try{if(window.location.pathname.includes("/sign-up")&&window.afGTMTracking){const t=e.vals(),n=t.My_company_is__c||"";if(console.log("[GTM Debug] Step progression to step",r,"company type:",n),2===r&&"A brand with a mobile app"===n){const e={company_size:t.Company_Size__c||t.companysize,company_industry:t.Industry,company_mau:t.Current_MAU__c||t.mau,company_promotion_channel:t.Promotion_Channel__c||t.promotion_channel,company_monetization_model:t.Monetization_Model__c||t.monetization_model,company_ad_budget:t.Mobile_Ad_Spend_Annual__c||t.budget||t.ad_budget,company_apd:t.Projected_Paid_Downloads__c||t.apd};console.log("[GTM Debug] Tracking signup_start_advertiser (step 1 â 2)",e),"function"==typeof window.afGTMTracking.trackSignupAdvertiser&&window.afGTMTracking.trackSignupAdvertiser(e)}else 3===r&&"A brand with a mobile app"===n&&(console.log("[GTM Debug] Tracking signup_start_advertiser_details (step 2 â 3)"),"function"==typeof window.afGTMTracking.trackSignupAdvertiserDetails&&window.afGTMTracking.trackSignupAdvertiserDetails())}}catch(e){console.log("[GTM Debug] Error tracking step progression:",e)}}else{if(d||!1===lt){const e=a.querySelector('input[type="email"]');e&&(e.classList.remove("mktoValid"),e.classList.add("mktoInvalid"))}s=!1,r.disabled=!1}},50)}})})(e,n),Be(e);let o=$(e.getFormElem()),i=o.data("form-cta"),s=o.data("after-button"),r=o.data("button-aft"),l=o.data("button-aft-block"),c=o.data("isqa"),d=document.querySelector(`#${o[0].id}`).querySelector(".form-preloader");c&&(e=>{const t=e.querySelector('select[name="My_company_is__c"]'),n=e.querySelector(".activeFieldset"),a=n.querySelectorAll(".mktoFormRow"),o=n.querySelector(".btnContainer"),i=document.createElement("p");i.classList.add("mt-4","mb-0","info-text-holder"),a.forEach((e,t)=>{0!==t&&e.classList.add("d-none")}),o.classList.add("d-none"),t&&t.addEventListener("change",n=>{let s=document.querySelector(".step-title--image");const r=n.target.value,l="An agency"===r,c="An ad network / offers tools for marketers"===r,d=l||c||""===r;((e,t)=>{let n=document.querySelector(".btn-back-form");n||(n=document.createElement("button"),n.classList.add("btn","btn-back-form"),n.innerHTML='\n <svg width="12" height="10" viewB
1ox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4.81299 1.35394C5.10738 0.994558 5.04772 0.470148 4.67973 0.18264C4.31174 -0.104868 3.77478 -0.0466002 3.48038 0.312785L0.280472 4.21916C0.0941031 4.44667 0.000613555 4.72192 3.17915e-06 4.99731L0 5.00001L3.17868e-06 5.00272C0.000607148 5.27812 0.0940966 5.55338 0.280472 5.7809L3.48038 9.68728C3.77477 10.0467 4.31174 10.1049 4.67973 9.81742C5.04772 9.52991 5.10738 9.0055 4.81299 8.64612L2.5089 5.83334L10.8889 5.83334C11.3184 5.83334 11.6667 5.46025 11.6667 5.00001C11.6667 4.53977 11.3184 4.16668 10.8889 4.16668L2.50893 4.16668L4.81299 1.35394Z" fill="#171717"/>\n </svg>\n <span>Back</span>\n ',document.querySelector(".signup-form-columns__form").appendChild(n),n.addEventListener("click",function(){const e=t.querySelector('select[name="My_company_is__c"]'),n=t.querySelector(".activeFieldset"),a=t.querySelectorAll("fieldset");let o=-1;if(a.forEach((e,t)=>{e.classList.contains("activeFieldset")&&(o=t),e.classList.remove("on")}),0===o)e.selectedIndex=0,e.dispatchEvent(new Event("change"));else if(o>0){const e=o-1,i=e+1;n.classList.remove("activeFieldset"),a[e].classList.add("activeFieldset");const s=t.querySelector('button[type="submit"]');s&&i!==a.length&&s.classList.add("d-none");const r=t.parentNode.querySelectorAll(".form-steps__button[data-form-step]"),l=String(i);r.forEach(e=>{const t=Number(e.dataset.formStep);e.dataset.formStep===l?e.classList.add("on"):e.classList.remove("on"),t<i?e.classList.add("valid"):t>i&&e.classList.remove("valid")}),Fe(i)}})),""===e?n.classList.add("d-none"):n.classList.remove("d-none")})(r,e),s.style.display=""===r?"block":"none";const u=window.location.hostname.includes("staging.appsflyer.com")?"https://staging.appsflyer.com":"https://www.appsflyer.com";((e,n,s,r)=>{a.forEach(t=>{e?t!==r.closest(".mktoFormRow")&&(t.classList.add("d-none"),o.classList.add("d-none")):(t.classList.remove("d-none"),o.classList.remove("d-none"))}),o&&(e?o.setAttribute("disabled",!0):o.removeAttribute("disabled")),n&&s?(i.innerHTML=`Welcome!<br> Please continue to the agencies application form ${n} <div><a class=" btn btn-primary btn-primary--blue w-100 btn_info-text mt-4" href="${s}">Next</a></div>`,t.parentNode.insertBefore(i,t.nextSibling.nextSibling)):i.parentNode&&i.parentNode.removeChild(i)})(d,l?"for agencies ":c?"for integrated partners ":"",l?`${u}/start/agencies/`:c?`${u}/company/contact/partners/`:"",n.target);try{window.location.pathname.includes("/sign-up")&&window.afGTMTracking&&(l?(console.log("[GTM Debug] Tracking signup_start_agency (dropdown selection)"),"function"==typeof window.afGTMTracking.trackSignupAgency&&window.afGTMTracking.trackSignupAgency()):c&&(console.log("[GTM Debug] Tracking signup_start_partner (dropdown selection)"),"function"==typeof window.afGTMTracking.trackSignupPartner&&window.afGTMTracking.trackSignupPartner()))}catch(e){console.log("[GTM Debug] Error tracking company type selection:",e)}})})(t),(e=>{const t=()=>{let t=e.querySelector('[name="HSUTMLanguage__c"]');t&&window.userLang&&(t.value=window.userLang)};window.userLang?t():Ee().then(t)})(o[0]);const u=o[0].querySelector('[name="Company"]'),m=!!u&&u.closest(".mktoFormCol");m&&m.classList.add("d-none");const p=o[0].querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea');if(console.log("Found form fields for label toggle:",p.length),p.forEach(e=>Ne(e)),s){const e=document.querySelector(`#${o[0].id} .mktoHtmlText`);e.closest(".marketo-form__form-holder").append(e)}const f=o[0],h=f.dataset.tncSource;if(h&&"marketo"!==h){const e=f.querySelector(".mktoHtmlText"),t=f.querySelector(".mktoCustomTnc");e&&t&&(e.innerHTML=t.innerHTML,t.remove())}const g=afJs.marketo_captcha_text;if(g){const e=document.querySelector(`#${o[0].id} .mktoCaptchaDisclaimer`);e&&(e.innerHTML=g)}ze(o[0].id,"remove"),document.querySelector(`#${o[0].id}`).classList.add("on"),d&&d.remove(),n&&0!==n.length||!i||(document.querySelector(`#${o[0].id} .mktoButton`).innerHTML=i),document.querySelector(`#${o[0].id}`).querySelector('button[type="submit"]').dataset.aft=r?r.trim():"form-submit",document.querySelector(`#${o[0].id}`).querySelector('button[type="submit"]').dataset.aftBlock=l?l.trim():"marketo-form",document.querySelector(`#${o[0].id}`).querySelector('button[type="submit"]').id=`btn_${o[0].id}`})),[["afc_source","utm_source"],["afc_medium","utm_medium"],["afc_campaign","utm_campaign"],["afc_content","utm_content"],["afc_term","utm_term"],["App_Installment_Base__c","App_Installment_Base__c"],["TopAppCategory__c","TopAppCategory__c"]].forEac
1h(e=>{let t=le(e[0]);t&&sessionStorage.setItem(e[0],t)});const Ge=()=>{let e=new Date;return e=new Date(e.getTime()),e.toISOString()},ze=(e,t)=>{let n=document.querySelectorAll('[name="Last_AFC_Date__c"]');if(document.getElementById("Last_AFC_Date__c")||"remove"!==t){if(null!==document.getElementById("Last_AFC_Date__c")&&"remove"===t&&(document.getElementById("Last_AFC_Date__c").value=null),0===n.length&&"add"===t){let t;t=document.createElement("input"),t.setAttribute("type","hidden"),t.setAttribute("name","Last_AFC_Date__c"),t.setAttribute("id","Last_AFC_Date__c"),t.value=Ge(),document.getElementById(e).appendChild(t)}n=document.querySelectorAll('[name="Last_AFC_Date__c"]'),n.forEach(e=>{e.value="remove"===t?null:Ge()})}},He=(e,t)=>{let n=je(be,"");for(let t in n)if(n.hasOwnProperty(t)){let a=t;"internalrefplat"!==t&&"inrefplat"!==t||(a="HS_InternalRefPlat__c",ue(e[0].id,a,n[t]))}},je=(e,t="session")=>{let n={};if(e.forEach(e=>{let t=le(e[0]);t&&t.length>0&&(n[e[0]]=t)}),"session"===t){let e=JSON.parse(sessionStorage.getItem("sessionParams"))||{};return Object.assign(e,n),sessionStorage.setItem("sessionParams",JSON.stringify(e)),!!e}return n};window.addEventListener("DOMContentLoaded",function(){["drift","optinmonster"].forEach(e=>{if(!1!==le(e)){let t=new Date;t.setTime(t.getTime()+432e5),document.cookie=`inrefplat=${e}; expires="${t.toUTCString()}"; path=/`}}),setTimeout(()=>{void 0!==Q&&Q.length>0&&He(Q),void 0!==ee&&ee.length>0&&He(ee)},3e3),"undefined"!=typeof MktoForms2&&ee.length>0&&De(ee),setTimeout(()=>{const e=document.querySelectorAll('form input[type="text"], form input[type="email"], form input[type="tel"], form input[type="url"], form textarea, form select');console.log("DOMContentLoaded: Setting up label toggle for",e.length,"fields"),e.forEach(e=>Ne(e))},1e3)}),document.addEventListener("om.Campaign.afterShow",function(e){const t=e.detail.Campaign.contain.querySelectorAll("form.mktoForm"),n=e.detail.Campaign.contain.attributes.id.value+"-ResetCSS";t&&De(t),n&&document.getElementById(n).remove()});const Ue={AF:"Afghanistan",AX:"Aland Islands",AL:"Albania",DZ:"Algeria",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Cote D'Ivoire",HR:"Croatia",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Republic of Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PS:"Palestinian Territory",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Reunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serb
1ia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",ES:"Spain",LK:"Sri Lanka",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Vietnam",VG:"Virgin Islands, British",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},We={en:{required:"Required field","email-invalid":"Invalid email address","business-email-invalid":"Please enter your work email","password-invalid":"Invalid password","phone-invalid":"Invalid number","text-non-latin":"English characters only","text-characters":"Letters only","text-emails-list":"Please use valid email only, separated by a semicolon","url-invalid":"Invalid URL","checkbox-required":"You must check this box","radio-required":"Please select","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Please wait...","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and
1you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"Max 50 characters allowed",next:"Next"},zh:{required:"Required field","email-invalid":"æ æé®ç®±","business-email-invalid":"Please enter your work email","password-invalid":"Invalid password","phone-invalid":"Invalid number","text-non-latin":"English characters only","text-characters":"Letters only","text-emails-list":"Please use valid email only, separated by a semicolon","url-invalid":"Invalid URL","checkbox-required":"You must check this box","radio-required":"Please select","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"请ç¨ç...","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"ä¸è¶
è¿ 50 个å",next:"Next"},es:{required:"Campo obligatorio","email-invalid":"Dirección de correo electrónico no válida","business-email-invalid":"Por favor ingresa tu correo electrónico de trabajo","password-invalid":"Contraseña inválida","phone-invalid":"Número inválido","text-non-latin":"Solo caracteres ingleses","text-characters":"Letters only","text-emails-list":"Utiliza solo un correo electrónico válido, separado por un punto y coma\n","url-invalid":"URL inválida","checkbox-required":"Debes marcar esta casilla","radio-required":"Por favor selecciona","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Espera por favor...","no-results":"No se han encontrado resultados","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and
1you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"Máximo 50 caracteres",next:"Next"},ko:{required:"íì ì
ë ¥ë","email-invalid":"ì í¨íì§ ìì ì´ë©ì¼ 주ì","business-email-invalid":"ì
ë¬´ì© ì´ë©ì¼ì ì
ë ¥íì¸ì","password-invalid":"ì í¨íì§ ìì ë¹ë°ë²í¸","phone-invalid":"ì í¨íì§ ìì ì íë²í¸","text-non-latin":"ì문 ìíë²³ë§ ê°ë¥í©ëë¤","text-characters":"Letters only","text-emails-list":"ì´ë©ì¼ì´ ì¬ë°ë¥¸ì§ íì¸íì¸ì. ê° ì´ë©ì¼ì ì¸ë¯¸ì½ë¡ (;)ì¼ë¡ 구ë¶íì¸ì","url-invalid":"ì í¨íì§ ìì URL","checkbox-required":"ì´ ì²´í¬ë°ì¤ë¥¼ ì²´í¬íì
ì¼ í©ëë¤","radio-required":"ì ííì¸ì","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"ì ìë§ ê¸°ë¤ë ¤ì£¼ì¸ì","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and
1you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"ìµë 50ì",next:"Next"},pt:{required:"Campos obrigatórios","email-invalid":"Endereço de email inválido","business-email-invalid":"Por favor digite o seu email profissional","password-invalid":"Senha inválida","phone-invalid":"Número inválido","text-non-latin":"Caracteres em inglês apenas","text-characters":"Letters only","text-emails-list":"Use apenas um e-mail válido, separado por ponto e vÃrgula","url-invalid":"URL inválido","checkbox-required":"Você deve marcar aqui","radio-required":"Por favor selecione","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Por favor, aguarde...","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Carregando","long-text":"Máximo de 50 caracteres",next:"Next"},ru:{required:"ÐбÑзаÑелÑное поле","email-invalid":"ÐведиÑе email-адÑÐµÑ Ð² ÑоÑмаÑе [email protected]","business-email-invalid":"ÐожалÑйÑÑа, введиÑе Ð²Ð°Ñ ÑабоÑий email","password-invalid":"ÐевеÑнÑй паÑолÑ","phone-invalid":"ÐевеÑнÑй номеÑ","text-non-latin":"ТолÑко английÑкие бÑквÑ","text-emails-list":"ÐожалÑйÑÑа, иÑполÑзÑйÑе ÑолÑко пÑавилÑнÑе адÑеÑа ÑлекÑÑонной поÑÑÑ, ÑазделеннÑе ÑоÑкой Ñ Ð·Ð°Ð¿ÑÑой","url-invalid":"ÐевеÑÐ½Ð°Ñ ÑÑÑлка","checkbox-required":"ÐалоÑка в ÑÑом поле обÑзаÑелÑна","radio-required":"ÐожалÑйÑÑа, вÑбеÑиÑе","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Please wait...","no-results":"No results found","form-error":"Sorry! We've encountered an error during submission. Please try again later.",loading:"Loading","long-text":"Ðе более 50 Ñимволов",next:"Next"},de:{required:"Pflichtfeld","email-invalid":"Ungültige E-Mail Adresse","business-email-invalid":"Bitte geben Sie Ihre E-Mail Addresse an","password-invalid":"Ungültiges Passwort","phone-invalid":"Ungültige Telefonnummer","text-non-latin":"Nur englische Zeichen","text-characters":"Letters only","text-emails-list":"Bitte verwenden Sie nur gültige E-Mail-Adressen, getrennt durch ein Semikolon","url-invalid":"Ungültige URL","checkbox-required":"Dieses Feld ist ein Pflichtfeld","radio-required":"Bitte auswählen","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Please wait...","no-results":"No results found","form-error":"Sorry! We've encountered an error during submission. Please try again later.",loading:"Loading","long-text":"Maximal 50 Zeichen erlaubt",next:"Next"},ja:{required:"ãã¡ãã¯å¿
é é
ç®ã§ã","email-invalid":"ç¡å¹ãªã¡ã¼ã«ã¢ãã¬ã¹ã§ãã","business-email-invalid":"ãã¸ãã¹ç¨ã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ãã","password-invalid":"ç¡å¹ãªãã¹ã¯ã¼ãã§ã","phone-invalid":"ç¡å¹ãªé»è©±çªå·ã§ã","text-non-latin":"ã¢ã«ãã¡ãããã®ã¿å©ç¨å¯è½ã§ã","text-characters":"Letters only","text-emails-list":"ã»ãã³ãã³ã§åºåãããæå¹ãªEã¡ã¼ã«ã®ã¿ã使ç¨ãã¦ãã ãã","url-invalid":"ç¡å¹ãªURL","checkbox-required":"ãã¡ãã®boxãã確èªãã ãã","radio-required":"鏿ãã¦ãã ãã","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"å°ã
ãã¾ã¡ãã ãã...","no-results":"No results found","form-error":'ç³ã訳ãããã¾ããããã©ã¼ã ã®éä¿¡ã«åé¡ãããã¾ããããã¼ã ã対å¿ãã¦ãã¾ãã®ã§ãå°ãå¾
ã£ã¦å度ã試ããã ãããå度åãåé¡ãçºçããéã«ã¯<a href="mailto:[email protected]">[email protected]</a>"ã¾ã§ãé£çµ¡ãã ããã',loading:"Loading","long-text":"æå¤§50æåã¾ã§å¯è½",next:"Next"},fr:{required:"Champ obligatoire","email-invalid":"Adresse électronique non valide","business-email-invalid":"Veuillez entrer votre adresse e-mail professionnelle","password-invalid":"Mot de passe invalide","phone-invalid":"Numéro non valide","text-non-latin":"Caractères français uniquement","text-characters":"Letters only","text-emails-list":"Veuillez utiliser uniquement des emails valides, séparés par un point-virgule","url-invalid":"URL non valide","checkbox-required":"Vous devez cocher cette case","radio-required":"Veuillez sélectionner","invali
1d-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Please wait...","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"50 caractères maximum",next:"Next"},"zh-hans":{required:"å¿
å¡«","email-invalid":"Invalid email address","business-email-invalid":"Please enter your work email","password-invalid":"æ æå¯ç ","phone-invalid":"Invalid number","text-non-latin":"English characters only","text-characters":"Letters only","text-emails-list":"Please use valid email only, separated by a semicolon","url-invalid":"Invalid URL","checkbox-required":"You must check this box","radio-required":"Please select","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Please wait...","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and
1you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"Max 50 characters allowed",next:"Next"},vi:{required:"Trưá»ng bắt buá»c","email-invalid":"Äá»a chá» email không hợp lá»","business-email-invalid":"Vui lòng nháºp email công viá»c cá»§a bạn","password-invalid":"Máºt khẩu không hợp lá»","phone-invalid":"Sá» không hợp lá»","text-non-latin":"Chá» chấp nháºn ký tá»± tiếng Anh","text-characters":"Letters only","text-emails-list":"Vui lòng sá» dụng email hợp lá», phân tách bằng dấu chấm phẩy","url-invalid":"ÄÆ°á»ng dẫn không hợp lá»","checkbox-required":"Bạn phải chá»n ô nà y","radio-required":"Vui lòng chá»n","invalid-zipcode":"Invalid zipcode","file-upload-size":"","recaptcha-not-valid":"","please-wait":"Please wait...","no-results":"No results found","form-error":'Sorry, there was a problem submitting the form. Our team is on it, so give us just a bit and
1you can try again. If you encounter the same problem, you can contact us at <a href="mailto:[email protected]">[email protected]</a>',loading:"Loading","long-text":"Max 50 characters allowed",next:"Next"}},Ve=document.querySelector("html").attributes.lang.value.substring(0,2),Ke=(e,t,n)=>{let a=e.parentNode.querySelector(".field__error-msg"),o=!1;if("long-text"===n&&(o=e.hasAttribute("data-max-length")?e.dataset.maxLength:null),n="object"==typeof t?t[1]:n,(t="object"==typeof t?t[0]:t)&&a)a.remove(),e.parentNode.classList.remove("field--error");else if(!t){let t=We[Ve]?We[Ve]:We.en,i=e.dataset.errorMsg?e.dataset.errorMsg:t[n];!1!==o&&(i=i.replace("50",o)),a?a.textContent=i:(e.parentNode.classList.add("field--error"),e.parentNode.insertAdjacentHTML("beforeend",`<span class="field__error-msg">${i}</span>`))}return t},Je=(e,t)=>{let n;switch(e){case"text":case"textarea":default:n=ot;break;case"email":n=ct;break;case"password":n=ft,t="password-invalid";break;case"checkbox":n=mt,t="checkbox-required";break;case"radio":n=pt,t="radio-required";break;case"tel":n=ut,t="phone-invalid";break;case"url":n=dt,t="url-invalid"}return[n,t]},Ze=(e,t,n)=>{let a=he("urlParams")?he("urlParams"):{},o=new Date;a=decodeURIComponent(a),o.setTime(o.getTime()+31536e6)},Ye=async(e="")=>{const t=document.getElementById("validate_pid");if(console.log("validation_input",t),!t)return;if(!e)return;const n=a()+"/wp-admin/admin-ajax.php";try{const a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"generate_pid",companyName:e.trim()})});if(!a.ok)throw new Error(`HTTP error! Status: ${a.status}`);const o=await a.json();if(console.log("data",o),o.success){Qe(o.data.pid);const e=document.querySelector("#partner_id");e&&(e.value=o.data.pid),document.getElementById("field--form-navigation--btn-step-3").disabled=!1,t.value="true"}else t.value="false"}catch(e){t.value="false"}},Xe=e=>{let t,n=e.querySelector("#partner_id");if(n&&""!==n.value.trim())return t=n.value,t?((async(e="")=>{if(!document.getElementById("validate_pid"))return;if(!e)return;if(!/^[a-z0-9]{5,13}_int$/.test(e))return void et(e);let t=a()+"/wp-admin/admin-ajax.php";try{const n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"validate_pid",pid:e})}),a=await n.json(),o=document.querySelector(".pid-validation");o&&o.remove(),a.success?Qe(a.data.pid):et(e,a.data.error_id)}catch(t){const n=document.querySelector(".pid-validation");n&&n.remove(),et(e)}})(t),t):void 0};function Qe(e=""){document.querySelector(".pid-validation")?.remove();const t=document.getElementById("validate_pid");document.querySelector("#partner_id").value=e,t.value="true",document.getElementById("field--form-navigation--btn-step-3").disabled=!1}function et(e="",t=1){const n=document.getElementById("validate_pid"),a=document.querySelector("#partner_id"),o=1===t?`\n<div class="field my-20">\n<div class="error-message pid-validation">\n <strong>Invalid PID format:</strong>\n <ul>\n <li>Must only contain lowercase letters (<code>a-z</code>) and numbers (<code>0-9</code>).</li>\n <li>Must be 5 to 13 characters long before <code>_int</code>.</li>\n <li>Must end with <code>_int</code>.</li>\n </ul>\n <p>Your PID: <code>${e}</code> does not match these rules.</p>\n <p>Example of a valid PID: <code>example123_int</code>.</p>\n</div>\n</div>\n`:'\n<div class="field my-20">\n<div class="error-message pid-validation">\n <strong>Existing PID Format Detected:</strong>\n <p>The PID you entered matches an existing format and cannot be used. Please use a new PID or contact support for assistance.</p>\n</div>\n</div>\n';document.querySelector(".pid-validation")?.remove(),a.parentElement.insertAdjacentHTML("afterend",o),n.value="false",document.getElementById("field--form-navigation--btn-step-3").disabled=!0}const tt=async(e,t)=>{let n,a=!1;if(t.hasAttribute("data-max-length")&&!at(t.value,t.dataset.maxLength))return Ke(t,!1,"long-text"),!1;if(!0!==t.required||"password"===t.type||""!==t.value&&0!==t.value.trim().length){if(!1===t.required&&""===t.value)a=!0;else if(""!==t.value||"password"===t.type||"password"===t.name){let e="password"===t.name?"password":t.type;"hidden"===t.type?a=!0:(n=await(async(e,t,n)=>[await e(t),n])(Je(e)[0],t,Je(e)[1]),a=Ke(t,n[0],n[1]))}}else Ke(t,!1,"required");return a},nt=async e=>{let t=Array.from(e.elements).filter(e=>
1"input"===e.localName&&"hidden"!==e.type||"select"===e.localName||"textarea"===e.localName),n=await Promise.all(t.map(e=>tt(0,e)));return n.includes(!1)&>(e,"enable"),!n.includes(!1)},at=(e,t)=>e.length<=Number(t),ot=async e=>{const t=e.classList.contains("validate-latin"),n=e.classList.contains("validate-emails-list")&&e.required;let a=/^([0-9\/\\A-Za-z!"#$%&()*+\-,.:'`;§±<=>?@^\[\]_{|}~\s]*)$/.test(e.value),o=/[<>\{\}]/.test(e.value);if(t)return[a,"text-non-latin"];if("text"===e.type&&o)return[!1,"text-characters"];if(n){let t=await(async e=>Promise.all(e.value.split(";").map(async e=>await ct(e))))(e);return[!t.includes(!1),"text-emails-list"]}return[!(!e.value&&e.required),"required"]},it=window.location,st=it.protocol+"//"+it.host+"/"+it.pathname.split("/")[0],rt=["adeven.com","ab180.co","proton.me","list.ru","internet.ru","domain.com","gml.com","tenjin.io","tenjin.com","branch.io","adjust.com","kochava.com","singular.net","mfilterit.com","revenuecat.com","airbridge.io","airbloc.org"];let lt=null;const ct=async e=>{if(void 0!==("string"==typeof e?e:e.value)||e.hasAttribute("data-nb-id")){const t=new RegExp('^(([^<>()\\[\\]\\.,;:\\s@"]+(.[^<>()\\[\\]\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+.)+[a-zA-Z]{2,}))$'),n=new RegExp("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$"),a=e=>t.test(e)&&n.test(e);let o="string"==typeof e?e.substring(e.lastIndexOf("@")+1):e.value.substring(e.value.lastIndexOf("@")+1),i="string"==typeof e||a(e.value),s=rt.includes(o),r="string"!=typeof e&&e.classList.contains("validate-business-email"),l="string"==typeof e||e.classList.contains("validate-emails-list");return s?[!s,"email-invalid"]:i?!1===lt?[!1,"email-invalid"]:r?oe?[!1,"business-email-invalid"]:[!await xe(e),"business-email-invalid"]:l?a(e):i:[i,"email-invalid"]}},dt=e=>{let t=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return!/^([0-9A-Za-z]){20,}$/.test(e.value.toString())&&!!t.test(e.value)},ut=e=>/^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$/.test(e.value),mt=e=>e.checked,pt=e=>{let t=e.disabled,n=e.required,a=document.querySelector(`input[name="${e.name}"]:checked`),o=a&&void 0!==a.value&&""!==a.value;return t?!!t:!(n&&!o)},ft=e=>{let t=e.value,n=!0;const a={length:{test:t.length>=8&&t.length<=40},uppercase:{test:/[A-Z]/.test(t)},lowercase:{test:t&&/[a-z]/.test(t)},numbers:{test:/[0-9]/.test(t)},"special-characters":{test:/[#!%@?<>@$^&*()]/.test(t)},"email-match":{test:t!==e.parentNode.parentNode.querySelector('input[type="email"]').value}};return Object.entries(a).forEach(t=>{let o=`field__password-tooltip--rule-${t[0]}`,i=e.parentNode.querySelector(`.${o}`),s=a[t[0]].test;i.className=s?`valid ${o}`:`error ${o}`,s||(n=!1)}),n},ht=(e,t)=>{document.querySelectorAll('[name="g-recaptcha-response"]').forEach(e=>{e.remove()});let n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","g-recaptcha-response"),n.setAttribute("value",t),document.getElementById(e).appendChild(n)};"undefined"!=typeof grecaptcha&&grecaptcha.ready(function(){grecaptcha.render("recaptcha1",{sitekey:"6LfVEhkaAAAAAL2Mv8ARzzPScHRp0_K0JL2MgVnU",size:"invisible"})});const gt=(e,t)=>{if("FIELDSET"!==e.nodeName){let n=e.id?e.id:e.srcElement.id,a=document.querySelector(`#${n} [type="submit"]`);if("text-change"===t)a.innerText=We[Ve]["please-wait"];else if("error"===t){let e=document.createElement("span");e.classList.add("mt-4","px-30","has-small-font-size","text-danger"),e.innerHTML=We.en["form-error"],a.insertAdjacentElement("afterend",e),a.innerText=a.dataset.cta?a.dataset.cta:"Submit",a.disabled=!1}else a.disabled="disable"===t}},vt=e=>Ue.hasOwnProperty(e)?Ue[e]:e,yt=document.querySelectorAll(".form-steps");yt&&yt.forEach(e=>{let t=document.getElementById(e.dataset.formId),n=t?document.querySelector(`.form-steps[data-form-id="${t.id}"]`).querySelectorAll("[data-step]"):[],a=[...t?t.querySelectorAll("[data-step]"):[],...n];a&&a.length>
10&&a.forEach(e=>{e.addEventListener("click",function(e){(async(e,t,n)=>{let a,o=n.querySelector("fieldset.on"),i=n.querySelectorAll("fieldset"),s=document.querySelector(".signup-form__header--back"),r=t.target.dataset.step,l=document.querySelector(`.form-steps[data-form-id="${n.id}"] .form-steps--current`),c=document.querySelector(".signup-form__header--step-description"),d=document.querySelector(`fieldset[data-fieldset-id="${r}"]`).dataset.stepDescription;if("1"!==r?(a=await nt(o),s&&s.classList.add("d-none")):s&&s.classList.remove("d-none"),a||!a&&r<o.dataset.fieldsetId){if(d&&c&&(c.innerHTML=`<p>${d}</p>`),l&&(l.textContent=r),a)try{if(console.log("[GTM Debug] Step validation passed",{formId:n.id,endpoint:n.dataset.endpoint,stepNumber:r,hasGTMTracking:!!window.afGTMTracking}),"form-signup"===n.id&&"signup"===n.dataset.endpoint)if("2"===r&&window.afGTMTracking){const e=new FormData(o),t={};e.forEach((e,n)=>{t[n]=e}),console.log("[GTM Debug] Tracking signup_start_advertiser",t),window.afGTMTracking.trackSignupAdvertiser(t)}else"3"===r&&window.afGTMTracking&&(console.log("[GTM Debug] Tracking signup_start_advertiser_details"),window.afGTMTracking.trackSignupAdvertiserDetails())}catch(e){console.log("GTM tracking error:",e)}e.forEach((t,n)=>{let a=n>0?n-1:n;t.dataset.step===r?(t.classList.add("on"),e[a].classList.add("valid"),scroll(0,0)):t.classList.remove("on")}),i.forEach(e=>{e.classList.remove("on"),document.querySelector(`fieldset[data-fieldset-id="${r}"]`).classList.add("on")})}})(a,e,t)})})});const bt=document.querySelector(".btn-back-form--agencies");if(bt){const Yt=document.getElementById("form-signup");if(Yt){const Xt=Yt.querySelectorAll("fieldset"),Qt=document.querySelectorAll(".form-steps__button[data-step]"),en=()=>{const e=Yt.querySelector("fieldset.on");"1"===(e?e.dataset.fieldsetId:"1")?bt.classList.add("d-none"):bt.classList.remove("d-none")};en();const tn=new MutationObserver(en);Xt.forEach(e=>{tn.observe(e,{attributes:!0,attributeFilter:["class"]})}),bt.addEventListener("click",function(){const e=Yt.querySelector("fieldset.on");if(!e)return;const t=parseInt(e.dataset.fieldsetId),n=t-1;if(1!==t){if(n>=1){e.classList.remove("on");const t=Yt.querySelector(`fieldset[data-fieldset-id="${n}"]`);t&&t.classList.add("on"),Qt.forEach(e=>{const t=e.dataset.step;t===String(n)?e.classList.add("on"):e.classList.remove("on"),parseInt(t)>=n&&e.classList.remove("valid")});const a=document.querySelector(".signup-form__header--step-description"),o=t?t.dataset.stepDescription:"";o&&a&&(a.innerHTML=`<p>${o}</p>`),en(),scroll(0,0)}}else window.history.back()})}}document.querySelectorAll(".radio-conditional").forEach(e=>{e.addEventListener("click",function(t){let n=e.dataset.conditionTarget,a=e.dataset.conditionGroup,o=document.querySelector(`[data-condition-id="${n}"]`),i=document.querySelectorAll(`[data-condition-group="${a}"]`);if(n){i.forEach(e=>{e.classList.add("field--disabled"),e.querySelectorAll("input, textarea, select").forEach(e=>{e.disabled=!0,e.removeAttribute("required")})});let e=o.querySelectorAll("input, textarea, select");o.classList.remove("field--disabled"),e.forEach(e=>{e.disabled=!1,e.hasAttribute("data-required")&&e.setAttribute("required",!0)})}})});let wt=document.querySelectorAll(".phone-intl");if(wt.length>0){const nn=(e,t)=>{e.value||t.classList.toggle("field__label--focus")};wt.forEach(e=>{let t=e.parentNode.querySelector(".field__label");e.addEventListener("focus",function(n){nn(e,t)}),e.addEventListener("blur",function(n){let a=e.closest("form").id;_e(a,Se(a),"phone","phone-intl"),nn(e,t)})})}const St=e=>{let t=document.querySelector(".signup-form__form-disclaimer"),n=document.querySelector(".signup-form__header--back"),a=document.querySelector(".btn-back-form--agencies"),o=document.querySelector(".signup-form__header--col-main"),i=document.querySelector(".mobile-form"),s=document.querySelector(".mobile-popup-holder");t&&t.remove(),n&&n.remove(),a&&a.remove(),o&&o.classList.add("d-none"),o&&o.classList.contains("d-block")&&o.classList.remove("d-block");let r=document.querySelector(`#${e.id}`).closest(".form__form-holder"),l=e.clientHeight,c=r.closest(".form-confirmation")?r.closest(".form-confirmation"):document.querySelector(".form-confirmation");e&&document.querySelector(`#${e.id}
1`).classList.add("d-none"),(e=>{let t,n=document.querySelector(".form-confirmation__body"),a=n?n.innerHTML.match(/{([^}]+)}/g):null,o=a?a.map(e=>e.replace(/{|}/g,"")):null;o&&(o.forEach(a=>{let o=e.querySelector(`[name="${a}"]`).value;t=n.innerHTML.replace(new RegExp("{"+a+"}","gi"),o)}),n.innerHTML=t)})(e),c&&!c.hasAttribute("data-form-status")&&(c.dataset.formStatus="success"),c.classList.add("on"),c.classList.add("d-flex"),c.style.minHeight=`${l}px`,c.classList.remove("d-none"),i&&i.classList.add("d-none"),s&&s.classList.remove("active"),setTimeout(()=>c.classList.add("on"),100)};$.fn.serializeObject=function(){var e={},t=this.serializeArray();return $.each(t,function(){void 0!==e[this.name]?(e[this.name].push||(e[this.name]=[e[this.name]]),e[this.name].push(this.value||"")):e[this.name]=this.value||""}),e};const Lt=async(e,t)=>{e.querySelectorAll("input, textarea").forEach(e=>{"string"==typeof e.value&&e.value.length>250&&(e.value=e.value.substring(0,250))});let n=e.querySelector("#g-recaptcha-response"),o=e.querySelector('input[name="g_token"]');t&&o&&(o.value=t),t&&n&&(n.value=t),(!n||n&&""===n.value)&&ht(e.id,t);try{console.log("[GTM Debug] Form submission",{endpoint:e.dataset.endpoint,hasGTMTracking:!!window.afGTMTracking}),window.afGTMTracking&&("agencies"===e.dataset.endpoint?(console.log("[GTM Debug] Tracking signup_start_agency"),window.afGTMTracking.trackSignupAgency()):"partner"===e.dataset.endpoint&&(console.log("[GTM Debug] Tracking signup_start_partner"),window.afGTMTracking.trackSignupPartner()))}catch(e){console.log("GTM tracking error:",e)}let i="",s={};if(e.dataset.formEndpoint){i=e.dataset.formEndpoint;let t,n="form-signup"===e.id?JSON.stringify($(e).serializeObject()):function(e){let t,n,a=[];if("object"==typeof(e=document.getElementById(e.id))&&"FORM"===e.nodeName){let o=e.elements.length;for(let i=0;i<o;i++)if(t=e.elements[i],t.name&&!t.disabled&&"file"!==t.type&&"reset"!==t.type&&"submit"!==t.type&&"button"!==t.type)if("select-multiple"===t.type){n=e.elements[i].options.length;for(let e=0;e<n;e++)t.options[e].selected&&(a[a.length]=encodeURIComponent(t.name)+"="+encodeURIComponent(t.options[e].value))}else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(a[a.length]=encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))}return a.join("&").replace(/%20/g,"+")}(e);if(s={method:e.method,body:n,headers:t,mode:"cors",cache:"no-cache"},"form-signup"===e.id){if(s.headers={Accept:"application/json","Content-Type":"application/json"},"undefined"!=typeof AwsWafIntegration){const e=await AwsWafIntegration.getToken();s.headers["x-aws-waf-token"]=e}if(window.location.hostname.includes("staging")||!window.location.hostname.includes("appsflyer.com"))try{const e=await fetch(a()+"/wp-admin/admin-ajax.php",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"action=get_af_token"}),t=await e.json();t.success&&t.data.token&&(s.headers["Af-Validation-Token"]=t.data.token)}catch(e){console.error("Failed to get Af-Validation-Token:",e)}}else delete s.header}else{i=a()+"/wp-admin/admin-ajax.php";const t=new FormData(e);t.append("action","send_signup_data"),t.append("mode","cors"),t.append("endpoint",e.dataset.endpoint),t.append("cache","no-cache"),s={method:"POST",body:t}}try{fetch(i,s).then(e=>e.json().then(t=>({status:e.status,data:t}))).then(({status:t,data:n})=>{if(200===t||201===t)(e=>{window.dataLayer.push({event:"signup.form.success","mkto.form.values":Object.fromEntries(new FormData(e).entries())})})(e),document.querySelector(".form-confirmation")&&St(e),(()=>{let e=new FormData;e.append("action","delete_form_transient"),fetch(afJs.ajax_url,{method:"POST",body:e,credentials:"same-origin"}).then(e=>e).catch(e=>{console.error("Error:",e)})})();else if("invalid invitation"===n.message){const t=e.querySelector('input[name="formType"]'),n=t&&"dcp"===t.value;window.location.href=n?`${st}/signup-dcp-error/`:`${st}/signup-partners-error/`}else gt(e,"error")}).catch(e=>{console.log("catch error",e)})}catch(e){console.log("catch error",e)}};document.addEventListener("DOMContentLoaded",async function(){const e=await(async()=>window.userGeoLoc?window.userGeoLoc:(await ke(),window.userGeoLoc||"US"))();void 0!==Q&&Q.length>0&&Array.from(Q).filter(e=>
1e.id&&""!==e.id).forEach(t=>{t.hasAttribute("data-email-validation")||Be(t),t.addEventListener("submit",async function(n){gt(n,"disable"),n.preventDefault(),await nt(t)&&(gt(n,"text-change"),"cn"!==e&&function(e){grecaptcha.execute("6LfVEhkaAAAAAL2Mv8ARzzPScHRp0_K0JL2MgVnU",{action:"signup_form"}).then(function(t){Lt(e,t)})}(t),"cn"===e&&function(e){ht(e.id,"af-china"),Lt(e,"af-china")}(t))});let n=t.querySelectorAll('input:not([type="hidden"]), select');const a=we(Ye,500),o=we(Xe,500);n.forEach(e=>{let n;n="password"===e.type?"keyup":"blur",[n,"change"].forEach(function(n){e.addEventListener(n,function(){"name"===e.id&&""!==e.value&&a(e.value),"partner_id"===e.id&&(document.getElementById("field--form-navigation--btn-step-3").disabled=!0,o(t)),tt(0,e)})})}),$("select[multiple]").on("change",function(e){tt(0,e.target)}),t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], input[type="url"]').forEach(e=>(e=>{if(!e)return;const t=e.closest(".form__item")||e.closest(".mktoFormRow");if(!t)return;const n=t.querySelector("label");if(!n)return;const a=()=>{""!==e.value.trim()||document.activeElement===e?n.classList.add("label-hidden"):n.classList.remove("label-hidden")};e.addEventListener("focus",()=>{n.classList.add("label-hidden")}),e.addEventListener("blur",()=>{a()}),e.addEventListener("input",()=>{a()}),"TEXTAREA"===e.tagName&&e.addEventListener("change",()=>{})})(e))})}),".block-tiles-content"&&(parents=document.querySelectorAll(".block-tiles-content"),parents&&parents.forEach(e=>{let t=e.querySelectorAll(".block-tiles-content__tile .content");if(!t)return!1;let n=0;return t.forEach(e=>{e.offsetHeight>n&&(n=e.offsetHeight)}),t.forEach(e=>{e.style.height=n+"px"}),!0})),((e,t)=>{let n=document.querySelector(e);if(!n)return!1;let a=n.querySelectorAll(t);if(!a)return!1;a.forEach(e=>{e.addEventListener("click",()=>{e.classList.toggle("active")})})})(".block-compare-table",".table-body__row");document.addEventListener("DOMContentLoaded",function(e){(()=>{let e=document.getElementById("pre-demo-popup"),t=document.getElementById("start-email"),n=document.getElementById("emailError"),a=document.getElementById("pre-demo-popup-holder"),o=document.querySelector("body"),i=document.querySelector(".close-pre-demo"),s=null;e&&t&&(e.addEventListener("click",function(e){if(""===t.value.trim())e.preventDefault(),n.style.display="block",t.focus();else{n.style.display="none",s=t.value;let e=(e=>{let t=document.querySelector('.mktoFieldWrap input[type="email"]');if(t&&e){t.focus(),t.value="";const n=e.split("");return n.forEach((e,a)=>{setTimeout(()=>{t.value+=e;const o=new Event("input",{bubbles:!0});if(t.dispatchEvent(o),a===n.length-1){const e=new Event("change",{bubbles:!0});t.dispatchEvent(e)}},10*a)}),!0}return!1})(s);!0===e&&(a.classList.add("active"),o.classList.add("active-popup-body"))}}),t.addEventListener("keyup",function(){""!==t.value.trim()&&(n.style.display="none")}),i.addEventListener("click",function(e){a.classList.remove("active"),o.classList.remove("active-popup-body")}))})()});class _t{constructor(e){this.wrapper=document.querySelector(e),this.active=0}init(){this.wrapper&&(this.wrapper.querySelectorAll(".choice-btn").forEach(e=>{this.toggleButton(e)}),this.formSubmit(this.wrapper))}toggleButton(e){e&&e.addEventListener("click",e=>{e.preventDefault();let t=this.wrapper.querySelector(".btn-submit-plg"),n=e.target.form,a=e.target.classList[0],o=n.querySelectorAll("."+a);e.target.classList.contains("active")?(e.target.classList.remove("active"),this.active-=1):(o.forEach(e=>{e.classList.contains("active")&&(e.classList.remove("active"),this.active-=1)}),e.target.classList.add("active"),this.active+=1),2===this.active?t.classList.remove("disabled"):t.classList.add("disabled")})}formSubmit(e){e&&e.addEventListener("submit",e=>{e.preventDefault();let t=e.target.querySelectorAll("button"),n=document.getElementById("url_redirect").value,a={};t.forEach(e=>{e.classList.contains("active")&&(e.classList.contains("plg-installs")&&(a.App_Installment_Base__c=e.dataset.value),e.classList.contains("plg-category")&&(a.TopAppCategory__c=e.dataset.value))}),n&&(a.redirect=n),Object.keys(a).length>=3&&this.storeCookieData(a)})}
1storeCookieData(e){if(e){let t=window.dataLayer;window.dataLayer.push({event:"submitPLG",plgInstalls:e.App_Installment_Base__c,plgCategory:e.TopAppCategory__c}),console.log("TEST",e),sessionStorage.setItem("App_Installment_Base__c",e.App_Installment_Base__c),sessionStorage.setItem("TopAppCategory__c",e.TopAppCategory__c),t.some(e=>"submitPLG"===e.event)&&(window.location.href=e.redirect),$.magnificPopup.close()}}}document.addEventListener("DOMContentLoaded",function(){let e=document.querySelectorAll(".plg-popup-btn"),t=new _t(".plg-form");void 0!==e&&e.length>0&&(e.forEach(e=>{e.addEventListener("click",e=>{let t=e.target.getAttribute("data-url-redirect");t&&(document.getElementById("url_redirect").value=t)})}),t.init())}),document.querySelector(".infogram-embed")&&window.addEventListener("message",function(e){var t;try{t=JSON.parse(e.data)}catch(e){return!1}if("iframe.resize"!==t.context)return!1;var n=document.querySelector('iframe[src="'+t.src+'"]');if(!n)return!1;n.height=t.height}),$("body").hasClass("resource-template")&&$(window).on("orientationchange",function(e){$("iframe").each(function(){var e=$
1(this).attr("src");void 0!==e&&-1!==e.indexOf("infogram")&&($(this).attr("src",""),setTimeout(()=>{$(this).attr("src",e)},200))})}),window.addEventListener("load",()=>{let e=document.querySelectorAll(".block-linkedin-slider__iframe");e.length&&e.forEach(e=>{let t=e.querySelector("iframe");t&&t.setAttribute("scrolling","no")})});if(window.addEventListener("DOMContentLoaded",()=>{(()=>{const e=document.getElementById("nav-holder");if(!e||window.innerWidth<1025)return;const t=e.querySelectorAll(".mega-parent");let n=null,a=null;const o=()=>{t.forEach(e=>{e.classList.remove("mega-open");const t=e.querySelector(".mega-menu");t&&t.classList.remove("active","active-hover"),e.querySelectorAll(".mega-menu__column").forEach(e=>e.classList.remove("active-hover"))}),n=null,document.body.classList.remove("menu-open")},i=()=>{clearTimeout(a),a=setTimeout(o,400)};t.forEach(e=>{const t=e.querySelector(".mega-menu"),s=e.querySelector(".hover-bridge");t&&(e.addEventListener("mouseenter",()=>(e=>{if(clearTimeout(a),n!==e){o();const t=e.querySelector(".mega-menu");t&&(e.classList.add("mega-open"),t.classList.add("active"),n=e,document.body.classList.add("menu-open"))}})(e)),e.addEventListener("mouseleave",n=>{n.relatedTarget&&(e.contains(n.relatedTarget)||t.contains(n.relatedTarget))||i()}),t.addEventListener("mouseenter",()=>{clearTimeout(a)}),t.addEventListener("mouseleave",n=>{n.relatedTarget&&(e.contains(n.relatedTarget)||t.contains(n.relatedTarget))||i()}),s&&(s.addEventListener("mouseenter",()=>{clearTimeout(a)}),s.addEventListener("mouseleave",i)),t.querySelectorAll(".mega-menu__column").forEach(e=>{e.addEventListener("mouseenter",()=>{t.querySelectorAll(".mega-menu__column").forEach(e=>e.classList.remove("active-hover")),e.closest(".mega-menu").classList.add("active-hover"),e.classList.add("active-hover")}),e.addEventListener("mouseleave",()=>{e.classList.remove("active-hover"),e.closest(".mega-menu").classList.remove("active-hover")})}),t.querySelectorAll(".mega-menu__column-item").forEach(e=>{e.querySelector(".mega-menu__column-link")&&(e.addEventListener("mouseenter",n=>{e.contains(n.relatedTarget)||(t.querySelectorAll(".mega-menu__column-item").forEach(e=>e.classList.remove("active")),e.classList.add("active"))}),e.addEventListener("mouseleave",t=>{e.contains(t.relatedTarget)||e.classList.remove("active")}))}))})})(),(()=>{const e=document.getElementById("main-nav"),t=document.getElementById("blog-nav"),n=document.querySelector(".product-news-archive__sidebar"),a=document.querySelector(".navbar--categories-secondary");if(!e)return;const o=!!(t||a||n);let i=0,s=!1;const r=()=>{const r=window.pageYOffset||document.documentElement.scrollTop;r>i?(o&&(e.classList.add("scroll-down"),e.classList.remove("scroll-up")),t&&(t.classList.add("scroll-down"),t.classList.remove("scroll-up")),a&&(a.classList.add("scroll-down"),a.classList.remove("scroll-up")),n&&(n.classList.add("scroll-down"),n.classList.remove("scroll-up"))):(o&&(e.classList.add("scroll-up"),e.classList.remove("scroll-down")),t&&(t.classList.add("scroll-up"),t.classList.remove("scroll-down")),a&&(a.classList.add("scroll-up"),a.classList.remove("scroll-down")),n&&(n.classList.add("scroll-up"),n.classList.remove("scroll-down"))),i=r<=0?0:r,s=!1};window.addEventListener("scroll",()=>{s||(window.requestAnimationFrame(r),s=!0)})})()}),window.innerWidth<768){const an=document.querySelector(".subscribtion");if(an){const on=document.querySelector(".social-sharing__footer");for(;an.firstChild;)on.appendChild(an.firstChild)}}let kt=0;const Et=()=>{let e=document.getElementById("navbar-toggler");if(!e)return!1;let t=window.getComputedStyle(e);return e&&"none"!==t.display};document.addEventListener("DOMContentLoaded",function(){if(!document.querySelectorAll(".navbar-toggler").length)return;let e=document.querySelectorAll(".navbar-toggler"),t=document.querySelectorAll(".mega-parent");e.forEach(e=>{e.addEventListener("click",function(e){let a=document.querySelectorAll(".mega-menu"),o=document.getElementById("main-nav");const i=document.querySelectorAll(".mega-parent");let s=document.querySelector(".lang-switcher li");
1s&&s.classList.remove("on","mega-open"),i.forEach(e=>{e.style.display="flex"}),o.classList.remove("mega-menu-open"),this.classList.remove("oppend"),a.forEach(e=>{e.classList.remove("active"),e.parentNode.classList.remove("on","mega-open")}),e.stopPropagation(),e.preventDefault(),n(e),document.querySelector(".back-btn").classList.remove("oppend"),t.forEach(e=>{console.log("menu",e.parentNode),e.parentNode.classList.contains("lang-switcher")?(e.style.display="inline-block",e.querySelector(".nav-link").style.display="inline"):e.style.display="flex"})})});const n=e=>{let t=e.target.closest(".navbar-toggler");t&&(t.parentNode.dataset.target?(t.parentNode.classList.toggle("on"),t.parentNode.dataset.target.split(" ").forEach(e=>{let t=document.getElementById(`${e}`);if(!t)return;let n=t.querySelectorAll(".on");t.classList.contains("on")?(t.classList.remove("on"),document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,kt),a(n)):(t.classList.add("on"),kt=window.scrollY||0,document.body.style.position="fixed",document.body.style.top=`-${kt}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%")})):console.error("data-target attribute not found on parent element"))};document.getElementsByClassName("mega-parent");const a=e=>[].forEach.call(e,e=>e.classList.remove("on")),o=document.getElementById("main-nav").querySelector(".back-btn");document.querySelectorAll(".mega-parent > .nav-link").forEach(e=>{e.addEventListener("click",e=>{let t=document.getElementById("main-nav");const n=document.querySelectorAll(".mega-parent"),a=e.target.closest(".mega-parent");if(Et){e.preventDefault();let i="";if(i=e.target.parentNode.classList.contains("nav-link")?e.target.parentNode.parentNode.classList:e.target.parentNode.classList,n.forEach(e=>{window.innerWidth<1024&&(e.style.display="none")}),a.style.display="flex",i.contains("on")){console.log(e.target.parentNode.parentNode),t.classList.remove("mega-menu-open"),i.remove("on"),i.remove("mega-open");let n="";n=e.target.parentNode.classList.contains("nav-link")?e.target.parentNode.parentNode.querySelector(".mega-menu"):e.target.parentNode.querySelector(".mega-menu"),n&&(n.classList.remove("active"),o.classList.remove("oppend"))}else{i.add("on"),i.add("mega-open"),t.classList.add("mega-menu-open");let n="";e.target.parentNode.classList.contains("nav-link")&&console.log(e.target.parentNode.parentNode),n=e.target.parentNode.querySelector(".mega-menu"),n&&n.classList.add("active"),o.classList.add("oppend")}}})}),o.addEventListener("click",function(){let e=document.querySelectorAll(".mega-menu"),t=document.getElementById("main-nav");const n=document.querySelectorAll(".mega-parent");let a=document.querySelector(".lang-switcher li");a&&a.classList.remove("on","mega-open"),n.forEach(e=>{e.style.display="flex"}),t.classList.remove("mega-menu-open"),this.classList.remove("oppend"),e.forEach(e=>{e.classList.remove("active"),e.parentNode.classList.remove("on","mega-open")})});let i=document.querySelectorAll(".footer__col > h3");Array.from(i).forEach(e=>{e.addEventListener("click",e=>{window.innerWidth<769&&e.target.parentNode.classList.toggle("on")})});const s=document.getElementById("product-news-nav"),r=document.querySelector(".product-news-archive__sidebar");s&&r&&s.classList.contains("sps--abv")&&r.classList.add("sps--abv")}),function(){if(wt&&wt.length>0&&window.intlTelInput){const e=()=>{let e=new XMLHttpRequest,t={};return e.open("GET",document.location,!1),e.send(null),e.getAllResponseHeaders().toLowerCase().trim().split(/[\r\n]+/).forEach(e=>{const n=e.split(":")[0],a=e.split(":").slice(1).join(":").trim();t[n]=a}),t["user-loc"]?t["user-loc"]:"US"};document.addEventListener("DOMContentLoaded",function(){const t=(e=>Object.keys(e))(Ue);let n=document.querySelector(".phone-intl");e(),window.intlTelInput(n,{formatOnDisplay:!0,nationalMode:!0,separateDialCode:!0,initialCountry:"auto",hiddenInput:"phone",onlyCountries:t,utilsScript:`${a()}/wp-content/themes/AF2020/assets/js/vendors/iti-utils.js`,geoIpLookup:function(e){e(window.userGeoLoc?window.userGeoLoc:"us")}})})}}();const qt=()=>{$(".block-linkedin-slider__iframe .read-more-btn a").magnificPopup({type:"inline",callbacks:{beforeOpen:function(){console.log("this.st",this.st);
1var e=$(this.st.el.attr("href")),t=e.find("template");t.length&&(e.find(".single-popup-linkedin-inner").append(document.importNode(t[0].content,!0)),t.remove()),this.st.inline.markup=this.st.inline.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass="mfp-zoom-out linkedin-popup-bg",$("main.main").addClass("blur")},beforeClose:function(){$("main.main").removeClass("blur")}},closeMarkup:'<button class="mfp-close" onclick="$.magnificPopup.close();"><i class="icon-cancel"></i></button>'}),$(".popup-image")&&$(".popup-image a").magnificPopup({type:"image",removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass="mfp-zoom-out",$("main.main").addClass("blur")},beforeClose:function(){$("main.main").removeClass("blur")}},closeMarkup:'<button class="mfp-close" onclick="$.magnificPopup.close();"><i class="icon-cancel"></i></button>'}),$(".popup-video")&&$(".popup-video").magnificPopup({type:"iframe",iframe:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" allowtransparency="true" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen frameborder="0" allowfullscreen></iframe></div>',patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},wistia:{index:"wistia.com",id:function(e){let t=e.match(/^.+wistia.com\/(medias)\/([^_]+)[^#]*(#medias=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},name:"wistia_embed",class:"wistia_embed",src:"//fast.wistia.net/embed/iframe/%id%/?autoPlay=false"}},srcAction:"iframe_src"}})},Tt=()=>{$(".plg-popup-btn").magnificPopup({type:"inline",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass="mfp-zoom-out",$("main.main").addClass("blur"),$(this.bgOverlay).addClass("plg-popup-bg")},beforeClose:function(){$("main.main").removeClass("blur")}},closeMarkup:'<button class="mfp-close" onclick="$.magnificPopup.close();"><i class="icon-cancel"></i></button>'})},At=document.querySelector(".newsletter-subscription-popup"),xt=document.querySelector(".search-popup"),Ct=document.querySelector("main.main"),$t=(e,t)=>{"open"===t?(Ct.classList.add("blur-more"),e.classList.add("on"),document.querySelector(".navbar--categories-secondary.on")&&document.querySelector(".navbar--categories-close").click(),document.querySelector("input.search__input")&&document.querySelector("input.search__input").focus(),setTimeout(()=>{document.addEventListener("click",Mt,!1)},500)):(e.classList.remove("on"),Ct.classList.remove("blur-more"),document.removeEventListener("click",Mt,!1))},Mt=e=>{[At,xt].forEach(t=>{const n=t.contains(e.target);t.classList.contains("on")&&!n&&$t(t,"close")})};document.addEventListener("DOMContentLoaded",function(){const e=document.querySelectorAll(".popup-newsletter-subscription"),t=document.querySelectorAll(".newsletter-subscription-popup--close"),n=document.querySelectorAll(".search-trigger-button"),a=document.querySelector(".search-popup--close");($(".popup-image")||$(".popup-video"))&&qt(),Tt(),e.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),At.classList.contains("on")||$t(At,"open")})}),t.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),At.classList.contains("on")&&$t(At,"close")})}),n&&n.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),xt.classList.contains("on")||$t(xt,"open")})}),a&&a.addEventListener("click",e=>{e.preventDefault(),xt.classList.contains("on")&&$t(xt,"close")})}),$(document).ready(function(){$(".year-menu-item").click(function(){$("html,body").animate({scrollTop:0},"slow"),$(this).attr("data-year"),$(".year-menu-item").removeClass("selected"),$(this).addClass("selected"),$(".parentyear").removeClass("showParent"),$(".parent-"+$(this).attr("data-year")).addClass("showParent")}),$(".parentyear").each(function(){$(this).children(".entry-content").length<=6&&$(this).children(".text-center").hide()})}
1),$(".loadMorePr").click(function(){var e=$(this).parent(".text-center").siblings(".hide").length;if(e>0){var t=$(this).parent(".text-center").siblings(".hide"),n=0;e<6&&$(this).hide(),$(t).each(function(){n<6&&$(this).removeClass("hide").addClass("show "),n++})}else $(this).hide()}),document.addEventListener("DOMContentLoaded",function(){const e=document.querySelector(".section-single-post");if(!e)return;const t=document.querySelector(".progress-bar");t&&window.addEventListener("scroll",()=>{const n=e.clientHeight-window.innerHeight,a=window.scrollY/n*100;t.style.width=`${a}%`})});const It=["post","customer","glossary","product-news-item","resource","use-case","video","ceo-post"],Nt=()=>{const e=location.search.substring(1);if(e)return e.split("&").map(e=>e.includes("=")?e.split("="):[e,null]).reduce((e,[t,n])=>({...e,[decodeURIComponent(t)]:n?decodeURIComponent(n):null}),{})},Pt=(e,t)=>{const n=new RegExp(e,"gi");return t.innerHTML.replace(n,function(e){return"<span>"+e+"</span>"})},Ft=Nt();(()=>{const e=document.querySelectorAll(".search__form");e&&e.forEach(e=>{const t=e.querySelector(".search__input"),n=e.querySelector(".search__error");e.addEventListener("submit",e=>{n.classList.contains("active")&&n.classList.remove("active"),""==t.value.trim()&&(e.preventDefault(),n.classList.add("active"))})})})(),Ft&&Ft.s&&((()=>{const e=document.querySelector(".search__filter-select");if(!e)return;const t=Nt();t.type&&It.indexOf(t.type)>=0?e.value=t.type:e.value="all",e.addEventListener("change",e=>{let n=window.location.pathname;"all"!==e.target.value?window.location.replace(n+"?s="+t.s+"&type="+e.target.value):window.location.replace(n+"?s="+t.s)})})(),(e=>{const t=document.querySelector(".search__articles");t&&t.querySelectorAll("article").forEach(t=>{const n=t.querySelector(".search__article-link"),a=t.querySelector(".search__article-excerpt");n.innerHTML=Pt(e.s,n),a.innerHTML=Pt(e.s,a)})})(Ft)),document.querySelectorAll("select[multiple]").length>0&&($("select[multiple]").select2({width:"100%",language:{locale:"es",noResults:function(e){return console.log("errorMessages",We[Ve]["no-results"]),We[Ve]["no-results"]}}}),$("select[multiple]").on("change",function(e){e.target.value?e.target.parentNode.querySelector(".select2").classList.add("has-value"):e.target.parentNode.querySelector(".select2").classList.remove("has-value")}));let Dt=document.querySelectorAll(".slider");const Bt=()=>{setTimeout(()=>{let e=$(".slider-item__holder"),t=[];e.css("min-height",""),e.each(function(e){t.push($(this).innerHeight())});let n=Math.max(...t);e.css("min-height",n+"px")},100)},Ot=(e,t,n)=>{setTimeout(()=>{Gt(e,t)&&Rt(e,n,Gt(e,t))},100)},Rt=(e,t,n)=>{"init"===n?e.slick(t):"destroy"===n&&e.slick("unslick")},Gt=(e,t)=>{let n=e[0].classList.contains("slick-initialized"),a=!1,o=window.screen.width;return"desktop"===t&&o<574?a=n?void 0:"init":"desktop"===t&&o>=574?a=n?"destroy":void 0:"mobile"===t&&o>574?a=n?void 0:"init":"mobile"===t&&o<574&&(a=n?"destroy":void 0),a},zt=(e,t,n)=>{window.addEventListener("resize",function(a){Ot(e,t,n),o||(o=!0,setTimeout(()=>{o=!1},750))}),window.addEventListener("load",function(a){Ot(e,t,n)})},Ht=e=>{let t=e.$slides;for(const e of t)if(e.classList.contains("slick-current")){e.firstChild.classList.add("active");let t=e.firstChild.dataset.content;document.getElementById(t).classList.add("active")}else{e.firstChild.classList.remove("active");let t=e.firstChild.dataset.content;document.getElementById(t).classList.remove("active")}};Dt&&(Array.from(Dt).forEach((e,t)=>{let n=e.dataset;const a=(t,a)=>void 0!==n[t]&&""!==n[t]?n[t]:e.getAttribute(a);let o=e.getAttribute("id"),i={slidesToShow:n.slidesToShow?Number(n.slidesToShow):this.slidesToShow,slidesToShowMd:n.slidesToShowMd?Number(n.slidesToShowMd):this.slidesToShow,slidesToShowSm:n.slidesToShowSm?Number(n.slidesToShowSm):this.slidesToShow,destroyOn:!!n.destroyOn&&n.destroyOn,infinite:!n.infinite||"true"===n.infinite,infiniteMd:!n.infiniteMd||"true"===n.infiniteMd,centerMode:!!n.centerMode&&"true"===n.centerMode,centerModeMd:!!n.centerModeMd&&"true"===n.centerModeMd,centerPadding:n.centerPadding&&"true"===n.centerMode?n.centerPadding:"50px",dots:!n.dots||"true"===n.dots,fade:!!n.fade&&"true"===n.fade,dotsMd:!!n.dotsMd&&n.dotsMd,equalHeight:!!n.equalHeight&&n.equalHeight,arrows:!n.arrows||"true"===n.arrows,controllers:!n.
1controllers||"true"===n.controllers,variableWidth:"true"===n.variableWidth,customArrows:"true"===n.customArrows,lineArrows:"true"===n.lineArrows,eventInnerSlick:"true"===a("eventInnerSlick","data-event-inner-slick"),eventVideoPaged:"true"===a("eventVideoPaged","data-event-video-paged"),itemCount:Number(a("itemCount","data-item-count")||0),tabbdedSlider:"true"===n.tabbedSlider,slidesToScroll:n.slidesToScroll?Number(n.slidesToScroll):1,slidesToScrollSm:n.slidesToScrollSm?Number(n.slidesToScrollSm):1},s={slidesToShow:i.slidesToShow,slidesToScroll:i.slidesToScroll,infinite:i.infinite,arrows:!1,fade:i.fade,dots:i.dots,variableWidth:i.variableWidth,responsive:[{breakpoint:1025,settings:{slidesToShow:i.slidesToShowMd,slidesToScroll:i.slidesToScroll}},{breakpoint:769,settings:{slidesToShow:i.slidesToShowMd,slidesToScroll:i.slidesToScroll,centerMode:i.centerModeMd,centerPadding:"15%",dots:i.dotsMd,infinite:i.infiniteMd}},{breakpoint:574,settings:{slidesToShow:i.slidesToShowSm,slidesToScroll:i.slidesToScrollSm,centerMode:i.centerModeMd,centerPadding:i.centerPadding,dots:i.dotsMd,infinite:i.infiniteMd}}]},r=$(`#${o}`);const l=(e,t,n)=>{document.querySelectorAll(".slider__controls--btn").forEach(e=>{e.classList.remove("disabled")});let a=n&&n.target?n.target:n;a&&0==e.currentSlide&&a.classList.add("disabled"),a&&e.currentSlide>=e.slideCount-e.options.slidesToShow&&a.classList.add("disabled")};if(!0===i.arrows){let e,t,n,a,o,c,d,u,m=i.infinite?"":"disabled";const p=()=>r[0].id.slice(0,-6),f=()=>r[0].id.slice(-5),h=e=>{const t='<svg class="slider__line-arrow-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" focusable="false" aria-hidden="true">',s="</svg>";let r,l;if(!0===i.lineArrows&&!0===i.eventInnerSlick)r=t+'<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5299 6.18479C10.8228 6.4777 10.8228 6.95257 10.5299 7.24545L6.52563 11.2492H19.2851C19.6993 11.2492 20.0351 11.585 20.0351 11.9992C20.0351 12.4134 19.6993 12.7492 19.2851 12.7492H6.51987C6.84198 13.0725 7.20217 13.4339 7.5721 13.8047C8.79045 15.026 10.1062 16.3417 10.5223 16.7461C10.8193 17.0348 10.8261 17.5097 10.5374 17.8067C10.2487 18.1037 9.77388 18.1105 9.47684 17.8218C9.05012 17.4071 7.72348 16.0804 6.51016 14.8641C5.90202 14.2545 5.32027 13.6705 4.89057 13.239L4.18313 12.5282C3.89156 12.2351 3.89215 11.7612 4.18452 11.4689L9.46927 6.18473C9.76218 5.89185 10.2371 5.89188 10.5299 6.18479Z" fill="currentColor"/>'+s,l=t+'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.47 6.18479C13.7628 5.89188 14.2377 5.89185 14.5306 6.18473L19.8154 11.4689C20.1077 11.7612 20.1084 12.235 19.8168 12.5281L19.1093 13.239C18.6796 13.6705 18.0979 14.2545 17.4897 14.8641C16.2764 16.0804 14.9498 17.4071 14.5231 17.8218C14.226 18.1105 13.7512 18.1037 13.4625 17.8067C13.1738 17.5097 13.1806 17.0348 13.4776 16.7461C13.8937 16.3417 15.2095 15.026 16.4278 13.8047C16.7977 13.4339 17.1579 13.0725 17.48 12.7492H4.71484C4.30063 12.7492 3.96484 12.4134 3.96484 11.9992C3.96484 11.585 4.30063 11.2492 4.71484 11.2492H17.4743L13.47 7.24545C13.1771 6.95257 13.1771 6.4777 13.47 6.18479Z" fill="currentColor"/>'+s;else{let e;e=!0===i.customArrows?'<i class="icon-right-open"></i>':'<i class="icon-arrow-right"></i>',r=e,l=e}const h=i.eventInnerSlick?`btn-prev_${f()}`:`btn-next_${f()}`,g=i.eventInnerSlick?`btn-next_${f()}`:`btn-prev_${f()}`,v=`<div class="slider__controls text-secondary d-flex justify-content-between justify-content-sm-center align-items-center px-20 px-md-0">\n <button${i.eventInnerSlick?' type="button"':""} id="${h}" data-aft="slider-controls" data-aft-block="${p()}" class="slider__controls--btn slider__controls--prev px-0 btn-icon ${m}">\n ${r}\n </button>\n <div class="slider__controls--count px-20 d-flex">\n <span class="slider__controls--count-main d-inline-block position-relative">\n <span class="slider__controls--count-visible"></span>
1\n <span class="slider__controls--count-next"></span>\n </span>\n <span class="slider__controls--count-total"></span>\n </div>\n <button${i.eventInnerSlick?' type="button"':""} id="${g}" data-aft="slider-controls" data-aft-block="${p()}" class="slider__controls--btn slider__controls--next px-0 btn-icon">\n ${l}\n </button> \n </div>`;let y=e.parent();y.append(v),n=y.find(".slider__controls--next"),a=y.find(".slider__controls--prev"),o=y.find(".slider__controls--count-main"),c=y.find(".slider__controls--count-visible"),d=y.find(".slider__controls--count-next"),u=y.find(".slider__controls--count-total"),setTimeout(()=>{e.parent().find(".slider__controls").addClass("on"),i.equalHeight&&Bt()},750)},g=()=>{const e=window.innerWidth||document.documentElement.clientWidth||1200;return e<=574?i.slidesToShowSm||1:e>1024?i.slidesToShow||i.slidesToShowMd||1:i.slidesToShowMd||i.slidesToShow||1},v=()=>(window.innerWidth||document.documentElement.clientWidth||1200)<=574?i.slidesToScrollSm||1:i.slidesToScroll||1,y=e=>{const t=i.itemCount,n=e&&e.slideCount?e.slideCount:0;return t>0?t:n},b=e=>{const t=y(e),n=v();return t>0&&n>1&&(i.eventVideoPaged||i.eventInnerSlick)},w=e=>{if(b(e)){const t=y(e),n=Math.min(g(),t),a=Math.max(1,v()),o=Math.max(0,t-n),i=Math.max(1,Math.ceil(o/a)+1);return{current:e.currentSlide>=o?i:Math.min(i,Math.floor(e.currentSlide/a)+1),total:i}}return{current:e.currentSlide+1,total:e.slideCount}},S=e=>{const t=y(e),n=Math.min(g(),t);return Math.max(0,t-n)},L=()=>{const e=r.slick("getSlick");e&&u&&u.length&&_(e)},_=function(n,a){const i=w(n);e=i.current,t=i.total,u.text(` / ${t}`),d.text(e),setTimeout(()=>{c.text(e)},a?500:0),"forward"===a&&(o[0].classList.add("move-forward"),setTimeout(()=>{o[0].classList.remove("move-forward")},500)),"backward"===a&&(d[0].classList.add("is-rotated-above"),setTimeout(()=>{o[0].classList.add("move-backward")},50),setTimeout(()=>{o[0].classList.remove("move-backward")},500))},k=(t,o)=>{if(_(t,o),d[0].text=e,!i.infinite){const e=Math.max(0,t.slideCount-(t.options.slidesToShow||1));t.currentSlide>=e?(n[0].classList.add("disabled"),a[0].classList.remove("disabled")):0===t.currentSlide?(a[0].classList.add("disabled"),n[0].classList.remove("disabled")):(n[0].classList.remove("disabled"),a[0].classList.remove("disabled"))}setTimeout(()=>{d[0].classList.remove("move-forward"),d[0].classList.remove("move-backward"),d[0].classList.remove("is-rotated-above")},250)};r.on("init",function(e,t){i.equalHeight&&Bt(),i.destroyOn&&Ot(r,i.destroyOn,s),i.destroyOn&&zt(r,i.destroyOn,s),t.slideCount>1&&(h(r),_(t),setTimeout(L,0),setTimeout(L,100),setTimeout(L,750),b(t)&&window.addEventListener("resize",L),n.on("click",function(e){r.slick("slickNext"),i.infinite&&!e.target.classList.contains("disabled")&&k(t,"forward"),i.infinite||e.target.classList.contains("disabled")||l(t,0,e),b(r.slick("getSlick")||t)&&L(),"block-testimonial-tabs__slider"===r[0].id&&Ht(t)}),a.on("click",function(e){r.slick("slickPrev"),i.infinite&&!e.target.classList.contains("disabled")&&k(t,"backward"),i.infinite||e.target.classList.contains("disabled")||l(t,0,e),b(r.slick("getSlick")||t)&&L(),"block-testimonial-tabs__slider"===r[0].id&&Ht(t)}),r.on("swipe",function(e,t,o){let s="left"===o?n[0]:a[0];o="left"===o?"forward":"backward",i.infinite&&!s.classList.contains("disabled")&&k(t,o),i.infinite||s.classList.contains("disabled")||l(t,0,s),"block-testimonial-tabs__slider"===r[0].id&&k(t,o)}),i.eventInnerSlick&&r.on("afterChange",function(e,t){if(_(t),!i.infinite&&n&&n.length&&a&&a.length){const e=b(t)?S(t):Math.max(0,t.slideCount-(t.options.slidesToShow||1));a.toggleClass("disabled",0===t.currentSlide),n.toggleClass("disabled",t.currentSlide>=e)}}))})}else r.on("init",function(e,t){i.equalHeight&&Bt(),i.destroyOn&&zt(r,i.destroyOn,s)});(e=>e.classList.contains("custom-gallery__items")&&window.screen.width>576)(e)?i.destroyOn&&zt(r,i.destroyOn,s):Rt(r,s,"init")}),document.addEventListener("DOMContentLoaded",function(){Array.from(Dt).forEach(e
1=>{document.querySelector(".slider-preloader")&&document.querySelector(".slider-preloader").remove(),e.classList.add("on")})}));const jt=()=>{$("img.svg").each(function(){let e=$(this),t=e.attr("id")?e.attr("id"):"img-"+Math.ceil(10*Math.random()),n=e.attr("class"),a=e.attr("src");$.get(a,function(a){var o=$(a).find("svg");void 0!==t&&(o=o.attr("id",t)),void 0!==n&&(o=o.attr("class",n+" replaced-svg")),o=o.removeAttr("xmlns:a"),e.replaceWith(o)},"xml").done(function(){setTimeout(function(){$("#"+t).addClass("on")},100)})})};if(document.addEventListener("DOMContentLoaded",function(){jt()}),$('[role="tablist"]')&&$('[role="tablist"] li').on("click",function(e){const t=$(this).children("a").first().attr("href");t&&0===t.indexOf("#")&&e.preventDefault(),$(".filter__action")&&$(".filter__action").click();const n=$(this).closest('[role="tablist"]'),a="tabs"===n.attr("id")&&n.closest(".events-lobby").length;let o=$(".tab-content .tab-pane"),i=n.find("> li"),s=$(this).find("> span").attr("href")?$(this).find("> span").attr("href"):$(this).find("> a").attr("href"),r=$(".tab-content .tab-pane"+s);i.removeClass("active"),a&&n.find("> li > a").removeClass("active"),o.removeClass("active"),o.removeClass("in"),r.addClass("active"),setTimeout(()=>{r.addClass("in")},150),$(this).addClass("active"),a&&($(this).find("> a").addClass("active"),n.find('> li > a[role="tab"]').attr("aria-selected","false"),$(this).find('> a[role="tab"]').attr("aria-selected","true")),r.find(".filter__item").length>9&&setTimeout(()=>{N()},10)}),$(".block-tabs")&&$(".block-tabs__link").on("click",function(e){e.preventDefault();let t=$(this).data("content");$(".block-tabs__link").removeClass("active"),$(".block-tabs__link-wrapper").removeClass("active"),$(this).addClass("active"),$(this).closest(".block-tabs__link-wrapper").addClass("active"),$(".block-tabs__single").removeClass("active"),$("#"+t).addClass("active"),$(".block-testimonial-tabs__image").removeClass("active"),$("#block-image__"+t).addClass("active")}),$("#toc-index")){document.querySelector(".navbar--categories-close"),document.querySelector(".section-guide__toc");let sn=$("#toc-index a");function Ut(){let e=$(window).scrollTop();($(".toc__group").length>1?$(".toc__group"):$(".section-single-post__body h2")).each(function(){let t=$(this).attr("id"),n=$(this).offset().top-($("#main-nav").height()+40),a=$(this).height();e>=n&&e<n+a&&(sn.parent().removeClass("active"),$(".toc__group").removeClass("active"),$('a[href="#'+t+'"]').parent().addClass("active"),$(".toc__group#"+t).addClass("active"))})}sn.on("click",function(e){e.preventDefault();let t=$(this).attr("href"),n=window.innerWidth<=1024?120:100;$("html, body").animate({scrollTop:$(t).offset().top-n},600),$(this).parent().addClass("on"),setTimeout(function(){$(this).parent().addClass("active"),sn.parent().removeClass("on")},600),e.preventDefault()}),Ut(),$(window).on("scroll",function(){Ut()})}$(document).ready(function(){window._wq=window._wq||[],_wq.push({id:"_all",onReady:function(e){let t=!1,n=$('[data-source-container-id="'+e._containerId+'"]').parent().parent().find('[data-vid-id="'+e._hashedId+'"]');document.body.classList.contains("single-videos")&&(document.querySelector(".section-single-post__details--time > span").textContent=Math.ceil(e.duration()/60)),e.bind("play",function(){n.removeClass("on")}),e.bind("mutechange",function(a){t||a||(e.time(0),n.removeClass("on"),t=!0)}),e.bind("pause",function(){n.addClass("on")}),e.bind("end",function(){e.time(0),e.play()}),n.on("click",function(){e.play(),n.removeClass("on")})}})}),addEventListener("load",e=>{"undefined"!=typeof Wistia&&Wistia.api.all().forEach(e=>{let t=document.getElementById(e.container.uniqueId),n=t.closest(".videos-cards-slider__item"),a=t.closest(".preloader-anim"),o=!!n&&n.querySelector(".videos-cards-slider__item-title"),i=t.classList.contains("wistia-popup"),s=t.classList.contains("translate-titles"),r=e.data.media.name??"",l=e._hashedId,c=Wistia.api(l);a&&a.classList.replace("preloader-anim","on"),o&&i&&!s&&(o.textContent=r),c.bind("end",function(){setTimeout(()=>{c.pause(),c.time(1)},100)})})})}})[676].call({});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.