text: /*!
   * 24/7 Customer, Inc. Confidential, Do Not Distribute. This is an
   * unpublished, proprietary work which is fully protected under
   * copyright law. This code may only be used pursuant to a valid
   * license from 24/7 Customer, Inc.
   */
  function $A(a){if(!a)return[];var b=a.length||0,c=new Array(b);while(b--)c[b]=a[b];return c}function $w(a){return typeof a!="string"?[]:(a=a.replace(/^\s+/,"").replace(/\s+$/,""),a?a.split(/\s+/):[])}function $(a){if(arguments.length>1){for(var b=0,c=[],d=arguments.length;b<d;b++)c.push($(arguments[b]));return c}return typeof a=="string"&&(a=document.getElementById(a)),Element.extend(a)}function $H(a){return new Hash(a)}function $undefined(a){return Object.isUndefined(a)}function $undefinedOrNull(a){return SN.Utils.isUndefinedOrNull(a)}function $isArray(a){return Object.isArray(a)}function $isNumber(a){return Object.isNumber(a)}function $isFunction(a){return Object.isFunction(a)}function $isString(a){return Object.isString(a)}function $isEmpty(a){return SN.Utils.isEmpty(a)}function $isEmptyObject(a){return SN.Utils.isEmptyObject(a)}function $mergeObjects(a,b){return SN.Utils.mergeObjects(a,b)}function $sizeOfObject(a){return Object.keys(a).length}function $startsWith(a,b){return SN.Utils.patternMatch(a,b+".*")}function $endsWith(a,b){return SN.Utils.patternMatch(a,".*"+b)}function $contains(a,b){return SN.Utils.patternMatch(a,".*"+b+".*")}function $patternMatch(a,b){return SN.Utils.patternMatch(a,b)}function $appendHTMLTag(a,b,c,d){return SN.Utils.appendHTMLTag(a,b,c,d)}function $timeOnSite(){return SN.Utils.getTimeOnSite()}function $averageTimeOnPage(){return SN.Utils.getAverageTimeOnPage()}function $isRepeatVisitor(){var a=SN.Constants,b=SN.StoreManager.getValueFromStore(a.SN_VI_STORE_NAME,SN.Constants.PREVIOUS_ACTIVE_SESSION_TIME);if($undefinedOrNull(b))return!1;var c=(new Date).getTime(),d=c-b;return d<SN.ConfigurationManager.getRepeatVisitorLifetime()?!0:!1}function $getMetaTagInformation(a){var b=parent.document.getElementsByTagName("meta");for(var c=0;c<b.length;c++)try{if(b[c].name&&b[c].name==a||b[c]["http=equiv"]&&b[c]["http=equiv"]==a)return b[c].content}catch(d){SN.Utils.error("Unable to capture the metatag value",d)}return null}function $getActiveSessionStartTime(){return SN.StoreManager.getValueFromStore(SN.Constants.SN_VI_STORE_NAME,SN.Constants.ACTIVE_SESSION_START_TIME)}function $getPreviousActiveSessionStartTime(){return SN.StoreManager.getValueFromStore(SN.Constants.SN_VI_STORE_NAME,SN.Constants.PREVIOUS_ACTIVE_SESSION_TIME)}function $getClientTimeStamp(){return SN.Utils.getClientTimeStamp()}function $getClientTimeZoneOffsetInMilliSeconds(){return SN.Utils.getClientTimeZoneOffsetInMilliSeconds()}function $getGeoPrivateIp(){return SN.Utils.getGeoPrivateIp()}function $getGeoLatitudeBrowser(){return SN.Utils.getGeo_BrowserValueOf("lat")}function $getGeoLongitudeBrowser(){return SN.Utils.getGeo_BrowserValueOf("long")}function $getGeoBrowserLocationError(){var a=SN.Utils.getGeo_BrowserValueOf("err");return a=="null"?"":a}function $storeInitialReferrer(a){SN.Utils.storeInitialReferrer(a)}function $getInitialReferrer(){return SN.Utils.getInitialReferrer()}function $matchPatternsArray(a,b){return SN.Utils.matchPatternsArray(a,b)}function $matchPatternsMap(a,b){return SN.Utils.matchPatternsMap(a,b)}function $getType(a){return SN.Utils.getType(a)}function $geoCountry(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.country}function $geoCity(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.city}function $geoRegion(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.region}function $geoPostalCode(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.zipcode}function $geoLatitude(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.lat}function $geoLongitude(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.lon}function $geoMetro(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.metro}function $geoArea(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.area}function $geoIsp(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.isp))return;return a.isp.name}function $geoIPAddress(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.isp))return;return a.isp.ip}function $geoOrganization(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.isp))return;return a.isp.org}function $geoCountryCode(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.location))return;return a.location.countryCode}function $geoBandwidth(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.isp))return;return a.isp.bandwidth}function $geoHost(){var a=SN.ConfigurationManager.getGeoInfo();if($undefinedOrNull(a)||$undefinedOrNull(a.isp))return;return a.isp.hostname}function $formattedGeo(){var a={loc:[$geoLongitude(),$geoLatitude()],co:$geoCountry(),cc:$geoCountryCode(),ct:$geoCity(),wr:$geoRegion(),isp:$geoIsp(),ip:$geoIPAddress(),org:$geoOrganization(),zip:$geoPostalCode()};return parent.SN.Conf.browserGeoLocationFlag?(a.lt="b",$getGeoBrowserLocationError().length!=2?a.loc=[parseFloat($getGeoLongitudeBrowser()),parseFloat($getGeoLatitudeBrowser())]:(a.le=$getGeoBrowserLocationError(),a.lt="s",a.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())])):(a.lt="s",a.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())]),a}function $cookieExists(a){var b=new SN.CookieManager;return!$undefinedOrNull(b.readCookie(a))}function $cookieGet(a){var b=new SN.CookieManager;return b.readCookie(a)}function $cookieSet(a,b,c){var d=new SN.CookieManager;return d.createCookie(a,b,c)}function $onGetDataFromServer(a,b){SN.ServerStoremanager.onGetDataFromServer(a,b)}function $getData(a){return SN.StoreManager.getValueFromStore("sn.vc",a)}function $setData(a,b,c){c?SN.StoreManager.updateDataInVC(a,b):SN.StoreManager.setValueInStore("sn.vc",a,b)}function $removeData(a){SN.StoreManager.deleteValueFromStore("sn.vc",a)}function $setEvalTestConditionsInStore(a){SN.StoreManager.setEvalTestConditionsInStore(a)}function $lastExitLink(){return SN.ExitHistory.getLastExitLink()}function $keepAliveActiveSession(){SN.SessionManager.getGlobalSession().keepAliveActiveSession()}function $activeSessionId(){return SN.SessionManager.getGlobalSession().getActiveSessionId()}function $activeSessionCount(){return SN.SessionManager.getGlobalSession().getActiveSessionId()}function $proactiveInviteCountOnPage(){return SN.PreconditionVariables.proactiveInviteCountOnPage()}function $proactiveInviteCountInSession(){return SN.PreconditionVariables.proactiveInviteCountInSession()}function $isButtonShown(){return SN.PreconditionVariables.isButtonShown()}function $isProactiveInviteActive(){return SN.PreconditionVariables.isProactiveInviteActive()}function $timeSinceLastProactiveInvite(){return SN.PreconditionVariables.timeSinceLastProactiveInvite()}function $numberOfPagesVisited(){return SN.PreconditionVariables.numberOfPagesVisited()}var Prototype={Browser:function(){var a=navigator.userAgent,b=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!b,Opera:b,WebKit:a.indexOf("AppleWebKit/")>-1,Gecko:a.indexOf("Gecko")>-1&&a.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(a)}}(),BrowserFeatures:{ElementExtensions:function(){var a=window.Element||window.HTMLElement;return!!a&&!!a.prototype}(),SpecificElementExtensions:function(){if(typeof window.HTMLDivElement!="undefined")return!0;var a=document.createElement("div"),b=document.createElement("form"),c=!1;return a.__proto__&&a.__proto__!==b.__proto__&&(c=!0),a=b=null,c}()},emptyFunction:function(){},K:function(a){return a}},Class=function(){function a(){}function b(){function d(){this.initialize.apply(this,arguments)}var b=null,c=$A(arguments);Object.isFunction(c[0])&&(b=c.shift()),Object.extend(d,Class.Methods),d.superclass=b,d.subclasses=[],b&&(a.prototype=b.prototype,d.prototype=new a,b.subclasses.push(d));for(var e=0;e<c.length;e++)d.addMethods(c[e]);return d.prototype.initialize||(d.prototype.initialize=Prototype.emptyFunction),d.prototype.constructor=d,d}function c(a){var b=this.superclass&&this.superclass.prototype,c=Object.keys(a);Object.keys({toString:!0}).length||(a.toString!=Object.prototype.toString&&c.push("toString"),a.valueOf!=Object.prototype.valueOf&&c.push("valueOf"));for(var d=0,e=c.length;d<e;d++){var f=c[d],g=a[f];if(b&&Object.isFunction(g)&&g.argumentNames().first()=="$super"){var h=g;g=function(a){return function(){return b[a].apply(this,arguments)}}(f).wrap(h),g.valueOf=h.valueOf.bind(h),g.toString=h.toString.bind(h)}this.prototype[f]=g}return this}return{create:b,Methods:{addMethods:c}}}(),JSON;(function(){function extend(a,b){for(var c in b)a[c]=b[c];return a}function clone(a){return extend({},a)}function isElement(a){return!!a&&a.nodeType==1}function isArray(a){return _toString.call(a)=="[object Array]"}function isHash(a){return a instanceof Hash}function isFunction(a){return typeof a=="function"}function isString(a){return _toString.call(a)=="[object String]"}function isNumber(a){return _toString.call(a)=="[object Number]"}function isUndefined(a){return typeof a=="undefined"}function keys(a){var b=[];for(var c in a)b.push(c);return b}var _toString=Object.prototype.toString;JSON=function(){function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";return e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g,e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));return e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g,e}}function stringify(a,b,c){var d;gap="",indent="";if(a!=null&&typeof a=="object"&&typeof a.length=="number")return a.toJSON();if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(!b||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return str("",{"":a});throw new Error("JSON.stringify")}function parse(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;return JSON&&JSON.stringify&&JSON.parse?{stringify:JSON.stringify,parse:JSON.parse}:{stringify:stringify,parse:parse}}(),extend(Object,{keys:keys,extend:extend,isElement:isElement,isUndefined:isUndefined,isNumber:isNumber,isString:isString,isArray:isArray,isHash:isHash,isFunction:isFunction,clone:clone,toJSON:JSON.stringify})})(),Object.extend(Function.prototype,function(){function b(a,b){var c=a.length,d=b.length;while(d--)a[c+d]=b[d];return a}function c(c,d){return c=a.call(c,0),b(c,d)}function d(){var a=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return a.length==1&&!a[0]?[]:a}function e(){if(!arguments.length)return this;var b=this,d=a.call(arguments,0);return function(){var a=c(d,arguments);return b.apply(this,a)}}function f(b){if(arguments.length<2&&typeof arguments[0]=="undefined")return this;var d=this,e=a.call(arguments,1);return function(){var a=c(e,arguments);return d.apply(b,a)}}function g(c){var d=this,e=a.call(arguments,1);return function(a){var f=b([a||window.event],e);return d.apply(c,f)}}function h(){if(this._methodized)return this._methodized;var a=this;return this._methodized=function(){var c=b([this],arguments);return a.apply(null,c)}}var a=Array.prototype.slice;return{argumentNames:d,bind:f,bindAsEventListener:g,methodize:h,curry:e}}()),Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'},RegExp.prototype.match=RegExp.prototype.test,RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}}),Object.extend(String.prototype,function(){function inspect(a){var b=this.replace(/[\x00-\x1f\\]/g,function(a){return a in String.specialChar?String.specialChar[a]:"\\u00"+a.charCodeAt().toPaddedString(2,16)});return a?'"'+b.replace(/"/g,'\\"')+'"':"'"+b.replace(/'/g,"\\'")+"'"}function toJSON(){return this.inspect(!0)}function unfilterJSON(a){return this.replace(a||Prototype.JSONFilter,"$1")}function isJSON(){var a=this;return a==""?!1:(a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""),/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(a))}function evalJSON(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON())return eval("("+json+")")}catch(e){throw new SyntaxError("Badly formed JSON string: "+this.inspect())}}function camelize(){return this.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})}function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}return{toJSON:toJSON,isJSON:isJSON,evalJSON:evalJSON,unfilterJSON:unfilterJSON,inspect:inspect,camelize:camelize,capitalize:capitalize}}());var $break={},Enumerable=function(){function a(a,b){var c=0;try{this._each(function(d){a.call(b,d,c++)})}catch(d){if(d!=$break)throw d}return this}function b(a,b){var c;return this.each(function(d,e){if(a.call(b,d,e))throw c=d,$break}),c}function c(a,b){var c=[];return this.each(function(d,e){a.call(b,d,e)&&c.push(d)}),c}function d(a,b,c){return this.each(function(d,e){a=b.call(c,a,d,e)}),a}function e(a){if(Object.isFunction(this.indexOf)&&this.indexOf(a)!=-1)return!0;var b=!1;return this.each(function(c){if(c==a)throw b=!0,$break}),b}function f(a){var b=[];return this.each(function(c){b.push(c[a])}),b}return{each:a,inject:d,pluck:f,include:e,find:b,detect:b,select:c}}();Array.from=$A,function(){function d(a){return(a!==!1?this:this.toArray())._reverse()}function e(a){for(var b=0,c=this.length;b<c;b++)a(this[b])}function f(a,b){b||(b=0);var c=this.length;b<0&&(b=c+b);for(;b<c;b++)if(this[b]===a)return b;return-1}function g(){var a=b.call(arguments,0);return this.select(function(b){return a.indexOf(b)==-1})}function h(a,b){b=isNaN(b)?this.length:(b<0?this.length+b:b)+1;var c=this.slice(0,b).reverse().indexOf(a);return c<0?c:b-c-1}var a=Array.prototype,b=a.slice,c=a.forEach;c||(c=e),Object.extend(a,Enumerable),a._reverse||(a._reverse=a.reverse),Object.extend(a,{_each:c,reverse:d,without:g}),a.indexOf||(a.indexOf=f),a.lastIndexOf||(a.lastIndexOf=h)}();var Hash=Class.create(Enumerable,function(){function a(a){this._object=Object.isHash(a)?a.toObject():Object.clone(a)}function b(a){for(var b in this._object){var c=this._object[b],d=[b,c];d.key=b,d.value=c,a(d)}}function c(a,b){return this._object[a]=b}function d(a){if(this._object[a]!==Object.prototype[a])return this._object[a]}function e(){return Object.clone(this._object)}function f(){return new Hash(this)}return{initialize:a,_each:b,set:c,get:d,toJSON:JSON.stringify,clone:f}}());Hash.from=$H,Object.extend(Number.prototype,function(){function a(a,b){var c=this.toString(b||10),d="";for(;d.length<a-c.length;d+="0");return d+c}return{toPaddedString:a,toJSON:JSON.stringify}}());var ObjectRange=Class.create(Enumerable,function(){function a(a,b,c){this.start=a,this.end=b,this.exclusive=c}function b(a){var b=this.start;while(this.include(b))a(b),b=b.succ()}function c(a){return a<this.start?!1:this.exclusive?a<this.end:a<=this.end}return{initialize:a,_each:b,include:c}}());if(!window.Node)var Node={};Node.ELEMENT_NODE||Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}),function(a){var b=function(){var a=document.createElement("form"),b=document.createElement("input"),c=document.documentElement;b.setAttribute("name","test"),a.appendChild(b),c.appendChild(a);var d=a.elements?typeof a.elements.test=="undefined":null;return c.removeChild(a),a=b=null,d}(),c=a.Element;a.Element=function(a,c){c=c||{},a=a.toLowerCase();var d=Element.cache;return b&&c.name?(a="<"+a+' name="'+c.name+'">',delete c.name,Element.writeAttribute(document.createElement(a),c)):(d[a]||(d[a]=Element.extend(document.createElement(a))),Element.writeAttribute(d[a].cloneNode(!1),c))},Object.extend(a.Element,c||{}),c&&(a.Element.prototype=c.prototype)}(this),Element.cache={},Element.idCounter=1,Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){return a=$(a),Element[Element.visible(a)?"hide":"show"](a),a},hide:function(a){return a=$(a),a.style.display="none",a},show:function(a){return a=$(a),a.style.display="",a},remove:function(a){return a=$(a),a.parentNode.removeChild(a),a},insert:function(a,b){a=$(a);if((typeof b).match(/(number|string)/)!=null||Object.isElement(b)||b&&(b.toElement||b.toHTML))b={bottom:b};var c,d,e,f;for(var g in b){c=b[g],g=g.toLowerCase(),d=Element._insertionTranslations[g];if(Object.isElement(c)){d(a,c);continue}c=String(c)||"",e=(g=="before"||g=="after"?a.parentNode:a).tagName.toUpperCase(),f=Element._getContentFromAnonymousElement(e,c),(g=="top"||g=="after")&&f.reverse(),f.forEach(d.curry(a))}return a},writeAttribute:function(a,b,c){a=$(a);var d={},e=Element._attributeTranslations.write;typeof b=="object"?d=b:d[b]=Object.isUndefined(c)?!0:c;for(var f in d)b=e.names[f]||f,c=d[f],e.values[f]&&(b=e.values[f](a,c)),c===!1||c===null?a.removeAttribute(b):c===!0?a.setAttribute(b,b):a.setAttribute(b,c);return a},getHeight:function(a){return Element.getDimensions(a).height},getWidth:function(a){return Element.getDimensions(a).width},hasClassName:function(a,b){if(!(a=$(a)))return;var c=a.className;return c.length>0&&(c==b||(new RegExp("(^|\\s)"+b+"(\\s|$)")).test(c))},addClassName:function(a,b){if(!(a=$(a)))return;return Element.hasClassName(a,b)||(a.className+=(a.className?" ":"")+b),a},removeClassName:function(a,b){if(!(a=$(a)))return;return a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip(),a},toggleClassName:function(a,b){if(!(a=$(a)))return;return Element[Element.hasClassName(a,b)?"removeClassName":"addClassName"](a,b)},empty:function(a){return $(a).innerHTML==""},scrollTo:function(a){a=$(a);var b=Element.cumulativeOffset(a);return window.scrollTo(b[0],b[1]),a},getStyle:function(a,b){a=$(a),b=b=="float"?"cssFloat":b.camelize();var c=a.style[b];if(!c||c=="auto"){var d=document.defaultView.getComputedStyle(a,null);c=d?d[b]:null}return b=="opacity"?c?parseFloat(c):1:c=="auto"?null:c},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(a,b){a=$(a);var c=a.style,d;if(Object.isString(b))return a.style.cssText+=";"+b,b.indexOf("opacity")>-1?a.setOpacity(b.match(/opacity:\s*(\d?\.?\d*)/)[1]):a;for(var e in b)e=="opacity"?a.setOpacity(b[e]):c[e=="float"||e=="cssFloat"?Object.isUndefined(c.styleFloat)?"cssFloat":"styleFloat":e]=b[e];return a},setOpacity:function(a,b){return a=$(a),a.style.opacity=b==1||b===""?"":b<1e-5?0:b,a},getDimensions:function(a){a=$(a);var b=Element.getStyle(a,"display");if(b!="none"&&b!=null)return{width:a.offsetWidth,height:a.offsetHeight};var c=a.style,d=c.visibility,e=c.position,f=c.display;c.visibility="hidden",e!="fixed"&&(c.position="absolute"),c.display="block";var g=a.clientWidth,h=a.clientHeight;return c.display=f,c.position=e,c.visibility=d,{width:g,height:h}},cumulativeOffset:function(a){var b=0,c=0;do b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent;while(a);return Element._returnOffset(c,b)}},Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}},Element._returnOffset=function(a,b){var c=[a,b];return c.left=a,c.top=b,c},Element._getContentFromAnonymousElement=function(a,b){var c=new Element("div"),d=Element._insertionTranslations.tags[a];return d?(c.innerHTML=d[0]+b+d[1],d[2].times(function(){c=c.firstChild})):c.innerHTML=b,$A(c.childNodes)};var _T_="<table><tbody>",__T_="</tbody></table>";Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:[_T_,__T_,2],TR:[_T_+"<tr>","</tr>"+__T_,3],TD:[_T_+"<tr><td>","</td></tr>"+__T_,4],SELECT:["<select>","</select>",1]}},function(){var a=Element._insertionTranslations.tags;Object.extend(a,{THEAD:a.TBODY,TFOOT:a.TBODY,TH:a.TD})}(),Object.extend(Element,Element.Methods),function(a){!Prototype.BrowserFeatures.ElementExtensions&&a.__proto__&&(window.HTMLElement={},window.HTMLElement.prototype=a.__proto__,Prototype.BrowserFeatures.ElementExtensions=!0),a=null}(document.createElement("div")),Element.extend=function(){function a(a){if(typeof window.Element!="undefined"){var b=window.Element.prototype;if(b){var c="_"+(Math.random()+"").slice(2),d=document.createElement(a);b[c]="x";var e=d[c]!=="x";return delete b[c],d=null,e}}return!1}function b(a,b){for(var c in b){var d=b[c];typeof d=="function"&&!(c in a)&&(a[c]=d.methodize())}}var c=a("object");if(Prototype.BrowserFeatures.SpecificElementExtensions)return c?function(a){if(a&&typeof a._extendedByPrototype=="undefined"){var c=a.tagName;c&&/^(?:object|applet|embed)$/i.test(c)&&b(a,Element.Methods)}return a}:Prototype.K;var d={},e=Object.extend(function(a){if(!a||typeof a._extendedByPrototype!="undefined"||a.nodeType!=1||a==window)return a;var c=Object.clone(d),e=a.tagName.toUpperCase();return b(a,c),a._extendedByPrototype=Prototype.emptyFunction,a},{refresh:function(){Prototype.BrowserFeatures.ElementExtensions||Object.extend(d,Element.Methods)}});return e.refresh(),e}(),Element.addMethods=function(a){function d(a){a=a.toUpperCase()}function e(a,b,c){c=c||!1;for(var d in a){var e=a[d];if(typeof e!="function")continue;if(!c||!(d in b))b[d]=e.methodize()}}function f(a){var b,c="Heading",d="TableSection",e={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:c,H2:c,H3:c,H4:c,H5:c,H6:c,Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:d,TFOOT:d,TBODY:d,TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};e[a]&&(b="HTML"+e[a]+"Element");if(window[b])return window[b];b="HTML"+a+"Element";if(window[b])return window[b];b="HTML"+a.capitalize()+"Element";if(window[b])return window[b];var f=document.createElement(a),g=f.__proto__||f.constructor.prototype;return f=null,g}var b=Prototype.BrowserFeatures;if(arguments.length==2){var c=a;a=arguments[1]}c?c.length!=null?c.forEach(d):d(c):Object.extend(Element.Methods,a||{});var g=window.HTMLElement?HTMLElement.prototype:Element.prototype;b.ElementExtensions&&e(Element.Methods,g),Object.extend(Element,Element.Methods),Element.extend.refresh&&Element.extend.refresh(),Element.cache={}},document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()}}},function(a){function f(){return b.WebKit&&!c.evaluate?document:b.Opera&&window.parseFloat(window.opera.version())<9.5?document.body:document.documentElement}function g(b){return d||(d=f()),e[b]="client"+b,a["get"+b]=function(){return d[e[b]]},a["get"+b]()}var b=Prototype.Browser,c=document,d,e={};a.getWidth=g.curry("Width"),a.getHeight=g.curry("Height")}(document.viewport),Element.Storage={UID:1},Element.addMethods({getStorage:function(a){if(!(a=$(a)))return;var b;return a===window?b=0:(typeof a._prototypeUID=="undefined"&&(a._prototypeUID=[Element.Storage.UID++]),b=a._prototypeUID[0]),Element.Storage[b]||(Element.Storage[b]=$H()),Element.Storage[b]},retrieve:function(a,b,c){if(!(a=$(a)))return;var d=Element.getStorage(a),e=d.get(b);return typeof e=="undefined"&&(d.set(b,c),e=c),e},clone:function(a,b){if(!(a=$(a)))return;var c=a.cloneNode(b);return Element.extend(c)}}),function(){function d(b){b=a.extend(b);var c=b.target,d=b.type,e=b.currentTarget;return e&&e.tagName&&(d==="load"||d==="error"||d==="click"&&e.tagName.toLowerCase()==="input"&&e.type==="radio")&&(c=e),c.nodeType==Node.TEXT_NODE&&(c=c.parentNode),Element.extend(c)}function e(a){return{x:f(a),y:g(a)}}function f(a){var b=document.documentElement,c=document.body||{scrollLeft:0};return a.pageX||a.clientX+(b.scrollLeft||c.scrollLeft)-(b.clientLeft||0)}function g(a){var b=document.documentElement,c=document.body||{scrollTop:0};return a.pageY||a.clientY+(b.scrollTop||c.scrollTop)-(b.clientTop||0)}function h(b){a.extend(b),b.preventDefault(),b.stopPropagation(),b.stopped=!0}function k(b,d,e){var f=Element.retrieve(b,"prototype_event_registry");Object.isUndefined(f)&&(m.push(b),f=Element.retrieve(b,"prototype_event_registry",$H()));var g=f.get(d);Object.isUndefined(g)&&(g=[],f.set(d,g));if(g.pluck("handler").include(e))return!1;var h;if(d.indexOf(":")>-1)h=function(c){if(Object.isUndefined(c.eventName))return!1;if(c.eventName!==d)return!1;a.extend(c,b),e.call(b,c)};else if(!!c||d!=="mouseenter"&&d!=="mouseleave")h=function(c){a.extend(c,b),e.call(b,c)};else if(d==="mouseenter"||d==="mouseleave")h=function(c){a.extend(c,b);var d=c.relatedTarget;while(d&&d!==b)try{d=d.parentNode}catch(f){d=b}if(d===b)return;e.call(b,c)};return h.handler=e,g.push(h),h}function l(){for(var b=0,c=m.length;b<c;b++)a.stopObserving(m[b]),m[b]=null}function o(a,b,c){a=$(a);var d=k(a,b,c);if(!d)return a;if(b.indexOf(":")>-1)a.addEventListener?a.addEventListener("dataavailable",d,!1):(a.attachEvent("ondataavailable",d),a.attachEvent("onfilterchange",d));else{var e=n(b);a.addEventListener?a.addEventListener(e,d,!1):a.attachEvent("on"+e,d)}return a}function p(a,b,c){a=$(a);var d=Element.retrieve(a,"prototype_event_registry");if(Object.isUndefined(d))return a;if(b&&!c){var e=d.get(b);return Object.isUndefined(e)?a:(e.each(function(c){Element.stopObserving(a,b,c.handler)}),a)}if(!b)return d.each(function(b){var c=b.key,d=b.value;d.each(function(b){Element.stopObserving(a,c,b.handler)})}),a;var e=d.get(b);if(!e)return;var f=e.find(function(a){return a.handler===c});if(!f)return a;var g=n(b);return b.indexOf(":")>-1?a.removeEventListener?a.removeEventListener("dataavailable",f,!1):(a.detachEvent("ondataavailable",f),a.detachEvent("onfilterchange",f)):a.removeEventListener?a.removeEventListener(g,f,!1):a.detachEvent("on"+g,f),d.set(b,e.without(f)),a}function q(b,c,d,e){b=$(b),Object.isUndefined(e)&&(e=!0),b==document&&document.createEvent&&!b.dispatchEvent&&(b=document.documentElement);var f;return document.createEvent?(f=document.createEvent("HTMLEvents"),f.initEvent("dataavailable",!0,!0)):(f=document.createEventObject(),f.eventType=e?"ondataavailable":"onfilterchange"),f.eventName=c,f.memo=d||{},document.createEvent?b.dispatchEvent(f):b.fireEvent(f.eventType,f),a.extend(f)}var a={},b=document.documentElement,c="onmouseenter"in b&&"onmouseleave"in b;a.Methods={element:d,pointer:e,pointerX:f,pointerY:g,stop:h};var i=Object.keys(a.Methods).inject({},function(b,c){return b[c]=a.Methods[c].methodize(),b});if(Prototype.Browser.IE){function j(a){var b;switch(a.type){case"mouseover":b=a.fromElement;break;case"mouseout":b=a.toElement;break;default:return null}return Element.extend(b)}Object.extend(i,{stopPropagation:function(){this.cancelBubble=!0},preventDefault:function(){this.returnValue=!1},inspect:function(){return"[object Event]"}}),a.extend=function(b,c){if(!b)return!1;if(b._extendedByPrototype)return b;b._extendedByPrototype=Prototype.emptyFunction;var d=a.pointer(b);return Object.extend(b,{target:b.srcElement||c,relatedTarget:j(b),pageX:d.x,pageY:d.y}),Object.extend(b,i)}}else a.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__,Object.extend(a.prototype,i),a.extend=Prototype.K;var m=[];Prototype.Browser.IE&&window.attachEvent("onunload",l),Prototype.Browser.WebKit&&window.addEventListener("unload",Prototype.emptyFunction,!1);var n=Prototype.K;c||(n=function(a){var b={mouseenter:"mouseover",mouseleave:"mouseout"};return a in b?b[a]:a}),Object.extend(a,a.Methods),Object.extend(a,{fire:q,observe:o,stopObserving:p}),Element.addMethods({fire:q,observe:o,stopObserving:p}),Object.extend(document,{fire:q.methodize(),observe:o.methodize(),stopObserving:p.methodize(),loaded:!1}),window.Event?Object.extend(window.Event,a):window.Event=a}(),Element.addMethods(),typeof SN=="undefined"&&(SN={}),SN.Constants=function(){var a={"sn.vi":31536e6,"sn.ui":31536e6,"sn.vc":31536e6,"sn.wt":36e5,"sn.eh":31536e6,"sn.as":36e5,"sn.rn":6048e5,"sn.adp":31536e6},b={WIDGET_ID:"_wi",WIDGET_TYPE:"_wt",WIDGET_VISITED_ID:"_iwi",WIDGET_VISITED_TYPE:"_iwt",INTERVENTION_POSITION:"_ip",INTERACTION_COUNT:"_ic",CHAT_DONE:"_cd",PREVIOUS_WIDGET_STATE:"pws",CURRENT_WIDGET_STATE:"cws"},c={UNDEFINED_STR:"undefined",KEY_VALUE_SEPERATOR:"||",KEY_SEPERATOR:"~",LOCALSTORAGE_KEY_SEPARATOR:"#",LOCALSTORAGE_VALUE_SEPARATOR:"+",PROXY_NAME:"/247xd.html",ACTION_PAGE_NAME:"webchat/js/247action.html",TP_RANDOM_NUMBER:"rt",DOE_RANDOM_NUMBER:"re",VG_RANDOM_NUMBER:"rv",PRE_CONDITION_POLLER_ENABLED:"enablePreConditionPoller",ACTIVE_SESSION:"as",ACTIVE_SESSION_LIFE_TIME:"aslt",CUSTOM_TRACKING_ENABLED:"cte",BROWSER_GEO_LOCATION:"bgl",RANDOM_NO_LIFE_TIME:"rnlt",ADP_STORE_LIFE_TIME:"adplt",MAX_UI_STORE_ENTRIES:"mui",VID_LIFETIME:"vilt",UI_STORE_LIFETIME:"uilt",WS_STORE_LIFETIME:"wslt",WT_STORE_LIFETIME:"wtlt",VARIABLE_STORE_LIFETIME:"vclt",EXIT_HISTORY_LIFETIME:"exlt",REPEAT_VISITOR_LIFETIME:"rvlt",PAGE_LOAD_COUNTER:"c",ACTIVE_SESSION_START_TIME:"st",PREVIOUS_ACTIVE_SESSION_TIME:"pat",CURRENT_ACTIVE_SESSION_TIME:"cat",CURRENT_SESSION_LAST_ACTVITIY_TIME:"cslt",SAMPLING_STORAGE:"smplscope",SAMPLING_STORE_STORAGE:"sp",BROWSER_SESSION_SCOPE:"bs",VISITOR_ID:"vi",BROWSER_DETAILS:"bd",BROWSER:"br",DEVICE_DETAILS:"dd",DC_CODE:"dc",AS_CODE:"as",SERVER_CALL_ID_PREFIX:"sn-ss-",STATE_KEY:"st",TEST_STAGE:"t",SN_AS_STORE_NAME:"sn.as",SN_UI_STORE_NAME:"sn.ui",SN_VI_STORE_NAME:"sn.vi",DATA_CLEAN_UP_DONE_FOR_FPID_KEY:"f",PARAM_KEY_DATA_STORE:"ds",PARAM_KEY_CDN_VERSION:"vc",ETC_JSON_KEY:"etc_json",SN_ETC_STORE_NAME:"sn.etc",SN_RN_STORE_NAME:"sn.rn",SN_ADP_STORE_NAME:"sn.adp",SN_DS_STORE_NAME:"sn.ds",SN_EXIT_HISTORY_STORE_NAME:"sn.eh",SN_VARIABLE_STORE_NAME:"sn.vc",SN_WEBTRACKER_STORE_NAME:"sn.wt",VI_BUCKET_CUSTOM_DATA_KEY:"cd",PSP_CONTEXT:"/psp",WEBCONTENT_CONTEXT:"/webcontent",PROTOCOL_HTTP:"http:",PROTOCOL_HTTPS:"https:",CDN_VERSION:"cv",PSP_VERSION:"pv",PAGE_ACTION_EVENT:"pageactionevent",EVENT_HANDLER_CHAT_INVITE:"SHOW_CHAT_INVITE",UPDATE_SN_AS_EVENT:"UPDATE_SN_AS_EVENT",UPDATE_SN_AS_EVENT_SERVER:"UPDATE_SN_AS_EVENT_SERVER",EVENT_HANDLER_WOWPX:"START_WOWPX_APP",EVENT_HANDLER_ADP:"START_ADP_APP",WIDGET_EVENT:"widgetevent",ACTION_COMPLETED:"completed",ACTION_DISRUPTED:"disrupted",EXCEPTION_EVENT:"exceptionevent",UPDATE_FSMVARIABLES_EVENT:"updatefsmvariables",INTERNAL_ERROR:500,BOOTSTRAP_COMPLETED_EVENT:"bootstrapDone",RESET_PAGE_STATE:"resetPageState",BOOTSTRAP_UPDATE_COMPLETED_EVENT:"bootstrapUpdateDone",XD_CHANNEL_READY_EVENT:"xdChannelReady",UI_UPDATE_EVENT:"uiUpdateDone",CUSTOM_INITIALIZATION_COMPLETED:"customInitializationCompleted",CONST_PERIODICAL_EXECUTION_TIMER_EVENT:"periodicexecutionevent",BOOTSTRAP_TARGET_ERROR_CODE:903,BOOTSTRAP_VISITOR_GROUP_NOT_FOUND:901,LOGLEVEL_ERROR:"e",LOGLEVEL_WARN:"w",LOGLEVEL_DEBUG:"d",LOGLEVEL_INFO:"i",SHOW_UI:"show",INTERNAL_INVITATION_EVENT:"internalinvitationevent",INVITE_ACCEPTED:"accepted",INVITE_DECLINED:"declined",INVITE_IGNORED:"ignored",INVITE_OFFERED:"shown",INVITATION_EVENT:"INVITATION_EVENT",RULE_ENGINE_EVENT:"RULE_ENGINE_EVENT",VISITOR_EVENT:"VISITOR_EVENT",SESSION_START_EVENT:"SESSION_START_EVENT",EVENT_SOURCE:"chatcontroller",CUSTOM_EVENT:"CUSTOM_EVENT",CUSTOM_EVENT_FIRED:"600000",LP_CHAT_INVITE_OFFERED:"560000",LP_CHAT_INVITE_ACCEPTED:"560001",LP_CHAT_INVITE_DECLINED:"560002",EXIT_LINK_EVENT:"100010",SEQUENCE_ID:"s",SOURCE_SEQUENCE_ID:"ssi",RULE_ID:"ruleId",WIDGET_TRIGGERED:"110010",WIDGET_ID:"widgetId",WIDGET_TARGET_IDENTIFIER:"targetIdentifier",PARENT_SEQ_ID:"psi",WIDGET_PARAMS:"params",EVENT_ID:"eventId",RULE_CONFIG:"ruleconfig",KEY_IS_PRESENT:"isPresent",PARAM_TYPE_HANDLER:"handler",PARAM_TYPE_CUSTOM:"custom",PARAM_TO_IS:"paramsToIS",EVENT_TYPE:"eventType",TIME_STAMP:"ts",EVENT:"evt",CUSTOMER_ID:"cui",PLATFORM_CONFIG_IABLE_NAME:"pc",ACTION_CONTEXT:"ctxt",ACTION_CHAT_CTXT:"sn_chat_window",SN_KEY:"key",HANDLER_CONFIG_KEY:"handlerConfig",PARAM_TYPE_FSMVARS:"f",PARAM_TYPE_RULEVARS:"r",DOMLOADED:"domloaded",IFRAME_LOADED:"iframeLoaded",PSP_KEY:"key",VERSION:"v",EVENT_HANDLER_SHOW_CHAT_WINDOW:"SHOW_CHAT_WINDOW",IFRAME_TYPE:"iframeType",IFRAME_TYPE_EXCEPTION:"exception",ACCOUNT_ID:"ai",TRANSPORT_PARAMS:"transportparams",SOURCE_SEQ_ID:"ssi",XD_EVENT:"xdevent",PAGE_EVENT_INITIALIZE:"initialize",PAGE_EVENT:"pageevent",IFRAME_NAME:"childiframe",IFRAME_ID:"childiframeid",ELEMENT_NOT_PRESENT:!1,ELEMENT_PRESENT:!0,PSP_STATIC_SERVER_ID:"pspStaticRoot",BEFORE_UNLOAD_EVENT:"beforePageUnload",EVENT_HANDLER_CHAT:"SHOW_CHAT",EVENT_HANDLER_VIDEO:"SHOW_VIDEO",EVENT_HANDLER_PP:"SHOW_PP",EVENT_HANDLER_SCC:"SHOW_SCC",UI_TYPE_CHAT:"chat",PARAM_KEY_ACC_KEY:"key",PARAM_KEY_HOST:"host",PARAM_KEY_PAGEID:"pageid",PARAM_KEY_URL_ID:"ud",FINGER_PRINT_ID:"fpid",VID_BASED_ON_FPID:"vidBasedOnFpid",PARAM_KEY_VI_MAINTAINANCE:"shouldMaintainVi",PARAM_KEY_UNIQUE_TIMESTAMP:"uniqueTimestamp",PSP_ROOT_KEY:"psproot",CONTEXT_PARAM:"ctxt",START_TIME:"st",END_TIME:"et",EVENT_STATUS:"status",EVENT_OUTPUT:"output",EVENT_SRC_PAGE_ID:"pageid",KEY_RULE_STATE:"rulestate",ACTION_IN_PROGRESS:"inprogress",EVENT_PREFIX:"SN:",EVENT_HANDLER_JS:"EXECUTE_JS",PAGE_TRIGGER:"pagetrigger",BOOTSTRAP_RECEIVED_EVENT:"bootstrapRecvd",PERIODICAL_EXECUTION_TIMER_EVENT:"periodicexecutionevent",PERIODICAL_EXECUTION_TIMER_EVENT_RUN_CALL:"periodicexecutionevent_runcall",TRIGGER_EVAL_CALL:"evalToBeTriggered",XD_RULE_EVENT:"ruleevent",XD_UPDATE_SESSION:"updatesession",XD_SAVE_STATE:"savestate",XD_BOOTSTRAP:"bootstrap",XD_WIDGET_CMD:"widgetcmd",XD_REDIRECT:"redirect",XD_PP_CHAT_ACCEPTED:"ppchataccepted",PAGE_EVENT_BOOTSTRAP:"bootstrap",PAGE_EVENT_STATE_CHANGE_UPDATE:"statechangeupdate",EARLY_PAGE_LOAD_EVENT:"earlypageload",PAGE_LOAD_EVENT_COMPLETE:"pageloadeventcomplete",EARLY_PAGE_LOAD_EVENT_ID:"100000",PAGE_EVENT_VISIT_TO_TAGGED_PAGE:"100001",SESSION_START_EVENT_ID:"100002",CUSTOM_RULE_TRIGGERED:"110001",CUSTOM_RULE_TRIGGER_EVENT:"CUSTOM_TRIGGER_EVENT",RULES_TRIGGERED:"110000",RULE_TRIGGERED_EXCEPTION_EVENT:"110002",PAGE_EVENT_RULE_TRIGGER_DROPPED:"120003",SECOND_BOOTSTRAP_FOR_NEW_VISITOR_EVENTID:"500002",SECOND_BOOTSTRAP_RECVD_BY_RETRY_EVENTID:"500003",PARAM_UUIT:"ut",PARAM_ACTION_CONTEXT:"actionctxt",SHOULD_START_RE:"startRE",BOOTSTRAP_ID_PREFIX:"sn-bootstrap-",BOOTSTRAP_CONTEXT:"/bootstrap.js?",SET_VC_CONTEXT:"/v0/serverdata/set?",SEND_SERVER_DATA:"sendServerData",LOCAL_STORE:"localstore",BOOTSRTAP_RETRY_INTERVALS:[1e3,2e3,3e3],STATE_CHANGE_COMPLETED_EVENT:"statechangecompleted",STATECHANGE_ID_PREFIX:"sn-statechange-",STATECHANGE_CONTEXT:"/statechange?",PARENT_DOMAIN:"parentdomain",PSP_VERSION_KEY:"pspv",IE_STORAGE:"ie",REFERENCE_LOADED_ITEM:"refloaded",GET_LOCAL_STORAGE_ITEM:"getlocalstorageitem",SET_LOCAL_STORAGE_ITEM:"setlocalstorageitem",REMOVE_LOCAL_STORAGE_ITEM:"removelocalstorageitem",REFERENCE_IFRAME_ID:"sn-pspxd-iframe",REFERENCE_IFRAME_NAME:"sn-pspxd-iframe-name",UI_INVITE_ACCEPTED:"a",UI_INVITE_IGNORED:"i",UI_INVITE_DECLINED:"d",UI_INVITE_OFFERED:"o",UI_INVITATION_IN_PROGRESS:"ip",TRUE:"t",FALSE:"f",CONST_INVITATION_OFERED_TIME_STAMP:"it",EXIT_LINK:"el",NEWTAB_EXIT_LINK:"ntel",MAX_XD_RETRY_COUNT:5,XD_RETRY_INTERVAL:330,SET_XD_DATA:"setXdData",CONST_URL_SEPARATOR:"|",DEFAULT_STORE_LIFETIME_MAP:a,ADP_STORE_CONSTANTS:b,PXOE_SERVER:"OE",TIE_SERVER:"TIE",POLLER_TIMEOUT:3e5,CLIENT_KEY:"clientKey",BUCKET_KEY:"bucketKey",BUCKET_VALUE:"bucketValue",ACCOUNT_VERSION:"version",DEFAULT_ACCOUNT_VERSION_VALUE:"default",SEND_SERVER_DATA_CALL:"/v0/data/pxoe/set",GET_SERVER_DATA_CALL:"/v0/data/pxoe/get",CHAT_STATE_EVENT:"wowpx_chatstate",INITIAL_REFERRER:"ir",PAGE_COUNT:"co",INVITE_COUNT:"ic",LAST_INVITE_SHOWN_TIME:"it",CHAT_STATE:"cs",TYPE_PROACTIVE:"p",TYPE_BUTTON:"b",BUTTON_APP:"mvp_button",INVITE_OFFERED_EVENT_ID:"11103",INVITE_ACCEPTED_EVENT_ID:"11104",INVITE_DECLINED_EVENT_ID:"11105",INVITE_IGNORED_EVENT_ID:"11106",APP_TRACK_EVENT:"WOWPXAPP_EVENT"},d={};getWowpxPath=function(a){var b=a||window.document.domain;return d[b]},getDocumentDomain=function(){var a=document.location.href,b=a.split("#"),c=b[1].split("&");for(var d=0;d<c.length;d++)if(c[d].indexOf("documentDomain")!=-1){var e=c[d].split("="),f=e[1];if(f!=document.domain)return f;break}};var e=window.documentDomain;return e&&document.domain!=e&&(document.domain=e),c}(),typeof SN=="undefined"&&(SN={});try{window.pspSNTrackingId=(new String((new Date).getTime())).valueOf()+"-"+Math.floor(Math.random()*1e6)}catch(err){parent.SN.Logger.consoleLog("Error while constructing trackingId"+err)}SN.loadTrackingScript=function(a,b,c,d,e,f){var g=SN.Constants;try{var h=new String((new Date).getTime()),i=document.createElement("script");i.type="text/javascript";var j="id="+window.pspSNTrackingId+"&type="+a+"&ts="+h;typeof b!==g.UNDEFINED_STR&&b!=null&&(j=j+"&vid="+b);var k=parent.document.location.href;k.length>200&&(k=k.substr(0,200)),j=j+"&u="+encodeURIComponent(k),j=j+"&ll="+f,typeof c!==g.UNDEFINED_STR&&c!=null&&c!=""&&(j=j+"&ed="+c),j.length>2e3&&(j=j.substr(0,2e3)),i.id="track-js"+h,i.src=document.location.protocol+"//"+parent.SN.Conf.CUSTOM_TRACK_SERVER+"/psp/"+e+"/"+parent.SN.Conf.CONST_PSP_VERSION+"/cpxt.js?"+j,document.body.appendChild(i)}catch(l){parent.SN.Logger.consoleLog("Error while sending custom tracking data"+l)}},typeof SN=="undefined"&&(SN={}),SN.Utils=function(){function Y(a){parent.SN.Conf.preConditionPollerEnabledForTP=a}function Z(){return parent.SN.Conf.preConditionPollerEnabledForTP}function $(a){C=a,E=(new Date).getTime(),F=E-C}function _(){return C}function ab(a){O=a,D=C+a,N=new Date(D)}function bb(){return N.getUTCHours()+":"+N.getUTCMinutes()}function cb(){return O}function db(){return $undefinedOrNull(F)?null:F}function eb(a){var b=[].slice.call(a,0);for(var c=0;c<b.length;c++){var d=b[c];$isArray(d)?b[c]=d.join(","):$isString(d)||(b[c]=JSON.stringify(d))}return b.join(" ")}function fb(a,b){var c=[];return c.push(a),c.push("="),c.push(b),c.join("")}function gb(a){l=a}function hb(){return l}function ib(){if(!f||l>i)return;typeof console.warn!=a.UNDEFINED_STR&&(Prototype.Browser.Gecko?console.warn.apply(console,arguments):console.warn(eb(arguments)))}function jb(){if(!f||l>h)return;typeof console.error!=a.UNDEFINED_STR&&(Prototype.Browser.Gecko?console.error.apply(console,arguments):console.error(eb(arguments)))}function kb(){if(!f||l>k)return;typeof console.info!=a.UNDEFINED_STR&&(Prototype.Browser.Gecko?console.info.apply(console,arguments):console.info(eb(arguments)))}function lb(){if(!f||l>j)return;typeof console.debug!=a.UNDEFINED_STR?Prototype.Browser.Gecko?console.debug.apply(console,arguments):console.log(eb(arguments)):qc()&&console.log(m+eb(arguments))}function mb(a,b){var c={};$undefined(b)||(c.id=b),c.href=a,c.rel="stylesheet",c.type="text/css",e.appendChild(new Element("link",c))}function nb(a,b){var c={};$undefined(b)||(c.id=b),c.src=a,c.type="text/javascript",c.charset="UTF-8",c.async=!0,e.appendChild(new Element("script",c))}function ob(a,b){var c={};$undefined(b)||(c.id=b),c.src=a,c.type="text/javascript",document.body.appendChild(new Element("script",c))}function pb(a,b,c){var d={};$undefined(b)||(d.id=b),d.src=a;var e=new Element("iframe",d);return c==1&&e.hide(),document.body.appendChild(e)}function qb(a,b,c){var d={};$undefined(b)||(d.id=b),d.src=a;var e=new Element("img",d);c==1&&e.hide(),document.body.appendChild(e)}function rb(a,b){var c=a.length>0&&a.charAt(a.length-1)!="?";for(var d in b)c==1?a+="&":c=!0,typeof b[d]=="object"||$isArray(b)?a+=d+"="+encodeURIComponent(JSON.stringify(b[d])):a+=d+"="+encodeURIComponent(b[d]);return a}function sb(){return $undefined(window.innerWidth)?!$undefined(document.documentElement)&&!$undefined(document.documentElement.clientWidth)&&document.documentElement.clientWidth!=0?parent.document.documentElement.clientWidth:parent.document.getElementsByTagName("body")[0].clientWidth:parent.window.innerWidth}function tb(){return $undefined(window.innerHeight)?!$undefined(document.documentElement)&&!$undefined(document.documentElement.clientHeight)&&document.documentElement.clientHeight!=0?parent.document.documentElement.clientHeight:parent.document.getElementsByTagName("body")[0].clientHeight:parent.window.innerHeight}function ub(a){var b=new RegExp("[\\?&#]"+a+"=([^&#]*)"),c=b.exec(location.href);return $isEmpty(c)?"":decodeURIComponent(c[1])}function vb(a){$isEmpty(a)&&(a=location.href);var b=a.indexOf("?");b!=-1&&b<a.length-1&&(a=a.substring(0,b));var c=a.lastIndexOf("/");return c!=-1&&c<a.length-1?a.substring(0,c):a}function wb(a){$isEmpty(a)&&(a=top.location.href);var b=a.indexOf("https")===0?9:8,c=a.indexOf("/",b);return c>0?a.substring(0,c):a}function xb(a){return Object.keys(a).length===0}function yb(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}function zb(b){return undefined===b?a.UNDEFINED_STR:null===b?null:{}.toString.call(b).slice(8,-1)}function Ab(a){return Object.isUndefined(a)||a==null||a==="null"}function Bb(a){return a==null||a==""}function Cb(b,c){var d=c;if($undefined(d)||$isEmpty(d))d=ub("host"),$isEmpty(d)&&(d=top.location.href);var e=wb(d);b==null&&(b="");var f={};return b=f[c],new SN.XD.Sender(e+"/"+b+a.PROXY_NAME)}function Db(b){if(b!=null)return b;var c=ub("host");$isEmpty(c)&&(c=top.location.href);var d=wb(c);return d+"/"+a.ACTION_PAGE_NAME}function Eb(a,b,c){var d=parent.document.createElement("form");Element.writeAttribute(d,"id",c+"-form"),Element.writeAttribute(d,"method","post"),Element.writeAttribute(d,"action",a),Element.writeAttribute(d,"target",c),parent.document.body.appendChild(d);for(var e in b)if(b.hasOwnProperty(e)){var f=parent.document.createElement("input");Element.writeAttribute(f,"id",c+"-input-"+e),Element.writeAttribute(f,"type","hidden"),Element.writeAttribute(f,"name",e),Element.writeAttribute(f,"value",String(b[e])),Element.insert(d,f)}d.submit(),window.setTimeout(function(){Element.remove(d)},1e3)}function Fb(a,b,c){var d=new Element("iframe",{id:b,src:a});d.setStyle({left:"-1000px",position:"absolute"}),Element.hide(d),document.body.appendChild(d);if(c!=null&&c!="")try{var e=c-0,f=window.setTimeout(function(){Element.remove(d)},e)}catch(g){ib("invalid integer: "+c,g)}}function Gb(a,b,c){$undefinedOrNull(c)&&(c="_blank");var d=new Element("form",{method:"post",action:a,target:c});document.body.appendChild(d);for(var e in b)if(b.hasOwnProperty(e)){var f=new Element("input",{id:c+"-input-"+e,type:"hidden",name:e,value:String(b[e])});d.appendChild(f)}d.submit()}function Hb(a,b){var c=new RegExp(b,"");return c.test(a)}function Ib(){var a=[],b="0123456789ABCDEF";for(var c=0;c<36;c++)a[c]=Math.floor(Math.random()*16);a[14]=4,a[19]=a[19]&3|8;for(var c=0;c<36;c++)a[c]=b.charAt(a[c]);return a[8]=a[13]=a[18]=a[23]="-",a.join("").toLowerCase()}function Jb(a,b){if(a>=b)throw"Invalid range: "+a+">="+b;return Math.floor(Math.random()*(b-a+1))+a}function Kb(a,b){var c=a.indexOf(b);return c>=0&&c+b.length==a.length?!0:!1}function Lb(a){d=a}function Mb(a){c=a}function Nb(a){v=a}function Ob(){return v}function Pb(a){w=a}function Qb(){return w}function Rb(){return d}function Sb(){var a=parent.SN.Conf.CONST_PSP_VERSION;$undefinedOrNull(a)&&(a=r);if(a=="d"||a=="default")return"default";if(a=="t"||a=="test")return"test"}function Tb(){return c}function Ub(){var a=parent.SN.Conf.CONST_CDN_VERSION;return $undefinedOrNull(a)&&(a=s),a}function Vb(a){o=a}function Wb(){return o}function Xb(a){q=a}function Yb(){return q}function Zb(){return ac()+"//"+Rb()+a.PSP_CONTEXT}function $b(){var b="https:";return b+"//"+Rb()+a.PSP_CONTEXT}function _b(){return ac()+"//"+Tb()+a.PSP_CONTEXT}function ac(){var b=a.PROTOCOL_HTTPS;return location.protocol.indexOf(a.PROTOCOL_HTTPS)==-1&&(b=a.PROTOCOL_HTTP),b}function bc(){return ac()+"//"+Rb()+a.WEBCONTENT_CONTEXT}function cc(a,b){var c=new Array;return c.push(a),c.push(b),c.join("=")}function dc(a,b,c,d){var e;a=="parent"?e=parent.document:e=document;var f=e.createElement(c);for(var g in d)d.hasOwnProperty(g)&&(f[g]=d[g]);return b.appendChild(f),null}function ec(a,b,c){return window.open(a,b,c),!1}function fc(){var a={},b=parent.SN.Browser||{};b.type==b.MSIE?(a.x=parent.window.screenTop-100,a.y=parent.window.screenLeft):b.type==b.FF?(a.x=parent.window.screenX,a.y=parent.window.screenY):b.type==b.CHROME&&(a.x=parent.window.screenX,a.y=parent.window.screenY);var c={};b.type==b.MSIE?(c.x=8,c.y=125):b.type==b.FF?(c.x=parent.window.outerWidth-parent.window.innerWidth,c.y=parent.window.outerHeight-parent.window.innerHeight):b.type==b.CHROME&&(c.x=parent.window.outerWidth-parent.window.innerWidth,c.y=parent.window.outerHeight-parent.window.innerHeight);var d={};d.distanceFromTopBar=70,d.distanceFromRightBoundary=150,d.width=285;var e={};e.y=d.distanceFromTopBar,b.type==b.MSIE?e.x=parent.document.documentElement.clientWidth+8-d.distanceFromRightBoundary-d.width:b.type==b.FF?e.x=parent.window.outerWidth-d.distanceFromRightBoundary-d.width:b.type==b.CHROME&&(e.x=parent.window.outerWidth-d.distanceFromRightBoundary-d.width);var f={x:a.x+c.x+e.x,y:a.y+c.y+e.y};return f}function gc(a){return a.indexOf("http://")!=-1&&(a=a.replace("http://","https://")),a}function hc(a){p=a}function ic(){return p}function jc(){var a=parent.window.name;if(!$undefinedOrNull(a)&&!$isEmpty(a))return a}function kc(a){parent.window.name=a}function lc(b,c){if(n>j)return;var d=!1;pc(b,c,d,a.LOGLEVEL_INFO)}function mc(b,c){!(n>i);var d=!1;pc(b,c,d,a.LOGLEVEL_WARN)}function nc(b,c){if(n>k)return;var d=!1;pc(b,c,d,a.LOGLEVEL_DEBUG)}function oc(b,c){if(n>h)return;var d=!1,e="";if(typeof c!=a.UNDEFINED_STR){var f=JSON.stringify(c),g=f.length>750?750:f.length;e=encodeURIComponent(f.substr(0,g))}var i={};pc("msg: "+b+" Error: "+e,i,d,a.LOGLEVEL_ERROR)}function pc(b,c,d,e){if(!Ab(J)&&J=="false")return;if(Ab(J)){parent.SN.UserAgentParser.isSafariPrivateBrowsingMode()?J=parent.window[a.CUSTOM_TRACKING_ENABLED]:J=window.localStorage.getItem(a.CUSTOM_TRACKING_ENABLED);if(Ab(J))J=="true";else if(J=="false")return}try{var f="";if(typeof c=="undefined"||c==null)c={};try{for(var g in c)if(c.hasOwnProperty(g)){var h=c[g],i=JSON.stringify(h);$undefinedOrNull(i)||(i.indexOf("http://")!=-1||i.indexOf("https://")!=-1)&&i.length>500&&(h=i.substr(0,500))}var j;typeof SN.SessionManager!=a.UNDEFINED_STR&&SN.SessionManager!=null&&(j=SN.SessionManager.getGlobalSession()),typeof j!=a.UNDEFINED_STR&&j!=null&&(f=j.getVisitorId());if(typeof f=="undefined"||f==null)f=""}catch(k){jb("Error in processing variables map",k)}var l=encodeURIComponent(JSON.stringify(c));if(!$undefinedOrNull(d)&&d==1){var m={};m.vid=f,m.bsid=c.bsid,m.ed=c,m.si="CUSTOM_TRACK",document.fire("SN:CUSTOM_TRACK_EVENT",m)}$undefinedOrNull(o)&&Vb(parent.SN.Conf.CONST_PSP_KEY),typeof SN.loadTrackingScript!="undefined"?SN.loadTrackingScript(b,f,l,v,o,e):typeof parent.SN.loadTrackingScript!="undefined"&&parent.SN.loadTrackingScript(b,f,l,v,o,e)}catch(k){jb("error in making custom tracking call!!",k)}}function qc(){return parent.SN.UserAgentParser.getBrowserType()=="i"?!0:!1}function rc(a){n=a}function sc(a,b){if($undefinedOrNull(a))return;for(var c in a)a.hasOwnProperty(c)&&($undefinedOrNull(a[c])||(b[c]=a[c]))}function tc(){return Math.random().toString().substring(2,18)+"-"+(new Date).getTime()}function uc(){return u}function vc(a){u=a}function wc(a){return t[a]}function xc(a,b){t[a]=b*1e3}function yc(){var a=location.href;return a.indexOf(z)!=-1?a:a.indexOf(x)!=-1?a.replace(x,z):B}function zc(){var a=location.href;return a.indexOf(y)!=-1?a:a.indexOf(x)!=-1?a.replace(x,y):A}function Ac(a){var b=document.getElementById(a);if(b){var c=document.getElementsByTagName("head").item(0);setTimeout(function(){try{c.removeChild(b)}catch(a){SN.Utils.error("Could not remove tracking.js - ",a)}},2e3)}}function Bc(){return SN.StoreManager.getValueFromStore(a.SN_VI_STORE_NAME,a.CONST_INVITATION_OFERED_TIME_STAMP)}function Cc(){return G}function Dc(a){G=a}function Ec(){return parent.SN.Conf.startRunPollAuto}function Fc(a){parent.SN.Conf.startRunPollAuto=a}function Gc(){return U}function Hc(a){U=a}function Ic(){return Q}function Jc(a){Q=a}function Kc(){return R}function Lc(a){R=a}function Mc(){var a=(new Fingerprint).get(),b=0,c=[],d=parent.navigator.plugins,e=parent.navigator.mimeTypes;for(var f=0;f<d.length;f++){var g=d[f],h=[g.name,g.description,g.filename];for(var i=0;;i++){var j=g[i];if(j===undefined)break;h.push(j.type),h.push(j.suffixes),h.push(j.description)}S+=h.join("#;#")}for(var f=0;f<e.length;f++){var j=e[f],k=[];k.push(j.type),k.push(j.suffixes),k.push(j.description),T+=k.join("#;#")}c.push(parent.navigator.userAgent),parent.navigator.appName&&c.push(parent.navigator.appName),parent.navigator.appVersion&&c.push(parent.navigator.appVersion),parent.navigator.onLine&&c.push(parent.navigator.onLine),parent.navigator.platform&&c.push(parent.navigator.platform),parent.navigator.product&&c.push(parent.navigator.product),parent.navigator.productSub&&c.push(parent.navigator.productSub),parent.navigator.battery&&c.push(JSON.stringify(parent.navigator.battery)),parent.navigator.buildID&&c.push(parent.navigator.buildID),parent.navigator.cookieEnabled&&c.push(parent.navigator.cookieEnabled),parent.navigator.language&&c.push(parent.navigator.language),parent.navigator.javaEnabled&&c.push(parent.navigator.javaEnabled()),parent.navigator.doNotTrack&&c.push(parent.navigator.doNotTrack),parent.navigator.vendor&&c.push(parent.navigator.vendor),parent.navigator.maxTouchPoints&&c.push(parent.navigator.maxTouchPoints),parent.navigator.msMaxTouchPoints&&c.push(parent.navigator.msMaxTouchPoints),parent.navigator.msPointerEnabled&&c.push(parent.navigator.msPointerEnabled),parent.navigator.oscpu&&c.push(parent.navigator.oscpu),parent.navigator.browserLanguage&&c.push(parent.navigator.browserLanguage),parent.navigator.cpuClass&&c.push(parent.navigator.cpuClass),parent.navigator.systemLanguage&&c.push(parent.navigator.systemLanguage),parent.navigator.userLanguage&&c.push(parent.navigator.userLanguage),parent.navigator.msManipulationViewsEnabled&&c.push(parent.navigator.msManipulationViewsEnabled),c.push(parent.window.screenX),c.push(parent.window.screenY),c.push(parent.window.scrollMaxX),c.push(parent.window.scrollMaxY),c.push(parent.window.fullscreen),c.push(parent.window.innerHeight),c.push(parent.window.innerWidth),c.push(parent.window.scrollX),c.push(parent.window.scrollY),c.push(parent.window.outerHeight),c.push(parent.window.outerWidth),JSON.stringify(parent.window.screen)!={}?c.push(JSON.stringify(parent.window.screen)):(c.push(parent.window.screen.colorDepth),c.push(parent.window.screen.pixelDepth),c.push(parent.window.screen.availWidth),c.push(parent.window.screen.availHeight),c.push(parent.window.screen.availTop),c.push(parent.window.screen.availLeft),c.push(parent.window.screen.width),c.push(parent.window.screen.height),parent.window.screen.top&&c.push(parent.window.screen.top),parent.window.screen.left&&c.push(parent.window.screen.left),parent.window.screen.mozOrientation&&c.push(parent.window.screen.mozOrientation),parent.window.screen.bufferDepth&&c.push(parent.window.screen.bufferDepth),parent.window.screen.bufferDepth&&c.push(parent.window.screen.bufferDepth),parent.window.screen.deviceXDPI&&c.push(parent.window.screen.deviceXDPI),parent.window.screen.deviceYDPI&&c.push(parent.window.screen.deviceYDPI),parent.window.screen.fontSmoothingEnabled&&c.push(parent.window.screen.fontSmoothingEnabled)),b=(new Fingerprint).murmurhash3_32_gc(c.join("###")+S+T,31),Lc(a+"-"+b)}function Nc(){return S}function Oc(){return T}function Pc(){var b=SN.StoreManager.getValueFromStore(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION_START_TIME);if($undefinedOrNull(b))return 0;try{var c=(new Date).getTime()-parseInt(b);return c<0?0:Math.round(c/1e3)}catch(d){return jb("Error in processing time on site",d),0}}function Qc(a){H=a}function Rc(){return H}function Sc(){var b=null;parent.SN.Conf.dataStore=="server"||SN.Utils.isVidBasedonfpid()?b=$getTotalVisitCount():b=SN.StoreManager.getValueFromStore(a.SN_VI_STORE_NAME,a.PAGE_LOAD_COUNTER);if($undefinedOrNull(b))return 0;try{b=parseInt(b);var c=Pc();return Math.round(c/b)}catch(d){return jb("Error in processing average time on site",d),0}}function Tc(a){I=a}function Uc(){return I}function Vc(a){var b={};for(var c=a.length-1;c>=0;c--)b[a[c]]?a.splice(c,1):b[a[c]]=!0;return a}function Wc(a){K=a}function Xc(){return K}function Yc(){return P}function Zc(a){P=a}function $c(a){var b=null;return parent.SN.UserAgentParser.isSafariPrivateBrowsingMode()?b=SN.CookieManager().getValueFromStore("sn."+SN.Constants.BROWSER_GEO_LOCATION,a):b=SN.LocalStorageWrapper().getValueFromStore("sn."+SN.Constants.BROWSER_GEO_LOCATION,a),b==null?"null":b}function _c(){V=!0}function ad(){return V}function bd(b){var c={eventId:b,data:{f:{v:{geo:{loc:[$geoLongitude(),$geoLatitude()],co:$geoCountry(),cc:$geoCountryCode(),ct:$geoCity(),wr:$geoRegion(),isp:$geoIsp(),ip:$geoIPAddress(),org:$geoOrganization(),zip:$geoPostalCode()}}}}};$undefinedOrNull(c.data.f.v)&&(c.data.f.v={}),$undefinedOrNull(c.data.f.v.geo)&&(c.data.f.v.geo={}),parent.SN.Conf.browserGeoLocationFlag?(c.data.f.v.geo.lt="b",$getGeoBrowserLocationError().length!=2?c.data.f.v.geo.loc=[parseFloat($getGeoLongitudeBrowser()),parseFloat($getGeoLatitudeBrowser())]:(c.data.f.v.geo.le=$getGeoBrowserLocationError(),c.data.f.v.geo.lt="s",c.data.f.v.geo.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())])):(c.data.f.v.geo.lt="s",c.data.f.v.geo.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())]),$undefinedOrNull(c.data.f.p)&&(c.data.f.p={}),c.data.f.p.cp=unescape(parent.document.location.href),c.data.f.p.ti=unescape(parent.document.title),c.data.f.p.re=unescape(parent.document.referrer),SN.EventManager.fire(a.VISITOR_EVENT,c),kb("fired:"+a.VISITOR_EVENT)}function cd(){if(parent.SN.Conf.fpidInServer==1){var a=parent.SN.Conf.fpidFeatureActiveBrowsers;for(var b=0;b<a.length;b++){if(parent.SN.UserAgentParser.getBrowserDetails().indexOf(a[b])!=-1){Jc(!0);break}Jc(!1)}}}function dd(a){W=a}function ed(){return W}function fd(){dd(!0),parent.SN.Conf.eventBasedEvalTriggerEnabled||SN.Controller.startRun()}function gd(a){X=a}function hd(){return!X}function id(b,c){if(b==a.SN_VI_STORE_NAME)return c==a.VISITOR_ID||c==a.VI_BUCKET_CUSTOM_DATA_KEY||c==a.DATA_CLEAN_UP_DONE_FOR_FPID_KEY||$undefinedOrNull(c);if(b==a.SN_ETC_STORE_NAME)return!0}function jd(a){return Object.prototype.toString.call(a).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()}function kd(a){if(jd(a)==="regexp")return a;if(jd(a)==="string")return new RegExp(a,"i")}function ld(a,b){for(var c=0;c<b.length;c++){var d=kd(b[c]);if(!$undefinedOrNull(a.match(d)))return c}return-1}function md(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=kd(b[c]);if(!$undefinedOrNull(a.match(d)))return c}return""}function nd(b){var c=SN.StoreManager.getSessionData(a.INITIAL_REFERRER);if($undefinedOrNull(c)){var d=md(parent.document.referrer,b)||"_";SN.StoreManager.setSessionData(a.INITIAL_REFERRER,d)}}function od(){var b=SN.StoreManager.getSessionData(a.INITIAL_REFERRER);return b&&b!="_"?b:""}var a=SN.Constants,b="ps",c=null,d=null,e=document.getElementsByTagName("head")[0],f=typeof console!=a.UNDEFINED_STR,g=1e3,h=400,i=300,j=200,k=100,l=g,m="INFO: ",n=h,o=null,p=null,q=null,r="d",s="v0.1",t={},u=5,v="cdn.247ilabs.com",w=!0,x="247SN",y="247XD",z="247Action",A="http://"+parent.SN.Conf.CONST_PSP_ROOT+"/psp247/247XD.html",B="http://"+parent.SN.Conf.CONST_PSP_ROOT+"/psp247/247Action.html",C=(new Date).getTime(),D,E,F=0,G=!1,H=!1,I="/pspxd.html",J=null,K=null,L=null,M=null,N=null,O,P=null,Q=!1,R="",S="",T="",U=!1,V=!1,W=!1,X=!1;Event.observe(window,"load",function(){var b=parent.SN.Conf.CONST_PSP_STAGE;b==a.TEST_STAGE&&(l=j)}),cd();var pd={isViStoreData:id,isVisitorNotAHotlead:hd,setHotLeadFlag:gd,setCFReady:dd,isCFReady:ed,readyForEvaluation:fd,setLogLevel:gb,getLogLevel:hb,warn:ib,error:jb,debug:kb,info:lb,loadCss:mb,loadJs:nb,loadJsInline:ob,loadIFrame:pb,loadImg:qb,appendUrlParams:rb,getWidth:sb,getHeight:tb,readParam:ub,getContext:vb,getRootContext:wb,typeOf:zb,isUndefinedOrNull:Ab,isEmpty:Bb,createXDSender:Cb,getActionPageURL:Db,postToIframe:Eb,createHiddenIframe:Fb,postToWindow:Gb,patternMatch:Hb,randomUUID:Ib,getRandom:Jb,getPSPRoot:Zb,getPSPCDNRoot:_b,getPSPCDNVersion:Ub,getPSPVersion:Sb,setPSPServerName:Lb,setPSPCDNServerName:Mb,getPSPServerName:Rb,getPSPWebContentUrl:bc,convertToHttps:gc,setClientKey:Vb,getClientKey:Wb,setProxyServer:Xb,getProxyServer:Yb,parameterize:cc,appendHTMLTag:dc,openWin:ec,getWindowPosition:fc,getPSPServerUrl:ic,setPSPServerUrl:hc,getWindowName:jc,setWindowName:kc,copyParams:sc,getUniqueId:tc,getStoreLifetime:wc,setStoreLifetime:xc,isPreConditionPollerEnabledForTP:Z,setPreConditionPollerEnabledForTP:Y,setMaxUIEntries:vc,getMaxUIEntries:uc,setCustomTrackServer:Nb,getCustomTrackServer:Ob,setEventFireRequired:Pb,infoTrack:lc,debugTrack:nc,errorTrack:oc,warnTrack:mc,setCustomTrackingLevel:rc,getSecurePSPRoot:$b,getEventFireRequired:Qb,isIE:qc,isEmptyObject:xb,mergeObjects:yb,get247ActionUrl:yc,get247XDUrl:zc,removeElement:Ac,makeBSRelatedEventCall:bd,setNewVisitor:_c,isNewVisitor:ad,getLastInvitationOfferedTimestamp:Bc,setServerTimeStamp:$,getServerTimeStampAtBS:_,isCrossDomainSupported:Cc,setCrossDomainSupported:Dc,isEvalEnabled:Ec,setPollerStartToAuto:Fc,isXdStorageAvailable:Gc,setXdStorageSupported:Hc,isSubDomain:Kb,setDomready:Qc,isDomready:Rc,getTimeOnSite:Pc,getAverageTimeOnPage:Sc,setPsdxdPath:Tc,getPsdxdPath:Uc,setAvailableStore:Wc,getAvailableStore:Xc,removeDuplicates:Vc,getTimeStampDiff:db,setClientTimeStamp:ab,getClientTimeZoneOffsetInMilliSeconds:cb,getClientTimeStamp:bb,setGeoPrivateIp:Zc,getGeoPrivateIp:Yc,getGeo_BrowserValueOf:$c,isVidBasedonfpid:Ic,setVidBasedonfpid:Jc,setFingerPrint:Lc,getFingerPrint:Kc,getPluginsString:Nc,getMimeTypesString:Oc,generateFingerPrint:Mc,augmentKeyValuePair:fb,storeInitialReferrer:nd,getInitialReferrer:od,matchPatternsArray:ld,matchPatternsMap:md,getType:jd};return pd}(),typeof SN=="undefined"&&(SN={}),SN.Base64Encoder=function(){function b(b){var c="",e,f,g,h,i,j,k,l=0;b=d(b);while(l<b.length)e=b.charCodeAt(l++),f=b.charCodeAt(l++),g=b.charCodeAt(l++),h=e>>2,i=(e&3)<<4|f>>4,j=(f&15)<<2|g>>6,k=g&63,isNaN(f)?j=k=64:isNaN(g)&&(k=64),c=c+a.charAt(h)+a.charAt(i)+a.charAt(j)+a.charAt(k);return c}function c(b){var c="",d,f,g,h,i,j,k,l=0;b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(l<b.length)h=a.indexOf(b.charAt(l++)),i=a.indexOf(b.charAt(l++)),j=a.indexOf(b.charAt(l++)),k=a.indexOf(b.charAt(l++)),d=h<<2|i>>4,f=(i&15)<<4|j>>2,g=(j&3)<<6|k,c+=String.fromCharCode(d),j!=64&&(c+=String.fromCharCode(f)),k!=64&&(c+=String.fromCharCode(g));return c=e(c),c}function d(a){a=a.replace(/\r\n/g,"\n");var b="";for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):d>127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(d&63|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(d&63|128))}return b}function e(a){var b="",c=0,d=0,e=0,f=0;while(c<a.length)d=a.charCodeAt(c),d<128?(b+=String.fromCharCode(d),c++):d>191&&d<224?(e=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|e&63),c+=2):(e=a.charCodeAt(c+1),f=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(e&63)<<6|f&63),c+=3);return b}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f={encode:b,decode:c};return f}(),SN.WebPageFilter=function(){function i(a){d=a}function j(a){e=a}function k(a){f=a}function l(a){g=a}function m(a){h=a}function n(a){switch(Number(d)){case c.BOTH:return p(a)?!1:o(a)?!0:!1;case c.EXCLUSION:return!p(a);case c.INCLUSION:return o(a);case c.NONE:return!0}return!1}function o(a){return b.encode(a)in e||q(a)?!0:!1}function p(a){return b.encode(a)in f||r(a)?!0:!1}function q(c){for(var d=0;d<g.length;d++){var e=new RegExp(b.decode(g[d]),a);if(e.test(c))return!0}return!1}function r(c){for(var d=0;d<h.length;d++){var e=new RegExp(b.decode(h[d]),a);if(e.test(c))return!0}return!1}var a="i",b=SN.Base64Encoder,c={INCLUSION:0,EXCLUSION:1,BOTH:2,NONE:3},d=null,e=null,f=null,g=null,h=null,s={shouldServeURL:n,filterTypeEnum:c,setFilterType:i,setInfilters:j,setOutfilters:k,setInfilterRegexList:l,setOutfilterRegexList:m};return s}(),typeof SN=="undefined"&&(SN={}),SN.ConfigurationManager=function(){function getRuntimeFSMVarValue(a){return runtimeFSMVariables[a]}function setRuntimeFSMVarValue(a,b){runtimeFSMVariables[a]=b}function isActionPage(){var a=getActionPageURL(),b=utils.getActionPageURL(a);return utils.getRootContext()+parent.location.pathname==b}function getActionContext(){return SN.ChildWindowController.getContext()}function setBootstrapParams(a){bootstrapParams=a}function getBootstrapParams(){return bootstrapParams}function saveInitConfiguration(a){initConfig=a,initPageId(initConfig[INIT_JS_PAGE_ID]),initTrackId(initConfig[INIT_JS_TRACK_ID]),pspKey=initConfig[INIT_JS_PSP_KEY],pageConfigs=initConfig[INIT_JS_PAGE_CONFIGS],widgetConfigs=initConfig[INIT_JS_WIDGET_CONFIGS],sccAppConfigs=initConfig[INIT_JS_SCC_APP_CONFIGS],sccModuleConfigs=initConfig[INIT_JS_SCC_MODULE_CONFIGS],wowpxAppConfigs=initConfig[INIT_JS_WOWPX_APP_CONFIGS],initializeMappedRuleVariables(initConfig[INIT_JS_MAPPED_RULE_VARIABLES])}function saveBootstrapConfiguration(a){bootstrapConfig=a.bsdata;if(parent.SN.Conf.dataStore=="server"||utils.isVidBasedonfpid()==1)serverData=a.serverData;if($undefinedOrNull(bootstrapConfig)){utils.warn("bootstrap configuration is undefined");return}clientTs=(new Date).getTime(),visitorId=bootstrapConfig[BOOTSTRAP_JS_VISITOR_ID],visitorGroup=bootstrapConfig[BOOTSTRAP_JS_VISITOR_GROUP],parent.SN.Conf.pspServerType==SN_CONSTANTS.PXOE_SERVER?ruleConfigs=bootstrapConfig[BOOTSTRAP_JS_RULE_CONFIGS]:eventConfigs=bootstrapConfig[BOOTSTRAP_JS_EVENT_CONFIGS],serverTimeStamp=bootstrapConfig[BOOTSTRAP_JS_SERVER_TIME_STAMP],SN.Utils.setServerTimeStamp(serverTimeStamp),clientTimeZoneOffset=bootstrapConfig[BOOTSTRAP_JS_CLIENT_TIMEZONE_OFFSET],SN.Utils.setClientTimeStamp(clientTimeZoneOffset),targetPopulationId=bootstrapConfig[BOOTSTRAP_JS_TARGET_POPULATION_ID],tpRandomNumber=bootstrapConfig[SN_CONSTANTS.TP_RANDOM_NUMBER],vgRandomNumber=bootstrapConfig[SN_CONSTANTS.VG_RANDOM_NUMBER],asLifeTime=bootstrapConfig[SN_CONSTANTS.ACTIVE_SESSION_LIFE_TIME],rnLifeTime=bootstrapConfig[SN_CONSTANTS.RANDOM_NO_LIFE_TIME],doeRandomNumber=bootstrapConfig[SN_CONSTANTS.DOE_RANDOM_NUMBER],doeRandomNumber||parent.SN.Conf.pspServerType==SN_CONSTANTS.TIE_SERVER&&(doeRandomNumber=Math.floor(Math.random()*1e5)/1e3),doeRandomNumber||(doeRandomNumber=0),samplingStorage=bootstrapConfig[SN_CONSTANTS.SAMPLING_STORAGE],targetId=bootstrapConfig[BOOTSTRAP_JS_TARGET_ID],utils.setPreConditionPollerEnabledForTP(bootstrapConfig[SN_CONSTANTS.PRE_CONDITION_POLLER_ENABLED]),repeatVisitorLifetime=bootstrapConfig[SN_CONSTANTS.REPEAT_VISITOR_LIFETIME],utils.setStoreLifetime(SN_CONSTANTS.SN_RN_STORE_NAME,bootstrapConfig[SN_CONSTANTS.RANDOM_NO_LIFE_TIME]),bootstrapConfig[SN_CONSTANTS.ADP_STORE_LIFE_TIME]?utils.setStoreLifetime(SN_CONSTANTS.SN_ADP_STORE_NAME,bootstrapConfig[SN_CONSTANTS.ADP_STORE_LIFE_TIME]):utils.setStoreLifetime(SN_CONSTANTS.SN_ADP_STORE_NAME,SN_CONSTANTS.DEFAULT_STORE_LIFETIME_MAP[SN_CONSTANTS.SN_ADP_STORE_NAME]/1e3),utils.setStoreLifetime(SN_CONSTANTS.SN_AS_STORE_NAME,bootstrapConfig[SN_CONSTANTS.ACTIVE_SESSION_LIFE_TIME]),utils.setStoreLifetime(SN_CONSTANTS.SN_VI_STORE_NAME,bootstrapConfig[SN_CONSTANTS.VID_LIFETIME]),utils.setStoreLifetime(SN_CONSTANTS.SN_WEBTRACKER_STORE_NAME,bootstrapConfig[SN_CONSTANTS.WT_STORE_LIFETIME]),utils.setStoreLifetime(SN_CONSTANTS.SN_VARIABLE_STORE_NAME,bootstrapConfig[SN_CONSTANTS.VARIABLE_STORE_LIFETIME]),utils.setStoreLifetime(SN_CONSTANTS.SN_ETC_STORE_NAME,bootstrapConfig[SN_CONSTANTS.ACTIVE_SESSION_LIFE_TIME]),utils.setMaxUIEntries(bootstrapConfig[SN_CONSTANTS.MAX_UI_STORE_ENTRIES]),utils.setStoreLifetime(SN_CONSTANTS.SN_EXIT_HISTORY_STORE_NAME,bootstrapConfig[SN_CONSTANTS.EXIT_HISTORY_LIFETIME]),startRE=bootstrapConfig[BOOTSTRAP_JS_START_RE];var b=bootstrapConfig[BOOTSTRAP_JS_GEO];$undefinedOrNull(b)||(geo=b,$undefinedOrNull(geo.isp)||$undefinedOrNull(geo.isp.geoPrivateIp)||utils.setGeoPrivateIp(geo.isp.geoPrivateIp)),pollingInterval=bootstrapConfig[BOOTSTRAP_JS_POLLING_INTERVAL],$undefinedOrNull(pollingInterval)&&(pollingInterval=1e3),ruleGroupId=bootstrapConfig[BOOTSTRAP_JS_RULE_GROUP_ID],eventOnLoad=bootstrapConfig[BOOTSTRAP_JS_EVENT_ON_LOAD],fsmUpdateVariables=bootstrapConfig[BOOTSTRAP_JS_UPDATES]||[],fsmDeleteVariables=bootstrapConfig[BOOTSTRAP_JS_DELETES]||[],trackableEventMetadatas=bootstrapConfig[BOOTSRAP_JS_TRACKABLE_EVENT_CONFIGS],trackableEvents=bootstrapConfig[BOOTSTAP_JS_TRACKABLE_EVENTS],bootstrapCachingOn=bootstrapConfig[BOOTSTRAP_JS_CACHING_ON],utils.isNewVisitor()&&!$undefinedOrNull(SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_VI_STORE_NAME,SN_CONSTANTS.VISITOR_ID))&&(utils.warn("Second bootstrap call for the same new visitor in different page. Override the vi and sampling info from store"),overrideVIandSamplingInfoFromStore(),utils.makeBSRelatedEventCall(SN_CONSTANTS.SECOND_BOOTSTRAP_FOR_NEW_VISITOR_EVENTID))}function overrideVIandSamplingInfoFromStore(){targetId=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_AS_STORE_NAME,BOOTSTRAP_JS_TARGET_ID),targetPopulationId=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_AS_STORE_NAME,BOOTSTRAP_JS_TARGET_POPULATION_ID),tpRandomNumber=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_RN_STORE_NAME,SN_CONSTANTS.TP_RANDOM_NUMBER),vgRandomNumber=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_RN_STORE_NAME,SN_CONSTANTS.VG_RANDOM_NUMBER),doeRandomNumber=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_RN_STORE_NAME,SN_CONSTANTS.DOE_RANDOM_NUMBER),visitorId=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_VI_STORE_NAME,SN_CONSTANTS.VISITOR_ID),visitorGroup=SN.StoreManager.getValueFromStore(SN_CONSTANTS.SN_AS_STORE_NAME,BOOTSTRAP_JS_VISITOR_GROUP)}function getEventConfig(a){return $undefinedOrNull(eventConfigs)?null:eventConfigs[a]}function savePreconditions(a){preconditions=a[PRECONDITIONS]}function getPreconditions(){return preconditions}function saveGetRulesConfiguration(a){var b=a.ruledata;rules=b[GET_RULES_RULES],initializeGeneratedRuleVariables(b[GENERATED_VARIABLES])}function getFSMUpdateVariables(){return fsmUpdateVariables}function getFSMDeleteVariables(){return fsmDeleteVariables}function getRules(){return rules}function getRuleCustomData(a){return $undefinedOrNull(rules)||$undefinedOrNull(rules[a])?null:rules[a].customdata}function saveGeneratedVariables(a){genVariables=a[GENERATED_VARIABLES];if($undefinedOrNull(genVariables))return;var b=genVariables.length;for(var c=0;c<b;c++){var d=genVariables[c];generatedRuleVariables[d.key]=d}}function getGeneratedRuleVariables(){return generatedRuleVariables}function getGeneratedRuleVariableValue(a){var b=null;return $undefinedOrNull(generatedRuleVariables[a])||(b=generatedRuleVariables[a].value),b}function updateGeneratedRuleVariable(a,b){if($undefinedOrNull(generatedRuleVariables)||$undefinedOrNull(generatedRuleVariables[a]))return;generatedRuleVariables[a].value=b}function updateMappedRuleVariables(a,b){var c=a.mappedvariables;if($undefinedOrNull(c)||$undefinedOrNull(b))return;a.rollingcount>0&&(b=JSON.parse(b));for(var d=0;d<c.length;d++){var e=c[d],f=e.name;if(!$undefinedOrNull(f)){var g=mappedRuleVariables[f];$undefinedOrNull(g)||(a.rollingcount>0?e.mappingindex<b.length&&(g.value=b[e.mappingindex]):g.value=b)}}}function getHandlerConfig(a){var b=ruleConfigs[a];return b==null||b.handlerConfig==null?{}:b.handlerConfig}function getEventhandlerConfig(a){if(a==null)return{};var b=initConfig[INIT_JS_PLATFORM_CONFIGS],c=initConfig[INIT_JS_PRECHAT_CONFIGS],d={};a.platformConfigName!=null&&(d.platformConfig=b[a.platformConfigName]);var e=a.preChatConfigName;return e!=null&&c!=null&&(d.preChatConfig=c[e]),d.handlerType=a.handlerType,d}function getWowpxAppConfigs(){return wowpxAppConfigs}function getTrackableRuleVariables(a,b){var c=getEventMetadata(a);if(!$undefinedOrNull(b)){var d=overrideByRuleEventMetadata(b,a);$undefinedOrNull(d)||(c=d)}return $undefinedOrNull(c)&&(c={ruleVarsToTrack:"r"}),getTrackingRuleVariablesMap(c.ruleVarsToTrack,b)}function getTrackableFSMVariables(a,b){var c=getEventMetadata(a);if(parent.SN.Conf.pspServerType==SN_CONSTANTS.PXOE_SERVER&&!$undefinedOrNull(b)){var d=overrideByRuleEventMetadata(b,a);$undefinedOrNull(d)||(c=d)}if($undefinedOrNull(c)||$undefinedOrNull(c.variables))return null;var e=c.variables,f={},g=e.length,h=SN.SessionManager;for(var i=0;i<g;i++){var j=fsmUpdateVariables.length;for(var k=0;k<j;k++){var l=fsmUpdateVariables[k];if(e[i].key==l.key){var m=h.doGetFSMVariable(l);if(!$undefinedOrNull(m))if(typeof m=="object"&&m.length==undefined)try{var n={};for(var o in m)m.hasOwnProperty(o)&&(m[o]==undefined||m[o]==null||m[o]==="undefined"||m[o]==="null"||m[o]===""?delete m[o]:n[o]=encodeURIComponent(m[o]));f[l.key]=n}catch(p){utils.errorTrack("ErrorInConstructingMapOfMapInFSMVariable ",p)}else l.rollingcount>0&&typeof m!="string"?f[l.key]=encodeURIComponent(JSON.stringify(m)):f[l.key]=encodeURIComponent(m)}}}return f}function overrideByRuleEventMetadata(a,b){var c=getRuleConfig(a);if($undefinedOrNull(c))return null;var d=c[RULE_TRACKABLE_EVENTS];if($undefinedOrNull(d))return null;var e=d[b];if($undefinedOrNull(e))return null;var f=e.config,g=c[RULE_TRACKABLE_EVENT_CONFIGS];return $undefinedOrNull(g)?null:g[f]}function getEventMetadata(a){if($undefinedOrNull(trackableEvents)||$undefinedOrNull(trackableEventMetadatas))return null;var b=trackableEvents[a];return $undefinedOrNull(b)?null:trackableEventMetadatas[b.config]}function getAllRuleVariablesForCurrentPage(){var a={};if(!$undefinedOrNull(generatedRuleVariables))for(var b in generatedRuleVariables)if(generatedRuleVariables.hasOwnProperty(b)){var c=generatedRuleVariables[b];$undefinedOrNull(c.value)||(a[b]=c.value)}if(!$undefinedOrNull(mappedRuleVariables))for(var b in mappedRuleVariables)if(mappedRuleVariables.hasOwnProperty(b)){var d=mappedRuleVariables[b].value;$undefinedOrNull(d)||(a[b]=d)}return a}function getRuleVariablesForRuleId(a){var b={};if($undefinedOrNull(rules))return b;var c=rules[a].genvariables;if(!$undefinedOrNull(c)){var d=c.length;for(var e=0;e<d;e++){var f=c[e],g=generatedRuleVariables[f];b[f]=g.value}}var h=rules[a].mappedvariables;if(!$undefinedOrNull(h)){var d=h.length;for(var e=0;e<d;e++){var f=h[e],i=mappedRuleVariables[f].value;$undefinedOrNull(i)||(b[f]=i)}}return b}function getTrackingRuleVariablesMap(a,b){var c={},d={};if($undefinedOrNull(a))return null;if(a==NO_RULE_VARS_TO_TRACK)return null;if(a==ONLY_THIS_RULES_VARS_TO_TRACK){if($undefinedOrNull(b))return null;c=getRuleVariablesForRuleId(b)}else a==ALL_RULE_VARS_TO_TRACK&&(c=getAllRuleVariablesForCurrentPage());for(var e in c)c.hasOwnProperty(e)&&(d[e]=encodeURIComponent(c[e]));return d}function getMappedRuleVariables(){return mappedRuleVariables}function getMappedRuleVariableValue(a){var b=null;return $undefinedOrNull(mappedRuleVariables[a])||(b=mappedRuleVariables[a].value),b}function getPollingInterval(){return pollingInterval}function getRuleConfig(a){return $undefinedOrNull(ruleConfigs)?null:ruleConfigs[a]}function getWidgetHandlerConfig(a){var b=eventConfigs[a];return b==null||b.handlerConfig==null?{}:b.handlerConfig}function getWidgetConfig(a){if($undefinedOrNull(widgetConfigs))return null;var b=getRuleConfig(a);if($undefinedOrNull(b))return null;var c=b[INIT_JS_WIDGET_CONFIG_NAME];return $undefinedOrNull(c)?null:widgetConfigs[c]}function getWowpxWidgetConfigs(a){return $undefinedOrNull(a)?null:widgetConfigs[a]}function getRuleGroupId(){return ruleGroupId}function getOnLoadEvent(){return eventOnLoad}function initPageId(pageIdExpression){try{isActionPage()||$undefinedOrNull(initConfig[INIT_JS_PAGE_ID])?pageId=SN.ChildWindowController.getContext():pageId=eval(pageIdExpression)}catch(err){utils.error("Failed to evaluate pageid expression: "+pageIdExpression,err),pageId=undefined}}function initTrackId(trackIdExpression){try{isActionPage()?trackId=SN.ChildWindowController.getContext():trackId=eval(trackIdExpression)}catch(err){utils.error("Failed to evaluate trackingid expression: "+trackIdExpression,err),trackId=undefined}}function getTrackId(){return trackId}function getVisitorGroup(){return visitorGroup}function getServerTimeStamp(){return serverTimeStamp}function getClientTimeZoneOffset(){return clientTimeZoneOffset}function getTargetId(){return targetId}function getTargetPopulationId(){return targetPopulationId}function getDOERandomNumber(){return doeRandomNumber}function getTPRandomNumber(){return tpRandomNumber}function getVGRandomNumber(){return vgRandomNumber}function getActiveSessionLifeTime(){return asLifeTime}function getRandomNoLifeTime(){return rnLifeTime}function getRepeatVisitorLifetime(){return repeatVisitorLifetime*1e3}function getSamplingStorage(){return"as"}function getVisitorId(){return visitorId}function shouldStartRE(){return startRE}function getFSMState(){return bootstrapConfig[BOOTSTRAP_JS_STATE]}function getPageId(){return pageId}function getPSPKey(){return pspKey}function setPSPKey(a){pspKey=a}function getPSPVersion(){return utils.getPSPVersion()}function setPSPVersion(a){pspVersion=a}function getPSPRoot(){return utils.getPSPRoot()}function getPSPWebContentUrl(){return utils.getPSPWebContentUrl()}function getPSPStaticRoot(){return pspStaticRoot}function setPSPStaticRoot(a){pspStaticRoot=a}function getPageConfig(a){return $undefinedOrNull(pageConfigs)?null:pageConfigs[a]}function getHotSpots(a){var b=getPageConfig(a);return $undefinedOrNull(b)?null:b.hotspots}function getGeoInfo(){return geo||{}}function getParamsToBePassedToChat(a){return SN.ParamsToChat||[]}function setActionPageURL(a){actionPageURL=a}function getActionPageURL(){return actionPageURL}function initializeGeneratedRuleVariables(a){var b=a.length;for(var c=0;c<b;c++){var d=a[c];generatedRuleVariables[d.key]=d}}function initializeMappedRuleVariables(a){var b=a.length;for(var c=0;c<b;c++)mappedRuleVariables[a[c].key]=a[c]}function getConversionTrackingIdIS(){return initConfig.conversionTrackingIdIS}function getAllVisitorTags(a){a.vg=getVisitorGroup(),a.vi=getVisitorId(),a.ti=getTargetId(),a.tp=getTargetPopulationId(),a.re=getDOERandomNumber()}function isBootstrapCachingOn(){return bootstrapCachingOn}function isXDChannelReady(){return xdChannelReady}function isMigrationDone(){return migrationDone}function setMigrationFlag(a){migrationDone=a}function setXDChannelReady(a){xdChannelReady=a}function getVisitedUrlLimit(){return VISITED_URL_LIMIT}function getUrlsLimit(){return VISITED_URLS_COUNT}var INIT_JS_PSP_KEY="pspkey",INIT_JS_PAGE_ID="pageid",INIT_JS_TRACK_ID="trackid",INIT_JS_PAGE_CONFIGS="pageconfigs",INIT_JS_SCC_APP_CONFIGS="sccAppConfigs",INIT_JS_WOWPX_APP_CONFIGS="wowpxAppConfigs",INIT_JS_SCC_MODULE_CONFIGS="sccModuleConfigs",INIT_JS_WIDGET_CONFIGS="widgetconfigs",INIT_JS_PLATFORM_CONFIGS="chatPlatformConfigs",INIT_JS_PRECHAT_CONFIGS="preChatConfigs",INIT_JS_WIDGET_CONFIG_NAME="widgetConfigName",INIT_JS_MAPPED_RULE_VARIABLES="mappedrulevariables",BOOTSTRAP_JS_VISITOR_ID="vi",BOOTSTRAP_JS_START_RE="startRE",BOOTSTRAP_JS_VISITOR_GROUP="vg",BOOTSTRAP_JS_SERVER_TIME_STAMP="serverTimeStamp",BOOTSTRAP_JS_CLIENT_TIMEZONE_OFFSET="clientTimeZoneOffset",BOOTSTRAP_JS_TARGET_ID="ti",BOOTSTRAP_JS_TARGET_POPULATION_ID="tp",BOOTSTRAP_JS_POLLING_INTERVAL="poll",BOOTSTRAP_JS_RULE_CONFIGS="ruleconfigs",BOOTSTRAP_JS_STATE="newState",BOOTSTRAP_JS_UPDATES="updates",BOOTSTRAP_JS_DELETES="deletes",BOOTSTRAP_JS_RULE_GROUP_ID="rgid",BOOTSTRAP_JS_GEO="geo",BOOTSTRAP_JS_EVENT_ON_LOAD="onload",BOOTSRAP_JS_TRACKABLE_EVENT_CONFIGS="trackableEvtCfgs",BOOTSTAP_JS_TRACKABLE_EVENTS="trackableEventIds",BOOTSTRAP_JS_CACHING_ON="bootstrapCachingOn",BOOTSTRAP_JS_EVENT_CONFIGS="eventconfigs",PRECONDITIONS="preconditions",GET_RULES_RULES="rules",GENERATED_VARIABLES="generatedvariables",RULE_TRACKABLE_EVENT_CONFIGS="trackableEvtCfgs",RULE_TRACKABLE_EVENTS="trackableEventIds",NO_RULE_VARS_TO_TRACK="n",ONLY_THIS_RULES_VARS_TO_TRACK="r",ALL_RULE_VARS_TO_TRACK="a",VISITED_URL_LIMIT=60,VISITED_URLS_COUNT=5,initConfig={},bootstrapConfig={},pspStaticRoot=null,pspKey=null,pageId=null,trackId=null,rules={},preconditions={},generatedRuleVariables={},mappedRuleVariables={},pollingInterval=null,eventConfigs=[],ruleConfigs=[],widgetConfigs={},sccAppConfigs={},wowpxAppConfigs={},sccModuleConfigs={},trackableEventMetadatas=[],trackableEvents=[],fsmUpdateVariables=null,fsmDeleteVariables=null,eventOnLoad=null,ruleGroupId=null,geo=null,clientTs=null,pageConfigs=null,actionPageURL=null,pspVersion=null,visitorId=null,startRE=null,visitorGroup=null,serverTimeStamp=null,clientTimeZoneOffset=null,targetPopulationId=null,tpRandomNumber=null,doeRandomNumber=null,vgRandomNumber=null,asLifeTime=null,rnLifeTime=null,samplingStorage=null,targetId=null,bootstrapParams=null,runtimeFSMVariables={},repeatVisitorLifetime=null,bootstrapCachingOn=!1,xdChannelReady=!1,migrationDone=!1,utils=SN.Utils,SN_CONSTANTS=SN.Constants,me={getRuntimeFSMVarValue:getRuntimeFSMVarValue,setRuntimeFSMVarValue:setRuntimeFSMVarValue,isActionPage:isActionPage,getActionContext:getActionContext,saveInitConfiguration:saveInitConfiguration,saveBootstrapConfiguration:saveBootstrapConfiguration,saveGetRulesConfiguration:saveGetRulesConfiguration,getEventConfig:getEventConfig,getWidgetHandlerConfig:getWidgetHandlerConfig,getFSMUpdateVariables:getFSMUpdateVariables,getFSMDeleteVariables:getFSMDeleteVariables,getRules:getRules,getRuleCustomData:getRuleCustomData,saveGeneratedVariables:saveGeneratedVariables,getGeneratedRuleVariables:getGeneratedRuleVariables,getGeneratedRuleVariableValue:getGeneratedRuleVariableValue,updateGeneratedRuleVariable:updateGeneratedRuleVariable,updateMappedRuleVariables:updateMappedRuleVariables,getHandlerConfig:getHandlerConfig,getEventhandlerConfig:getEventhandlerConfig,getTrackableRuleVariables:getTrackableRuleVariables,getTrackableFSMVariables:getTrackableFSMVariables,getMappedRuleVariables:getMappedRuleVariables,getMappedRuleVariableValue:getMappedRuleVariableValue,getPollingInterval:getPollingInterval,getRuleConfig:getRuleConfig,getRuleGroupId:getRuleGroupId,getOnLoadEvent:getOnLoadEvent,getTrackId:getTrackId,getVisitorGroup:getVisitorGroup,getServerTimeStamp:getServerTimeStamp,getClientTimeZoneOffset:getClientTimeZoneOffset,getTargetId:getTargetId,getTargetPopulationId:getTargetPopulationId,getDOERandomNumber:getDOERandomNumber,getTPRandomNumber:getTPRandomNumber,getVGRandomNumber:getVGRandomNumber,getActiveSessionLifeTime:getActiveSessionLifeTime,getRandomNoLifeTime:getRandomNoLifeTime,getRepeatVisitorLifetime:getRepeatVisitorLifetime,getSamplingStorage:getSamplingStorage,getVisitorId:getVisitorId,getAllVisitorTags:getAllVisitorTags,shouldStartRE:shouldStartRE,getFSMState:getFSMState,getPageId:getPageId,getPSPKey:getPSPKey,setPSPKey:setPSPKey,getPSPVersion:getPSPVersion,setPSPVersion:setPSPVersion,getPSPRoot:getPSPRoot,setPSPStaticRoot:setPSPStaticRoot,getPSPStaticRoot:getPSPStaticRoot,getPSPWebContentUrl:getPSPWebContentUrl,getHotSpots:getHotSpots,getGeoInfo:getGeoInfo,setActionPageURL:setActionPageURL,getActionPageURL:getActionPageURL,getConversionTrackingIdIS:getConversionTrackingIdIS,getWowpxAppConfigs:getWowpxAppConfigs,getWowpxWidgetConfigs:getWowpxWidgetConfigs,getBootstrapParams:getBootstrapParams,setBootstrapParams:setBootstrapParams,isBootstrapCachingOn:isBootstrapCachingOn,isXDChannelReady:isXDChannelReady,setXDChannelReady:setXDChannelReady,isMigrationDone:isMigrationDone,setMigrationFlag:setMigrationFlag,getVisitedUrlLimit:getVisitedUrlLimit,getUrlsLimit:getUrlsLimit,savePreconditions:savePreconditions,getPreconditions:getPreconditions};return me}(),typeof SN=="undefined"&&(SN={}),SN.XDFrameMessagingUtils=function(){function f(a,c,f){try{if(!c)return;a=typeof a=="string"?a:encodeURIComponent(JSON.stringify(a).split(" ").join("")),f=f||parent,e&&f[b](a,c.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}catch(g){d.error("errorWhileMakingPostMessage call to XD Iframe with message:"+a,g)}}function g(b,f,g){try{e&&(a[c]?a.addEventListener("message",b,!1):a.attachEvent("onmessage",b))}catch(h){d.error("errorWhilereceivingMessage from XD Iframe:"+h)}}var a=this,b="postMessage",c="addEventListener",d=SN.Utils,e=a[b],h={postMessage:f,receiveMessage:g};return h}(),typeof SN=="undefined"&&(SN={}),SN.Store=function(){function i(){var a=e.length;for(var c=0;c<a;c++){var d=e[c],i=h[d];if(i.test()){f=i,g=d;break}}if(f==null){var j="No client side storage could be obtained on this browser, falling back to cookie storage.";parent.SN.UserAgentParser.isSafariPrivateBrowsingMode()&&(j+=" This is Safari Private Browsing Mode"),b.errorTrack(j,navigator.userAgent),b.setAvailableStore("cookie")}else f.init(),b.setAvailableStore(l())}function j(){return Object.isUndefined(f)||f==null?!1:f.isReady()}function k(a){if(Object.isUndefined(a)||a==null)throw"Invalid store id";return new m(a)}function l(){return g}var a=SN.Constants,b=SN.Utils,c="SN",d=c+"_user_data",e=["localstorage","ie"],f=null,g=null,h={ie:{test:function(){return window.ActiveXObject?!0:!1},init:function(){var a=document.createElement("div");a.id=d+"-div",a.addBehavior("#default#userData"),document.body.appendChild(a),this.el=a,this.el.load(d)},key:function(a,b){return encodeURIComponent(a)+encodeURIComponent(b)},get:function(a,b){return $undefinedOrNull(b)?this.el.getAttribute(a):this.el.getAttribute(this.key(b,a))},set:function(a,b,c){if($undefinedOrNull(c))this.el.setAttribute(a,b);else{var e=this.key(c,a);this.el.setAttribute(e,b)}return this.el.save(d),b},remove:function(a,b){var c;if($undefinedOrNull)c=this.el.removeAttribute(a);else{var e=this.key(b,a);c=this.el.removeAttribute(e)}return this.el.save(d),c},clear:function(a){var b=encodeURIComponent(a),c=this.el,e=c.xmlDocument,f=e.firstChild.attributes,g=f.length;while(g>0){var h=f[--g],i=h.nodeName;i.indexOf(b)===0&&c.removeAttribute(i)}c.save(d)},isReady:function(){return typeof this.el!=a.UNDEFINED_STR&&this.el!=null}},localstorage:{test:function(){if(!window.localStorage)return!1;try{var a="test";return localStorage.setItem(a,"1"),localStorage.removeItem(a),!0}catch(b){return!1}},init:function(){this.store=window.localStorage},key:function(a,b){return $undefinedOrNull(b)?encodeURIComponent(a):encodeURIComponent(b)+encodeURIComponent(a)},get:function(a,b){return $undefinedOrNull(b)?this.store.getItem(a):this.store.getItem(this.key(b,a))},set:function(a,b,c){return $undefinedOrNull(c)?this.store.setItem(a,b):this.store.setItem(this.key(c,a),b)},remove:function(a,b){return $undefinedOrNull(b)?this.store.removeItem(a):this.store.removeItem(this.key(b,a))},clear:function(a){var b=encodeURIComponent(a);for(var c=0;c<localStorage.length;c++){var d=localStorage.key(c);d.indexOf(b)===0&&(localStorage.removeItem(d),c--)}},isReady:function(){return this.store!=null}}},m=function(a){var b=a;this.get=function(a){return f.get(a)},this.set=function(a,b){return f.set(a,b)},this.remove=function(a){return f.remove(a)},this.clear=function(){f.clear(b)}},n={isReady:j,getStore:k,getType:l};return i(),n}(),$undefined(SN)&&(SN={}),SN.EventManager=function(){function e(d,e){b.observe(a.EVENT_PREFIX+d,function(b){b.memo.st=(new Date).getTime();try{e(b),b.memo.status=a.ACTION_COMPLETED}catch(f){c.debug("Error occurred while evaluating handler for: ",d," eventId: ",b.memo.eventId,f)}})}function f(c,e){$undefinedOrNull(e)&&(e={}),$undefinedOrNull(e.data)&&(e.data={}),e[a.SEQUENCE_ID]=d++;var f=a.EVENT_PREFIX+c;b.fire(f,e)}function g(b,c){$undefinedOrNull(b)&&(b={});var d=b.ed;$undefinedOrNull(d)&&(d={exceptionMsg:"unknown exception"}),d.x=!0,$undefinedOrNull(c)||(d.exceptionMsg=c),b.ed=d;var e={eventId:a.INTERNAL_ERROR,data:b};f(a.EXCEPTION_EVENT,e)}var a=SN.Constants,b=document,c=SN.Utils,d=0,h={observe:e,fire:f,fireException:g};return h}(),typeof SN=="undefined"&&(SN={}),SN.CrossXDataHandler=function(){function m(){var c=b.getType();c==e.IE_STORAGE&&(a=!1)}function n(){c.info("Setting Reference protocol to "+document.location.protocol),g="https://"+SN.Utils.getPSPServerName(),c.setPSPServerUrl(g),j=c.getClientKey(),m(),a?(SN.XDFrameMessagingUtils.receiveMessage(p,g),q()):o()}function o(){f=!0,d.setXDChannelReady(f)}function p(a){var b=null,g=null,h=a.data.split("&");for(var j=0;j<h.length;j++)h[j].indexOf("cmd")===0&&(b=h[j].replace("cmd=","")),h[j].indexOf("params")===0&&(g=h[j].replace("params=",""));if(b==e.IFRAME_LOADED){var a=JSON.parse(g);if(a.loaded==e.REFERENCE_LOADED_ITEM){c.infoTrack("onXDIframeLoaded"),f=!0,d.setXDChannelReady(f),a.data&&a.data.err=="xdStorageUnavailable"?(delete a.data.err,c.setXdStorageSupported(!1)):i.getBrowserType()=="s"&&i.getOSType().indexOf("iOS")<0?c.setXdStorageSupported(!1):c.setXdStorageSupported(!0),k.fire(e.XD_CHANNEL_READY_EVENT,{eventId:e.XD_CHANNEL_READY_EVENT,isXdStorageAvailable:c.isXdStorageAvailable()});if(c.isCrossDomainSupported()){var m=a.data;a.expired&&SN.StoreManager.forceExpireStores(a.expired),SN.StoreManager.setCrossDomainData(m),d.setMigrationFlag(!0)}parent.SN.Conf.dataStore!="server",c.info("XD Iframe is ready for communication"),window.xdready=!0}}else if(b==e.GET_LOCAL_STORAGE_ITEM){var a=JSON.parse(g),n=a.uniqueId,o=a.value,p=l[n];if($undefinedOrNull(p))return;try{delete l[n],p(a.key,o)}catch(q){c.error("failed to make call back for key :"+a.key)}}else if(b==e.SET_LOCAL_STORAGE_ITEM){var a=JSON.parse(g),n=a.uniqueId,p=l[n];if($undefinedOrNull(p))return;try{delete l[n],p(a.key)}catch(q){c.error("failed to make call back for key :"+a.key)}}else{if(b!=e.REMOVE_LOCAL_STORAGE_ITEM)return;var a=JSON.parse(g),n=a.uniqueId,p=l[n];if($undefinedOrNull(p))return;try{delete l[n],p(a.key)}catch(q){c.error("failed to make call back for key :"+a.key)}}}function q(){c.infoTrack("b4CreateXDIframe");var a=null;location.port?a=e.PARENT_DOMAIN+"="+location.protocol+"//"+location.hostname+":"+location.port+"&clientkey="+j+"&version="+parent.SN.Conf.CONST_CDN_VERSION+"&pspv="+parent.SN.Conf.CONST_PSP_VERSION+"&n=1&caller=refloaded"+"&l="+c.getLogLevel()+"&s="+parent.SN.Conf.dataStore+"&vf="+c.isVidBasedonfpid()+"&cln="+parent.SN.Conf.CustomStoresToBeCleanedUp.join("~")+"&cs="+Object.keys(parent.SN.Conf.customStoresAndLifeTimesToBeRegistered).join("~"):a=e.PARENT_DOMAIN+"="+location.protocol+"//"+location.hostname+"&clientkey="+j+"&version="+parent.SN.Conf.CONST_CDN_VERSION+"&pspv="+parent.SN.Conf.CONST_PSP_VERSION+"&n=1&caller=refloaded"+"&l="+c.getLogLevel()+"&s="+parent.SN.Conf.dataStore+"&vf="+c.isVidBasedonfpid()+"&cln="+parent.SN.Conf.CustomStoresToBeCleanedUp.join("~")+"&cs="+Object.keys(parent.SN.Conf.customStoresAndLifeTimesToBeRegistered).join("~");var b=new Element("div");document.body.appendChild(b),Element.hide(b),h=new Element("iframe",{id:e.REFERENCE_IFRAME_ID,name:e.REFERENCE_IFRAME_NAME,frameborder:"0",width:"0px",height:"0px"});var d=g+c.getPsdxdPath()+"#";h.src=d+a;try{b.appendChild(h)}catch(i){c.error("issue in creating the iFrame"+i),f=!1}}function r(b){if(!a)return;var d={};d.cmd=e.SET_XD_DATA,d.params=b;var f=document.getElementById(e.REFERENCE_IFRAME_ID);SN.XDFrameMessagingUtils.postMessage(JSON.stringify(d),c.getPSPServerUrl(),f.contentWindow)}function s(b,d){if(!a)return;var f=c.getUniqueId();l[f]=d;var g={};if(b==undefined||b==null||b=={}||b=="{}")b={};g.cmd="getXdData",b.reqId=f,g.params=b;var h=document.getElementById(e.REFERENCE_IFRAME_ID);SN.XDFrameMessagingUtils.postMessage(JSON.stringify(g),c.getPSPServerUrl(),h.contentWindow)}function t(b,d,f,g){if($undefinedOrNull(b)||$undefinedOrNull(d)||$undefinedOrNull(f)||isNaN(f))return;if(!a)return;var h=c.getUniqueId();l[h]=g;var i={};i.cmd=e.SET_LOCAL_STORAGE_ITEM;var j={};j.key=b,j.value=d,j.lifeTime=f,j.uniqueId=h,i.params=j;var k=document.getElementById(e.REFERENCE_IFRAME_ID);SN.XDFrameMessagingUtils.postMessage(JSON.stringify(i),c.getPSPServerUrl(),k.contentWindow)}function u(b,d){if(!a)return;var f=c.getUniqueId();l[f]=d;var g={};g.cmd=e.GET_LOCAL_STORAGE_ITEM;var h={};h.key=b,h.uniqueId=f,g.params=h;var i=document.getElementById(e.REFERENCE_IFRAME_ID);SN.XDFrameMessagingUtils.postMessage(JSON.stringify(g),c.getPSPServerUrl(),i.contentWindow)}function v(b,d){if(!a)return;var f=c.getUniqueId();l[f]=d;var g={};g.cmd=e.REMOVE_LOCAL_STORAGE_ITEM;var h={};h.key=b,h.uniqueId=f,g.params=h;var i=document.getElementById(e.REFERENCE_IFRAME_ID);SN.XDFrameMessagingUtils.postMessage(JSON.stringify(g),c.getPSPServerUrl(),i.contentWindow)}var a=!0,b=SN.Store,c=SN.Utils,d=SN.ConfigurationManager,e=SN.Constants,f=!1,g=null,h=null,i=parent.SN.UserAgentParser,j=null,k=SN.EventManager,l={};k.observe(e.CUSTOM_INITIALIZATION_COMPLETED,n);var w={sendXDData:r,getXdData:s,setLocalStorageItem:t,getLocalStorageItem:u,removeLocalStorageItem:v};return w}(),SN.PSPCustomTrackingUtil=function(){function setTrackingVariableMap(a){trackingVariableMap=a}function fireCustomEvent(a,b,c){if(c==null||c==undefined)c=SN_CONSTANTS.CUSTOM_EVENT_FIRED;eventManager.fire(SN_CONSTANTS.CUSTOM_EVENT,{eventId:c,data:{f:a,ed:b}})}function trackVariables(){var varMap=trackingVariableMap;if($undefinedOrNull(varMap))return;var extraData={},hasProperties=!1;for(var key in varMap)if(varMap.hasOwnProperty(key))try{var value=eval("varMap[key]");$undefinedOrNull(value)||(extraData[key]=value,hasProperties=!0)}catch(e){utils.error("PS: error in getting value for: "+key)}hasProperties&&fireCustomEvent(null,extraData,trackVarMapEventCode)}function trackUrlChange(){var a=parent.document.location.href;try{if(a!=lastUrlHash){var b={newUrl:a,olderUrl:lastUrlHash};fireCustomEvent(null,b,urlChangeEventCode),lastUrlHash=a}}catch(c){utils.warn("Exception in SN.CustomScript.trackUrlChange : "+c)}}function startPoller(a,b,c,d){trackingVariableMapFlag=b,trackingUrlFlag=c,lastUrlHash=d,clearPoller(),customPollingInterval=a,SN.EventManager.observe(SN.Constants.BOOTSTRAP_COMPLETED_EVENT,startTracking)}function clearPoller(){null!=pollerFlag&&(clearInterval(pollerFlag),pollerFlag=null)}function startTracking(){clearPoller();var a=setInterval(function(){getTrackingUrlFlag()&&trackUrlChange(),getTrackingVariableMapFlag()&&trackVariables()},customPollingInterval)}function getTrackingUrlFlag(){return trackingUrlFlag}function getTrackingVariableMapFlag(){return trackingVariableMapFlag}var eventManager=SN.EventManager,SN_CONSTANTS=SN.Constants,utils=SN.Utils,trackingVariableMap={},customPollingInterval=null,trackingUrlFlag=!1,lastUrlHash=null,urlChangeEventCode=100009,trackVarMapEventCode=100011,pollerFlag=!1,me={fireCustomEvent:fireCustomEvent,startPoller:startPoller,setTrackingVariableMap:setTrackingVariableMap};return me}(),$undefined(SN)&&(SN={}),SN.CookieManager=function(){function k(c){B(b.SN_WEBTRACKER_STORE_NAME)&&z(b.SN_WEBTRACKER_STORE_NAME),B(b.SN_EXIT_HISTORY_STORE_NAME)&&z(b.SN_EXIT_HISTORY_STORE_NAME),c+=" Dropping cookies ",D()?(c+="sn.eh, sn.vc and sn.wt if existing",a.warn(c)):parent.SN.Conf.DISABLED_COOKIES.length>0&&(c+=l(parent.SN.Conf.DISABLED_COOKIES)+" if existing",a.warn(c))}function l(a){var b=a.length,c=new String;for(var d=0;d<b;d++)d>0&&(d<b-1?c+=", ":c+=" and "),c+=a[d];return c}function m(){var c={},d={};for(var e=0;e<j.length;e++){if(j[e]==b.SN_WEBTRACKER_STORE_NAME&&B(b.SN_WEBTRACKER_STORE_NAME)){a.warn("inOnBootstrapUpdateCompleted : "+b.SN_WEBTRACKER_STORE_NAME+" cookie disabled ");continue}d.cvalue=t(j[e]),$undefinedOrNull(d.cvalue)||(d.clifetime=a.getStoreLifetime(j[e]),c[j[e]]=d),d={}}var f=parent.SN.Conf.customStoresAndLifeTimesToBeRegistered;for(var g in f)f.hasOwnProperty(g)&&(d.cvalue=t(g),$undefinedOrNull(d.cvalue)||(d.clifetime=a.getStoreLifetime(g),c[g]=d),d={});return c}function n(){if(B(b.SN_VARIABLE_STORE_NAME))return;var c={},d={},e=null,f=null;return d.cvalue=t(b.SN_VARIABLE_STORE_NAME),d.clifetime=a.getStoreLifetime(b.SN_VARIABLE_STORE_NAME),c[b.SN_VARIABLE_STORE_NAME]=d,$undefinedOrNull(d.cvalue)?null:c}function o(){if(B(b.SN_AS_STORE_NAME))return;var c={},d={},e=null,f=null;return d.cvalue=t(b.SN_AS_STORE_NAME),d.clifetime=a.getStoreLifetime(b.SN_AS_STORE_NAME),c[b.SN_AS_STORE_NAME]=d,$undefinedOrNull(d.cvalue)?null:c}function p(){var d=parent.SN.Conf.MAX_COOKIE_SIZE,e=(t(b.SN_AS_STORE_NAME)+t(b.SN_VI_STORE_NAME)+t(b.SN_WEBTRACKER_STORE_NAME)+t(b.SN_RN_STORE_NAME)+t(b.SN_ADP_STORE_NAME)+t(b.SN_EXIT_HISTORY_STORE_NAME)+t(b.SN_DS_STORE_NAME)+t(b.SN_VARIABLE_STORE_NAME)).length;e>=d&&a.errorTrack("Cookie storage size greater than "+parent.SN.Conf.MAX_COOKIE_SIZE+" characters");if(!c){var f=document.cookie.split(";").length;!D()&&f>=parent.SN.Conf.MAX_COOKIE_COUNT_THRESHOLD?(c=!0,C(!0),k("Maximum cookie threshold reached")):D()&&f<=parent.SN.Conf.MIN_COOKIE_COUNT_THRESHOLD&&(C(!1),a.warnTrack("Minimum cookie threshold reached. Enabling creation of all cookies (except those in the disabled list)"))}}function q(c){for(var d in c)if(c.hasOwnProperty(d)){if(d==b.SN_EXIT_HISTORY_STORE_NAME||d==b.SN_WEBTRACKER_STORE_NAME||d==b.SN_VARIABLE_STORE_NAME)if(B(d)){a.warn("inSetCookies : "+d+" cookie disabled. So skipping cookie creation");continue}var e=c[d].cvalue;if(e===""||$undefinedOrNull(e)||e==undefined)continue;var f=c[d].clifetime,h={};$undefinedOrNull(f)||(h.time=parseInt(f));var i=E();if(i!=null&&i.length>0)for(var j=0;j<i.length;j++){var k="."+i[j];if(document.domain==i[j]||a.isSubDomain(document.domain,k))h.domain=k}if($undefinedOrNull(h.domain)&&i!=null&&i.length>0)for(var j=0;j<i.length;j++){var k="."+i[j];document.location.href.replace(/https?:\/\//,"").indexOf(i[j])===0&&(h.domain=k)}$undefinedOrNull(h.domain)&&(h.domain="."+document.domain);var l={};if(d==b.SN_VI_STORE_NAME||d==b.SN_ETC_STORE_NAME){var m=e.split(b.KEY_SEPERATOR);for(j=0;j<m.length;j++){var n=m[j].split(b.KEY_VALUE_SEPERATOR),o=n[0];e=n[1];if(parent.SN.Conf.viStore=="localstorage"&&a.isViStoreData(d,o))g.setValueInStore(d,o,e);else{if(o==b.ACTIVE_SESSION){var p=v(b.SN_VI_STORE_NAME,b.ACTIVE_SESSION);p>e&&(e=p)}l[o]=e}}e=null;for(var q in l)l.hasOwnProperty(q)&&($undefinedOrNull(e)?e=q+b.KEY_VALUE_SEPERATOR+l[q]+b.KEY_SEPERATOR:e=e+q+b.KEY_VALUE_SEPERATOR+l[q]+b.KEY_SEPERATOR);$undefinedOrNull(e)||(e.length>1&&(e=e.substring(0,e.length-1)),s(d,e,h))}else s(d,e,h)}}function r(){k("Reading DROPPED_COOKIES from conf"),parent.SN.Conf.viStore=="localstorage"&&(g=new SN.LocalStorageWrapper)}function s(b,c,d,e){if((parent.SN.Conf.dataStore=="server"||a.isVidBasedonfpid())&&!a.isViStoreData(b)&&$undefinedOrNull(e)){a.warnTrack("CreateCookieAPICalled",{cookieName:b,cookieValue:c});return}$undefinedOrNull(d)&&(d={});var f=[];c=A(c),f.push(a.augmentKeyValuePair(b,c));if(!$undefinedOrNull(d.time)){var g=new Date;g.setTime(g.getTime()+d.time),f.push(a.augmentKeyValuePair("expires",e?"Thu, 01 Jan 1970 00:00:01 GMT":g.toGMTString()))}$undefinedOrNull(d.path)&&(d.path="/"),f.push(a.augmentKeyValuePair("path",d.path));if($undefinedOrNull(d.domain)){var h=E();if(h!=null&&h.length>0)for(var i=0;i<h.length;i++){var j="."+h[i];if(document.domain==h[i]||a.isSubDomain(document.domain,j))d.domain=j}if($undefinedOrNull(d.domain)&&h!=null&&h.length>0)for(var i=0;i<h.length;i++){var j="."+h[i];document.location.href.replace(/https?:\/\//,"").indexOf(h[i])===0&&(d.domain=j)}$undefinedOrNull(d.domain)&&(d.domain="."+document.domain)}f.push(a.augmentKeyValuePair("domain",d.domain)),document.cookie=f.join("; ")}function t(a){var b=a+"=",c=document.cookie.split(";");for(var d=0;d<c.length;d++){var e=c[d];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(b)===0)return e.substring(b.length,e.length)}return null}function u(a){var b={};b.time=-864e5,b.path="/",eraseFlag=!0,s(a,"",b,eraseFlag)}function v(a,c){var d=unescape(t(a));if(c==null)return d;if(d==null)return null;var e=d.split(b.KEY_SEPERATOR),f=c+b.KEY_VALUE_SEPERATOR;for(var g=0;g<e.length;g++){var h=e[g];if(h.indexOf(f)===0){var i=h.substring(f.length,h.length);return i}}return null}function w(a,c,d){var e=t(a);if($undefinedOrNull(e)||e.indexOf(c)==-1)return;var f=e.split(b.KEY_SEPERATOR),g="";for(var h=0;h<f.length;h++){var i;i=f[h].split(b.KEY_VALUE_SEPERATOR)[0],i!=c&&(g+=f[h],h!=f.length-1&&(g+=b.KEY_SEPERATOR))}g.charAt(g.length-1)==b.KEY_SEPERATOR&&(g=g.substring(0,g.length-1));var j={};$undefinedOrNull(d)||(j.time=d),s(a,g,j)}function x(c,d,e){var f="",g="",h=!1,i=!0,j=t(c);j==null&&(j="");var k="";if(typeof e=="string"){var l=e.split(b.KEY_SEPERATOR).join("").split(b.KEY_VALUE_SEPERATOR).join("");l!=e&&SN.Utils.warnTrack("Cookie Key-Value Separtor found inside the value. Removed.",{oldValue:e}),e=l}var m=null,n=!0,o=j.split(b.KEY_SEPERATOR),p=d+b.KEY_VALUE_SEPERATOR;for(var q=0;q<o.length;q++){var r=o[q];if(r=="")continue;if(r.indexOf(p)===0){h=!0,m=r.substring(p.length,r.length);if(m==e){n=!1;break}}else h?g=g+b.KEY_SEPERATOR+r:i?(f=r,i=!1):f=f+b.KEY_SEPERATOR+r}if(n){e==null?k=f+g:f==""?k=p+e+g:k=f+b.KEY_SEPERATOR+p+e+g;var u={};if(c==parent.SN.Conf.viStoreName&&parent.SN.Conf.isViStoreSession==1)u.time=null;else{var v=a.getStoreLifetime(c);$undefinedOrNull(v)&&(v=b.DEFAULT_STORE_LIFETIME_MAP[c]),$undefinedOrNull(v)||(u.time=v)}s(c,k,u)}}function y(a,b){if($undefinedOrNull(v(a,b)))return;return x(a,b),!0}function z(a){return document.cookie.indexOf(a)>-1?(u(a),1):0}function A(b){if(typeof b!="string")return b;var c=b,e=d.length;for(var f=0;f<e;++f)c=c.split(d[f]).join("");return c!=b&&a.errorTrack("InvalidCharatersInCookie: was "+encodeURIComponent(b)+", changed to "+encodeURIComponent(c)+".",{}),c}function B(a){if(D())return!0;if($undefinedOrNull(parent.SN.Conf.DISABLED_COOKIES))return!1;if(undefined!=parent.SN.Conf.DISABLED_COOKIES.indexOf)return parent.SN.Conf.DISABLED_COOKIES.indexOf(a)>-1;for(var b=0;b<parent.SN.Conf.DISABLED_COOKIES.length;b++)if(parent.SN.Conf.DISABLED_COOKIES[b]==a)return!0;return!1}function C(a){e=a}function D(){return e}function E(){return parent.SN.Conf.COOKIEPATH}function F(b,c){var d=null;if(parent.SN.Conf.viStore=="localstorage"&&a.isViStoreData(b,c)&&!$undefinedOrNull(c))d=g.getValueFromStore(b,c);else try{d=v(b,c)}catch(e){return a.error("Error in getting value from store using cookieStore as dataStore : ",e),d}return d}function G(c,d,e){e=H(c,d,e),c==b.SN_VARIABLE_STORE_NAME&&typeof e!="string"&&(e=JSON.stringify(e));if(parent.SN.Conf.viStore!="localstorage"||!a.isViStoreData(c,d)){x(c,d,e);if(a.isCrossDomainSupported()&&h.isXDChannelReady()){var f={},j={};j.cvalue=v(c),j.clifetime=a.getStoreLifetime(c),f[c]=j,i.sendXDData(f)}return e}g.setValueInStore(c,d,e)}function H(c,d,e){if(B(c))return null;if(c==b.SN_VARIABLE_STORE_NAME&&!$undefinedOrNull(e)&&e.length>f){var g={};g[d]=e,a.infoTrack("TooLongFsmValue",g);try{e=SN.CustomScript.getEncodedValue(e)}catch(h){a.errorTrack("errorInEncodingFSM for FSM "+e,h)}!$undefinedOrNull(e)&&e.length>f&&(a.errorTrack('StillTooLongFSMValue: Map not available. Trimmed to "'+e.slice(0,f)+'"',g),e=e.slice(0,f))}return e}function I(a,b){$undefinedOrNull(b)&&u(a),y(a,b)}function J(a,c){x(b.SN_VARIABLE_STORE_NAME,a,c)}function K(){var a=F(b.SN_VI_STORE_NAME,b.DATA_CLEAN_UP_DONE_FOR_FPID_KEY),c=-1;a!=null&&(c=a.indexOf("c"));if(c==-1||a==null)L(),I(b.SN_VI_STORE_NAME),a==null&&(a=""),G(b.SN_VI_STORE_NAME,b.DATA_CLEAN_UP_DONE_FOR_FPID_KEY,a+"c")}function L(){var a=[b.SN_AS_STORE_NAME,b.SN_RN_STORE_NAME,b.SN_ADP_STORE_NAME,b.SN_DS_STORE_NAME,b.SN_EXIT_HISTORY_STORE_NAME,b.SN_VARIABLE_STORE_NAME,b.SN_WEBTRACKER_STORE_NAME];parent.SN.Conf.CustomStoresToBeCleanedUp.length>0&&(a=a.concat(parent.SN.Conf.CustomStoresToBeCleanedUp));for(var c=0;c<a.length;c+=1)I(a[c]);parent.SN.Conf.viStore!="cookie"&&I(b.SN_VI_STORE_NAME)}var a=SN.Utils,b=SN.Constants,c=!1,d=parent.SN.Conf.INVALID_COOKIE_CHARACTERS,e=!1,f=200,g=null,h=SN.ConfigurationManager,i=SN.CrossXDataHandler,j=[b.SN_AS_STORE_NAME,b.SN_RN_STORE_NAME,b.SN_ADP_STORE_NAME,b.SN_DS_STORE_NAME,b.SN_VARIABLE_STORE_NAME,b.SN_WEBTRACKER_STORE_NAME,b.SN_VI_STORE_NAME,b.SN_ETC_STORE_NAME],M={init:r,onBootstrapUpdateCompleted:m,onFsmVariablesUpdate:n,onAsVariablesUpdate:o,getValueFromStore:F,setValueInStore:G,deleteValueFromStore:I,setCrossDomainData:q,readCookie:t,createCookie:s,eraseCookie:u,readSNCookie:v,createSNCookie:x,eraseSNCookie:y,updateDataInVC:J,cleanUpAllCookies:L,cleanUpAllCookies_fpidBasedViActive:K};return M},SN=SN||{},SN.LocalStorageLifeTimeManager=function(){function g(){var c=!1;for(var d in b)if(b.hasOwnProperty(d)){var g=f.getStoreLifetime(d),h=b[d],i=h+g<(new Date).getTime()+SN.Utils.getTimeStampDiff();i&&(e.getStore(d).remove(d),d==a.SN_VI_STORE_NAME&&(c=!0))}if(c)for(var d in b)b.hasOwnProperty(d)&&e.getStore(d).remove(d)}function h(){if(!d){var e=SN.LocalStorageWrapper().getValueFromStore(a.SN_VI_STORE_NAME,a.CURRENT_SESSION_LAST_ACTVITIY_TIME),f=parseInt($undefinedOrNull(e)?(new Date).getTime()+SN.Utils.getTimeStampDiff():e);b[a.SN_RN_STORE_NAME]=f,b[a.SN_ADP_STORE_NAME]=f,b[a.SN_ETC_STORE_NAME]=f,b[a.SN_AS_STORE_NAME]=f,b[a.SN_VI_STORE_NAME]=f,b[a.SN_WEBTRACKER_STORE_NAME]=f,b[a.SN_VARIABLE_STORE_NAME]=f,b[a.SN_EXIT_HISTORY_STORE_NAME]=f;var h=parent.SN.Conf.customStoresAndLifeTimesToBeRegistered;for(var i in h)h.hasOwnProperty(i)&&(b[i]=f);c.observe(a.CONST_PERIODICAL_EXECUTION_TIMER_EVENT,g),d=!0}}var a=SN.Constants,b={},c=SN.EventManager,d=!1,e=SN.Store,f=SN.Utils;return{initialize:h,storesVsLastStoreUpdateTime:b}}(),SN.LocalStorageWrapper=function(){function h(){parent.SN.Conf.viStore=="cookie"&&(e=new SN.CookieManager)}function i(){var b=s(a.SN_VI_STORE_NAME,a.DATA_CLEAN_UP_DONE_FOR_FPID_KEY),d=-1;b!=null&&(d=b.indexOf("l"));if(d==-1||b==null)j(),c.getStore(a.SN_VI_STORE_NAME).remove(a.SN_VI_STORE_NAME),b==null&&(b=""),t(a.SN_VI_STORE_NAME,a.DATA_CLEAN_UP_DONE_FOR_FPID_KEY,b+"l")}function j(){var b=[a.SN_AS_STORE_NAME,a.SN_RN_STORE_NAME,a.SN_ADP_STORE_NAME,a.SN_DS_STORE_NAME,a.SN_EXIT_HISTORY_STORE_NAME,a.SN_VARIABLE_STORE_NAME,a.SN_WEBTRACKER_STORE_NAME,a.SN_VI_STORE_NAME];parent.SN.Conf.CustomStoresToBeCleanedUp.length>0&&(b=b.concat(parent.SN.Conf.CustomStoresToBeCleanedUp)),index=0;for(;index<b.length;index+=1)c.getStore(b[index]).remove(b[index]);parent.SN.Conf.viStore!="localstorage"&&c.getStore(a.SN_VI_STORE_NAME).remove(a.SN_VI_STORE_NAME)}function k(f){for(var g in f)if(f.hasOwnProperty(g)){var h=f[g].cvalue,i=f[g].clifetime;if(i>0){var j={};if(g==a.SN_VI_STORE_NAME||g==a.SN_ETC_STORE_NAME){var k=h.split(a.KEY_SEPERATOR);for(var m=0;m<k.length;m++){var n=k[m].split(a.KEY_VALUE_SEPERATOR),o=n[0];h=n[1];if(parent.SN.Conf.viStore=="cookie"&&d.isViStoreData(g,o))e.setValueInStore(g,o,h);else{if(o==a.ACTIVE_SESSION){var p=l(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION);p>h&&(h=p)}j[o]=h}}h=null;for(var q in j)j.hasOwnProperty(q)&&($undefinedOrNull(h)?h=q+a.KEY_VALUE_SEPERATOR+j[q]+a.KEY_SEPERATOR:h=h+q+a.KEY_VALUE_SEPERATOR+j[q]+a.KEY_SEPERATOR);$undefinedOrNull(h)||(h.length>1&&(h=h.substring(0,h.length-1)),c.getStore(g).set(g,h),b[g]=(new Date).getTime()+SN.Utils.getTimeStampDiff())}else c.getStore(g).set(g,h),b[g]=(new Date).getTime()+SN.Utils.getTimeStampDiff()}}}function l(b,d){var e=c.getStore(b).get(b);if($undefinedOrNull(e))return null;if($undefinedOrNull(d))return e;var f=e.split(a.KEY_SEPERATOR),g=d+a.KEY_VALUE_SEPERATOR;for(var h=0;h<f.length;h++){var i=f[h];if(i.indexOf(g)===0){var j=i.substring(g.length,i.length);return j}}return null}function m(d,e,f){var g="",h="",i=!1,j=!0,k=c.getStore(d).get(d);k==null&&(k="");var l="";if(typeof f=="string"){var m=f.split(a.KEY_SEPERATOR).join("").split(a.KEY_VALUE_SEPERATOR).join("");m!=f&&SN.Utils.warnTrack("Data Key-Value Separtor found inside the value. Removed.",{oldValue:f}),f=m}var n=null,o=!0,p=k.split(a.KEY_SEPERATOR),q=e+a.KEY_VALUE_SEPERATOR;for(var r=0;r<p.length;r++){var s=p[r];if(s=="")continue;if(s.indexOf(q)===0){i=!0,n=s.substring(q.length,s.length);if(n==f){o=!1;break}}else i?h=h+a.KEY_SEPERATOR+s:j?(g=s,j=!1):g=g+a.KEY_SEPERATOR+s}o&&(f==null?l=g+h:g==""?l=q+f+h:l=g+a.KEY_SEPERATOR+q+f+h,c.getStore(d).set(d,l),b[d]=(new Date).getTime()+SN.Utils.getTimeStampDiff())}function n(d,e){var f=c.getStore(d).get(d);if($undefinedOrNull(f)||f.indexOf(e)==-1)return;var g=f.split(a.KEY_SEPERATOR),h=0,i="";for(h=0;h<g.length;h++){var j;j=g[h].split(a.KEY_VALUE_SEPERATOR)[0],j!=e&&(i+=g[h],h!=g.length-1&&(i+=a.KEY_SEPERATOR))}i.charAt(i.length-1)==a.KEY_SEPERATOR&&(i=i.substring(0,i.length-1)),c.getStore(d).remove(d),c.getStore(d).set(d,i),b[d]=(new Date).getTime()+SN.Utils.getTimeStampDiff()}function o(a){c.getStore(a).remove(a)}function p(){var a={},e={};for(var f in b)b.hasOwnProperty(f)&&(e.cvalue=c.getStore(f).get(f),$undefinedOrNull(e.cvalue)||(e.clifetime=d.getStoreLifetime(f),a[f]=e),e={});var g=parent.SN.Conf.customStoresAndLifeTimesToBeRegistered;for(var h in g)g.hasOwnProperty(h)&&(e.cvalue=c.getStore(f).get(f),$undefinedOrNull(e.cvalue)||(e.clifetime=d.getStoreLifetime(h),a[h]=e),e={});return a}function q(){var b={},c={};return c.cvalue=l(a.SN_VARIABLE_STORE_NAME),c.clifetime=d.getStoreLifetime(a.SN_VARIABLE_STORE_NAME),b[a.SN_VARIABLE_STORE_NAME]=c,$undefinedOrNull(c.cvalue)?null:b}function r(){var b={},c={};return c.cvalue=l(a.SN_AS_STORE_NAME),c.clifetime=d.getStoreLifetime(a.SN_AS_STORE_NAME),b[a.SN_AS_STORE_NAME]=c,$undefinedOrNull(c.cvalue)?null:b}function s(a,b){var c=null;return parent.SN.Conf.viStore=="cookie"&&d.isViStoreData(a,b)&&!$undefinedOrNull(b)?c=e.getValueFromStore(a,b):c=l(a,b),c}function t(a,b,c){if(parent.SN.Conf.viStore=="cookie"&&d.isViStoreData(a,b))e.setValueInStore(a,b,c);else{d.typeOf(c)=="Object"&&(c=JSON.stringify(c)),m(a,b,c);if(d.isCrossDomainSupported()&&f.isXDChannelReady()){var h={},i={};i.cvalue=l(a),i.clifetime=d.getStoreLifetime(a),h[a]=i,g.sendXDData(h)}}return c}function u(a,b){return n(a,b),!0}function v(b,c){t(a.SN_VARIABLE_STORE_NAME,b,c)}var a=SN.Constants,b=SN.LocalStorageLifeTimeManager.storesVsLastStoreUpdateTime,c=SN.Store,d=SN.Utils,e=null,f=SN.ConfigurationManager,g=SN.CrossXDataHandler,w={setCrossDomainData:k,write:m,read:l,onBootstrapUpdateCompleted:p,onFsmVariablesUpdate:q,onAsVariablesUpdate:r,getValueFromStore:s,setValueInStore:t,deleteValueFromStore:u,updateDataInVC:v,cleanUpLocalStorageData:j,cleanUpLocalStorageData_fpidBasedViActive:i};return h(),w},typeof SN=="undefined"&&(SN={}),SN.CrossXHR=function(){function r(a){var b=JSON.parse(a),c=b.err_no,e=b.err,f=b.rid,g=b.response;if(!$undefinedOrNull(c)&&c>0)d.info("Error code received - "+f,e);else{while(g.indexOf("+")!=-1)g=g.replace("+"," ");var h=decodeURIComponent(g),i=p[f];if(!$undefinedOrNull(i))try{i(h)}catch(e){d.warn("unable to execute the jsonp response , actualResponse : "+h,e)}else d.info("JSONP callback function is undefined or null for reqId "+f)}var j=f,k=document.getElementById(j),l=document.getElementsByTagName("head").item(0);k&&window.setTimeout(function(){try{l.removeChild(k)}catch(a){d.error("Could not remove JSONP script - "+j,a)}},2e3),delete p[f]}function t(){var a=c.length;for(var b=0;b<a;b++){var d=c[b],e=s[d];if(e.test()){i=e,j=d;break}}if(i==null)throw"No crossdomain channel could be obtained for your browser. Upgrade yours to FF2+/IE8+/Flash";i.init()}function u(){return typeof i==a||i==null?!1:i.isReady()}function v(a,b,c,d){i.isReady()?i.write(a,b,c,d):(i=s.getScript,w(a,b))}function w(a,b){var c=null;$undefinedOrNull(b)&&(b={}),o==null&&(o=s.getScript,o.init()),o.write(a,b,c)}function x(a,b,c,d){if($undefinedOrNull(a))throw"url passed into JSONP request is undefinedOrNull";if($undefinedOrNull(c))throw"callback passed into JSONP request is undefinedOrNull";if($undefinedOrNull(d))throw"httpmethod passed into JSONP request is undefinedOrNull";if(d.toUpperCase()!="G"&&d.toUpperCase()!="P")throw"httpmethod : "+d+" passed into JSONP request is not valid. It should be 'p' for post call and 'g' for get call";$undefinedOrNull(b)&&(b={}),n==null&&(n=s.JSONP,n.init()),b[h]=d,n.write(a,b,c)}function y(){return j}var a="undefined",b="sn-pspxd-iframe",c=["iframe","getScript"],d=SN.Utils,e=d.getProxyServer(),f="s",g="cb",h="m",i=null,j=null,k=0,l="postMessage",m=SN.ConfigurationManager,n=null,o=null,p={},q=0,s={iframe:{test:function(){return window[l]?!0:!1},isReady:function(){return m.isXDChannelReady()},init:function(){},write:function(a,c,e,f){c.responseType="application/json",SN.XDFrameMessagingUtils.receiveMessage(function(a){e(a)},d.getPSPServerUrl());var g=document.getElementById(b);if($undefinedOrNull(g))return;var h={};$undefinedOrNull(f)?h.cmd="serverCall":h.cmd=f,h.params=c,SN.XDFrameMessagingUtils.postMessage(JSON.stringify(h),d.getPSPServerUrl(),g.contentWindow)}},getScript:{test:function(){return!0},isReady:function(){return this.ready==1},init:function(){this.ready=!0},write:function(a,b,c){b.responseType="text/javascript";var e="id"+k++;b.sId=e;var f=document.getElementsByTagName("head").item(0),g=d.appendUrlParams(a,b),h=3300,i="GET_SCRIPT_URL_SIZE_EXCEEDED_3.3k";parent.SN.UserAgentParser.getBrowserType()=="i"&&parent.SN.UserAgentParser.getBrowserVersion().indexOf("8")==0&&(h=1500,i="GET_SCRIPT_URL_SIZE_EXCEEDED_2k_ON_IE");if(g.length>h){d.errorTrack(i);return}var j=document.createElement("script");j.src=g,j.type="text/javascript",j.id=e,j.async=!0,void f.appendChild(j)}},JSONP:{test:function(){return!0},isReady:function(){return this.ready==1},init:function(){this.ready=!0},write:function(a,b,c){b=b||{};var i=location.protocol=="https:"?"https://":a.indexOf("https")!=-1?"https://":"http://",j=i+e;b[f]=a,b[g]="SN.CrossXHR.handleJSONPResponse";var k=b[h];$undefinedOrNull(k)&&(b[h]="G");var l="jid"+q++;b.rid=l,p[l]=c;var m=document.getElementsByTagName("head").item(0),n=d.appendUrlParams(j,b),o=document.createElement("script");o.src=n,o.type="text/javascript",o.id=l,o.async=!0,void m.appendChild(o)}}},z={isReady:u,makeXDRequest:v,makeJSONPRequest:x,makeGetRequest:w,handleJSONPResponse:r,getType:y,reinit:t};return t(),z}(),typeof SN=="undefined"&&(SN={}),SN.ServerStorageManager=function(){function q(b,c){if(g.isViStoreData(b,c)&&!$undefinedOrNull(c))return i.getValueFromStore(d.SN_VI_STORE_NAME,c);var e=a[b];if($undefinedOrNull(e))return null;if($undefinedOrNull(c))return e;var f=e[c];if($undefinedOrNull(f)||f==="")return null;if(!$undefinedOrNull(f)&&(b==d.SN_VARIABLE_STORE_NAME||b==d.SN_AS_STORE_NAME))try{var h=JSON.parse(f);return h}catch(j){g.error("Error while parsing data in sn.vc or sn.as",j)}f=decodeURIComponent(f);try{$isString(f)&&(f=s(f))}catch(k){g.debug("Error while decoding to =",j)}return f}function r(a){return a.replace(/=/g,"__eq__")}function s(a){return a.replace(/__eq__/g,"=")}function t(b,c,e){if(g.isViStoreData(b,c)&&k==1){i.setValueInStore(j,c,e);if(g.isCrossDomainSupported()&&m.isXDChannelReady()){var f={},h={};h.cvalue=i.getValueFromStore(d.SN_VI_STORE_NAME),h.clifetime=g.getStoreLifetime(d.SN_VI_STORE_NAME),f[d.SN_VI_STORE_NAME]=h,n.sendXDData(f)}return e}$isString(e)&&(e=r(e)),$undefinedOrNull(a[b])&&(a[b]={});if($undefinedOrNull(c))a[b]=e;else if(b!=d.SN_VARIABLE_STORE_NAME&&b!=d.SN_AS_STORE_NAME||typeof e=="string")a[b][c]=encodeURIComponent(e);else{var l=JSON.stringify(e);a[b][c]=l}return e}function u(b,c){return $undefinedOrNull(c)&&(a[b]={}),!$undefinedOrNull(a[b])&&!$undefinedOrNull(a[b][c])&&(a[b][c]=""),g.isViStoreData(b,c)&&k==1?(i.deleteValueFromStore(j,c),!0):!1}function v(){p?(e=location.protocol+"//"+parent.SN.Conf.CONST_PSP_ROOT+"/psp"+d.SEND_SERVER_DATA_CALL,f=location.protocol+"//"+parent.SN.Conf.CONST_PSP_ROOT+"/psp"+d.GET_SERVER_DATA_CALL):(e=location.protocol+"//"+parent.SN.Conf.CONST_PSP_ROOT+"/psp/"+parent.SN.Conf.CONST_PSP_KEY+"/"+parent.SN.Conf.CONST_PSP_VERSION+d.SEND_SERVER_DATA_CALL,f=location.protocol+"//"+parent.SN.Conf.CONST_PSP_ROOT+"/psp/"+parent.SN.Conf.CONST_PSP_KEY+"/"+parent.SN.Conf.CONST_PSP_VERSION+d.GET_SERVER_DATA_CALL),parent.SN.Conf.viStore=="cookie"?i=new SN.CookieManager:i=new SN.LocalStorageWrapper,SN.EventManager.observe(d.UPDATE_SN_AS_EVENT_SERVER,z)}function w(){return{}}function x(b,c,f){var i=null,j=a[b];for(var k in j)if(j.hasOwnProperty(k)){var l=j[k];if($undefinedOrNull(f))$undefinedOrNull(i)&&(i={}),i[k]=l;else{var m=f[k];m!=l&&($undefinedOrNull(i)&&(i={}),i[k]=l)}}if(!$undefinedOrNull(i)){g.info("Sending new "+c+"Variables to server");var n={};n[d.BUCKET_KEY]=b,n[d.BUCKET_VALUE]=JSON.stringify(j),n[d.VISITOR_ID]=q(d.SN_VI_STORE_NAME,d.VISITOR_ID),n[d.CLIENT_KEY]=g.getClientKey(),p&&(n[d.ACCOUNT_VERSION]=d.DEFAULT_ACCOUNT_VERSION_VALUE),h.makeXDRequest(e,n,function(){},d.SEND_SERVER_DATA);for(var o in j)j.hasOwnProperty(o)&&(f[o]=j[o]);return null}return g.info("No new updates on "+c+"Variables to be sent to server"),null}function y(){return x(d.SN_VARIABLE_STORE_NAME,"FSM",b)}function z(){x(d.SN_AS_STORE_NAME,"AS",c)}function A(e){if(!$undefinedOrNull(e)){for(var f in e)if(e.hasOwnProperty(f)){var g=e[f];a[f]=g}var h=a[d.SN_VARIABLE_STORE_NAME];if(!$undefinedOrNull(h))for(var i in h)h.hasOwnProperty(i)&&(b[i]=h[i]);var j=a[d.SN_AS_STORE_NAME];if(!$undefinedOrNull(j))for(var k in j)j.hasOwnProperty(k)&&(c[k]=j[k])}}function B(b){if(k==0)return;var c=new SN.CookieManager;for(var e in b)if(b.hasOwnProperty(e)){var f={},g={};if(e==d.SN_VI_STORE_NAME||e==d.SN_ETC_STORE_NAME){var h=b[e].cvalue;if(h===""||$undefinedOrNull(h)||h==undefined)continue;var j=h.split(d.KEY_SEPERATOR);for(var l=0;l<j.length;l++){var m=j[l].split(d.KEY_VALUE_SEPERATOR),n=m[0];h=m[1],i.setValueInStore(e,n,h)}}if(!$undefinedOrNull(b[e].cvalue)){var o=E(b[e].cvalue);e==d.SN_VARIABLE_STORE_NAME?a[e]=JSON.stringify(o):a[e]=o}}}function C(){var b=new SN.CookieManager,c=[d.SN_AS_STORE_NAME,d.SN_RN_STORE_NAME,d.SN_ADP_STORE_NAME,d.SN_EXIT_HISTORY_STORE_NAME,d.SN_VARIABLE_STORE_NAME,d.SN_WEBTRACKER_STORE_NAME],f=0,i={};for(;f<c.length;f+=1)if($undefinedOrNull(a[c[f]])){var j=b.readCookie(c[f]);if(!$undefinedOrNull(j)){var k=E(j);c[f]==d.SN_VARIABLE_STORE_NAME?a[c[f]]=JSON.stringify(k):a[c[f]]=k}}var i={};for(var l in a)a.hasOwnProperty(l)&&(i[d.BUCKET_KEY]=l,i[d.VISITOR_ID]=q(d.SN_VI_STORE_NAME,d.VISITOR_ID),i[d.BUCKET_VALUE]=JSON.stringify(a[l]),i[d.CLIENT_KEY]=g.getClientKey(),p&&(i[d.ACCOUNT_VERSION]=d.DEFAULT_ACCOUNT_VERSION_VALUE),l!=d.SN_WEBTRACKER_STORE_NAME&&h.makeXDRequest(e,i,function(){},d.SEND_SERVER_DATA));f=0;for(;f<c.length;f+=1)b.deleteValueFromStore(c[f])}function D(){var a=new SN.CookieManager;cookies=[d.SN_AS_STORE_NAME,d.SN_RN_STORE_NAME,d.SN_ADP_STORE_NAME,d.SN_EXIT_HISTORY_STORE_NAME,d.SN_VARIABLE_STORE_NAME,d.SN_WEBTRACKER_STORE_NAME],index=0;for(;index<cookies.length;index+=1)cookies[index]!=d.SN_VI_STORE_NAME&&(a.deleteValueFromStore(cookies[index]),a.eraseCookie(cookies[index]));parent.SN.Conf.viStore!="cookie"&&a.deleteValueFromStore(d.SN_VI_STORE_NAME)}function E(a){var b=a.split(d.KEY_SEPERATOR),c={};for(var e=0;e<b.length;e++){var f=b[e],g=f.split(d.KEY_VALUE_SEPERATOR);c[g[0]]=g[1]}return c}function F(a,b){var c={};c[d.BUCKET_KEY]=a,c[d.BUCKET_VALUE]=b,c[d.VISITOR_ID]=q(d.SN_VI_STORE_NAME,d.VISITOR_ID),c[d.CLIENT_KEY]=g.getClientKey(),p&&(c[d.ACCOUNT_VERSION]=d.DEFAULT_ACCOUNT_VERSION_VALUE),h.makeXDRequest(e,c,function(){},d.SEND_SERVER_DATA)}function G(a){var b=(new Date).getTime();l[b]=a;var c={};c[d.BUCKET_KEY]="custom_",c.reqId=b,c[d.VISITOR_ID]=q(d.SN_VI_STORE_NAME,d.VISITOR_ID),c[d.CLIENT_KEY]=g.getClientKey(),p&&(c[d.ACCOUNT_VERSION]=d.DEFAULT_ACCOUNT_VERSION_VALUE),h.makeGetRequest(f+"?",c,a,d.SEND_SERVER_DATA)}function H(a,b){callback=l[b],callback(a),delete l[b]}function I(){var b={};b[d.BUCKET_KEY]=d.SN_VI_STORE_NAME,b[d.BUCKET_VALUE]=JSON.stringify(a[d.SN_VI_STORE_NAME]),b[d.VISITOR_ID]=q(d.SN_VI_STORE_NAME,d.VISITOR_ID),b[d.CLIENT_KEY]=g.getClientKey(),p&&(b[d.ACCOUNT_VERSION]=d.DEFAULT_ACCOUNT_VERSION_VALUE),h.makeXDRequest(e,b,function(){},d.SEND_SERVER_DATA)}function J(a,b){t(d.SN_VARIABLE_STORE_NAME,a,b)}var a={},b={},c={},d=SN.Constants,e=null,f=null,g=SN.Utils,h=SN.CrossXHR,i=null,j=parent.SN.Conf.viStoreName,k=parent.SN.Conf.shouldMaintainVi,l={},m=SN.ConfigurationManager,n=SN.CrossXDataHandler,o=SN.EventManager,p=parent.SN.Conf.pspServerType==d.TIE_SERVER,K={onFsmVariablesUpdate:y,onBootstrapUpdateCompleted:w,initialize:v,deleteValueFromStore:u,getValueFromStore:q,setValueInStore:t,saveBootstrapData:A,setCrossDomainData:B,setCustomData:F,getDataFromServer:G,onGetDataFromServer:H,sendToServerAndCleanCookieStorage:C,setItValueInServer:I,updateDataInVC:J};return v(),K},function(a){"use strict";var b=function(a){var b=Array.prototype.forEach,c=Array.prototype.map;this.each=function(a,c,d){if(a===null)return;if(b&&a.forEach===b)a.forEach(c,d);else if(a.length===+a.length){for(var e=0,f=a.length;e<f;e++)if(c.call(d,a[e],e,a)==={})return}else for(var g in a)if(a.hasOwnProperty(g)&&c.call(d,a[g],g,a)==={})return},this.map=function(a,b,d){var e=[];return a==null?e:c&&a.map===c?a.map(b,d):(this.each(a,function(a,c,f){e[e.length]=b.call(d,a,c,f)}),e)},typeof a=="object"?(this.hasher=a.hasher,this.canvas=a.canvas):typeof a=="function"&&(this.hasher=a)};b.prototype={get:function(){var b=[];b.push(navigator.userAgent),b.push(navigator.language),b.push(screen.colorDepth),b.push((new Date).getTimezoneOffset()),b.push(!!a.sessionStorage),b.push(this.hasLocalStorage()),b.push(!!window.indexedDB),b.push(typeof document.body.addBehavior),b.push(typeof window.openDatabase),b.push(navigator.cpuClass),b.push(navigator.platform),b.push(navigator.doNotTrack);var c=this.map(navigator.plugins,function(a){var b=this.map(a,function(a){return[a.type,a.suffixes].join("~")}).join(",");return[a.name,a.description,b].join("::")},this).join(";");return b.push(c),this.canvas&&this.isCanvasSupported()&&b.push(this.getCanvasFingerprint()),this.hasher?this.hasher(b.join("###"),31):this.murmurhash3_32_gc(b.join("###"),31)},murmurhash3_32_gc:function(a,b){var c,d,e,f,g,h,i,j;c=a.length&3,d=a.length-c,e=b,g=3432918353,h=461845907,j=0;while(j<d)i=a.charCodeAt(j)&255|(a.charCodeAt(++j)&255)<<8|(a.charCodeAt(++j)&255)<<16|(a.charCodeAt(++j)&255)<<24,++j,i=(i&65535)*g+(((i>>>16)*g&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(i&65535)*h+(((i>>>16)*h&65535)<<16)&4294967295,e^=i,e=e<<13|e>>>19,f=(e&65535)*5+(((e>>>16)*5&65535)<<16)&4294967295,e=(f&65535)+27492+(((f>>>16)+58964&65535)<<16);i=0;switch(c){case 3:i^=(a.charCodeAt(j+2)&255)<<16;case 2:i^=(a.charCodeAt(j+1)&255)<<8;case 1:i^=a.charCodeAt(j)&255,i=(i&65535)*g+(((i>>>16)*g&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(i&65535)*h+(((i>>>16)*h&65535)<<16)&4294967295,e^=i}return e^=a.length,e^=e>>>16,e=(e&65535)*2246822507+(((e>>>16)*2246822507&65535)<<16)&4294967295,e^=e>>>13,e=(e&65535)*3266489909+(((e>>>16)*3266489909&65535)<<16)&4294967295,e^=e>>>16,e>>>0},hasLocalStorage:function(){try{return!!a.localStorage}catch(b){return!0}},isCanvasSupported:function(){var a=document.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},getCanvasFingerprint:function(){var a=document.createElement("canvas"),b=a.getContext("2d"),c="http://valve.github.io";return b.textBaseline="top",b.font="14px 'Arial'",b.textBaseline="alphabetic",b.fillStyle="#f60",b.fillRect(125,1,62,20),b.fillStyle="#069",b.fillText(c,2,15),b.fillStyle="rgba(102, 204, 0, 0.7)",b.fillText(c,4,17),a.toDataURL()}},a.Fingerprint=b}(window),typeof SN=="undefined"&&(SN={}),SN.StoreManager=function(){function n(){var a=new SN.CookieManager;a.init();var b=new SN.LocalStorageWrapper;e.isVidBasedonfpid()?(a.cleanUpAllCookies_fpidBasedViActive(),b.cleanUpLocalStorageData_fpidBasedViActive()):(a.cleanUpAllCookies(),b.cleanUpLocalStorageData())}function o(){l=parent.SN.Conf.dataStore,f=e.getAvailableStore(),e.generateFingerPrint(),l==c||e.isVidBasedonfpid()?(g=new SN.ServerStorageManager,parent.SN.UserAgentParser.isSafariPrivateBrowsingMode()||n()):l==b||f==b?(g=new SN.CookieManager,g.init()):l==d?(SN.LocalStorageLifeTimeManager.initialize(),g=new SN.LocalStorageWrapper):e.error("No Suitable storage could be obtained !"),m=parent.SN.Conf.viStore,m==d?(SN.LocalStorageLifeTimeManager.initialize(),h=new SN.LocalStorageWrapper):(h=new SN.CookieManager,h.init()),i.observe(a.BOOTSTRAP_UPDATE_COMPLETED_EVENT,w),i.observe(a.UPDATE_FSMVARIABLES_EVENT,x),i.observe(a.UPDATE_SN_AS_EVENT,y),i.observe(a.BOOTSTRAP_UPDATE_COMPLETED_EVENT,function(){if(parent.window.OE_to_TIE){var a=SN.ServerStorageManager();a.setCustomData("custom_serverType","t")}})}function p(b,d){if($undefinedOrNull(b)||b.length=="")return e.errorTrack("Undefined or null value for storekey in getValueInStore"),null;if(e.isViStoreData(b,d)){if(b==a.SN_VI_STORE_NAME&&m!=l&&$undefinedOrNull(d)){if(l!=c)return h.getValueFromStore(b)+a.KEY_SEPERATOR+g.getValueFromStore(b);var f=g.getValueFromStore(b),i=h.getValueFromStore(b).split(a.KEY_SEPERATOR);for(var j=0;j<i.length;j++){var k=i[j].split(a.KEY_VALUE_SEPERATOR);f[k[0]]=k[1]}return f}return h.getValueFromStore(b,d)}return g.getValueFromStore(b,d)}function q(a,b,c){if($undefinedOrNull(a)||$undefinedOrNull(b)||a==""||b==""){e.error("Undefined or null value for storekey or key in SetValueInStore.  storeKey {"+a+"}  and key {"+b+"}");return}if($undefinedOrNull(c)||c===""){e.error("Undefined or null value for value in SetValueInStore for storeKey {"+a+"}  and key {"+b+"}");return}return e.isViStoreData(a,b)?h.setValueInStore(a,b,c):g.setValueInStore(a,b,c)}function r(b){return $isString(b)||(b=JSON.stringify(b)),q(a.SN_ETC_STORE_NAME,a.ETC_JSON_KEY,b)}function s(a){if(l==d)for(var b=0;b<a.length;b++)localStorage.removeItem(a[b])}function t(a,b){if($undefinedOrNull(a)){e.errorTrack("Undefined or null value for storekey in deleteValueFromStore");return}var c=!1;e.isViStoreData(a,b)?c=h.deleteValueFromStore(a,b,value):c=g.deleteValueFromStore(a,b);if(c&&e.isCrossDomainSupported()&&k.isXDChannelReady()){var d={},f={};f.cvalue=p(a),f.clifetime=e.getStoreLifetime(a),d[a]=f,j.sendXDData(d)}return}function u(){var b=g.getValueFromStore(a.SN_AS_STORE_NAME,"a");return b==a.TRUE?!0:!1}function v(a){g.setCrossDomainData(a)}function w(){if(!e.isCrossDomainSupported()||!k.isXDChannelReady())return;var b=g.onBootstrapUpdateCompleted();if(m!=l){var d={};if(l!=c)d.cvalue=h.getValueFromStore(a.SN_VI_STORE_NAME)+a.KEY_SEPERATOR+g.getValueFromStore(a.SN_VI_STORE_NAME);else{if(parent.SN.Conf.shouldMaintainVi)return null;d.cvalue=h.getValueFromStore(a.SN_VI_STORE_NAME)}d.clifetime=e.getStoreLifetime(a.SN_VI_STORE_NAME),b[a.SN_VI_STORE_NAME]=d,d={};var f=h.getValueFromStore(a.SN_ETC_STORE_NAME);$undefinedOrNull(f)||(d.cvalue=f,d.clifetime=e.getStoreLifetime(a.SN_ETC_STORE_NAME),b[a.SN_ETC_STORE_NAME]=d)}j.sendXDData(b)}function x(){var a=g.onFsmVariablesUpdate();if(!e.isCrossDomainSupported()||!k.isXDChannelReady())return;null!=a&&j.sendXDData(a)}function y(){if(l!=c&&!e.isVidBasedonfpid()){var a=g.onAsVariablesUpdate();if(!e.isCrossDomainSupported()||!k.isXDChannelReady())return;null!=a&&j.sendXDData(a)}}function z(){g.setValueInStore(a.SN_AS_STORE_NAME,"a",a.TRUE)}function A(a){if(l==c||e.isVidBasedonfpid()){var b=a.serverData;$undefinedOrNull(b)?e.errorTrack("No Data sent from server on bs response"):g.saveBootstrapData(b)}}function B(a){l!=c&&!e.isVidBasedonfpid()&&e.errorTrack("server side storage is not enabled"),g.getDataFromServer(a)}function C(a,b){(l==c||e.isVidBasedonfpid())&&g.onGetDataFromServer(a,b)}function D(a,b){if(a.indexOf("custom")==-1){SN.Utils.error("custom data should start with custom_ keyword");return}g.setCustomData(a,b)}function E(){g.sendToServerAndCleanCookieStorage()}function F(){return g.getValueFromStore(a.SN_VI_STORE_NAME,a.VI_BUCKET_CUSTOM_DATA_KEY)}function G(b){if(typeof b!="string"){e.warn("Set request for vi bucket with custom data is allowed for two length string only");return}var c=0;if($undefinedOrNull(b)){e.warn("Set request for vi bucket with custom data thats undefined or null, ignoring the request");return}for(var d in b)b.hasOwnProperty(d)&&c++;if(c>parent.SN.Conf.customDataSizeInViStore){e.warn("Set request for vi bucket with custom data > 2 byte size, ignoring the request");return}var f=h.setValueInStore(a.SN_VI_STORE_NAME,a.VI_BUCKET_CUSTOM_DATA_KEY,b);if(parent.SN.Conf.dataStore!="server"&&!e.isVidBasedonfpid()&&e.isCrossDomainSupported()&&k.isXDChannelReady()){var g={},i={};i.cvalue=p(a.SN_VI_STORE_NAME),i.clifetime=e.getStoreLifetime(a.SN_VI_STORE_NAME),g[a.SN_VI_STORE_NAME]=i,j.sendXDData(g)}return f}function H(){g.setItValueInServer()}function I(b,c){if(!$undefinedOrNull(b)||!$undefinedOrNull(c))g.updateDataInVC(b,c),i.fire(a.UPDATE_FSMVARIABLES_EVENT,{eventId:a.UPDATE_FSMVARIABLES_EVENT})}function J(a){if(!e.isCrossDomainSupported()||!k.isXDChannelReady())return;var b={},c={cvalue:p(a),clifetime:e.getStoreLifetime(a)};b[a]=c,j.sendXDData(b)}function K(b){return p(a.SN_AS_STORE_NAME,b)}function L(b,c){q(a.SN_AS_STORE_NAME,b,c)}function M(b){t(a.SN_AS_STORE_NAME,b)}var a=SN.Constants,b="cookie",c="server",d="localstorage",e=SN.Utils,f=null,g=null,h=null,i=SN.EventManager,j=SN.CrossXDataHandler,k=SN.ConfigurationManager,l=null,m=null,N={isActiveSessionPresent:u,setCrossDomainData:v,createASStore:z,getValueFromStore:p,setValueInStore:q,deleteValueFromStore:t,forceExpireStores:s,saveBootstrapData:A,getDataFromServer:B,onGetDataFromServer:C,setCustomData:D,sendToServerAndCleanCookieStorage:E,getCustomDataFromViStore:F,setCustomDataInViStore:G,setItValueInServer:H,updateDataInVC:I,sendDataToXD:J,setEvalTestConditionsInStore:r,getSessionData:K,setSessionData:L,removeSessionData:M};return o(),N}(),typeof SN=="undefined"&&(SN={}),SN.ExitHistory=function(){function j(a){if($undefinedOrNull(a)||a.length===0)return;d=a;for(var b=0;b<a.length;b++)!$undefinedOrNull(d[b])&&!$undefinedOrNull(d[b].href)&&l(a[b])}function k(){$undefinedOrNull(f)?SN.Utils.info("encodedUrl is undefined"):(clearInterval(g),SN.Utils.info("encodedUrl is defined"),m(f))}function l(a){Event.observe(a,"click",function(b){f=a.hostname,h=b.ctrlKey,g=setInterval(function(){k()},1)})}function m(a){var c;a=a.substring(0,20),e=SN.CustomScript.getEncodedValue(a),!$undefinedOrNull(h)&&h?c=b.NEWTAB_EXIT_LINK:c=b.EXIT_LINK,i.setValueInStore(b.SN_EXIT_HISTORY_STORE_NAME,c,e),clearInterval(g),n(e)}function n(a){var d=parent.SN.Conf.getDecodedValue(a);!$undefinedOrNull(h)&&h&&d&&c.fire("exitLinkEvent",{eventId:b.EXIT_LINK_EVENT,data:{ed:{ntel:d}}})}function o(){var a=i.getValueFromStore(b.SN_EXIT_HISTORY_STORE_NAME);return parent.SN.Conf.getDecodedValue(a)}var a=SN.Utils,b=SN.Constants,c=SN.EventManager,d,e=null,f=null,g=null,h=!1,i=SN.StoreManager,p={registerElementsForExitLinkCapturing:j,getLastExitLink:o};return p}(),$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),$undefined(SN.ADP.InviteApp)&&(SN.ADP.InviteApp={}),$undefined(SN.ADP.InviteApp.Config)&&(SN.ADP.InviteApp.Config={AdpDssGetInstanceApi:"",AdpInstanceId:""}),$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={});var tour={},gnaApiCallback=function(a){tour=a,tour!=undefined&&tour.steps!=undefined&&tour.steps.length>0&&parent.window.hopscotch!=undefined?(parent.window.hopscotch.startTour(tour),SN.Utils.debug("tour started with ",tour)):SN.Utils.debug("Tour data not found!!")},ADPApp=function(a,b,c){function h(a){switch(d.instanceIdSplitted[1]){case"uibuilder":a.app_instance_id=d.instanceIdSplitted[1];break;case"CTC":a.app_id=d.instanceIdSplitted[2],a.department="default"}return a}function i(){return parent.SN.Conf.ADP_BASE_URL[d.instanceIdSplitted[1]]}function j(a){var b={};switch(d.instanceIdSplitted[1]){case"uibuilder":b.visibility="visible",b.width="100px",b.height="1000px";break;case"CTC":b.visibility="hidden"}return b}function k(){var a=null;switch(d.instanceIdSplitted[1]){case"uibuilder":break;case"CTC":}return a}function m(a,b){a.indexOf("?")==-1&&(a+="?");for(var c in b)b.hasOwnProperty(c)&&(a=a+c+"="+b[c]+"&");return a.slice(0,a.length-1)}function o(a){var b=parent.document.createElement("iframe");b.id=this.type+"_"+d.instanceIdSplitted[2]+"_iframe",b.scrolling="no",b.frameBorder="0",b.allowTransparency="true";var c={width:"100%",height:"100%"};return b.width=c.width,b.height=c.height,Element.setStyle(b,c),b.src=m(a,l),b}function p(){var a=config.url;l.id=this.type;var b={width:"400px",height:"300px",left:"100px"},c="width="+b.width+", height="+b.height+", left="+b.left+", location=0, scrollbars=0, status=0, titlebar=0, toolbar=0";return window.open(m(a,l),id+"_window",c)}function q(){this.isLoaded=!0,this.type==0&&Element.show(this.widgetRef)}function r(a,b){return Object.keys(a).length>0&&a.w!=undefined&&a.w.aw!=undefined&&a.w.aw.ca=="true"&&a.w.aw.wi!=undefined&&a.w.aw.wi.split(":")[2]==b&&a.w.aw.params!=undefined&&a.w.aw.params.length>0?a.w.aw.params:Object.keys(a).length>0&&a.w!=undefined&&a.w.params!=undefined&&a.w.params.length>0?a.w.params:[]}function s(a){var b="popup";return Object.keys(a).length>0&&a.w!=undefined&&a.w.it!=undefined&&(a.w.it=="docked"&&(b="docked"),a.w.it=="popup"&&(b="popup")),b}var d=this;this.id=a,this.isLoaded=!1,this.eventDataParams=c,this.instanceIdSplitted=c.InstanceID.split(":"),this.type=this.instanceIdSplitted[1],this.widgetRef=null,this.baseUrl=i();var e={ADP_STORE_KEY:"sn.adp",WIDGET_ID:"_wi",WIDGET_TYPE:"_wt",WIDGET_VISITED_ID:"_iwi",WIDGET_VISITED_TYPE:"_iwt",INTERVENTION_POSITION:"_ip",INTERACTION_COUNT:"_ic",CHAT_DONE:"_cd",PREVIOUS_WIDGET_STATE:"pws",CURRENT_WIDGET_STATE:"cws"};if(this.type=="CTC"){this.widget=parent.document.createElement("div"),this.widget.id=this.instanceIdSplitted[2]+"_container";var f=k();f!=null&&parent.document.body.appendChild(f);var g=j(null);Element.setStyle(this.widget,g),parent.document.body.appendChild(this.widget)}var l=h(b),n=function(){};this.loadAppInVea=function(){var a={parentDomain:parent.window.location.hostname,visitorId:SN.StoreManager.getValueFromStore(SN.Constants.SN_VI_STORE_NAME,SN.Constants.VISITOR_ID)},b;switch(this.type){case"Gravity Form":a.appType=this.type,a.adpGravityFormUrl=parent.SN.Conf.ADP_BASE_URL[d.instanceIdSplitted[1]],a.adpGravityFormPostId=d.instanceIdSplitted[2];break;case"FAQ":case"Info":a.appType=this.type,a.adpFaqApi=parent.SN.Conf.ADP_BASE_URL[d.instanceIdSplitted[1]],a.adpClientId=d.instanceIdSplitted[0],a.adpInstanceId=d.instanceIdSplitted[2];var f,g;for(k in c.modelData)if(c.modelData.hasOwnProperty(k)){f=k;try{g=JSON.parse(c.modelData[f]),a["adp"+this.type+"SerialNo"]=r(g,d.instanceIdSplitted[2]),a.modelKey=f}catch(h){SN.Utils.debug("Model response is not json data",g)}}break;case"CTA":case"Insights":a.appType=this.type,a.adpDssGetInstanceApi=parent.SN.Conf.ADP_BASE_URL["Dss Get Instance"],a.adpInstanceId=d.instanceIdSplitted[2];break;case"Invite":a.appType=this.type,SN.ADP.InviteApp.Config.AdpDssGetInstanceApi=parent.SN.Conf.ADP_BASE_URL["Dss Get Instance"],SN.ADP.InviteApp.Config.AdpInstanceId=d.instanceIdSplitted[2],SN.ADP.InviteApp.Config.InviteType="popup";var f,g;SN.StoreManager.setValueInStore(e.ADP_STORE_KEY,e.WIDGET_TYPE,"Invite"),SN.StoreManager.setValueInStore(e.ADP_STORE_KEY,e.WIDGET_ID,d.instanceIdSplitted[2]);for(k in c.modelData)if(c.modelData.hasOwnProperty(k)){f=k;try{g=JSON.parse(c.modelData[f]),SN.ADP.InviteApp.Config.InviteType=s(g),a.modelKey=f}catch(h){SN.Utils.debug("Model response is not json data",g)}}}var i=parent.document.getElementById("by247-chat-menu-close"),j=this.type;if(typeof SN.CustomScript.ADP_getDCFBranch=="function"&&SN.CustomScript.ADP_getDCFBranch()=="self-service"){if(typeof SN.CustomScript.ADP_getClientSpecificChatParams=="function"){b=SN.CustomScript.ADP_getClientSpecificChatParams(l.ruleId,c,this.type);if(b!=null&&b.customParams)for(var k in b.customParams)b.customParams.hasOwnProperty(k)&&(a[k]=b.customParams[k])}var m={customParams:a};i?by247.chat.forceClose(function(){setTimeout(function(){j=="Invite"?by247.chat.startInteraction("invite","appId1",m):by247.chat.startChat(m)},100)}):this.type=="Invite"?by247.chat.startInteraction("invite","appId1",m):by247.chat.startChat(m)}else{if(typeof SN.CustomScript.ADP_getClientSpecificChatParams=="function"){b=SN.CustomScript.ADP_getClientSpecificChatParams(l.ruleId,c,this.type);if(b!=null&&b.initParams)for(var k in b.initParams)b.initParams.hasOwnProperty(k)&&(a[k]=b.initParams[k])}var n={initParams:a};b&&b.customParams&&(n.customParams=b.customParams,a&&(a.customParams=b.customParams)),SN.ADP.InviteApp.Config.InviteType&&SN.ADP.InviteApp.Config.InviteType.length>0&&by247.chat.endInteraction("invite",{appId:SN.ADP.InviteApp.Config.InviteType,done:"remove"}),i?by247.chat.endInteraction("selfserve",{done:function(){setTimeout(function(){j=="Invite"?(a.triggerAppId=SN.ADP.InviteApp.Config.InviteType,by247.chat.startInteraction("invite",a)):by247.chat.startInteraction("selfserve",n)},100)}}):this.type=="Invite"?(a.triggerAppId=SN.ADP.InviteApp.Config.InviteType,by247.chat.startInteraction("invite",a)):by247.chat.startInteraction("selfserve",n)}SN.Utils.debug("Loaded "+this.type+" in loadAppInVea")},this.loadGna=function(){function a(){var a=document.createElement("script"),b=parent.SN.Conf.ADP_BASE_URL[d.instanceIdSplitted[1]];adpClientId=d.instanceIdSplitted[0],apdInstanceId=d.instanceIdSplitted[2],a.src=b+"/"+adpClientId+"?instanceId="+apdInstanceId+"&callback=gnaApiCallback",document.body.appendChild(a)}parent.SN.ADP.LoadHopscotch(),a(),parent.SN.ADP.currentApp="Guided Navigation"};if(this.type=="CTC"){this.widgetRef=o(this.baseUrl),this.widget.appendChild(this.widgetRef);var t=this.widgetRef.contentWindow||this.widgetRef.contentDocument;t.document?this.widgetRefWin=t:this.widgetRefWin=t.getParentNode(),Event.observe(this.widgetRefWin,"load",q.bindAsEventListener(this))}else this.type==1&&(this.widgetRef=p(),this.widgetRefWin=this.widgetRef,Event.observe(this.widgetRefWin,"load",q.bindAsEventListener(this)),window.focus())};ADPApp.prototype.isPresent=function(){SN.Utils.debug("ADPApp.prototype.isPresent");var a=!1;switch(this.instanceIdSplitted[1]){case"FAQ":break;case"Guided Navigation":SN.Utils.debug("isPresent Guided Navigation"),typeof parent.SN.ADP.currentApp!==undefined&&parent.SN.ADP.currentApp=="Guided Navigation"&&(a=!0);break;case"CTC":parent.document.getElementById(this.widget.id)!==null&&(a=!0);break;case"Gravity Form":SN.Utils.debug("isPresent Gravity Form"),typeof parent.SN.ADP.SelfServeDCFview!="undefined"&&parent.SN.ADP.SelfServeDCFview=="Gravity Form"&&(a=!0)}return SN.Utils.debug("returning from isPresent",a),a?!0:!1},ADPApp.prototype.hide=function(){return this.type==1?self.focus():this.type==0&&(Element.hide(this.widget),Element.show(this.tab)),!1},ADPApp.prototype.show=function(){switch(this.type){case 1:this.widgetRef.focus();break;case 0:Element.show(this.widget);break;case"Guided Navigation":this.loadGna();break;case"FAQ":case"Gravity Form":case"Info":case"CTA":case"Insights":case"Invite":this.loadAppInVea()}return!1},ADPApp.prototype.close=function(){this.type==1&&this.widgetRef.close(),Element.remove(this.widget),delete __app[this.id]},ADPApp.prototype.setContext=function(a){this.widgetRefWin.WOWPx.setContext(a)},ADPApp.prototype.isLoaded=function(){return this.isLoaded},typeof SN=="undefined"&&(SN={}),SN.Social=function(){function a(){var a=parent.document.getElementById("sn_iframe"),b=a.contentWindow.document.createElement("script");b.id="sn-social",b.type="text/javascript",b.src=parent.SN.Conf.SOCIAL_BASE_URL+"/js/widgets/common/all.js",a.contentWindow.document.body.appendChild(b)}return{load:a}}();var JsonpCall=function(b){var c=b.url;(c===null||typeof c=="undefined")&&b.callback({message:"url is a mandatory field. Please provide correct url"});var d=b.data,e="";for(var f in d)d.hasOwnProperty(f)&&(e+="&"+f+"="+d[f]);c=c+"?jsonp="+b.callback+e+"&domain="+window.location.hostname;if(c){var g=document.createElement("script");g.src=c,document.body.appendChild(g)}};typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.TfsSendDataApi=function(){function r(a){var b={f:{},ed:{}};for(var c in a)if(a.hasOwnProperty(c)&&c!=""&&!$undefinedOrNull(c))if(/^._.+/.test(c)){var d=[],e=c.indexOf("_");d[0]=c.slice(0,e),d[1]=c.slice(e+1),b.f[d[0]]=b.f[d[0]]||{},b.f[d[0]][d[1]]=a[c]}else b.ed[c]=a[c];return b}function s(g,h){var j,k;h||(h=d),k={fireImmediately:!0,data:r(g)},h==c?(j=b,m={}):h==d?(j=a,l={}):h==f&&(j=e,n={}),k.eventId=j,i.fire("WOWPXAPP_EVENT",k)}function t(a){v(a),parent.SN.Conf.tfsSendBatchProcessEnabled?$sizeOfObject(l)==parent.SN.Conf.tfsSendBatchSize?(s(l,d),l={}):$sizeOfObject(m)==parent.SN.Conf.tfsSendBatchSize?(s(m,c),m={}):$sizeOfObject(n)==parent.SN.Conf.tfsSendBatchSize&&(s(n,f),n={}):x()}function u(a){h=a}function v(b){if(typeof b[1]=="string"){var e={};e[b[1]]=b[2],b[0]=b.shift(),b[1]=e}var i=b[2].toLowerCase();b[2]=i,i||(i=a),parent.SN.Conf.tfsSendBatchProcessEnabled?i==c?m=$mergeObjects(m,b[1]):i==d?l=$mergeObjects(l,b[1]):i==f?n=$mergeObjects(n,b[1]):h&&h.apply(this,b):i==c?p.push(b[1]):i==d?o.push(b[1]):i==f?q.push(b[1]):h&&h.apply(this,b);var j=b[3];j&&$isFunction(j)?j.apply(this,b):k.debug("callback passed in the _tfsq object is not a function - callback: "+j),parent.SN.CallBackToCustom&&parent.SN.CallBackToCustom.onTfsDataPush(b),Array.prototype.push.call(g,b)}function w(){var a=parent.SN.Conf.tfsSendPollerInterval_MilliSec,b=setInterval(function(){x()},a);window.setTimeout(function(){b!=null&&(clearInterval(b),b=null)},parent.SN.Conf.tfsSendPollerTimeOut_MilliSec)}function x(){if(parent.SN.Conf.tfsSendBatchProcessEnabled)$isEmptyObject(l)||s(l,d),$isEmptyObject(m)||s(m,c),$isEmptyObject(n)||s(n,f);else{var a=o.length;for(var b=0;b<a;b++)s(o.shift(),d);a=p.length;for(var e=0;e<a;e++)s(p.shift(),c);a=q.length;for(var e=0;e<a;e++)s(q.shift(),f)}}function y(){parent._tfsq=parent._tfsq||[],g=parent._tfsq;if($isArray(g)){for(var a=0;a<g.length;a++)v(g.shift());g.push=t}parent.SN.Conf.tfsSendBatchProcessEnabled&&w()}var a="111011",b="111013",c="click",d="pageload",e="11122",f="conversion",g,h,i=SN.EventManager,j=SN.Constants,k=SN.Utils,l={},m={},n={},o=[],p=[],q=[];return i.observe(j.BOOTSTRAP_COMPLETED_EVENT,y),i.observe(j.PAGE_LOAD_EVENT_COMPLETE,x),{setCustomTypeHandler:u,constructData:r}}(),typeof SN=="undefined"&&(SN={});try{SN.CustomScript=new parent.SN.CustomScript}catch(err){SN.Utils.error("Error while initializing parent.SN.CustomScript : ",err)}(function(){var b=parent.SN._tfscFunctions;for(var c in b)b.hasOwnProperty(c)&&(window[c]=b[c])})(),SN=SN||{},SN.Session=function(a){function d(a){if($undefinedOrNull(a))throw"Invalid key: "+a;return a}function e(e,f){return $undefined(f)?b.warn("Ignored key(",e,") value(",f,"), call was to set in session with id:(",a,")"):c.set(d(e),JSON.stringify(f)),f}function f(e){var f=c.remove(d(e));return $undefined(f)?(b.warn("SN.SessionManager: Removed key(",e,") from session with id:(",a,")"),f):(b.debug("SN.SessionManager: Removed key(",e,") value(",f,") from session with id:(",a+")"),JSON.parse(f))}function g(a){var b=c.get(d(a));return!$undefinedOrNull(b)&&b.isJSON()?JSON.parse(b):b}function h(){return a}function i(){c.clear()}var b=SN.Utils,c=SN.Store.getStore(a),j={set:e,remove:f,get:g,getSessionId:h,destroy:i};return j};var SN=SN||{};SN.SessionUtils=function(){function createWindowId(){return CONST_PSP_WINDOW+(new Date).getTime()}function assembleUrlParams(urlParams,original){var result=original||{},sessionManager=SN.SessionManager,globalSession=sessionManager.getGlobalSession();if(globalSession!=null){result.vi=globalSession.getVisitorId(),result.vi==null&&utils.setNewVisitor();var visitorGroup=globalSession.getVisitorGroup();$undefinedOrNull(visitorGroup)||(result.vg=visitorGroup);var targetId=globalSession.getTargetId();$undefinedOrNull(targetId)||(result.ti=targetId);var tpRandomNumber=globalSession.getTPRandomNumber();$undefinedOrNull(tpRandomNumber)||(result.rt=tpRandomNumber);var vgRandomNumber=globalSession.getVGRandomNumber();$undefinedOrNull(vgRandomNumber)||(result.rv=vgRandomNumber);var doeRandomNumber=globalSession.getDOERandomNumber();$undefinedOrNull(doeRandomNumber)||(result.re=doeRandomNumber),result.v=parent.SN.Conf.CONST_PSP_VERSION}if($undefinedOrNull(urlParams))return result;for(var i=0;i<urlParams.length;i++){var param=urlParams[i];try{var value=encodeURIComponent(eval(param.expr));!$undefinedOrNull(value)&&!$isEmpty(value)&&(result[encodeURIComponent(param.key)]=value)}catch(err){utils.error("Failed to evaluate expression: "+param.expr,err)}}return result}var CONST_PSP_WINDOW="wid",utils=SN.Utils,me={createWindowId:createWindowId,assembleUrlParams:assembleUrlParams};return me}(),SN=SN||{},SN.GlobalSession=function(){function w(){return o}function x(){return p}function y(){return q}function z(){return r}function A(){var a=c.getWindowName();if($undefinedOrNull(a)||$isEmpty(a))a=d.createWindowId(),c.setWindowName(a)}function B(){parent.SN.Conf.viStore=="cookie"?v=new SN.CookieManager:v=new SN.LocalStorageWrapper,o=v.getValueFromStore(a.SN_VI_STORE_NAME,e),p=b.getValueFromStore(a.SN_AS_STORE_NAME,f),$undefinedOrNull(p)||(q=b.getValueFromStore(a.SN_AS_STORE_NAME,g),r=b.getValueFromStore(a.SN_AS_STORE_NAME,h)),i=b.getValueFromStore(a.SN_RN_STORE_NAME,a.TP_RANDOM_NUMBER),j=b.getValueFromStore(a.SN_RN_STORE_NAME,a.VG_RANDOM_NUMBER),k=b.getValueFromStore(a.SN_RN_STORE_NAME,a.DOE_RANDOM_NUMBER),l=b.getValueFromStore(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION),A()}function C(){m=c.getStoreLifetime(a.SN_VI_STORE_NAME)}function D(d,u,v,w,x,y,z,A,B,C){s=A,t=B;var D=m/1e3;D<t&&(t=D,s=D),c.setStoreLifetime(a.SN_AS_STORE_NAME,s),c.setStoreLifetime(a.SN_RN_STORE_NAME,t),o=d;var H=b.isActiveSessionPresent(),I=b.getValueFromStore(a.SN_VI_STORE_NAME,a.PREVIOUS_ACTIVE_SESSION_TIME),J=(new Date).getTime();b.setValueInStore(a.SN_VI_STORE_NAME,e,o),b.setValueInStore(a.SN_VI_STORE_NAME,a.CURRENT_SESSION_LAST_ACTVITIY_TIME,J),$undefinedOrNull(j)&&(b.setValueInStore(a.SN_RN_STORE_NAME,a.VG_RANDOM_NUMBER,x,t),j=x),$undefinedOrNull(i)&&(b.setValueInStore(a.SN_RN_STORE_NAME,a.TP_RANDOM_NUMBER,y,t),i=y),$undefinedOrNull(k)&&(b.setValueInStore(a.SN_RN_STORE_NAME,a.DOE_RANDOM_NUMBER,z,t),k=z);var K=(new Date).getTime();n=K,$undefinedOrNull(l)&&(l=0);var L=parseInt(l);isNaN(L)&&(c.errorTrack('ActiveSessionId {"'+l+'" } is Invalid. Resetting to 0 for'+"client {"+parent.SN.Conf.CONST_PSP_KEY+"} and cp { "+encodeURIComponent(parent.location.href.substring(0,100))+"}"),l=0);if(!H||l===0){I=b.getValueFromStore(a.SN_VI_STORE_NAME,a.CURRENT_ACTIVE_SESSION_TIME),$undefinedOrNull(I)||b.setValueInStore(a.SN_VI_STORE_NAME,a.PREVIOUS_ACTIVE_SESSION_TIME,I);var M=$undefinedOrNull(parent.SN.Conf.ACTIVE_SESSION_ID_SEED)?0:parent.SN.Conf.ACTIVE_SESSION_ID_SEED;l=parseInt(l)+1,M>l&&(l+=M),b.setValueInStore(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION,l),b.setValueInStore(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION_START_TIME,K),G(),parent.SN.Conf.dataStore!="server"&&!c.isVidBasedonfpid()&&b.setValueInStore(a.SN_VI_STORE_NAME,a.CURRENT_ACTIVE_SESSION_TIME,J)}b.setValueInStore(a.SN_AS_STORE_NAME,f,u),b.setValueInStore(a.SN_AS_STORE_NAME,h,v),b.setValueInStore(a.SN_AS_STORE_NAME,g,w),p=u,r=v,q=w,H||E(),G(),b.setValueInStore(a.SN_RN_STORE_NAME,a.VG_RANDOM_NUMBER,x,t),F()}function E(){c.info("SN.GlobalSession: firing tracking events for eventId - ",a.SESSION_START_EVENT_ID);var b={eventId:a.SESSION_START_EVENT_ID,sessionStartEvent:!0,previousActivesession:$getPreviousActiveSessionStartTime(),data:{f:{v:{geo:{loc:[$geoLongitude(),$geoLatitude()],co:$geoCountry(),cc:$geoCountryCode(),ct:$geoCity(),wr:$geoRegion(),isp:$geoIsp(),ip:$geoIPAddress(),org:$geoOrganization(),zip:$geoPostalCode()}}}}};$undefinedOrNull(b.data.f.v)&&(b.data.f.v={}),$undefinedOrNull(b.data.f.v.geo)&&(b.data.f.v.geo={}),parent.SN.Conf.browserGeoLocationFlag?(b.data.f.v.geo.lt="b",$getGeoBrowserLocationError().length!=2?b.data.f.v.geo.loc=[parseFloat($getGeoLongitudeBrowser()),parseFloat($getGeoLatitudeBrowser())]:(b.data.f.v.geo.le=$getGeoBrowserLocationError(),b.data.f.v.geo.lt="s",b.data.f.v.geo.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())])):(b.data.f.v.geo.lt="s",b.data.f.v.geo.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())]),$undefinedOrNull(b.data.f.p)&&(b.data.f.p={}),b.data.f.p.cp=unescape(parent.document.location.href),b.data.f.p.ti=unescape(parent.document.title),b.data.f.p.re=unescape(parent.document.referrer),u.fire(a.SESSION_START_EVENT,b),c.debug("fired:"+a.SESSION_START_EVENT_ID)}function F(){var c=b.getValueFromStore(a.SN_VI_STORE_NAME,a.PAGE_LOAD_COUNTER);$undefinedOrNull(c)&&(c=0),c=parseInt(c)+1,b.setValueInStore(a.SN_VI_STORE_NAME,a.PAGE_LOAD_COUNTER,c)}function G(){b.createASStore()}function H(){return i}function I(){return j}function J(){return k}function K(){return SN.StoreManager.getValueFromStore(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION)}function L(){return(new Date).getTime()-n}function M(){var a=(new Date).getTime();n=a}var a=SN.Constants,b=SN.StoreManager,c=SN.Utils,d=SN.SessionUtils,e="vi",f="vg",g="ti",h="tp",i=null,j=null,k=null,l=null,m=null,n=null,o=null,p=null,q=null,r=null,s=null,t=null,u=SN.EventManager,v=null,N={load:C,updateVisitorInfo:D,initialize:B,getVisitorId:w,getVisitorGroup:x,getTargetId:y,getTargetPopulationId:z,getTPRandomNumber:H,getVGRandomNumber:I,getDOERandomNumber:J,getActiveSessionId:K,keepAliveActiveSession:G,makeStartSessionCall:E,updateLoadTimeForTOP:M,getTimeOnPage:L};return B(),N},SN=SN||{},SN.SessionManager=function(){function onControllerInit(){var a=configStore.isActionPage();a&&parent.focus()}function initializeOnLoad(){if(sessionManagerInitialized)return;globalSession=new SN.GlobalSession,xdsession=new SN.Session(CONST_XDSESSION_ID),sessionManagerInitialized=!0}function load(){globalSession.load()}function getVisitorSession(){return{}}function getXDSession(){return xdsession}function getGlobalSession(){return globalSession}function doGetFSMVariable(a){var b=null,c=a.scope;return c==SCOPE_RUNTIME?b=configStore.getRuntimeFSMVarValue(a.key):c=="v"?b=storeManager.getValueFromStore(SN_CONSTANTS.SN_VARIABLE_STORE_NAME,a.key):b=storeManager.getValueFromStore(SN_CONSTANTS.SN_AS_STORE_NAME,a.key),!$undefinedOrNull(b)&&typeof b=="object"&&!$undefinedOrNull(b.length)?JSON.stringify(b):b}function doUpdateFSMVariable(update){var value=null,strategy=update.strategy,scope=update.scope,doEval=strategy==STRATEGY_EVALUATE_ONCE&&updatedVarMap[update.key]!=CONST_UPDATED||strategy==STRATEGY_POLL;if(doEval)try{value=eval(update.expr),strategy==STRATEGY_EVALUATE_ONCE&&update.rollingcount===0&&(update.value=value),updatedVarMap[update.key]=CONST_UPDATED}catch(err){value=null,utils.error("Failed to evaluate expr: ",update.expr,err)}else strategy==STRATEGY_CONSTANT?value=update.expr:value=update.value;return scope==SCOPE_RUNTIME?($undefinedOrNull(value)&&(value=configStore.getRuntimeFSMVarValue(update.key)),configStore.setRuntimeFSMVarValue(update.key,value),value):(update.rollingcount>0&&doEval&&(value=doUpdateRollingFSMVariable(update,value)),$undefinedOrNull(value)||(scope==SCOPE_AS?value=storeManager.setValueInStore(SN_CONSTANTS.SN_AS_STORE_NAME,update.key,value):value=storeManager.setValueInStore(SN_CONSTANTS.SN_VARIABLE_STORE_NAME,update.key,value)),value)}function doUpdateRollingFSMVariable(a,b){var c=null;return a.scope=="a"?c=storeManager.getValueFromStore(SN_CONSTANTS.SN_AS_STORE_NAME,a.key):c=storeManager.getValueFromStore(SN_CONSTANTS.SN_VARIABLE_STORE_NAME,a.key),$undefinedOrNull(c)?c=[]:parent.SN.Conf.dataStore!="server"&&!utils.isVidBasedonfpid()&&(c=JSON.parse(c)),c.push(b),c.length>a.rollingcount&&c.shift(),JSON.stringify(c)}var SN_CONSTANTS=SN.Constants,CONST_XDSESSION_ID="xdsession",storeManager=SN.StoreManager,STRATEGY_EVALUATE_ONCE="o",STRATEGY_POLL="p",STRATEGY_CONSTANT="c",SCOPE_RUNTIME="r",SCOPE_AS="a",CONST_UPDATED=!0,globalSession=null,xdsession=null,updatedVarMap={},sessionManagerInitialized=!1,utils=SN.Utils,configStore=SN.ConfigurationManager,me={onControllerInit:onControllerInit,load:load,getVisitorSession:getVisitorSession,getGlobalSession:getGlobalSession,getXDSession:getXDSession,doUpdateFSMVariable:doUpdateFSMVariable,doGetFSMVariable:doGetFSMVariable};return initializeOnLoad(),me}(),$undefined(SN)&&(SN={}),SN.WebTracker=function(){function l(){f=!1,j=parent.document.referrer.split("/")[2],u()}function m(a){var b=i.getValueFromStore(SN.Constants.SN_WEBTRACKER_STORE_NAME,k);return $undefinedOrNull(b)?!1:b.indexOf(a+SN.Constants.CONST_URL_SEPARATOR)===0?!0:b.indexOf(SN.Constants.CONST_URL_SEPARATOR+a+SN.Constants.CONST_URL_SEPARATOR)!=-1?!0:!1}function n(b){var d=0,e=i.getValueFromStore(SN.Constants.SN_WEBTRACKER_STORE_NAME,k);if($undefinedOrNull(e))return 0;b=c.removeDuplicates(b.split(a)).join(a);if(e.indexOf(a)==-1)if(b.indexOf(a)==-1)e==b&&(d=1);else{var f="#"+b.split(a).join("#|#")+"#";d=f.split("#"+e+"#").length-1}else{var g="#"+e.split(a).join("#|#")+"#",f=b.split(a);for(var h=0;h<f.length;h++)d+=g.split("#"+f[h]+"#").length-1}return d}function o(){var b=i.getValueFromStore(SN.Constants.SN_WEBTRACKER_STORE_NAME,k);if($undefinedOrNull(b))return 0;if(b.indexOf(a)==-1)return 1;var c=b.split(a);return c.length}function p(){return typeof j=="undefined"||j==null||j==""?!1:!0}function q(){if(p()){for(var a=0;a<d.length;a++)if(j.indexOf(d[a])!=-1)return!0;return!1}return!1}function r(){var b=i.getValueFromStore(SN.Constants.SN_WEBTRACKER_STORE_NAME,k),c=parent.SN.Conf.getUrlId();if($undefinedOrNull(b))b=c;else{b=b+a+c;var d=b.split(a);d!=null&&d.length>20&&(b=b.substring(b.indexOf(a)+1))}i.setValueInStore(SN.Constants.SN_WEBTRACKER_STORE_NAME,k,b)}function s(){return i.getValueFromStore(SN.Constants.SN_WEBTRACKER_STORE_NAME,k)}function t(a){f=!0,parent.SN.Conf.dataStore!="server"&&!c.isVidBasedonfpid()&&r()}function u(){g.observe(b,t)}var a="|",b="bootstrapDone",c=SN.Utils,d=["google","yahoo","bing","aol","ask"],e=(new Date).getTime(),f=!1,g=SN.EventManager,h=SN.CustomScript,i=SN.StoreManager,j="",k="u",v={getPageVisitUrlSequence:s,isSiteReferrerASearchEngine:q,isSiteVisitedFromAReferrer:p,getTotalVisitCount:o,getVisitCount:n,hasVisited:m};return l(),v}(),$timeOnPage=function(){var a=SN.SessionManager.getGlobalSession();return Math.floor(a.getTimeOnPage()/1e3)},$isSiteVisitedFromAReferrer=function(){return SN.WebTracker.isSiteVisitedFromAReferrer()},$isSiteReferrerASearchEngine=function(){return SN.WebTracker.isSiteReferrerASearchEngine()},$getPageVisitUrlSequence=function(){return SN.WebTracker.getPageVisitUrlSequence()},$hasVisited=function(a){return SN.WebTracker.hasVisited(a)},$visitCount=function(a){return SN.WebTracker.getVisitCount(a)},$getTotalVisitCount=function(){return SN.WebTracker.getTotalVisitCount()},$previousPageId=function(){var a=$getPageVisitUrlSequence();if($undefinedOrNull(a))return null;var b=a.split(SN.Constants.CONST_URL_SEPARATOR);return b.length>1?b[b.length-2]:null},$allPagesVisited=function(a){var b=$getPageVisitUrlSequence();if($undefinedOrNull(b))return!1;var c=a.split(SN.Constants.CONST_URL_SEPARATOR),d=0;for(d=0;d<c.length;d++)if(b.indexOf(c[d])==-1)return!1;return!0},$AnyPagesVisited=function(a){var b=$getPageVisitUrlSequence();if($undefinedOrNull(b))return!1;var c=a.split(SN.Constants.CONST_URL_SEPARATOR),d=0;for(d=0;d<c.length;d++)if(b.indexOf(c[d])!=-1)return!0;return!1},$pageStrictSeqVisited=function(a){var b=$getPageVisitUrlSequence();return $undefinedOrNull(b)?!1:b==null?!1:b.indexOf(a)!=-1},$pageLooseSeqVisited=function(a){var b=$getPageVisitUrlSequence();if($undefinedOrNull(b))return!1;var c=a.split(SN.Constants.CONST_URL_SEPARATOR),d=b,e=0,f=0,g=0;for(e=0;e<c.length;e++){d=d.substring(g);var h=c[e];if(d.indexOf(h)==-1)return!1;if(d.indexOf(h+SN.Constants.CONST_URL_SEPARATOR)===0)f++;else if(d.indexOf(SN.Constants.CONST_URL_SEPARATOR+h+SN.Constants.CONST_URL_SEPARATOR)!=-1)f++;else if(d.indexOf(h)!=-1){var i=b.split(SN.Constants.CONST_URL_SEPARATOR);i[i.length-1]==h&&f++;break}g=d.indexOf(h+SN.Constants.CONST_URL_SEPARATOR)+h.length+1}return f==c.length?!0:!1},$getSpecificPagesVisitCount=function(a,b){var c=$getPageVisitUrlSequence();return $undefinedOrNull(c)||$undefinedOrNull(a)?0:a(c,b)?$visitCount(b):0},typeof SN=="undefined"&&(SN={}),SN.XDStorageHandler=function(){function j(d){$undefinedOrNull(d)&&a.error("cookieData is undefined: check the object");if($undefinedOrNull(localStorage)){a.error("Local Storage is not supported");return}for(var e in d)if(d.hasOwnProperty(e)){var f=d[e].cvalue;if(!$undefinedOrNull(f)){var g=(new Date).getTime(),h="",i=d[e].clifetime;i+=g,h=f+c.LOCALSTORAGE_VALUE_SEPARATOR+i;var j=b+c.LOCALSTORAGE_KEY_SEPARATOR+e;localStorage.setItem(j,h)}}}function k(){var d=[c.SN_VI_STORE_NAME,c.SN_WEBTRACKER_STORE_NAME,c.SN_RN_STORE_NAME,c.SN_ADP_STORE_NAME,c.SN_VARIABLE_STORE_NAME],e={},f="";for(var g=0;g<d.length;g++){f=b+c.LOCALSTORAGE_KEY_SEPARATOR+d[g],a.warn(localStorage);if(f in localStorage){var h=(new Date).getTime();e[d[g]]={};var i=localStorage.getItem(f);if(!$undefinedOrNull(i)){e[d[g]].cvalue=i.split(c.LOCALSTORAGE_VALUE_SEPARATOR)[0];var j=i.split(c.LOCALSTORAGE_VALUE_SEPARATOR)[1],k=j-h;e[d[g]].clifetime=k}}}return e}function l(){var a={};a=k();for(var d in a)if(a.hasOwnProperty(d)){var e=a[d].clifetime;if(e<0){var f=b+c.LOCALSTORAGE_KEY_SEPARATOR+d;localStorage.removeItem(f);if(d==c.SN_VI_STORE_NAME){for(var g in a)a.hasOwnProperty(g)&&(f=b+c.LOCALSTORAGE_KEY_SEPARATOR+g,localStorage.removeItem(f));break}}}}function m(){var a=null,d;parent.SN.Conf.viStore=="cookie"?(a=new SN.CookieManager,a.init()):a=new SN.LocalStorageWrapper;var e=a.getValueFromStore(c.SN_VI_STORE_NAME,c.DATA_CLEAN_UP_DONE_FOR_FPID_KEY),f=-1;e!=null&&(f=e.indexOf("l"));if(f==-1||e==null){d=[c.SN_AS_STORE_NAME,c.SN_RN_STORE_NAME,c.SN_ADP_STORE_NAME,c.SN_EXIT_HISTORY_STORE_NAME,c.SN_VARIABLE_STORE_NAME,c.SN_WEBTRACKER_STORE_NAME,c.SN_VI_STORE_NAME],parent.SN.Conf.CustomStoresToBeCleanedUp.length>0&&(d=d.concat(parent.SN.Conf.CustomStoresToBeCleanedUp));for(var g in d)if(d.hasOwnProperty(g)){var h=b+c.LOCALSTORAGE_KEY_SEPARATOR+g;localStorage.removeItem(h)}e==null&&(e=""),a.setValueInStore(c.SN_VI_STORE_NAME,c.DATA_CLEAN_UP_DONE_FOR_FPID_KEY,e+"l")}}function n(){g=setInterval(l,e)}function o(){var a=parent.document.location.href,c=a.split("#"),d=c[1].split("&"),e="clientkey";for(var f=0;f<d.length;f++){var g=d[f].split("=");if(g[0]==e){b=g[1];return}}}function p(){document.domain==d&&(o(),n(),a.isVidBasedonfpid()&&m())}var a=SN.Utils,b=null,c=SN.Constants,d=parent.SN.Conf.CONST_PSP_ROOT,e=1e4,f=3e4,g=null,h=!0,i=null,q={storeData:j,retrieveData:k,checkCookieLifetime:l,initialize:p};return p(),q}(),$undefined(SN)&&(SN={}),SN.XD={},SN.XD.XDCommand=Class.create({initialize:function(a,b){this.name=a,this.params=b},getCommand:function(){return this.name},getParamObj:function(){return this.params}}),SN.XD.Sender=Class.create({_TIMEOUT:10,CONST_XD_UPDATE_SESSION:"updatesession",CONST_XD_SAVE_STATE:"savestate",CONST_XD_BOOTSTRAP:"bootstrap",CONST_XD_WIDGET_CMD:"widgetcmd",WIDGET_ACTION:"action",WIDGET_NAME:"name",CONST_XD_SAVE_VAR:"savevar",CONST_XD_REDIRECT:"redirect",CONST_XD_RULE_EVENT:"ruleevent",initialize:function(a){this._proxyUrl=a,this._commands=[],this._ready=!0,this.processCommands();var b=this},processCommands:function(){var a=this._TIMEOUT/5;if(this._commands.length!==0&&this._ready){var b=this._commands.shift();this.createReqIFrame(b.getCommand(),b.getParamObj()),a=2*this._TIMEOUT}var c=this;window.setTimeout(function(){c.processCommands()},a)},sendUpdateSessionReq:function(a){this._commands.push(new SN.XD.XDCommand(this.CONST_XD_UPDATE_SESSION,a))},sendSaveStateReq:function(a){if($undefined(a))throw"new state cannot be empty";this._commands.push(new SN.XD.XDCommand(this.CONST_XD_SAVE_STATE,a))},sendBootstrapReq:function(a){if($undefined(a))throw"bootstrapConfig cannot be empty";this._commands.push(new SN.XD.XDCommand(this.CONST_XD_BOOTSTRAP,a))},sendWidgetReq:function(a,b){if($undefined(b))throw"widget name cannot be empty";this._commands.push(new SN.XD.XDCommand(this.CONST_XD_WIDGET_CMD,{action:a,name:b}))},sendSaveVarReq:function(a){if(!$isArray(a)||a.size()===0)throw"not an array of (key, value) pairs";this._commands.push(new SN.XD.XDCommand(this.CONST_XD_SAVE_VAR,a))},sendRedirectReq:function(a){if($undefined(a))throw"url cannot be empty";this._commands.push(new SN.XD.XDCommand(this.CONST_XD_REDIRECT,a))},sendRulesEngineReq:function(a){if($undefined(a))throw"parameters cannot be empty";this._commands.push(new SN.XD.XDCommand(this.CONST_XD_RULE_EVENT,a))},sendXDRequest:function(a,b){if($undefined(a))throw"command cannot be empty";this._commands.push(new SN.XD.XDCommand(a,b))},makeAServerCall:function(a,b){if($undefined(a))throw"command cannot be empty";this._commands.push(new SN.XD.XDCommand("serverCall",b))},createReqIFrame:function(a,b){if($undefined(a))throw"No command defined";var c=new Element("iframe");c.hide();var d=this;c.observe("load",function(){Event.stopObserving(c),window.setTimeout(function(){d._ready=!0,c.remove()},2e3)});var e=this._proxyUrl+"#cmd="+a;$undefined(b)||(e+="&params="+JSON.stringify(b)),c.src=e,document.body.appendChild(c)}}),SN.XD.Proxy=function(){function p(a){var b=null,c=location.hash;c=c.replace(e,"");var d=c.split("&");for(var f=0;f<d.length;f++){var g=d[f].split("=");if(g[0]==a){b=g[1];break}}return b}function s(){var a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];if(!window.ActiveXObject)return window.XMLHttpRequest?new XMLHttpRequest:null;for(var b=0;b<a.length;b++)try{return new ActiveXObject(a[b])}catch(c){SN.Utils.error("exception while trying to get new activeXobject  : ",c)}}function t(a,b){if(a==c){v(b);return}if(a==m.SEND_SERVER_DATA)return;a==m.SET_XD_DATA?o.storeData(b):SN.Utils.info("SN.XD.runProxy:Nothing to do")}function u(){var a=SN.Utils,b=a.readParam("cmd"),c=a.readParam("params");t(b,c)}function v(a){var b=new s;b.onreadystatechange=function(){if(b.readyState==4)if(b.status==200||window.location.href.indexOf(k)==-1){var a="cmd="+j;a=a+"&params="+b.responseText;try{window.setTimeout(function(){SN.XDFrameMessagingUtils.postMessage(a,r,parent)},5)}catch(c){SN.Utils.error("errorWhileMakingPostMessage call to XD Iframe",c)}}else SN.Utils.error("SN.XD : An error has occured making the request")};var c=a,d="",e=!0;for(var f in c)c.hasOwnProperty(f)&&(e?(e=!1,d=f+"="+c[f]):d=d+"&"+f+"="+c[f]);b.open(l,q,!0),b.setRequestHeader("Content-type","application/x-www-form-urlencoded"),b.send(d)}function w(a){var b=new s;b.onreadystatechange=function(){if(b.readyState==4)if(b.status==200||window.location.href.indexOf(k)==-1){var a="cmd="+j;a=a+"&params="+b.responseText;try{window.setTimeout(function(){SN.XDFrameMessagingUtils.postMessage(a,r,parent)},5)}catch(c){SN.Utils.error("errorWhileMakingPostMessage call to XD Iframe",c)}}else SN.Utils.error("SN.XD : An error has occured making the request")};var c=a,d="",e=!0;for(var f in c)c.hasOwnProperty(f)&&(e?(e=!1,d=f+"="+c[f]):d=d+"&"+f+"="+c[f]);b.open(l,i,!0),b.setRequestHeader("Content-type","application/x-www-form-urlencoded"),b.send(d)}function x(){try{if($undefinedOrNull(p("n")))return;var a={};a.loaded=p("caller"),o.checkCookieLifetime(),a.data=o.retrieveData();var b="cmd="+m.IFRAME_LOADED+"&params="+JSON.stringify(a);SN.XDFrameMessagingUtils.postMessage(b,r,parent)}catch(c){SN.Utils.error("Error while notifying load event to parent:"+c),SN.Utils.errorTrack("Error while notifying load event to parent:"+c)}}function y(){try{n=p(m.PSP_VERSION_KEY),q=location.protocol+f+p(a)+"/"+n+g,i=location.protocol+f+p(a)+"/"+n+h}catch(b){SN.Utils.error("Error while initializing pspVersion and PSP_RUN_CALL:"+b)}}function z(){SN.XDFrameMessagingUtils.receiveMessage(function(a){var b="",c="";try{var d=a.data,e=d.split("&");for(var f=0;f<e.length;f++)e[f].indexOf("cmd")===0&&(b=e[f].replace("cmd=","")),e[f].indexOf("params")===0&&(c=e[f].replace("params=",""));c=c.evalJSON()}catch(g){SN.Utils.error("Badly formed JSON, the request is not meant for this listener","error: ",g)}t(b,c)},r)}var a="clientkey",b="parentdomain",c="serverCall",d="sendSeverData",e="#",f="//"+parent.SN.Conf.CONST_PSP_ROOT+"/psp/",g="/run",h="/v0/setdatatoserver/",i=null,j="serverResponse",k="http",l="POST",m=SN.Constants,n=null,o=SN.XDStorageHandler,q=null,r=p(b),A={runProxy:u};return y(),x(),A}(),$undefined(SN)&&(SN={}),SN.WindowLifecycleManager=function(){function g(){if(f)return;f=!0}function h(b,f,g){if($undefinedOrNull(b)){var h="Invalid Input: URL is  undefined or null";throw h}f[e.PSP_STATIC_SERVER_ID]=c.getPSPStaticRoot(),d.setValueInStore("sn.t","t",JSON.stringify(f)),b+="&",b+=e.PSP_STATIC_SERVER_ID,b+="=",b+=encodeURIComponent(c.getPSPStaticRoot()),a.info("SN.WindowLifecycleManager: Opening a new window with url = "+b),window.open(b,"pxoewindow",g||"width=570,height=395,scrollbars=0")}var a=SN.Utils,b=SN.SessionUtils,c=SN.ConfigurationManager,d=SN.StoreManager,e=SN.Constants,f=!1,i={init:g,openNewWindow:h};return i}(),$undefined(SN)&&(SN={}),SN.Controller=function(){function O(){w.debug("doing clearDomStateRetry: ",(new Date).getTime()),L!=null&&(clearInterval(L),L=null)}function P(a){R(),L=setInterval(function(){Q()},a)}function Q(){var b=parent.document.readyState;if(b!=I&&H<G){H++,w.info("Retrying for doc ready,docReadyStatus : "+b+", retryCount:"+H);return}O(),SN.Utils.setDomready(!0),y.fire(a.DOMLOADED,{fireImmediately:!0,data:{}}),w.debug("dom is ready: ",(new Date).getTime()),SN.CustomScript.renderInitcall(M)}function R(){w.debug("doing clearRetry: ",(new Date).getTime()),C!=null&&(clearTimeout(C),C=null)}function S(a){R(),retryTimout=setTimeout(function(){V()},a)}function T(){w.info("SN.Controller:Clearing the psp load timer"),B!=null&&(clearTimeout(B),B=null)}function U(a){try{a!=null&&($(a).remove(),a=null)}catch(b){w.error("Couldn't remove script id : "+a,b)}}function V(){try{if(m){w.info("SN.Controller::service next ready, clearing retry timer"),R();return}if(D>=a.BOOTSRTAP_RETRY_INTERVALS.length){R();return}D++;if(k&&!l){w.infoTrack("inDoRetry:bootstrapRecvd="+l+",retryAttemptCount="+D);var b=v.getGlobalSession();b.initialize(),W(),S(a.BOOTSRTAP_RETRY_INTERVALS[D])}else l?m||(w.infoTrack("inDoRetry:bootstrapRecvd="+l+",bootstrapCompleted="+m+",retryAttemptCount="+D),db()):w.warn("No retry conditions satisfied, should not be here!!")}catch(c){w.error("exception in doRetry : ",c),w.errorTrack("errorIndoRetry",c)}}function W(){if(w.isCrossDomainSupported()&&u.isXDChannelReady()&&u.isMigrationDone()){var b=v.getGlobalSession();b.initialize()}var c=u.getPageId();if($undefinedOrNull(c)){w.info("SN.Controller: Configuration error, pageId is undefined."),w.info("SN.Controller: Firing a psptrackingupdate event"),w.errorTrack("errorInPageIdUndefined"),y.fireException(null,"pageId is undefined");return}var d=u.getPSPKey(),e=u.getPSPRoot(),f=parent.SN.Conf.CONST_PSP_VERSION,g={};g=x.assembleUrlParams(u.getHotSpots(c),g);var h=u.isBootstrapCachingOn();if($undefinedOrNull(h)||h==0)g[a.PARAM_UUIT]=(new Date).getTime();g[a.ACTIVE_SESSION_START_TIME]=(new Date).getTime(),g[a.PARAM_KEY_ACC_KEY]=d,g[a.PARAM_KEY_PAGEID]=c,g[a.PARAM_KEY_CDN_VERSION]=parent.SN.Conf.CONST_CDN_VERSION,u.isActionPage()&&(g[a.PARAM_ACTION_CONTEXT]=u.getActionContext()),g[a.PARAM_KEY_VI_MAINTAINANCE]=parent.SN.Conf.shouldMaintainVi,g[a.PARAM_KEY_DATA_STORE]=parent.SN.Conf.dataStore,g[a.PARAM_KEY_UNIQUE_TIMESTAMP]=parent.SN.Tracker.getUniquePageId(),g[a.PARAM_KEY_URL_ID]=parent.SN.Conf.getUrlId(),g[a.FINGER_PRINT_ID]=w.getFingerPrint(),g[a.VID_BASED_ON_FPID]=w.isVidBasedonfpid(),g[a.BROWSER_DETAILS]=encodeURIComponent(navigator.userAgent),g[a.DEVICE_DETAILS]=parent.SN.UserAgentParser.getDeviceDetails(),g[a.BROWSER]=parent.SN.UserAgentParser.getBrowserDetails(),u.setBootstrapParams(g);var i=w.appendUrlParams(e+"/"+d+"/"+f+a.BOOTSTRAP_CONTEXT,g);w.info("SN.Controller:bootstrap request url: ",i);var j=a.BOOTSTRAP_ID_PREFIX+(new Date).getTime();w.loadJs(i,j),E=j,w.info(new Date,": SN.Controller: Made bootstrap call: id = ",j),w.info("SN.Controller:bootstrap call made at : ",(new Date).getTime())}function X(a){if(i)return;i=!0,j=(new Date).getTime(),E=null;try{u.saveInitConfiguration(a)}catch(b){throw R(),w.info("SN.Controller: Firing a psptrackingupdate event"),y.fireException(null,"pageId evaluation failed."),w.errorTrack("InvalidConfigurationErrorInInitialize,",b),"Invalid configuration: ("+b+")"+a[u.INIT_JS_PAGE_ID]}_()}function Y(){q=window.setInterval(function(){++r;if(u.isXDChannelReady()||r>a.MAX_XD_RETRY_COUNT)Z(),W(),S(a.BOOTSRTAP_RETRY_INTERVALS[D])},a.XD_RETRY_INTERVAL)}function Z(){$undefinedOrNull(q)||clearInterval(q)}function _(){try{w.info(new Date,": SN.Controller: initializing on focus"),v.load(),k=!0,u.isXDChannelReady()||!w.isCrossDomainSupported()?(W(),S(a.BOOTSRTAP_RETRY_INTERVALS[D])):Y()}catch(b){R(),Z(),w.info("Exception occured in SN.Controller.initializeOnlyWhenInFocus:,",b),w.errorTrack("errorInInitializeOnlyWhenInFocus",b)}}function ab(b,c){w.info("SN.Controller:bootstrap response: ",b);if(l){w.makeBSRelatedEventCall(a.SECOND_BOOTSTRAP_RECVD_BY_RETRY_EVENTID);return}l=!0,E=null;if(b.code==a.BOOTSTRAP_VISITOR_GROUP_NOT_FOUND){w.errorTrack("VisitorGroupNotFound:"+b.code),R();return}if(b.code==a.BOOTSTRAP_TARGET_ERROR_CODE){w.errorTrack("OutOfTargetGeo:"+b.code),R();return}if($undefinedOrNull(b.bsdata)){w.errorTrack("bootstrap configuration is undefined"),R();return}try{u.saveBootstrapConfiguration(b),z.saveBootstrapData(b)}catch(d){throw w.info("SN.Controller: Firing a psptrackingupdate event"),w.errorTrack("errorInSaveBootstrapConfiguration",d),R(),"Invalid bootstrap configuration: ("+d+")"}y.fire(a.BOOTSTRAP_RECEIVED_EVENT,{data:{psi:c}});try{u.savePreconditions(b)}catch(d){throw w.info("SN.Controller: Firing a psptrackingupdate event"),w.errorTrack("errorInSavePreconditions",d),R(),"Invalid bootstrap configuration: ("+d+")"}try{u.saveGeneratedVariables(b)}catch(d){throw w.info("SN.Controller: Firing a psptrackingupdate event"),w.errorTrack("errorInSaveGenerateVariables",d),R(),"Invalid bootstrap configuration: ("+d+")"}if(parent.SN.Conf.pspServerType==a.PXOE_SERVER){var e=u.getRuleGroupId(),f=u.shouldStartRE();!$undefinedOrNull(b.bsdata)&&!$undefinedOrNull(b.bsdata.newState)&&(N=b.bsdata.newState.state),f&&!$undefinedOrNull(e)&&e!==""&&(w.info("SN.Controller:GetRules response: ",b),u.saveGetRulesConfiguration(b))}T(),db(c)}function bb(b,c){w.info("SN.Controller:stateChange response: ",b),!$undefinedOrNull(b.bsdata)&&!$undefinedOrNull(b.bsdata.newState)&&(N=b.bsdata.newState.state);try{u.saveBootstrapConfiguration(b)}catch(d){throw w.info("SN.Controller: Firing a psptrackingupdate event"),y.fireException(null,"Invalid statechange configuration."),w.errorTrack("doStateChangeUpdate:InvalidConfigurationException",d),"Invalid bootstrap configuration: ("+d+")"}var e=v.getGlobalSession(),f=u.getVisitorId();e.updateVisitorInfo(f,u.getVisitorGroup(),u.getTargetPopulationId(),u.getTargetId(),u.getVGRandomNumber(),u.getTPRandomNumber(),u.getDOERandomNumber(),u.getActiveSessionLifeTime(),u.getRandomNoLifeTime(),u.getSamplingStorage()),w.info("SN.Controller: Updated visitor and visitor session info"),eb();var g={},h={};h.newState=N,h.newVid=f;var i=u.getBootstrapParams();$undefinedOrNull(i)||(h.ed=i),g.data=h,g.eventId=a.STATE_CHANGE_COMPLETED_EVENT,y.fire(a.STATE_CHANGE_COMPLETED_EVENT,g),w.info("SN.Controller: Fired state change event"),fb(c)}function cb(){y.fire(a.BOOTSTRAP_UPDATE_COMPLETED_EVENT,{eventId:a.BOOTSTRAP_UPDATE_COMPLETED_EVENT})}function db(b){if(m)return;var c=v.getGlobalSession();w.info("SN.Controller : Session creation start time : ",(new Date).getTime());var d=u.getVisitorId(),e=u.getVisitorGroup(),f=u.getTargetPopulationId(),g=u.getTargetId();w.info("SN.Controller: ####### doBootstrapUpdates: updating visitor Info with newVisitorId:",d,", visGroup:",e,"targetPopulationId:",f,"targetId:",g),nb(),c.updateVisitorInfo(d,e,f,g,u.getVGRandomNumber(),u.getTPRandomNumber(),u.getDOERandomNumber(),u.getActiveSessionLifeTime(),u.getRandomNoLifeTime(),u.getSamplingStorage());var h={},i={};i.newState=N,i.newVid=d;var j=u.getBootstrapParams();$undefinedOrNull(j)||(i.ed=j),h.data=i,h.eventId=a.BOOTSTRAP_COMPLETED_EVENT,y.fire(a.BOOTSTRAP_COMPLETED_EVENT,h),m=!0,w.info(new Date,": SN.Controller: bootstrap update completed. firing onload events next"),eb(),gb(),fb(b),w.isEvalEnabled()&&(parent.SN.Conf.eventBasedEvalTriggerEnabled||mb()),w.isCrossDomainSupported()&&cb(),w.debugTrack("bootstrapUpdatesLoaded")}function eb(){var b=u.getFSMUpdateVariables();if($undefinedOrNull(b)){w.info("There are no update variables defined for this page");return}for(var c=0;c<b.length;c++){var d=b[c];try{var e=v.doUpdateFSMVariable(d);u.updateMappedRuleVariables(d,e)}catch(f){w.error("SN.Controller: error occurred while evaluating/updating mapped rule variables using update :",d,f)}}y.fire(a.UPDATE_FSMVARIABLES_EVENT,{eventId:a.UPDATE_FSMVARIABLES_EVENT}),y.fire(a.UPDATE_SN_AS_EVENT,null),(parent.SN.Conf.dataStore=="server"||w.isVidBasedonfpid())&&y.fire(a.UPDATE_SN_AS_EVENT_SERVER,null)}function fb(b){var c=u.getOnLoadEvent();$undefinedOrNull(c)||(w.info("SN.Controller: firing on load event: ",c),y.fire(a.PAGE_TRIGGER,{eventId:a.PAGE_TRIGGER,data:{psi:b,ruleId:c}}))}function gb(){var b=SN.ExitHistory?SN.ExitHistory.getLastExitLink():null,c=null;w.info("SN.Controller: firing tracking events for eventId - ",a.PAGE_EVENT_VISIT_TO_TAGGED_PAGE);var d={eventId:a.PAGE_EVENT_VISIT_TO_TAGGED_PAGE,data:{f:u.getTrackableFSMVariables(a.PAGE_EVENT_VISIT_TO_TAGGED_PAGE)},sr:"PAGE_LOAD",x:!1};$undefinedOrNull(SN.CustomScript.getDecodedValue)||(c=SN.CustomScript.getDecodedValue(b),$undefinedOrNull(c)||(d.data.ed={},d.data.ed.el=c)),$undefinedOrNull(d.data.f)&&(d.data.f={}),$undefinedOrNull(d.data.f.v)&&(d.data.f.v={}),$undefinedOrNull(d.data.f.v.geo)&&(d.data.f.v.geo={}),parent.SN.Conf.browserGeoLocationFlag?(d.data.f.v.geo.lt="b",$getGeoBrowserLocationError().length!=2?d.data.f.v.geo.loc=[parseFloat($getGeoLongitudeBrowser()),parseFloat($getGeoLatitudeBrowser())]:(d.data.f.v.geo.le=$getGeoBrowserLocationError(),d.data.f.v.geo.lt="s",d.data.f.v.geo.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())])):(d.data.f.v.geo.lt="s",d.data.f.v.geo.loc=[parseFloat($geoLongitude()),parseFloat($geoLatitude())]);if(parent.SN.Conf.IS_ADP_ENABLED){$undefinedOrNull(d.data.f.o)&&(d.data.f.o={}),$undefinedOrNull(d.data.f.p)&&(d.data.f.p={});if(typeof Storage!="undefined"){var e=SN.StoreManager.getValueFromStore(a.SN_ADP_STORE_NAME,a.ADP_STORE_CONSTANTS.WIDGET_TYPE),f=SN.StoreManager.getValueFromStore(a.SN_ADP_STORE_NAME,a.ADP_STORE_CONSTANTS.WIDGET_ID),g;typeof SN.CustomScript.getUserLoginFlag=="function"&&(g=SN.CustomScript.getUserLoginFlag());var h=SN.StoreManager.getValueFromStore(a.SN_ADP_STORE_NAME,a.ADP_STORE_CONSTANTS.INTERACTION_COUNT);e&&(d.data.f.o.ft=e),f&&(d.data.f.o.fid=f),g&&(d.data.f.p.dim=g),h&&(d.data.f.o.ic=h)}var i=SN.StoreManager.getValueFromStore(a.SN_VI_STORE_NAME,a.ACTIVE_SESSION_START_TIME);$undefinedOrNull(d.data.f.c)&&(d.data.f.c={})}y.fire(a.VISITOR_EVENT,d),w.debugTrack("fired:"+a.PAGE_EVENT_VISIT_TO_TAGGED_PAGE)}function hb(b,c,d,e){w.debugTrack("processRuleTrigger: ruleFired:"+b);var f=u.getPageId(),g=u.getRuleConfig(b);if($undefinedOrNull(g)){y.fire(a.VISITOR_EVENT,{eventId:a.PAGE_EVENT_RULE_TRIGGER_DROPPED,data:{psi:d,ssi:c,ed:{pageid:f,reason:"ruleConfig is undefined or null",ruleId:b}},sr:"RULE_TRIGGERED",x:!0}),w.errorTrack("ruleConfigIsNotDefinedForRule:"+b);return}var h=e;$undefinedOrNull(h)&&(h={}),h.psi=d,h[a.SOURCE_SEQUENCE_ID]=c,h.ruleId=b,w.info("SN.Controller: processing (",b,")");var i=u.getHandlerConfig(b),j=u.getEventhandlerConfig(i),k=j.handlerType;if($undefinedOrNull(k)||s[k]!=1){y.fire(a.EXCEPTION_EVENT,{eventId:a.RULE_TRIGGERED_EXCEPTION_EVENT,data:{psi:d,ssi:c,ed:{pageid:f,reason:"handlerConfig is either not defined or invalid"}},sr:"RULE_TRIGGERED",x:!0}),w.errorTrack("ruleHandlerIsInvalidForRule:"+b);return}h.handlerType=k;var l={};l.data=e,$undefinedOrNull(l.data.f)&&(l.data.f={}),$undefinedOrNull(l.data.f.v)&&(l.data.f.v={}),l.data.f.v.ri=h.ruleId,l.data.f.v.rn=h.ruleId,l.eventId=J,y.fire(K,l),k==a.EVENT_HANDLER_JS?(w.info("SN.Controller: Firing a custom js handler event for rule ",b),y.fire(a.PAGE_ACTION_EVENT,{eventId:a.EVENT_HANDLER_JS,data:h})):(w.info("SN.Controller: Firing a show UI event for rule ",b),y.fire(a.PAGE_ACTION_EVENT,{eventId:a.SHOW_UI,data:h}))}function ib(b,c,d,e){var f=u.getPageId(),g=e;$undefinedOrNull(g)&&(g={});if($undefinedOrNull(b))return;g[a.PARENT_SEQ_ID]=d,g[a.SOURCE_SEQUENCE_ID]=c,g[a.WIDGET_ID]=b;var h=u.getWidgetHandlerConfig(b),i=u.getEventhandlerConfig(h),j=i.handlerType;if($undefinedOrNull(j)||s[j]!=1){y.fire(a.EXCEPTION_EVENT,{eventId:a.RULE_TRIGGERED_EXCEPTION_EVENT,data:{psi:d,ssi:c,ed:{pageid:f,reason:"handlerConfig is either not defined or invalid"}},sr:"RULE_TRIGGERED",x:!0}),w.errorTrack("widgetHandlerIsInvalidForWidget:"+b);return}g.handlerType=j;var k={};k.data=e,e&&e.params&&($undefinedOrNull(k.data.ed)&&(k.data.ed={}),k.data.ed.params=e.params),$undefinedOrNull(k.data.f)&&(k.data.f={}),$undefinedOrNull(k.data.f.v)&&(k.data.f.v={}),k.data.f.v.ri=g.targetIdentifier,k.data.f.v.rn=b,$undefinedOrNull(k.data.f.a)&&(k.data.f.a={}),k.data.f.a.qu=$getQueue(),k.eventId=J;if(parent.SN.Conf.IS_ADP_ENABLED){$undefinedOrNull(k.data.f.o)&&(k.data.f.o={}),$undefinedOrNull(k.data.f.p)&&(k.data.f.p={});var l=g.params,m=$undefinedOrNull(l.InstanceID)?[]:l.InstanceID.split(":");k.data.f.o.ft=!$undefinedOrNull(m)&&typeof m=="object"&&m.length>1?m[1]:"",k.data.f.o.fid=!$undefinedOrNull(m)&&typeof m=="object"&&m.length>2?m[2]:"";var n;typeof SN.CustomScript.getUserLoginFlag=="function"&&(k.data.f.p.dim=SN.CustomScript.getUserLoginFlag())}y.fire(K,k),j==a.EVENT_HANDLER_JS?(w.info("SN.Controller: Firing a custom js handler event for widget ",b),y.fire(a.PAGE_ACTION_EVENT,{eventId:a.EVENT_HANDLER_JS,data:g})):(w.info("SN.Controller: Firing a show UI event for widget ",b),y.fire(a.PAGE_ACTION_EVENT,{eventId:a.SHOW_UI,data:g}))}function jb(){eb(),y.fire(a.PERIODICAL_EXECUTION_TIMER_EVENT,{data:{iterationId:++e}}),n=(new Date).getTime()}function kb(){y.fire(a.PERIODICAL_EXECUTION_TIMER_EVENT_RUN_CALL,{data:{iterationId:++f}}),o=(new Date).getTime()}function lb(a){a!=null&&(clearInterval(a),a=null)}function mb(){lb(d);var b=u.getPollingInterval();parent.SN.Conf.pspServerType==a.PXOE_SERVER&&kb(),d=setInterval(function(){kb()},b*1e3)}function nb(){lb(c);var a=u.getPollingInterval();jb(),c=setInterval(function(){jb()},a*1e3)}function ob(){A.init()}function pb(a,b){try{p=b,u.setPSPKey(a),h=parent.SN.Conf.CONST_PSP_VERSION,u.setPSPVersion(h),u.setPSPStaticRoot(b);if(F==1){w.warn("SN.Controller.doInit: controller already started");return}w.info(new Date,": SN.Controller: SN loaded, starting initialization procedure"),w.infoTrack("inDoInit"),F=!0,v.onControllerInit(),ob(),M=a,P(200)}catch(c){w.error("Exception in SN.Controller.doInit(),",c),w.errorTrack("errorInDoInit",c)}}function qb(){return g||{location:{},isp:{}}}function sb(a){a.indexOf("http://")===0?top.location.href=a:top.location.href=w.getContext(top.location.href)+"/"+a}function tb(b){var c=b.memo,d=c.eventId,e=c.data,f=c.s;if(d==a.PAGE_EVENT_INITIALIZE)X(e);else if(d==a.PAGE_EVENT_BOOTSTRAP)ab(e,f);else if(d==a.PAGE_EVENT_STATE_CHANGE_UPDATE)bb(e,f);else if(d==a.RULES_TRIGGERED){var g=c.data.ruleId,h=e.ssi;hb(g,h,f,e)}else if(d==a.WIDGET_TRIGGERED){var i=e.widgetId,h=e.ssi,j=e.ed;ib(i,h,f,j)}}function ub(){y.observe(a.PAGE_TRIGGER,function(b){var c=b.memo.data,d=c.ruleId,e=u.getTrackableFSMVariables(a.PAGE_TRIGGER,d),f=c.ssi,g=b.memo.s;y.fire(a.PAGE_EVENT,{eventId:a.RULES_TRIGGERED,sr:a.PAGE_TRIGGER,data:{psi:g,ssi:f,ruleId:d,f:e}})}),y.observe(a.CUSTOM_RULE_TRIGGER_EVENT,function(b){var c=b.memo.data,d=c.ruleId,e=u.getTrackableFSMVariables(a.CUSTOM_RULE_TRIGGERED,d),f=c.ssi,g=b.memo.s;y.fire(a.PAGE_EVENT,{eventId:a.RULES_TRIGGERED,sr:a.CUSTOM_RULE_TRIGGER_EVENT,data:{psi:g,ssi:f,ruleId:d,f:e}})}),y.observe(a.PAGE_EVENT,tb),y.observe(a.RESET_PAGE_STATE,function(){var a=v.getGlobalSession();a.updateLoadTimeForTOP()})}var a=SN.Constants,b="bsid",c=null,d=null,e=0,f=0,g=null,h=null,i=!1,j=-1,k=!1,l=!1,m=!1,n=-1,o=-1,p=null,q=null,r=0,s={};s[a.EVENT_HANDLER_CHAT]=!0,s[a.EVENT_HANDLER_CHAT_INVITE]=!0,s[a.EVENT_HANDLER_PP]=!0,s[a.EVENT_HANDLER_VIDEO]=!0,s[a.EVENT_HANDLER_JS]=!0,s[a.EVENT_HANDLER_SHOW_CHAT_WINDOW]=!0,s[a.EVENT_HANDLER_SCC]=!0,s[a.EVENT_HANDLER_WOWPX]=!0,s[a.EVENT_HANDLER_ADP]=!0;var t=SN.WebTracker,u=SN.ConfigurationManager,v=SN.SessionManager,w=SN.Utils,x=SN.SessionUtils,y=SN.EventManager,z=SN.StoreManager,A=SN.WindowLifecycleManager,B=null,C=null,D=0,E=null,F=!1,G=15,H=0,I="complete",J="110000",K="RULE_ENGINE_EVENT",L=null,M=null,N="",rb={start:nb,startRun:mb,doInit:pb,getGeoInfo:qb};ub();var vb=$undefinedOrNull(parent.SN.Conf.RUN_CALL_POLLER_TIMEOUT)?SN.Constants.POLLER_TIMEOUT:parent.SN.Conf.RUN_CALL_POLLER_TIMEOUT;return window.setTimeout(function(){lb(d)},vb),rb}(),typeof SN=="undefined"&&(SN={}),SN.DecisionMaker=function(){function e(){var e=parent.location.hostname+parent.location.pathname;SN.WebPageFilter.shouldServeURL(e)?a.doInit(c,d):b.info("This url is filtered out : "+e)}var a=SN.Controller,b=SN.Utils,c=b.getClientKey(),d=b.getPSPCDNRoot();e()}(),$undefinedOrNull(SN)&&(SN={}),SN.JSEventController=function(){function executeJS_OE(eventContext){var ruleId=eventContext.data[SN_CONSTANTS.RULE_ID];try{var ruleConfig=configStore.getRuleConfig(ruleId);if($undefinedOrNull(ruleConfig)){utils.error("SN.JSEventController: ruleConfig is null, returning..without being able to process the custom JS..");return}eval(ruleConfig.js),utils.debug("SN.JSEventController: Sucessfully executed custom javascript for rule: ",ruleId)}catch(err){utils.errorTrack("SN.JSEventControllerJSExecutionFailedForRule:"+ruleId,err)}}function executeJS_TIE(a){var b=a.data[SN_CONSTANTS.WIDGET_ID];try{var c=configStore.getEventConfig(b);if($undefinedOrNull(c)){utils.error("SN.JSEventController: eventConfig is null, returning..without being able to process the custom JS..");return}var d=[a.data],e=c.js,f=window,g=e.split(".");for(var h=0;h<g.length;h++)f=f[g[h]];typeof f=="function"&&f.apply(null,d),utils.debug("SN.JSEventController: Successfully executed custom javascript for widget: ",b)}catch(i){utils.errorTrack("SN.JSEventControllerJSExecutionFailedForWidget:"+b,i)}}function handlePageActionEvent(a){var b=a.memo,c=b.eventId;if(c!=SN_CONSTANTS.EVENT_HANDLER_JS)return;parent.SN.Conf.pspServerType==SN.Constants.PXOE_SERVER?executeJS_OE(b):executeJS_TIE(b)}var SN_CONSTANTS=SN.Constants,utils=SN.Utils,eventManager=SN.EventManager,configStore=SN.ConfigurationManager;eventManager.observe(SN_CONSTANTS.PAGE_ACTION_EVENT,handlePageActionEvent)}(),$undefined(SN)&&(SN={}),SN.Executer=function(){function A(){var a="rr-"+p;return p++,a}function B(a,b,c){f.info("SN.Executer: runRules call post params = ",b),o!=null&&(clearTimeout(o),o=null,f.warn("SN.Executer: runRulesTimeoutTimer was not null just before making the runRules call, could be a potential issue!")),o=window.setTimeout(C,n),k=!0,m=!1,l=c,q=!1,r=[],h.makeXDRequest(a,b,function(a){var b=null,c=a.data.split("&");for(var g=0;g<c.length;g++)if(c[g].indexOf("params")===0){b=c[g].replace("params=","");break}if(b==null){f.warn("SN.Executer: null Response received from server");return}var h=b.evalJSON(),j=h.s,k=h.response;if(j==0){var l=h.code,m=h.category;f.error("SN.Executer: Error Response received from server with (errorCode, Category) = (",l,", ",m,"); Msg: ",a)}else i.fire(d,{data:{cmd:e,params:k}})}),f.infoTrack("makeRunRulesCallLoaded")}function C(){k&&(f.warn("SN.Executer:RunRules timed out, setting runRulesGoingOn to false "),L(),M())}function D(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function E(){u!=null&&(clearInterval(u),u=null,f.debug("stopping pcpPoller"),v=0)}function F(a){$isFunction(a)?x.push(a):f.error("Invalid platform check. Please register the function for the same. - "+a.toString())}function G(){y=!0;for(var a=0;a<x.length;a++){y=y&&x[a]();if(!y)break}return y}function H(a,b){SN.RulesRuntime.computeGeneratedRuleVariables(),G();if(!y)return!1;var c=!1;return t?c=SN.RulesRuntime.evaluateAssociatedConditions(j.getPreconditions()):c=SN.RulesRuntime.evaluatePreConditionsForOE(),c&&(f.debug("Preconditions satisfied on round : "+b+" . Triggering Eval Call for event : "+a),E(),J(!0)),c}function I(a){E(),window.clearTimeout(w),w=null;var b=j.getPollingInterval();v++,u=setInterval(function(){H(a,v)},b*1e3),w=window.setTimeout(function(){E()},parent.SN.Conf.RUN_CALL_POLLER_TIMEOUT)}function J(d){var e=j.getPSPRoot(),g=j.getPSPKey(),h=j.getPSPVersion();if($undefinedOrNull(e)||$undefinedOrNull(g)){var i="pspRoot ("+e+") or pspKey ("+g+") not available";throw f.error(i),i}var k={};k[b]=g;var l=A();k[c]=l;if(d){var m=SN.RulesRuntime.getRequestDataCallback();$undefinedOrNull(m)||(f.info("SN.Executor: received sender response from SN.RulesRuntime"),D(k,m),B(e+"/"+g+"/"+h+a,k,l))}}function K(a){if(m&&parent.SN.Conf.eventBasedEvalTriggerEnabled){L(),O(z);return}f.info("SN.Executer: runRules response ",a),SN.RulesRuntime.putResponseDataCallback(a),L(),parent.SN.Conf.eventBasedEvalTriggerEnabled||M()}function L(){s=[],k=!1,l=null,clearTimeout(o),o=null}function M(){m&&(parent.SN.Conf.eventBasedEvalTriggerEnabled?O(z):H("timer",0))}function N(a,b){var c=!1;a||(c=t?parent.SN.Conf.preConditionPollerEnabledForTP:!0),c&&(f.debug("Preconditions not satisfied. Start the pcpPoller"),I(b))}function O(a){SN.RulesRuntime.stopPostConditionPoller(),E();var b=H(a,0);b||(y?N(b,a):window.setTimeout(function(){f.debug("Platform Preconditions not satisfied. Check just once more."),b=H(a,.5),N(b,a)},parent.SN.Conf.delayEvalTriggerByMilliSeconds))}function P(){parent.SN.Conf.eventBasedEvalTriggerEnabled?i.observe(g.TRIGGER_EVAL_CALL,function(a){z=a.memo.eventCode,k?m=!0:O(z)}):i.observe(g.PERIODICAL_EXECUTION_TIMER_EVENT_RUN_CALL,function(a){k?m=!0:(SN.RulesRuntime.stopPostConditionPoller(),H("timer",0))}),i.observe(d,function(a){var b=a.memo;if($undefinedOrNull(b)||$undefinedOrNull(b.data))return;var c=b.data.cmd;if($undefinedOrNull(b.data)||$undefinedOrNull(b.data.params)||$undefinedOrNull(b.data.params.response))return;var d=b.data.params.response;if($undefinedOrNull(c)||$undefinedOrNull(d))return;if(c==e){var g=d.req;k&&g==l?K(d):f.info("SN.Executer: received a late response from the server, so, ignoring it.")}}),i.observe(SN.Constants.RESET_PAGE_STATE,function(){E(),L()})}var a="/run.js?",b="key",c="req",d="xdevent",e="ruleevent",f=SN.Utils,g=SN.Constants,h=SN.CrossXHR,i=SN.EventManager,j=SN.ConfigurationManager,k=!1,l=null,m=!1,n=4e3,o=null,p=1,q=!1,r=[],s=[],t=parent.SN.Conf.pspServerType==g.TIE_SERVER,u=null,v=0,w=null,x=[],y=!0,z=-1,Q={registerPlatformChecks:F};return P(),parent.SN.Conf.HLCachingEnabled&&F(f.isVisitorNotAHotlead),Q}(),$undefined(SN)&&(SN={}),SN.PSPTracker=function(){function u(){k.observe(b,v),k.observe(c,v),k.observe(e,v),k.observe(d,v),k.observe(f,v),k.observe(h,w),k.observe(g,v),k.observe(i,v),k.observe(j,v)}function v(a){var b=a.memo;l.debug("SN.PSPTracker: Recieved a tracking event, eventId - ",b.eventId);var c=b.data,d=b[q],e=c.ruleId,f=parent.SN.Conf.trackingSecured,g={};g[r]=d;var h=c.idm;$undefinedOrNull(h)||(g.idm=h),$undefinedOrNull(b.trackingSecured)||(f=b.trackingSecured);if(!$undefinedOrNull(b.sessionStartEvent)){g.fpid=l.getFingerPrint(),$undefinedOrNull(g.nav)&&(g.nav={},parent.navigator.battery&&(g.nav.battery=parent.navigator.battery),parent.navigator.buildID&&(g.nav.buildID=parent.navigator.buildID),parent.navigator.cookieEnabled&&(g.nav.ce=parent.navigator.cookieEnabled),parent.navigator.language&&(g.nav.lang=parent.navigator.language),parent.navigator.javaEnabled&&(g.nav.je=parent.navigator.javaEnabled()),parent.navigator.doNotTrack&&(g.nav.dnt=parent.navigator.doNotTrack),parent.navigator.oscpu&&(g.nav.oscpu=parent.navigator.oscpu),parent.SN.Conf.pluginsToBeTracked&&parent.navigator.plugins&&(g.nav.plugins=l.getPluginsString()),parent.SN.Conf.mimeTypesToBeTracked&&parent.navigator.mimeTypes&&(g.nav.mimeTypes=l.getMimeTypesString())),$undefinedOrNull(g.win)&&(g.win={},g.win.screenX=parent.window.screenX,g.win.screenY=parent.window.screenY,g.win.scrollMaxX=parent.window.scrollMaxX,g.win.scrollMaxY=parent.window.scrollMaxY,g.win.fullscr=parent.window.fullscreen,g.win.innerHeight=parent.window.innerHeight,g.win.innerWidth=parent.window.innerWidth,g.win.scrollX=parent.window.scrollX,g.win.scrollY=parent.window.scrollY,g.win.outerHeight=parent.window.outerHeight,g.win.outerWidth=parent.window.outerWidth);if($undefinedOrNull(g.ran)){g.ran={};var i=document.referrer,j="",k=null;if(i=="")k="typed/bookmarked";else{j=i.match(/\/.*\//)[0].substr(2,i.length-1);var p=["www.google","yahoo","bing","search.aol","ask.co","wow","webcrawler","mywebsearch","infospace","info","dogpile","duckduckgo","blekko","contenko","alhea"],s=["facebook","twitter","linkedin","pinterest","plus.google","tumblr","instagram","www.vk.com","flickr","myspace","tagged","ask.fm","meetup","meetme","classmates"];for(var u=0;u<p.length;u++)if(j.indexOf(p[u])!=-1){k="searchEngine";break}for(var v=0;v<s.length;v++)if(j.indexOf(s[v])!=-1){k="social";break}$undefinedOrNull(k)&&(k="others")}g.ran.refDomain=j,g.ran.refType=k}}$undefinedOrNull(b.previousActivesession)||(g.pat=b.previousActivesession),g.bt=(new Date).getTime(),g[o]=g.bt-l.getTimeStampDiff();var w=c.r;$undefinedOrNull(w)||(g.r=w);var x;x=navigator.userAgent,g.bd=encodeURIComponent(x);var y=c.f;$undefinedOrNull(y)||(g.f=y);try{parent.SN.Conf.pspServerType==n.TIE_SERVER&&$undefinedOrNull(e)&&!$undefinedOrNull(c.f)&&!$undefinedOrNull(c.f.v)&&(e=c.f.v.ri)}catch(z){l.debug("assigning ruleID"+z)}var A=c.ed;if(!$undefinedOrNull(e)){$undefinedOrNull(A)&&(A={}),A.rn=e;var B=parent.SN.Conf.ruleTypeMapping;if(!$undefinedOrNull(B))for(var C in B)if(B.hasOwnProperty(C)&&e.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())!=-1){g.f.v.rc=B[C];break}}$undefinedOrNull(parent.SN.Conf.tnt)||(g.tnt=parent.SN.Conf.tnt),$undefinedOrNull(parent.SN.Conf.stnt())||(g.stnt=parent.SN.Conf.stnt()),$undefinedOrNull(A)||(g.ed=A),b.s>t?t=b.s:l.error("SN.PSPTracker: received an older seqId event, its a bug !");if(d==n.INVITE_ACCEPTED_EVENT_ID)try{g.f.v.geo=$formattedGeo()}catch(D){l.error("SN.PSPTracker: Could not add Geo info")}l.info("SN.PSPTracker: eventId: ",d,"trackableData: ",g);var E={};E.key=m.getPSPKey(),parent.SN.Tracker.constructAndMakeTrackingCall(E,g,null,f)}function w(a){var b={},c=a.memo,d=parent.SN.Conf.trackingSecured;l.copyParams(c,b),$undefinedOrNull(b.trackingSecured)||(d=b.trackingSecured,delete b.trackingSecured),b.tseq=s,s++,l.info("SN.PSPTracker: generic trackableData: ",b);var e={};e.key=l.getClientKey(),parent.SN.Tracker.constructAndMakeTrackingCall(e,b,null,d)}function x(a,b,c,d,e,f){l.debug("SN.PSPTracker: Recieved a tracking event, eventId - ",a);var g={};g[r]=a,g[o]=(new Date).getTime(),$undefinedOrNull(c)||(g.r=c),$undefinedOrNull(b)||(g.f=b),$undefinedOrNull(d)||(g.ed=d),$undefinedOrNull(parent.SN.Conf.tnt)||(g.tnt=parent.SN.Conf.tnt),$undefinedOrNull(parent.SN.Conf.stnt())||(g.stnt=parent.SN.Conf.stnt()),l.info("SN.PSPTracker: eventId: ",a,"trackableData: ",g);var h={};return h.key=m.getPSPKey(),parent.SN.Tracker.constructAndMakeTrackingCall(h,g,e,f)}function y(){return a}var a="psptrackersender",b="VISITOR_EVENT",c="RULE_ENGINE_EVENT",d="CUSTOM_EVENT",e="exceptionevent",f="WOWPXAPP_EVENT",g="MULTIPLE_RULES_SATISFIED_EVENT",h="CUSTOM_TRACK_EVENT",i="exitLinkEvent",j="SESSION_START_EVENT",k=SN.EventManager,l=SN.Utils,m=SN.ConfigurationManager,n=SN.Constants,o="st",p="s",q="eventId",r="ec",s=0,t=-1,z={getName:y,trackEventData:x};return u(),z}(),$undefined(SN)&&(SN={}),SN.RulesRuntime=function(){function appendOnlyRules(a,b,c){var d=!0;for(var e in c)d===!0?(d=!1,a[b]=""):a[b]+=",",a[b]+=e}function appendRuleEngineDataToRunRulesParams(){var a={},b=configStore.getRuleGroupId();$undefinedOrNull(activatedRules)||appendOnlyRules(a,PARAM_KEY_PC_SATSIFIED_RULES,activatedRules),$undefinedOrNull(b)||(a[CONST_PARAM_KEY_RULE_GROUP_ID]=configStore.getRuleGroupId());var c=configStore.getGeneratedRuleVariables();if(!$undefinedOrNull(c))for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];$undefinedOrNull(e.value)||(a[d]=encodeURIComponent(e.value))}var f=configStore.getMappedRuleVariables();if(!$undefinedOrNull(f))for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];!$undefinedOrNull(h)&&!$undefinedOrNull(h.value)&&(a[g]=encodeURIComponent(h.value))}var i=configStore.getFSMUpdateVariables();for(var j=0;j<i.length;j++){var k=i[j];a[k.key]=encodeURIComponent(sessionManager.doGetFSMVariable(k))}return a[SN.Constants.VISITOR_ID]=configStore.getVisitorId(),a[SN.Constants.VG_RANDOM_NUMBER]=configStore.getVGRandomNumber(),a[SN.Constants.TP_RANDOM_NUMBER]=configStore.getTPRandomNumber(),a[SN.Constants.VERSION]=configStore.getPSPVersion(),a[SN.Constants.ACTIVE_SESSION]=storeManager.getValueFromStore(SN.Constants.SN_VI_STORE_NAME,SN.Constants.ACTIVE_SESSION),a[CONST_EVENT_CODE]=CONST_MODEL_EVALUATION,a[CONST_PXOE_VERSION]=parent.SN.Conf.FRAMEWORK_VERSION,a[CONST_TRACKER_VERSION]=parent.SN.Conf.TRACKING_VERSION,a[CONST_VISITOR_GRUOP]=configStore.getVisitorGroup(),a[CONST_TARGET_ID]=configStore.getTargetId(),a[CONST_TARGET_POPULATION]=configStore.getTargetPopulationId(),a[CONST_BROWSER_DATA]=encodeURIComponent(navigator.userAgent),a}function appendVisitorDataToRequestParams(){var a={};return a[SN.Constants.VISITOR_ID]=configStore.getVisitorId(),a[SN.Constants.VG_RANDOM_NUMBER]=configStore.getVGRandomNumber(),a[SN.Constants.TP_RANDOM_NUMBER]=configStore.getTPRandomNumber(),a[SN.Constants.DOE_RANDOM_NUMBER]=configStore.getDOERandomNumber(),a[SN.Constants.VERSION]=configStore.getPSPVersion(),a[SN.Constants.ACTIVE_SESSION]=storeManager.getValueFromStore(SN.Constants.SN_VI_STORE_NAME,SN.Constants.ACTIVE_SESSION),a[CONST_EVENT_CODE]=CONST_MODEL_EVALUATION,a[CONST_PXOE_VERSION]=parent.SN.Conf.FRAMEWORK_VERSION,a[CONST_TRACKER_VERSION]=parent.SN.Conf.TRACKING_VERSION,a[CONST_VISITOR_GRUOP]=configStore.getVisitorGroup(),a[CONST_TARGET_ID]=configStore.getTargetId(),a[CONST_TARGET_POPULATION]=configStore.getTargetPopulationId(),a[CONST_BROWSER_DATA]=encodeURIComponent(navigator.userAgent),addEvalTestConditions(a),a}function addEvalTestConditions(a){var b=storeManager.getValueFromStore(SN.Constants.SN_ETC_STORE_NAME,SN.Constants.ETC_JSON_KEY);b!=null&&(a[CONST_EVAL_TEST_CONDITIONS]=b)}function getName(){return CONST_RULES_RUNTIME_SENDER_NAME}function evaluatePreConditionsForOE(){var a={},b=!1,c=configStore.getRules();if(!$undefinedOrNull(c))for(var d in c)c.hasOwnProperty(d)&&preconditionsSatisfied(d)&&(a[d]=!0,b=!0);return b?(activatedRules=a,!0):!1}function getRequestDataCallback(){if(!parent.SN.Conf.eventBasedEvalTriggerEnabled){var a=Math.floor(((new Date).getTime()-lastCheckPointTS)/1e3);if(a<configStore.getPollingInterval()-1)return utils.info("SN.RulesRuntime: Time diff between this call and previous call is less than ",configStore.getPollingInterval()," So returning NULL"),null}lastCheckPointTS=(new Date).getTime();var b={};try{parent.SN.Conf.pspServerType==SN.Constants.TIE_SERVER?b=appendVisitorDataToRequestParams():b=appendRuleEngineDataToRunRulesParams()}catch(c){utils.error("Error in getRequestDataCallback :",c)}return $undefinedOrNull(b)||utils.isEmptyObject(b)?null:b}function putResponseDataCallback(a){utils.infoTrack("runRulesResponseReceivedByRulesRuntime","");var b=a.fire;if($undefined(b)||b=="")return;lastExecutionTsServer=a.timestamp;if(parent.SN.Conf.pspServerType==SN.Constants.TIE_SERVER){var c=evaluateAssociatedConditions(b.postConditions);c?processWidget(b):startPostConditionPoller(b)}else window.setTimeout(function(){processRulesFired(b)},1)}function stopPostConditionPoller(){postConditionPoller!=null&&(window.clearInterval(postConditionPoller),postConditionPoller=null),postConditionTimeout&&(window.clearTimeout(postConditionTimeout),postConditionTimeout=null)}function startPostConditionPoller(a){postConditionPoller=window.setInterval(function(){var b=evaluateAssociatedConditions(a.postConditions);b&&(processWidget(a),stopPostConditionPoller())},parent.SN.Conf.postConditionEvalPollingInterval),postConditionTimeout=window.setTimeout(function(){stopPostConditionPoller()},parent.SN.Conf.RUN_CALL_POLLER_TIMEOUT)}function evaluateInCondition(a,b){var c=b.split(",");for(var d=0;d<c.length;d++)if(c[d]==a)return!0;return!1}function evaluateTimerCondition(a,b){var c=getOperandValue(b[0]),d=getOperandValue(b[1]);switch(a){case OPERATOR_EQ:return c==d;case OPERATOR_LT:return c<d;case OPERATOR_LTE:return c<=d;case OPERATOR_GT:return c>d;case OPERATOR_GTE:return c>=d;case OPERATOR_NOTEQ:return c!=d;default:return!1}}function evaluateExists(a){return $undefinedOrNull(configStore.getMappedRuleVariableValue(a))?!1:!0}function getOperandValue(a){var b;if(a.type===CONSTANT_TYPE)return b=a.expr,b;if(a.type===VARIABLE_TYPE){var c=a.expr;b=configStore.getGeneratedRuleVariableValue(c)}if(a.type===FUNCTION_TYPE){var c=a.expr;switch(c){case"TOS":b=$timeOnSite();break;case"TOP":default:b=$timeOnPage()}}return $undefinedOrNull(b)&&(b=configStore.getMappedRuleVariableValue(a.expr)),b}function evaluateVariableCondition(a,b){if(b.length==1&&a==OPERATOR_EXISTS)return evaluateExists(b[0]);var c=getOperandValue(b[0]),d=getOperandValue(b[1]);switch(a){case OPERATOR_EQ:return c==d;case OPERATOR_LT:return c<d;case OPERATOR_LTE:return c<=d;case OPERATOR_GT:return c>d;case OPERATOR_GTE:return c>=d;case OPERATOR_NOTEQ:return c!=d;case OPERATOR_CONTAINS:return $contains(c,d);case OPERATOR_NOT_CONTAINS:return!$contains(c,d);case OPERATOR_STARTS_WITH:return $startsWith(c,d);case OPERATOR_NOT_STARTS_WITH:return!$startsWith(c,d);case OPERATOR_ENDS_WITH:return $endsWith(c,d);case OPERATOR_NOT_ENDS_WITH:return!$endsWith(c,d);case OPERATOR_REGEX:return $patternMatch(c,d);case OPERATOR_IN:return evaluateInCondition(c,d);default:return!1}}function evaluateAssociatedConditions(a){if($undefinedOrNull(a)||a.length==0)return!0;var b=!0;for(var c=0;c<a.length;c++){var d=a[c],e=d.type||"",f=d.operator,g=d.operands,h=!1;f=f.toLowerCase(),e=e.toLowerCase(),f==OPERATOR_EXISTS?b=b&&!$undefined(configStore.getMappedRuleVariableValue(g[0])):(e==CONDITION_TYPE_TIMER?h=evaluateTimerCondition:h=evaluateVariableCondition,b=b&&h.call(this,f,g));if(b===!1)return b}return b}function computeGeneratedRuleVariables(){var generatedRuleVariables=configStore.getGeneratedRuleVariables();if(!$undefinedOrNull(generatedRuleVariables))for(var key in generatedRuleVariables)if(generatedRuleVariables.hasOwnProperty(key)){var variable=generatedRuleVariables[key];try{variable.value=eval(variable.expr),configStore.updateGeneratedRuleVariable(variable.key,variable.value)}catch(err){utils.error("SN.RulesRuntime.computeGeneratedRuleVariables : failed to evaluate & update generated rule variable : ",variable,"error:",err)}}}function trackMultipleRule(a){var b=a[0],c={};c.eventId=CONST_MULTIPLE_RULES_SATISFIED;var d={},e={};e.rtf=b,e.rcs=a,d.ed=e,c.data=d,utils.info("SN.RulesRuntime: Firing tracking event for  MULTIPLE_RULES_SATISFIED"),eventManager.fire(CONST_MULTIPLE_RULES_SATISFIED_EVENT,c)}function processWidget(a){utils.setHotLeadFlag(!0),utils.info("SN.RulesRuntime: Selected widget: ",a);var b=SN.Constants.WIDGET_TRIGGERED,c={};c.eventId=b;if($undefinedOrNull(a)){utils.info("SN.RulesRuntime: No widgets to display");return}var d=a[SN.Constants.WIDGET_ID],e={};e.widgetId=d;var f={},g=configStore.getTrackableFSMVariables(b,a.widgetId);$undefinedOrNull(g)&&(g=configStore.getTrackableFSMVariables(CONST_RULES_TRIGGERED,a.widgetId)),$undefinedOrNull(g)||(f.f=g);var h=a.params;$undefinedOrNull(h)||(f[SN.Constants.WIDGET_PARAMS]=h),f[SN.Constants.WIDGET_TARGET_IDENTIFIER]=a[SN.Constants.WIDGET_TARGET_IDENTIFIER],e.ed=f,c.data=e,utils.info("SN.RulesRuntime: FIRING_TRACKING_EVENT for eventId - ",b),eventManager.fire(CONST_PAGE_EVENT,c),utils.debugTrack("invoked widget",{widgetId:d})}function processRulesFired(a){utils.setHotLeadFlag(!0),utils.info("SN.RulesRuntime: Fired ruleset: ",a);var b=CONST_RULES_TRIGGERED,c={};c.eventId=b;var d=a.length;if(d<1){utils.info("SN.RulesRuntime: No rules to fire ");return}d>1&&trackMultipleRule(a);var e={},f={},g=a[0];f.ruleId=g,e.ed=f,e.ruleId=g;var h=configStore.getTrackableRuleVariables(b,g);$undefinedOrNull(h)||(e.r=h);var i=configStore.getTrackableFSMVariables(b,g);$undefinedOrNull(i)||(e.f=i),c.data=e,c.sr=CONST_RULE_ENGINE_SOURCE,utils.info("SN.RulesRuntime: FIRING_TRACKING_EVENT for eventId - ",b),eventManager.fire(CONST_PAGE_EVENT,c),utils.debugTrack("firedRule",{ruleId:g})}function preconditionsSatisfied(a){var b=configStore.getRules(),c=b[a];if($undefined(c))return!1;var d=c.preconditions||[],e=!0;return $undefinedOrNull(d)||(e=evaluateAssociatedConditions(d)),utils.info("SN.RulesRuntime: result is: ",e," for rule: ",a),e}var CONST_BOOTSTRAP_RECEIVED_EVENT="bootstrapRecvd",CONST_MULTIPLE_RULES_SATISFIED="110004",CONST_RULES_TRIGGERED="110000",CONST_MULTIPLE_RULES_SATISFIED_EVENT="MULTIPLE_RULES_SATISFIED_EVENT",CONST_RULE_ENGINE_SOURCE="rule",CONST_PAGE_EVENT="pageevent",CONST_PXOE_VERSION="vp",CONST_TRACKER_VERSION="vt",CONST_VISITOR_GRUOP="vg",CONST_TARGET_ID="ti",CONST_TARGET_POPULATION="tp",CONST_BROWSER_DATA="bd",CONST_EVENT_CODE="ec",CONST_MODEL_EVALUATION="110005",CONST_EVAL_TEST_CONDITIONS="etc",OPERATOR_EQ="eq",OPERATOR_NOTEQ="noteq",OPERATOR_CONTAINS="contains",OPERATOR_NOT_CONTAINS="notcontains",OPERATOR_STARTS_WITH="startswith",OPERATOR_NOT_STARTS_WITH="notstartswith",OPERATOR_ENDS_WITH="endswith",OPERATOR_NOT_ENDS_WITH="notendswith",OPERATOR_REGEX="regex",OPERATOR_LT="lt",OPERATOR_GT="gt",OPERATOR_LTE="lteq",OPERATOR_GTE="gteq",OPERATOR_IN="in",OPERATOR_EXISTS="exists",CONDITION_TYPE_TIMER="timer",CONST_ACTIVATED_RULES="activatedrules",CONST_LAST_EXECUTION_TS_SERVER="l",VARIABLE_TYPE="v",CONSTANT_TYPE="c",FUNCTION_TYPE="f",CONST_RULES_RUNTIME_SENDER_NAME="rulesruntime",PARAM_KEY_PC_SATSIFIED_RULES="pc",CONST_PARAM_KEY_RULE_GROUP_ID="rg",activatedRules={},lastExecutionTsServer=-1,eventManager=SN.EventManager,sessionManager=SN.SessionManager,storeManager=SN.StoreManager,utils=SN.Utils,configStore=SN.ConfigurationManager,lastCheckPointTS=-1,postConditionPoller=null,postConditionTimeout=null,me={getName:getName,getRequestDataCallback:getRequestDataCallback,putResponseDataCallback:putResponseDataCallback,evaluateAssociatedConditions:evaluateAssociatedConditions,evaluatePreConditionsForOE:evaluatePreConditionsForOE,stopPostConditionPoller:stopPostConditionPoller,computeGeneratedRuleVariables:computeGeneratedRuleVariables};return eventManager.observe(CONST_BOOTSTRAP_RECEIVED_EVENT,function(){lastCheckPointTS=-1e4}),eventManager.observe(SN.Constants.RESET_PAGE_STATE,function(){stopPostConditionPoller()}),me}();var WoWPxApp=function(a,b){function f(a,b){a.indexOf("#")==-1&&(a+="#");for(var c in b)b.hasOwnProperty(c)&&(a=a+c+"="+b[c]+"&");return a.slice(0,a.length-1)}function g(){var a=b.params,c="//"+a.cdnPath+a.key+"/"+a.pspVersion;return a.version!=null&&(c+="/"+a.version),c+="/"+a.r,c}function h(a){var c=g(),d=document.domain,e=!1,f;try{f=a.contentWindow.document}catch(h){e=!0,a.src="javascript:var d=document.open();d.domain='"+d+"';void(0);",f=a.contentWindow.document}f.open()._l=function(){var a=this.createElement("script");e&&(this.domain=d),a.id="js-iframe-async",a.src=c,this.getElementsByTagName("head")[0].appendChild(a),this.urlData=b.params},f.write('<!DOCTYPE html><html><head></head><body onload="document._l();"></body></html>'),f.close()}function i(){var c=parent.document.createElement("iframe");c.id=a+"_iframe",c.scrolling="no",c.frameBorder="0",c.allowTransparency="true";var d=b.iframeStyle||{width:"200px",height:"200px"};c.width=d.width,c.height=d.height,Element.setStyle(c,d),Element.hide(c);var e=b.url,g=b.params||{};return g.id=a,e&&(c.src=f(e,g)),c}function j(){var c=b.url,d=b.params||{};d.id=a;var e=b.popupStyle||{width:"400px",height:"300px",left:"100px"},g="width="+e.width+", height="+e.height+", left="+e.left+", location=0, scrollbars=0, status=0, titlebar=0, toolbar=0";return window.open(f(c,d),a+"_window",g)}function k(){this.isLoaded=!0,Element.hide(this.loadingDiv),this.type==0&&Element.show(this.widgetRef)}this.id=a,this.type=b.type||0,this.widgetRef=null,this.isLoaded=!1,this.widget=parent.document.createElement("div"),this.widget.id=a+"_container",Element.hide(this.widget);var c=b.popupStyle||{width:"400px",height:"300px",left:"100px"};Element.setStyle(this.widget,c),parent.document.body.appendChild(this.widget),this.tab=parent.document.createElement("div"),this.tab.id=a+"_icon",Element.setStyle(this.tab,b.tabStyle||{}),Element.hide(this.tab),parent.document.body.insertBefore(this.tab,this.widget),Event.observe(this.tab,"click",this.show.bindAsEventListener(this)),this.minimizer=parent.document.createElement("a"),this.minimizer.innerHTML="-",this.minimizer.href="#",this.minimizer.id=a+"_minimize",this.minimizer.style["float"]="left",this.minimizer.style.width="10px",this.minimizer.style.textDecoration="none";var d=b.minimizerStyle||{};Element.setStyle(this.minimizer,d),Event.observe(this.minimizer,"click",this.hide.bindAsEventListener(this)),Element.insert(this.widget,this.minimizer),this.closer=parent.document.createElement("a"),this.closer.id=a+"_close",this.closer.href="#",this.closer.innerHTML="X",this.closer.style["float"]="right",this.closer.style.width="10px",this.closer.style.textDecoration="none";var e=b.closerStyle||{};Element.setStyle(this.closer,e),Event.observe(this.closer,"click",this.close.bindAsEventListener(this)),Element.insert(this.widget,this.closer),this.loadingDiv=parent.document.createElement("div"),this.loadingDiv.id=this.id+"_loader",b.loadingStyle&&Element.setStyle(this.loadingDiv,b.loadingStyle),Element.insert(this.widget,this.loadingDiv);if(this.type==0){this.widgetRef=i(),this.widget.appendChild(this.widgetRef);var l=this.widgetRef.contentWindow||this.widgetRef.contentDocument;l.document?this.widgetRefWin=l:this.widgetRefWin=l.getParentNode(),b.url||(h(this.widgetRef),this.widgetRef.style.display="block"),Event.observe(this.widgetRefWin,"load",k.bindAsEventListener(this))}else this.type==1&&(this.widgetRef=j(),this.widgetRefWin=this.widgetRef,Event.observe(this.widgetRefWin,"load",k.bindAsEventListener(this)),window.focus())};WoWPxApp.prototype.move=function(a,b){this.type==0?(this.widget.style.left=a,this.widget.style.top=b):this.type==1&&this.widgetRef.moveTo(a,b)},WoWPxApp.prototype.style=function(a){if(this.type==0)Element.setStyle(this.widget,a);else if(this.type==1){var b=document.viewport.getDimensions(),c=a.width||b.width,d=a.height||b.height;this.widgetRef.resizeTo(c,d)}},WoWPxApp.prototype.hide=function(){return this.type==1?self.focus():this.type==0&&(Element.hide(this.widget),Element.show(this.tab)),!1},WoWPxApp.prototype.show=function(){return this.type==1?this.widgetRef.focus():this.type==0&&(Element.hide(this.tab),Element.show(this.widget)),!1},WoWPxApp.prototype.close=function(){this.type==1&&this.widgetRef.close(),Element.remove(this.widget),Element.remove(this.tab),delete __wowpx[this.id]},WoWPxApp.prototype.setContext=function(a){this.widgetRefWin.WOWPx.setContext(a)},WoWPxApp.prototype.isLoaded=function(){return this.isLoaded},$undefined(SN)&&(SN={}),$undefined(SN.WOWPx)&&(SN.WOWPx={}),SN.WOWPx.Events={CONST_PAGE_EVENT:"pageevent",CONST_PAGE_ACTION_EVENT:"pageactionevent",CONST_BOOTSTRAP_COMPLETED_EVENT:"bootstrapDone",CONST_STATE_CHANGE_COMPLETED_EVENT:"statechangecompleted",CONST_WIDGET_EVENT:"widgetevent",CONST_APP_CONTROL_EVENT:"appcontrol",CONST_APP_INTERACTION_EVENT:"appinteraction",CONST_CHAT_APP_EVENT:"chatappevent",CONST_INVITE_USER:"inviteuser"},SN.WOWPx.EventIds={CONST_CHATAPP_STARTED:"chatappstarted",CONST_CHATAPP_UPDATESTATE_QUEUE:"updatestatequeue",CONST_CHATAPP_UPDATESTATE_CLOSE:"updatestateclose",CONST_CHATAPP_MOVEDTO_PRECHAT:"movedtoprechat",CONST_CHATAPP_MOVEDTO_QUEUE:"movedtoqueue",CONST_CHATAPP_MOVEDTO_CHAT:"movedtochat",CONST_CHATAPP_MOVEDTO_POSTCHAT:"movedtopostchat",CONST_CHATAPP_SHUTDOWN:"chatappshutdown",CONST_CHATAPPLISTENER_INIT:"chatlibinit",CONST_AGENT_AVAILABLE:"agentavailable",CONST_AGENT_NOT_AVAILABLE:"agentunavailable",CONST_CHAT_STARTED:"chatstarted",CONST_CHAT_ENDED:"chatended",CONST_CHAT_ERROR:"chaterror",CONST_CHATAPP_SHUTDOWN_DONE:"chatappshutdowndone",CONST_CHAT_STATE_CHANGE:"chatstatechange",CONST_CHAT_AGENT_TYPING:"agenttyping",CONST_AGENT_TO_CUSTOMER_TEXT:"agenttocusttext",CONST_CUSTOMER_TO_AGENT_TEXT:"custtoagenttext",CONST_AGENT_FORM_PUSH:"agentformpush",CONST_AGENT_URL_PUSH:"agenturlpush",CONST_AGENT_NOTIFY_MESSAGE:"agentnotifymessage",CONST_AGENT_WARN_MESSAGE:"agentwarnmessage",CONST_AGENT_ERROR_MESSAGE:"agenterrormessage",CONST_AGENT_HELP_COMMAND:"agenthelpcommand",CONST_CHAT_LIB_NOTIFICATION:"chatlibnotification",CONST_USER_FORM_SUBMITTED:"userformsubmitted",CONST_AGENT_ENDED_CHAT:"agentendedchat",CONST_INVALID_AGENT_COMMAND:"invalidagentcommand",CONST_FORM_PUSH:"formpush",CONST_USER_HAD_INTERACTIVE_CHAT:"userhadinteractivechat",CONST_LOAD_CHAT_APP_CONFIGS:"loadchatconfigs",CONST_INVITATION_ACCEPTED:"invitationAccepted",CONST_INVITATION_DECLINED:"invitationDeclined",CONST_INVITATION_IGNORED:"invitationIgnored"},$undefined(SN)&&(SN={}),$undefined(SN.WOWPx)&&(SN.WOWPx={}),SN.WOWPx.Controller=function(){function l(h){var i=h.memo,k=i.data,l=k.handlerType;if(l==a){var m=k[b];if(typeof $triggerApp=="function"){$triggerApp(k);return}if(m==d&&!$undefinedOrNull(k.params[e])&&typeof k.params[f]=="string"){var n=k.params[e],p=k.params[f].substr(0,1),q=k.targetIdentifier;SN.WOWPx.Helpers&&SN.WOWPx.Helpers.triggerInvite&&SN.WOWPx.Helpers.triggerInvite(n,p,q);return}var r=j.getWowpxWidgetConfigs(m),s=j.getWowpxAppConfigs(),n=null,t=null;for(var u in s)if(s.hasOwnProperty(u)&&s[u].widgetConfigName==m){n=u,t=s[n];break}if(n=="undefined"||n==null)return;var v={};v.ruleId=z,v.r=n+".js",v.key=parent.SN.Conf.CONST_PSP_KEY,v.pspVersion=parent.SN.Conf.CONST_PSP_VERSION,v.version=parent.SN.Conf.CONST_CDN_VERSION;if(k.p!="undefined"||k.p!=null)for(var w in k.p)k.p.hasOwnProperty(w)&&(v[w]=k.p[w]);var x=parent.SN.Tracker.getUniquePageId();v.up=x,v.vi=j.getVisitorId();var y=x+"_"+n;if(typeof __wowpx[y]=="undefined"||__wowpx[y]==null)r.type=r.type||0,r.url=t.appConfigUrl,v.src=r.type,r.params=v,__wowpx[y]=new WoWPxApp(y,r);__wowpx[y].setParams(k.p),__wowpx[y].show(),g.debug("SN.WOWPx.Controller: Sucessfully executed wowpx handler for rule: ",z)}else if(l==c){var z=k[CONST_RULE_ID],A=j.getHandlerConfig(z),n=A.appId;if(n=="undefined"||n==null)return;var B={};B.key=parent.SN.Conf.CONST_PSP_KEY,B.pspVersion=parent.SN.Conf.CONST_PSP_VERSION,B.version=parent.SN.Conf.CONST_CDN_VERSION;var x=parent.SN.Tracker.getUniquePageId();B.client_page_url=o(),B.up=x,B.p=k.p;if(typeof __adp[n]=="undefined"||__adp[n]==null)__adp[n]=new ADPApp(n,B);__adp[n].show(),g.debug("SN.ADP.AppLauncher: Sucessfully launched aplication : ",n)}}function m(a,b){__wowpx[a]&&__wowpx[a].setContext(b)}function n(a){return __wowpx[a]?__wowpx[a].isLoaded():!1}function o(){return location.protocol+"//"+window.documentDomain}function p(){h.observe(k.PAGE_ACTION_EVENT,l),h.observe(i.CONST_INVITE_USER,l)}var a="START_WOWPX_APP",b="widgetId",c="START_ADP_APP",d="WOWPX",e="appId",f="appType",g=SN.Utils,h=SN.EventManager,i=SN.WOWPx.Events,j=SN.ConfigurationManager,k=SN.Constants;window.__wowpx={},window.__adp={},p();var q={isLoaded:n,setContext:m};return q}(),typeof SN=="undefined"&&(SN={}),typeof SN.ADP=="undefined"&&(SN.ADP={}),SN.ADP.isAgentAvailable=function(a,b){var c,d,e,f;e=a.caserver,d=a.queue,f=a.accountId,e+="/rest/checkAvailability";var g={url:e,data:{queueId:d,accountId:f},callback:b};JsonpCall(g)},$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),$undefined(SN.ADP.Themeroller)&&(SN.ADP.Themeroller={}),SN.ADP.Themeroller=function(){var a=function(a,b){if(b==null||b=="undefined")return;parent.document.getElementById(a).style.height=b},b=function(a,b){parent.document.getElementById(a).innerHTML=b},c=function(a,b,c){if(parent.document.getElementById(b)){var d=parent.document.createElement("style");d.type="text/css",d.innerHTML="."+a+" {";for(var e in c)c.hasOwnProperty(e)&&(d.innerHTML+=e+" : "+c[e]+";");d.innerHTML+="}",parent.document.getElementsByTagName("head")[0].appendChild(d),parent.document.getElementById(b).className+=" "+a}};return{modifyHeight:a,addText:b,addStyle:c}}(),$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),$undefined(SN.ADP.InviteApp)&&(SN.ADP.InviteApp={}),$undefined(SN.ADP.InviteApp.HandlebarsTemplate)&&(SN.ADP.InviteApp.HandlebarsTemplate={}),SN.ADP.InviteApp.HandlebarsTemplate=function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{},c=function(){b.inviteone=a(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var f="",g,h="function",i=this.escapeExpression;return f+="<div id='by247-invite-container' class='tfs-invite tfs-invite-4 tfs-invite-4-1' style='background-image: ",(g=c.backgroundImage)?g=g.call(b,{hash:{},data:e}):(g=b.backgroundImage,g=typeof g===h?g.apply(b):g),f+=i(g)+"'><button id='by247-invite-close' class='tfs-close-invite tfs-close-invite-btn'>Close</button><h2 id='by247-invite-headerone'>",(g=c.primaryText)?g=g.call(b,{hash:{},data:e}):(g=b.primaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h2><p id='by247-invite-headertwo'>",(g=c.secondaryText)?g=g.call(b,{hash:{},data:e}):(g=b.secondaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</p><button id='by247-invite-headerthree' class='tfs-chat-now'>",(g=c.buttonText)?g=g.call(b,{hash:{},data:e}):(g=b.buttonText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</button><p id='by247-invite-p' class='tfs-close-invite'><a id='by247-invite-headerfour' class='tfs-close-invite-link'>",(g=c.hyperlinkText)?g=g.call(b,{hash:{},data:e}):(g=b.hyperlinkText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</a></p></div>",f}),b.invitetwo=a(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var f="",g,h="function",i=this.escapeExpression;return f+="<div id='by247-invite-container' class='tfs-invite tfs-invite-7 tfs-invite-7-1' style='background-image: ",(g=c.backgroundImage)?g=g.call(b,{hash:{},data:e}):(g=b.backgroundImage,g=typeof g===h?g.apply(b):g),f+=i(g)+"'><button id='by247-invite-close' class='tfs-close-invite tfs-close-invite-btn'>Close</button><h2 id='by247-invite-headerone'>",(g=c.primaryText)?g=g.call(b,{hash:{},data:e}):(g=b.primaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h2><p id='by247-invite-headertwo'>",(g=c.secondaryText)?g=g.call(b,{hash:{},data:e}):(g=b.secondaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</p><button id='by247-invite-headerthree' class='tfs-chat-now'>",(g=c.buttonText)?g=g.call(b,{hash:{},data:e}):(g=b.buttonText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</button><p id='by247-invite-p' class='tfs-close-invite'><a id='by247-invite-headerfour' class='tfs-close-invite-link'>",(g=c.hyperlinkText)?g=g.call(b,{hash:{},data:e}):(g=b.hyperlinkText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</a></p></div>",f}),b.invitethree=a(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var f="",g,h="function",i=this.escapeExpression;return f+="<div id='by247-invite-container' class='tfs-invite tfs-invite-8 tfs-invite-8-1' style='background-image: ",(g=c.backgroundImage)?g=g.call(b,{hash:{},data:e}):(g=b.backgroundImage,g=typeof g===h?g.apply(b):g),f+=i(g)+"'><button id='by247-invite-close' class='tfs-close-invite tfs-close-invite-btn'>Close</button><h2 id='by247-invite-headerone'>",(g=c.primaryText)?g=g.call(b,{hash:{},data:e}):(g=b.primaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h2><p id='by247-invite-headertwo' id=''>",(g=c.secondaryText)?g=g.call(b,{hash:{},data:e}):(g=b.secondaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</p><button id='by247-invite-headerthree' class='tfs-chat-now'>",(g=c.buttonText)?g=g.call(b,{hash:{},data:e}):(g=b.buttonText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</button>\n<p id='by247-invite-p' class='tfs-close-invite'><a id='by247-invite-headerfour' class='tfs-close-invite-link'>",(g=c.hyperlinkText)?g=g.call(b,{hash:{},data:e}):(g=b.hyperlinkText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</a></p></div>",f}),b.invitefour=a(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers),e=e||{};var f="",g,h="function",i=this.escapeExpression;return f+="<div id='by247-invite-container' class='tfs-invite tfs-invite-11 tfs-invite-11-1' style='background-image: ",(g=c.backgroundImage)?g=g.call(b,{hash:{},data:e}):(g=b.backgroundImage,g=typeof g===h?g.apply(b):g),f+=i(g)+"'><button id='by247-invite-close' class='tfs-close-invite tfs-close-invite-btn'>Close</button><h2 id='by247-invite-headerone'>",(g=c.primaryText)?g=g.call(b,{hash:{},data:e}):(g=b.primaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</h2><p id='by247-invite-headertwo'>",(g=c.secondaryText)?g=g.call(b,{hash:{},data:e}):(g=b.secondaryText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</p><button id='by247-invite-headerthree' class='tfs-chat-now'>",(g=c.buttonText)?g=g.call(b,{hash:{},data:e}):(g=b.buttonText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</button><p id='tfs-close-invite' class='tfs-close-invite'><a id='by247-invite-headerfour' class='tfs-close-invite-link'>",(g=c.hyperlinkText)?g=g.call(b,{hash:{},data:e}):(g=b.hyperlinkText,g=typeof g===h?g.apply(b):g),f+=i(g)+"</a></p></div>",f})};return{initialize:c,inviteone:b.inviteone,invitetwo:b.invitetwo,invitethree:b.invitethree,invitefour:b.invitefour}},$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),$undefined(SN.ADP.InviteApp)&&(SN.ADP.InviteApp={}),$undefined(SN.ADP.InviteApp.RegisterTemplates)&&(typeof SN.CustomScript.ADP_getDCFBranch=="function"&&SN.CustomScript.ADP_getDCFBranch()=="self-service"?SN.ADP.InviteApp.RegisterTemplates=function(){if(typeof by247.chat.registerTemplate!="function")return;by247.chat.registerTemplate("inviteAppBusy",function(a){a.html="";var b=function(a){},c=function(a){};return{load:b,unload:c}}),by247.chat.registerTemplate("inviteAppChatting",function(a){a.html="";var b=function(a){},c=function(a){};return{load:b,unload:c}}),by247.chat.registerTemplate("inviteAppOffline",function(a){a.html="";var b=function(a){},c=function(a){};return{load:b,unload:c}}),by247.chat.registerTemplate("inviteApp",function(a){c=SN.CustomScript.ADP_getClientSpecificCustomInviteAppCssUrl(),parent.document.getElementById("custom-css")==null&&SN.ADP.InviteApp.Utils.createScript("parent",parent.document,"link",c,"custom-css");var b="",c=SN.ADP.InviteApp.Config.AdpDssGetInstanceApi+"/"+SN.ADP.InviteApp.Config.AdpInstanceId,d=function(a,b){var c="by247jsonp";window[c]=function(a){delete window[c],document.body.removeChild(d),b(a)};var d=document.createElement("script");d.src=a+(a.indexOf("?")>=0?"&":"?")+"callBack="+c+"&pd="+window.location.hostname,document.body.appendChild(d)},e=function(a){d(c,function(b){try{f(a,b.data)}catch(c){SN.Utils.error("ADP api ajax call failed")}})},f=function(b,c){var d=c.widgetData,e=d.distanceBottom,f=d.distanceSide,g=d.position,h=d.type,i=d.slide,j,k;SN.ADP.InviteApp.HandlebarsTemplate().initialize(),h=="1"?(j="tfs-invite-4",a.html=SN.ADP.InviteApp.HandlebarsTemplate().inviteone(d)):h=="2"?(j="tfs-invite-7",a.html=SN.ADP.InviteApp.HandlebarsTemplate().invitetwo(d)):h=="3"?(j="tfs-invite-8",a.html=SN.ADP.InviteApp.HandlebarsTemplate().invitethree(d)):h=="4"&&(j="tfs-invite-11",a.html=SN.ADP.InviteApp.HandlebarsTemplate().invitefour(d)),parent.document.getElementById("by247-invite-container")!=null&&parent.document.getElementById("by247-invite-container").remove(),parent.document.querySelector(b).insertAdjacentHTML("beforeend",a.html),k=parent.document.getElementsByClassName(j)[0];var l=SN.ADP.InviteApp.Utils.setThePositionDynamically(k,h,i,g,f,e);if(d.backgroundImage){imgSrc="url('"+d.backgroundImage+"')";var m={"background-image":imgSrc,"background-repeat":"no-repeat"};SN.ADP.Themeroller.addStyle(j+"-1","by247-invite-container",m)}if(d.closeIcon){var n="url('"+d.closeIcon+"') !important",o={"background-image":n};SN.ADP.Themeroller.addStyle("by247-custom-close","by247-invite-close",o)}var p=parent.document.getElementById("by247-invite-close");p&&(p.style.display=d.declineClose==1?"block":"none");var q=parent.document.getElementById("by247-invite-headerfour");q&&(q.style.display=d.declineHyperlink==1?"block":"none",q.addEventListener("click",SN.ADP.InviteApp.Utils.fadeOut));var r=c.themerollerData.themeroller;if(r&&r.repaint==1&&r.elements)for(var s=0;s<r.elements.length;s++)SN.ADP.Themeroller.addStyle(r.elements[s].customClass,r.elements[s].id,r.elements[s].customTheme);var t;h=="type4"?t=parent.document.getElementsByClassName("tfs-close-invite-link")[0]:t=parent.document.getElementsByClassName("tfs-close-invite")[0],t&&t.addEventListener("click",SN.ADP.InviteApp.Utils.fadeOut);var u=parent.document.getElementsByClassName("tfs-chat-now")[0];u&&u.addEventListener("click",function(){var a=parent.document.getElementsByClassName(j)[0];a&&a.parentNode.removeChild(a),by247.chat.actions.accept("appId1")}),k.style.display="block",SN.ADP.InviteApp.Utils.animate(i,k,l.start,l.stop,10),a.loadedFunc&&a.loadedFunc()},g=function(a){e(a)},h=function(b){var c=parent.document.getElementById("by247-invite-container");c&&c.parentNode.removeChild(c),a.unloadedFunc&&a.unloadedFunc()};return{load:g,unload:h}})}:SN.ADP.InviteApp.RegisterTemplates=function(){var a={name:"inviteAppBusy",definition:function(a){a.html="";var b=function(a){},c=function(a){};return{load:b,unload:c}}},b={name:"inviteAppChatting",definition:function(a){a.html="";var b=function(a){},c=function(a){};return{load:b,unload:c}}},c={name:"inviteAppOffline",definition:function(a){a.html="";var b=function(a){},c=function(a){};return{load:b,unload:c}}},d={name:"inviteApp",definition:function(a){c=SN.CustomScript.ADP_getClientSpecificCustomInviteAppCssUrl(),parent.document.getElementById("custom-css")==null&&SN.ADP.InviteApp.Utils.createScript("parent",parent.document,"link",c,"custom-css");var b="",c=SN.ADP.InviteApp.Config.AdpDssGetInstanceApi+"/"+SN.ADP.InviteApp.Config.AdpInstanceId,d=function(a,b){var c="by247jsonp";window[c]=function(a){delete window[c],document.body.removeChild(d),b(a)};var d=document.createElement("script");d.src=a+(a.indexOf("?")>=0?"&":"?")+"callBack="+c,document.body.appendChild(d)},e=function(a,b){d(c,function(c){try{f(a,c.data,b)}catch(d){SN.Utils.error("ADP api ajax call failed")}})},f=function(b,c,d){var e=c.widgetData,f=e.distanceBottom,g=e.distanceSide,h=e.position,i=e.type,j=e.slide,k,l;SN.ADP.InviteApp.HandlebarsTemplate().initialize(),i=="1"?(k="tfs-invite-4",a.html=SN.ADP.InviteApp.HandlebarsTemplate().inviteone(e)):i=="2"?(k="tfs-invite-7",a.html=SN.ADP.InviteApp.HandlebarsTemplate().invitetwo(e)):i=="3"?(k="tfs-invite-8",a.html=SN.ADP.InviteApp.HandlebarsTemplate().invitethree(e)):i=="4"&&(k="tfs-invite-11",a.html=SN.ADP.InviteApp.HandlebarsTemplate().invitefour(e)),parent.document.getElementById("by247-invite-container")!=null&&parent.document.getElementById("by247-invite-container").remove(),parent.document.querySelector(b).insertAdjacentHTML("beforeend",a.html),l=parent.document.getElementsByClassName(k)[0];var m=SN.ADP.InviteApp.Utils.setThePositionDynamically(l,i,j,h,g,f);if(e.backgroundImage){imgSrc="url('"+e.backgroundImage+"')";var n={"background-image":imgSrc,"background-repeat":"no-repeat"};SN.ADP.Themeroller.addStyle(k+"-1","by247-invite-container",n)}if(e.chatButtonImage){imgSrc="url('"+e.chatButtonImage+"')";var n={"background-image":imgSrc,"background-repeat":"no-repeat"};SN.ADP.Themeroller.addStyle("tfs-chat-now-bgimg","by247-invite-headerthree",n)}if(e.closeIcon){var o="url('"+e.closeIcon+"') !important",p={"background-image":o};SN.ADP.Themeroller.addStyle("by247-custom-close","by247-invite-close",p)}var q=parent.document.getElementById("by247-invite-close");q&&(q.style.display=e.declineClose==1?"block":"none");var r=parent.document.getElementById("by247-invite-headerfour");r&&(r.style.display=e.declineHyperlink==1?"block":"none",r.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation(),SN.ADP.InviteApp.Utils.fadeOut(d)}));var s=c.themerollerData.themeroller;if(s&&s.repaint==1&&s.elements)for(var t=0;t<s.elements.length;t++)SN.ADP.Themeroller.addStyle(s.elements[t].customClass,s.elements[t].id,s.elements[t].customTheme);var u;i=="type4"?u=parent.document.getElementsByClassName("tfs-close-invite-link")[0]:u=parent.document.getElementsByClassName("tfs-close-invite")[0],u&&u.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation(),SN.ADP.InviteApp.Utils.fadeOut(d)});var v=parent.document.getElementsByClassName("tfs-chat-now")[0];v&&v.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=parent.document.getElementsByClassName(k)[0];b&&b.parentNode.removeChild(b),d.actions.accept()}),l.style.display="block",SN.ADP.InviteApp.Utils.animate(j,l,m.start,m.stop,10),a.loadedFunc&&a.loadedFunc()},g=function(a){var b=this;e(a,b)},h=function(b){var c=parent.document.getElementById("by247-invite-container");c&&c.parentNode.removeChild(c),a.unloadedFunc&&a.unloadedFunc()};return{load:g,unload:h}}};return[a,c,b,d]}),$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),$undefined(SN.ADP.InviteApp)&&(SN.ADP.InviteApp={}),$undefined(SN.ADP.InviteApp.Utils)&&(SN.ADP.InviteApp.Utils={}),SN.ADP.InviteApp.Utils.setThePositionDynamically=function(a,b,c,d,e,f){var g,h;return["1","2","3","4"].indexOf(b)!=-1&&(d=="bottom-right"?c=="none"?(a.style.bottom=f+"px",a.style.right=e+"px",g=f,h=f):c=="left"?(a.style.bottom=f+"px",a.style.right="-177px",g=-177,h=e):c=="right"?(a.style.bottom=f+"px",a.style.left="-177px",g=-177,h=e):c=="up"?(a.style.bottom="-240px",g=-240,h=f,a.style.right=e+"px"):c=="down"&&(a.style.top="-250px",g=-250,h=f,a.style.right=e+"px"):d=="bottom-left"?c=="none"?(a.style.bottom="50px",a.style.right="auto",a.style.left="50px",g=f,h=f):c=="up"?(a.style.bottom="-240px",a.style.right="auto",a.style.left=e+"px",g=-240,h=f):c=="down"?(a.style.top="-250px",g=-250,h=f,a.style.left=e+"px"):c=="left"?(a.style.bottom=f+"px",a.style.right="-177px",g=-177,h=e):c=="right"&&(a.style.bottom=f+"px",a.style.left="-177px",g=-177,h=e):d=="middle-right"?c=="none"?(a.style.top="50%",a.style.bottom="auto",a.style.left="auto",a.style.right=e+"px",a.style["margin-top"]="-120px",g=h=f):c=="down"?(g=-177,a.style.top="-177px",a.style.bottom="auto",a.style.left="auto",a.style.right=e+"px",a.style["margin-top"]="-120px",g=-177,h=f):c=="up"?(a.style.top="auto",a.style.bottom="-177px",a.style.left="auto",a.style.right=e+"px",a.style["margin-top"]="-120px",g=-177,h=f):c=="left"?(a.style.top="50%",a.style.bottom=f+"px",a.style.left="auto",a.style.right="-177px",a.style["margin-top"]="-120px",g=-177,h=e):c=="right"&&(a.style.top="50%",a.style.bottom=f+"px",a.style.left="-177px",a.style.right="auto",a.style["margin-top"]="-120px",g=-177,h=e):d=="middle-left"&&(c=="none"?(a.style.top="50%",a.style.bottom="auto",a.style.left="50px",a.style.right="auto",a.style["margin-top"]="-120px",g=h=f):c=="up"?(a.style.top="auto",a.style.bottom="-177px",g=-177,a.style.left=e+"px",a.style.right="auto",a.style["margin-top"]="-120px",h=f):c=="down"?(a.style.top="-177px",a.style.bottom="auto",g=-177,a.style.left=e+"px",a.style.right="auto",a.style["margin-top"]="-120px",h=f):c=="left"?(a.style.top="50%",a.style.bottom=f+"px",a.style.left="auto",a.style.right="-177px",g=-177,a.style["margin-top"]="-120px",h=e):c=="right"&&(a.style.top="50%",a.style.bottom=f+"px",g=-177,a.style.left="-177px",a.style.right="auto",a.style["margin-top"]="-120px",h=e))),{start:g,stop:h}},SN.ADP.InviteApp.Utils.animate=function(a,b,c,d,e){var f=c,g=function(){if(a=="none")return;f>=parseInt(d)?(clearInterval(h),f=parseInt(d)):f+=5,a=="up"?b.style.bottom=f+"px":a=="down"?b.style.top=f+"px":a=="left"?b.style.right=f+"px":a=="right"&&(b.style.left=f+"px")},h=setInterval(g,e)},SN.ADP.InviteApp.Utils.fadeOut=function(a){var b=parent.document.getElementById("by247-invite-container");b.style.opacity=1;var c="",d=function(){b.style.opacity=b.style.opacity-.1,b.style.opacity==0&&(clearInterval(c),typeof SN.CustomScript.ADP_getDCFBranch=="function"&&SN.CustomScript.ADP_getDCFBranch()=="self-service"?by247.chat.actions.decline("appId1"):a.actions.decline())};c=setInterval(d,100)},SN.ADP.InviteApp.Utils.createScript=function(a,b,c,d,e){var f;c=="link"?(f=null,f=b.createElement("link"),f.id=e,f.rel="stylesheet",f.type="text/css",f.href=d):(f=null,f=b.createElement("script"),f.id=e,f.src=d,f.type="text/javascript"),a=="parent"?c=="link"?b.head.appendChild(f):parent.document.body.appendChild(f):c=="link"?b.head.appendChild(f):parent.document.body.appendChild(f)},typeof SN=="undefined"&&(SN={}),typeof SN.ADP=="undefined"&&(SN.ADP={}),SN.ADP.InviteAppLogEvent=function(){var a=function(){var a={f:{a:{qu:""},o:{ii:"",fid:"",ft:"",ws:"open",ip:"",ic:"",a:{ws:"open"},fb:"NA",fq:"",fd:{}},c:{cd:!1},v:{rc:c.BUTTON}}};return a},b={SCREEN_SHOWN:10010,FORM_SUBMIT:10011,WIDGET_OFFERED:11103,WIDGET_ACCEPTED:11104,WIDGET_IGNORED:11106,MORE_THAN_ONE_QUESTION:510001,NO_QUESTIONS:510002,WIDGET_DECLINE:11105},c={BUTTON:"b",PROACTIVE:"p"},d=SN.Constants,e,f="_ip",g="_ic",h="_cd",i=function(){return SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.PREVIOUS_WIDGET_STATE)?SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.PREVIOUS_WIDGET_STATE):"open"},j=function(a){var b=SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.CURRENT_WIDGET_STATE)?SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.CURRENT_WIDGET_STATE):"open";SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.PREVIOUS_WIDGET_STATE,b),SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.CURRENT_WIDGET_STATE,a)},k=function(a,c,f){c.ec=a,f=f||0,SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERVENTION_POSITION)||(SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERVENTION_POSITION,0),c.f.o.ip=0),SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERACTION_COUNT)||(SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERACTION_COUNT,0),c.f.o.ic=0),a===b.SCREEN_SHOWN?(_value=parseInt(SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERVENTION_POSITION))+1,SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERVENTION_POSITION,_value),c.f.o.ip=_value,c.f.o.ic=parseInt(SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERACTION_COUNT))):a===b.FORM_SUBMIT?(f==="no"?c.f.o.ic=0:(_value=parseInt(SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERACTION_COUNT))+1,SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERACTION_COUNT,_value),c.f.o.ic=_value),c.f.o.ip=parseInt(SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERVENTION_POSITION))):(_value=parseInt(SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERACTION_COUNT)),c.f.o.ic=_value,_value=parseInt(SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.INTERVENTION_POSITION)),c.f.o.ip=_value),c.f.o.fid=SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.WIDGET_ID),c.f.o.ft=SN.StoreManager.getValueFromStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.WIDGET_TYPE);var g=i(),h="";c.f.o.a.ws||(c.f.o.a.ws={}),c.f.o.a.ws=g,c.f.c.cd=!1,h=localStorage.getItem("by247-chat-session");if(h){var j=localStorage.getItem("by247-chat-session-"+h);j&&j.state=="chatting"&&(c.f.c.cd=!0)}SN.StoreManager.setValueInStore(d.SN_ADP_STORE_NAME,d.ADP_STORE_CONSTANTS.CHAT_DONE,c.f.c.cd),c.f.o.uid=e,c.f.o.fd["q01-cd"]=c.f.c.cd,c.f.o.fd["q02-ws"]=c.f.o.a.ws,c.f.o.fd["q03-ip"]=c.f.o.ip,c.f.o.fd["q04-ic"]=c.f.o.ic;try{c.f.o.fds=c.f.o.fd,c.f.o.fd=typeof c.f.o.fd=="object"?JSON.stringify(c.f.o.fd):c.f.o.fd}catch(k){SN.Utils.error("f.o.fd is not json")}return c.f.a||(c.f.a={}),c.f.a.qu="",c},l={},m=function(c){c==b.WIDGET_OFFERED&&typeof SN.CustomScript.ADP_triggerScreenShownEvent=="function"&&SN.CustomScript.ADP_triggerScreenShownEvent()&&(l=a(),l=k(b.SCREEN_SHOWN,l),l=SN.CustomScript.ADP_getClientSpecificCustomObject(l),SN.EventManager.fire("WOWPXAPP_EVENT",{eventId:b.SCREEN_SHOWN,fireImmediately:!0,data:l})),c==b.WIDGET_ACCEPTED&&typeof SN.CustomScript.ADP_triggerFormSubmitEvent=="function"&&SN.CustomScript.ADP_triggerFormSubmitEvent()&&(l=a(),l=k(b.FORM_SUBMIT,l),l=SN.CustomScript.ADP_getClientSpecificCustomObject(l),SN.EventManager.fire("WOWPXAPP_EVENT",{eventId:b.FORM_SUBMIT,fireImmediately:!0,data:l})),l=a(),l=k(c,l),l=SN.CustomScript.ADP_getClientSpecificCustomObject(l),l&&SN.EventManager.fire("WOWPXAPP_EVENT",{eventId:c,fireImmediately:!0,data:l})};return{log:m}}(),typeof SN=="undefined"&&(SN={}),typeof SN.ADP=="undefined"&&(SN.ADP={}),SN.ADP.SelfServiceAppLogEvent=function(){function b(b,d){typeof b.eventId=="number"&&(b.eventId=b.eventId.toString());switch(b.eventId){case"111003":SN.ADP.IsSelfServiceIdle||(b.eventId="111003",b.data.f.o.ft=d.appType,c(b),b.eventId="11105",b.data.f.o.ft=d.appType,b.data.f.o.fid=d.adpInstanceId,c(b),a=!1);break;case"11105":b.eventId="11105",b.data.f.o.ft=d.appType,b.data.f.o.fid=d.adpInstanceId,c(b);break;case"11103":b.data.f.p||(b.data.f.p={}),b.data.f.p.cp=d.cp,b.data.f.o.it=d.rc,b.data.f.o.id=d.appid,b.data.f.v||(b.data.f.v={}),b.data.f.v.na=d.na,b.data.f.v.pcs=d.pcs,c(b);break;case"11107":b.data&&b.data.ed&&b.data.ed.workflow=="selfserve"&&(b.eventId="11105",b.data.f.o.ft=d.appType,b.data.f.o.fid=d.adpInstanceId,c(b));break;default:c(b)}}function c(a){typeof SN.CustomScript.ADP_getClientSpecificCustomObject=="function"&&(a=SN.CustomScript.ADP_getClientSpecificCustomObject(a)),a&&SN.EventManager.fire("WOWPXAPP_EVENT",{eventId:a.eventId,fireImmediately:!0,data:a.data})}var a=!1;return{log:b,isIdle:a}}(),$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),$undefined(SN.ADP.VEA)&&(SN.ADP.VEA={}),SN.ADP.VEA.Initialize=function(a){function c(a,c){var d=document.createElement("script");d.async=!0,d.src=a,d.onload=d.onreadystatechange=function(a,b){if(b||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,b||c()};var e=b.document.getElementsByTagName("head")[0];e.insertBefore(d,e.firstChild)}var b=parent.document.getElementById("sn_iframe").contentWindow;c(a.chatUtilUrl,function(){var a=["version=v2","pspVersion=dcf","key=","cdnPath="+parent.SN.Conf.CONST_PSP_CDN_ROOT,"r=context-proxy.min.js"],b="./psp/247SN.html",c=SN.ADP.Themeroller.modifyHeight,d=SN.ADP.Themeroller.addText,e=SN.ADP.Themeroller.addStyle,f={chatUrl:b,customParams:{cdnPath:parent.SN.Conf.CONST_PSP_CDN_ROOT,key:"/psp/"+parent.SN.Conf.CONST_PSP_KEY,pspVersion:parent.SN.Conf.CONST_PSP_VERSION+"/"+parent.SN.Conf.CONST_CDN_VERSION+"/"+"apps/desktopchat",version:"js",r:typeof SN.CustomScript.ADP_getEnvJsFileName=="function"&&SN.CustomScript.ADP_getEnvJsFileName()&&SN.CustomScript.ADP_getEnvJsFileName().length>0?SN.CustomScript.ADP_getEnvJsFileName():"env.js"},initParams:{appid:"",asid:"NA",bsid:"",btnName:"NA",btnTyp:"NA",chatType:"NA",city:"NA",country:"NA",invitePage:"",ip:"",isp:"NA",org:"NA",pcs:"NA",postCode:"NA",psid:"NA",rc:"NA",sc:"NA",tpid:"",url:"",vg:"0",vi:"",worldRegion:"NA",cp:"",na:""},inPage:!0,forceCrossOrigin:!0,contextProxyUrl:b+"#"+a.join("&"),onContextUpdate:function(a){SN.CustomScript.ADP_clientSpecificOnContextUpdate(a);if(a.track){var b=["11103","11104","11105","11106"];if(a.track.data&&a.track.data.ed&&a.track.data.ed.workflow&&a.track.data.ed.workflow=="selfserve"){var f,g={};f=parent.document.getElementById("by247ChatFrame").contentWindow,f&&f.by247&&f.by247.chat&&(g=f.by247.chat.getInitParams()),SN.ADP.SelfServiceAppLogEvent.log(a.track,g)}else a.track.eventId&&b.indexOf(a.track.eventId.toString())!=-1?SN.ADP.InviteAppLogEvent.log(a.track.eventId):typeof SN.CustomScript.track=="function"&&SN.CustomScript.track("desktop",a.track)}a.modifyHeight!=null&&a.modifyHeight.repaint==1&&c(a.modifyHeight.elements[0].id,a.modifyHeight.elements[0].height);if(a.themeroller!=null&&a.themeroller.repaint==1)for(var h=0;h<a.themeroller.elements.length;h++)e(a.themeroller.elements[h].customClass,a.themeroller.elements[h].id,a.themeroller.elements[h].customTheme);if(a.contentroller!=null&&a.contentroller.repaint==1)for(var h=0;h<a.contentroller.elements.length;h++)d(a.contentroller.elements[h].id,a.contentroller.elements[h].text);a!==undefined&&a.message!==undefined&&(a.message=="minimize_window"&&$("#by247-chat-menu-show-hide").click(),a.message=="iframe_height"&&(parent.document.getElementById("by247ChatFrame").contentDocument.getElementById("chat-unavailable").firstChild.style.height<a.height.split("px")[0]&&(parent.document.getElementById("by247ChatFrame").contentDocument.getElementById("chat-unavailable").firstChild.style.height=a.height),a.height.split("px")[0]>300&&(parent.document.getElementById("by247-chat-frame-container").style.height="500px")))},templates:SN.ADP.InviteApp.RegisterTemplates(),invites:SN.CustomScript.ADP_getClientSpecificInviteAppConfig(),assistConfig:SN.CustomScript.ADP_getClientSpecificInviteAppAssistConfig(),startChatImmediately:!1};if(typeof SN.CustomScript.ADP_getDcfParams=="function"){var g=SN.CustomScript.ADP_getDcfParams();for(var h in g)g.hasOwnProperty(h)&&(f[h]=g[h])}by247.chat.ready(function(){by247.chat.init(f)})})},$undefined(SN)&&(SN={}),$undefined(SN.ADP)&&(SN.ADP={}),SN.ADP.Controller=function(){function h(a){var b=a.memo,d=b.data,e=d.handlerType;if(e==g.EVENT_HANDLER_ADP){var f={};f.ruleId=d.targetIdentifier,f.key=parent.SN.Conf.CONST_PSP_KEY,f.pspVersion=parent.SN.Conf.CONST_PSP_VERSION,f.version=parent.SN.Conf.CONST_CDN_VERSION;var h=parent.SN.Tracker.getUniquePageId();f.client_page_url=k(),f.up=h;var i=d.params,j="",l=!1,m={server:SN.CustomScript.ADP_getVsServer(),caserver:SN.CustomScript.ADP_getCaServer(),accountId:SN.CustomScript.ADP_getAccountId(),queue:SN.CustomScript.ADP_getQueue()},n=function(){var a=i.InstanceID.split(":");if(a.length<3)return;var b=a[1]+"__"+a[2];typeof __adp[b]=="undefined"||__adp[b]==null||!__adp[b].isPresent()?(__adp[b]=new ADPApp(b,f,i),c.info("ADPApp created"),__adp[b].show(),c.info("ADPApp shown"),c.debug("SN.ADP.AppLauncher: Sucessfully launched application : ",b)):c.warn("__adp["+b+"] already present")};window.createAlternateADPApp=function(a){typeof a.data!=undefined&&typeof a.data.caStatus!=undefined&&a.data.caStatus!="true"&&(i.InstanceID=j),n()};var o,p;for(var q in i.modelData)if(i.modelData.hasOwnProperty(q)){o=q;try{p=JSON.parse(i.modelData[o]),Object.keys(p).length>0&&typeof p.w!=undefined&&typeof p.w.aw!=undefined&&p.w.aw.ca=="true"&&typeof p.w.aw.wi!=undefined&&(l=!0,j=p.w.aw.wi)}catch(r){c.error("Model response is not json data",p)}}l?SN.ADP.isAgentAvailable(m,"createAlternateADPApp"):n()}}function i(a,b){__adp[a]&&__adp[a].setContext(b)}function j(a){return __adp[a]?__adp[a].isLoaded():!1}function k(){return location.protocol+"//"+window.documentDomain}function l(){d.observe(g.PAGE_ACTION_EVENT,h),d.observe(e.CONST_INVITE_USER,h)}var a="ruleId",b="widgetId",c=SN.Utils,d=SN.EventManager,e=SN.WOWPx.Events,f=SN.ConfigurationManager,g=SN.Constants;window.__adp={},l();var m={isLoaded:j,setContext:i};return m}(),typeof SN=="undefined"&&(SN={}),SN.PreconditionVariables=function(){function e(a,b){return a==c.INVITE_OFFERED_EVENT_ID&&b.f.v.rc==c.TYPE_PROACTIVE?!0:!1}function f(a,b){return a!=c.INVITE_ACCEPTED_EVENT_ID&&a!=c.INVITE_DECLINED_EVENT_ID&&a!=c.INVITE_IGNORED_EVENT_ID||b.f.v.rc!=c.TYPE_PROACTIVE?!1:!0}function g(a,b){return a==c.INVITE_OFFERED_EVENT_ID&&b.f.v.rc==c.TYPE_BUTTON?!0:!1}function i(a,b){e(a,b)&&h++}function j(){return h}function l(a,d){if(e(a,d)){var f=m()+1;b.setSessionData(c.INVITE_COUNT,f)}}function m(){return parseInt(b.getSessionData(c.INVITE_COUNT),10)||0}function o(a,b){g(a,b)&&(n=1)}function p(){return n}function r(a,b){e(a,b)?q=1:f(a,b)&&(q=0)}function s(){return q}function t(a,d){if(e(a,d)){var f=Math.floor((new Date).getTime()/1e3);b.setSessionData(c.LAST_INVITE_SHOWN_TIME,f+"")}}function u(){var a=parseInt(b.getSessionData(c.LAST_INVITE_SHOWN_TIME),10)||0,d=Math.floor((new Date).getTime()/1e3);return d-a}function w(){var a=parseInt(b.getSessionData(c.PAGE_COUNT),10)||0;return v&&(b.setSessionData(c.PAGE_COUNT,++a+""),v=!1),a}function x(a){var b,c;if(!(a&&a.memo&&a.memo.eventId&&a.memo.data))return;b=a.memo.eventId,c=a.memo.data,i(b,c),l(b,c),o(b,c),r(b,c),t(b,c)}var a=SN.EventManager,b=SN.StoreManager,c=SN.Constants,d=SN.CustomScript,h=0,k=0,n=0,q=0,v=!0;return d.CustomStore&&typeof d.CustomStore.setSessionData=="function"&&typeof d.CustomStore.getSessionData=="function"&&(b=d.CustomStore),a.observe(c.APP_TRACK_EVENT,function(a){x(a)}),a.observe(c.BOOTSTRAP_COMPLETED_EVENT,function(){w()}),{proactiveInviteCountOnPage:j,proactiveInviteCountInSession:m,isButtonShown:p,isProactiveInviteActive:s,timeSinceLastProactiveInvite:u,numberOfPagesVisited:w}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.AvailabilityDecider=SN.WOWPx.AvailabilityDecider||function(){function o(a){var b={};typeof a=="function"?(b.cb=arguments[0],b.id=arguments[1],b.type=arguments[2]):b=a;if(l(b.cb)||typeof b.cb!="function")throw new TypeError("CA_DECIDER: Provide callback function");if(l(b.qu)||typeof b.qu!="string"){if(!!l(i.defqueue))throw new TypeError("CA_DECIDER: Provide queue name");b.qu=i.defqueue}if(l(b.id)){var c=10,d="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";b.id="GEN_";for(var f=c;f>0;--f)b.id+=d[Math.round(Math.random()*(d.length-1))]}return l(b.type)&&(parent.SN.Conf.eventBasedEvalTriggerEnabled?b.type=e.ONLY_IF_TRUE:b.type=e.ONLY_ONCE),p({id:b.id,type:b.type,qu:b.qu,cb:b.cb}),u(b.qu),!0}function p(a){z(a.qu),h[a.id]=a}function q(a){delete h[a]}function r(a){var b=[];for(var c in h)if(h.hasOwnProperty(c)){var d=!1;for(var e in a)if(a.hasOwnProperty(e)&&h[c][e]!==a[e]){d=!0;break}d||b.push(h[c])}return b}function s(){return G()!=g.WINDOW_CLOSED&&G()!=g.NO_STATUS?!0:!1}function t(c,d,e,f){var g=(new Date).getTime();g-A(c,"lastResponse")<a?x(d,e,f):g-A(c,"lastRequest")>b&&(w(c),B(c,"lastRequest",g))}function u(a){var b=null,c=f.FALSE,d=null;if(s())b=r(null),c=f.CHATTING,x(b,c,null);else if(l(a))for(var e in h)h.hasOwnProperty(e)&&(b=r({qu:h[e].qu}),c=A(h[e].qu,"status"),d=c==="true"?A(h[e].qu,"trackingId"):null,t(h[e].qu,b,c,d));else b=r({qu:a}),c=A(a,"status"),d=c==="true"?A(a,"trackingId"):null,t(a,b,c,d)}function v(a,b){return Math.floor(Math.random()*(b-a+1))+a}function w(a){var b="av"+(new Date).getTime()+"r"+v(1e3,9999);window[b]=D(b,a);if(l(i.overrideResponse)){var c=document.createElement("script");c.id=b,c.src=y(b,a),c.type="text/javascript",document.body.appendChild(c)}else i.overrideResponse?window[b]({data:{caStatus:"true",trackingId:"DEBUG01$12345"}}):window[b]({data:{caStatus:"false"}})}function x(a,b,c){for(var d=0;d<a.length;d++){var g=a[d].cb;switch(a[d].type){case e.ONLY_ONCE:q(a[d].id),g(b,c);break;case e.REPEAT:g(b,c);break;case e.ONLY_IF_TRUE:b==f.TRUE&&(q(a[d].id),g(b,c));break;case e.ON_CHAT:b==f.CHATTING&&(q(a[d].id),g(b,c))}g=null}}function y(a,b){if(l(a))throw new TypeError("CA_DECIDER: CA requested without callback");if(l(b))throw new TypeError("CA_DECIDER: CA requested without queue");l(i.overrideQueue)||(b=i.overrideQueue);var c="https://"+i.caserver+"/en/ca/rest/checkAvailability"+"?queueId="+b+"&accountId="+i.accountId+"&jsonp="+a,d=A(b,"trackingId");return l(d)||(c+="&trackingId="+d),c}function z(a){return l(a)?null:(a in j||(j[a]={status:f.FALSE,lastRequest:0,lastResponse:0,trackingId:null}),j[a])}function A(a,b){var c=z(a);return c[b]}function B(a,b,c){var d=z(a);d[b]=c}function C(a){if(l(a.qu))return!1;z(a.qu),l(a.lastRequest)||B(a.qu,"lastRequest",a.lastRequest),!l(a.lastResponse)&&!l(a.status)&&(B(a.qu,"lastResponse",a.lastResponse),B(a.qu,"status",a.status),l(a.trackingId)||B(a.qu,"trackingId",a.trackingId))}function D(a,b){return function(c){var d,e;d=c&&c.data&&c.data.caStatus,d==="true"&&typeof c.data.trackingId=="string"&&(e=c.data.trackingId),C({qu:b,status:d,trackingId:e,lastResponse:(new Date).getTime()}),u(b);var f=document.getElementById(a);f&&f.parentNode.removeChild(f);try{delete window[a]}catch(g){window[a]=undefined}}}function E(){m.observe(d,function(a){var b=1;a&&a.memo&&a.memo.data&&a.memo.data.iterationId&&(b=a.memo.data.iterationId);var c=F(b);for(var d=0;d<c.length;d++)u(c[d])})}function F(a){var b=[],d={},f=[],g=[],h=0,i=null;if(a<=c){f=r({type:e.REPEAT});for(h=0;h<f.length;h++)d[f[h].qu]=!0;g=r({type:e.ONLY_IF_TRUE});for(h=0;h<g.length;h++)d[g[h].qu]=!0}for(i in d)d.hasOwnProperty(i)&&b.push(i);return b}function G(){return k}function H(a){return i[a]}function I(a){window.console&&console.warn&&typeof console.warn=="function"&&console.warn(a)}function J(e){if(!e.caserver)throw new TypeError("CA_DECIDER: Provide valid CA server domain");i.caserver=e.caserver,e.defqueue&&typeof e.defqueue=="string"?i.defqueue=e.defqueue:e.avqueue&&typeof e.avqueue=="string"&&(i.defqueue=e.avqueue,I("CA_DECIDER: avqueue deprecated. Replace with defqueue")),e.overrideQueue&&(i.overrideQueue=e.overrideQueue),e.overrideResponse&&(i.overrideResponse=e.overrideResponse);if(!e.accountId)throw new TypeError("CA_DECIDER: Provide valid accound id");i.accountId=e.accountId,e.vsserver?i.vsserver=e.vsserver:I("CA_DECIDER: Providing VS Server is advisable"),e.repeatTill&&(c=e.repeatTill),e.trackingId&&(trackingId=e.trackingId),e.reqThreshold&&(b=e.reqThreshold*1e3),e.resThreshold&&(a=e.resThreshold*1e3);if(e.observePollEvent)d=e.observePollEvent;else{if(!n.CONST_PERIODICAL_EXECUTION_TIMER_EVENT)throw new TypeError("CA_DECIDER: Provide poll event to observe or include SN.Constants class");d=n.CONST_PERIODICAL_EXECUTION_TIMER_EVENT}}function K(a){return J(a),l(i.defqueue)||w(i.defqueue),E(),this.TYPE=e,this.checkAvailability=o,this.getAssistConfig=H,this.init=function(){return!1},!0}var a=6e3,b=3e3,c=13,d="",e={ONLY_ONCE:0,REPEAT:1,ONLY_IF_TRUE:2,ON_CHAT:3},f={CHATTING:"chatting",TRUE:"true",FALSE:"false"},g={WINDOW_OPENED:"windowOpened",WINDOW_LOADED:"windowLoaded",CHAT_CONNECTED:"onChat",CHAT_INTERACTIVE:"interactive",CHAT_ENDED:"ended",WINDOW_CLOSED:"windowClosed",NO_STATUS:""},h={},i={},j={},k=g.NO_STATUS,l=$undefinedOrNull,m=SN.EventManager,n=SN.Constants;return m.observe(n.CHAT_STATE_EVENT,function(b){b&&b.memo&&b.memo.chatStatus&&typeof g[b.memo.chatStatus]!==undefined&&(k=b.memo.chatStatus,k===g.WINDOW_OPENED?u(null):k===g.WINDOW_CLOSED&&u(null))}),{init:K,getChatState:G,CA_STATUS:f,isChatting:s,removeAvailabilityCheck:q}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.Helpers=SN.WOWPx.Helpers||function(){function matchPatterns(a,b){if(b instanceof Array)return matchPatternsArray(a,b)+"";if(b instanceof Object)return matchPatternsSet(a,b)}function incrementTotalInviteCount(){}function isChatInProgress(){return~~AvailabilityDecider.isChatting()}function notDesktop(){return UserAgentParser.getDeviceType()!=="D"}function getProactiveRulesShown(){return notDesktop()?MobileChatManager.getAllRulesShown():DesktopChatManager.getAllRulesShown()}function setAppId(a){appId=a}function getAppId(){return appId}function setPageType(a){pageType=a}function getPageType(){return pageType}function setSnHtmlPath(a){if(!a)return;/^http/.test(a)?snHtmlPath=a:snHtmlPath="//"+location.host+a}function getSnHtmlPath(a){return/^http/.test(snHtmlPath)?snHtmlPath:a===!0?"https:"+snHtmlPath:snHtmlPath}function setPrechatContext(a){prechatContext=a}function getPrechatContext(moreContext){var iterator=null,contextObj={};if($undefinedOrNull(moreContext)||typeof moreContext!="object")moreContext={};for(var key in prechatContext)if(prechatContext.hasOwnProperty(key)){try{iterator=eval(prechatContext[key])}catch(e){}$undefinedOrNull(iterator)&&($undefinedOrNull(moreContext[key])?iterator="NA":iterator=moreContext[key]),contextObj[key]=iterator,iterator=null}return contextObj}function saveChatState(a){a&&a.memo&&a.memo.chatStatus&&typeof a.memo.chatStatus=="string"&&setSessionData(Constants.CHAT_STATE,a.memo.chatStatus)}function fireChatStateAtPageLoad(){var a=getSessionData(Constants.CHAT_STATE);if($undefinedOrNull(a))return;EventManager.fire(Constants.CHAT_STATE_EVENT,{chatStatus:a})}function triggerInvite(a,b,c){notDesktop()?b===Constants.TYPE_BUTTON?MobileChatManager.buttonChat(a,c):MobileChatManager.proactiveChat(a,c):b===Constants.TYPE_BUTTON?DesktopChatManager.buttonChat(a,c):DesktopChatManager.proactiveChat(a,c)}function init(){AvailabilityDecider=SN.WOWPx.AvailabilityDecider,MobileChatManager=SN.WOWPx.UI.MobileChatManager,DesktopChatManager=SN.WOWPx.UI.DesktopChatManager}var appId="",pageType="",prechatContext={},snHtmlPath=location.host+"/psp247/247SN.html",UserAgentParser=parent.SN.UserAgentParser,StoreManager=SN.StoreManager,Constants=SN.Constants,EventManager=SN.EventManager,Utils=SN.Utils,PreconditionVariables=SN.PreconditionVariables,MobileChatManager,DesktopChatManager,AvailabilityDecider,matchPatternsArray=$matchPatternsArray,matchPatternsSet=$matchPatternsMap,getSessionData=StoreManager.getSessionData,setSessionData=StoreManager.setSessionData,removeSessionData=StoreManager.removeSessionData,storeInitialReferrer=$storeInitialReferrer,getInitialReferrer=$getInitialReferrer,getPageVisitCount=$numberOfPagesVisited,incrementPageVisitCount=$numberOfPagesVisited,getTotalInviteCount=$proactiveInviteCountInSession,getInviteCountOnPage=$proactiveInviteCountOnPage,getLastInviteTimediff=$timeSinceLastProactiveInvite,isProInviteActive=$isProactiveInviteActive,isButtonActive=$isButtonShown,getGeo=$formattedGeo;return{matchPatternsArray:matchPatternsArray,matchPatternsSet:matchPatternsSet,matchPatterns:matchPatterns,getSessionData:getSessionData,setSessionData:setSessionData,removeSessionData:removeSessionData,storeInitialReferrer:storeInitialReferrer,getInitialReferrer:getInitialReferrer,getPageVisitCount:getPageVisitCount,incrementPageVisitCount:incrementPageVisitCount,getTotalInviteCount:getTotalInviteCount,incrementTotalInviteCount:incrementTotalInviteCount,getLastInviteTimediff:getLastInviteTimediff,getInviteCountOnPage:getInviteCountOnPage,isChatInProgress:isChatInProgress,notDesktop:notDesktop,getProactiveRulesShown:getProactiveRulesShown,isProInviteActive:isProInviteActive,isButtonActive:isButtonActive,setAppId:setAppId,getAppId:getAppId,setPageType:setPageType,getPageType:getPageType,setSnHtmlPath:setSnHtmlPath,getSnHtmlPath:getSnHtmlPath,setPrechatContext:setPrechatContext,getPrechatContext:getPrechatContext,saveChatState:saveChatState,fireChatStateAtPageLoad:fireChatStateAtPageLoad,triggerInvite:triggerInvite,getGeo:getGeo,init:init}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.ChatSessionManager=SN.WOWPx.ChatSessionManager||function(){function m(){var a=function(a,e){if(a)try{localStorage.setItem(a,e)}catch(f){}b++,b==c.length&&(d=!0)},b=0;for(var e=0;e<c.length;e++)h.getLocalStorageItem(c[e],a)}function n(a){c.indexOf(a.key)>-1&&(a.newValue?h.setLocalStorageItem(a.key,a.newValue,e):(h.removeLocalStorageItem(a.key),v()))}function o(){var a;for(var b=0;b<c.length;b++)a=c[b],h.setLocalStorageItem(a,localStorage.getItem(a),e)}function p(){parent.window.addEventListener?parent.window.addEventListener("storage",n,!1):i.observe(k.CONST_PERIODICAL_EXECUTION_TIMER_EVENT,o)}function q(){g?m():(x(),d=!0)}function r(){return d?!0:!1}function s(a){var b=window.setInterval(function(){r()&&(a(),window.clearInterval(b))},10)}function t(a){$setData(f,j.encode(JSON.stringify(a)),!0)}function u(){try{return JSON.parse(j.decode($getData(f).replace(/:/g,"=")))}catch(a){return undefined}}function v(){$removeData(f)}function w(){for(var a=0;a<c.length;a++)h.removeLocalStorageItem(c[a])}function x(){for(var a=0;a<c.length;a++)localStorage.removeItem(c[a]);v()}function y(){w(),x()}function z(){return c}function A(){g=l.isChatInProgress(),c=l.notDesktop()?b:a,q(),p()}var a=["by247-chat-session","by247-chat-session-ou812"],b=["by247-chat-session","by247-chat-session-by247"],c,d=!1,e=864e5,f="ci",g,h=SN.CrossXDataHandler,i=SN.EventManager,j=SN.Base64Encoder,k=SN.Constants,l=SN.WOWPx.Helpers;return{setInfo:t,getInfo:u,init:A,onSessionInitialized:s,blindCopyover:o,cleanChatData:y,cleanXdData:w,cleanFirstPartyData:x,getActiveKeys:z}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),typeof SN.WOWPx.UI=="undefined"&&(SN.WOWPx.UI={}),SN.WOWPx.UI.ButtonInvite=SN.WOWPx.UI.ButtonInvite||function(a){function p(a){if(parent.document.querySelector)return parent.document.querySelector(a);if(a=="body")return parent.document.body;if(a.substring(0,1)==="#")return parent.document.getElementById(a.substring(1))}function q(){var b=p(a.containerQuery),c=null;if($undefinedOrNull(b))throw new TypeError("ButtonInvite: Element with"+a.containerQuery+" Not found");return a.replaceContainer?(c=b.cloneNode(!1),c.id=c.id+"-tfs",Element.setStyle(c,a.styles.container),b.parentNode.replaceChild(c,b)):(c=b,Element.setStyle(c,a.styles.container)),n.id=a.id,n.type="button",n.tabIndex=0,Element.setStyle(n,a.styles.button),t(m),c.appendChild(n),Event.observe(n,"click",s),r}function r(b){b===o.CA_STATUS.CHATTING?t(j):b===o.CA_STATUS.FALSE?a.actions.isOfficeTime(d,e,f,g)?t(l):t(k):t(i)}function s(h,j){b==i&&a.actions.accept(d,e,c,f,g)}function t(j){b!=j&&(Element.setStyle(n,a.styles[j]),n.alt=n.value=n.title=a.altMessage[j],a.actions.stateChange(d,e,c,f,g,j),h&&j==i&&(a.actions.shown(d,e,c,f,g),h=!1),b=j)}var b="",c=SN.Utils.randomUUID(),d=a.id,e=a.ruleId,f=a.queue,g="b",h=!0,i="available",j="chatting",k="offline",l="busy",m="loading",n=new Element("input"),o=SN.WOWPx.AvailabilityDecider;return q()},typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.EventTracker=SN.WOWPx.EventTracker||function(a){function f(){return{eventId:a.eventId,fireImmediately:!0,data:{f:{a:{qu:a.queue},o:{ii:a.interactionId,id:d.getAppId(),at:"Chat Invite",it:a.type},p:{cp:parent.location.href},v:{ri:a.ruleId,na:$getNavPath(),pcs:""+$getTotalVisitCount(),rc:a.type}}}}}var b={},c=SN.EventManager,d=SN.WOWPx.Helpers,e=SN.CustomScript;if(isNaN(parseInt(a.eventId,10)))return!1;a.eventId=""+a.eventId,$undefinedOrNull(a.eventId.match(/11103|11104|11105|11106/))||(b=f()),e.track?e.track("desktop",b):c.fire("WOWPXAPP_EVENT",b)},typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),typeof SN.WOWPx.UI=="undefined"&&(SN.WOWPx.UI={}),SN.WOWPx.UI.ButtonInviteManager=SN.WOWPx.UI.ButtonInviteManager||function(){function i(a,b){var d,g=j(a,b);try{d=new e(g)}catch(i){throw h.warn("btn_error:"+a+"-"+i.message),i instanceof TypeError?i:TypeError("ButtonInviteManager: "+i.message)}c.push(a),f.checkAvailability({cb:d,qu:g.queue,id:a,type:f.TYPE.REPEAT})}function j(c,d){var e=a[c];if($undefinedOrNull(e))throw TypeError("ButtonInviteManager: Config not found for "+c);for(var f in b)if(b.hasOwnProperty(f))if(typeof b[f]=="object")if($undefinedOrNull(e[f]))e[f]=b[f];else for(var g in b[f])b[f].hasOwnProperty(g)&&$undefinedOrNull(e[f][g])&&(e[f][g]=b[f][g]);else $undefinedOrNull(e[f])&&(e[f]=b[f]);return e.id=c,e.ruleId=d,e.actions={accept:l,shown:k,stateChange:m,isOfficeTime:n},e}function k(a,c,d,e,f){g({eventId:"11103",ruleId:c,interactionId:d,queue:e,type:f}),$undefinedOrNull(b.actions.shown)||b.actions.shown.apply(this,arguments)}function l(a,c,d,e,f){g({eventId:"11104",ruleId:c,interactionId:d,queue:e,type:f}),$undefinedOrNull(b.actions.accept)||b.actions.accept.apply(this,arguments)}function m(a,c,d,e,f,g){$undefinedOrNull(b.actions.stateChange)||b.actions.stateChange.apply(this,arguments)}function n(a,c,d,e){return $undefinedOrNull(b.actions.isOfficeTime)?!1:b.actions.isOfficeTime.apply(this,arguments)}function o(a,b){var c,d=!0;typeof a=="string"?c=a.split(","):c=a;for(var e=0;e<c.length;e++)try{i(c[e],b)}catch(f){d=!1;if(!(f instanceof TypeError))throw f}return d}function p(b){var c=!0;for(var e in a)if(a.hasOwnProperty(e))try{a[e].excludeEnableAll!==!0&&(typeof a[e].enabledOnDevices=="string"?a[e].enabledOnDevices.indexOf(d)!==-1&&i(e,b):i(e,b))}catch(f){c=!1;if(!(f instanceof TypeError))throw f}return c}function q(){return c.length<=0?0:1}function r(){return c.join(" ")}function s(c){return a=c.buttonList,b=c.defaultConfig,this.enableButton=i,this.enableButtonList=o,this.enableAllButtons=p,this.init=function(){return!1},!0}var a,b,c=[],d=parent.SN.UserAgentParser.getDeviceType(),e=SN.WOWPx.UI.ButtonInvite,f=SN.WOWPx.AvailabilityDecider,g=SN.WOWPx.EventTracker,h=SN.Utils;return{init:s,getActiveButtonList:r,isButtonActive:q}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),typeof SN.WOWPx.UI=="undefined"&&(SN.WOWPx.UI={}),SN.WOWPx.UI.ProactiveInvite=SN.WOWPx.UI.ProactiveInvite||function(a){function A(g){return g==y.CA_STATUS.CHATTING&&x?(F(),!0):g!=y.CA_STATUS.TRUE?!1:(r.innerHTML=a.htmls?a.htmls:"",t.alt=t.value=t.title=a.altMessage.accept,u.alt=u.value=u.title=a.altMessage.decline,v.alt=v.value=v.title=a.altMessage.minimize,q.id=b,q.unselectable="on",Element.setStyle(q,a.styles.container),r.id="content-"+b,Element.setStyle(r,a.styles.content),s.id="controls-"+b,Element.setStyle(s,a.styles.controls),t.id="accept-"+b,t.type="button",t.tabIndex=0,Element.setStyle(t,a.styles.accept),u.id="decline-"+b,u.type="button",u.tabIndex=0,Element.setStyle(u,a.styles.decline),v.id="minimize-"+b,v.type="button",v.tabIndex=0,Element.setStyle(v,a.styles.minimize),s.appendChild(t),s.appendChild(u),s.appendChild(v),q.appendChild(r),q.appendChild(s),p.appendChild(q),a.isDraggable&&Event.observe(s,"mousedown",G),Event.observe(t,"mousedown",B),Event.observe(u,"mousedown",B),Event.observe(v,"mousedown",B),Event.observe(t,"click",C),Event.observe(u,"click",D),Event.observe(v,"click",E),a.ignoreTimeout&&typeof a.ignoreTimeout=="number"&&(w=parent.window.setTimeout(F,a.ignoreTimeout*1e3)),a.actions.shown(b,c,d,e,f),x=!0,!0)}function B(a){Event.stop(a)}function C(g){return B(g),a.actions.accept(b,c,d,e,f),M(),!1}function D(g){return B(g),a.actions.decline(b,c,d,e,f),M(),!1}function E(g){B(g),a.actions.minimize(b,c,d,e,f);try{a.afterMinimize&&z.enableButton(a.afterMinimize,c)}catch(h){throw h instanceof TypeError?h:new TypeError("ProactiveInvite: Error "+h.message)}return M(),!1}function F(){return a.actions.ignore(b,c,d,e,f),M(),!1}function G(a){H(this);var b=a||parent.window.event;return g=b.clientX,h=b.clientY,Event.observe(parent.document,"mousemove",J),Event.observe(parent.document,"mouseup",L),!1}function H(a){o&&L(),I(a),o=a.parentNode}function I(a){var b=a.parentNode.offsetWidth,c=a.parentNode.offsetHeight,d=parent.document.documentElement.clientWidth?parent.document.documentElement.clientWidth:parent.window.innerWidth,e=parent.document.documentElement.clientHeight?parent.document.documentElement.clientHeight:parent.window.innerHeight;i=a.parentNode.offsetLeft,j=a.parentNode.offsetTop,m=d-b,n=e-c}function J(a){if(!o)return;var b=a||parent.window.event,c=b.clientX-g,d=b.clientY-h;return K(c,d),!1}function K(a,b){var c=i+a,d=j+b;c<k?c=k:c>m&&(c=m),d<l?d=l:d>n&&(d=n),o.style.left=c+"px",o.style.top=d+"px"}function L(){Event.stopObserving(parent.document,"mousemove",J),Event.stopObserving(parent.document,"mouseup",L),o=null}function M(){$undefinedOrNull(w)||(parent.window.clearTimeout(w),w=undefined),Event.stopObserving(t),Event.stopObserving(u),Event.stopObserving(v),Event.stopObserving(s),Event.stopObserving(r),Event.stopObserving(q),Element.remove(q),x=!1}var b=a.id,c=a.ruleId,d=SN.Utils.randomUUID(),e=a.queue,f="p",g,h,i,j,k=0,l=0,m,n,o,p=parent.document.body,q=new Element("div"),r=new Element("div"),s=new Element("div"),t=new Element("input"),u=new Element("input"),v=new Element("input"),w,x=!1,y=SN.WOWPx.AvailabilityDecider,z=SN.WOWPx.UI.ButtonInviteManager;return A},typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),typeof SN.WOWPx.UI=="undefined"&&(SN.WOWPx.UI={}),SN.WOWPx.UI.ProactiveInviteManager=SN.WOWPx.UI.ProactiveInviteManager||function(){function k(a,b){var e=l(a,b);if(!$undefinedOrNull(c))return!1;try{d=new g(e)}catch(f){throw j.warn("pro_error:"+a+"-"+f.message),f instanceof TypeError?f:TypeError("ProactiveInviteManager: "+f.message)}return h.checkAvailability({cb:d,qu:e.queue,id:a}),!0}function l(c,d){var e=a[c];if($undefinedOrNull(e))throw TypeError("ProactiveInviteManager: Config not found for "+c);for(var f in b)if(b.hasOwnProperty(f))if(typeof b[f]=="object")if($undefinedOrNull(e[f]))e[f]=b[f];else for(var g in b[f])b[f].hasOwnProperty(g)&&$undefinedOrNull(e[f][g])&&(e[f][g]=b[f][g]);else $undefinedOrNull(e[f])&&(e[f]=b[f]);return e.id=c,e.ruleId=d,e.actions={shown:m,accept:n,decline:o,minimize:p,ignore:q},e}function m(a,d,g,j,k){i({eventId:"11103",ruleId:d,interactionId:g,queue:j,type:"p"}),c=a,e.push(d),h.checkAvailability({cb:v,qu:j,id:f,type:h.TYPE.ON_CHAT}),!$undefinedOrNull(b.actions.shown)&&typeof b.actions.shown=="function"&&b.actions.shown.apply(this,arguments)}function n(a,e,g,j,k){i({eventId:"11104",ruleId:e,interactionId:g,queue:j,type:k}),c=null,d=null,h.removeAvailabilityCheck(f),!$undefinedOrNull(b.actions.accept)&&typeof b.actions.accept=="function"&&b.actions.accept.apply(this,arguments)}function o(a,e,g,j,k){i({eventId:"11105",ruleId:e,interactionId:g,queue:j,type:k}),c=null,d=null,h.removeAvailabilityCheck(f),!$undefinedOrNull(b.actions.decline)&&typeof b.actions.decline=="function"&&b.actions.decline.apply(this,arguments)}function p(a,e,g,j,k){i({eventId:"11105",ruleId:e,interactionId:g,queue:j,type:k}),c=null,d=null,h.removeAvailabilityCheck(f),!$undefinedOrNull(b.actions.minimize)&&typeof b.actions.minimize=="function"&&b.actions.minimize.apply(this,arguments)}function q(a,e,g,j,k){i({eventId:"11106",ruleId:e,interactionId:g,queue:j,type:k}),c=null,d=null,h.removeAvailabilityCheck(f),!$undefinedOrNull(b.actions.ignore)&&typeof b.actions.ignore=="function"&&b.actions.ignore.apply(this,arguments)}function r(){return c}function s(){return $undefinedOrNull(c)?0:1}function t(){return e.join(" ")}function u(a){for(var b=0;b<e.length;b++)if(a===e[b])return 1;return 0}function v(a){!$undefinedOrNull(c)&&!$undefinedOrNull(d)&&d(a)}function w(c){return a=c.proactiveList,b=c.defaultConfig,this.showInvite=k,this.init=function(){return!1},!0}var a,b,c=null,d=null,e=[],f="proactiveManager",g=SN.WOWPx.UI.ProactiveInvite,h=SN.WOWPx.AvailabilityDecider,i=SN.WOWPx.EventTracker,j=SN.Utils;return{init:w,getActiveInvite:r,isInviteActive:s,isInviteShown:u,getAllRulesShown:t}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.JourneyStore=function(){function e(){a.getLocalStorageItem("jurls",f)}function f(a,e){var f;try{if(e&&typeof e=="string"&&e.isJSON()){f=e.evalJSON();if(f&&f instanceof Array&&f.length>0){while(f.length>=b-1)f.shift();for(var h=0;h<f.length;h++)f[h].order++;c=f}}d=c.length,g()}catch(i){}}function g(){if(d<0)return;var b={title:encodeURIComponent(parent.document.title),url:encodeURIComponent(parent.location.href),time:$timeOnPage(),order:1};c[d]=b,a.setLocalStorageItem("jurls",JSON.stringify(c),36e5)}function h(){var a=[];if(c.length<=0)return null;for(var b=0;b<c.length;b++)a.push({title:decodeURIComponent(c[b].title),url:decodeURIComponent(c[b].url),time:c[b].time,order:c[b].order});return a}function i(a){isNaN(a)||(b=a)}var a=SN.CrossXDataHandler,b=5,c=[],d=-1;return function(){SN.EventManager.observe(SN.Constants.BOOTSTRAP_COMPLETED_EVENT,e),SN.EventManager.observe(SN.Constants.CONST_PERIODICAL_EXECUTION_TIMER_EVENT,g)}(),{getJourney:h,setMaxUrls:i}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.UI.DesktopChatManager=SN.WOWPx.UI.DesktopChatManager||function(){function q(a){b=a}function r(){return b}function s(){return"//"+d.CONST_PSP_CDN_ROOT+"/dcf/"+r()+"/chat-util.min.js"}function t(b){b||(b="fallback"),b=="always"?a=!0:b=="fallback"?c.isXdStorageAvailable()?a=!0:a=!1:a=!1}function u(){return i.isInviteActive()}function v(){return i.getAllRulesShown()}function w(){var b=["version="+r(),"pspVersion=dcf","key=","cdnPath="+d.CONST_PSP_CDN_ROOT,"r=context-proxy.min.js"],e=f.getInfo()||{},i=h.getPrechatContext({psid:e.ii,sc:e.ri,rc:e.type,chatType:e.type,btnName:e.id,btnTyp:e.id}),j={chatUrl:h.getSnHtmlPath(!a),customParams:{cdnPath:d.CONST_PSP_CDN_ROOT,key:"/psp/"+d.CONST_PSP_KEY,cv:r(),pspVersion:d.CONST_PSP_VERSION+"/"+d.CONST_CDN_VERSION+"/"+"apps/desktopchat",version:"js",r:"env.js",queue:$getQueue()},inPage:a,forceCrossOrigin:!a,contextProxyUrl:h.getSnHtmlPath(!a)+"#"+b.join("&"),onContextUpdate:function(a){m.fire(g.CHAT_STATE_EVENT,a)},startChatImmediately:!1};for(var k in i)i.hasOwnProperty(k)&&(j.customParams[k]=i[k]);j.customParams.clid=e.ii,j.customParams.ruleId=e.ri,o.overrideCfConfig&&(j=o.overrideCfConfig("init_desktop",j)),by247.chat.init(j),!a&&h.isChatInProgress()&&by247.chat.sendContextToChat({urls:JSON.stringify(n.getJourney())}),m.observe(g.CHAT_STATE_EVENT,function(a){var b=a.memo||{};b.chatView==="inchat"?by247.chat.sendContextToChat({urls:JSON.stringify(n.getJourney())}):b.chatStatus==="ended"?f.cleanXdData():b.track&&(o.track?o.track("desktop",b.track):m.fire("WOWPXAPP_EVENT",b.track))}),c.readyForEvaluation()}function x(a,b,c,d,e){var g=h.getPrechatContext({psid:c,sc:b,rc:e,chatType:e,btnName:a,btnTyp:a}),i={id:a,ri:b,ii:c,type:e};f.setInfo(i);var j={};j.customParams=g,j.customParams.queue=d,j.customParams.clid=c,j.customParams.ruleId=b,o.overrideCfConfig&&(j=o.overrideCfConfig("start_desktop",j)),by247.chat.startChat(j)}function y(a,b){var c=document.createElement("script");c.async=!0,c.src=a,c.onload=c.onreadystatechange=function(a,d){if(d||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d||b()};var d=document.getElementsByTagName("head")[0];d.insertBefore(c,d.firstChild)}function z(a,b){return a===p?j.enableAllButtons(b):j.enableButtonList(a,b)}function A(a,b){return i.showInvite(a,b)}function B(){return j.isButtonActive()}function C(a){var b=a.defaultConfig.actions.accept,c=a.defaultConfig.actions.shown;return a.defaultConfig.actions.accept=function(a,c,d,e,f){x(a,c,d,e,f),b&&b.apply(this,arguments)},a.defaultConfig.actions.shown=function(a,b,d,e,f){f===g.TYPE_PROACTIVE&&h.incrementTotalInviteCount(),c&&c.apply(this,arguments)},a}function D(a){var b=a.dcfType||"fallback";t(b),i.init(C(a.proactiveManager)),j.init(C(a.buttonManager)),this.buttonChat=z,this.proactiveChat=A,y(s(),function(){by247.chat.ready(function(){f.onSessionInitialized(w)})})}var a,b="v1",c=SN.Utils,d=parent.SN.Conf,e=parent.SN.Tracker,f=SN.WOWPx.ChatSessionManager,g=SN.Constants,h=SN.WOWPx.Helpers,i=SN.WOWPx.UI.ProactiveInviteManager,j=SN.WOWPx.UI.ButtonInviteManager,k=SN.WOWPx.AvailabilityDecider,l=SN.StoreManager,m=SN.EventManager,n=SN.WOWPx.JourneyStore,o=SN.CustomScript,p="all";return{setDcfVersion:q,isInviteActive:u,directChat:x,getAllRulesShown:v,isButtonActive:B,init:D}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),typeof SN.WOWPx.UI=="undefined"&&(SN.WOWPx.UI={}),SN.WOWPx.UI.MobileChatManager=SN.WOWPx.UI.MobileChatManager||function(){function D(a,b){var c=H(a,b),d=v.randomUUID(),e=c.queue,f="b";return l?!1:(k=!0,t.checkAvailability({cb:I(a,b,d,e,f),qu:e,id:a,type:t.TYPE.REPEAT}),!0)}function E(a,b,c,d,e){L(a,b,c,d,e)}function F(){if(l&&!$undefinedOrNull(__wowpx[s.BUTTON_APP])){var a=r.getInfo();$undefinedOrNull(a)||(m=a.ri),__wowpx[s.BUTTON_APP].close(),t.removeAvailabilityCheck(s.BUTTON_APP),r.cleanChatData(),P(),l=!1,k=!1,j=!0}}function G(b,c){var d=H(b,c),e=v.randomUUID(),f=d.queue,g="p";return F(),a?!1:(n=d.ignoreTimeout,t.checkAvailability({cb:I(b,c,e,f,g),qu:f}),!0)}function H(a,b){var h,i;for(i in c)c.hasOwnProperty(i)&&i===a&&(h=c[a],e=f);if($undefinedOrNull(h))for(i in d)d.hasOwnProperty(i)&&i===a&&(h=d[a],e=g);if($undefinedOrNull(h))throw TypeError("MobileChatManager: Config not found for "+a);for(var j in e)if(e.hasOwnProperty(j))if(typeof e[j]=="object")if($undefinedOrNull(h[j]))h[j]=e[j];else for(var k in e[j])e[j].hasOwnProperty(k)&&$undefinedOrNull(h[j][k])&&(h[j][k]=e[j][k]);else $undefinedOrNull(h[j])&&(h[j]=e[j]);return h.id=a,h.ruleId=b,h}function I(b,c,d,e,f){return function(g){return g===t.CA_STATUS.CHATTING&&(a||l)?!0:g!=t.CA_STATUS.TRUE?!0:(L(b,c,d,e,f),f===s.TYPE_PROACTIVE&&h.push(c),!0)}}function J(){return h.join(" ")}function K(){return a?1:0}function L(a,c,d,e,f){var g={cdnPath:z.CONST_PSP_CDN_ROOT,key:"/psp/"+z.CONST_PSP_KEY,pspVersion:z.CONST_PSP_VERSION+"/"+z.CONST_CDN_VERSION+"/"+"apps",r:"mobilechat/chatapp.js",cv:T(),env:A,src:0};y.overrideCfConfig&&(g=y.overrideCfConfig("mobile",g)),p=e,i={id:a,ri:c,ii:d,type:f},r.setInfo(i);if(typeof __wowpx[a]=="undefined"||__wowpx[a]===null)b.params=g,__wowpx[a]=new WoWPxApp(a,b);__wowpx[a].show()}function M(){return $undefinedOrNull(i)?w.getPrechatContext():w.getPrechatContext({psid:i.ii,url:parent.document.location.href.slice(0,100),sc:i.ri,rc:i.type,chatType:i.type,btnName:i.id,btnTyp:i.id})}function N(){return{clid:i.ii,appId:w.getAppId(),ruleId:i.ri,rc:i.type,bt:i.type,pcs:$getTotalVisitCount(),it:i.type,btn:k,vs:t.getAssistConfig("vsserver"),ai:t.getAssistConfig("accountId"),ca:t.getAssistConfig("caserver"),qu:p,id:i.id}}function O(b,c){c===s.TYPE_PROACTIVE?b==="offered"?(w.incrementTotalInviteCount(),Z(),a=!0):b==="accepted"?(W(),a=!1,x.fire(s.CHAT_STATE_EVENT,{chatStatus:"windowOpened"})):b=="declined"&&(W(),a=!1):c===s.TYPE_BUTTON&&(b==="offered"?l=!0:b==="accepted"&&(l=!1,x.fire(s.CHAT_STATE_EVENT,{chatStatus:"windowOpened"})))}function P(){x.fire(s.CHAT_STATE_EVENT,{chatStatus:"windowClosed"})}function Q(a){var b={NOT_STARTED:0,INIT_CHAT:1,INTERACTION_CREATED:2,INTERACTION_STARTED:3,INTERACTION_END:4};switch(a){case b.INIT_CHAT:x.fire(s.CHAT_STATE_EVENT,{chatStatus:"windowOpened"});break;case b.INTERACTION_CREATED:x.fire(s.CHAT_STATE_EVENT,{chatStatus:"windowLoaded"});break;case b.INTERACTION_STARTED:x.fire(s.CHAT_STATE_EVENT,{chatStatus:"onChat"});break;case b.INTERACTION_END:x.fire(s.CHAT_STATE_EVENT,{chatStatus:"ended"}),x.fire(s.CHAT_STATE_EVENT,{chatStatus:"windowClosed"});break;default:}}function R(){return l?1:0}function S(a){q=a}function T(){return q}function U(){j&&D(s.BUTTON_APP,m)}function V(b,c,d,f,g){u({eventId:"11106",ruleId:c,interactionId:d,queue:f,type:g}),a=!1,!$undefinedOrNull(e.actions.ignore)&&typeof e.actions.ignore=="function"&&e.actions.ignore.apply(this,arguments)}function W(){$undefinedOrNull(o)||(parent.window.clearTimeout(o),o=undefined)}function X(){W(),$undefinedOrNull(__wowpx[i.id])||__wowpx[i.id].close()}function Y(){return V(i.id,i.ri,i.ii,p,i.type),X(),r.cleanChatData(),P(),U(),!1}function Z(){if($undefinedOrNull(n)||$undefinedOrNull(__wowpx[i.id])||typeof n!="number")return;o=parent.window.setTimeout(Y,n*1e3)}function $(){var a,b,c;try{return c=r.getActiveKeys()[1],a=JSON.parse(localStorage.getItem(c)),$undefinedOrNull(a)||(b=a.state),b}catch(d){return b}}function _(){var a=$();if(!$undefinedOrNull(a))if(a===B||a===C){var b=r.getInfo();$undefinedOrNull(b)||L(b.id,b.ri,b.ii,p,b.type)}else r.cleanChatData(),P();v.readyForEvaluation()}function ab(a){return c=a.proactiveManager.proactiveList,d=a.buttonManager.buttonList,f=a.proactiveManager.defaultConfig,g=a.buttonManager.defaultConfig,r.onSessionInitialized(_),this.init=function(){return!1},!0}var a=!1,b={popupStyle:{width:"310px",overflow:"hidden",visibility:"true",zIndex:"99999"},iframeStyle:{height:"100%",width:"100%",display:"none",overflow:"hidden"},loadingStyle:{display:"none"},closerStyle:{display:"none"},minimizerStyle:{display:"none"},type:0},c,d,e,f,g,h=[],i,j=!1,k=!1,l=!1,m="",n,o,p=$getQueue(),q="v2",r=SN.WOWPx.ChatSessionManager,s=SN.Constants,t=SN.WOWPx.AvailabilityDecider,u=SN.WOWPx.EventTracker,v=SN.Utils,w=SN.WOWPx.Helpers,x=SN.EventManager,y=SN.CustomScript,z=parent.SN.Conf,A=parent._tfsc.env,B="chatting",C="reconciling";return window.__wowpx={},{init:ab,proactiveChat:G,buttonChat:D,getAllRulesShown:J,isInviteActive:K,preChatData:M,customParams:N,handleInviteState:O,handleStateChange:Q,handleChatClosed:P,isButtonActive:R,directChat:E}}(),typeof SN=="undefined"&&(SN={}),typeof SN.WOWPx=="undefined"&&(SN.WOWPx={}),SN.WOWPx.InitInvite=SN.WOWPx.InitInvite||function(){function i(){var b=a.assistConfig||{};f.init(b)}function j(){b.init(),b.setPrechatContext(a.prechatContext),b.setAppId(a.appId),b.setPageType(a.pageType),b.setSnHtmlPath(a.snHtmlPath)}function k(){b.fireChatStateAtPageLoad(),g.init(),b.notDesktop()?e.init(a):d.init(a)}function l(){h.observe(c.CHAT_STATE_EVENT,b.saveChatState),b.incrementPageVisitCount()}function m(a){i(),j(),k(),l()}function n(b){return a=b,m(),this.init=function(a){return!1},!0}var a,b=SN.WOWPx.Helpers,c=SN.Constants,d=SN.WOWPx.UI.DesktopChatManager,e=SN.WOWPx.UI.MobileChatManager,f=SN.WOWPx.AvailabilityDecider,g=SN.WOWPx.ChatSessionManager,h=SN.EventManager;return{init:n}}()