1
|
|
|
!function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,o){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}({0:function(e,t,i){e.exports=i("QRqT")},DuR2:function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},QRqT:function(e,t,i){(function(e){e.mixpanel=i("j9k2")}).call(t,i("DuR2"))},j9k2:function(e,t,i){"use strict";var o,n={DEBUG:!1,LIB_VERSION:"2.13.0"};o="undefined"==typeof window?{navigator:{}}:window;var r=Array.prototype,s=Function.prototype,a=Object.prototype,c=r.slice,p=a.toString,l=a.hasOwnProperty,d=o.console,_=o.navigator,u=o.document,h=_.userAgent,f=s.bind,g=r.forEach,m=r.indexOf,v=Array.isArray,y={},b={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},w={log:function(){if(n.DEBUG&&!b.isUndefined(d)&&d)try{d.log.apply(d,arguments)}catch(e){b.each(arguments,function(e){d.log(e)})}},error:function(){if(n.DEBUG&&!b.isUndefined(d)&&d){var e=["Mixpanel error:"].concat(b.toArray(arguments));try{d.error.apply(d,e)}catch(t){b.each(e,function(e){d.error(e)})}}},critical:function(){if(!b.isUndefined(d)&&d){var e=["Mixpanel error:"].concat(b.toArray(arguments));try{d.error.apply(d,e)}catch(t){b.each(e,function(e){d.error(e)})}}}};b.bind=function(e,t){var i,o;if(f&&e.bind===f)return f.apply(e,c.call(arguments,1));if(!b.isFunction(e))throw new TypeError;return i=c.call(arguments,2),o=function(){if(!(this instanceof o))return e.apply(t,i.concat(c.call(arguments)));var n={};n.prototype=e.prototype;var r=new n;n.prototype=null;var s=e.apply(r,i.concat(c.call(arguments)));return Object(s)===s?s:r}},b.bind_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=b.bind(e[t],e))},b.each=function(e,t,i){if(null!==e&&void 0!==e)if(g&&e.forEach===g)e.forEach(t,i);else if(e.length===+e.length){for(var o=0,n=e.length;o<n;o++)if(o in e&&t.call(i,e[o],o,e)===y)return}else for(var r in e)if(l.call(e,r)&&t.call(i,e[r],r,e)===y)return},b.escapeHTML=function(e){var t=e;return t&&b.isString(t)&&(t=t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")),t},b.extend=function(e){return b.each(c.call(arguments,1),function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},b.isArray=v||function(e){return"[object Array]"===p.call(e)},b.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},b.isArguments=function(e){return!(!e||!l.call(e,"callee"))},b.toArray=function(e){return e?e.toArray?e.toArray():b.isArray(e)?c.call(e):b.isArguments(e)?c.call(e):b.values(e):[]},b.values=function(e){var t=[];return null===e?t:(b.each(e,function(e){t[t.length]=e}),t)},b.identity=function(e){return e},b.include=function(e,t){var i=!1;return null===e?i:m&&e.indexOf===m?-1!=e.indexOf(t):(b.each(e,function(e){if(i||(i=e===t))return y}),i)},b.includes=function(e,t){return-1!==e.indexOf(t)},b.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},b.isObject=function(e){return e===Object(e)&&!b.isArray(e)},b.isEmptyObject=function(e){if(b.isObject(e)){for(var t in e)if(l.call(e,t))return!1;return!0}return!1},b.isUndefined=function(e){return void 0===e},b.isString=function(e){return"[object String]"==p.call(e)},b.isDate=function(e){return"[object Date]"==p.call(e)},b.isNumber=function(e){return"[object Number]"==p.call(e)},b.isElement=function(e){return!(!e||1!==e.nodeType)},b.encodeDates=function(e){return b.each(e,function(t,i){b.isDate(t)?e[i]=b.formatDate(t):b.isObject(t)&&(e[i]=b.encodeDates(t))}),e},b.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},b.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},b.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){w.critical("Implementation error. Please contact [email protected].")}}},b.safewrap_class=function(e,t){for(var i=0;i<t.length;i++)e.prototype[t[i]]=b.safewrap(e.prototype[t[i]])},b.safewrap_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=b.safewrap(e[t]))},b.strip_empty_properties=function(e){var t={};return b.each(e,function(e,i){b.isString(e)&&e.length>0&&(t[i]=e)}),t},b.truncate=function(e,t){var i;return"string"==typeof e?i=e.slice(0,t):b.isArray(e)?(i=[],b.each(e,function(e){i.push(b.truncate(e,t))})):b.isObject(e)?(i={},b.each(e,function(e,o){i[o]=b.truncate(e,t)})):i=e,i},b.JSONEncode=function(){return function(e){var t=e,i=function(e){var t=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=i[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},o=function(e,t){var n="",r=0,s="",a="",c=0,d=n,_=[],u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),typeof u){case"string":return i(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(n+=" ",_=[],"[object Array]"===p.apply(u)){for(c=u.length,r=0;r<c;r+=1)_[r]=o(r,u)||"null";return a=0===_.length?"[]":n?"[\n"+n+_.join(",\n"+n)+"\n"+d+"]":"["+_.join(",")+"]",n=d,a}for(s in u)l.call(u,s)&&(a=o(s,u))&&_.push(i(s)+(n?": ":":")+a);return a=0===_.length?"{}":n?"{"+_.join(",")+d+"}":"{"+_.join(",")+"}",n=d,a}};return o("",{"":t})}}(),b.JSONDecode=function(){var e,t,i,o,n={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},r=function(t){throw{name:"SyntaxError",message:t,at:e,text:i}},s=function(o){return o&&o!==t&&r("Expected '"+o+"' instead of '"+t+"'"),t=i.charAt(e),e+=1,t},a=function(){var e,i="";for("-"===t&&(i="-",s("-"));t>="0"&&t<="9";)i+=t,s();if("."===t)for(i+=".";s()&&t>="0"&&t<="9";)i+=t;if("e"===t||"E"===t)for(i+=t,s(),"-"!==t&&"+"!==t||(i+=t,s());t>="0"&&t<="9";)i+=t,s();if(e=+i,isFinite(e))return e;r("Bad number")},c=function(){var e,i,o,a="";if('"'===t)for(;s();){if('"'===t)return s(),a;if("\\"===t)if(s(),"u"===t){for(o=0,i=0;i<4&&(e=parseInt(s(),16),isFinite(e));i+=1)o=16*o+e;a+=String.fromCharCode(o)}else{if("string"!=typeof n[t])break;a+=n[t]}else a+=t}r("Bad string")},p=function(){for(;t&&t<=" ";)s()},l=function(){switch(t){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}r('Unexpected "'+t+'"')},d=function(){var e=[];if("["===t){if(s("["),p(),"]"===t)return s("]"),e;for(;t;){if(e.push(o()),p(),"]"===t)return s("]"),e;s(","),p()}}r("Bad array")},_=function(){var e,i={};if("{"===t){if(s("{"),p(),"}"===t)return s("}"),i;for(;t;){if(e=c(),p(),s(":"),Object.hasOwnProperty.call(i,e)&&r('Duplicate key "'+e+'"'),i[e]=o(),p(),"}"===t)return s("}"),i;s(","),p()}}r("Bad object")};return o=function(){switch(p(),t){case"{":return _();case"[":return d();case'"':return c();case"-":return a();default:return t>="0"&&t<="9"?a():l()}},function(n){var s;return i=n,e=0,t=" ",s=o(),p(),t&&r("Syntax error"),s}}(),b.base64Encode=function(e){var t,i,o,n,r,s,a,c,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,d=0,_="",u=[];if(!e)return e;e=b.utf8Encode(e);do{t=e.charCodeAt(l++),i=e.charCodeAt(l++),o=e.charCodeAt(l++),c=t<<16|i<<8|o,n=c>>18&63,r=c>>12&63,s=c>>6&63,a=63&c,u[d++]=p.charAt(n)+p.charAt(r)+p.charAt(s)+p.charAt(a)}while(l<e.length);switch(_=u.join(""),e.length%3){case 1:_=_.slice(0,-2)+"==";break;case 2:_=_.slice(0,-1)+"="}return _},b.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var t,i,o,n="",r=0;for(t=i=0,r=e.length,o=0;o<r;o++){var s=e.charCodeAt(o),a=null;s<128?i++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(i>t&&(n+=e.substring(t,i)),n+=a,t=i=o+1)}return i>t&&(n+=e.substring(t,e.length)),n},b.UUID=function(){var e=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},t=function(){return Math.random().toString(16).replace(".","")},i=function(){function e(e,t){var i,o=0;for(i=0;i<t.length;i++)o|=n[i]<<8*i;return e^o}var t,i,o=h,n=[],r=0;for(t=0;t<o.length;t++)i=o.charCodeAt(t),n.unshift(255&i),n.length>=4&&(r=e(r,n),n=[]);return n.length>0&&(r=e(r,n)),r.toString(16)};return function(){var o=(screen.height*screen.width).toString(16);return e()+"-"+t()+"-"+i()+"-"+o+"-"+e()}}(),b.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(e)},b.HTTPBuildQuery=function(e,t){var i,o,n=[];return b.isUndefined(t)&&(t="&"),b.each(e,function(e,t){i=encodeURIComponent(e.toString()),o=encodeURIComponent(t),n[n.length]=o+"="+i}),n.join(t)},b.getQueryParam=function(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+t+"=([^&#]*)",o=new RegExp(i),n=o.exec(e);return null===n||n&&"string"!=typeof n[1]&&n[1].length?"":decodeURIComponent(n[1]).replace(/\+/g," ")},b.getHashParam=function(e,t){var i=e.match(new RegExp(t+"=([^&]*)"));return i?i[1]:null},b.cookie={get:function(e){for(var t=e+"=",i=u.cookie.split(";"),o=0;o<i.length;o++){for(var n=i[o];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return null},parse:function(e){var t;try{t=b.JSONDecode(b.cookie.get(e))||{}}catch(e){}return t},set_seconds:function(e,t,i,o,n){var r="",s="",a="";if(o){var c=u.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i),p=c?c[0]:"";r=p?"; domain=."+p:""}if(i){var l=new Date;l.setTime(l.getTime()+1e3*i),s="; expires="+l.toGMTString()}n&&(a="; secure"),u.cookie=e+"="+encodeURIComponent(t)+s+"; path=/"+r+a},set:function(e,t,i,o,n){var r="",s="",a="";if(o){var c=u.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i),p=c?c[0]:"";r=p?"; domain=."+p:""}if(i){var l=new Date;l.setTime(l.getTime()+24*i*60*60*1e3),s="; expires="+l.toGMTString()}n&&(a="; secure");var d=e+"="+encodeURIComponent(t)+s+"; path=/"+r+a;return u.cookie=d,d},remove:function(e,t){b.cookie.set(e,"",-1,t)}},b.localStorage={error:function(e){w.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){b.localStorage.error(e)}return null},parse:function(e){try{return b.JSONDecode(b.localStorage.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){b.localStorage.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){b.localStorage.error(e)}}},b.register_event=function(){function e(e,i,o){return function(n){if(n=n||t(window.event)){var r,s,a=!0;return b.isFunction(o)&&(r=o(n)),s=i.call(e,n),!1!==r&&!1!==s||(a=!1),a}}}function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}var i=function(t,i,o,n,r){if(!t)return void w.error("No valid element provided to register_event");if(t.addEventListener&&!n)t.addEventListener(i,o,!!r);else{var s="on"+i,a=t[s];t[s]=e(t,o,a)}};return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},i}(),b.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}function t(e,t){var i=" "+t+" ";return(" "+e.className+" ").replace(o," ").indexOf(i)>=0}function i(i){if(!u.getElementsByTagName)return[];var o,n,r,s,a,c,p,l,d,_,h=i.split(" "),f=[u];for(c=0;c<h.length;c++)if(o=h[c].replace(/^\s+/,"").replace(/\s+$/,""),o.indexOf("#")>-1){n=o.split("#"),r=n[0];var g=n[1],m=u.getElementById(g);if(!m||r&&m.nodeName.toLowerCase()!=r)return[];f=[m]}else if(o.indexOf(".")>-1){n=o.split("."),r=n[0];var v=n[1];for(r||(r="*"),s=[],a=0,p=0;p<f.length;p++)for(d="*"==r?e(f[p]):f[p].getElementsByTagName(r),l=0;l<d.length;l++)s[a++]=d[l];for(f=[],_=0,p=0;p<s.length;p++)s[p].className&&b.isString(s[p].className)&&t(s[p],v)&&(f[_++]=s[p])}else{var y=o.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/);if(y){r=y[1];var w=y[2],x=y[3],k=y[4];for(r||(r="*"),s=[],a=0,p=0;p<f.length;p++)for(d="*"==r?e(f[p]):f[p].getElementsByTagName(r),l=0;l<d.length;l++)s[a++]=d[l];f=[],_=0;var I;switch(x){case"=":I=function(e){return e.getAttribute(w)==k};break;case"~":I=function(e){return e.getAttribute(w).match(new RegExp("\\b"+k+"\\b"))};break;case"|":I=function(e){return e.getAttribute(w).match(new RegExp("^"+k+"-?"))};break;case"^":I=function(e){return 0===e.getAttribute(w).indexOf(k)};break;case"$":I=function(e){return e.getAttribute(w).lastIndexOf(k)==e.getAttribute(w).length-k.length};break;case"*":I=function(e){return e.getAttribute(w).indexOf(k)>-1};break;default:I=function(e){return e.getAttribute(w)}}for(f=[],_=0,p=0;p<s.length;p++)I(s[p])&&(f[_++]=s[p])}else{for(r=o,s=[],a=0,p=0;p<f.length;p++)for(d=f[p].getElementsByTagName(r),l=0;l<d.length;l++)s[a++]=d[l];f=s}}return f}var o=/[\t\r\n]/g;return function(e){return b.isElement(e)?[e]:b.isObject(e)&&!b.isUndefined(e.length)?e:i.call(this,e)}}(),b.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),t="",i={};return b.each(e,function(e){t=b.getQueryParam(u.URL,e),t.length&&(i[e]=t)}),i},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=b.info.searchEngine(e),i="yahoo"!=t?"q":"p",o={};if(null!==t){o.$search_engine=t;var n=b.getQueryParam(e,i);n.length&&(o.mp_keyword=n)}return o},browser:function(e,t,i){return t=t||"",i||b.includes(e," OPR/")?b.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":b.includes(e,"IEMobile")||b.includes(e,"WPDesktop")?"Internet Explorer Mobile":b.includes(e,"Edge")?"Microsoft Edge":b.includes(e,"FBIOS")?"Facebook Mobile":b.includes(e,"Chrome")?"Chrome":b.includes(e,"CriOS")?"Chrome iOS":b.includes(e,"UCWEB")||b.includes(e,"UCBrowser")?"UC Browser":b.includes(e,"FxiOS")?"Firefox iOS":b.includes(t,"Apple")?b.includes(e,"Mobile")?"Mobile Safari":"Safari":b.includes(e,"Android")?"Android Mobile":b.includes(e,"Konqueror")?"Konqueror":b.includes(e,"Firefox")?"Firefox":b.includes(e,"MSIE")||b.includes(e,"Trident/")?"Internet Explorer":b.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,i){var o=b.info.browser(e,t,i),n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},r=n[o];if(void 0===r)return null;var s=e.match(r);return s?parseFloat(s[s.length-2]):null},os:function(){var e=h;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return b.extend(b.strip_empty_properties({$os:b.info.os(),$browser:b.info.browser(h,_.vendor,window.opera),$referrer:u.referrer,$referring_domain:b.info.referringDomain(u.referrer),$device:b.info.device(h)}),{$current_url:window.location.href,$browser_version:b.info.browserVersion(h,_.vendor,window.opera),$screen_height:screen.height,$screen_width:screen.width,mp_lib:"web",$lib_version:n.LIB_VERSION})},people_properties:function(){return b.extend(b.strip_empty_properties({$os:b.info.os(),$browser:b.info.browser(h,_.vendor,window.opera)}),{$browser_version:b.info.browserVersion(h,_.vendor,window.opera)})},pageviewInfo:function(e){return b.strip_empty_properties({mp_page:e,mp_referrer:u.referrer,mp_browser:b.info.browser(h,_.vendor,window.opera),mp_platform:b.info.os()})}},b.toArray=b.toArray,b.isObject=b.isObject,b.JSONEncode=b.JSONEncode,b.JSONDecode=b.JSONDecode,b.isBlockedUA=b.isBlockedUA,b.isEmptyObject=b.isEmptyObject,b.info=b.info,b.info.device=b.info.device,b.info.browser=b.info.browser,b.info.properties=b.info.properties;var x={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&1!==e.nodeType);return e},_loadScript:function(e,t){var i=document.createElement("script");i.type="text/javascript",i.src=e,i.onload=t;var o=document.getElementsByTagName("script");o.length>0?o[0].parentNode.insertBefore(i,o[0]):document.body.appendChild(i)},_getClassName:function(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}},_getPropertiesFromElement:function(e){var t={classes:this._getClassName(e).split(" "),tag_name:e.tagName.toLowerCase()};if(b.includes(["input","select","textarea"],e.tagName.toLowerCase())){var i=this._getFormFieldValue(e);this._includeProperty(e,i)&&(t.value=i)}b.each(e.attributes,function(e){t["attr__"+e.name]=e.value});for(var o=1,n=1,r=e;r=this._previousElementSibling(r);)o++,r.tagName===e.tagName&&n++;return t.nth_child=o,t.nth_of_type=n,t},_isTag:function(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()},_shouldTrackDomEvent:function(e,t){if(!e||this._isTag(e,"html")||1!==e.nodeType)return!1;switch(e.tagName.toLowerCase()){case"html":return!1;case"form":return"submit"===t.type;case"input":return-1===["button","submit"].indexOf(e.getAttribute("type"))?"change"===t.type:"click"===t.type;case"select":case"textarea":return"change"===t.type;default:return"click"===t.type}},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1,$host:window.location.host,$pathname:window.location.pathname}},_getInputValue:function(e){var t=null;switch(e.type.toLowerCase()){case"checkbox":e.checked&&(t=[e.value]);break;case"radio":e.checked&&(t=e.value);break;default:t=e.value}return t},_getSelectValue:function(e){var t;if(e.multiple){var i=[];b.each(e.querySelectorAll("[selected]"),function(e){i.push(e.value)}),t=i}else t=e.value;return t},_includeProperty:function(e,t){for(var i=e;i.parentNode&&!this._isTag(i,"body");i=i.parentNode){var o=this._getClassName(i).split(" ");if(b.includes(o,"mp-sensitive")||b.includes(o,"mp-no-track"))return!1}if(b.includes(this._getClassName(e).split(" "),"mp-include"))return!0;if(null===t)return!1;switch((e.type||"").toLowerCase()){case"hidden":case"password":return!1}if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test((e.name||e.id||"").replace(/[^a-zA-Z0-9]/g,"")))return!1;if("string"==typeof t){if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((t||"").replace(/[\- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(t))return!1}return!0},_getFormFieldValue:function(e){var t;switch(e.tagName.toLowerCase()){case"input":t=this._getInputValue(e);break;case"select":t=this._getSelectValue(e);break;default:t=e.value||e.textContent}return this._includeProperty(e,t)?t:null},_getFormFieldProperties:function(e){var t={};return b.each(e.elements,function(e){var i=e.getAttribute("name")||e.getAttribute("id");if(null!==i){i="$form_field__"+i;var o=this._getFormFieldValue(e);if(this._includeProperty(e,o)){var n=t[i];t[i]=void 0!==n?[].concat(n,o):o}}},this),t},_extractCustomPropertyValue:function(e){var t=[];return b.each(document.querySelectorAll(e.css_selector),function(e){["input","select"].indexOf(e.tagName.toLowerCase())>-1?t.push(e.value):e.textContent&&t.push(e.textContent)}),t.join(", ")},_getCustomProperties:function(e){var t={};return b.each(this._customProperties,function(i){b.each(i.event_selectors,function(o){var n=document.querySelectorAll(o);b.each(n,function(o){b.includes(e,o)&&(t[i.name]=this._extractCustomPropertyValue(i))},this)},this)},this),t},_getEventTarget:function(e){return void 0===e.target?e.srcElement:e.target},_trackEvent:function(e,t){var i=this._getEventTarget(e);if(3===i.nodeType&&(i=i.parentNode),this._shouldTrackDomEvent(i,e)){for(var o=[i],n=i;n.parentNode&&!this._isTag(n,"body");)o.push(n.parentNode),n=n.parentNode;var r,s,a,c=[],p=!1;if(b.each(o,function(e,t){if("a"===e.tagName.toLowerCase()?r=e.getAttribute("href"):"form"===e.tagName.toLowerCase()&&(a=e),!s&&t<5&&e.textContent){var i=b.trim(e.textContent);i&&(s=i.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}var o=this._getClassName(e).split(" ");b.includes(o,"mp-no-track")&&(p=!0),c.push(this._getPropertiesFromElement(e))},this),p)return!1;var l=b.extend(this._getDefaultProperties(e.type),{$elements:c,$el_attr__href:r,$el_text:s},this._getCustomProperties(o));return!a||"submit"!==e.type&&"click"!==e.type||b.extend(l,this._getFormFieldProperties(a)),t.track("$web_event",l),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=b.bind(function(t){t=t||window.event,this._trackEvent(t,e)},this);b.register_event(document,"submit",t,!1,!0),b.register_event(document,"change",t,!1,!0),b.register_event(document,"click",t,!1,!0)},_customProperties:{},init:function(e){if(!document||!document.body){var t=this;return void setTimeout(function(){t.init(e)},500)}var i=e.get_config("token");if(!(this._initializedTokens.indexOf(i)>-1||(this._initializedTokens.push(i),this._maybeLoadEditor(e)))){var o=b.bind(function(t){t&&t.config&&!0===t.config.enable_collect_everything?(t.custom_properties&&(this._customProperties=t.custom_properties),e.track("$web_event",b.extend({$title:document.title},this._getDefaultProperties("pageview"))),this._addDomEventHandlers(e)):e.__autotrack_enabled=!1},this);e._send_request(e.get_config("api_host")+"/decide/",{verbose:!0,version:"1",lib:"web",token:i},e._prepare_callback(o))}},_editorParamsFromHash:function(e,t){var i;try{var o=b.getHashParam(t,"state");o=JSON.parse(decodeURIComponent(o));var n=b.getHashParam(t,"expires_in");i={accessToken:b.getHashParam(t,"access_token"),accessTokenExpiresAt:(new Date).getTime()+1e3*Number(n),bookmarkletMode:!!o.bookmarkletMode,projectId:o.projectId,projectOwnerId:o.projectOwnerId,projectToken:o.token,readOnly:o.readOnly,userFlags:o.userFlags,userId:o.userId},window.sessionStorage.setItem("editorParams",JSON.stringify(i)),o.desiredHash?window.location.hash=o.desiredHash:window.history?history.replaceState("",document.title,window.location.pathname+window.location.search):window.location.hash=""}catch(e){}return i},_maybeLoadEditor:function(e){try{var t=!1;if(b.getHashParam(window.location.hash,"state")){var i=b.getHashParam(window.location.hash,"state");i=JSON.parse(decodeURIComponent(i)),t="mpeditor"===i.action}var o,n=!!window.sessionStorage.getItem("_mpcehash");return t?o=this._editorParamsFromHash(e,window.location.hash):n?(o=this._editorParamsFromHash(e,window.sessionStorage.getItem("_mpcehash")),window.sessionStorage.removeItem("_mpcehash")):o=JSON.parse(window.sessionStorage.getItem("editorParams")||"{}"),!(!o.projectToken||e.get_config("token")!==o.projectToken)&&(this._loadEditor(e,o),!0)}catch(e){return!1}},_loadEditor:function(e,t){if(!window._mpEditorLoaded){window._mpEditorLoaded=!0;var i=e.get_config("app_host")+"/js-bundle/reports/collect-everything/editor.js?_ts="+(new Date).getTime();return this._loadScript(i,function(){window.mp_load_editor(t)}),!0}return!1},enabledForProject:function(e,t,i){t=b.isUndefined(t)?10:t,i=b.isUndefined(i)?10:i;for(var o=0,n=0;n<e.length;n++)o+=e.charCodeAt(n);return o%t<i},isBrowserSupported:function(){return b.isFunction(document.querySelectorAll)}};b.bind_instance_methods(x),b.safewrap_instance_methods(x);var k,I,T=0,E=["__mps","__mpso","__mpa","__mpap","__mpu","$people_distinct_id","__alias","__cmpns","__timers"],O="https:"===document.location.protocol?"https://":"http://",N=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,S=!N&&-1===h.indexOf("MSIE")&&-1===h.indexOf("Mozilla"),M={api_host:O+"api.mixpanel.com",app_host:O+"mixpanel.com",autotrack:!0,cdn:O+"cdn.mxpnl.com",cross_subdomain_cookie:!0,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,track_pageview:!0,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,property_blacklist:[]},P=!1,A=function(){};A.prototype.create_properties=function(){},A.prototype.event_handler=function(){},A.prototype.after_track_handler=function(){},A.prototype.init=function(e){return this.mp=e,this},A.prototype.track=function(e,t,i,o){var n=this,r=b.dom_query(e);return 0===r.length?void w.error("The DOM query ("+e+") returned 0 elements"):(b.each(r,function(e){b.register_event(e,this.override_event,function(e){var r={},s=n.create_properties(i,this),a=n.mp.get_config("track_links_timeout");n.event_handler(e,this,r),window.setTimeout(n.track_callback(o,s,r,!0),a),n.mp.track(t,s,n.track_callback(o,s,r))})},this),!0)},A.prototype.track_callback=function(e,t,i,o){o=o||!1;var n=this;return function(){i.callback_fired||(i.callback_fired=!0,e&&!1===e(o,t)||n.after_track_handler(t,i,o))}},A.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):b.extend({},e)};var $=function(){this.override_event="click"};b.inherit($,A),$.prototype.create_properties=function(e,t){var i=$.superclass.create_properties.apply(this,arguments);return t.href&&(i.url=t.href),i},$.prototype.event_handler=function(e,t,i){i.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,i.href=t.href,i.new_tab||e.preventDefault()},$.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var F=function(){this.override_event="submit"};b.inherit(F,A),F.prototype.event_handler=function(e,t,i){i.element=t,e.preventDefault()},F.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var U=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(w.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie");"localStorage"===t&&function(){var e=!0;try{var t="__mplssupport__";b.localStorage.set(t,"xyz"),"xyz"!==b.localStorage.get(t)&&(e=!1),b.localStorage.remove(t)}catch(t){e=!1}return e||w.error("localStorage unsupported; falling back to cookie store"),e}()?this.storage=b.localStorage:this.storage=b.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};U.prototype.properties=function(){var e={};return b.each(this.props,function(t,i){b.include(E,i)||(e[i]=t)}),e},U.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=b.extend({},e))}},U.prototype.upgrade=function(e){var t,i,o=e.upgrade;o&&(t="mp_super_properties","string"==typeof o&&(t=o),i=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),i&&(this.props=b.extend(this.props,i.all,i.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(i=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(i))),this.storage===b.localStorage&&(i=b.cookie.parse(this.name),b.cookie.remove(this.name),b.cookie.remove(this.name,!0),i&&this.register_once(i))},U.prototype.save=function(){this.disabled||(this._expire_notification_campaigns(),this.storage.set(this.name,b.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure))},U.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},U.prototype.clear=function(){this.remove(),this.props={}},U.prototype.register_once=function(e,t,i){return!!b.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===i?this.default_expiry:i,b.each(e,function(e,i){this.props[i]&&this.props[i]!==t||(this.props[i]=e)},this),this.save(),!0)},U.prototype.register=function(e,t){return!!b.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,b.extend(this.props,e),this.save(),!0)},U.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},U.prototype._expire_notification_campaigns=b.safewrap(function(){var e=this.props.__cmpns,t=n.DEBUG?6e4:36e5;if(e){for(var i in e)1*new Date-e[i]>t&&delete e[i];b.isEmptyObject(e)&&delete this.props.__cmpns}}),U.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(b.info.campaignParams()),this.campaign_params_saved=!0)},U.prototype.update_search_keyword=function(e){this.register(b.info.searchInfo(e))},U.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:b.info.referringDomain(e)||"$direct"},"")},U.prototype.get_referrer_info=function(){return b.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},U.prototype.safe_merge=function(e){return b.each(this.props,function(t,i){i in e||(e[i]=t)}),e},U.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},U.prototype.set_disabled=function(e){this.disabled=e,this.disabled&&this.remove()},U.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},U.prototype.get_cross_subdomain=function(){return this.cross_subdomain},U.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},U.prototype._add_to_people_queue=function(e,t){var i=this._get_queue_key(e),o=t[e],n=this._get_or_create_queue("$set"),r=this._get_or_create_queue("$set_once"),s=this._get_or_create_queue("$add"),a=this._get_or_create_queue("$union"),c=this._get_or_create_queue("$append",[]);"__mps"===i?(b.extend(n,o),this._pop_from_people_queue("$add",o),this._pop_from_people_queue("$union",o)):"__mpso"===i?b.each(o,function(e,t){t in r||(r[t]=e)}):"__mpa"===i?b.each(o,function(e,t){t in n?n[t]+=e:(t in s||(s[t]=0),s[t]+=e)},this):"__mpu"===i?b.each(o,function(e,t){b.isArray(e)&&(t in a||(a[t]=[]),a[t]=a[t].concat(e))}):"__mpap"===i&&c.push(o),w.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),w.log(t),this.save()},U.prototype._pop_from_people_queue=function(e,t){var i=this._get_queue(e);b.isUndefined(i)||(b.each(t,function(e,t){delete i[t]},this),this.save())},U.prototype._get_queue_key=function(e){return"$set"===e?"__mps":"$set_once"===e?"__mpso":"$add"===e?"__mpa":"$append"===e?"__mpap":"$union"===e?"__mpu":void w.error("Invalid queue:",e)},U.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},U.prototype._get_or_create_queue=function(e,t){var i=this._get_queue_key(e);return t=b.isUndefined(t)?{}:t,this.props[i]||(this.props[i]=t)},U.prototype.set_event_timer=function(e,t){var i=this.props.__timers||{};i[e]=t,this.props.__timers=i,this.save()},U.prototype.remove_event_timer=function(e){var t=this.props.__timers||{},i=t[e];return b.isUndefined(i)||(delete this.props.__timers[e],this.save()),i};var B,D=function(){},C=function(){},H=function(e,t,i){var o,r="mixpanel"===i?I:I[i];if(r&&k===T)o=r;else{if(r&&!b.isArray(r))return void w.error("You have already initialized "+i);o=new D}if(o._init(e,t,i),o.people=new C,o.people._init(o),n.DEBUG=n.DEBUG||o.get_config("debug"),o.__autotrack_enabled=o.get_config("autotrack"),o.get_config("autotrack")){x.enabledForProject(o.get_config("token"),100,100)?x.isBrowserSupported()?x.init(o):(o.__autotrack_enabled=!1,w.log("Disabling Automatic Event Collection because this browser is not supported")):(o.__autotrack_enabled=!1,w.log("Not in active bucket: disabling Automatic Event Collection."));try{G(o)}catch(e){w.error(e)}}return!b.isUndefined(r)&&b.isArray(r)&&(o._execute_array.call(o.people,r.people),o._execute_array(r)),o};D.prototype.init=function(e,t,i){if(b.isUndefined(i))return void w.error("You must name your new library: init(token, config, name)");if("mixpanel"===i)return void w.error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");var o=H(e,t,i);return I[i]=o,o._loaded(),o},D.prototype._init=function(e,t,i){this.__loaded=!0,this.config={},this.set_config(b.extend({},M,t,{name:i,token:e,callback_fn:("mixpanel"===i?i:"mixpanel."+i)+"._jsc"})),this._jsc=function(){},this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.persistence=this.cookie=new U(this.config),this.register_once({distinct_id:b.UUID()},"")},D.prototype._loaded=function(){this.get_config("loaded")(this),this.get_config("track_pageview")&&this.track_pageview()},D.prototype._dom_loaded=function(){b.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),b.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},D.prototype._track_dom=function(e,t){if(this.get_config("img"))return w.error("You can't use DOM tracking functions with img = true."),!1;if(!P)return this.__dom_loaded_queue.push([e,t]),!1;var i=(new e).init(this);return i.track.apply(i,t)},D.prototype._prepare_callback=function(e,t){if(b.isUndefined(e))return null;if(N){return function(i){e(i,t)}}var i=this._jsc,o=""+Math.floor(1e8*Math.random()),n=this.get_config("callback_fn")+"["+o+"]";return i[o]=function(n){delete i[o],e(n,t)},n},D.prototype._send_request=function(e,t,i){if(S)return void this.__request_queue.push(arguments);var o=this.get_config("verbose");if(t.verbose&&(o=!0),this.get_config("test")&&(t.test=1),o&&(t.verbose=1),this.get_config("img")&&(t.img=1),N||(i?t.callback=i:(o||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),e+="?"+b.HTTPBuildQuery(t),"img"in t){var n=document.createElement("img");n.src=e,document.body.appendChild(n)}else if(N)try{var r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)i&&i(o?b.JSONDecode(r.responseText):Number(r.responseText));else{var e="Bad HTTP status: "+r.status+" "+r.statusText;w.error(e),i&&i(o?{status:0,error:e}:0)}},r.send(null)}catch(e){w.error(e)}else{var s=document.createElement("script");s.type="text/javascript",s.async=!0,s.defer=!0,s.src=e;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(s,a)}},D.prototype._execute_array=function(e){var t,i=[],o=[],n=[];b.each(e,function(e){e&&(t=e[0],"function"==typeof e?e.call(this):b.isArray(e)&&"alias"===t?i.push(e):b.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?n.push(e):o.push(e))},this);var r=function(e,t){b.each(e,function(e){this[e[0]].apply(this,e.slice(1))},t)};r(i,this),r(o,this),r(n,this)},D.prototype.push=function(e){this._execute_array([e])},D.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},D.prototype.track=function(e,t,i){if("function"!=typeof i&&(i=function(){}),b.isUndefined(e))return void w.error("No event name provided to mixpanel.track");if(this._event_is_disabled(e))return void i(0);t=t||{},t.token=this.get_config("token");var o=this.persistence.remove_event_timer(e);if(!b.isUndefined(o)){var n=(new Date).getTime()-o;t.$duration=parseFloat((n/1e3).toFixed(3))}this.persistence.update_search_keyword(document.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(document.referrer),t=b.extend({},b.info.properties(),this.persistence.properties(),t);try{this.get_config("autotrack")&&"mp_page_view"!==e&&"$create_alias"!==e&&(t=b.extend({},t,this.mp_counts),this.mp_counts={$__c:0},b.cookie.set("mp_"+this.get_config("name")+"__c",0,1,!0))}catch(e){w.error(e)}var r=this.get_config("property_blacklist");b.isArray(r)?b.each(r,function(e){delete t[e]}):w.error("Invalid value for property_blacklist config: "+r);var s={event:e,properties:t},a=b.truncate(s,255),c=b.JSONEncode(a),p=b.base64Encode(c);return w.log("MIXPANEL REQUEST:"),w.log(a),this._send_request(this.get_config("api_host")+"/track/",{data:p},this._prepare_callback(i,a)),a},D.prototype.track_pageview=function(e){b.isUndefined(e)&&(e=document.location.href),this.track("mp_page_view",b.info.pageviewInfo(e))},D.prototype.track_links=function(){return this._track_dom.call(this,$,arguments)},D.prototype.track_forms=function(){return this._track_dom.call(this,F,arguments)},D.prototype.time_event=function(e){if(b.isUndefined(e))return void w.error("No event name provided to mixpanel.time_event");this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())},D.prototype.register=function(e,t){this.persistence.register(e,t)},D.prototype.register_once=function(e,t,i){this.persistence.register_once(e,t,i)},D.prototype.unregister=function(e){this.persistence.unregister(e)},D.prototype._register_single=function(e,t){var i={};i[e]=t,this.register(i)},D.prototype.identify=function(e,t,i,o,n,r){e!==this.get_distinct_id()&&e!==this.get_property("__alias")&&(this.unregister("__alias"),this._register_single("distinct_id",e)),this._check_and_handle_notifications(this.get_distinct_id()),this._flags.identify_called=!0,this.people._flush(t,i,o,n,r)},D.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1,this.register_once({distinct_id:b.UUID()},"")},D.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},D.prototype.alias=function(e,t){if(e===this.get_property("$people_distinct_id"))return w.critical("Attempting to create alias for existing People user - aborting."),-2;var i=this;return b.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single("__alias",e),this.track("$create_alias",{alias:e,distinct_id:t},function(){i.identify(e)})):(w.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},D.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},D.prototype.set_config=function(e){b.isObject(e)&&(b.extend(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),n.DEBUG=n.DEBUG||this.get_config("debug"))},D.prototype.get_config=function(e){return this.config[e]},D.prototype.get_property=function(e){return this.persistence.props[e]},D.prototype.toString=function(){var e=this.get_config("name");return"mixpanel"!==e&&(e="mixpanel."+e),e},D.prototype._event_is_disabled=function(e){return b.isBlockedUA(h)||this._flags.disable_all_events||b.include(this.__disabled_events,e)},D.prototype._check_and_handle_notifications=function(e){if(e&&!this._flags.identify_called&&!this.get_config("disable_notifications")){w.log("MIXPANEL NOTIFICATION CHECK");var t={verbose:!0,version:"2",lib:"web",token:this.get_config("token"),distinct_id:e},i=this;this._send_request(this.get_config("api_host")+"/decide/",t,this._prepare_callback(function(e){e.notifications&&e.notifications.length>0&&i._show_notification.call(i,e.notifications[0])}))}},D.prototype._show_notification=function(e){new B(e,this).show()},C.prototype._init=function(e){this._mixpanel=e},C.prototype.set=function(e,t,i){var o={},n={};return b.isObject(e)?(b.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this),i=t):n[e]=t,this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n=b.extend({},b.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),n),o.$set=n,this._send_request(o,i)},C.prototype.set_once=function(e,t,i){var o={},n={};return b.isObject(e)?(b.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this),i=t):n[e]=t,o.$set_once=n,this._send_request(o,i)},C.prototype.increment=function(e,t,i){var o={},n={};return b.isObject(e)?(b.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void w.error("Invalid increment value passed to mixpanel.people.increment - must be a number");n[t]=e}},this),i=t):(b.isUndefined(t)&&(t=1),n[e]=t),o.$add=n,this._send_request(o,i)},C.prototype.append=function(e,t,i){var o={},n={};return b.isObject(e)?(b.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=e)},this),i=t):n[e]=t,o.$append=n,this._send_request(o,i)},C.prototype.union=function(e,t,i){var o={},n={};return b.isObject(e)?(b.each(e,function(e,t){this._is_reserved_property(t)||(n[t]=b.isArray(e)?e:[e])},this),i=t):n[e]=b.isArray(t)?t:[t],o.$union=n,this._send_request(o,i)},C.prototype.track_charge=function(e,t,i){return!b.isNumber(e)&&(e=parseFloat(e),isNaN(e))?void w.error("Invalid value passed to mixpanel.people.track_charge - must be a number"):this.append("$transactions",b.extend({$amount:e},t),i)},C.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},C.prototype.delete_user=function(){if(!this._identify_called())return void w.error("mixpanel.people.delete_user() requires you to call identify() first");var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)},C.prototype.toString=function(){return this._mixpanel.toString()+".people"},C.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var i=b.encodeDates(e),o=b.truncate(i,255),n=b.JSONEncode(i),r=b.base64Encode(n);return this._identify_called()?(w.log("MIXPANEL PEOPLE REQUEST:"),w.log(o),this._mixpanel._send_request(this._get_config("api_host")+"/engage/",{data:r},this._mixpanel._prepare_callback(t,o)),o):(this._enqueue(e),b.isUndefined(t)||t(this._get_config("verbose")?{status:-1,error:null}:-1),o)},C.prototype._get_config=function(e){return this._mixpanel.get_config(e)},C.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},C.prototype._enqueue=function(e){"$set"in e?this._mixpanel.persistence._add_to_people_queue("$set",e):"$set_once"in e?this._mixpanel.persistence._add_to_people_queue("$set_once",e):"$add"in e?this._mixpanel.persistence._add_to_people_queue("$add",e):"$append"in e?this._mixpanel.persistence._add_to_people_queue("$append",e):"$union"in e?this._mixpanel.persistence._add_to_people_queue("$union",e):w.error("Invalid call to _enqueue():",e)},C.prototype._flush=function(e,t,i,o,n){var r=this,s=b.extend({},this._mixpanel.persistence._get_queue("$set")),a=b.extend({},this._mixpanel.persistence._get_queue("$set_once")),c=b.extend({},this._mixpanel.persistence._get_queue("$add")),p=this._mixpanel.persistence._get_queue("$append"),l=b.extend({},this._mixpanel.persistence._get_queue("$union"));if(b.isUndefined(s)||!b.isObject(s)||b.isEmptyObject(s)||(r._mixpanel.persistence._pop_from_people_queue("$set",s),this.set(s,function(t,i){0===t&&r._mixpanel.persistence._add_to_people_queue("$set",s),b.isUndefined(e)||e(t,i)})),b.isUndefined(a)||!b.isObject(a)||b.isEmptyObject(a)||(r._mixpanel.persistence._pop_from_people_queue("$set_once",a),this.set_once(a,function(e,t){0===e&&r._mixpanel.persistence._add_to_people_queue("$set_once",a),b.isUndefined(o)||o(e,t)})),b.isUndefined(c)||!b.isObject(c)||b.isEmptyObject(c)||(r._mixpanel.persistence._pop_from_people_queue("$add",c),this.increment(c,function(e,i){0===e&&r._mixpanel.persistence._add_to_people_queue("$add",c),b.isUndefined(t)||t(e,i)})),b.isUndefined(l)||!b.isObject(l)||b.isEmptyObject(l)||(r._mixpanel.persistence._pop_from_people_queue("$union",l),this.union(l,function(e,t){0===e&&r._mixpanel.persistence._add_to_people_queue("$union",l),b.isUndefined(n)||n(e,t)})),!b.isUndefined(p)&&b.isArray(p)&&p.length){for(var d,_=function(e,t){0===e&&r._mixpanel.persistence._add_to_people_queue("$append",d),b.isUndefined(i)||i(e,t)},u=p.length-1;u>=0;u--)d=p.pop(),r.append(d,_);r._mixpanel.persistence.save()}},C.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e},D._Notification=function(e,t){b.bind_instance_methods(this),this.mixpanel=t,this.persistence=this.mixpanel.persistence,this.campaign_id=b.escapeHTML(e.id),this.message_id=b.escapeHTML(e.message_id),this.body=(b.escapeHTML(e.body)||"").replace(/\n/g,"<br/>"),this.cta=b.escapeHTML(e.cta)||"Close",this.notif_type=b.escapeHTML(e.type)||"takeover",this.style=b.escapeHTML(e.style)||"light",this.title=b.escapeHTML(e.title)||"",this.video_width=B.VIDEO_WIDTH,this.video_height=B.VIDEO_HEIGHT,this.dest_url=e.cta_url||null,this.image_url=e.image_url||null,this.thumb_image_url=e.thumb_image_url||null,this.video_url=e.video_url||null,this.clickthrough=!0,this.dest_url||(this.dest_url="#dismiss",this.clickthrough=!1),this.mini="mini"===this.notif_type,this.mini||(this.notif_type="takeover"),this.notif_width=this.mini?B.NOTIF_WIDTH_MINI:B.NOTIF_WIDTH,this._set_client_config(),this.imgs_to_preload=this._init_image_html(),this._init_video()},B=D._Notification,B.ANIM_TIME=200,B.MARKUP_PREFIX="mixpanel-notification",B.BG_OPACITY=.6,B.NOTIF_TOP=25,B.NOTIF_START_TOP=200,B.NOTIF_WIDTH=388,B.NOTIF_WIDTH_MINI=420,B.NOTIF_HEIGHT_MINI=85,B.THUMB_BORDER_SIZE=5,B.THUMB_IMG_SIZE=60,B.THUMB_OFFSET=Math.round(B.THUMB_IMG_SIZE/2),B.VIDEO_WIDTH=595,B.VIDEO_HEIGHT=334,B.prototype.show=function(){var e=this;if(this._set_client_config(),!this.body_el)return void setTimeout(function(){e.show()},300);this._init_styles(),this._init_notification_el(),this._preload_images(this._attach_and_animate)},B.prototype.dismiss=b.safewrap(function(){this.marked_as_shown||this._mark_delivery({invisible:!0});var e=this.showing_video?this._get_el("video"):this._get_notification_display_el();if(this.use_transitions)this._remove_class("bg","visible"),this._add_class(e,"exiting"),setTimeout(this._remove_notification_el,B.ANIM_TIME);else{var t,i,o;this.mini?(t="right",i=20,o=-100):(t="top",i=B.NOTIF_TOP,o=B.NOTIF_START_TOP+B.NOTIF_TOP),this._animate_els([{el:this._get_el("bg"),attr:"opacity",start:B.BG_OPACITY,goal:0},{el:e,attr:"opacity",start:1,goal:0},{el:e,attr:t,start:i,goal:o}],B.ANIM_TIME,this._remove_notification_el)}}),B.prototype._add_class=b.safewrap(function(e,t){t=B.MARKUP_PREFIX+"-"+t,"string"==typeof e&&(e=this._get_el(e)),e.className?~(" "+e.className+" ").indexOf(" "+t+" ")||(e.className+=" "+t):e.className=t}),B.prototype._remove_class=b.safewrap(function(e,t){t=B.MARKUP_PREFIX+"-"+t,"string"==typeof e&&(e=this._get_el(e)),e.className&&(e.className=(" "+e.className+" ").replace(" "+t+" ","").replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,""))}),B.prototype._animate_els=b.safewrap(function(e,t,i,o){var n,r,s,a=this,c=!1,p=1*new Date;for(o=o||p,s=p-o,n=0;n<e.length;n++)if(r=e[n],void 0===r.val&&(r.val=r.start),r.val!==r.goal){c=!0;var l=r.goal-r.start,d=r.goal>=r.start?1:-1;r.val=r.start+l*s/t,"opacity"!==r.attr&&(r.val=Math.round(r.val)),(d>0&&r.val>=r.goal||d<0&&r.val<=r.goal)&&(r.val=r.goal)}if(!c)return void(i&&i());for(n=0;n<e.length;n++)if(r=e[n],r.el){var _="opacity"===r.attr?"":"px";r.el.style[r.attr]=String(r.val)+_}setTimeout(function(){a._animate_els(e,t,i,o)},10)}),B.prototype._attach_and_animate=b.safewrap(function(){var e=this;if(!this.shown&&!this._get_shown_campaigns()[this.campaign_id]){this.shown=!0,this.body_el.appendChild(this.notification_el),setTimeout(function(){var t=e._get_notification_display_el();if(e.use_transitions)e.mini||e._add_class("bg","visible"),e._add_class(t,"visible"),e._mark_as_shown();else{var i,o,n;e.mini?(i="right",o=-100,n=20):(i="top",o=B.NOTIF_START_TOP+B.NOTIF_TOP,n=B.NOTIF_TOP),e._animate_els([{el:e._get_el("bg"),attr:"opacity",start:0,goal:B.BG_OPACITY},{el:t,attr:"opacity",start:0,goal:1},{el:t,attr:i,start:o,goal:n}],B.ANIM_TIME,e._mark_as_shown)}},100),b.register_event(e._get_el("cancel"),"click",function(t){t.preventDefault(),e.dismiss()});var t=e._get_el("button")||e._get_el("mini-content");b.register_event(t,"click",function(t){t.preventDefault(),e.show_video?(e._track_event("$campaign_open",{$resource_type:"video"}),e._switch_to_video()):(e.dismiss(),e.clickthrough&&e._track_event("$campaign_open",{$resource_type:"link"},function(){window.location.href=e.dest_url}))})}}),B.prototype._get_el=function(e){return document.getElementById(B.MARKUP_PREFIX+"-"+e)},B.prototype._get_notification_display_el=function(){return this._get_el(this.notif_type)},B.prototype._get_shown_campaigns=function(){return this.persistence.props.__cmpns||(this.persistence.props.__cmpns={})},B.prototype._browser_lte=function(e,t){return this.browser_versions[e]&&this.browser_versions[e]<=t},B.prototype._init_image_html=function(){var e=[];return this.mini?(this.thumb_image_url=this.thumb_image_url||"//cdn.mxpnl.com/site_media/images/icons/notifications/mini-news-dark.png",e.push(this.thumb_image_url)):(this.image_url?(e.push(this.image_url),this.img_html='<img id="img" src="'+this.image_url+'"/>'):this.img_html="",this.thumb_image_url?(e.push(this.thumb_image_url),this.thumb_img_html='<div id="thumbborder-wrapper"><div id="thumbborder"></div></div><img id="thumbnail" src="'+this.thumb_image_url+'" width="'+B.THUMB_IMG_SIZE+'" height="'+B.THUMB_IMG_SIZE+'"/><div id="thumbspacer"></div>'):this.thumb_img_html=""),e},B.prototype._init_notification_el=function(){var e="",t="",i="",o='<div id="cancel"><div id="cancel-icon"></div></div>';if(this.notification_el=document.createElement("div"),this.notification_el.id=B.MARKUP_PREFIX+"-wrapper",this.mini)e='<div id="mini"><div id="mainbox">'+o+'<div id="mini-content"><div id="mini-icon"><div id="mini-icon-img"></div></div><div id="body"><div id="body-text"><div>'+this.body+'</div></div></div></div></div><div id="mini-border"></div></div>';else{var n=this.clickthrough||this.show_video?"":'<div id="button-close"></div>',r=this.show_video?'<div id="button-play"></div>':"";this._browser_lte("ie",7)&&(n="",r=""),e='<div id="takeover">'+this.thumb_img_html+'<div id="mainbox">'+o+'<div id="content">'+this.img_html+'<div id="title">'+this.title+'</div><div id="body">'+this.body+'</div><div id="tagline"><a href="http://mixpanel.com?from=inapp" target="_blank">POWERED BY MIXPANEL</a></div></div><div id="button">'+n+'<a id="button-link" href="'+this.dest_url+'">'+this.cta+"</a>"+r+"</div></div></div>"}this.youtube_video?(t="//www.youtube.com/embed/"+this.youtube_video+"?wmode=transparent&showinfo=0&modestbranding=0&rel=0&autoplay=1&loop=0&vq=hd1080",this.yt_custom&&(t+="&enablejsapi=1&html5=1&controls=0",i='<div id="video-controls"><div id="video-progress" class="video-progress-el"><div id="video-progress-total" class="video-progress-el"></div><div id="video-elapsed" class="video-progress-el"></div></div><div id="video-time" class="video-progress-el"></div></div>')):this.vimeo_video&&(t="//player.vimeo.com/video/"+this.vimeo_video+"?autoplay=1&title=0&byline=0&portrait=0"),this.show_video&&(this.video_iframe='<iframe id="'+B.MARKUP_PREFIX+'-video-frame" width="'+this.video_width+'" height="'+this.video_height+'" src="'+t+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen="1" scrolling="no"></iframe>',i='<div id="video-'+(this.flip_animate?"":"no")+'flip"><div id="video"><div id="video-holder"></div>'+i+"</div></div>");var s=i+e;this.flip_animate&&(s=(this.mini?e:"")+'<div id="flipcontainer"><div id="flipper">'+(this.mini?i:s)+"</div></div>"),this.notification_el.innerHTML=('<div id="overlay" class="'+this.notif_type+'"><div id="campaignid-'+this.campaign_id+'"><div id="bgwrapper"><div id="bg"></div>'+s+"</div></div></div>").replace(/class=\"/g,'class="'+B.MARKUP_PREFIX+"-").replace(/id=\"/g,'id="'+B.MARKUP_PREFIX+"-")},B.prototype._init_styles=function(){"dark"===this.style?this.style_vals={bg:"#1d1f25",bg_actions:"#282b32",bg_hover:"#3a4147",bg_light:"#4a5157",border_gray:"#32353c",cancel_opacity:"0.4",mini_hover:"#2a3137",text_title:"#fff",text_main:"#9498a3",text_tagline:"#464851",text_hover:"#ddd"}:this.style_vals={bg:"#fff",bg_actions:"#e7eaee",bg_hover:"#eceff3",bg_light:"#f5f5f5",border_gray:"#e4ecf2",cancel_opacity:"1.0",mini_hover:"#fafafa",text_title:"#5c6578",text_main:"#8b949b",text_tagline:"#ced9e6",text_hover:"#7c8598"};var e="0px 0px 35px 0px rgba(45, 49, 56, 0.7)",t=e,i=e,o=B.THUMB_IMG_SIZE+2*B.THUMB_BORDER_SIZE,n=B.ANIM_TIME/1e3+"s";this.mini&&(e="none");var r={};r["@media only screen and (max-width: "+(B.NOTIF_WIDTH_MINI+20-1)+"px)"]={"#overlay":{display:"none"}};var s={".flipped":{transform:"rotateY(180deg)"},"#overlay":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",overflow:"auto","text-align":"center","z-index":"10000","font-family":'"Helvetica", "Arial", sans-serif',"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},"#overlay.mini":{height:"0",overflow:"visible"},"#overlay a":{width:"initial",padding:"0","text-decoration":"none","text-transform":"none",color:"inherit"},"#bgwrapper":{position:"relative",width:"100%",height:"100%"},"#bg":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","min-width":4*this.doc_width+"px","min-height":4*this.doc_height+"px","background-color":"black",opacity:"0.0","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)",filter:"alpha(opacity=60)",transition:"opacity "+n},"#bg.visible":{opacity:B.BG_OPACITY},".mini #bg":{width:"0",height:"0","min-width":"0"},"#flipcontainer":{perspective:"1000px",position:"absolute",width:"100%"},"#flipper":{position:"relative","transform-style":"preserve-3d",transition:"0.3s"},"#takeover":{position:"absolute",left:"50%",width:B.NOTIF_WIDTH+"px","margin-left":Math.round(-B.NOTIF_WIDTH/2)+"px","backface-visibility":"hidden",transform:"rotateY(0deg)",opacity:"0.0",top:B.NOTIF_START_TOP+"px",transition:"opacity "+n+", top "+n},"#takeover.visible":{opacity:"1.0",top:B.NOTIF_TOP+"px"},"#takeover.exiting":{opacity:"0.0",top:B.NOTIF_START_TOP+"px"},"#thumbspacer":{height:B.THUMB_OFFSET+"px"},"#thumbborder-wrapper":{position:"absolute",top:-B.THUMB_BORDER_SIZE+"px",left:B.NOTIF_WIDTH/2-B.THUMB_OFFSET-B.THUMB_BORDER_SIZE+"px",width:o+"px",height:o/2+"px",overflow:"hidden"},"#thumbborder":{position:"absolute",width:o+"px",height:o+"px","border-radius":o+"px","background-color":this.style_vals.bg_actions,opacity:"0.5"},"#thumbnail":{position:"absolute",top:"0px",left:B.NOTIF_WIDTH/2-B.THUMB_OFFSET+"px",width:B.THUMB_IMG_SIZE+"px",height:B.THUMB_IMG_SIZE+"px",overflow:"hidden","z-index":"100","border-radius":B.THUMB_IMG_SIZE+"px"},"#mini":{position:"absolute",right:"20px",top:B.NOTIF_TOP+"px",width:this.notif_width+"px",height:2*B.NOTIF_HEIGHT_MINI+"px","margin-top":20-B.NOTIF_HEIGHT_MINI+"px","backface-visibility":"hidden",opacity:"0.0",transform:"rotateX(90deg)",transition:"opacity 0.3s, transform 0.3s, right 0.3s"},"#mini.visible":{opacity:"1.0",transform:"rotateX(0deg)"},"#mini.exiting":{opacity:"0.0",right:"-150px"},"#mainbox":{"border-radius":"4px","box-shadow":e,"text-align":"center","background-color":this.style_vals.bg,"font-size":"14px",color:this.style_vals.text_main},"#mini #mainbox":{height:B.NOTIF_HEIGHT_MINI+"px","margin-top":B.NOTIF_HEIGHT_MINI+"px","border-radius":"3px",transition:"background-color "+n},"#mini-border":{height:B.NOTIF_HEIGHT_MINI+6+"px",width:B.NOTIF_WIDTH_MINI+6+"px",position:"absolute",top:"-3px",left:"-3px","margin-top":B.NOTIF_HEIGHT_MINI+"px","border-radius":"6px",opacity:"0.25","background-color":"#fff","z-index":"-1","box-shadow":i},"#mini-icon":{position:"relative",display:"inline-block",width:"75px",height:B.NOTIF_HEIGHT_MINI+"px","border-radius":"3px 0 0 3px","background-color":this.style_vals.bg_actions,background:"linear-gradient(135deg, "+this.style_vals.bg_light+" 0%, "+this.style_vals.bg_actions+" 100%)",transition:"background-color "+n},"#mini:hover #mini-icon":{"background-color":this.style_vals.mini_hover},"#mini:hover #mainbox":{"background-color":this.style_vals.mini_hover},"#mini-icon-img":{position:"absolute","background-image":"url("+this.thumb_image_url+")",width:"48px",height:"48px",top:"20px",left:"12px"},"#content":{padding:"30px 20px 0px 20px"},"#mini-content":{"text-align":"left",height:B.NOTIF_HEIGHT_MINI+"px",cursor:"pointer"},"#img":{width:"328px","margin-top":"30px","border-radius":"5px"},"#title":{"max-height":"600px",overflow:"hidden","word-wrap":"break-word",padding:"25px 0px 20px 0px","font-size":"19px","font-weight":"bold",color:this.style_vals.text_title},"#body":{"max-height":"600px","margin-bottom":"25px",overflow:"hidden","word-wrap":"break-word","line-height":"21px","font-size":"15px","font-weight":"normal","text-align":"left"},"#mini #body":{display:"inline-block","max-width":"250px",margin:"0 0 0 30px",height:B.NOTIF_HEIGHT_MINI+"px","font-size":"16px","letter-spacing":"0.8px",color:this.style_vals.text_title},"#mini #body-text":{display:"table",height:B.NOTIF_HEIGHT_MINI+"px"},"#mini #body-text div":{display:"table-cell","vertical-align":"middle"},"#tagline":{"margin-bottom":"15px","font-size":"10px","font-weight":"600","letter-spacing":"0.8px",color:"#ccd7e0","text-align":"left"},"#tagline a":{color:this.style_vals.text_tagline,transition:"color "+n},"#tagline a:hover":{color:this.style_vals.text_hover},"#cancel":{position:"absolute",right:"0",width:"8px",height:"8px",padding:"10px","border-radius":"20px",margin:"12px 12px 0 0","box-sizing":"content-box",cursor:"pointer",transition:"background-color "+n},"#mini #cancel":{margin:"7px 7px 0 0"},"#cancel-icon":{width:"8px",height:"8px",overflow:"hidden","background-image":"url(//cdn.mxpnl.com/site_media/images/icons/notifications/cancel-x.png)",opacity:this.style_vals.cancel_opacity},"#cancel:hover":{"background-color":this.style_vals.bg_hover},"#button":{display:"block",height:"60px","line-height":"60px","text-align":"center","background-color":this.style_vals.bg_actions,"border-radius":"0 0 4px 4px",overflow:"hidden",cursor:"pointer",transition:"background-color "+n},"#button-close":{display:"inline-block",width:"9px",height:"60px","margin-right":"8px","vertical-align":"top","background-image":"url(//cdn.mxpnl.com/site_media/images/icons/notifications/close-x-"+this.style+".png)","background-repeat":"no-repeat","background-position":"0px 25px"},"#button-play":{display:"inline-block",width:"30px",height:"60px","margin-left":"15px","background-image":"url(//cdn.mxpnl.com/site_media/images/icons/notifications/play-"+this.style+"-small.png)","background-repeat":"no-repeat","background-position":"0px 15px"},"a#button-link":{display:"inline-block","vertical-align":"top","text-align":"center","font-size":"17px","font-weight":"bold",overflow:"hidden","word-wrap":"break-word",color:this.style_vals.text_title,transition:"color "+n},"#button:hover":{"background-color":this.style_vals.bg_hover,color:this.style_vals.text_hover},"#button:hover a":{color:this.style_vals.text_hover},"#video-noflip":{position:"relative",top:2*-this.video_height+"px"},"#video-flip":{"backface-visibility":"hidden",transform:"rotateY(180deg)"},"#video":{position:"absolute",width:this.video_width-1+"px",height:this.video_height+"px",top:B.NOTIF_TOP+"px","margin-top":"100px",left:"50%","margin-left":Math.round(-this.video_width/2)+"px",overflow:"hidden","border-radius":"5px","box-shadow":t,transform:"translateZ(1px)",transition:"opacity "+n+", top "+n},"#video.exiting":{opacity:"0.0",top:this.video_height+"px"},"#video-holder":{position:"absolute",width:this.video_width-1+"px",height:this.video_height+"px",overflow:"hidden","border-radius":"5px"},"#video-frame":{"margin-left":"-1px",width:this.video_width+"px"},"#video-controls":{opacity:"0",transition:"opacity 0.5s"},"#video:hover #video-controls":{opacity:"1.0"},"#video .video-progress-el":{position:"absolute",bottom:"0",height:"25px","border-radius":"0 0 0 5px"},"#video-progress":{width:"90%"},"#video-progress-total":{width:"100%","background-color":this.style_vals.bg,opacity:"0.7"},"#video-elapsed":{width:"0","background-color":"#6cb6f5",opacity:"0.9"},"#video #video-time":{width:"10%",right:"0","font-size":"11px","line-height":"25px",color:this.style_vals.text_main,"background-color":"#666","border-radius":"0 0 5px 0"}};this._browser_lte("ie",8)&&b.extend(s,{"* html #overlay":{position:"absolute"},"* html #bg":{position:"absolute"},"html, body":{height:"100%"}}),this._browser_lte("ie",7)&&b.extend(s,{"#mini #body":{display:"inline",zoom:"1",border:"1px solid "+this.style_vals.bg_hover},"#mini #body-text":{padding:"20px"},"#mini #mini-icon":{display:"none"}});var a=["backface-visibility","border-radius","box-shadow","opacity","perspective","transform","transform-style","transition"],c=["khtml","moz","ms","o","webkit"];for(var p in s)for(var l=0;l<a.length;l++){var d=a[l];if(d in s[p])for(var _=s[p][d],u=0;u<c.length;u++)s[p]["-"+c[u]+"-"+d]=_}!function(e,t){var i=function(e){var t="";for(var i in e){t+="\n"+i.replace(/#/g,"#"+B.MARKUP_PREFIX+"-").replace(/\./g,"."+B.MARKUP_PREFIX+"-")+" {";var o=e[i];for(var n in o)t+=n+":"+o[n]+";";t+="}"}return t},o=i(e)+function(e){var t="";for(var o in e)t+="\n"+o+" {"+i(e[o])+"\n}";return t}(t),n=document.head||document.getElementsByTagName("head")[0]||document.documentElement,r=document.createElement("style");n.appendChild(r),r.setAttribute("type","text/css"),r.styleSheet?r.styleSheet.cssText=o:r.textContent=o}(s,r)},B.prototype._init_video=b.safewrap(function(){if(this.video_url){var e=this;e.yt_custom="postMessage"in window,e.dest_url=e.video_url;var t=e.video_url.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i),i=e.video_url.match(/vimeo\.com\/.*?(\d+)/i);if(t){if(e.show_video=!0,e.youtube_video=t[1],e.yt_custom){window.onYouTubeIframeAPIReady=function(){e._get_el("video-frame")&&e._yt_video_ready()};var o=document.createElement("script");o.src="//www.youtube.com/iframe_api";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(o,n)}}else i&&(e.show_video=!0,e.vimeo_video=i[1]);(e._browser_lte("ie",7)||e._browser_lte("firefox",3))&&(e.show_video=!1,e.clickthrough=!0)}}),B.prototype._mark_as_shown=b.safewrap(function(){var e=this;b.register_event(e._get_el("bg"),"click",function(){e.dismiss()});var t=function(e,t){var i={};return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,null):e.currentStyle&&(i=e.currentStyle),i[t]};if(this.campaign_id){var i=this._get_el("overlay");i&&"hidden"!==t(i,"visibility")&&"none"!==t(i,"display")&&this._mark_delivery()}}),B.prototype._mark_delivery=b.safewrap(function(e){this.marked_as_shown||(this.marked_as_shown=!0,this.campaign_id&&(this._get_shown_campaigns()[this.campaign_id]=1*new Date,this.persistence.save()),this._track_event("$campaign_delivery",e),this.mixpanel.people.append({$campaigns:this.campaign_id,$notifications:{campaign_id:this.campaign_id,message_id:this.message_id,type:"web",time:new Date}}))}),B.prototype._preload_images=function(e){var t=this;if(0===this.imgs_to_preload.length)return void e();for(var i=0,o=[],n=function(){++i===t.imgs_to_preload.length&&e&&(e(),e=null)},r=0;r<this.imgs_to_preload.length;r++){var s=new Image;s.onload=n,s.src=this.imgs_to_preload[r],s.complete&&n(),o.push(s)}this._browser_lte("ie",7)&&setTimeout(function(){var t=!0;for(r=0;r<o.length;r++)o[r].complete||(t=!1);t&&e&&(e(),e=null)},500)},B.prototype._remove_notification_el=b.safewrap(function(){window.clearInterval(this._video_progress_checker),this.notification_el.style.visibility="hidden",this.body_el.removeChild(this.notification_el)}),B.prototype._set_client_config=function(){var e=function(e){var t=navigator.userAgent.match(e);return t&&t[1]};this.browser_versions={},this.browser_versions.chrome=e(/Chrome\/(\d+)/),this.browser_versions.firefox=e(/Firefox\/(\d+)/),this.browser_versions.ie=e(/MSIE (\d+).+/),!this.browser_versions.ie&&!window.ActiveXObject&&"ActiveXObject"in window&&(this.browser_versions.ie=11),this.body_el=document.body||document.getElementsByTagName("body")[0],this.body_el&&(this.doc_width=Math.max(this.body_el.scrollWidth,document.documentElement.scrollWidth,this.body_el.offsetWidth,document.documentElement.offsetWidth,this.body_el.clientWidth,document.documentElement.clientWidth),this.doc_height=Math.max(this.body_el.scrollHeight,document.documentElement.scrollHeight,this.body_el.offsetHeight,document.documentElement.offsetHeight,this.body_el.clientHeight,document.documentElement.clientHeight));var t=this.browser_versions.ie,i=document.createElement("div").style,o=function(e){if(e in i)return!0;if(!t){e=e[0].toUpperCase()+e.slice(1);for(var o=["O"+e,"Webkit"+e,"Moz"+e],n=0;n<o.length;n++)if(o[n]in i)return!0}return!1};this.use_transitions=this.body_el&&o("transition")&&o("transform"),this.flip_animate=(this.browser_versions.chrome>=33||this.browser_versions.firefox>=15)&&this.body_el&&o("backfaceVisibility")&&o("perspective")&&o("transform")},B.prototype._switch_to_video=b.safewrap(function(){var e=this,t=[{el:e._get_notification_display_el(),attr:"opacity",start:1,goal:0},{el:e._get_notification_display_el(),attr:"top",start:B.NOTIF_TOP,goal:-500},{el:e._get_el("video-noflip"),attr:"opacity",start:0,goal:1},{el:e._get_el("video-noflip"),attr:"top",start:2*-e.video_height,goal:0}];if(e.mini){var i=e._get_el("bg"),o=e._get_el("overlay");i.style.width="100%",i.style.height="100%",o.style.width="100%",e._add_class(e._get_notification_display_el(),"exiting"),e._add_class(i,"visible"),t.push({el:e._get_el("bg"),attr:"opacity",start:0,goal:B.BG_OPACITY})}e._get_el("video-holder").innerHTML=e.video_iframe;var n=function(){window.YT&&window.YT.loaded&&e._yt_video_ready(),e.showing_video=!0,e._get_notification_display_el().style.visibility="hidden"};e.flip_animate?(e._add_class("flipper","flipped"),setTimeout(n,B.ANIM_TIME)):e._animate_els(t,B.ANIM_TIME,n)}),B.prototype._track_event=function(e,t,i){this.campaign_id?(t=t||{},t=b.extend(t,{campaign_id:this.campaign_id,message_id:this.message_id,message_type:"web_inapp",message_subtype:this.notif_type}),this.mixpanel.track(e,t,i)):i&&i.call()},B.prototype._yt_video_ready=b.safewrap(function(){var e=this;if(!e.video_inited){e.video_inited=!0;var t=e._get_el("video-elapsed"),i=e._get_el("video-time"),o=e._get_el("video-progress");new window.YT.Player(B.MARKUP_PREFIX+"-video-frame",{events:{onReady:function(n){var r=n.target,s=r.getDuration(),a=function(e){return("00"+e).slice(-2)},c=function(e){var t=Math.round(s-e),o=Math.floor(t/60),n=Math.floor(o/60);t-=60*o,o-=60*n,i.innerHTML="-"+(n?n+":":"")+a(o)+":"+a(t)};c(0),e._video_progress_checker=window.setInterval(function(){var e=r.getCurrentTime();t.style.width=e/s*100+"%",c(e)},250),b.register_event(o,"click",function(e){var t=Math.max(0,e.pageX-o.getBoundingClientRect().left);r.seekTo(s*t/o.clientWidth,!0)})}}})}}),D.prototype.init=D.prototype.init,D.prototype.reset=D.prototype.reset,D.prototype.disable=D.prototype.disable,D.prototype.time_event=D.prototype.time_event,D.prototype.track=D.prototype.track,D.prototype.track_links=D.prototype.track_links,D.prototype.track_forms=D.prototype.track_forms,D.prototype.track_pageview=D.prototype.track_pageview,D.prototype.register=D.prototype.register,D.prototype.register_once=D.prototype.register_once,D.prototype.unregister=D.prototype.unregister,D.prototype.identify=D.prototype.identify,D.prototype.alias=D.prototype.alias,D.prototype.name_tag=D.prototype.name_tag,D.prototype.set_config=D.prototype.set_config,D.prototype.get_config=D.prototype.get_config,D.prototype.get_property=D.prototype.get_property,D.prototype.get_distinct_id=D.prototype.get_distinct_id,D.prototype.toString=D.prototype.toString,D.prototype._check_and_handle_notifications=D.prototype._check_and_handle_notifications,D.prototype._show_notification=D.prototype._show_notification,U.prototype.properties=U.prototype.properties,U.prototype.update_search_keyword=U.prototype.update_search_keyword,U.prototype.update_referrer_info=U.prototype.update_referrer_info,U.prototype.get_cross_subdomain=U.prototype.get_cross_subdomain,U.prototype.clear=U.prototype.clear,C.prototype.set=C.prototype.set,C.prototype.set_once=C.prototype.set_once,C.prototype.increment=C.prototype.increment,C.prototype.append=C.prototype.append,C.prototype.union=C.prototype.union,C.prototype.track_charge=C.prototype.track_charge,C.prototype.clear_charges=C.prototype.clear_charges,C.prototype.delete_user=C.prototype.delete_user,C.prototype.toString=C.prototype.toString,b.safewrap_class(D,["identify","_check_and_handle_notifications","_show_notification"]);var q={},j=function(){b.each(q,function(e,t){"mixpanel"!==t&&(I[t]=e)}),I._=b},R=function(){I.init=function(e,t,i){if(i)return I[i]||(I[i]=q[i]=H(e,t,i),I[i]._loaded()),I[i];var o=I;q.mixpanel?o=q.mixpanel:e&&(o=H(e,t,"mixpanel"),o._loaded(),q.mixpanel=o),I=o,1===k&&(window.mixpanel=I),j()}},L=function(){function e(){e.done||(e.done=!0,P=!0,S=!1,b.each(q,function(e){e._dom_loaded()}))}function t(){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}if(document.addEventListener)"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",e);var i=!1;try{i=null===window.frameElement}catch(e){}document.documentElement.doScroll&&i&&t()}b.register_event(window,"load",e,!0)},G=function(e){var t=e.get_config("name");e.mp_counts=e.mp_counts||{},e.mp_counts.$__c=parseInt(b.cookie.get("mp_"+t+"__c"))||0;var i=function(){e.mp_counts.$__c=(e.mp_counts.$__c||0)+1,b.cookie.set("mp_"+t+"__c",e.mp_counts.$__c,1,!0)},o=function(){try{e.mp_counts=e.mp_counts||{},i()}catch(e){w.error(e)}};b.register_event(document,"submit",o),b.register_event(document,"change",o);var n=null;b.register_event(document,"mousedown",function(e){n=e.target}),b.register_event(document,"mouseup",function(e){e.target===n&&o()})},z=function(){return k=T,I=new D,R(),I.init(),L(),I}();e.exports=z}}); |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.