function validateEmail(n){return/^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/.test(n.val())?(n.removeClass("border-red"),!0):(n.addClass("border-red"),!1)}function inputValidations(n,t){n.val().trim()==""?n.addClass("border-red"):n.removeClass("border-red");t.val().trim()==""?t.addClass("border-red"):t.removeClass("border-red")}function ChangeCheckboxState(){var t=$(".c-dialog .c-checkbox").find("input[type='checkbox']").attr("isdefaultChecked"),n=$(".c-dialog .c-checkbox").find("input[type='checkbox']");t==="false"&&n.prop("checked")===!0&&(n.removeAttr("checked"),n.attr("aria-checked","false"),n.trigger("click"));t==="true"&&n.prop("checked")===!1&&(n.attr("checked","true"),n.attr("aria-checked","true"),n.trigger("click"))}function GetParameterValues(n){for(var r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i,t=0;t<r.length;t++)if(i=r[t].split("="),i[0].toLowerCase()==n)return i[1]}function AppendDownloadURL(n,t){var e=$("#browserlang").val(),u="2108834",r,f=GetParameterValues("brand"),i;$(".c-dialog").removeClass("win10");t!="win10"?(i=0,$(".c-dialog .c-checkbox").find("input[type='checkbox']").is(":checked")&&(i=1,u="2109047"),r=n+"?linkid="+u+"&Channel=Stable&language="+e+"&consent="+i,t=="macos"?(i=0,u="2069148",$(".c-dialog .c-checkbox").find("input[type='checkbox']").is(":checked")&&(i=1),r=n+"?linkid="+u+"&platform=Mac&Consent="+i+"&channel=Stable"):r=n+"?linkid="+u+"&Channel=Stable&language="+e+"&consent="+i):(r=n+"?linkid="+u+"&Channel=Stable&language="+e,$(".c-dialog").addClass("win10"));f!=undefined&&f!=null&&f!=""&&(r=r+"&brand="+f);$(".c-dialog .ctalink a").attr("href",r)}function sendEvents(){}function popupscroll(){$(".eula-reader.f-dialog-scroll.reading").scrollTop(0)}function contentplacementheight(){var n=$(".m-content-placement");set_elements_height(n)}function changeSupToAnchor(){try{var n="",i="",t=[];$("sup").each(function(){n=$(this).text();n=n.replace("*(","");n=n.replace(")","");t=n.split(", ");for(var r=0;r<t.length;r++)i+="<a aria-label='Footnote "+t[r]+"' href='javascript:void(0);' class='c-hyperlink supBLink'><span class='supText'>"+t[r]+"<\/span><\/a><span>, <\/span>";$(this).html(i);i=""});$("sup").find("span:last").remove()}catch(r){console.log(r)}}function noSuperScript(){try{var r=window.location.href,n=[],t=[];$("sup .supText:visible").not("#mwf-common-prefooter .c-caption-2 sup").each(function(){var t=$(this).text().trim();n.push(t)});n=$.unique(n);$(".c-tooltip sup").each(function(){var n=$(this).text().trim();t.push(n)});t=$.unique(t);n.length==0?$("#mwf-common-prefooter").addClass("hide"):$("#mwf-common-prefooter").hasClass("hide")&&setTimeout(function(){$("#mwf-common-prefooter").removeClass("hide")},6e3);$("#mwf-common-prefooter .c-caption-2").each(function(){var t=$(this).find(".supLink .supFn").text().trim();$.inArray(t,n)==-1?$(this).addClass("hide"):$(this).hasClass("hide")&&$(this).removeClass("hide");$(this).hasClass("context-glyph-tile")&&$(this).removeClass("hide")})}catch(i){console.log(i)}}function videoButtonAlignmnet(){$(".m-feature").each(function(){var n=$(this).find("picture").height()/2;window.matchMedia("(max-width: 767px)").matches?$(this).find(".video-btn-trigger").css("top",n+"px"):$(this).find(".video-btn-trigger").css("top","")})}function IntilaiseVideoPlayer(n){function r(n){var t=n.split("/");return t[t.length-1]}var t="",i;t=$(this).closest("picture").find("[itemprop=name]").text();$(n).attr("video-type")==="popup"&&(playeroptions.autoplay=!0);$(n).attr("video-type")==="inline"&&(playeroptions.autoplay=!1);i={options:playeroptions,metadata:{videoId:r($(n).attr("video-Id")),title:t}};MsOnePlayer.render($(n).attr("id"),i,function(n){n.addPlayerEventListener(function(){})})}function focusOrder(){var n,t,i,r;$(".stealth-carousel .stealth-sub-carousel.left-carousel .stealth-sub-carousel-panel").each(function(){$(this).find("a").attr("tabindex","-1")});$(".stealth-carousel .stealth-sub-carousel.right-carousel .stealth-sub-carousel-panel").each(function(){$(this).find("a").attr("tabindex","-1")});$(".stealth-carousel .stealth-sub-carousel.center-carousel .stealth-sub-carousel-panel").each(function(){$(this).hasClass("active")?$(this).find("a").attr("tabindex","0"):($(this).siblings().removeClass("active"),$(this).find("a").attr("tabindex","-1"))});n=$(".c-carousel .c-flipper.f-previous");t=$(".c-carousel .c-flipper.f-next");n.on("focus mouseenter",function(){$(this).siblings(".prv-btn-tooltip").addClass("f-show-span-text")});n.on("focusout mouseleave",function(){$(this).siblings(".prv-btn-tooltip").removeClass("f-show-span-text")});t.on("focus mouseenter",function(){$(this).siblings(".nxt-btn-tooltip").addClass("f-show-span-text")});t.on("focusout mouseleave",function(){$(this).siblings(".nxt-btn-tooltip").removeClass("f-show-span-text")});i=$(".stealth-carousel .stealth-carousel-arrow.left-arrow");r=$(".stealth-carousel .stealth-carousel-arrow.right-arrow");i.on("focus mouseenter",function(){$(this).siblings(".prv-btn-tooltip").addClass("f-show-span-text")});i.on("focusout mouseleave",function(){$(this).siblings(".prv-btn-tooltip").removeClass("f-show-span-text")});r.on("focus mouseenter",function(){$(this).siblings(".nxt-btn-tooltip").addClass("f-show-span-text")});r.on("focusout mouseleave",function(){$(this).siblings(".nxt-btn-tooltip").removeClass("f-show-span-text")})}function SneakCarouselBtnHeight(){$(".sneak-carousel").each(function(){var n=$(this).find(".stealth-carousel .media-wrapper picture img").innerHeight()/2;window.matchMedia("(max-width: 767px)").matches&&(n=n+44,$(this).find(".stealth-carousel .stealth-carousel-arrow").css("top",n+"px"));$(this).find(".stealth-carousel .stealth-carousel-arrow").css("top",n+"px")})}function BindEvents(){$('input[name="uninstall-reason0"]').on("change",function(){$reasonText.get(0).disabled=$(this).val()!==uninstallOtherValue})}function ReorderOptions(n){var t=n.find(".c-label"),r="",i=$(t).find("input[value='1']");for(i!=undefined&&(r=$(i).parent(),$(i).parent().remove());t.length;)n.append(t.splice(Math.floor(Math.random()*t.length),1)[0]);n.append(r);BindEvents()}function validateuinstallEmail(n){if(!n)return!1;return/.+\@.+\..+/.test(String(n).toLowerCase())}function IsEmail(n){return/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(n)?!0:!1}function send(){var n,t;(showValidationErrors=!0,validateForm())&&(document.getElementById("submit-button").style.display="none",n=new XMLHttpRequest,n.open("POST",uploadEndpointInt,!0),n.setRequestHeader("Content-Type","application/json"),t=makeRequestBody(),n.send(JSON.stringify(t)),n.onreadystatechange=function(){$("#thanks").removeClass("hide")})}function makeRequestBody(){var n=getRequestBodyGroup(),t;return n.rating=getRadioValue(),n.comment=document.getElementById("description-text").value,n.telemetry=getTelemetryGroup(),t=$includeEmail.prop("checked"),n.email=t?$email.val():"",n.telemetry.deviceId=t?deviceId||"":"",n}function getRequestBodyGroup(){var n={surveyId:surveyID},t=getAppId(),i=$(".edgeconsumer.features").attr("data-iid"),r=getAppData();return{appId:t,clientFeedbackId:i,manifestType:"Fps",source:"Client",submitTime:new Date,survey:n,type:"Survey",web:{},application:{appData:JSON.stringify(r)}}}function getAppData(){var n={languageCode:langCode};return n["reinstall-choice"]=getReinstallChoice(),n}function getReinstallChoice(){for(var t=document.getElementsByName("uninstall-reason1"),n=0,i=t.length;n<i;n++)if(t[n].type=="radio"&&t[n].checked)return t[n].value}function getRadioValue(){for(var t=document.getElementsByName("uninstall-reason0"),n=0,i=t.length;n<i;n++)if(t[n].type=="radio"&&t[n].checked)return Number(t[n].value.replace(",","."))}function getTelemetryGroup(){var n={};return n.officeBuild=officeBuild,n.osBuild=osBuild,n.channel=channel,n.audienceGroup="Production",n.deviceId=deviceId,n}function getURIComponent(){for(var i=location.search.substr(1).split("&"),n,t=0;t<i.length;t++)n=i[t].split("="),n[0]=="version"?officeBuild=decodeURIComponent(n[1]):n[0]=="osVer"?osBuild=decodeURIComponent(n[1]):n[0]=="deviceId"?deviceId=decodeURIComponent(n[1]):n[0]=="ch"?channel=decodeURIComponent(n[1]):n[0]=="hl"&&(langCode=decodeURIComponent(n[1]))}function getGUID(){var n=(new Date).getTime();return Date.now&&(n=Date.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(t=="x"?i:i&3|8).toString(16)})}function getAppId(){var t=navigator.userAgent.toLowerCase(),n=2231;return t.indexOf("linux")!=-1&&(n=2248),t.toLowerCase().indexOf("mac")!=-1&&(n=2247),n}var validatePhoneNum=function(n){return n.replace(/[^0-9]/ig,"")},qparam,dlink,currentosval,set_elements_height,playeroptions,that,iframe,iframeSrc,dialog,dialogId,dialogsHideEventSubscription,iframevideosrc,$Carousel,$reasonText,uninstallOtherValue;window.location.href.toLowerCase().indexOf("microsoft-edge")>=0&&(qparam=window.location.href.indexOf("OCID")>=0?GetQueryStringParams_upgrade("OCID"):GetQueryStringParams_upgrade("ocid"),qparam=qparam!=null&&qparam!==undefined&&qparam!=""&&qparam.indexOf("_")>=0?qparam.split("_").pop().trim():"");$(document).ready(function(){var r=$("#mainContent").attr("data-browser"),u=$("#mainContent").attr("data-os"),f=$("body").hasClass("en-us"),n,i;f&&r==="Anaheim"&&u!=="macos"&&$(".c-pivot div.c-combo").addClass("hide");navigator.userAgent.toLowerCase().indexOf("trident")!=-1&&$("html").addClass("ie");navigator.userAgent.toLowerCase().indexOf("edge")!=-1&&$("html").addClass("edge");$(".emailsms-btm-content .emailsms-desc-email").hide();n=navigator.userAgent.toLowerCase();n.indexOf("trident/6.0")!=-1&&n.indexOf("msie 10.0")!=-1&&$("html").addClass("ie");$('input:radio[name="default"]').change(function(){var n=$(this).closest(".emailsms");n.find(".email-field").val("");n.find(".phone-dropdown").val("");n.find(".invalid-details").addClass("hide");n.find(".invalid-details-email").addClass("hide");n.find("input").removeClass("border-red");$(this).val()=="email"&&(n.find(".emailsms-desc-email").show(),n.find(".emailsms-desc-phone").hide(),n.find(".c-text-field").removeAttr("aria-describedby"));$(this).val()=="phone"&&(n.find(".emailsms-desc-phone").show(),n.find(".emailsms-desc-email").hide(),n.find(".c-text-field").removeAttr("aria-describedby"))});$(".emailsms-btm-content .c-button").click(function(){var n=$(this).closest(".emailsms"),e=n.find(".email-field"),o=n.find(".selected-flag"),i=o.find(".iti-flag").attr("class").split(" ")[1],l=o.find(".selected-dial-code").text(),s=e.val(),a=n.find(".phone-dropdown"),t=a.val().replace(/-/g,"").replace(/ /g,""),r=!1,v="",u="",f="",h;t!=""&&(i=="us"&&t.length==10&&(i="en-us",u=validatePhoneNum(t),u.length==10?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="gb"&&t.length==10&&(i="en-gb",u=validatePhoneNum(t),u.length==10?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="fr"&&t.length==9&&(i="fr-fr",u=validatePhoneNum(t),u.length==9?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="in"&&t.length==10&&(i="en-in",u=validatePhoneNum(t),u.length==10?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="de"&&t.length==11&&(i="de-de",u=validatePhoneNum(t),u.length==11?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="es"&&t.length==9&&(i="es-es",u=validatePhoneNum(t),u.length==9?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="it"&&t.length==10&&(i="it-it",u=validatePhoneNum(t),u.length==10?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="ca"&&t.length==10&&(i="en-ca",u=validatePhoneNum(t),u.length==10?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="jp"&&t.length==10&&(i="ja-jp",u=validatePhoneNum(t),u.length==10?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="br"&&t.length==11&&(i="pt-br",u=validatePhoneNum(t),u.length==11?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="au"&&t.length==9&&(i="en-au",u=validatePhoneNum(t),u.length==9?(t=u,r=!0):(n.find(".phone-dropdown").addClass("border-red"),r=!1)),i=="us"&&t.length!=10&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="gb"&&t.length!=10&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="fr"&&t.length!=9&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="in"&&t.length!=10&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="de"&&t.length!=11&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="es"&&t.length!=9&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="it"&&t.length!=10&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="ca"&&t.length!=10&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="jp"&&t.length!=10&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="br"&&t.length!=11&&(n.find(".phone-dropdown").addClass("border-red"),r=!1),i=="au"&&t.length!=9&&(n.find(".phone-dropdown").addClass("border-red"),r=!1));try{(awa.requestBody!=""||awa.requestBody!="undefined")&&(h=$.parseJSON(awa.requestBody),v=h.data.baseData.impressionGuid)}catch(y){console.log(y)}if($(this).hasClass("android-email-submit"))if(validateEmail(e)&&s.trim().length!=0){n.find(".c-text-field").removeAttr("aria-describedby");n.find(".emailsms-btm-content p.invalid-details-email").addClass("hide");var c=$("html").attr("lang"),p=["en-us","fr-fr","de-de","es-es","it-it","zh-cn","ja-jp","pt-br"].indexOf(c)!=-1?c:"en-us";f=JSON.stringify({emailId:s,device:"Android",finallocale:p});$.ajax({async:!1,url:"/en-us/edge/EmailSMS/EmailRowNEW",type:"POST",data:f,contentType:"application/json; charset=UTF-8",context:this,success:function(t){$.parseJSON(t).batchHasErrors?(n.find(".selection-screen").hide(),n.find(".error-screen").show()):(n.find(".emailsms-desktop").hide(),n.find(".emailsms-show-hide").hide(),n.find(".thankyou-screen").show())},error:function(t){console.log("error in token call");alert(t.status);console.log(t);n.find(".selection-screen").hide();n.find(".error-screen").show()}})}else n.find(".emailsms-desc-email p.invalid-details-email").removeClass("hide"),n.find(".c-text-field").focus();if($(this).hasClass("android-mobile-submit"))try{r?(n.find(".c-text-field").removeAttr("aria-describedby"),n.find(".emailsms-btm-content p.invalid-details").addClass("hide"),f=JSON.stringify({mobileNumber:parseInt(l+t).toString(),locale:i}),$.ajax({async:!1,url:"/en-us/edge/EmailSMS/SMSRowNEW",type:"POST",data:f,contentType:"application/json; charset=UTF-8",success:function(t){var i=t!==null?t.errors:"null";try{console.log($.parseJSON(t).errors);$.parseJSON(t).errors?(n.find(".emailsms-desktop").hide(),n.find(".emailsms-show-hide").hide(),n.find(".error-screen").show()):(n.find(".emailsms-desktop").hide(),n.find(".emailsms-show-hide").hide(),n.find(".thankyou-screen").show())}catch(r){n.find(".emailsms-desktop").hide();n.find(".emailsms-show-hide").hide();n.find(".thankyou-screen").show()}},error:function(){console.log("error in token call");n.find(".emailsms-desktop").hide();n.find(".emailsms-show-hide").hide();n.find(".error-screen").show()}})):(n.find(".emailsms-desc-phone p.invalid-details").removeClass("hide"),n.find(".c-text-field").focus())}catch(y){}});$("#chkemail").on("change",function(){$(this).is(":checked")||$(this).attr("aria-checked")=="true"?$("#txtemail").removeAttr("disabled"):$("#txtemail").attr("disabled","disabled")});$("#chkemail").on("click",function(){$(this).is(":checked")||$(this).attr("aria-checked")=="true"?$("#txtemail").removeAttr("disabled"):$("#txtemail").attr("disabled","disabled")});window.history.replaceState&&window.history.replaceState(null,null,window.location.href);var e=$(".c-button.btn-dwn.popup-btn").attr("aria-label"),o=$(".c-button.btn-dwn.popup-btn span").eq(0).text(),t=$("#sticky-navbar button"),s=t.text();t.html(s+"<br/><span>"+o+"<\/span>");t.attr("aria-label",e);$("#default-dialog-single-preview button.c-button[data-js-dialog-hide]").click(function(){$("#default-dialog-single-preview").attr("aria-hidden","true");$("body").css("overflow","visible")});i=$("#default-dialog-single-preview").attr("aria-hidden");i=="false"&&$("body").css("overflow","hidden")});dlink="";currentosval="";$(window).on("load",function(){var o,i,s,r,u,h,c;focusOrder();var l=$("body #mainContent").attr("class"),y=["macos","win10","win8dot1","win8","win7","ios","win2016","win2019","android"].indexOf(l)>-1;y==!1&&(l=="windows"?$("#sticky-navbar .f-primary").attr("disabled","disabled").addClass("hide"):($("body #mainContent").find(".popup-btn").attr("disabled","disabled"),$("#sticky-navbar .f-primary").attr("disabled","disabled").addClass("hide")));var p=$("body #mainContent").attr("data-lang"),w=$("body #mainContent").attr("data-os"),n,a,t,f,e,v=$(location).attr("href");v.indexOf("?")>-1&&(t=v.split("="),last_part=t[t.length-2].split("&"),n=t[t.length-1].split("&"),a=last_part[last_part.length-2],o=$("ul li[value='"+n+"']"),f=o.attr("value"),e=o.attr("data-download-url"),dlink=e,n=="win10"?$(".c-dialog .c-checkbox").hide():$(".c-dialog .c-checkbox").show(),f==n&&a==p&&(ChangeCheckboxState(),AppendDownloadURL(e,f),$("body").css("overflow","hidden"),$("body #mainContent").addClass("bgblur"),$(".c-dialog.f-flow.custom-popup").attr("aria-hidden","false"),$(".c-dialog.f-flow.custom-popup").attr("tabindex","0")),$("#flow-dialog-scroll .ctalink .c-hyperlink").attr("value",n));i=$("body #mainContent").attr("class");s=$("body #mainContent").attr("data-os");$(".c-dialog.custom-popup.f-flow button.c-glyph.glyph-cancel, .popup-overlay").on("click",function(){setTimeout(function(){$("body").removeAttr("style")},250);$(".c-combo .popup-btn").attr("value",w);(i=="macos"||i=="ios"||i=="android"||i=="windows"||s=="ios_mob"||s=="android_mob")&&$(".c-pivot .c-combo .popup-btn").attr("value","win10");$("#flow-dialog-scroll .ctalink .c-hyperlink").removeAttr("value");popupscroll()});r=$("body #mainContent").attr("class");u="";r=="ios"||r=="android"?$(".c-combo div ul li").each(function(){var n=$(this).attr("value");u="";r==n&&(u=$(this).attr("data-download-url"),$("#sticky-navbar .c-button.f-primary").addClass("device"),$("#sticky-navbar .c-button.f-primary").attr("btn-url",u))}):r=="windows"&&($(".window-msg").removeClass("hide"),$(".combo-option").addClass("hide"));h=0;c=0;$(".c-combo input.x-hidden-class").each(function(){var n=$(this).attr("id");n=n+h;$(this).attr("id",n);h++});$(".c-combo label.x-hidden-class").each(function(){var n=$(this).attr("for");n=n+c;$(this).attr("for",n);c++});$(".c-pivot ul[role=tablist] li.f-active").click()});$(document).ready(function(){var u=$("section[value=windows] .c-combo .c-button.btn-dwn.popup-btn"),t=u.attr("aria-label"),i,r,f,n;t!=undefined&&(t=t.indexOf("macOS")>-1?t.replace("macOS","Windows 10"):t.indexOf("Android")>-1?t.replace("Android","Windows 10"):t.indexOf("iOS")>-1?t.replace("iOS","Windows 10"):t,u.attr("aria-label",t));$(document).on("focus","#focus-jump",function(){$(this).closest(".c-dialog").find(".c-glyph.glyph-cancel").focus()});changeSupToAnchor();noSuperScript();i="";$(".c-dialog.custom-popup button[data-js-dialog-hide]").on("click",function(){$(".c-combo .exampleComboPopup2").removeAttr("aria-hidden");$(".c-combo .exampleComboPopup2").removeAttr("style");$(".c-dialog").removeAttr("value");i=="close"?sendEvents("Microsoft.WebBrowser.Installer.Insider.EULADismiss","CompleteButton",""):i=="lightdismiss"?$(".c-dialog").attr("id")==="flow-dialog-scroll"&&sendEvents("Microsoft.WebBrowser.Installer.Insider.EULADismiss","LightDismiss",""):sendEvents("Microsoft.WebBrowser.Installer.Insider.EULADismiss","Button","");i="";popupscroll();$(".InlinePlayerAPINonAutoplay[video-type='popup']").each(function(){$(this).find("iframe").attr("src","")})});$(".c-dialog.f-lightbox [role='presentation']").on("click",function(){$(".InlinePlayerAPINonAutoplay[video-type='popup']").each(function(){$(this).find("iframe").attr("src","")})});$(document).click(function(){$(".c-combo").attr("aria-expanded","false");$(".c-combo .c-glyph.btn-dwn.dropbtn").attr("aria-expanded","false");$(".c-combo .exampleComboPopup2").removeAttr("aria-hidden");$(".c-combo .exampleComboPopup2").removeAttr("style")});$("#default-dialog-single-preview").on({keydown:function(n){n.keyCode==27&&(n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation())}});$(document).keyup(function(n){n.keyCode==27&&(i="lightdismiss",$(".c-dialog.custom-popup button[data-js-dialog-hide]").click(),$(".popup-thankyou-content").addClass("hide"),$(".roledoc").removeClass("hide"),popupscroll())});$(".m-multi-feature li").on("click",function(){var t=$(this).index(),n;$(this).parents().siblings("section").eq(t).find("input[type='radio']").first().click();n=$(".m-multi-feature section").eq(t+1);n.find(".emailsms-show-hide, .emailsms-desktop").show();n.find(".thankyou-screen, .error-screen").hide()});$(".c-carousel.f-multi-slide .c-flipper").on("click",function(){setTimeout(function(){$(".c-pivot section[aria-hidden='false'] input[type='radio']").first().click()},300)});$(".c-combo div ul li").each(function(){$(this).attr("value").toLowerCase()=="ios"&&($(this).addClass("ios"),$(this).removeAttr("data-js-dialog-show"));$(this).attr("value").toLowerCase()=="android"&&($(this).addClass("android"),$(this).removeAttr("data-js-dialog-show"))});$(".c-combo div ul li").on("click",function(){var n=$(this).attr("value"),t;n=="ios"||n=="android"?window.open($(this).attr("data-download-url")):(currentosval=n,ChangeCheckboxState(),n=="win10"?$(".c-dialog .c-checkbox").hide():$(".c-dialog .c-checkbox").show(),dlink=$(this).attr("data-download-url"),AppendDownloadURL(dlink,n),$(".m-multi-feature.f-align-left>section>div>ul li").each(function(){var t=$(this).attr("value");t==n&&$(this).click()}),$("#check1").removeClass("check1"),$("#check2").removeClass("check2"),$(this).parents(".c-combo").attr("aria-expanded")=="true"&&($(this).parents(".c-combo").attr("aria-expanded","false"),$(this).parents(".c-combo").find(".c-glyph.btn-dwn.dropbtn").attr("aria-expanded","false")));$(".c-dialog.custom-popup div[role='dialog'] .roledoc .c-group .ctalink a.c-hyperlink").attr("value",n);t="#"+$(this).attr("data-js-dialog-show");setTimeout(function(){$(this).removeClass("active");$(t).find(".ctalink a").focus()},200)});$(".c-combo .c-button ").on("click",function(){var n,t;currentosval=$(this).val();currentosval=="win10"?$(".c-dialog .c-checkbox").hide():$(".c-dialog .c-checkbox").show();n=$(".c-combo div ul li[value="+currentosval+"]");dlink=$(n).attr("data-download-url");ChangeCheckboxState();AppendDownloadURL(dlink,currentosval);$(".c-dialog.custom-popup div[role='dialog'] .roledoc .c-group .ctalink a.c-hyperlink").attr("value",currentosval);t=$(this).attr("data-js-dialog-show");$(t).find(".ctalink a").focus()});$(".m-hero-item").each(function(){$(this).find(".c-combo").removeAttr("role")});$(".c-dialog .c-checkbox").find("input[type='checkbox']").on("change",function(){var t="Microsoft.WebBrowser.Installer.Insider.TelemetryCheckboxClick",n;$(this).is(":checked")?sendEvents(t,"1",""):sendEvents(t,"0","");n=$(this).parents(".c-dialog .c-checkbox").siblings(".ctalink").find("a").attr("href");n=n.split("?")[0];AppendDownloadURL(n,currentosval)});$(".c-combo div ul li.c-combo__option[role]").on("keydown",function(n){(n.keyCode==13||n.which==13)&&($(this).trigger("click"),$(this).parents(".c-combo").attr("aria-expanded")=="true"&&($(this).parents(".c-combo").attr("aria-expanded","false"),$(this).parents(".c-combo").find(".c-glyph.btn-dwn.dropbtn").attr("aria-expanded","false")))});$("body").on("keydown",function(n){n.keyCode==27&&$("#mainContent").removeClass("bgblur")});$(".c-combo button.dropbtn").click(function(n){$(".c-combo").not($(this).parent()).attr("aria-expanded","false");var t=$(this).parent().attr("aria-expanded");t=="false"?($(this).parent().attr("aria-expanded","true"),$(this).attr("aria-expanded","true")):($(this).parent().attr("aria-expanded","false"),$(this).attr("aria-expanded","false"));n.stopImmediatePropagation()});$("#sticky-navbar .c-button.f-primary").click(function(){var n=$("body #mainContent").attr("data-os"),i=$(".c-dialog.f-flow.custom-popup").attr("id"),t=$("#"+i+" .c-checkbox").find("input[type='checkbox']"),r="",u;r=n!="win10"?t.is(":checked")||t.attr("aria-checked")=="true"?"1":"0":"0";(n=="windows"||n=="android"||n=="ios")&&t.is(":checked")&&(t.prop("checked",!1),t.addClass("hide"));u="Microsoft.WebBrowser.Installer.Insider.ConsumerDownloadClick";$(".c-dialog.custom-popup div[role='dialog'] .roledoc .c-group .ctalink a.c-hyperlink").attr("value",n);sendEvents(u,n,r);setTimeout(function(){$(i).find(".ctalink a").focus()},100)});$(".c-combo .popup-btn").click(function(){var n=$("body #mainContent").attr("data-os"),i="#"+$(this).attr("data-js-dialog-show"),t=$(i+" .c-checkbox").find("input[type='checkbox']"),r="",u;r=n!="win10"?t.is(":checked")||t.attr("aria-checked")=="true"?"1":"0":"0";(n=="windows"||n=="android"||n=="ios")&&t.is(":checked")&&(t.prop("checked",!1),t.addClass("hide"));u="Microsoft.WebBrowser.Installer.Insider.ConsumerDownloadClick";sendEvents(u,n,r);setTimeout(function(){$(i).find(".ctalink a").focus()},100)});$("#flow-dialog-scroll .ctalink .c-hyperlink").click(function(){var u=$("body #mainContent").attr("data-os"),n=$(this).attr("value"),t=$(this).closest("#flow-dialog-scroll").find("input[type='checkbox']"),i="",r;i=n!="win10"?t.is(":checked")||t.attr("aria-checked")=="true"?"True":"False":"False";r="Microsoft.WebBrowser.Installer.Insider.ConsumerDownloadSubmit";sendEvents(r,n,i)});$("#sticky-navbar .c-button.f-primary.device").click(function(){window.open($(this).attr("btn-url"))});$("#sticky-navbar .c-button:not(.device)").on("click",function(){var n=$("body #mainContent").attr("class"),t;currentosval=n;t=$("ul li[value='"+n+"']");comboValue=t.attr("value");comboURL=t.attr("data-download-url");n=="win10"?$(".c-dialog .c-checkbox").hide():$(".c-dialog .c-checkbox").show();n=="ios"||n=="android"?window.open($("#sticky-navbar .c-button.f-primary").attr("btn-url")):(ChangeCheckboxState(),AppendDownloadURL(comboURL,n),$("body").css("overflow","hidden"),$("body #mainContent").addClass("bgblur"),$(".c-dialog.f-flow.custom-popup").attr("aria-hidden","false"),$(".c-dialog.f-flow.custom-popup").attr("tabindex","0"),$(".c-dialog.f-flow.custom-popup").find(".ctalink a").focus())});$("section[value*=windows] button.c-button").on("click",function(){$("body #mainContent").addClass("bgblur")});$("section[value*=macos] button.c-button[value*=macos]").on("click",function(){var n,t,i,r;currentosval=$(this).attr("value");$(".c-dialog .c-checkbox").show();n=$("#flow-dialog-scroll").find("input[type='checkbox']");t="";ChangeCheckboxState();i=$(this).attr("btn-url");AppendDownloadURL(i,currentosval);$("body").css("overflow","hidden");$("body #mainContent").addClass("bgblur");$(".c-dialog.f-flow.custom-popup").attr("aria-hidden","false");$(".c-dialog.f-flow.custom-popup").attr("tabindex","0");$(".c-dialog.f-flow.custom-popup").find(".ctalink a").focus();currentosval=="macos"&&$(".c-dialog.f-flow.custom-popup").attr("value",currentosval);$(".c-dialog.custom-popup div[role='dialog'] .roledoc .c-group .ctalink a.c-hyperlink").attr("value",currentosval);t=n.is(":checked")||n.attr("aria-checked")=="true"?"1":"0";r="Microsoft.WebBrowser.Installer.Insider.ConsumerDownloadClick";sendEvents(r,currentosval,t)});$(".c-dialog .c-glyph, .custom-popup .popup-overlay").click(function(){$(".popup-thankyou-content").addClass("hide");$(".roledoc").removeClass("hide")});$(".roledoc .c-group .ctalink a").click(function(){$(".popup-thankyou-content").removeClass("hide");$(".roledoc").addClass("hide")});$(".popup-thankyou-content button").click(function(){i="close";$(".c-dialog button[data-js-dialog-hide]").click();$(".roledoc").removeClass("hide");$(".popup-thankyou-content").addClass("hide");$("#flow-dialog-scroll .ctalink .c-hyperlink").removeAttr("value")});$(".c-dialog.custom-popup div .roledoc .c-group .ctalink a").removeAttr("target");r=$("body #mainContent").attr("class");(r=="ios"||r=="android"||r=="windows"||r=="macos")&&($(".c-pivot .c-combo .popup-btn").attr("value","win10"),f=$(".c-pivot .c-combo .popup-btn").attr("value"),n=$(".c-combo .popup-btn>span").html(),n.indexOf("Windows")!=-1?n=n.replace("Windows","Windows 10"):n.indexOf("Android")!=-1?n=n.replace("Android","Windows 10"):n.indexOf("iOS")!=-1?n=n.replace("iOS","Windows 10"):n.indexOf("macOS")!=-1&&(n=n.replace("macOS","Windows 10")),f=="win10"&&$(".c-pivot .c-combo .popup-btn>span").html(n))});$(window).resize(function(){contentplacementheight();SneakCarouselBtnHeight()});$(window).on("load",function(){contentplacementheight();SneakCarouselBtnHeight();setTimeout(function(){$(".m-content-placement .m-content-placement-item").each(function(){$(this).removeAttr("data-js-href");$(this).addClass("f-precise-click")})},1e3);var n=$("#default-dialog-single-preview").attr("aria-hidden");n=="false"&&$("body").css("overflow","hidden")});set_elements_height=function(n){n.each(function(n,t){var r=$(t).find(".m-content-placement-item div.body-copy p"),i=0;r.css("height","auto");r.each(function(){var n=$(this).innerHeight();i=i>n?i:n});r.css("height",i)});n.each(function(n,t){var r=$(t).find(".m-content-placement-item div.body-copy h3"),i=0;r.css("height","auto");r.each(function(){var n=$(this).innerHeight();i=i>n?i:n});r.css("height",i)})};$(document).on("click",".supBLink",function(n){var i,t;try{i=$(this).find(".supText").html();$(".lastClicked").length>0&&$(".lastClicked").removeClass("lastClicked");$(this).addClass("lastClicked");t="";$(".supFn").each(function(){$(this).text()===i&&(t=$(this),t.parent().parent().attr("tabindex","0"),t.parent().parent().trigger("focus"),t.parent().parent().attr("tabindex","-1"))})}catch(n){console.log(n)}});$(document).on("click",".supLink",function(n){try{var t=$(".lastClicked"),i=$(this).find(".supFn").html(),r="";i==$(".lastClicked .supText").html()?(t.trigger("focus"),t.removeClass("lastClicked")):$("sup .supText").each(function(){if(i===$(this).html())return r=$(this),r.parent().trigger("focus"),!1})}catch(n){console.log(n)}});$(window).on("load",function(){videoButtonAlignmnet();setTimeout(function(){$(".oneplayer-top .InlinePlayerAPINonAutoplay").each(function(){$(this).removeAttr("id")})},500)});$(window).on("resize",function(){videoButtonAlignmnet()});playeroptions={};$(document).ready(function(){playeroptions.autoplay=!1;playeroptions.mute=!1;playeroptions.loop=!1;playeroptions.useAdaptive=!0;playeroptions.controls=!0;playeroptions.market=$("html").attr("lang");playeroptions.playpausetrigger=!1;playeroptions.playFullScreen=!1;$(".m-feature").each(function(){var n=$(this).find("div .video-btn-trigger"),t=$(this).find("picture");n.insertAfter(t)});$(".InlinePlayerAPINonAutoplay").each(function(){$(this).attr("video-type")==="inline"&&IntilaiseVideoPlayer($(this))})});dialogsHideEventSubscription=[];$(document).on("keydown",".onplayer-button",function(n){n.keyCode===13&&$(this).trigger("click")});$Carousel=$(".stealth-carousel");$Carousel.length&&$Carousel.each(function(n,t){function a(){var n=0;$(t).find(".panel-content").css("height","auto");$(t).find(".panel-content").each(function(t,i){var r=$(i).outerHeight();r>n&&(n=r)});$(t).find(".panel-content").css("height",n+"px")}function e(n){var t=u-1;t<1&&(t=l);$(n).find(i+u).css({animation:"panelFadeOut 0.75s linear",opacity:"0","z-index":"-1"}).removeClass("active-panel");$(n).find(i+t).css({animation:"panelFadeIn 0.75s linear",opacity:"1","z-index":"12"}).removeClass("active-panel").addClass("active-panel");$(n).find(i+t).addClass("active");u=t;$(".stealth-carousel .right-carousel a,.stealth-carousel .left-carousel a").attr("tabindex","-1");focusOrder();$("#sneak-carousel .stealth-carousel .left-carousel .stealth-sub-carousel-panel .panel-content a").attr("tabindex","-1");$("#sneak-carousel .stealth-carousel .right-carousel .stealth-sub-carousel-panel .panel-content a").attr("tabindex","-1");$(n).find(i+t).hasClass("active-panel")&&($(n).find(i+t).find("a").attr("tabindex","0"),$(".stealth-panel-1 .panel-content .supText a").attr("tabindex","-1"))}function o(n){var t=u+1;t>l&&(t=1);$(n).find(i+u).css({animation:"panelFadeOut 0.75s linear",opacity:"0","z-index":"-1"}).removeClass("active-panel");$(n).find(i+t).css({animation:"panelFadeIn 0.75s linear",opacity:"1","z-index":"12"}).removeClass("active-panel").addClass("active-panel");$(n).find(i+t).addClass("active");u=t;$(".stealth-carousel .right-carousel a,.stealth-carousel .left-carousel a").attr("tabindex","-1");focusOrder();$(n).find(i+t).hasClass("active-panel")&&($(n).find(i+t).find("a").attr("tabindex","0"),$(".stealth-panel-1 .panel-content .supText a").attr("tabindex","-1"))}var l=$(t).find(".stealth-sub-carousel").first().find('[class^="stealth-panel-"]').length,u=1,i,r,h,c,s,f;a();$(window).resize(function(){a()});i=".stealth-panel-";r=30;$(t).find(".left-arrow").on("click",function(){e(t)});$(t).find(".right-arrow").on("click",function(){o(t)});h=0;c=0;t.addEventListener("touchstart",function(n){h=n.changedTouches[0].screenX},!1);t.addEventListener("touchend",function(n){c=n.changedTouches[0].screenX;var i=c-h;i>r?e(t):i<-r&&o(t)},!1);s=0;f=0;$(t).on("mousedown",function(n){s=n.clientX});$(t).on("mouseup",function(n){f=n.clientX;var i=f-s;i>r?e(t):i<-r&&o(t)});t.addEventListener("dragend",function(n){f=n.clientX;var i=f-s;i>r?e(t):i<-r&&o(t)},!1)});$("#sneak-carousel .stealth-carousel .left-caroousel .stealth-sub-carousel-panel .panel-content a").attr("tabindex","-1");$("#sneak-carousel .stealth-carousel .right-caroousel .stealth-sub-carousel-panel .panel-content a").attr("tabindex","-1"),function(n){typeof define=="function"&&define.amd?define(["jquery"],function(t){n(t,window,document)}):typeof module=="object"&&module.exports?module.exports=n(require("jquery"),window,document):n(jQuery,window,document)}(function(n,t,i,r){"use strict";function h(t,i){this.telInput=n(t);this.options=n.extend({},c,i);this.ns="."+u+l++;this.isGoodBrowser=Boolean(t.setSelectionRange);this.hadInitialPlaceholder=Boolean(n(t).attr("placeholder"))}var u="intlTelInput",l=1,c={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,hiddenInput:"",initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},f={UP:38,DOWN:40,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9},a=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],e,s,o;n(t).on("load",function(){n.fn[u].windowLoaded=!0});for(h.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(n("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new n.Deferred,this.utilsScriptDeferred=new n.Deferred,this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries();this._processCountryCodes();this._processPreferredCountries()},_addCountryCode:function(n,t,i){t in this.countryCodes||(this.countryCodes[t]=[]);var r=i||0;this.countryCodes[t][r]=n},_processAllCountries:function(){var n,t;this.options.onlyCountries.length?(n=this.options.onlyCountries.map(function(n){return n.toLowerCase()}),this.countries=e.filter(function(t){return n.indexOf(t.iso2)>-1})):this.options.excludeCountries.length?(t=this.options.excludeCountries.map(function(n){return n.toLowerCase()}),this.countries=e.filter(function(n){return t.indexOf(n.iso2)===-1})):this.countries=e},_processCountryCodes:function(){var t,n,i;for(this.countryCodes={},t=0;t<this.countries.length;t++)if(n=this.countries[t],this._addCountryCode(n.iso2,n.dialCode,n.priority),n.areaCodes)for(i=0;i<n.areaCodes.length;i++)this._addCountryCode(n.iso2,n.dialCode+n.areaCodes[i])},_processPreferredCountries:function(){var n,i,t;for(this.preferredCountries=[],n=0;n<this.options.preferredCountries.length;n++)i=this.options.preferredCountries[n].toLowerCase(),t=this._getCountryData(i,!1,!0),t&&this.preferredCountries.push(t)},_generateMarkup:function(){var i,t;this.telInput.attr("autocomplete","off");i="intl-tel-input";this.options.allowDropdown&&(i+=" allow-dropdown");this.options.separateDialCode&&(i+=" separate-dial-code");this.telInput.wrap(n("<div>",{"class":i}));this.flagsContainer=n("<div>",{"class":"flag-container"}).insertBefore(this.telInput);t=n("<div>",{"class":"selected-flag"});t.appendTo(this.flagsContainer);this.selectedFlagInner=n("<div>",{"class":"iti-flag"}).appendTo(t);this.options.separateDialCode&&(this.selectedDialCode=n("<div>",{"class":"selected-dial-code"}).appendTo(t));this.options.allowDropdown?(t.attr("tabindex","0"),n("<div>",{"class":"iti-arrow"}).appendTo(t),this.countryList=n("<ul>",{"class":"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),n("<li>",{"class":"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=n("<div>",{"class":"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=n();this.options.hiddenInput&&(this.hiddenInput=n("<input>",{type:"hidden",name:this.options.hiddenInput}).insertBefore(this.telInput))},_appendListItems:function(n,t){for(var i,r="",u=0;u<n.length;u++)i=n[u],r+="<li class='country "+t+"' data-dial-code='"+i.dialCode+"' data-country-code='"+i.iso2+"'>",r+="<div class='flag-box'><div class='iti-flag "+i.iso2+"'><\/div><\/div>",r+="<span class='country-name'>"+i.name+"<\/span>",r+="<span class='dial-code'>+"+i.dialCode+"<\/span>",r+="<\/li>";this.countryList.append(r)},_setInitialState:function(){var n=this.telInput.val();this._getDialCode(n)&&(!this._isRegionlessNanp(n)||this.options.nationalMode&&!this.options.initialCountry)?this._updateFlagFromNumber(n):this.options.initialCountry!=="auto"&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,n||this._setFlag(this.defaultCountry)),n||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode));n&&this._updateValFromNumber(n)},_initListeners:function(){this._initKeyListeners();this.options.autoHideDialCode&&this._initFocusListeners();this.options.allowDropdown&&this._initDropdownListeners();this.hiddenInput&&this._initHiddenInputListener()},_initHiddenInputListener:function(){var n=this,t=this.telInput.closest("form");t.length&&t.submit(function(){n.hiddenInput.val(n.getNumber())})},_initDropdownListeners:function(){var n=this,t=this.telInput.closest("label"),i;if(t.length)t.on("click"+this.ns,function(t){n.countryList.hasClass("hide")?n.telInput.focus():t.preventDefault()});i=this.selectedFlagInner.parent();i.on("click"+this.ns,function(){!n.countryList.hasClass("hide")||n.telInput.prop("disabled")||n.telInput.prop("readonly")||n._showDropdown()});this.flagsContainer.on("keydown"+n.ns,function(t){var i=n.countryList.hasClass("hide");i&&(t.which==f.UP||t.which==f.DOWN||t.which==f.SPACE||t.which==f.ENTER)&&(t.preventDefault(),t.stopPropagation(),n._showDropdown());t.which==f.TAB&&n._closeDropdown()})},_initRequests:function(){var i=this;if(this.options.utilsScript)if(n.fn[u].windowLoaded)n.fn[u].loadUtils(this.options.utilsScript,this.utilsScriptDeferred);else n(t).on("load",function(){n.fn[u].loadUtils(i.options.utilsScript,i.utilsScriptDeferred)});else this.utilsScriptDeferred.resolve();this.options.initialCountry==="auto"?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){var t=this;n.fn[u].autoCountry?this.handleAutoCountry():n.fn[u].startedLoadingAutoCountry||(n.fn[u].startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup(function(t){n.fn[u].autoCountry=t.toLowerCase();setTimeout(function(){n(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var n=this;this.telInput.on("keyup"+this.ns,function(){n._updateFlagFromNumber(n.telInput.val())&&n._triggerCountryChange()});this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){n._updateFlagFromNumber(n.telInput.val())&&n._triggerCountryChange()})})},_cap:function(n){var t=this.telInput.attr("maxlength");return t&&n.length>t?n.substr(0,t):n},_initFocusListeners:function(){var t=this,i;this.telInput.on("mousedown"+this.ns,function(n){t.telInput.is(":focus")||t.telInput.val()||(n.preventDefault(),t.telInput.focus())});this.telInput.on("focus"+this.ns,function(){if(!t.telInput.val()&&!t.telInput.prop("readonly")&&t.selectedCountryData.dialCode){t.telInput.val("+"+t.selectedCountryData.dialCode);t.telInput.one("keypress.plus"+t.ns,function(n){n.which==f.PLUS&&t.telInput.val("")});setTimeout(function(){var i=t.telInput[0],n;t.isGoodBrowser&&(n=t.telInput.val().length,i.setSelectionRange(n,n))})}});if(i=this.telInput.prop("form"),i)n(i).on("submit"+this.ns,function(){t._removeEmptyDialCode()});this.telInput.on("blur"+this.ns,function(){t._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var t=this.telInput.val(),i=t.charAt(0)=="+",n;i&&(n=this._getNumeric(t),n&&this.selectedCountryData.dialCode!=n||this.telInput.val(""));this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(n){return n.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var n=this.countryList.children(".active");n.length&&(this._highlightListItem(n),this._scrollTo(n));this._bindDropdownListeners();this.selectedFlagInner.children(".iti-arrow").addClass("up");this.telInput.trigger("open:countrydropdown")},_setDropdownPosition:function(){var s=this,r;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var u=this.telInput.offset(),i=u.top,f=n(t).scrollTop(),e=i+this.telInput.outerHeight()+this.dropdownHeight<f+n(t).height(),o=i-this.dropdownHeight>f;if(this.countryList.toggleClass("dropup",!e&&o),this.options.dropdownContainer){r=!e&&o?0:this.telInput.innerHeight();this.dropdown.css({top:i+r,left:u.left});n(t).on("scroll"+this.ns,function(){s._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this,e,r,u;this.countryList.on("mouseover"+this.ns,".country",function(){t._highlightListItem(n(this))});this.countryList.on("click"+this.ns,".country",function(){t._selectListItem(n(this))});e=!0;n("html").on("click"+this.ns,function(){e||t._closeDropdown();e=!1});r="";u=null;n(i).on("keydown"+this.ns,function(n){n.preventDefault();n.which==f.UP||n.which==f.DOWN?t._handleUpDownKey(n.which):n.which==f.ENTER?t._handleEnterKey():n.which==f.ESC?t._closeDropdown():(n.which>=f.A&&n.which<=f.Z||n.which==f.SPACE)&&(u&&clearTimeout(u),r+=String.fromCharCode(n.which),t._searchForCountry(r),u=setTimeout(function(){r=""},1e3))})},_handleUpDownKey:function(n){var i=this.countryList.children(".highlight").first(),t=n==f.UP?i.prev():i.next();t.length&&(t.hasClass("divider")&&(t=n==f.UP?t.prev():t.next()),this._highlightListItem(t),this._scrollTo(t))},_handleEnterKey:function(){var n=this.countryList.children(".highlight").first();n.length&&this._selectListItem(n)},_searchForCountry:function(n){for(var i,t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,n)){i=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(i);this._scrollTo(i,!0);break}},_startsWith:function(n,t){return n.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(n){if(this.options.formatOnDisplay&&t.intlTelInputUtils&&this.selectedCountryData){var i=!this.options.separateDialCode&&(this.options.nationalMode||n.charAt(0)!="+")?intlTelInputUtils.numberFormat.NATIONAL:intlTelInputUtils.numberFormat.INTERNATIONAL;n=intlTelInputUtils.formatNumber(n,this.selectedCountryData.iso2,i)}n=this._beforeSetNumber(n);this.telInput.val(n)},_updateFlagFromNumber:function(t){var i;t&&this.options.nationalMode&&this.selectedCountryData.dialCode=="1"&&t.charAt(0)!="+"&&(t.charAt(0)!="1"&&(t="1"+t),t="+"+t);var f=this._getDialCode(t),r=null,e=this._getNumeric(t);if(f){var u=this.countryCodes[this._getNumeric(f)],o=n.inArray(this.selectedCountryData.iso2,u)>-1,s=f=="+1"&&e.length>=4,h=this.selectedCountryData.dialCode=="1";if(!(h&&this._isRegionlessNanp(e))&&(!o||s))for(i=0;i<u.length;i++)if(u[i]){r=u[i];break}}else t.charAt(0)=="+"&&e.length?r="":t&&t!="+"||(r=this.defaultCountry);return r!==null?this._setFlag(r):!1},_isRegionlessNanp:function(t){var i=this._getNumeric(t),r;return i.charAt(0)=="1"?(r=i.substr(1,3),n.inArray(r,a)>-1):!1},_highlightListItem:function(n){this.countryListItems.removeClass("highlight");n.addClass("highlight")},_getCountryData:function(n,t,i){for(var u=t?e:this.countries,r=0;r<u.length;r++)if(u[r].iso2==n)return u[r];if(i)return null;throw new Error("No country data for '"+n+"'");},_setFlag:function(n){var i=this.selectedCountryData.iso2?this.selectedCountryData:{},u,t,r;return this.selectedCountryData=n?this._getCountryData(n,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.attr("class","iti-flag "+n),u=n?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown",this.selectedFlagInner.parent().attr("title",u),this.options.separateDialCode&&(t=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",r=this.telInput.parent(),i.dialCode&&r.removeClass("iti-sdc-"+(i.dialCode.length+1)),t&&r.addClass("iti-sdc-"+t.length),this.selectedDialCode.text(t)),this._updatePlaceholder(),this.countryListItems.removeClass("active"),n&&this.countryListItems.find(".iti-flag."+n).first().closest(".country").addClass("active"),i.iso2!==n},_updatePlaceholder:function(){var r=this.options.autoPlaceholder==="aggressive"||!this.hadInitialPlaceholder&&(this.options.autoPlaceholder===!0||this.options.autoPlaceholder==="polite"),i,n;t.intlTelInputUtils&&r&&(i=intlTelInputUtils.numberType[this.options.placeholderNumberType],n=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,i):"",n=this._beforeSetNumber(n),typeof this.options.customPlaceholder=="function"&&(n=this.options.customPlaceholder(n,this.selectedCountryData)),this.telInput.attr("placeholder",n))},_selectListItem:function(n){var i=this._setFlag(n.attr("data-country-code")),t;this._closeDropdown();this._updateDialCode(n.attr("data-dial-code"),!0);this.telInput.focus();this.isGoodBrowser&&(t=this.telInput.val().length,this.telInput[0].setSelectionRange(t,t));i&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide");this.selectedFlagInner.children(".iti-arrow").removeClass("up");n(i).off(this.ns);n("html").off(this.ns);this.countryList.off(this.ns);this.options.dropdownContainer&&(this.isMobile||n(t).off("scroll"+this.ns),this.dropdown.detach());this.telInput.trigger("close:countrydropdown")},_scrollTo:function(n,t){var i=this.countryList,u=i.height(),f=i.offset().top,c=f+u,e=n.outerHeight(),o=n.offset().top,l=o+e,r=o-f+i.scrollTop(),s=u/2-e/2,h;o<f?(t&&(r-=s),i.scrollTop(r)):l>c&&(t&&(r+=s),h=u-e,i.scrollTop(r-h))},_updateDialCode:function(n,t){var i=this.telInput.val(),r,u;if(n="+"+n,i.charAt(0)=="+")u=this._getDialCode(i),r=u?i.replace(u,n):n;else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)r=n+i;else if(t||!this.options.autoHideDialCode)r=n;else return}this.telInput.val(r)},_getDialCode:function(t){var f="",r,i,u;if(t.charAt(0)=="+")for(r="",i=0;i<t.length;i++)if(u=t.charAt(i),n.isNumeric(u)&&(r+=u,this.countryCodes[r]&&(f=t.substr(0,i+1)),r.length==4))break;return f},_getFullNumber:function(){var i=n.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,u,r=this._getNumeric(i),f=r.charAt(0)=="1"?r:"1"+r;return u=this.options.separateDialCode?"+"+t:i.charAt(0)!="+"&&i.charAt(0)!="1"&&t&&t.charAt(0)=="1"&&t.length==4&&t!=f.substr(0,4)?t.substr(1):"",u+i},_beforeSetNumber:function(n){var t,i;return this.options.separateDialCode&&(t=this._getDialCode(n),t&&(this.selectedCountryData.areaCodes!==null&&(t="+"+this.selectedCountryData.dialCode),i=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length,n=n.substr(i))),this._cap(n)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){this.options.initialCountry==="auto"&&(this.defaultCountry=n.fn[u].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){t.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder());this.utilsScriptDeferred.resolve()},destroy:function(){var t,i;this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns));this.options.autoHideDialCode&&(t=this.telInput.prop("form"),t&&n(t).off(this.ns));this.telInput.off(this.ns);i=this.telInput.parent();i.before(this.telInput).remove()},getExtension:function(){return t.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(n){return t.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,n):""},getNumberType:function(){return t.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData},getValidationError:function(){return t.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var i=n.trim(this._getFullNumber()),r=this.options.nationalMode?this.selectedCountryData.iso2:"";return t.intlTelInputUtils?intlTelInputUtils.isValidNumber(i,r):null},setCountry:function(n){n=n.toLowerCase();this.selectedFlagInner.hasClass(n)||(this._setFlag(n),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(n){var t=this._updateFlagFromNumber(n);this._updateValFromNumber(n);t&&this._triggerCountryChange()},setPlaceholderNumberType:function(n){this.options.placeholderNumberType=n;this._updatePlaceholder()}},n.fn[u]=function(t){var e=arguments,i,f;return t===r||typeof t=="object"?(i=[],this.each(function(){if(!n.data(this,"plugin_"+u)){var r=new h(this,t),f=r._init();i.push(f[0]);i.push(f[1]);n.data(this,"plugin_"+u,r)}}),n.when.apply(null,i)):typeof t=="string"&&t[0]!=="_"?(this.each(function(){var i=n.data(this,"plugin_"+u);i instanceof h&&typeof i[t]=="function"&&(f=i[t].apply(i,Array.prototype.slice.call(e,1)));t==="destroy"&&n.data(this,"plugin_"+u,null)}),f!==r?f:this):void 0},n.fn[u].getCountryData=function(){return e},n.fn[u].loadUtils=function(t,i){n.fn[u].loadedUtilsScript?i&&i.resolve():(n.fn[u].loadedUtilsScript=!0,n.ajax({type:"GET",url:t,complete:function(){n(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},n.fn[u].defaults=c,n.fn[u].version="12.1.2",e=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1242"],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1246"],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1441"],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1876"],["Japan (日本)","jp","81"],["Jersey","je","44",3],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["Macedonia (FYROM) (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1664"],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna (Wallis-et-Futuna)","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1]],s=0;s<e.length;s++)o=e[s],e[s]={name:o[0],iso2:o[1],dialCode:o[2],priority:o[3]||0,areaCodes:o[4]||null}});$reasonText=$("#description-text");uninstallOtherValue=$("#description-text").closest("label").find("input").val();BindEvents();$(function(){var n=$(".edgeconsumer.features").attr("data-pageName");$(".c-radio").each(function(){n=="Uninstall"&&(console.log(n),ReorderOptions($(this).find("div").find("div")))})});var showValidationErrors=!1,$email=$("#email"),$includeEmail=$("#include-email").on("change",function(){var n=$includeEmail.prop("checked");$email.prop("disabled",!n);validateForm()}),validateForm=function(){var n=$includeEmail.prop("checked")&&!validateuinstallEmail($email.val());return showValidationErrors&&($email.toggleClass("invalid",n),$email.toggleClass("border-red",n)),!n};$email.on("keyup keyblur change keydown",function(n){if(validateForm(),n.keyCode==9){var t=$(this).val();IsEmail(t)?$(this).removeClass("border-red"):$(this).addClass("border-red")}});var uploadEndpointInt="https://petrol.office.microsoft.com/v1/feedback",pageViewEventName="Microsoft.WebBrowser.Installer.Uninstall.PageViewed.t4",buttonClickEventName="Microsoft.WebBrowser.Installer.Uninstall.ButtonClicked.t4",surveyID="4a373504-4c47-42e3-9528-f77c04526a72",officeBuild="",osBuild="",langCode="",channel="",deviceId="";$("#submit-button").click(function(){send()});getURIComponent(),function(n,t){var i,r;if(typeof exports=="object"&&typeof module=="object")module.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{i=t();for(r in i)(typeof exports=="object"?exports:n)[r]=i[r]}}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.i=function(n){return n},t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=30)}([function(n,t){"use strict";var i,r,u,f,e,o;Object.defineProperty(t,"__esModule",{value:!0}),function(n){n[n.Unspecified=0]="Unspecified";n[n.String=1]="String";n[n.Int64=2]="Int64";n[n.Double=3]="Double";n[n.Boolean=4]="Boolean";n[n.Date=5]="Date"}(i=t.AWTPropertyType||(t.AWTPropertyType={})),function(n){n[n.NotSet=0]="NotSet";n[n.DistinguishedName=1]="DistinguishedName";n[n.GenericData=2]="GenericData";n[n.IPV4Address=3]="IPV4Address";n[n.IPv6Address=4]="IPv6Address";n[n.MailSubject=5]="MailSubject";n[n.PhoneNumber=6]="PhoneNumber";n[n.QueryString=7]="QueryString";n[n.SipAddress=8]="SipAddress";n[n.SmtpAddress=9]="SmtpAddress";n[n.Identity=10]="Identity";n[n.Uri=11]="Uri";n[n.Fqdn=12]="Fqdn";n[n.IPV4AddressLegacy=13]="IPV4AddressLegacy"}(r=t.AWTPiiKind||(t.AWTPiiKind={})),function(n){n[n.NotSet=0]="NotSet";n[n.GenericContent=1]="GenericContent"}(u=t.AWTCustomerContentKind||(t.AWTCustomerContentKind={})),function(n){n[n.Low=1]="Low";n[n.Normal=2]="Normal";n[n.High=3]="High";n[n.Immediate_sync=5]="Immediate_sync"}(f=t.AWTEventPriority||(t.AWTEventPriority={})),function(n){n[n.NonRetryableStatus=1]="NonRetryableStatus";n[n.QueueFull=3]="QueueFull"}(e=t.AWTEventsDroppedReason||(t.AWTEventsDroppedReason={})),function(n){n[n.InvalidEvent=1]="InvalidEvent";n[n.SizeLimitExceeded=2]="SizeLimitExceeded";n[n.KillSwitch=3]="KillSwitch"}(o=t.AWTEventsRejectedReason||(t.AWTEventsRejectedReason={}))},function(n,t,i){"use strict";function g(n){var t=new w.Int64("0");return t.low=n&4294967295,t.high=Math.floor(n/4294967296),t}function nt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(b,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})}function l(n){return typeof n=="string"}function f(n){return typeof n=="number"}function a(n){return typeof n=="boolean"}function s(n){return n instanceof Date}function v(n){return(n+k)*d}function tt(n){var t=n.indexOf("-");return t>-1?n.substring(0,t):""}function it(){return h===r&&(h=typeof navigator!="undefined"&&Boolean(navigator.sendBeacon)),h}function rt(){return c===r&&(c=typeof Uint8Array!="undefined"&&!yt()&&!y()),c}function ut(n){return f(n)&&(n>=1&&n<=3||n===5)?!0:!1}function ft(n,i){return!t.PropertyNameRegex.test(n)||p(i)?r:(p(i.value)&&(i={value:i,type:u.AWTPropertyType.Unspecified}),i.type=ht(i.value,i.type),!i.type)?r:(s(i.value)&&(i.value=v(i.value.getTime())),i.pii>0&&i.cc>0)?r:i.pii?lt(i.pii)?i:r:i.cc?at(i.cc)?i:r:i}function et(n){return n.getUTCFullYear()+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"."+st(n.getUTCMilliseconds())+"Z"}function ot(){if(o===r){var n=new XMLHttpRequest;o=typeof n.withCredentials=="undefined"&&typeof XDomainRequest!="undefined"?!0:!1}return o}function y(){return typeof navigator!="undefined"&&navigator.product?navigator.product==="ReactNative":!1}function e(n){return n<10?"0"+n:n.toString()}function st(n){return n<10?"00"+n:n<100?"0"+n:n.toString()}function ht(n,t){t=vt(t)?t:u.AWTPropertyType.Unspecified;switch(t){case u.AWTPropertyType.Unspecified:return ct(n);case u.AWTPropertyType.String:return l(n)?t:r;case u.AWTPropertyType.Boolean:return a(n)?t:r;case u.AWTPropertyType.Date:return s(n)&&n.getTime()!==NaN?t:r;case u.AWTPropertyType.Int64:return f(n)&&n%1==0?t:r;case u.AWTPropertyType.Double:return f(n)?t:r}return r}function ct(n){switch(typeof n){case"string":return u.AWTPropertyType.String;case"boolean":return u.AWTPropertyType.Boolean;case"number":return u.AWTPropertyType.Double;case"object":return s(n)?u.AWTPropertyType.Date:r}return r}function lt(n){return f(n)&&n>=0&&n<=13?!0:!1}function at(n){return f(n)&&n>=0&&n<=1?!0:!1}function vt(n){return f(n)&&n>=0&&n<=4?!0:!1}function yt(){if(typeof navigator!="undefined"&&navigator.userAgent){var n=navigator.userAgent.toLowerCase();if((n.indexOf("safari")>=0||n.indexOf("firefox")>=0)&&n.indexOf("chrome")<0)return!0}return!1}function p(n){return n===undefined||n===r||n===""}Object.defineProperty(t,"__esModule",{value:!0});var w=i(4),u=i(0),b=/[xy]/g,k=621355968e5,d=1e4,r=null;t.EventNameAndTypeRegex=/^[a-zA-Z]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/;t.EventNameDotRegex=/\./g;t.PropertyNameRegex=/^[a-zA-Z](([a-zA-Z0-9|_|\.]){0,98}[a-zA-Z0-9])?$/;t.StatsApiKey="a387cfcf60114a43a7699f9fbb49289e-9bceb9fe-1c06-460f-96c5-6a0b247358bc-7238";var h=r,c=r,o=r;t.numberToBondInt64=g;t.newGuid=nt;t.isString=l;t.isNumber=f;t.isBoolean=a;t.isDate=s;t.msToTicks=v;t.getTenantId=tt;t.isBeaconsSupported=it;t.isUint8ArrayAvailable=rt;t.isPriority=ut;t.sanitizeProperty=ft;t.getISOString=et;t.useXDomainRequest=ot;t.isReactNative=y},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.addNotificationListener=function(n){this.listeners.push(n)},n.removeNotificationListener=function(n){for(var t=this.listeners.indexOf(n);t>-1;)this.listeners.splice(t,1),t=this.listeners.indexOf(n)},n.eventsSent=function(n){for(var i=this,r=function(t){u.listeners[t].eventsSent&&setTimeout(function(){return i.listeners[t].eventsSent(n)},0)},u=this,t=0;t<this.listeners.length;++t)r(t)},n.eventsDropped=function(n,t){for(var r=this,u=function(i){f.listeners[i].eventsDropped&&setTimeout(function(){return r.listeners[i].eventsDropped(n,t)},0)},f=this,i=0;i<this.listeners.length;++i)u(i)},n.eventsRetrying=function(n){for(var i=this,r=function(t){u.listeners[t].eventsRetrying&&setTimeout(function(){return i.listeners[t].eventsRetrying(n)},0)},u=this,t=0;t<this.listeners.length;++t)r(t)},n.eventsRejected=function(n,t){for(var r=this,u=function(i){f.listeners[i].eventsRejected&&setTimeout(function(){return r.listeners[i].eventsRejected(n,t)},0)},f=this,i=0;i<this.listeners.length;++i)u(i)},n.listeners=[],n}();t.default=i},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(14),r=i(0),o=i(28),f=i(10),s=i(5),h=i(11),c=i(1),l=4,a=3e4,e="awt_stats",v=function(){function n(){}return n.setEventsHandler=function(n){this._eventHandler=n},n.getEventsHandler=function(){return this._eventHandler},n.scheduleTimer=function(){var t=this,n=this._profiles[this._currentProfile][2];this._timeout<0&&n>=0&&!this._paused&&(this._eventHandler.hasEvents()?(n===0&&this._currentBackoffCount>0&&(n=1),this._timeout=setTimeout(function(){return t._batchAndSendEvents()},n*(1<<this._currentBackoffCount)*1e3)):this._timerCount=0)},n.initialize=function(n){var t=this;this._newEventsAllowed=!0;this._config=n;this._eventHandler=new o.default(n.collectorUri,n.cacheMemorySizeLimitInNumberOfEvents,n.httpXHROverride,n.clockSkewRefreshDurationInMins);this._initializeProfiles();f.default.initialize(function(n,i){var u,f;if(t._config.canSendStatEvent(e)){u=new s.default(e);u.setEventPriority(r.AWTEventPriority.High);u.setProperty("TenantId",i);for(f in n)n.hasOwnProperty(f)&&u.setProperty(f,n[f].toString());h.default.getLogger(c.StatsApiKey).logEvent(u)}})},n.setTransmitProfile=function(n){this._currentProfile!==n&&this._profiles[n]!==undefined&&(this.clearTimeout(),this._currentProfile=n,this.scheduleTimer())},n.loadTransmitProfiles=function(n){var i,r,t,u;this._resetTransmitProfiles();for(i in n)if(n.hasOwnProperty(i)){if(n[i].length!==3)continue;for(t=2;t>=0;--t)if(n[i][t]<0){for(r=t;r>=0;--r)n[i][r]=-1;break}for(t=2;t>0;--t)n[i][t]>0&&n[i][t-1]>0&&(u=n[i][t-1]/n[i][t],n[i][t-1]=Math.ceil(u)*n[i][t]);this._profiles[i]=n[i]}},n.sendEvent=function(n){this._newEventsAllowed&&(this._currentBackoffCount>0&&n.priority===r.AWTEventPriority.Immediate_sync&&(n.priority=r.AWTEventPriority.High),this._eventHandler.addEvent(n),this.scheduleTimer())},n.flush=function(n){var t=(new Date).getTime();!this._paused&&this._lastUploadNowCall+a<t&&(this._lastUploadNowCall=t,this._timeout>-1&&(clearTimeout(this._timeout),this._timeout=-1),this._eventHandler.uploadNow(n))},n.pauseTransmission=function(){this._paused||(this.clearTimeout(),this._eventHandler.pauseTransmission(),this._paused=!0)},n.resumeTransmision=function(){this._paused&&(this._paused=!1,this._eventHandler.resumeTransmission(),this.scheduleTimer())},n.flushAndTeardown=function(){f.default.teardown();this._newEventsAllowed=!1;this.clearTimeout();this._eventHandler.teardown()},n.backOffTransmission=function(){this._currentBackoffCount<l&&(this._currentBackoffCount++,this.clearTimeout(),this.scheduleTimer())},n.clearBackOff=function(){this._currentBackoffCount>0&&(this._currentBackoffCount=0,this.clearTimeout(),this.scheduleTimer())},n._resetTransmitProfiles=function(){this.clearTimeout();this._initializeProfiles();this._currentProfile=u.AWT_REAL_TIME;this.scheduleTimer()},n.clearTimeout=function(){this._timeout>0&&(clearTimeout(this._timeout),this._timeout=-1,this._timerCount=0)},n._batchAndSendEvents=function(){var n=r.AWTEventPriority.High;this._timerCount++;this._timerCount*this._profiles[this._currentProfile][2]===this._profiles[this._currentProfile][0]?(n=r.AWTEventPriority.Low,this._timerCount=0):this._timerCount*this._profiles[this._currentProfile][2]===this._profiles[this._currentProfile][1]&&(n=r.AWTEventPriority.Normal);this._eventHandler.sendEventsForPriorityAndAbove(n);this._timeout=-1;this.scheduleTimer()},n._initializeProfiles=function(){this._profiles={};this._profiles[u.AWT_REAL_TIME]=[4,2,1];this._profiles[u.AWT_NEAR_REAL_TIME]=[12,6,3];this._profiles[u.AWT_BEST_EFFORT]=[36,18,9]},n._newEventsAllowed=!1,n._currentProfile=u.AWT_REAL_TIME,n._timeout=-1,n._currentBackoffCount=0,n._paused=!1,n._timerCount=0,n._lastUploadNowCall=0,n}();t.default=v},function(n,t){"use strict";var i,r,u;Object.defineProperty(t,"__esModule",{value:!0});i=function(){function n(n){this.low=0;this.high=0;this.low=parseInt(n,10);this.low<0&&(this.high=-1)}return n.prototype._Equals=function(t){var i=new n(t);return this.low===i.low&&this.high===i.high},n}();t.Int64=i;r=function(){function n(n){this.low=0;this.high=0;this.low=parseInt(n,10)}return n.prototype._Equals=function(t){var i=new n(t);return this.low===i.low&&this.high===i.high},n}();t.UInt64=r;u=function(){function n(){}return n._ToByte=function(n){return this._ToUInt8(n)},n._ToUInt8=function(n){return n&255},n._ToInt32=function(n){var t=n&2147483648;return n&2147483647|t},n._ToUInt32=function(n){return n&4294967295},n}();t.Number=u},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(1),r=i(0),f=function(){function n(n){this._event={name:"",properties:{}};n&&this.setName(n)}return n.prototype.setName=function(n){this._event.name=n},n.prototype.getName=function(){return this._event.name},n.prototype.setType=function(n){this._event.type=n},n.prototype.getType=function(){return this._event.type},n.prototype.setTimestamp=function(n){this._event.timestamp=n},n.prototype.getTimestamp=function(){return this._event.timestamp},n.prototype.setEventPriority=function(n){this._event.priority=n},n.prototype.getEventPriority=function(){return this._event.priority},n.prototype.setProperty=function(n,t,i){i===void 0&&(i=r.AWTPropertyType.Unspecified);var f={value:t,type:i,pii:r.AWTPiiKind.NotSet,cc:r.AWTCustomerContentKind.NotSet};if(f=u.sanitizeProperty(n,f),f===null){delete this._event.properties[n];return}this._event.properties[n]=f},n.prototype.setPropertyWithPii=function(n,t,i,f){f===void 0&&(f=r.AWTPropertyType.Unspecified);var e={value:t,type:f,pii:i,cc:r.AWTCustomerContentKind.NotSet};if(e=u.sanitizeProperty(n,e),e===null){delete this._event.properties[n];return}this._event.properties[n]=e},n.prototype.setPropertyWithCustomerContent=function(n,t,i,f){f===void 0&&(f=r.AWTPropertyType.Unspecified);var e={value:t,type:f,pii:r.AWTPiiKind.NotSet,cc:i};if(e=u.sanitizeProperty(n,e),e===null){delete this._event.properties[n];return}this._event.properties[n]=e},n.prototype.getPropertyMap=function(){return this._event.properties},n.prototype.getEvent=function(){return this._event},n}();t.default=f},function(n,t){"use strict";var i,r;Object.defineProperty(t,"__esModule",{value:!0}),function(n){n[n.Unknown=0]="Unknown";n[n.MSACID=1]="MSACID";n[n.MSAPUID=2]="MSAPUID";n[n.ANID=3]="ANID";n[n.OrgIdCID=4]="OrgIdCID";n[n.OrgIdPUID=5]="OrgIdPUID";n[n.UserObjectId=6]="UserObjectId";n[n.Skype=7]="Skype";n[n.Yammer=8]="Yammer";n[n.EmailAddress=9]="EmailAddress";n[n.PhoneNumber=10]="PhoneNumber";n[n.SipAddress=11]="SipAddress";n[n.MUID=12]="MUID"}(i=t.AWTUserIdType||(t.AWTUserIdType={})),function(n){n[n.Started=0]="Started";n[n.Ended=1]="Ended"}(r=t.AWTSessionState||(t.AWTSessionState={}))},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=i(1),s="MicrosoftApplicationsTelemetryDeviceId",l="MicrosoftApplicationsTelemetryFirstLaunchTime",r={MSIE:"MSIE",CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",EDGE:"Edge",ELECTRON:"Electron",SKYPE_SHELL:"SkypeShell",PHANTOMJS:"PhantomJS",OPERA:"Opera"},u={WINDOWS:"Windows",MACOSX:"Mac OS X",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",CROS:"Chrome OS",UNKNOWN:"Unknown"},f={WIN:/(windows|win32)/i,WINRT:/ arm;/i,WINPHONE:/windows\sphone\s\d+\.\d+/i,OSX:/(macintosh|mac os x)/i,IOS:/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i,LINUX:/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)/i,ANDROID:/android/i,CROS:/CrOS/i},a={"5.1":"XP","6.0":"Vista","6.1":"7","6.2":"8","6.3":"8.1","10.0":"10"},h="([\\d,.]+)",v="([\\d,_,.]+)",e="Unknown",o="undefined",y=function(){function n(){}return n.addPropertyStorageOverride=function(n){return n?(this._propertyStorage=n,!0):!1},n.autoCollect=function(n,t,i){if(this._semanticContext=n,this._disableCookies=t,this._autoCollect(),i||typeof navigator===o||(i=navigator.userAgent||""),this._autoCollectFromUserAgent(i),this._disableCookies&&!this._propertyStorage){this._deleteCookie(s);this._deleteCookie(l);return}(this._propertyStorage||this._areCookiesAvailable&&!this._disableCookies)&&this._autoCollectDeviceId()},n.checkAndSaveDeviceId=function(n){if(n){var i=this._getData(s),t=this._getData(l);i!==n&&(t=c.getISOString(new Date));this._saveData(s,n);this._saveData(l,t);this._setFirstLaunchTime(t)}},n._autoCollectDeviceId=function(){var n=this._getData(s);n||(n=c.newGuid());this._semanticContext.setDeviceId(n)},n._autoCollect=function(){typeof document!==o&&document.documentElement&&this._semanticContext.setAppLanguage(document.documentElement.lang);typeof navigator!==o&&this._semanticContext.setUserLanguage(navigator.userLanguage||navigator.language);var i=(new Date).getTimezoneOffset(),n=i%60,t=(i-n)/60,r="+";t>0&&(r="-");t=Math.abs(t);n=Math.abs(n);this._semanticContext.setUserTimeZone(r+(t<10?"0"+t:t.toString())+":"+(n<10?"0"+n:n.toString()))},n._autoCollectFromUserAgent=function(n){var t,i;n&&(t=this._getBrowserName(n),this._semanticContext.setDeviceBrowserName(t),this._semanticContext.setDeviceBrowserVersion(this._getBrowserVersion(n,t)),i=this._getOsName(n),this._semanticContext.setDeviceOsName(i),this._semanticContext.setDeviceOsVersion(this._getOsVersion(n,i)))},n._getBrowserName=function(n){return this._userAgentContainsString("OPR/",n)?r.OPERA:this._userAgentContainsString(r.PHANTOMJS,n)?r.PHANTOMJS:this._userAgentContainsString(r.EDGE,n)?r.EDGE:this._userAgentContainsString(r.ELECTRON,n)?r.ELECTRON:this._userAgentContainsString(r.CHROME,n)?r.CHROME:this._userAgentContainsString("Trident",n)?r.MSIE:this._userAgentContainsString(r.FIREFOX,n)?r.FIREFOX:this._userAgentContainsString(r.SAFARI,n)?r.SAFARI:this._userAgentContainsString(r.SKYPE_SHELL,n)?r.SKYPE_SHELL:e},n._setFirstLaunchTime=function(n){if(!isNaN(n)){var t=new Date;t.setTime(parseInt(n,10));n=c.getISOString(t)}this.firstLaunchTime=n},n._userAgentContainsString=function(n,t){return t.indexOf(n)>-1},n._getBrowserVersion=function(n,t){return t===r.MSIE?this._getIeVersion(n):this._getOtherVersion(t,n)},n._getIeVersion=function(n){var i=n.match(new RegExp(r.MSIE+" "+h)),t;return i?i[1]:(t=n.match(new RegExp("rv:"+h)),t)?t[1]:void 0},n._getOtherVersion=function(n,t){n===r.SAFARI&&(n="Version");var i=t.match(new RegExp(n+"/"+h));return i?i[1]:e},n._getOsName=function(n){return n.match(f.WINPHONE)?u.WINDOWS_PHONE:n.match(f.WINRT)?u.WINDOWS_RT:n.match(f.IOS)?u.IOS:n.match(f.ANDROID)?u.ANDROID:n.match(f.LINUX)?u.LINUX:n.match(f.OSX)?u.MACOSX:n.match(f.WIN)?u.WINDOWS:n.match(f.CROS)?u.CROS:e},n._getOsVersion=function(n,t){return t===u.WINDOWS?this._getGenericOsVersion(n,"Windows NT"):t===u.ANDROID?this._getGenericOsVersion(n,t):t===u.MACOSX?this._getMacOsxVersion(n):e},n._getGenericOsVersion=function(n,t){var i=n.match(new RegExp(t+" "+h));return i?a[i[1]]?a[i[1]]:i[1]:e},n._getMacOsxVersion=function(n){var r=n.match(new RegExp(u.MACOSX+" "+v)),t,i,f;return r&&(t=r[1].replace(/_/g,"."),t)?(i=this._getDelimiter(t),i?(f=t.split(i),f[0]):t):e},n._getDelimiter=function(n){return n.indexOf(".")>-1?".":n.indexOf("_")>-1?"_":null},n._saveData=function(n,t){var i,r;this._propertyStorage?this._propertyStorage.setProperty(n,t):this._areCookiesAvailable&&(i=new Date,i.setTime(i.getTime()+31536e6),r="expires="+i.toUTCString(),document.cookie=n+"="+t+"; "+r)},n._getData=function(n){var u,i,t,r;if(this._propertyStorage)return this._propertyStorage.getProperty(n)||"";if(this._areCookiesAvailable)for(n=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i],r=0;t.charAt(r)===" ";)r++;if(t=t.substring(r),t.indexOf(n)===0)return t.substring(n.length,t.length)}return""},n._deleteCookie=function(n){this._areCookiesAvailable&&(document.cookie=n+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},n._disableCookies=!1,n._areCookiesAvailable=typeof document!==o&&typeof document.cookie!==o,n}();t.default=y},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=i(7),r=i(0),u=i(6),f="UserInfo.IdType",o=function(){function n(n,t){this._allowDeviceFields=n;this._properties=t}return n.prototype.setAppId=function(n){this._addContext("AppInfo.Id",n)},n.prototype.setAppVersion=function(n){this._addContext("AppInfo.Version",n)},n.prototype.setAppLanguage=function(n){this._addContext("AppInfo.Language",n)},n.prototype.setDeviceId=function(n){this._allowDeviceFields&&(e.default.checkAndSaveDeviceId(n),this._addContext("DeviceInfo.Id",n))},n.prototype.setDeviceOsName=function(n){this._allowDeviceFields&&this._addContext("DeviceInfo.OsName",n)},n.prototype.setDeviceOsVersion=function(n){this._allowDeviceFields&&this._addContext("DeviceInfo.OsVersion",n)},n.prototype.setDeviceBrowserName=function(n){this._allowDeviceFields&&this._addContext("DeviceInfo.BrowserName",n)},n.prototype.setDeviceBrowserVersion=function(n){this._allowDeviceFields&&this._addContext("DeviceInfo.BrowserVersion",n)},n.prototype.setDeviceMake=function(n){this._allowDeviceFields&&this._addContext("DeviceInfo.Make",n)},n.prototype.setDeviceModel=function(n){this._allowDeviceFields&&this._addContext("DeviceInfo.Model",n)},n.prototype.setUserId=function(n,t,i){if(!isNaN(i)&&i!==null&&i>=0&&i<=12)this._addContext(f,i.toString());else{var e=void 0;switch(t){case r.AWTPiiKind.SipAddress:e=u.AWTUserIdType.SipAddress;break;case r.AWTPiiKind.PhoneNumber:e=u.AWTUserIdType.PhoneNumber;break;case r.AWTPiiKind.SmtpAddress:e=u.AWTUserIdType.EmailAddress;break;default:e=u.AWTUserIdType.Unknown}this._addContext(f,e.toString())}if(isNaN(t)||t===null||t===r.AWTPiiKind.NotSet||t>13)switch(i){case u.AWTUserIdType.Skype:t=r.AWTPiiKind.Identity;break;case u.AWTUserIdType.EmailAddress:t=r.AWTPiiKind.SmtpAddress;break;case u.AWTUserIdType.PhoneNumber:t=r.AWTPiiKind.PhoneNumber;break;case u.AWTUserIdType.SipAddress:t=r.AWTPiiKind.SipAddress;break;default:t=r.AWTPiiKind.NotSet}this._addContextWithPii("UserInfo.Id",n,t)},n.prototype.setUserAdvertisingId=function(n){this._addContext("UserInfo.AdvertisingId",n)},n.prototype.setUserTimeZone=function(n){this._addContext("UserInfo.TimeZone",n)},n.prototype.setUserLanguage=function(n){this._addContext("UserInfo.Language",n)},n.prototype._addContext=function(n,t){typeof t=="string"&&this._properties.setProperty(n,t)},n.prototype._addContextWithPii=function(n,t,i){typeof t=="string"&&this._properties.setPropertyWithPii(n,t,i)},n}();t.default=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(21),u=i(0),o=i(2),f=i(1),e=2936012,s=function(){function n(){}return n.getPayloadBlob=function(n,t){var w=!1,l,s=new r.IO.MemoryStream,i=new r.CompactBinaryProtocolWriter(s),h,c,v,p,a,y;i._WriteFieldBegin(r._BondDataType._BT_MAP,3,null);i._WriteMapContainerBegin(t,r._BondDataType._BT_STRING,r._BondDataType._BT_LIST);for(h in n)if(w)l||(l={}),l[h]=n[h],delete n[h];else if(n.hasOwnProperty(h)){for(i._WriteString(h),c=n[h],i._WriteContainerBegin(1,r._BondDataType._BT_STRUCT),i._WriteFieldBegin(r._BondDataType._BT_STRING,2,null),i._WriteString("act_default_source"),i._WriteFieldBegin(r._BondDataType._BT_STRING,5,null),i._WriteString(f.newGuid()),i._WriteFieldBegin(r._BondDataType._BT_INT64,6,null),i._WriteInt64(f.numberToBondInt64(Date.now())),i._WriteFieldBegin(r._BondDataType._BT_LIST,8,null),v=s._GetBuffer().length+1,i._WriteContainerBegin(n[h].length,r._BondDataType._BT_STRUCT),p=s._GetBuffer().length-v,a=0;a<c.length;++a){if(y=s._GetBuffer().length,this.writeEvent(c[a],i),s._GetBuffer().length-y>e){o.default.eventsRejected([c[a]],u.AWTEventsRejectedReason.SizeLimitExceeded);c.splice(a--,1);s._GetBuffer().splice(y);this._addNewDataPackageSize(c.length,s,p,v);continue}if(s._GetBuffer().length>e){s._GetBuffer().splice(y);l||(l={});n[h]=c.splice(0,a);l[h]=c;this._addNewDataPackageSize(n[h].length,s,p,v);w=!0;break}}i._WriteStructEnd(!1)}return i._WriteStructEnd(!1),{payloadBlob:s._GetBuffer(),remainingRequest:l}},n._addNewDataPackageSize=function(n,t,i,u){for(var e=r._Encoding._Varint_GetBytes(r.Number._ToUInt32(n)),f=0;f<i;++f)if(f<e.length)t._GetBuffer()[u+f]=e[f];else{t._GetBuffer().slice(u+f,i-f);break}},n.writeEvent=function(n,t){var o,i,e;t._WriteFieldBegin(r._BondDataType._BT_STRING,1,null);t._WriteString(n.id);t._WriteFieldBegin(r._BondDataType._BT_INT64,3,null);t._WriteInt64(f.numberToBondInt64(n.timestamp));t._WriteFieldBegin(r._BondDataType._BT_STRING,5,null);t._WriteString(n.type);t._WriteFieldBegin(r._BondDataType._BT_STRING,6,null);t._WriteString(n.name);var s={},p=0,h={},w=0,c={},b=0,l={},k=0,a={},d=0,v={},g=0,y={},nt=0;for(i in n.properties)if(n.properties.hasOwnProperty(i))if(e=n.properties[i],e.cc>0)y[i]=e,nt++;else if(e.pii>0)v[i]=e,g++;else switch(e.type){case u.AWTPropertyType.String:s[i]=e.value;p++;break;case u.AWTPropertyType.Int64:h[i]=e.value;w++;break;case u.AWTPropertyType.Double:c[i]=e.value;b++;break;case u.AWTPropertyType.Boolean:l[i]=e.value;k++;break;case u.AWTPropertyType.Date:a[i]=e.value;d++}if(p){t._WriteFieldBegin(r._BondDataType._BT_MAP,13,null);t._WriteMapContainerBegin(p,r._BondDataType._BT_STRING,r._BondDataType._BT_STRING);for(i in s)s.hasOwnProperty(i)&&(o=s[i],t._WriteString(i),t._WriteString(o.toString()))}if(g){t._WriteFieldBegin(r._BondDataType._BT_MAP,30,null);t._WriteMapContainerBegin(g,r._BondDataType._BT_STRING,r._BondDataType._BT_STRUCT);for(i in v)v.hasOwnProperty(i)&&(e=v[i],t._WriteString(i),t._WriteFieldBegin(r._BondDataType._BT_INT32,1,null),t._WriteInt32(1),t._WriteFieldBegin(r._BondDataType._BT_INT32,2,null),t._WriteInt32(e.pii),t._WriteFieldBegin(r._BondDataType._BT_STRING,3,null),t._WriteString(e.value.toString()),t._WriteStructEnd(!1))}if(k){t._WriteFieldBegin(r._BondDataType._BT_MAP,31,null);t._WriteMapContainerBegin(k,r._BondDataType._BT_STRING,r._BondDataType._BT_BOOL);for(i in l)l.hasOwnProperty(i)&&(o=l[i],t._WriteString(i),t._WriteBool(o))}if(d){t._WriteFieldBegin(r._BondDataType._BT_MAP,32,null);t._WriteMapContainerBegin(d,r._BondDataType._BT_STRING,r._BondDataType._BT_INT64);for(i in a)a.hasOwnProperty(i)&&(o=a[i],t._WriteString(i),t._WriteInt64(f.numberToBondInt64(o)))}if(w){t._WriteFieldBegin(r._BondDataType._BT_MAP,33,null);t._WriteMapContainerBegin(w,r._BondDataType._BT_STRING,r._BondDataType._BT_INT64);for(i in h)h.hasOwnProperty(i)&&(o=h[i],t._WriteString(i),t._WriteInt64(f.numberToBondInt64(o)))}if(b){t._WriteFieldBegin(r._BondDataType._BT_MAP,34,null);t._WriteMapContainerBegin(b,r._BondDataType._BT_STRING,r._BondDataType._BT_DOUBLE);for(i in c)c.hasOwnProperty(i)&&(o=c[i],t._WriteString(i),t._WriteDouble(o))}if(nt){t._WriteFieldBegin(r._BondDataType._BT_MAP,36,null);t._WriteMapContainerBegin(nt,r._BondDataType._BT_STRING,r._BondDataType._BT_STRUCT);for(i in y)y.hasOwnProperty(i)&&(e=y[i],t._WriteString(i),t._WriteFieldBegin(r._BondDataType._BT_INT32,1,null),t._WriteInt32(e.cc),t._WriteFieldBegin(r._BondDataType._BT_STRING,2,null),t._WriteString(e.value.toString()),t._WriteStructEnd(!1))}t._WriteStructEnd(!1)},n.base64Encode=function(n){return r._Encoding._Base64_GetString(n)},n}();t.default=s},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(1),e=i(2),r=i(0),f=6e4,o=function(){function n(){}return n.initialize=function(n){var t=this;this._sendStats=n;this._isInitalized=!0;e.default.addNotificationListener({eventsSent:function(n){t._addStat("records_sent_count",n.length,n[0].apiKey)},eventsDropped:function(n,i){switch(i){case r.AWTEventsDroppedReason.NonRetryableStatus:t._addStat("d_send_fail",n.length,n[0].apiKey);t._addStat("records_dropped_count",n.length,n[0].apiKey);break;case r.AWTEventsDroppedReason.QueueFull:t._addStat("d_queue_full",n.length,n[0].apiKey)}},eventsRejected:function(n,i){switch(i){case r.AWTEventsRejectedReason.InvalidEvent:t._addStat("r_inv",n.length,n[0].apiKey);break;case r.AWTEventsRejectedReason.KillSwitch:t._addStat("r_kl",n.length,n[0].apiKey);break;case r.AWTEventsRejectedReason.SizeLimitExceeded:t._addStat("r_size",n.length,n[0].apiKey)}t._addStat("r_count",n.length,n[0].apiKey)},eventsRetrying:null});setTimeout(function(){return t.flush()},f)},n.teardown=function(){this._isInitalized&&(this.flush(),this._isInitalized=!1)},n.eventReceived=function(t){n._addStat("records_received_count",1,t)},n.flush=function(){var t=this,n;if(this._isInitalized){for(n in this._stats)this._stats.hasOwnProperty(n)&&this._sendStats(this._stats[n],n);this._stats={};setTimeout(function(){return t.flush()},f)}},n._addStat=function(n,t,i){if(this._isInitalized&&i!==u.StatsApiKey){var r=u.getTenantId(i);this._stats[r]||(this._stats[r]={});this._stats[r][n]=this._stats[r][n]?this._stats[r][n]+t:t}},n._isInitalized=!1,n._stats={},n}();t.default=o},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(0),e=i(6),r=i(12),h=i(13),u=i(3),o=i(2),s=i(7),c=function(){function n(){}return n.initialize=function(n,t){if(t===void 0&&(t={}),!this._isInitialized)return this._isInitialized=!0,r.default.defaultTenantToken=n,this._overrideValuesFromConfig(t),this._config.disableCookiesUsage&&!this._config.propertyStorageOverride&&(r.default.sessionEnabled=!1),s.default.addPropertyStorageOverride(this._config.propertyStorageOverride),s.default.autoCollect(r.default.semanticContext,this._config.disableCookiesUsage,this._config.userAgent),u.default.initialize(this._config),r.default.loggingEnabled=!0,this._config.enableAutoUserSession&&(this.getLogger().logSession(e.AWTSessionState.Started),window.addEventListener("beforeunload",this.flushAndTeardown)),this.getLogger()},n.getSemanticContext=function(){return r.default.semanticContext},n.flush=function(n){this._isInitialized&&!this._isDestroyed&&u.default.flush(n)},n.flushAndTeardown=function(){this._isInitialized&&!this._isDestroyed&&(this._config.enableAutoUserSession&&this.getLogger().logSession(e.AWTSessionState.Ended),u.default.flushAndTeardown(),r.default.loggingEnabled=!1,this._isDestroyed=!0)},n.pauseTransmission=function(){this._isInitialized&&!this._isDestroyed&&u.default.pauseTransmission()},n.resumeTransmision=function(){this._isInitialized&&!this._isDestroyed&&u.default.resumeTransmision()},n.setTransmitProfile=function(n){this._isInitialized&&!this._isDestroyed&&u.default.setTransmitProfile(n)},n.loadTransmitProfiles=function(n){this._isInitialized&&!this._isDestroyed&&u.default.loadTransmitProfiles(n)},n.setContext=function(n,t,i){i===void 0&&(i=f.AWTPropertyType.Unspecified);r.default.logManagerContext.setProperty(n,t,i)},n.setContextWithPii=function(n,t,i,u){u===void 0&&(u=f.AWTPropertyType.Unspecified);r.default.logManagerContext.setPropertyWithPii(n,t,i,u)},n.setContextWithCustomerContent=function(n,t,i,u){u===void 0&&(u=f.AWTPropertyType.Unspecified);r.default.logManagerContext.setPropertyWithCustomerContent(n,t,i,u)},n.getLogger=function(n){var t=n;return t&&t!==r.default.defaultTenantToken||(t=""),this._loggers[t]||(this._loggers[t]=new h.default(t)),this._loggers[t]},n.addNotificationListener=function(n){o.default.addNotificationListener(n)},n.removeNotificationListener=function(n){o.default.removeNotificationListener(n)},n._overrideValuesFromConfig=function(n){n.collectorUri&&(this._config.collectorUri=n.collectorUri);n.cacheMemorySizeLimitInNumberOfEvents>0&&(this._config.cacheMemorySizeLimitInNumberOfEvents=n.cacheMemorySizeLimitInNumberOfEvents);n.httpXHROverride&&n.httpXHROverride.sendPOST&&(this._config.httpXHROverride=n.httpXHROverride);n.propertyStorageOverride&&n.propertyStorageOverride.getProperty&&n.propertyStorageOverride.setProperty&&(this._config.propertyStorageOverride=n.propertyStorageOverride);n.userAgent&&(this._config.userAgent=n.userAgent);n.disableCookiesUsage&&(this._config.disableCookiesUsage=n.disableCookiesUsage);n.canSendStatEvent&&(this._config.canSendStatEvent=n.canSendStatEvent);n.enableAutoUserSession&&typeof window!="undefined"&&window.addEventListener&&(this._config.enableAutoUserSession=n.enableAutoUserSession);n.clockSkewRefreshDurationInMins>0&&(this._config.clockSkewRefreshDurationInMins=n.clockSkewRefreshDurationInMins)},n._loggers={},n._isInitialized=!1,n._isDestroyed=!1,n._config={collectorUri:"https://browser.pipe.aria.microsoft.com/Collector/3.0/",cacheMemorySizeLimitInNumberOfEvents:1e4,disableCookiesUsage:!1,canSendStatEvent:function(){return!0},clockSkewRefreshDurationInMins:0},n}();t.default=c},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(5),u=i(8),f=function(){function n(){}return n.logManagerContext=new r.default,n.sessionEnabled=!0,n.loggingEnabled=!1,n.defaultTenantToken="",n.semanticContext=new u.default(!0,n.logManagerContext),n}();t.default=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(0),o=i(6),e=i(5),r=i(1),h=i(10),s=i(2),c=i(3),f=i(12),l=i(15),a=i(8),v=i(7),y=function(){function n(n){this._apiKey=n;this._contextProperties=new e.default;this._semanticContext=new a.default(!1,this._contextProperties);this._sessionStartTime=0;this._createInitId()}return n.prototype.setContext=function(n,t,i){i===void 0&&(i=u.AWTPropertyType.Unspecified);this._contextProperties.setProperty(n,t,i)},n.prototype.setContextWithPii=function(n,t,i,r){r===void 0&&(r=u.AWTPropertyType.Unspecified);this._contextProperties.setPropertyWithPii(n,t,i,r)},n.prototype.setContextWithCustomerContent=function(n,t,i,r){r===void 0&&(r=u.AWTPropertyType.Unspecified);this._contextProperties.setPropertyWithCustomerContent(n,t,i,r)},n.prototype.getSemanticContext=function(){return this._semanticContext},n.prototype.logEvent=function(t){if(f.default.loggingEnabled){this._apiKey||(this._apiKey=f.default.defaultTenantToken,this._createInitId());var i=!0;r.isString(t)?t={name:t}:t instanceof e.default&&(t=t.getEvent(),i=!1);h.default.eventReceived(this._apiKey);n._logEvent(n._getInternalEvent(t,this._apiKey,i),this._contextProperties)}},n.prototype.logSession=function(t,i){var e,s;if(f.default.sessionEnabled){if(e={name:"session",type:"session",properties:{}},n._addPropertiesToEvent(e,i),e.priority=u.AWTEventPriority.High,t===o.AWTSessionState.Started){if(this._sessionStartTime>0)return;this._sessionStartTime=(new Date).getTime();this._sessionId=r.newGuid();this.setContext("Session.Id",this._sessionId);e.properties["Session.State"]="Started"}else if(t===o.AWTSessionState.Ended){if(this._sessionStartTime===0)return;s=Math.floor(((new Date).getTime()-this._sessionStartTime)/1e3);e.properties["Session.Id"]=this._sessionId;e.properties["Session.State"]="Ended";e.properties["Session.Duration"]=s.toString();e.properties["Session.DurationBucket"]=n._getSessionDurationFromTime(s);this._sessionStartTime=0;this.setContext("Session.Id",null);this._sessionId=undefined}else return;e.properties["Session.FirstLaunchTime"]=v.default.firstLaunchTime;this.logEvent(e)}},n.prototype.getSessionId=function(){return this._sessionId},n.prototype.logFailure=function(t,i,r,f,e){if(t&&i){var o={name:"failure",type:"failure",properties:{}};n._addPropertiesToEvent(o,e);o.properties["Failure.Signature"]=t;o.properties["Failure.Detail"]=i;r&&(o.properties["Failure.Category"]=r);f&&(o.properties["Failure.Id"]=f);o.priority=u.AWTEventPriority.High;this.logEvent(o)}},n.prototype.logPageView=function(t,i,r,u,f,e){if(t&&i){var o={name:"pageview",type:"pageview",properties:{}};n._addPropertiesToEvent(o,e);o.properties["PageView.Id"]=t;o.properties["PageView.Name"]=i;r&&(o.properties["PageView.Category"]=r);u&&(o.properties["PageView.Uri"]=u);f&&(o.properties["PageView.ReferrerUri"]=f);this.logEvent(o)}},n.prototype._createInitId=function(){!n._initIdMap[this._apiKey]&&this._apiKey&&(n._initIdMap[this._apiKey]=r.newGuid())},n._addPropertiesToEvent=function(n,t){if(t){t instanceof e.default&&(t=t.getEvent());t.name&&(n.name=t.name);t.priority&&(n.priority=t.priority);for(var i in t.properties)t.properties.hasOwnProperty(i)&&(n.properties[i]=t.properties[i])}},n._getSessionDurationFromTime=function(n){return n<0?"Undefined":n<=3?"UpTo3Sec":n<=10?"UpTo10Sec":n<=30?"UpTo30Sec":n<=60?"UpTo60Sec":n<=180?"UpTo3Min":n<=600?"UpTo10Min":n<=1800?"UpTo30Min":"Above30Min"},n._logEvent=function(n,t){if(!n.name||!r.isString(n.name)){s.default.eventsRejected([n],u.AWTEventsRejectedReason.InvalidEvent);return}if(n.name=n.name.toLowerCase(),n.name=n.name.replace(r.EventNameDotRegex,"_"),n.type=n.type&&r.isString(n.type)?n.type.toLowerCase():"custom",!r.EventNameAndTypeRegex.test(n.name)||!r.EventNameAndTypeRegex.test(n.type)){s.default.eventsRejected([n],u.AWTEventsRejectedReason.InvalidEvent);return}(!r.isNumber(n.timestamp)||n.timestamp<0)&&(n.timestamp=(new Date).getTime());n.properties||(n.properties={});this._addContextIfAbsent(n,t.getPropertyMap());this._addContextIfAbsent(n,f.default.logManagerContext.getPropertyMap());this._setDefaultProperty(n,"EventInfo.InitId",this._getInitId(n.apiKey));this._setDefaultProperty(n,"EventInfo.Sequence",this._getSequenceId(n.apiKey));this._setDefaultProperty(n,"EventInfo.SdkVersion",l.FullVersionString);this._setDefaultProperty(n,"EventInfo.Name",n.name);this._setDefaultProperty(n,"EventInfo.Time",new Date(n.timestamp).toISOString());r.isPriority(n.priority)||(n.priority=u.AWTEventPriority.Normal);this._sendEvent(n)},n._addContextIfAbsent=function(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n.properties[i]||(n.properties[i]=t[i]))},n._setDefaultProperty=function(n,t,i){n.properties[t]={value:i,pii:u.AWTPiiKind.NotSet,type:u.AWTPropertyType.String}},n._sendEvent=function(n){c.default.sendEvent(n)},n._getInternalEvent=function(n,t,i){var u,f;if(n.properties=n.properties||{},i)for(u in n.properties)n.properties.hasOwnProperty(u)&&(n.properties[u]=r.sanitizeProperty(u,n.properties[u]),n.properties[u]===null&&delete n.properties[u]);return f=n,f.id=r.newGuid(),f.apiKey=t,f},n._getInitId=function(t){return n._initIdMap[t]},n._getSequenceId=function(t){return n._sequenceIdMap[t]===undefined&&(n._sequenceIdMap[t]=0),(++n._sequenceIdMap[t]).toString()},n._sequenceIdMap={},n._initIdMap={},n}();t.default=y},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.AWT_REAL_TIME="REAL_TIME";t.AWT_NEAR_REAL_TIME="NEAR_REAL_TIME";t.AWT_BEST_EFFORT="BEST_EFFORT"},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Version="1.8.3";t.FullVersionString="AWT-Web-JS-"+t.Version},function(n,t,i){"use strict";var r,f,u,e,o,s,h,c,l;Object.defineProperty(t,"__esModule",{value:!0});r=i(0);t.AWTPropertyType=r.AWTPropertyType;t.AWTPiiKind=r.AWTPiiKind;t.AWTEventPriority=r.AWTEventPriority;t.AWTEventsDroppedReason=r.AWTEventsDroppedReason;t.AWTEventsRejectedReason=r.AWTEventsRejectedReason;t.AWTCustomerContentKind=r.AWTCustomerContentKind;f=i(6);t.AWTUserIdType=f.AWTUserIdType;t.AWTSessionState=f.AWTSessionState;u=i(14);t.AWT_BEST_EFFORT=u.AWT_BEST_EFFORT;t.AWT_NEAR_REAL_TIME=u.AWT_NEAR_REAL_TIME;t.AWT_REAL_TIME=u.AWT_REAL_TIME;e=i(5);t.AWTEventProperties=e.default;o=i(13);t.AWTLogger=o.default;s=i(11);t.AWTLogManager=s.default;h=i(29);t.AWTTransmissionManager=h.default;c=i(9);t.AWTSerializer=c.default;l=i(8);t.AWTSemanticContext=l.default;t.AWT_COLLECTOR_URL_UNITED_STATES="https://us.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_GERMANY="https://de.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_JAPAN="https://jp.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_AUSTRALIA="https://au.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_EUROPE="https://eu.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_USGOV_DOD="https://pf.pipe.aria.microsoft.com/Collector/3.0";t.AWT_COLLECTOR_URL_USGOV_DOJ="https://tb.pipe.aria.microsoft.com/Collector/3.0"},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;(function(n){n[n._BT_STOP=0]="_BT_STOP";n[n._BT_STOP_BASE=1]="_BT_STOP_BASE";n[n._BT_BOOL=2]="_BT_BOOL";n[n._BT_DOUBLE=8]="_BT_DOUBLE";n[n._BT_STRING=9]="_BT_STRING";n[n._BT_STRUCT=10]="_BT_STRUCT";n[n._BT_LIST=11]="_BT_LIST";n[n._BT_MAP=13]="_BT_MAP";n[n._BT_INT32=16]="_BT_INT32";n[n._BT_INT64=17]="_BT_INT64"})(i=t._BondDataType||(t._BondDataType={}))},function(n,t,i){"use strict";function e(n){for(var i=[],t,r=0;r<n.length;++r)t=n.charCodeAt(r),t<128?i.push(t):t<2048?i.push(192|t>>6,128|t&63):t<55296||t>=57344?i.push(224|t>>12,128|t>>6&63,128|t&63):(t=65536+((t&1023)<<10|n.charCodeAt(++r)&1023),i.push(240|t>>18,128|t>>12&63,128|t>>6&63,128|t&63));return i}function o(n){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],e=n.length%3,s=function(n){return[t.charAt(n>>18&63),t.charAt(n>>12&63),t.charAt(n>>6&63),t.charAt(n&63)].join("")},u,f,r=0,o=n.length-e;r<o;r+=3)u=(n[r]<<16)+(n[r+1]<<8)+n[r+2],i.push(s(u));switch(e){case 1:u=n[n.length-1];i.push(t.charAt(u>>2));i.push(t.charAt(u<<4&63));i.push("==");break;case 2:f=(n[n.length-2]<<8)+n[n.length-1];i.push(t.charAt(f>>10));i.push(t.charAt(f>>4&63));i.push(t.charAt(f<<2&63));i.push("=")}return i.join("")}function s(n){for(var t=[];n&4294967168;)t.push(n&127|128),n>>>=7;return t.push(n&127),t}function h(n){for(var t=n.low,i=n.high,r=[];i||4294967168&t;)r.push(t&127|128),t=(i&127)<<25|t>>>7,i>>>=7;return r.push(t&127),r}function c(n){var i,r,t;if(f.BrowserChecker._IsDataViewSupport()){for(i=new DataView(new ArrayBuffer(8)),i.setFloat64(0,n,!0),r=[],t=0;t<8;++t)r.push(i.getUint8(t));return r}return u.FloatUtils._ConvertNumberToArray(n,!0)}function l(n){return n=r.Number._ToInt32(n),n<<1^n>>31}function a(n){var f=n.low,e=n.high,i=e<<1|f>>>31,u=f<<1,t;return e&2147483648&&(i=~i,u=~u),t=new r.UInt64("0"),t.low=u,t.high=i,t}Object.defineProperty(t,"__esModule",{value:!0});var r=i(4),u=i(19),f=i(22);t._Utf8_GetBytes=e;t._Base64_GetString=o;t._Varint_GetBytes=s;t._Varint64_GetBytes=h;t._Double_GetBytes=c;t._Zigzag_EncodeZigzag32=l;t._Zigzag_EncodeZigzag64=a},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n._ConvertNumberToArray=function(n,t){var u,c,y,f,s,e,d;if(!n)return t?this._doubleZero:this._floatZero;var w=t?11:8,p=t?52:23,o=(1<<w-1)-1,b=1-o,k=o,v=n<0?1:0;n=Math.abs(n);for(var h=Math.floor(n),l=n-h,a=2*(o+2)+p,r=new Array(a),i=0;i<a;)r[i++]=0;for(i=o+2;i&&h;)r[--i]=h%2,h=Math.floor(h/2);for(i=o+1;i<a-1&&l>0;)l*=2,l>=1?(r[++i]=1,--l):r[++i]=0;for(u=0;u<a&&!r[u];)u++;if(c=o+1-u,y=u+p,r[y+1]){for(i=y;i>u;--i)if(r[i]=1-r[i],r)break;i===u&&++c}if(c>k||h)return v?t?this._doubleNegInifinity:this._floatNegInifinity:t?this._doubleInifinity:this._floatInifinity;if(c<b)return t?this._doubleZero:this._floatZero;if(t){for(f=0,i=0;i<20;++i)f=f<<1|r[++u];for(s=0;i<52;++i)s=s<<1|r[++u];return f|=c+o<<20,f=v<<31|f&2147483647,[s&255,s>>8&255,s>>16&255,s>>>24,f&255,f>>8&255,f>>16&255,f>>>24]}for(e=0,i=0;i<23;++i)e=e<<1|r[++u];return e|=c+o<<23,e=v<<31|e&2147483647,[e&255,e>>8&255,e>>16&255,e>>>24]},n._floatZero=[0,0,0,0],n._doubleZero=[0,0,0,0,0,0,0,0],n._floatInifinity=[0,0,128,127],n._floatNegInifinity=[0,0,128,255],n._doubleInifinity=[0,0,0,0,0,0,240,127],n._doubleNegInifinity=[0,0,0,0,0,0,240,255],n}();t.FloatUtils=i},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(4),u=function(){function n(){this._buffer=[]}return n.prototype._WriteByte=function(n){this._buffer.push(r.Number._ToByte(n))},n.prototype._Write=function(n,t,i){while(i--)this._WriteByte(n[t++])},n.prototype._GetBuffer=function(){return this._buffer},n}();t.MemoryStream=u},function(n,t,i){"use strict";var f,r,e,u,o;Object.defineProperty(t,"__esModule",{value:!0});f=i(17);t._BondDataType=f._BondDataType;r=i(18);t._Encoding=r;e=i(20);t.IO=e;u=i(4);t.Int64=u.Int64;t.UInt64=u.UInt64;t.Number=u.Number;o=function(){function n(n){this._stream=n}return n.prototype._WriteBlob=function(n){this._stream._Write(n,0,n.length)},n.prototype._WriteBool=function(n){this._stream._WriteByte(n?1:0)},n.prototype._WriteContainerBegin=function(n,t){this._WriteUInt8(t);this._WriteUInt32(n)},n.prototype._WriteMapContainerBegin=function(n,t,i){this._WriteUInt8(t);this._WriteUInt8(i);this._WriteUInt32(n)},n.prototype._WriteDouble=function(n){var t=r._Double_GetBytes(n);this._stream._Write(t,0,t.length)},n.prototype._WriteFieldBegin=function(n,t){t<=5?this._stream._WriteByte(n|t<<5):t<=255?(this._stream._WriteByte(n|192),this._stream._WriteByte(t)):(this._stream._WriteByte(n|224),this._stream._WriteByte(t),this._stream._WriteByte(t>>8))},n.prototype._WriteInt32=function(n){n=r._Zigzag_EncodeZigzag32(n);this._WriteUInt32(n)},n.prototype._WriteInt64=function(n){this._WriteUInt64(r._Zigzag_EncodeZigzag64(n))},n.prototype._WriteString=function(n){if(n==="")this._WriteUInt32(0);else{var t=r._Utf8_GetBytes(n);this._WriteUInt32(t.length);this._stream._Write(t,0,t.length)}},n.prototype._WriteStructEnd=function(n){this._WriteUInt8(n?f._BondDataType._BT_STOP_BASE:f._BondDataType._BT_STOP)},n.prototype._WriteUInt32=function(n){var t=r._Varint_GetBytes(u.Number._ToUInt32(n));this._stream._Write(t,0,t.length)},n.prototype._WriteUInt64=function(n){var t=r._Varint64_GetBytes(n);this._stream._Write(t,0,t.length)},n.prototype._WriteUInt8=function(n){this._stream._WriteByte(u.Number._ToUInt8(n))},n}();t.CompactBinaryProtocolWriter=o},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n._IsDataViewSupport=function(){return typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},n}();t.BrowserChecker=i},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(n){this.clockSkewRefreshDurationInMins=n;this._reset()}return n.prototype.allowRequestSending=function(){return this._isFirstRequest&&!this._clockSkewSet?(this._isFirstRequest=!1,this._allowRequestSending=!1,!0):this._allowRequestSending},n.prototype.shouldAddClockSkewHeaders=function(){return this._shouldAddClockSkewHeaders},n.prototype.getClockSkewHeaderValue=function(){return this._clockSkewHeaderValue},n.prototype.setClockSkew=function(n){this._clockSkewSet||(n?this._clockSkewHeaderValue=n:this._shouldAddClockSkewHeaders=!1,this._clockSkewSet=!0,this._allowRequestSending=!0)},n.prototype._reset=function(){var n=this;this._isFirstRequest=!0;this._clockSkewSet=!1;this._allowRequestSending=!0;this._shouldAddClockSkewHeaders=!0;this._clockSkewHeaderValue="use-collector-delta";this.clockSkewRefreshDurationInMins>0&&setTimeout(function(){return n._reset()},this.clockSkewRefreshDurationInMins*6e4)},n}();t.default=i},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=1e3,r=function(){function n(){this._killedTokenDictionary={}}return n.prototype.setKillSwitchTenants=function(n,t){var r,f,u;if(n&&t)try{if(r=n.split(","),t==="this-request-only")return r;for(f=parseInt(t,10)*i,u=0;u<r.length;++u)this._killedTokenDictionary[r[u]]=Date.now()+f}catch(e){return[]}return[]},n.prototype.isTenantKilled=function(n){return this._killedTokenDictionary[n]!==undefined&&this._killedTokenDictionary[n]>Date.now()?!0:(delete this._killedTokenDictionary[n],!1)},n}();t.default=r},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(n,t){this._outboundQueue=n;this._maxNumberOfEvents=t;this._currentBatch={};this._currentNumEventsInBatch=0}return n.prototype.addEventToBatch=function(n){if(n.priority===r.AWTEventPriority.Immediate_sync){var t={};return t[n.apiKey]=[n],t}return this._currentNumEventsInBatch>=this._maxNumberOfEvents&&this.flushBatch(),this._currentBatch[n.apiKey]===undefined&&(this._currentBatch[n.apiKey]=[]),this._currentBatch[n.apiKey].push(n),this._currentNumEventsInBatch++,null},n.prototype.flushBatch=function(){this._currentNumEventsInBatch>0&&(this._outboundQueue.push(this._currentBatch),this._currentBatch={},this._currentNumEventsInBatch=0)},n.prototype.hasBatch=function(){return this._currentNumEventsInBatch>0},n}();t.default=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=.8,u=1.2,i=3e3,f=12e4,e=function(){function n(){}return n.shouldRetryForStatus=function(n){return!(n>=300&&n<500&&n!==408||n===501||n===505)},n.getMillisToBackoffForRetry=function(n){var t=0,e=i*r,o=i*u,s=Math.floor(Math.random()*(o-e))+e;return t=Math.pow(4,n)*s,Math.min(t,f)},n}();t.default=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(0),s=i(9),h=i(26),c=i(24),l=i(23),a=i(15),r=i(1),f=i(2),e=i(3),v=2,y=1,o="POST",p=function(){function n(n,t,i,u,f){var e=this;this._requestQueue=n;this._queueManager=i;this._httpInterface=u;this._urlString="?qsp=true&content-type=application%2Fbond-compact-binary&client-id=NO_AUTH&sdk-version="+a.FullVersionString;this._killSwitch=new c.default;this._paused=!1;this._useBeacons=!1;this._activeConnections=0;this._clockSkewManager=new l.default(f);r.isUint8ArrayAvailable()||(this._urlString+="&content-encoding=base64");this._urlString=t+this._urlString;this._httpInterface||(this._useBeacons=!r.isReactNative(),this._httpInterface={sendPOST:function(n,t,i,u,f,s){var c,h;try{r.useXDomainRequest()?(c=new XDomainRequest,c.open(o,n),c.onload=function(){f(200,null)},c.onerror=function(){u(400,null)},c.ontimeout=function(){i(500,null)},c.send(t)):r.isReactNative()?fetch(n,{body:t,method:o}).then(function(n){var t={};n.headers&&n.headers.forEach(function(n,i){t[i]=n});f(n.status,t)}).catch(function(){u(0,{})}):(h=new XMLHttpRequest,h.open(o,n,!s),h.onload=function(){f(h.status,e._convertAllHeadersToMap(h.getAllResponseHeaders()))},h.onerror=function(){u(h.status,e._convertAllHeadersToMap(h.getAllResponseHeaders()))},h.ontimeout=function(){i(h.status,e._convertAllHeadersToMap(h.getAllResponseHeaders()))},h.send(t))}catch(l){u(400,null)}}})}return n.prototype.hasIdleConnection=function(){return this._activeConnections<v},n.prototype.sendQueuedRequests=function(){while(this.hasIdleConnection()&&!this._paused&&this._requestQueue.length>0&&this._clockSkewManager.allowRequestSending())this._activeConnections++,this._sendRequest(this._requestQueue.shift(),0,!1);this.hasIdleConnection()&&e.default.scheduleTimer()},n.prototype.isCompletelyIdle=function(){return this._activeConnections===0},n.prototype.teardown=function(){while(this._requestQueue.length>0)this._sendRequest(this._requestQueue.shift(),0,!0)},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1;this.sendQueuedRequests()},n.prototype.removeQueuedRequests=function(){this._requestQueue.length=0},n.prototype.sendSynchronousRequest=function(n,t){this._paused&&(n[t][0].priority=u.AWTEventPriority.High);this._activeConnections++;this._sendRequest(n,0,!1,!0)},n.prototype._sendRequest=function(n,t,i,e){var p=this,c,h,a,v,y,o,l;e===void 0&&(e=!1);try{if(this._paused){this._activeConnections--;this._queueManager.addBackRequest(n);return}c=0;h="";for(o in n)n.hasOwnProperty(o)&&(this._killSwitch.isTenantKilled(o)?(f.default.eventsRejected(n[o],u.AWTEventsRejectedReason.KillSwitch),delete n[o]):(h.length>0&&(h+=","),h+=o,c++));if(c>0){a=s.default.getPayloadBlob(n,c);a.remainingRequest&&this._requestQueue.push(a.remainingRequest);v=this._urlString+"&x-apikey="+h+"&client-time-epoch-millis="+Date.now().toString();this._clockSkewManager.shouldAddClockSkewHeaders()&&(v=v+"&time-delta-to-apply-millis="+this._clockSkewManager.getClockSkewHeaderValue());y=void 0;y=r.isUint8ArrayAvailable()?new Uint8Array(a.payloadBlob):s.default.base64Encode(a.payloadBlob);for(o in n)if(n.hasOwnProperty(o))for(l=0;l<n[o].length;++l)n[o][l].sendAttempt>0?n[o][l].sendAttempt++:n[o][l].sendAttempt=1;if(this._useBeacons&&i&&r.isBeaconsSupported()&&navigator.sendBeacon(v,y))return;this._httpInterface.sendPOST(v,y,function(r,u){p._retryRequestIfNeeded(r,u,n,c,h,t,i,e)},function(r,u){p._retryRequestIfNeeded(r,u,n,c,h,t,i,e)},function(r,u){p._retryRequestIfNeeded(r,u,n,c,h,t,i,e)},i||e)}else i||this._handleRequestFinished(!1,{},i,e)}catch(w){this._handleRequestFinished(!1,{},i,e)}},n.prototype._retryRequestIfNeeded=function(n,t,i,r,o,s,c,l){var b=this,w=!0,v,a,p;if(typeof n!="undefined"){if(t)for(v=this._killSwitch.setKillSwitchTenants(t["kill-tokens"],t["kill-duration-seconds"]),this._clockSkewManager.setClockSkew(t["time-delta-millis"]),a=0;a<v.length;++a)f.default.eventsRejected(i[v[a]],u.AWTEventsRejectedReason.KillSwitch),delete i[v[a]],r--;else this._clockSkewManager.setClockSkew(null);if(n===200){this._handleRequestFinished(!0,i,c,l);return}(!h.default.shouldRetryForStatus(n)||r<=0)&&(w=!1)}if(w)if(l)this._activeConnections--,i[o][0].priority=u.AWTEventPriority.High,this._queueManager.addBackRequest(i);else if(s<y){for(p in i)i.hasOwnProperty(p)&&f.default.eventsRetrying(i[p]);setTimeout(function(){return b._sendRequest(i,s+1,!1)},h.default.getMillisToBackoffForRetry(s))}else this._activeConnections--,e.default.backOffTransmission(),this._queueManager.addBackRequest(i);else this._handleRequestFinished(!1,i,c,l)},n.prototype._handleRequestFinished=function(n,t,i,r){n&&e.default.clearBackOff();for(var o in t)t.hasOwnProperty(o)&&(n?f.default.eventsSent(t[o]):f.default.eventsDropped(t[o],u.AWTEventsDroppedReason.NonRetryableStatus));this._activeConnections--;r||i||this.sendQueuedRequests()},n.prototype._convertAllHeadersToMap=function(n){var u={},i,t,r;if(n)for(i=n.split("\n"),t=0;t<i.length;++t)r=i[t].split(": "),u[r[0]]=r[1];return u},n}();t.default=p},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),e=i(27),f=i(3),o=i(25),u=i(2),s=i(1),h=250,c=500,l=6,a=function(){function n(n,t,i,u){this._queueSizeLimit=t;this._isCurrentlyUploadingNow=!1;this._uploadNowQueue=[];this._shouldDropEventsOnPause=!1;this._paused=!1;this._queueSize=0;this._outboundQueue=[];this._inboundQueues={};this._inboundQueues[r.AWTEventPriority.High]=[];this._inboundQueues[r.AWTEventPriority.Normal]=[];this._inboundQueues[r.AWTEventPriority.Low]=[];this._addEmptyQueues();this._batcher=new o.default(this._outboundQueue,c);this._httpManager=new e.default(this._outboundQueue,n,this,i,u)}return n.prototype.addEvent=function(n){s.isPriority(n.priority)||(n.priority=r.AWTEventPriority.Normal);n.priority===r.AWTEventPriority.Immediate_sync?this._httpManager.sendSynchronousRequest(this._batcher.addEventToBatch(n),n.apiKey):this._queueSize<this._queueSizeLimit?this._addEventToProperQueue(n):this._dropEventWithPriorityOrLess(n.priority)?this._addEventToProperQueue(n):u.default.eventsDropped([n],r.AWTEventsDroppedReason.QueueFull)},n.prototype.sendEventsForPriorityAndAbove=function(n){this._batchEvents(n);this._httpManager.sendQueuedRequests()},n.prototype.hasEvents=function(){return(this._inboundQueues[r.AWTEventPriority.High][0].length>0||this._inboundQueues[r.AWTEventPriority.Normal][0].length>0||this._inboundQueues[r.AWTEventPriority.Low][0].length>0||this._batcher.hasBatch())&&this._httpManager.hasIdleConnection()},n.prototype.addBackRequest=function(n){var t,i;if(!this._paused||!this._shouldDropEventsOnPause){for(t in n)if(n.hasOwnProperty(t))for(i=0;i<n[t].length;++i)n[t][i].sendAttempt<l?this.addEvent(n[t][i]):u.default.eventsDropped([n[t][i]],r.AWTEventsDroppedReason.NonRetryableStatus);f.default.scheduleTimer()}},n.prototype.teardown=function(){this._paused||(this._batchEvents(r.AWTEventPriority.Low),this._httpManager.teardown())},n.prototype.uploadNow=function(n){var t=this;this._addEmptyQueues();this._isCurrentlyUploadingNow?this._uploadNowQueue.push(n):(this._isCurrentlyUploadingNow=!0,setTimeout(function(){return t._uploadNow(n)},0))},n.prototype.pauseTransmission=function(){this._paused=!0;this._httpManager.pause();this.shouldDropEventsOnPause&&(this._queueSize-=this._inboundQueues[r.AWTEventPriority.High][0].length+this._inboundQueues[r.AWTEventPriority.Normal][0].length+this._inboundQueues[r.AWTEventPriority.Low][0].length,this._inboundQueues[r.AWTEventPriority.High][0]=[],this._inboundQueues[r.AWTEventPriority.Normal][0]=[],this._inboundQueues[r.AWTEventPriority.Low][0]=[],this._httpManager.removeQueuedRequests())},n.prototype.resumeTransmission=function(){this._paused=!1;this._httpManager.resume()},n.prototype.shouldDropEventsOnPause=function(n){this._shouldDropEventsOnPause=n},n.prototype._removeFirstQueues=function(){this._inboundQueues[r.AWTEventPriority.High].shift();this._inboundQueues[r.AWTEventPriority.Normal].shift();this._inboundQueues[r.AWTEventPriority.Low].shift()},n.prototype._addEmptyQueues=function(){this._inboundQueues[r.AWTEventPriority.High].push([]);this._inboundQueues[r.AWTEventPriority.Normal].push([]);this._inboundQueues[r.AWTEventPriority.Low].push([])},n.prototype._addEventToProperQueue=function(n){this._paused&&this._shouldDropEventsOnPause||(this._queueSize++,this._inboundQueues[n.priority][this._inboundQueues[n.priority].length-1].push(n))},n.prototype._dropEventWithPriorityOrLess=function(n){for(var t=r.AWTEventPriority.Low;t<=n;){if(this._inboundQueues[t][this._inboundQueues[t].length-1].length>0)return u.default.eventsDropped([this._inboundQueues[t][this._inboundQueues[t].length-1].shift()],r.AWTEventsDroppedReason.QueueFull),!0;t++}return!1},n.prototype._batchEvents=function(n){for(var t=r.AWTEventPriority.High,i;t>=n;){while(this._inboundQueues[t][0].length>0)i=this._inboundQueues[t][0].pop(),this._queueSize--,this._batcher.addEventToBatch(i);t--}this._batcher.flushBatch()},n.prototype._uploadNow=function(n){var t=this;this.hasEvents()&&this.sendEventsForPriorityAndAbove(r.AWTEventPriority.Low);this._checkOutboundQueueEmptyAndSent(function(){t._removeFirstQueues();n!==null&&n!==undefined&&n();t._uploadNowQueue.length>0?setTimeout(function(){return t._uploadNow(t._uploadNowQueue.shift())},0):(t._isCurrentlyUploadingNow=!1,t.hasEvents()&&f.default.scheduleTimer())})},n.prototype._checkOutboundQueueEmptyAndSent=function(n){var t=this;this._httpManager.isCompletelyIdle()?n():setTimeout(function(){return t._checkOutboundQueueEmptyAndSent(n)},h)},n}();t.default=a},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(3),u=function(){function n(){}return n.setEventsHandler=function(n){r.default.setEventsHandler(n)},n.getEventsHandler=function(){return r.default.getEventsHandler()},n.scheduleTimer=function(){r.default.scheduleTimer()},n}();t.default=u},function(n,t,i){n.exports=i(16)}])})