/*! For license information please see client.min.js.LICENSE.txt */ (function(){var __webpack_modules__={7584:function(n,t,e){var i;!function(r,o){"use strict";var a="function",u="undefined",c="object",s="string",f="model",l="name",d="type",h="vendor",v="version",p="architecture",g="console",m="mobile",_="tablet",w="smarttv",y="wearable",b="embedded",E="Amazon",I="Apple",A="ASUS",T="BlackBerry",S="Firefox",k="Google",R="Huawei",N="LG",D="Microsoft",C="Motorola",O="Opera",x="Samsung",P="Sharp",M="Sony",L="Xiaomi",U="Zebra",V="Facebook",F=function(n){for(var t={},e=0;e0?2===u.length?typeof u[1]==a?this[u[0]]=u[1].call(this,f):this[u[0]]=u[1]:3===u.length?typeof u[1]!==a||u[1].exec&&u[1].test?this[u[0]]=f?f.replace(u[1],u[2]):o:this[u[0]]=f?u[1].call(this,f,u[2]):o:4===u.length&&(this[u[0]]=f?u[3].call(this,f.replace(u[1],u[2])):o):this[u]=f||o;l+=2}},q=function(n,t){for(var e in t)if(typeof t[e]===c&&t[e].length>0){for(var i=0;i350?G(n,350):n,this},this.setUA(e),this};K.VERSION="0.7.33",K.BROWSER=F([l,v,"major"]),K.CPU=F([p]),K.DEVICE=F([f,h,d,g,m,w,_,y,b]),K.ENGINE=K.OS=F([l,v]),typeof t!==u?(n.exports&&(t=n.exports=K),t.UAParser=K):e.amdO?(i=function(){return K}.call(t,e,t,n))===o||(n.exports=i):typeof r!==u&&(r.UAParser=K)}("object"==typeof window?window:this)},2347:function(n,t,e){var i=e(1247)(),r=e(1047);n.exports=function(n,t){function e(t){if(!(this instanceof e))return new e(t);try{throw new Error(t)}catch(o){o.name=n,this.stack=o.stack}i&&this.stack&&(this.stack=r(this.stack,n,t)),this.message=t||"",this.name=n}return e.prototype=new(t||Error),e.prototype.constructor=e,e.prototype.inspect=function(){return this.message?"["+n+": "+this.message+"]":"["+n+"]"},e.prototype.name=n,e}},1047:function(n){"use strict";n.exports=function(n,t,e){var i=t;return e&&(i+=": "+e),n=i+n.slice(n.indexOf("\n"))}},1247:function(n){"use strict";n.exports=function(){var n=new Error("yep");return!!n.stack&&"Error: yep\n"===n.stack.substr(0,11)}},126:function(n,t,e){n.exports=function(){"use strict";function n(n){return"function"==typeof n||"object"==typeof n&&null!==n}function t(n){return"function"==typeof n}undefined;var i=Array.isArray?Array.isArray:function(n){return"[object Array]"===Object.prototype.toString.call(n)},r=0,o=undefined,a=undefined,u=function(n,t){y[r]=n,y[r+1]=t,2===(r+=2)&&(a?a(b):I())};function c(n){a=n}function s(n){u=n}var f="undefined"!=typeof window?window:undefined,l=f||{},d=l.MutationObserver||l.WebKitMutationObserver,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),v="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){return function(){return process.nextTick(b)}}function g(){return void 0!==o?function(){o(b)}:w()}function m(){var n=0,t=new d(b),e=document.createTextNode("");return t.observe(e,{characterData:!0}),function(){e.data=n=++n%2}}function _(){var n=new MessageChannel;return n.port1.onmessage=b,function(){return n.port2.postMessage(0)}}function w(){var n=setTimeout;return function(){return n(b,1)}}var y=new Array(1e3);function b(){for(var n=0;n>>16)*a&65535)<<16)&4294967295)<<15|c>>>17))*u+(((c>>>16)*u&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(c=0,e){case 3:c^=(255&n.charCodeAt(s+2))<<16;case 2:c^=(255&n.charCodeAt(s+1))<<8;case 1:r^=c=(65535&(c=(c=(65535&(c^=255&n.charCodeAt(s)))*a+(((c>>>16)*a&65535)<<16)&4294967295)<<15|c>>>17))*u+(((c>>>16)*u&65535)<<16)&4294967295}return r^=n.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}var e=t;e.v2=function(n,t){for(var e,i=n.length,r=t^i,o=0;i>=4;)e=1540483477*(65535&(e=255&n.charCodeAt(o)|(255&n.charCodeAt(++o))<<8|(255&n.charCodeAt(++o))<<16|(255&n.charCodeAt(++o))<<24))+((1540483477*(e>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(e=1540483477*(65535&(e^=e>>>24))+((1540483477*(e>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:r^=(255&n.charCodeAt(o+2))<<16;case 2:r^=(255&n.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&n.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0},e.v3=t,n.exports=e}()},6926:function(n,t,e){n=e.nmd(n),function(){var i,r="Expected a function",o="__lodash_hash_undefined__",a=9007199254740991,u="[object Arguments]",c="[object Array]",s="[object Boolean]",f="[object Date]",l="[object Error]",d="[object Function]",h="[object GeneratorFunction]",v="[object Map]",p="[object Number]",g="[object Object]",m="[object RegExp]",_="[object Set]",w="[object String]",y="[object Symbol]",b="[object WeakMap]",E="[object ArrayBuffer]",I="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",S="[object Int16Array]",k="[object Int32Array]",R="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",C="[object Uint32Array]",O=/[&<>"'`]/g,x=RegExp(O.source),P=/\w*$/,M=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,U={};U[I]=U[A]=U[T]=U[S]=U[k]=U[R]=U[N]=U[D]=U[C]=!0,U[u]=U[c]=U[E]=U[s]=U[f]=U[l]=U[d]=U[v]=U[p]=U[g]=U[m]=U[_]=U[w]=U[b]=!1;var V={};V[u]=V[c]=V[E]=V[s]=V[f]=V[I]=V[A]=V[T]=V[S]=V[k]=V[v]=V[p]=V[g]=V[m]=V[_]=V[w]=V[y]=V[R]=V[N]=V[D]=V[C]=!0,V[l]=V[d]=V[b]=!1;var F={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},z={"function":!0,object:!0},j=z[typeof t]&&t&&!t.nodeType?t:i,G=z.object&&n&&!n.nodeType?n:i,B=G&&G.exports===j?j:i,q=on(j&&G&&"object"==typeof e.g&&e.g),H=on(z[typeof self]&&self),Y=on(z[typeof window]&&window),K=on(z[typeof this]&&this),$=q||Y!==(K&&K.window)&&Y||H||K||Function("return this")();function W(n,t){return n.set(t[0],t[1]),n}function X(n,t){return n.add(t),n}function J(n,t){return nn(It(n),Ae)}function Q(n,t){return!!n.length&&en(n,t,0)>-1}function Z(n,t,e){for(var i=-1,r=n.length;++i-1&&n%1==0&&n-1}function Xn(n,t){for(var e=n.length;e--;)if(Xt(n[e][0],t))return e;return-1}function Jn(n,t,e){var i=Xn(n,t);i<0?n.push([t,e]):n[i][1]=e}function Qn(n,t,e,r){return n===i||Xt(n,fn[e])&&!dn.call(r,e)?t:n}function Zn(n,t,e){(e!==i&&!Xt(n[t],e)||"number"==typeof t&&e===i&&!(t in n))&&(n[t]=e)}function nt(n,t,e){var r=n[t];dn.call(n,t)&&Xt(r,e)&&(e!==i||t in n)||(n[t]=e)}function tt(n){return"function"==typeof n?n:Te}function et(n,t,e,r,o,a,c){var l;if(r&&(l=a?r(n,o,a,c):r(n)),l!==i)return l;if(!ae(n))return n;var b=Zt(n);if(b){if(l=function(n){var t=n.length,e=n.constructor(t);t&&"string"==typeof n[0]&&dn.call(n,"index")&&(e.index=n.index,e.input=n.input);return e}(n),!t)return It(n)}else{var O=Pt(n),x=O==d||O==h;if(ie(n))return function(n,t){if(t)return n.slice();var e=new n.constructor(n.length);return n.copy(e),e}(n,t);if(O==g||O==u||x&&!a){if(un(n))return a?n:{};if(l=function(n){return"function"!=typeof n.constructor||Ut(n)?{}:it(En(n))}(x?{}:n),!t)return l=function(n,t){return n&&St(t,we(t),n)}(l,n),e?Rt(n,l):l}else{if(!V[O])return a?n:{};l=function(n,t,e){var i=n.constructor;switch(t){case E:return Tt(n);case s:case f:return new i(+n);case I:case A:case T:case S:case k:case R:case N:case D:case C:return function(n,t){var e=t?Tt(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}(n,e);case v:return function(n){return Bt(function(n){var t=-1,e=Array(n.size);return n.forEach((function(n,i){e[++t]=[i,n]})),e}(n),W,new n.constructor)}(n);case p:case w:return new i(n);case m:return function(n){var t=new n.constructor(n.source,P.exec(n));return t.lastIndex=n.lastIndex,t}(n);case _:return Bt(function(n){var t=-1,e=Array(n.size);return n.forEach((function(n){e[++t]=n})),e}(o=n),X,new o.constructor);case y:return r=n,Vn?Object(Vn.call(r)):{}}var r;var o}(n,O,t)}}c||(c=new Yn);var M=c.get(n);return M||(c.set(n,l),(b?ut:lt)(n,(function(i,o){nt(l,o,et(i,t,e,r,o,n,c))})),e&&!b?Rt(n,l):l)}function it(n){return ae(n)?An(n):{}}function rt(n,t,e){if("function"!=typeof n)throw new TypeError(r);return setTimeout((function(){n.apply(i,e)}),t)}var ot,at,ut=(ot=lt,function(n,t){if(null==n)return n;if(!ne(n))return ot(n,t);for(var e=n.length,i=at?e:-1,r=Object(n);(at?i--:++i0&&te(a)&&(e||Zt(a)||Qt(a))?t>1?st(a,t-1,e,i):nn(i,a):e||(i[i.length]=a)}return i}var ft=function(n){return function(t,e,i){for(var r=-1,o=Object(t),a=i(t),u=a.length;u--;){var c=a[n?u:++r];if(!1===e(o[c],c,o))break}return t}}();function lt(n,t){return n&&ft(n,t,we)}function dt(n,t){return ct(t,(function(t){return re(n[t])}))}function ht(n,t,e,r,o){return n===t||(null==n||null==t||!ae(n)&&!ue(t)?n!=n&&t!=t:function(n,t,e,r,o,a){var d=Zt(n),h=Zt(t),v=c,_=c;d||(v=(v=pn.call(n))==u?g:v);h||(_=(_=pn.call(t))==u?g:_);var y=v==g&&!un(n),b=_==g&&!un(t),E=v==_;a||(a=[]);var I=jt(a,(function(t){return t[0]===n}));if(I&&I[1])return I[1]==t;if(a.push([n,t]),E&&!y){var A=d||fe(n)?function(n,t,e,r,o,a){var u=-1,c=2&o,s=1&o,f=n.length,l=t.length;if(f!=l&&!(c&&l>f))return!1;var d=!0;for(;++ur?0:r+t),(e=e>r?r:e)<0&&(e+=r),r=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(r);++i1?e[o-1]:i;for(a="function"==typeof a?(o--,a):i,t=Object(t);++r0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Ht=Wt((function(n,t,e){return Dt(n,33,t,e)})),Yt=Wt((function(n,t){return rt(n,1,t)})),Kt=Wt((function(n,t,e){return rt(n,he(t)||0,e)}));var $t=Wt((function(n,t){return Dt(n,32,i,t)}));function Wt(n,t){if("function"!=typeof n)throw new TypeError(r);return t=Nn(t===i?n.length-1:de(t),0),function(){for(var e=arguments,i=-1,r=Nn(e.length-t,0),o=Array(r);++it}function Qt(n){return te(n)&&dn.call(n,"callee")&&(!Tn.call(n,"callee")||pn.call(n)==u)}var Zt=Array.isArray;function ne(n){return null!=n&&oe(Ct(n))&&!re(n)}function te(n){return ue(n)&&ne(n)}var ee,ie=(ee=!1,function(){return ee});function re(n){var t=ae(n)?pn.call(n):"";return t==d||t==h}function oe(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=a}function ae(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ue(n){return!!n&&"object"==typeof n}function ce(n){return"number"==typeof n||ue(n)&&pn.call(n)==p}function se(n){return"string"==typeof n||!Zt(n)&&ue(n)&&pn.call(n)==w}function fe(n){return ue(n)&&oe(n.length)&&!!U[pn.call(n)]}function le(n,t){return n=200&&(a=Hn,u=!1,t=new qn(t));n:for(;++ot&&!a||!o||e&&!u&&c||r&&c)return 1;if(n-1:!!r&&en(n,t,e)>-1},Fn.indexOf=function(n,t,e){for(var i=n?n.length:0,r=((e="number"==typeof e?e<0?Nn(i+e,0):e:0)||0)-1,o=t==t;++r>>0)/r};n.exports={Seed:{IGNORING:0,BUCKETING:1,FALLBACK:2,HOLDBACK:3,BEHAVIOR_EVENT:2716770798},hashToHex:function(n,t){var e=i(n,t);return(e>>>16).toString(16)+(65535&e).toString(16)},hashToInt:function(n,t,e){return Math.floor(o(n,t)*e)},hashToReal:o,toByteString:function(n){var t=String.fromCharCode;return n.replace(/[\S\s]/gi,(function(n){n=n.charCodeAt(0);var e=t(255&n);return n>255&&(e=t(n>>>8&255)+e),n>65535&&(e=t(n>>>16)+e),e}))}}},7435:function(n,t){t.generate=function e(n){return n?(n^16*Math.random()>>n/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}},3993:function(n,t,e){var i=e(9587),r=e(2339).get("stores/audience_data"),o=e(497),a=e(609),u=e(5075),c=e(5005);function s(n){var t=["type","selector","attributes","value"],e=i.extend({},n);return e.changeSet=i.map(n.changeSet,(function(n){return i.pick(c.dereferenceChangeId(n),t)})),e}t.emitLayerDecided=function(n){var t=n.decisionTicket?n.decisionTicket.audienceIds:[],e=i.map(t,(function(n){return{id:n,name:r.get(n).name}})),u={type:a.TYPES.LIFECYCLE,name:"layerDecided",data:i.extend(n,{audiences:e})},s=c.translateLayerEventToCampaignEvent(u);o.emit(u),o.emit(s)},t.emitViewActivated=function(n){var t={type:a.TYPES.LIFECYCLE,name:"viewActivated",data:n},e=c.translateViewActivatedToPageActivated(t);o.emit(t),o.emit(e)},t.emitViewsActivated=function(n){var t={type:a.TYPES.LIFECYCLE,name:"viewsActivated",data:n};o.emit(t)},t.emitPageDeactivated=function(n){var t={type:a.TYPES.LIFECYCLE,name:"pageDeactivated",data:n};o.emit(t)},t.emitActivateEvent=function(){o.emit({type:a.TYPES.LIFECYCLE,name:"activate"},!0)},t.emitActivatedEvent=function(){o.emit({type:a.TYPES.LIFECYCLE,name:"activated"})},t.emitInitializedEvent=function(){var n={type:a.TYPES.LIFECYCLE,name:"initialized"};window.optimizely&&(window.optimizely.initialized=!0),o.emit(n)},t.emitOriginsSyncedEvent=function(){var n={type:a.TYPES.LIFECYCLE,name:"originsSynced"};o.emit(n)},t.emitActionAppliedEvent=function(n){var t={type:n.type,campaignId:n.layerId,pageId:n.pageId,experimentId:n.experimentId,variationId:n.variationId};u.defineProperty(t,"changes",(function(){return s(n).changeSet}),"actionAppliedEvent");var e={type:a.TYPES.ACTION,name:"applied",data:t};o.emit(e)},t.emitActionsForDecisionAppliedEvent=function(n,t){var e={decision:n};u.defineProperty(e,"actions",(function(){return i.map(t,s)}),"appliedAllForDecisionEvent");var r={type:a.TYPES.ACTION,name:"appliedAllForDecision",data:e};o.emit(r)},t.emitSendEvents=function(){var n={type:a.TYPES.ANALYTICS,name:"sendEvents"};o.emit(n)},t.emitHoldEvents=function(){var n={type:a.TYPES.ANALYTICS,name:"holdEvents"};o.emit(n)}},8084:function(n,t,e){var i=e(9587),r=e(438),o=e(5075),a=e(5005),u=e(1658),c=e(1361);function s(n,t,e,r){var o=n.getLayerState(r),a=t.get(r),c=e.get();if(!o||!a)return c?{layer:{name:c.layerName,id:c.layerId,policy:c.layerPolicy,integrationStringVersion:c.integrationStringVersion},experiment:{name:c.experimentName,id:c.experimentId},variation:{name:c.variationName,id:c.variationId},isLayerHoldback:!1}:null;if(u.isSingleExperimentPolicy(a.policy)&&o.decision.isLayerHoldback)return null;var s,f,l=o.decision.experimentId,d=o.decision.variationId;return l&&d&&(s=i.find(a.experiments,{id:l}))&&(f=i.find(s.variations,{id:d}))?{layer:{name:a.name,id:a.id,policy:a.policy,integrationStringVersion:a.integrationStringVersion},experiment:{name:s.name,id:s.id},variation:{name:f.name,id:f.id},isLayerHoldback:o.decision.isLayerHoldback}:null}function f(n,t,e,r,o,a){var s=[],f=n.getLayerStates();a.onlySingleExperiments&&(f=i.filter(f,(function(n){var e=t.get(n.layerId);return e&&u.isSingleExperimentPolicy(e.policy)})));var l=i.map(f,(function(n){var t=!!n.decision.variationId,e=n.decisionActivationId&&n.decisionActivationId===r.getActivationId(),o=c.getExperimentAndVariation(),a=o?o.variationId:null,u=t&&n.decision.variationId===a;return i.extend(n,{isActive:t&&e||u,visitorRedirected:u})})),d=o?i.filter(l,o):l;return i.each(d,(function(n){var r=function(n,t,e,r){var o,a,u=n.layerId,c=t.get(u)||{},s=i.map(c.experiments,(function(n){return i.pick(n,["id","name"])}));if(!r&&c.decisionMetadata&&c.decisionMetadata.offerConsistency)return;var f={id:u,campaignName:c.name||null,experiment:null,allExperiments:s,variation:null,reason:n.decision.reason,isActive:!!n.isActive,visitorRedirected:n.visitorRedirected,isInCampaignHoldback:n.decision.isLayerHoldback};n.decision&&n.decision.experimentId&&(o=i.find(c.experiments,{id:n.decision.experimentId})),o&&(f.experiment=i.pick(o,["id","name","campaignName"])),o&&n.decision.variationId&&(a=i.find(o.variations,{id:n.decision.variationId})),a&&(f.variation=i.pick(a,["id","name"]));var l=i.map(n.decisionTicket.audienceIds,(function(n){return i.pick(e.get(n),["id","name"])}));return f.audiences=l,c.decisionMetadata&&c.decisionMetadata.offerConsistency&&(f.pageId=n.pageId),f}(n,t,e,a.includeOfferConsistency);r&&s.push(r)})),s}t.data=["stores/audience_data","stores/client_metadata","stores/event_data","stores/layer_data","stores/view_data","stores/group_data","stores/interest_group","stores/tag_group","stores/global",function(n,t,e,r,u,c,s,f,l){var d={},h={},v={},p={audiences:n.getAudiencesMap(),events:e.getEventsMap(),campaigns:d,pages:u.getPagesMap(),experiments:h,variations:v,projectId:l.getProjectId(),snippetId:l.getSnippetId(),accountId:l.getAccountId(),dcpServiceId:l.getDCPServiceId(),revision:l.getRevision(),clientName:t.getClientName(),clientVersion:t.getClientVersion()},g=a.dereferenceChangeId;return i.each(r.getAll(),(function(n){o.defineProperty(d,n.id,(function(){var t=i.extend({},n);return o.defineProperty(t,"changes",(function(){return i.map(n.changes,g)}),"campaign"),o.defineProperty(t,"experiments",(function(){return i.map(n.experiments,(function(n){return h[n.id]}))}),"campaign"),t}),"campaignMap","byId"),i.each(n.experiments,(function(n){o.defineProperty(h,n.id,(function(){var t=i.extend({},n);return o.defineProperty(t,"changes",(function(){return i.map(n.changes,g)}),"experiment"),o.defineProperty(t,"variations",(function(){return i.map(n.variations,(function(n){return v[n.id]}))}),"experiment"),t}),"experimentMap","byId"),i.each(n.variations,(function(n){o.defineProperty(v,n.id,(function(){var t=i.extend({},n);return o.defineProperty(t,"actions",(function(){return i.map(n.actions,(function(n){return i.extend({},n,{changes:i.map(n.changes,g)})}))}),"variation"),t}),"variationMap","byId")}))}))})),p.groups=c.getGroupsMap(),p}],t.visitor=["stores/visitor",function(n){return i.cloneDeep(n.getVisitorProfile())}],t.visitor_id=["stores/visitor_id",function(n){return{randomId:n.getRandomId()}}],t.state=["stores/audience_data","stores/layer_data","stores/layer","stores/view_data","stores/view","stores/global","stores/observed_redirect",function(n,t,e,o,a,l,d){return{getCampaignStates:function(r){var o={},a=f(e,t,n,l,r,{includeOfferConsistency:!1});return i.each(a,(function(n){o[n.id]=n})),o},getExperimentStates:function(r){var o=f(e,t,n,l,r,{includeOfferConsistency:!1,onlySingleExperiments:!0}),a=["audiences","variation","reason","visitorRedirected","isActive"];return i.reduce(o,(function(n,t){var e=t.allExperiments[0];return n[e.id]=i.extend({},i.pick(t,a),{id:e.id,experimentName:e.name,isInExperimentHoldback:t.isInCampaignHoldback}),n}),{})},getCampaignStateLists:function(r){var o={},a=f(e,t,n,l,r,{includeOfferConsistency:!0});return i.each(a,(function(n){var t=n.id;o[t]||(o[t]=[]),o[t].push(n)})),o},getPageStates:function(n){var t=a.getAll(),e=i.reduce(t,(function(n,t){var e=o.get(t.id);return n[t.id]=i.extend({},i.pick(e,["id","name","apiName","category","staticConditions","tags"]),i.pick(t,["isActive","metadata"])),n[t.id].isActive=!!n[t.id].isActive,n}),{});return n?i.pickBy(e,n):e},isGlobalHoldback:function(){return l.isGlobalHoldback()},getActivationId:function(){return l.getActivationId()},getVariationMap:function(){var n=e.getLayerStates(),r={};return i.each(n,(function(n){var e=t.get(n.layerId);if(n.decision&&n.decision.experimentId&&(r[n.decision.experimentId]={id:n.decision.variationId,name:null,index:null},e)){var o=i.find(e.experiments,{id:n.decision.experimentId});if(o&&n.decision.variationId)var a=i.find(o.variations,{id:n.decision.variationId}),u=i.findIndex(o.variations,{id:n.decision.variationId});a&&(r[n.decision.experimentId]={id:n.decision.variationId,name:a.name,index:u})}})),r},getActiveExperimentIds:function(){var n={};return i.each(this.getCampaignStateLists({isActive:!0}),(function(t){i.each(t,(function(t){n[t.experiment.id]=!0}))})),i.keys(n)},getRedirectInfo:function(){var n=c.getExperimentAndVariation();return n&&(n.referrer=c.getReferrer()),n},getDecisionString:function(n){if(!n)throw new Error("Must pass a config to getDecisionString");n=i.extend({maxLength:255,shouldCleanString:!1},n);var o=s(e,t,d,n.campaignId);return o?r.generateAnalyticsString(o.layer,o.experiment,o.variation,o.isLayerHoldback,n.maxLength,n.shouldCleanString):null},getDecisionObject:function(n){if(!n)throw new Error("Must pass a config to getDecisionObject");n=i.extend({maxLength:255,shouldCleanString:!1},n);var o=s(e,t,d,n.campaignId);if(!o)return null;var a=r.formatNamesAndIdsForAnalytics(o.layer,o.experiment,o.variation,n.shouldCleanString),c=i.mapValues(a.names,(function(t,e){return r.combineAndTruncateIdAndName(t,a.idStrings[e],n.maxLength)})),f={experiment:c.experiment,variation:c.variation};return u.isSingleExperimentPolicy(o.layer.policy)||i.extend(f,{campaign:c.layer,holdback:o.isLayerHoldback}),f}}}],t.utils=e(2822).create(),t.jquery=["env/jquery",function(n){return n}],t.event_emitter=e(4633)},5834:function(n,t,e){var i=e(1364),r=e(4465),o="optimizelyDataApi";t.registerFunction=function(n,t){var e=r.getGlobal(o);e||(e={},r.setGlobal(o,e)),e[n]||(e[n]=t)},t.unregisterFunction=function(n){var t=r.getGlobal(o);t&&t[n]&&(t[n]=function(){i.log('Ignoring attempt to call "'+o+"."+n+'" which has been unregistered.')})},t.getFunction=function(n){return r.getGlobal(o)[n]}},5580:function(n,t,e){var i=e(9587),r=e(1364),o=e(8084),a=e(2339),u=a.get("stores/plugins"),c=e(7547),s=e(373),f=e(2141),l=[e(531),e(9994),e(724)],d=["clientMetadata","cookieDomain","disable","load","optOut","rum"];t.push=function(n,t){var e,o,a,u;if(!i.isArray(n)&&i.isObject(n))u=i.isUndefined(n.version)?1:n.version,e=n.type,a=[n];else if(i.isArray(n))u=0,e=n[0],a=n.slice(1);else{if(!i.isString(n))return r.warn("API / Ignoring non-array/object/string argument:",n),!1;u=0,e=n,a=[]}if(l[u]&&(o=l[u][e]),t&&-1===d.indexOf(e))return r.debug("API / Ignoring non high priority function:",e,a),!1;if(!o)return r.warn('API / No function found for "'+e+'" (v'+u+") with arguments:",a),!1;r.log('API / Executing: "'+e,'" with arguments:',a);try{o.apply(null,a),f.dispatch(c.RECORD_API_USAGE,{methodName:u?"v"+u+"."+e:e})}catch(s){r.error(s)}return!0},t.get=function(n){r.log('API / Getting module: "'+n+'"');var t=o[n];if(t?i.isArray(t)&&(t=a.evaluate(t)):t=u.getPlugin(s.PluginTypes.apiModules,n),t)return f.dispatch(c.RECORD_API_USAGE,{methodName:"get."+n}),t;r.warn('Module "'+n+'" not found.')}},5075:function(n,t,e){var i=e(730),r=e(7547),o=e(2141),a=e(1364);t.defineProperty=function(n,t,e,u,c){i(n,t,(function(){var n=["prop",u,c||t].join(".");return a.debug('Evaluating getter: "'+n+'"'),o.dispatch(r.RECORD_API_USAGE,{methodName:n}),e()}),!0)}},531:function(n,t,e){var i=e(9587),r=e(9994);function o(n){var t,e={};if(n)if(a(n))t=Number(n);else{if("object"!=typeof n)throw new Error("tracker: Revenue argument "+n+"not a number.");if("revenue"in(e=i.extend({},n))){if(!a(e.revenue))throw new Error("tracker: Revenue value "+e.revenue+"not a number.");t=Number(e.revenue),delete e.revenue}}return i.isUndefined(t)||(e.revenue=t),e}function a(n){return i.isNumber(n)||i.isString(n)&&Number(n)==n}t.activateGeoDelayedExperiments=function(n,t){t||(t=n.lists?"odds":"cdn3"),r.dataFromSource({data:n,source:t})},t.activateSiteCatalyst=function(n){n&&n.sVariable&&r.integrationSettings({id:"adobe_analytics",settings:{sVariableReference:n.sVariable}})},t.bucketVisitor=function(n,t){if(n&&t){var e={experimentId:String(n)};t>256?e.variationId=String(t):e.variationIndex=String(t),r.bucketVisitor(e)}},t.bucketUser=t.bucketVisitor,t.disable=function(n){r.disable({scope:n})},t.log=function(n){i.isUndefined(n)&&(n=!0),r.log({level:n?"INFO":"OFF"})},t.optOut=function(n){i.isUndefined(n)&&(n=!0),r.optOut({isOptOut:n})},t.setCookieDomain=function(n){r.cookieDomain({cookieDomain:n})},t.setCookieExpiration=function(n){r.cookieExpiration({cookieExpirationDays:n})},t.setDimensionValue=function(n,t){var e={};e[n]=t,r.user({attributes:e})},t.setUserId=function(n){r.user({userId:n})},t.setGA4UserId=function(n){r.ga4User({ga4UserId:n})},t.storeThirdPartyData=function(n,t){r.dataFromSource({source:n,data:t})},t.trackEvent=function(n,t){r.event({eventName:n,tags:o(t)})}},5005:function(n,t,e){var i=e(9587),r=e(2339),o=e(9338),a=e(5075),u=r.get("stores/change_data");t.translateDecisionToCampaignDecision=function(n){return c(i.cloneDeep(n),{layerId:"campaignId",isLayerHoldback:"isCampaignHoldback"})},t.translateLayerEventToCampaignEvent=function(n){var e={};return a.defineProperty(e,"campaign",(function(){return function(n){var e=i.cloneDeep(n);return e.changes&&(e.changes=i.map(e.changes,t.dereferenceChangeId)),e.experiments&&i.each(e.experiments,(function(n){n.changes&&(n.changes=i.map(n.changes,t.dereferenceChangeId)),n.variations&&i.each(n.variations,(function(n){n.actions&&i.each(n.actions,(function(n){n.changes&&(n.changes=i.map(n.changes,t.dereferenceChangeId))}))}))})),e}(n.data.layer)}),"campaignEvent"),e.decisionTicket=n.data.decisionTicket,e.decision=this.translateDecisionToCampaignDecision(n.data.decision),e.audiences=n.data.audiences,{type:"lifecycle",name:"campaignDecided",data:e}},t.translateViewActivatedToPageActivated=function(n){return{type:"lifecycle",name:"pageActivated",data:{page:n.data.view}}},t.dereferenceChangeId=function(n){var t=u.getChange(n);return t?o.safeReference(t):n};var c=function(n,t){var e=i.omit(n,i.keys(t));return i.each(t,(function(t,i){e[t]=n[i]})),e}},2822:function(n,t,e){var i=e(4222).Promise,r=e(2774).t,o=e(5476).poll,a=e(1582).b,u=e(8209).A;t.create=function(){return{observeSelector:r,poll:o,Promise:i,waitForElement:a,waitUntil:u}}},3290:function(n){n.exports={DEFAULT_INTERVAL:20}},2774:function(n,t,e){var i=e(9587),r=(e(7547),e(2339)),o=r.get("stores/directive"),a=e(1357),u=(e(765),e(373),e(2141),e(7435).generate),c=e(5476),s=e(4465),f=(r.get("stores/rum"),{once:!1,onTimeout:null,timeout:null}),l={},d=function(n){d=function(){if(!o.shouldObserveChangesIndefinitely())return function(n){var t=c.poll(i.partial(v,n));l[n].cancelObservation=function(){t(),delete l[n]}};var n,t=function(){this.disconnect(),i.each(i.keys(l),v),this.observe(r,e)},e={attributes:!0,childList:!0,subtree:!0,characterData:!0},r=a.getDocumentElement();return n=new MutationObserver(t),function(t){var o=l[t];n.observe(r,e),o.cancelObservation=function(){delete l[t],i.isEmpty(l)&&n.disconnect()}}}(),d(n)};function h(n){var t=l[n];t&&t.cancelObservation&&t.cancelObservation()}function v(n){if(l[n]){if(function(n){var t=n.options.timeout;if(null!==t)if("function"==typeof t)try{return t()}catch(e){}else if(Date.now()-n.startTime>t)return!0;return!1}(l[n]))return 0===l[n].matchedCount&&i.isFunction(l[n].options.onTimeout)&&l[n].options.onTimeout(),void h(n);var t=a.querySelectorAll(l[n].selector);t.length&&(i.each(t,(function(t){t.T&&t.T[n]||l[n].callbackQueue.push(t)})),function(n){for(;l[n]&&l[n].callbackQueue.length;){var t=l[n].callbackQueue.shift();if(p(t,n),l[n].matchedCount=l[n].matchedCount+1,l[n].callback(t),l[n]&&l[n].options.once)return void h(n)}}(n))}}function p(n,t){n.T||(n.T={}),n.T[t]=!0}t.t=function(n,t,e){if(!function(n){try{a.querySelector(n)}catch(t){return!1}return!0}(n))throw new Error("observeSelector expects a valid css selector as its first argument");if(!i.isFunction(t))throw new Error("observeSelector expects a function as its second argument");if(e&&(!i.isObject(e)||i.isFunction(e)))throw new Error("observeSelector expects an object as its third argument");var r=u();return e=i.assign({},f,e||{}),l[r]={callback:t,callbackQueue:[],matchedCount:0,options:e,selector:n,startTime:Date.now()},d(r),s.setTimeout(i.bind(v,null,r),0),i.partial(h,r)}},5476:function(n,t,e){var i=e(9587),r=(e(7547),e(2339)),o=(e(373),e(2141),e(7435).generate),a=e(4465),u=e(3290).DEFAULT_INTERVAL,c=(r.get("stores/rum"),{});function s(n){c[n]&&i.each(c[n].callbacks,(function(n){n.call(null)}))}function f(n,t){c[t]&&c[t].callbacks[n]&&(delete c[t].callbacks[n],i.some(c[t].callbacks)||(clearInterval(c[t].id),delete c[t]))}t.poll=function(n,t){i.isNumber(t)||(t=u),c[t]||(c[t]={callbacks:{},id:a.setInterval(i.partial(s,t),t)});var e=o();return c[t].callbacks[e]=n,i.partial(f,e,t)},t.cancelAll=function(){i.each(c,(function(n,t){clearInterval(n.id),delete c[t]}))}},1582:function(n,t,e){var i=e(4222).Promise,r=e(2774).t;t.b=function(n){return new i((function(t,e){r(n,t,{once:!0})}))}},8209:function(n,t,e){var i=e(4222).Promise,r=e(5476).poll;t.A=function(n){return new i((function(t,e){if(n())t();else var i=r((function(){n()&&(i(),t())}))}))}},9994:function(n,t,e){var i=e(9587),r=e(7547),o=e(5580),a=e(8084),u=e(7546),c=e(373),s=e(5539),f=e(3993),l=e(1056),d=e(6451).U,h=e(1319),v=e(2970),p=(e(3560),e(8835)),g=e(497),m=e(2141),_=e(2588),w=e(9211),y=e(1364),b=e(6386),E=(e(6667),e(6160)),I=e(1600),A=e(2339),T=A.get("stores/dimension_data"),S=A.get("stores/view"),k=A.get("stores/view_data"),R=A.get("stores/visitor_id"),N=A.get("stores/layer_data"),D=A.get("stores/directive"),C=!1,O=t.ApiListenerError=d("ApiListenerError");t.event=function(n){var t;switch(n.eventType){case"click":t=function(n){var t;return n.eventData&&(t=p.create(n.eventData.id,n.eventData.apiName,"click",n.eventData)),function(){var n=s.trackClickEvent(t);n?y.log("API / Tracking click event:",n):y.log("API / Not tracking click event:",n)}}(n);break;case"decision":t=function(n){var t=n.eventData,e=w.createLayerState(t.layerId,t.experimentId,t.variationId,t.isLayerHoldback),i=w.createSingle(t.layerId,t.experimentId,t.variationId);return function(){w.recordLayerDecision(e.layerId,e.decisionTicket,e.decision),y.log("API / Tracking decision event:",e),s.trackDecisionEvent(e.decision,e.decisionTicket,i)}}(n);break;case"pageview":t=function(n){var t=E.create(n.eventData.id,n.eventData.apiName),e=E.createState(t.id);return function(){var n=s.trackViewActivation(t,e);n?y.log("API / Tracking pageview event:",n):y.log("API / Not tracking pageview event:",n)}}(n);break;default:t=function(n){var t;return n.eventId&&(t=p.create(n.eventId,n.eventName,"custom")),E.updateAllViewTags(),function(){s.trackCustomEvent(n.eventName,n.tags,t)?y.log("API / Tracking custom event:",n.eventName,n.tags):y.log("API / Not tracking custom event:",n.eventName)}}(n)}R.getBucketingId()?t():m.dispatch(r.ADD_CLEANUP_FN,{lifecycle:c.Lifecycle.postActivate,cleanupFn:t})},t.clientMetadata=function(n){C},t.priorRedirectString=function(n){},t.microsnippetError=function(n){},t.rum=function(n){m.dispatch(r.SET_RUM_DATA,n.eventData)},t.initialViewStates=function(n){var t=i.map(n.states,(function(n,t){return{id:t,isActive:n}}));E.registerViews(t)},t.page=function(n){var t=k.getByApiName(n.pageName);if(!t)throw new Error('Unknown page "'+n.pageName+'"');var e=!n.hasOwnProperty("isActive")||n.isActive,i=function(){e?E.activateViaAPI(t,n.tags):(E.deactivate(t),y.log("API / Deactivated Page",E.description(t)))};R.getBucketingId()?i():m.dispatch(r.ADD_CLEANUP_FN,{lifecycle:c.Lifecycle.postViewsActivated,cleanupFn:i})},t.tags=function(n){E.setGlobalTags(n.tags)},t.user=function(n){y.log("API / Setting visitor custom attributes:",n.attributes),i.each(n.attributes,(function(n,t){var e,i,r=t,o=T.getById(t)||T.getByApiName(t);o&&(r=o.id,e=o.apiName,i=o.segmentId||o.id);var a={id:i,value:n};e&&(a.name=e),x(r,a,!0)}))},t.ga4User=function(n){n.ga4UserId?(y.log("API / Setting ga4 user id in the global store:",n.ga4UserId),m.dispatch(r.SET_GA4_USER_ID,n)):y.error('API / Argument "ga4UserId" is missing')};var x=function(n,t,e){var i=[{key:e?["custom",n]:[n],value:t,metadata:{lastModified:h.now()}}],o=function(){m.dispatch(r.SET_VISITOR_ATTRIBUTES,{attributes:i})};R.getBucketingId()?o():m.dispatch(r.ADD_CLEANUP_FN,{lifecycle:c.Lifecycle.postVisitorProfileLoad,cleanupFn:o})};t.optOut=function(n){var t=!n.hasOwnProperty("isOptOut")||n.isOptOut;v.setOptOut(t)},t.cookieExpiration=function(n){var t=n.cookieExpirationDays;t<90&&(y.error('Argument "cookieExpirationDays"=',t,"less than minimum days:",90,", setting to minimum."),t=90),y.log("API / Setting cookie age to",t,"days."),m.dispatch(r.SET_COOKIE_AGE,86400*t)},t.extendCookieLifetime=function(n){n=i.extend({isEnabled:!0},n),y.log("API / Setting cookie automatic lifetime extension to",n.isEnabled),m.dispatch(r.SET_COOKIE_AUTO_REFRESH,n.isEnabled)},t.cookieDomain=function(n){y.log("API / Setting cookie domain to",n.cookieDomain),m.dispatch(r.SET_COOKIE_DOMAIN,n.cookieDomain)},t.disable=function(n){if(n.scope){if("tracking"!==n.scope)throw new Error('Unknown "scope" for disable: '+n.scope);y.log("API / Disabling tracking"),m.dispatch(r.LOAD_DIRECTIVE,{trackingDisabled:!0})}else y.log("API / Disabling everything"),m.dispatch(r.LOAD_DIRECTIVE,{disabled:!0})},t.log=function(n){var t=n.level,e=n.match;i.isUndefined(t)&&(t="INFO"),i.isUndefined(e)&&(e=""),y.setLogMatcher(e),y.setLogLevel(t)},t.registerModule=function(n){var t="custom/"+n.moduleName;if(a[t]||o.get(t))throw new Error('Module name "'+t+'" is reserved. Will not be registered as plugin.');b.registerApiModule(t,n.module)},t.dataFromSource=function(n){var t=n.source;l.makeAsyncRequest(t),l.resolveRequest(t,n.data)},t.addListener=function(n){if(!i.isFunction(n.handler))throw new Error("A handler function must be supplied");(n=i.omit(n,"type")).publicOnly=!0,n.emitErrors=!0;var t=n.handler;n.handler=function(n){try{return t(n)}catch(e){throw new O(e)}},g.on(n)},t.removeListener=function(n){if(!n.token)throw new Error("Must supply a token to removeListener");g.off(n.token)},t.load=function(n){n.data=i.extend({},n.data),u.normalizeClientData(n.data),m.dispatch(r.DATA_LOADED,{data:n.data})},t.integrationSettings=function(n){if(!n.id)throw new Error("id is required");if(!n.settings)throw new Error("settings is required");m.dispatch(r.SET_INTEGRATION_SETTINGS,i.extend({},n.settings,{id:n.id}))},t.bucketVisitor=function(n){if(!n.variationId&&i.isUndefined(n.variationIndex)||n.variationId&&n.variationIndex)throw new Error("One of a variationId or a variationIndex is required.");if(!n.experimentId)throw new Error("An experimentId is required.");var t,e,r=n.campaignId;if(r){if(!(t=N.get(r)))throw new Error("Could not find layer "+r)}else if(!(r=(t=N.getLayerByExperimentId(n.experimentId)).id))throw new Error("Could not find layer for experiment "+n.experimentId);if(!(e=i.find(t.experiments,{id:n.experimentId})))throw new Error("Could not find experiment "+n.experimentId+" in layer "+r);var o=n.variationId;if(i.isUndefined(n.variationIndex)){if(!i.find(e.variations,{id:o}))throw new Error("Cound not find variation "+o+" in experiment "+n.experimentId)}else if(!(o=e.variations[n.variationIndex].id))throw new Error("Could not find variation at index "+n.variationIndex+" in experiment "+n.experimentId);I.updateVariationIdMap(r,n.experimentId,o),R.getBucketingId()&&I.persistVariationIdMap()},t.waitForOriginSync=function(n){if(!i.isArray(n.canonicalOrigins))throw new Error("canonicalOrigins must be an array. Got: "+_.stringify(n.canonicalOrigins));i.each(n.canonicalOrigins,(function(n){if(!i.isString(n))throw new Error("Each item in canonicalOrigins must be a string. Found type "+(void 0===n?"undefined":(t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t));var t})),m.dispatch(r.XDOMAIN_SET_CANONICAL_ORIGINS,{canonicalOrigins:n.canonicalOrigins})},t.disableCrossOrigin=function(){y.log("API / cross origin tracking is DISABLED"),m.dispatch(r.XDOMAIN_SET_DISABLED,{disabled:!0})},t.activate=function(){D.shouldActivate()?(i.forEach(S.getActiveViewStates(),(function(n){E.deactivate(k.get(n.id))})),m.dispatch(r.RESET_VIEW_STATES),f.emitActivateEvent()):y.debug("Not activating.")},t.sendEvents=function(){f.emitSendEvents()},t.holdEvents=function(){f.emitHoldEvents()}},724:function(){},5832:function(n,t,e){var i=e(9587),r=e(6451).U,o=t.ActivationCodeError=r("ActivationCodeError"),a=t.ProjectJSError=r("ProjectJSError"),u=e(2246),c=e(7547),s=e(5539),f=e(3993),l=e(9685),d=e(411),h=e(7546),v=e(1319),p=e(7388),g=e(2339),m=e(2970),_=e(1357),w=e(373),y=e(497),b=e(609),E=e(7941),I=e(2141),A=e(1214),T=e(9211),S=e(5290).mM,k=e(1364),R=e(9250),N=e(8725),D=e(6386),C=e(9805),O=e(4222).Promise,x=e(8121),P=e(6667),M=e(9425),L=e(4725),U=e(6160),V=e(1600),F=e(4465),z=(g=e(2339)).get("stores/session"),j=g.get("stores/audience_data"),G=g.get("stores/action_data"),B=g.get("stores/cleanup"),q=g.get("stores/directive"),H=g.get("stores/global"),Y=g.get("stores/group_data"),K=g.get("stores/layer_data"),$=g.get("stores/layer"),W=g.get("stores/pending_events"),X=g.get("stores/plugins"),J=g.get("stores/rum"),Q=g.get("stores/visitor"),Z=g.get("stores/view_data"),nn=g.get("stores/view"),tn=g.get("stores/visitor_id"),en=g.get("stores/visitor_bucketing"),rn=g.get("stores/xdomain"),on=e(5580),an=e(3560),un=e(1752),cn=t;function sn(){var n=null;i.isNumber(n)&&0===K.getCount()?(k.log("Activating after delay of",n,"ms because no Experiments are running"),I.dispatch(c.SET_RUM_DATA,{data:{activateDfd:!0}}),F.setTimeout(f.emitActivateEvent,n)):f.emitActivateEvent()}function fn(n){an.handleError(n.data.error,n.data.metadata)}function ln(n,t){I.dispatch(c.SET_RUM_DATA,{data:{extras:{xdAttempt:n,xdError:t?t.toString():void 0}}})}function dn(n,t,e){n=n||[];var r=X.getAllPlugins(w.PluginTypes.visitorProfileProviders),o=H.getGlobalHoldbackThreshold(),a=Q.getVisitorProfile();V.populateLazyVisitorData(r,a);var u=tn.getBucketingId();if(!u)throw new Error("bucketingId not set");var c,s=Q.getVisitorProfile();t&&(c=en.getVariationIdMap()[t.id]);var f={bucketingId:u,visitorProfile:s,audiences:n,globalHoldback:o,preferredVariationMap:c,layer:t};return t&&e&&p.isPageIdRelevant(t)?i.map(e,(function(n){return p.createTicket(i.extend({},f,{pageId:n}))})):[p.createTicket(f)]}function hn(n,e,r,o){try{var a=function(n){return{bucketingId:tn.getBucketingId(),preferredLayerId:en.getPreferredLayerMap()[n.id]}}(o),u=p.decideGroup(o,a);if(u.reason)return k.debug("Not activating Group",A.description(o),"; reason:",u.reason),J.getSampleRum()&&I.dispatch(c.RECORD_LAYER_FEATURE_USAGE,{feature:"mutex",entityId:o.id}),O.resolve();var s=K.get(u.layerId);if(!s)return k.debug("Visitor was bucketed into a Campaign ("+u.layerId+") which is not in this snippet"),O.resolve();var f=i.filter(s.pageIds,i.partial(i.includes,r));return i.isEmpty(f)?(k.debug("Not activating Group",A.description(o),"; reason: visitor was bucketed into a Campaign/Experiment not related to the currently-activating Page(s)"),O.resolve()):(J.getSampleRum()&&I.dispatch(c.RECORD_LAYER_FEATURE_USAGE,{feature:"mutex",entityId:o.id}),t.decideAndExecuteLayerASAP(n,e,f,s))}catch(l){return k.error("Error getting decision for Group",A.description(o),"; ",l),O.reject(l)}}function vn(n,t){var e={};return i.each(n,(function(n){i.isArray(n)?i.extend(e,vn(n,t)):i.isObject(n)&&t[n.type]&&(e[n.type]=!0)})),e}function pn(n){var t=[];return i.each(n,(function(n){t.push(n.name,n)})),t}function gn(n){var t=B.getCleanupFns(n);if(t.length>0){for(;t.length>0;)t.shift()();I.dispatch(c.CLEAR_CLEANUP_FN,{lifecycle:n})}}t.initialize=function(n){return this.initGlobalStore(n.clientData),this.initializePlugins(n.plugins)},t.initGlobalStore=function(n){h.normalizeClientData(n),y.on({filter:{type:"error"},handler:fn}),I.dispatch(c.DATA_LOADED,{data:n}),k.log("Initialized with DATA:",n)},t.initializePlugins=function(n){if(i.isArray(window.optimizely)&&(window.optimizely=i.filter(window.optimizely,(function(n){var t=!0;return!on.push(n,t)}))),m.setOptOut(q.shouldOptOut()),!q.isDisabled()&&!q.shouldOptOut()){un.queueBeacons(),_.isReady()?I.dispatch(c.SET_DOMCONTENTLOADED):_.addReadyHandler((function(){I.dispatch(c.SET_DOMCONTENTLOADED)})),N.time("projectJS");var e=H.getProjectJS();if(i.isFunction(e))try{E.apply(e)}catch(h){k.error("Error while executing projectJS: ",h),d.emitError(new a(h))}N.timeEnd("projectJS"),i.each(n||[],(function(n){try{n(D)}catch(h){d.emitInternalError(h)}})),i.each(H.getPlugins()||[],(function(n){try{E.apply(n,[D])}catch(h){d.emitError(h)}})),P.load();var r=y.on({filter:{type:"lifecycle",name:"activated"},handler:function(){Q.observe(V.persistVisitorProfile),$.observe(V.persistLayerStates),z.observe(V.persistSessionState),W.observe(R.persistPendingEvents),en.observe(V.persistVisitorBucketingStore),y.off(r)}});y.on({filter:{type:"lifecycle",name:"viewsActivated"},handler:t.onViewsActivated}),y.on({filter:{type:"lifecycle",name:"pageDeactivated"},handler:t.onPageDeactivated}),t.initializeApi();var o=R.getPendingEvents();if(o&&(I.dispatch(c.LOAD_PENDING_EVENTS,{events:o}),R.retryPendingEvents(o)),y.on({filter:{type:"lifecycle",name:"activate"},handler:t.activate}),f.emitInitializedEvent(),!q.shouldActivate())return O.resolve();var u=[];if(rn.isDisabled())sn();else{var s=t.initializeXDomainStorage();if(u.push(s),Boolean(rn.getCanonicalOrigins())){var l=M.makeTimeoutPromise(1e3);O.race([s,l])["catch"]((function(n){k.error("Failed to initialize xDomain storage: ",n)})).then(sn)["catch"](an.handleError)}else sn()}return O.all(u)}k.log("Controller / Is disabled")},t.activate=function(){try{var n=[];k.log("Activated client"),gn(w.Lifecycle.preActivate);var t=v.now();I.dispatch(c.ACTIVATE,{activationId:String(t),activationTimestamp:t});var e=Z.getAll();U.registerViews(e),V.setId(V.getOrGenerateId()),n.push(s.trackPostRedirectDecisionEvent()),I.dispatch(c.MERGE_VARIATION_ID_MAP,{variationIdMap:V.getVariationIdMap()}),I.dispatch(c.MERGE_PREFERRED_LAYER_MAP,{preferredLayerMap:V.getPreferredLayerMap()}),gn(w.Lifecycle.postVisitorProfileLoad),n.push((h=X.getAllPlugins(w.PluginTypes.visitorProfileProviders),g=Q.getVisitorProfile(),V.populateEagerVisitorData(h,g)).then((function(){k.log("Populated visitor profile")})));var r=dn(),o=p.decideGlobal(r);k.log("Made global decision",r,"->",o),I.dispatch(c.RECORD_GLOBAL_DECISION,o);var a=s.trackClientActivation();a?k.log("Tracked activation event",a):k.log("Not tracking activation event");var u=cn.setUpViewActivation(e),l=[];return i.each(u,(function(n){l=l.concat(U.activateMultiple([n]))})),gn(w.Lifecycle.postViewsActivated),gn(w.Lifecycle.postActivate),f.emitActivatedEvent(),O.all(n).then((function(){y.emit({type:b.TYPES.LIFECYCLE,name:"activateDeferredDone"}),k.log("All immediate effects of activation resolved")}),d.emitError)}catch(m){return d.emitError(m),O.reject(m)}var h,g},cn.setUpViewActivation=function(n){var t=[];return i.each(n,(function(n){i.isBoolean(nn.getViewState(n.id).isActive)&&U.isActivationTypeImmediate(n.activationType)?k.debug("Skipping page: already evaluated, presumably at the edge",U.description(n)):U.shouldTriggerImmediately(n.activationType)?t.push(n):n.activationType===w.ViewActivationTypes.callback?(k.debug("Setting up conditional activation for Page",U.description(n)),cn.activateViewOnCallback(n)):n.activationType===w.ViewActivationTypes.polling?(k.debug("Setting up polling activation for Page",U.description(n)),C.pollFor(i.partial(E.apply,n.activationCode),null,i.partial(L.isTimedOut,v.now())).then((function(){U.activateMultiple([n])}))["catch"]((function(t){k.warn("Failed to activate view ",n,t)}))):n.activationType!==w.ViewActivationTypes.manual&&d.emitError(new Error("Unknown view activationType: "+n.activationType))})),t},cn.activateViewOnCallback=function(n){var t={pageId:n.id};Object.defineProperty(t,"isActive",{get:function(){return nn.isViewActive(n.id)}});try{E.apply(n.activationCode,[function(t){var e=i.extend({},t,{pageName:n.apiName,type:"page"});on.push(e)},t])}catch(r){var e=new o("("+r.toString()+") in activationCode for "+U.description(n));d.emitError(e,{originalError:r,userError:!0})}},t.onViewsActivated=function(n){var e,r=n.data.views,o=i.map(r,"id");try{if(!tn.getBucketingId())throw new Error("View activated with no visitorId set");var a=function(n){var e=K.getAllByPageIds(n),r=q.getForceVariationIds(),o=q.getForceAudienceIds(),a=!i.isEmpty(r);a&&k.log("Force variations are in use. Disabling mutual exclusivity.");var u=a?{individual:e}:i.reduce(e,(function(n,t){return t.groupId?n.groups[t.groupId]||(n.groups[t.groupId]=Y.get(t.groupId)):n.individual.push(t),n}),{groups:{},individual:[]});k.log("Deciding Campaigns/Experiments for Page(s)",n);var c=i.map(u.groups,A.description).join(", ");k.log("Groups:",c);var s=i.map(u.individual,T.description).join(", ");k.log("Campaigns/Experiments not in Groups (by Campaign id):",s);var f=i.map(u.groups,i.partial(hn,r,o,n))||[],l=i.map(u.individual,(function(e){var a=i.filter(e.pageIds,i.partial(i.includes,n));return t.decideAndExecuteLayerASAP(r,o,a,e)})),d=f.concat(l);return O.all(d).then((function(t){var e=i.filter(t,(function(n){return!!n}));return k.log("All Campaigns/Experiments for Page(s) (by Campaign id)",n,"resolved:",i.map(e,T.description).join(", ")),e}))}(o)["catch"](d.emitError);return e=O.all(i.map(r,(function(n){var t=function(){U.parseViewTags(n);var t=s.trackViewActivation(n);t?k.log("Tracked activation for Page",U.description(n),t):k.log("Not Tracking activation for Page",U.description(n))};return _.isReady()?O.resolve(t()):C.pollFor(_.isReady,1e3).then(t)}))),O.all([a,e])}catch(u){d.emitError(u)}},t.onPageDeactivated=function(n){var t=n.data.page,e=G.getAllActionIdsByPageId(t.id);i.each(e,(function(n){var e=G.getActionState(n);e&&(i.each(e,(function(n,e){if(n.cancel)try{n.cancel(),k.debug("Controller / Canceled change",e,"observation due to deactivation of page:",t)}catch(i){k.error("Controller / Error canceling change",e,"observation upon deactivation of page.",i)}if(t.undoOnDeactivation&&n.undo)try{n.undo(),k.debug("Controller / Undid change",e,"due to deactivation of page:",t)}catch(r){k.error("Controller / Error undoing change upon deactivation of page.",r)}})),I.dispatch(c.REMOVE_ACTION_STATE,{actionId:n}),k.debug("Controller / Undid changes and/or canceled change observation due to deactivation of page:",t,n))}))},t.initializeApi=function(){var n={push:on.push};n.get=on.get;var t=window.optimizely;i.isArray(t)&&i.each(t,(function(t){n.push(t)})),n.data={note:"Obsolete, use optimizely.get('data') instead"},n.state={},window.optimizely=n},t.persistItemsWithId=function(n){return i.each(n,(function(n,t){V.checkKeyForVisitorId(t)&&S.setItem(t,n)})),n},t.initializeXDomainStorage=function(){var n=e(9851),r=!!V.getCurrentId(),o=!!r&&V.hasSomeData();r?o?k.log("xd / Existing visitor; has data on this origin"):k.log("xd / Existing visitor; new to this origin"):k.log("xd / New visitor");var a=H.getAccountId(),u="https://a125375509.cdn.optimizely.com".replace("__SUBDOMAIN__","a"+a+"."),s="/client_storage/a"+a+".html";n.subscribe((function(n,t){V.checkKeyForVisitorId(n)&&S.setItem(n,t)}));var l=n.fetchAll().then((function(t){if(!tn.getVisitorIdLocator()){var e=rn.getCanonicalOrigins();if(e){var i=n.getXDomainUserId(t,e);i&&(k.log("Syncing cross-origin visitor randomId:",i),V.maybePersistVisitorId({randomId:i}))}}return V.deleteOldForeignData(),t})).then(t.persistItemsWithId).then((function(n){if(V.loadForeignData(),r&&!o){var t=!i.isEmpty(n);k.debug("xd / Loaded foreign data? ",t),ln(t)}k.log("Loaded visitor data from foreign origins"),f.emitOriginsSyncedEvent()}),(function(n){throw r&&!o&&(k.debug("xd / Failed to load foreign data:",n),ln(!1,n)),n}));return O.all([n.load(u,s)["catch"]((function(n){throw k.debug("xd / Failed to load iframe:",n),r&&!o&&ln(!1,n),n})),l["catch"]((function(n){k.debug("xd / Ignored error syncing foreign data (expected if waitForOriginSync used):",n.message),k.debug("xd / Enqueuing sync to happen after visitorId set."),I.dispatch(c.ADD_CLEANUP_FN,{lifecycle:w.Lifecycle.postVisitorProfileLoad,cleanupFn:f.emitOriginsSyncedEvent})}))])},t.decideAndExecuteLayerASAP=function(n,e,r,o){return new O((function(a,d){try{!function(n,t,e,r,o){if(t.length||e.length)return void o(dn([],void 0,r));var a=T.relatedAudienceIds(n),u=i.reduce(a,(function(n,t){var e=j.get(t);return!e||n.push(e),n}),[]),s=X.getAllPlugins(w.PluginTypes.audienceMatchers);if(J.getSampleRum()){var f={};if(i.each(u,(function(n){i.extend(f,vn(n.conditions,s))})),!i.isEmpty(f)){var d=i.keys(f);I.dispatch(c.RECORD_AUDIENCE_USAGE,{audienceTypes:d,layerId:n.id})}}!function(n,t,e,r){var o=i.reduce(n,(function(n,e){return i.extend(n,l.requiredAudienceFieldsForConditions(e.conditions,t))}),{}),a=i.reduce(o,(function(n,t){if(i.isUndefined(V.getAttribute(t))){var e=V.getPendingAttributeValue(t);i.isUndefined(e)||n.push(e)}return n}),[]);if(0===a.length)return r();var u=[].concat(n),c=x.firstToResolve(i.map(a,(function(n){return O.resolve(n).then((function(){var n=Q.getVisitorProfile();if(u=i.filter(u,(function(e){return i.isUndefined(l.isInAudience(n,e,t))})),!i.isEmpty(u))throw new Error("At least one audience is still pending")}))})));O.race([c,new O((function(n,t){F.setTimeout(t,e)}))]).then((function(){k.log("Activating Campaign after pending Audiences resolved",n),r()}),(function(){k.log("Activating Campaign after timeout on Audiences",n),r()}))}(u,s,T.getActivationTimeout(n),(function(){var t=dn(u,n,r);i.map(t,(function(t){!function(n,t,e){var r=i.map(n.audienceIds,i.bind(j.get,j)),o=i.filter(t,(function(t){return!i.includes(n.audienceIds,t.id)}));k.log("When deciding Campaign",T.description(e),"visitor is in audiences:",pn(r),"and not in audiences:",pn(o))}(t,u,n)})),o(t)}))}(o,n,e,r,(function(l){i.each(l,(function(a){var l=a.pageId?[a.pageId]:r;k.debug("Deciding layer: ",o,"with decisionTicket: ",a,"and actionViewIds: ",l),function(n,e,r,o,a){var l=T.description(n);k.log("Activating Campaign",l,"on Page(s)",o),r.length&&(k.log("Applying force audienceIds:",r,"to Campaign",l),(a=i.cloneDeep(a)).audienceIds=r);var d=t.decideLayer(n,a,e),h=!(!e.length&&!r.length),v=t.getActionsForDecision(n,d,h),g=function(n,t){return i.filter(n,(function(n){return i.isUndefined(n.pageId)||i.includes(t,n.pageId)}))}(v.actions,o);if(v.maybeExecute&&function(n,t,e,r){var o=T.description(t);k.log("Preparing actions",n,"for Campaign",o,"on Page(s)",r),i.forEach(n,u.prepareAction)}(g,n,0,o),i.forEach(o,(function(){s.trackDecisionEvent(d,a)})),f.emitLayerDecided({layer:n,decisionTicket:a,decision:d}),d.error)throw d.error;if(J.getSampleRum()){I.dispatch(c.RECORD_LAYER_POLICY_USAGE,{policy:n.policy,layerId:n.id});var m=function(n){var t={};return i.each(n,(function(n){i.each(n.changeSet,(function(n){t[n.type]||(t[n.type]=!0)}))})),t}(v.actions);I.dispatch(c.RECORD_CHANGE_TYPE_USAGE,{changeTypes:i.keys(m),layerId:n.id}),i.isEmpty(n.integrationSettings)||I.dispatch(c.RECORD_INTEGRATION_USAGE,{integrations:T.getIntegrationTypes(n),layerId:n.id})}if(!p.isInCohort(d))return void k.log("Not activating Campaign: "+T.description(n)+"; not in the cohort because:",d.reason);v.maybeExecute&&function(n,t,e,r){var o=T.description(t);k.log("Executing actions",n,"for Campaign",o,"on Page(s)",r),O.all(i.map(n,(function(n){return u.executePreparedAction(n).then(i.partial(f.emitActionAppliedEvent,n))}))).then((function(){k.log("All page actions for",e,"applied:",n),f.emitActionsForDecisionAppliedEvent(e,n)}))["catch"]((function(n){k.warn("Error evaluating page actions for decision",e,"because:",n)}))}(g,n,d,o)}(o,n,e,l,a)})),a(o)}))}catch(h){k.error("Error getting decision for Campaign: "+T.description(o),h),d(h)}}))},t.decideLayer=function(n,t,e){var i;var r=T.description(n);i=e.length?p.getDummyLayerDecision(n,e):p.decideLayer(n,t),k.log("Recording decision for Campaign",r,t,"->",i),T.recordLayerDecision(n.id,t,i),i.variationId&&i.experimentId&&V.updateVariationIdMap(n.id,i.experimentId,i.variationId),n.groupId&&V.updatePreferredLayerMap(n.groupId,n.id);return i},t.getActionsForDecision=function(n,t,e){var i=T.description(n),r="NOT applying changes for Campaign",o={actions:[],maybeExecute:!1};if(o.actions=[].concat(G.getLayerActions(t.layerId)||[],G.getExperimentActions(t.experimentId)||[],G.getExperimentVariationActions(t.experimentId,t.variationId)||[]),!e&&H.isGlobalHoldback())return k.log(r,i,"(visitor is in global holdback)"),o;if(t.isLayerHoldback)return k.log(r,i,"(visitor is in layer holdback)"),o;if(!t.experimentId||!t.variationId)return k.log(r,i,"(visitor is not eligible for any Experiments)"),o;return o.maybeExecute=!0,k.log("Got Actions for Campaign:",i,o.actions),o}},854:function(n,t,e){var i=e(126).Promise,r=e(1319),o=e(2339).get("stores/plugins"),a=e(373),u=e(1364);t.create=function(n,t,e){var c={identifier:n.id,action:t,startTime:e||r.now()};try{var s=o.getPlugin(a.PluginTypes.changeAppliers,n.type);if(!s)throw new Error("Unrecognized change type "+n.type);return new s(n,c)}catch(f){return u.error("Change applier was never properly constructed:",f),{apply:function(){return i.reject(f)}}}}},4989:function(n){n.exports={SELECTOR_POLLING_MAX_TIME:2e3,CHANGE_DATA_KEY:"optimizelyChangeData",CHANGE_ID_ATTRIBUTE_PREFIX:"data-optly-"}},613:function(n,t,e){var i=e(9587),r=e(4989).CHANGE_DATA_KEY;function o(n,t){return[n,t].join("_")}t.getData=function(n,t,e){var i=o(t,e);return n[r]&&n[r][i]?n[r][i]:null},t.hasData=function(n){return Boolean(n&&n[r]&&!i.isEmpty(n[r]))},t.removeData=function(n,t,e){n[r]&&delete n[r][o(t,e)]},t.setData=function(n,t,e,i){if("object"!=typeof i)throw new Error("setData expects an object");n[r]||(n[r]={}),n[r][o(t,e)]=i}},8062:function(n,t,e){var i=e(4717);n.exports={changeType:{CUSTOM_CODE:"custom_code",ATTRIBUTE:"attribute",APPEND:"append",REARRANGE:"rearrange",REDIRECT:"redirect",WIDGET:"widget"},DOMInsertionType:{AFTER:"after",APPEND:"append",BEFORE:"before",PREPEND:"prepend"},insertAdjacentHTMLType:{AFTER_BEGIN:"afterbegin",AFTER_END:"afterend",BEFORE_BEGIN:"beforebegin",BEFORE_END:"beforeend"},selectorChangeType:{CLASS:"class",HTML:"html",HREF:"href",SRC:"src",STYLE:"style",TEXT:"text",HIDE:"hide",REMOVE:"remove"},changeApplierState:i({APPLIED:null,APPLYING:null,UNAPPLIED:null,UNDOING:null}),changeState:i({BLOCKED:null,UNAPPLIED:null,APPLIED:null,APPLYING:null,UNDOING:null,TIMED_OUT:null,IGNORED:null,ERROR:null})}},2246:function(n,t,e){var i=e(9587),r=e(7547),o=e(411),a=e(1056),u=e(6451).U,c=e(1319),s=e(2339),f=e(2141),l=e(1364),d=e(4222).Promise,h=e(1317),v=s.get("stores/global"),p=s.get("stores/action_data"),g=s.get("stores/change_data"),m=s.get("stores/session"),_=e(854);e(4725).initialize();var w=u("ActionError");function y(n,t,e){if(p.getActionState(t.id)){var o=p.getChangeApplier(n.id,t.id);if(i.isUndefined(o)){var a={changeId:n.id,actionId:t.id,changeApplier:_.create(n,t,e)};f.dispatch(r.SET_CHANGE_APPLIER,a)}else l.warn("Action / Attempted to prepare a change which is already being applied: ",n)}else l.warn("Action / Attempted to prepare change for inactive action: ",t)}function b(n,t,e,r){if(!i.includes(r,t)){if(!n[String(t)]){var u=g.getChange(t);if(!u){var s="Change with id "+t+" is absent";return r.length&&(s+=" but listed as a dependency for "+r[r.length-1]),void l.warn(s)}n[String(t)]=new d((function(s){var f=i.map(u.dependencies||[],(function(i){return b(n,i,e,r.concat([t]))}));if(u.src){var v="change_"+u.src,m=a.makeAsyncRequest(v,(function(){return h.addScriptAsync("https://cdn.optimizely.com/public/125375509/data"+u.src,(function(){a.resolveRequest(v)}))})).then((function(){var n=g.getChange(u.id);n||o.emitError(new w("Failed to load async change from src: "+u.src)),y(n,e,c.now())}));f.push(m)}d.all(f).then((function(){var n=c.now(),i=p.getChangeApplier(t,e.id);return i?(l.debug("Action / Applying change:",u),i.apply().then((function(t){t?l.log(t):l.debug("Action / Applied change for the first time in "+(c.now()-n)+"ms:",u),s()}))):(l.debug("Action / Not applying change ",t," - No changeApplier found."),void s())}))["catch"]((function(n){l.error("Action / Failed to apply change:",u,n),s()}))}))}return n[String(t)]}l.error("Change with id "+t+" has circular dependencies: "+r.concat(t))}t.prepareAction=function(n){l.debug("Action / Preparing:",n),f.dispatch(r.ACTION_EXECUTED,{actionId:n.id,sessionId:m.getSessionId(),layerId:n.layerId,pageId:n.pageId,timestamp:c.now(),activationId:v.getActivationId()});var t=c.now();i.forEach(n.changeSet,(function(e){var o=i.isObject(e)?e.id:e,a=g.getChange(o);a||(f.dispatch(r.ADD_CHANGE,e),a=g.getChange(e.id)),a.src||y(a,n,t)}))},t.executePreparedAction=function(n){l.debug("Action / Executing:",n);var t={},e=i.map(n.changeSet,(function(e){var r=i.isObject(e)?e.id:e;return b(t,r,n,[])}));return d.all(e).then((function(){l.debug("changes for action id="+n.id+" applied")}))}},4725:function(n,t,e){var i=e(4989),r=e(2339).get("stores/directive");function o(){("interactive"===document.readyState||"complete"===document.readyState)&&(t.domReadyTime=Date.now())}t.domReadyTime=null,t.initialize=function(){o(),document.addEventListener("readystatechange",o,!0)},t.isTimedOut=function(n){var e=Date.now();if(!t.domReadyTime||!n)return!1;var o=Math.max(n,t.domReadyTime);return r.isEditor()&&(o=t.domReadyTime),!(e-o0&&(this[r.FIELDS.CATEGORY]=e),o&&i.keys(o).length>0&&(this[r.FIELDS.OPTIONS]=o),i.isUndefined(a)||(this[r.FIELDS.REVENUE]=a)}function c(n,t,e,o){this.eventBase=n,this[r.FIELDS.TIME]=t,i.isUndefined(e)||(this[r.FIELDS.SESSION_ID]=e),i.isUndefined(o)||(this[r.FIELDS.SESSION_INDEX]=o)}t.x=u,u.prototype.digest=function(){var n=function(n,t){return encodeURIComponent(n)+"="+encodeURIComponent(t)},t=[];if(t.push(n(r.FIELDS.NAME,this[r.FIELDS.NAME])),t.push(n(r.FIELDS.TYPE,this[r.FIELDS.TYPE])),this[r.FIELDS.CATEGORY]&&t.push(n(r.FIELDS.CATEGORY,this[r.FIELDS.CATEGORY])),this[r.FIELDS.REVENUE]&&t.push(n(r.FIELDS.REVENUE,this[r.FIELDS.REVENUE])),!this[r.FIELDS.OPTIONS])return t.join("&");var e=this[r.FIELDS.OPTIONS]||{},o=i.filter(i.keys(e),(function(n){return e.hasOwnProperty(n)}));o=o.sort();for(var a=0;au&&(a+=1),n[e-1].setFieldValue(o.FIELDS.SESSION_INDEX,a);for(i=e-1;i>0;i--)s(n[i],n[i-1],!0)}},t.reindexIfNecessary=function(n,t,e){var i=function(n){for(var t=0;t1e3&&(n=n.slice(-1e3),t=!0),w(n),b([]),t}t.initialize=function(n,t){if(!m.getInitialized()){f.S(n,t);var e=I();e.length>0&&E(e[e.length-1]);var i=T();i.length>0&&E(i[i.length-1]),u.dispatch(r.UPDATE_BEHAVIOR_STORE,{key:"initialized",value:!0})}},t.addEvent=function(n){c.debug("Behavior store: adding event",n);var t=f.k(n);E(t),b(T().concat(t)),v.reindexIfNecessary(S(),I(),T()),f.R(T())},t.getEvents=function(){return T().length>0&&(k()&&v.sessionize(I()),f.N(I()),f.R(T())),I()},t.getEventCount=function(){return T().length+I().length},f.S=function(n,t){f.D(n,t)&&(f.N(I()),f.R(T())),v.sessionize(I())},f.D=function(n,t){if(0===n.length&&0===t.length)return w([]),b([]),!1;var e=!1,i=n[0]||t[0];return _.EVENTBASE in i?(w(f.C(n)),b(f.C(t))):(e=!0,w(f.O(n)),b(f.O(t))),T().length>0&&(k(),e=!0),w(f._updateBaseMapAndMaybeDedupe(I())),f._migrateEventBasesAndUpdateStore()&&(e=!0),e},f.O=function(n){for(var t=[],e=0;eo)return r[a].entityId;throw new Error("Unable to choose candidate")}},4746:function(n,t,e){var i=e(9587),r=e(7547),o=e(2453),a=e(1973),u=e(4170).E,c=e(2141),s=e(1364);t.isValidExperiment=function(n,t){var e,r=i.partial(i.includes,n);return s.groupCollapsed("Decision / Evaluating audiences for experiment:",t,n),e=!t.audienceIds||a.evaluate(t.audienceIds,r),s.groupEnd(),s.debug("Decision / Experiment",t,"is valid?",e),e},t.selectVariation=function(n,t,e,a,f){if(!n.variations||0===n.variations.length)throw new u('No variations in selected experiment "'+n.id+'"');if(!n.weightDistributions&&n.variations.length>1)throw new u('On selected experiment "'+n.id+'", weightDistributions must be defined if # variations > 1');var l;if(n.bucketingStrategy&&"impression"===n.bucketingStrategy)if(1===n.variations.length)l=n.variations[0].id;else{var d=a;l=o.chooseWeightedCandidate(e+d,n.id,n.weightDistributions)}else if(l=1===n.variations.length?n.variations[0].id:o.chooseWeightedCandidate(e,n.id,n.weightDistributions),f&&f[n.id]){s.debug("Decision / Using preferredVariationMap to select variation for experiment:",n.id);var h=f[n.id];if(!i.find(n.variations,{id:h}))return c.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"stoppedVariation",id:n.id}),s.debug("Decision / Preferred variation:",h,"not found on experiment:",n.id,". Visitor not bucketed."),null;h!==l&&(c.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"preferredVariation",id:n.id}),l=h)}var v=i.find(n.variations,{id:l});if(v)return s.debug("Decision / Selected variation:",v),v;throw new u('Unable to find selected variation: "'+l+'".')},t.getExperimentById=function(n,t){var e=i.find(n.experiments,{id:t});if(e)return e;throw new u("Unable to find selected experiment.")},t.hasVariationActionsOnView=function(n,t){return s.debug("Decision / Checking variation:",n,"for actions on pageId:",t),!!i.find(n.actions,(function(n){return n.pageId===t&&!i.isEmpty(n.changes)}))}},4170:function(n,t){function e(n){this.message=n}e.prototype=new Error,t.E=e},7388:function(n,t,e){var i=e(9587),r=e(7547),o=e(411),a=e(9685),u=e(2453),c=e(4746),s=e(4170).E,f=e(2339),l=e(373),d=e(2141),h=e(1214),v=e(9211),p=e(1364),g=e(1658),m=f.get("stores/plugins"),_=f.get("stores/global"),w=f.get("stores/layer_data");function y(n){var t=m.getPlugin(l.PluginTypes.deciders,n);if(i.isEmpty(t))throw new Error("No deciders found for policy: "+n);return t}t.isPageIdRelevant=function(n){if(!n)return!1;var t=y(n.policy);return i.isFunction(t.includePageIdInDecisionTicket)?t.includePageIdInDecisionTicket(n):!0===t.includePageIdInDecisionTicket},t.createTicket=function(n){var t,e,r,o=i.pick(n,["bucketingId","globalHoldback","preferredVariationMap","pageId"]);return i.extend(o,{audienceIds:(t=n.visitorProfile,e=n.audiences,r=m.getAllPlugins(l.PluginTypes.audienceMatchers),i.reduce(e,(function(n,e){return a.isInAudience(t,e,r)&&n.push(e.id),n}),[])),activationId:_.getActivationId()}),o},t.decideGlobal=function(n){return{isGlobalHoldback:u.isHoldback(n.bucketingId,{id:null,holdback:n.globalHoldback})}},t.decideGroup=function(n,t){p.debug("Decision / Deciding layer for group: ",h.description(n));var e,o,a=t.preferredLayerId,c=!!a;try{(e=u.chooseWeightedCandidate(t.bucketingId,n.id,n.weightDistributions))&&"None"!==e||(o='Group traffic allocation. Visitor maps to a "hole" in the bucket space left by an experiment or campaign that\'s since been removed from the group')}catch(l){o="Group traffic allocation. Visitor maps to a point in the bucket space which has never been covered by any experiment or campaign."}if(c&&(p.debug("Decision / Using preferredLayerMap to select layer for group:",h.description(n)),a!==e&&(d.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"preferredLayer",id:n.id}),e=a)),o)return{layerId:null,reason:o};if(!i.find(n.weightDistributions,{entityId:e})){var f="Visitor was"+(c?" sticky-":" non-sticky ")+"bucketed into a campaign ("+e+") which is not in the group";if(!c)throw new s(f);return{layerId:null,reason:f}}return{layerId:e}},t.decideLayer=function(n,t){var e,r;p.debug("Deciding: ",n,t);var a,f,l=y(n.policy),d={layerId:n.id,experimentId:null,variationId:null,isLayerHoldback:u.isHoldback(t.bucketingId,n)};if(i.isEmpty(n.experiments))throw new s("No experiments in layer.");try{if(l.decideLayer){p.debug("Decision / Using decider's custom decideLayer.");var h=l.decideLayer(n,t);e=h.experiment,r=h.variation}else p.debug("Decision / Using default decideLayer behavior."),e=l.selectExperiment(n,t.audienceIds,t.bucketingId),r=c.selectVariation(e,t.audienceIds,t.bucketingId,t.activationId,t.preferredVariationMap)}catch(v){a=v,(null!=(f=s)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](a):a instanceof f)?d.reason=v.message:d.error=v}return d.experimentId=e?e.id:null,d.variationId=r?r.id:null,d.error&&(d.error.name="DecisionEngineError",o.emitError(d.error)),d},t.getDummyLayerDecision=function(n,t){var e,i=function(n,t){for(var e=0;e-1)return{experimentId:n.experiments[e].id,variationId:n.experiments[e].variations[i].id};return null}(n,t);return i?(p.log("Decision / Applying force variation:",i.variationId,"to Campaign",v.description(n)),e={layerId:n.id,variationId:i.variationId,experimentId:i.experimentId,isLayerHoldback:!1,reason:"force"}):(p.log("No variation matches ids:",t,"in Campaign",v.description(n)),e={layerId:n.id,variationId:null,experimentId:null,isLayerHoldback:!1,reason:"force"}),e},t.isInCohort=function(n){if(!n.experimentId||!n.variationId)return!1;var t=w.get(n.layerId);return!(g.isSingleExperimentPolicy(t.policy)&&n.isLayerHoldback)}},2339:function(n,t,e){var i=e(9587),r=e(2514),o=e(2141),a=e(8087),u=r.create(),c={action_data:e(7093),async_request:e(2800),audience_data:e(605),change_data:e(5315),cleanup:e(8989),client_metadata:e(7073),cookie_options:e(4131),event_data:e(679),event_emitter:e(2350),dimension_data:e(5843),directive:e(8718),global:e(8554),history:e(4070),integration_settings:e(4824),layer:e(8901),layer_data:e(7071),log:e(6700),observed_redirect:e(7033),pending_events:e(5464),performance:e(8864),plugins:e(6095),provider_status:e(3559),pending_redirect:e(7056),rum:e(6944),sandbox:e(3083),session:e(4127),tracker_optimizely:e(374),ua_data:e(8051),view:e(5966),view_data:e(2358),visitor:e(5750),visitor_attribute_entity:e(6179),visitor_events:e(7901),visitor_events_manager:e(1248),visitor_id:e(7985),visitor_bucketing:e(5513),xdomain:e(6996)};c.group_data=e(7277),o.registerStores(c),i.forOwn(c,(function(n,t){u.register("stores/"+t,o.getStore(t))})),u.register("core/plugins/matchers/key_value",a),n.exports=u},2970:function(n,t,e){var i=e(9587),r=e(7547),o=e(411),a=e(441),u=e(6451).U,c=e(373),s=e(2141),f=e(1364),l=t.JSONParseError=u("JSONParseError"),d=e(1440),h=e(2588),v=e(4465),p="optimizely_show_preview",g="optimizely_disable",m="optimizely_editor",_="optimizely_p13n",w="optimizely_x_audiences",y="optimizely_x",b="optimizely_show_preview",E="optimizely_opt_out",I="optimizely_token",A="optimizely_force_tracking";t.populateDirectiveData=function(){var n,t,e,u,T,S,k,R;!function(){var n="OFF",t=d.getQueryParamValue("optimizely_log");if(t){var e=t.split(":");""!==e[0]&&(n=String(e[0]).toUpperCase()),void 0!==e[1]&&f.setLogMatch(e[1])}f.setLogLevel(n)}(),function(){var n=v.getUserAgent()||"";if(!i.isString(n))return void f.warn("Directive / userAgent not a string");n=n.toLowerCase();var t=["googlebot","yahoo! slurp","bingbot","bingpreview","msnbot","keynote","ktxn","khte","gomezagent","alertsite","yottaamonitor","pingdom.com_bot","aihitbot","baiduspider","adsbot-google","mediapartners-google","applebot","catchpoint","phantomjs","moatbot","facebookexternalhit"],e=function(t){if(i.includes(n,t))return f.warn("Directive / Matches bot:",t),!0};i.some(t,e)&&(f.log("Directive / Disabling tracking"),s.dispatch(r.LOAD_DIRECTIVE,{trackingDisabled:!0}))}(),n=Boolean(i.result(window.optimizely,"initialized")),s.dispatch(r.LOAD_DIRECTIVE,{alreadyInitialized:n}),s.dispatch(r.LOAD_DIRECTIVE,{mutationObserverAPISupported:v.isMutationObserverAPISupported()}),function(){var n=a.get(c.COOKIES.OPT_OUT),t=d.getQueryParamValue(E),e="You have successfully opted out of Optimizely for this domain.",i="You are NOT opted out of Optimizely for this domain.";if("true"===t||"false"===t){var o="true"===t;s.dispatch(r.LOAD_DIRECTIVE,{shouldOptOut:o}),v.alert(o?e:i)}else n&&s.dispatch(r.LOAD_DIRECTIVE,{shouldOptOut:"true"===n})}(),function(){var n=!1,t=[p,g];t.push(m);for(var e=0;eNumber(e[o]))return 1}}return 0}},1973:function(n,t,e){var i=e(9587),r=e(2588),o=e(1364),a="or",u="not";var c={};function s(n,t){var e;if(i.isArray(n)){var u,s;n[0]in c?(u=n[0],s=n.slice(1)):(u=a,s=n),o.groupCollapsed('Condition / Applying operator "'+u+'" with args',r.stringify(s));try{e=c[u](s,t),o.debug("Condition / Result:",e)}finally{o.groupEnd()}return e}return e=t(n),o.debug("Condition / Evaluated:",r.stringify(n),":",e),e}c["and"]=function(n,t){for(var e,r,o=0;o-1;case"regex":try{return!(!o||!r)&&new RegExp(n).test(String(e))}catch(f){}return!1;case"range":var a=n.split(":"),u=parseFloat(a[0]),c=parseFloat(a[1]),s=parseFloat(e);return s>=u&&s<=c;default:return!1}}},4222:function(n,t,e){n.exports=e(126)},6540:function(n,t,e){var i=e(9587),r=e(1364);function o(n,t){this.sn=n,this.fn=t}o.prototype.ln=function(n){return[this.fn,n].join("$$")},o.prototype.dn=function(n){return n.replace(this.fn+"$$","")},o.prototype.setItem=function(n,t){try{this.sn.setItem(this.ln(n),t)}catch(e){r.warn("Failed to save",n,"to localStorage:",e)}},o.prototype.removeItem=function(n){this.sn.removeItem(this.ln(n))},o.prototype.getItem=function(n){var t=null;try{t=this.sn.getItem(this.ln(n))}catch(e){}return t},o.prototype.keys=function(){var n=i.keys(this.sn);return i.map(i.filter(n,i.bind((function(n){return i.includes(n,this.fn)}),this)),i.bind(this.dn,this))},o.prototype.allKeys=function(){return i.keys(this.sn)},o.prototype.allValues=function(){return i.values(this.sn)},n.exports={create:function(n,t){return new o(n,t)},mockStorage:{keys:function(){},getItem:function(n){},removeItem:function(n){},setItem:function(n,t){}}}},9250:function(n,t,e){var i=e(9587),r=e(411),o=e(373),a=e(2588),u=e(5290).mM,c=e(1364),s=e(6388),f=e(2339).get("stores/pending_events"),l=o.StorageKeys.PENDING_EVENTS;t.persistPendingEvents=function(){try{var n=f.getEventsString();u.setItem(l,n),e(9851).setItem(l,n)}catch(t){c.warn("PendingEvents / Unable to set localStorage key, error was: ",t),r.emitInternalError(t)}},t.getPendingEvents=function(){try{return a.parse(u.getItem(l))}catch(n){return null}},t.retryPendingEvents=function(n){i.forOwn(n,(function(n,t){s.retryableRequest(n.data,t,n.retryCount)})),i.isEmpty(n)||c.log("Retried pending events: ",n)}},6386:function(n,t,e){var i=e(9587),r=e(7547),o=e(2339),a=e(373),u=e(497),c=e(2141);t.registerApiModule=function(n,t){i.isArray(t)&&(t=o.evaluate(t)),c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.apiModules,name:n,plugin:t})},t.registerDependency=function(n,t){o.get(n)||o.register(n,t)},t.registerVisitorProfileProvider=function(n){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.visitorProfileProviders,name:n.provides,plugin:n})},t.registerViewProvider=function(n){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewProviders,name:n.provides,plugin:n})},t.registerAudienceMatcher=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.audienceMatchers,name:n,plugin:t})},t.registerViewMatcher=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewMatchers,name:n,plugin:t})},t.registerAnalyticsTracker=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.analyticsTrackers,name:n,plugin:t})},t.registerViewTagLocator=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewTagLocators,name:n,plugin:t})},t.registerAudiencePlugin=function(n){n.dependencies&&i.each(n.dependencies,(function(n,e){t.registerDependency(e,n)}));var e,r,a="vendor."+n.vendor;e=i.isString(n.provider)?o.get(n.provider)(n.vendor):i.isFunction(n.provider)?n.provider(n.vendor):i.cloneDeep(n.provider),t.registerVisitorProfileProvider(i.extend(e,{provides:a})),r=i.isString(n.matcher)?o.get(n.matcher):n.matcher;var u={fieldsNeeded:[a],match:function(n,t){return r(n[a],t)}};t.registerAudienceMatcher(a,u)},t.registerWidget=function(n){return i.isArray(n)&&(n=o.evaluate(n)),{showToken:u.on({filter:{type:"showWidget",name:n.widgetId},handler:n.showFn}),hideToken:u.on({filter:{type:"hideWidget",name:n.widgetId},handler:n.hideFn})}},t.registerChangeApplier=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.changeAppliers,name:n,plugin:t})},t.registerDecider=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.deciders,name:n,plugin:t})},t.registerEventImplementation=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.eventImplementations,name:n,plugin:t})},t.registerViewTrigger=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewTriggers,name:n,plugin:t})}},438:function(n,t,e){var i=e(9587),r=e(2339),o=":",a="holdback",u="treatment",c="",s=e(1364),f=e(1658);function l(n){return n.replace(/[^a-zA-Z0-9\.\~\!\*\(\)\']+/g,"_")}t.formatNamesAndIdsForAnalytics=function(n,t,e,o){var a={layer:n.name||c,experiment:t.name||c,variation:e.name||c};o&&(a=i.mapValues(a,l));var u,s=!n.integrationStringVersion||1===n.integrationStringVersion;if(a.experiment===c&&s)if(u=t.audienceIds,!i.isEmpty(u)&&i.includes(["and","or","not"],u[0]))a.experiment="Exp";else{var f=r.get("stores/audience_data");a.experiment=function(n,t){return i.isEmpty(t)?"everyone_else":i.reduce(t,(function(t,e){var i=n.get(e);return i?t+l(i.name?i.name:i.id)+",":t}),"").slice(0,-1)}(f,t.audienceIds)}return{names:a,idStrings:{layer:"("+l(n.id)+")",experiment:"("+l(t.id)+")",variation:"("+l(e.id)+")"}}},t.combineAndTruncateIdAndName=function(n,t,e){var i=e-t.length;if(i<0&&(s.warn("maxLength must be at least long enough to fit the entity ID, which is length"+t.length+". Defaulting to only use entity ID as name."),n=c),n===c)return t;if(n.length>i){var r=Math.min(n.length,i);return(n=n.substring(0,r))+t}return n+" "+t},t.generateAnalyticsString=function(n,e,r,c,s,l){return n.integrationStringVersion&&2===n.integrationStringVersion?function(n,e,r,u,c,s){if(f.isSingleExperimentPolicy(n.policy)&&u)return;var l=!f.isSingleExperimentPolicy(n.policy)&&u,d=t.formatNamesAndIdsForAnalytics(n,e,r,s),h=[d.names.experiment,d.names.variation],v=[d.idStrings.experiment,d.idStrings.variation];f.isSingleExperimentPolicy(n.policy)||(h.unshift(d.names.layer),v.unshift(d.idStrings.layer));var p=i.reduce(v,(function(n,t){return n+t.length}),0),g=h.length-1+(l?1:0),m=p+g*o.length;if(l&&(m+=a.length),m>c)throw new Error("The analytics string size is too low to send the entity IDs.");for(var _=c-m,w=h.length,y=[],b=h.length-1;b>=0;b--){var E=h[b],I=Math.min(E.length,Math.floor(_/w));_-=I,w--,y.unshift(E.substring(0,I))}var A=i.map(y,(function(n,t){return n+v[t]}));return l&&A.push(a),A.join(o)}(n,e,r,c,s,l):function(n,e,r,c,s,l){var d=c?a:u,h=3*o.length,v=t.formatNamesAndIdsForAnalytics(n,e,r,l),p=v.names,g=v.idStrings,m=i.reduce(g,(function(n,t){return n+t.length}),0);if(m+h+d.length>s)throw new Error("The analytics string size is too low to send the campaign, experiment, and variation IDs.");var _=s-m-h-d.length,w={};w.variation=Math.min(p.variation.length,Math.floor(_/3)),_-=w.variation,w.experiment=Math.min(p.experiment.length,Math.floor(_/2)),_-=w.experiment,w.layer=_;var y={};i.each(p,(function(n,t){y[t]=n.substring(0,w[t])}));var b=[];return f.isSingleExperimentPolicy(n.policy)||b.push(y.layer+g.layer),(b=b.concat([y.experiment+g.experiment,y.variation+g.variation,d])).join(o)}(n,e,r,c,s,l)}},2723:function(n,t,e){var i=e(9587);n.exports=function(n,t){n=function(n){var t=n.split("?");if(t[1]){var e=t[1].split("#"),r=e[0],a=e[1],u=r.split("&"),c=[];return i.each(u,(function(n){0!==n.indexOf(o)&&c.push(n)})),t[1]="",c.length>0&&(t[1]="?"+c.join("&")),a&&(t[1]+="#"+a),t.join("")}return n}(n);var e=t.value;switch(t.match){case"exact":return(n=c(n))===c(e);case"regex":try{return Boolean(n.match(e))}catch(r){}return!1;case"simple":return(n=u(n))===(e=u(e));case"substring":return n=c(n,!0),e=c(e,!0),-1!==n.indexOf(e);default:return!1}};var r=["www."],o="optimizely_",a=["https?://.*?.?optimizelyedit.(com|test)/","https?://.*.?optimizelypreview.(com|test)/","https?://(edit|preview)(-hrd|-devel)?.optimizely.(com|test)/","https?://.*?.?optimizelyedit(-hrd)?.appspot.com/","https?://"];function u(n){return c(function(n){var t=n.indexOf("?");return-1!==t&&(n=n.substring(0,t)),-1!==(t=n.indexOf("#"))&&(n=n.substring(0,t)),n}(n))}function c(n,t){n=(n=n.replace("/?","?")).toLowerCase().replace(/[/&?]+$/,"");var e=a.slice(0);t||(e=e.concat(r));for(var i=e.length,o=0;o-1&&(t.splice(e,1),this.emitChange())}else this.X[n.lifecycle]=[],this.emitChange()}}},7073:function(n,t,e){var i=e(7547),r=e(7537);n.exports={initialize:function(){this.X={name:r.NAME,version:r.VERSION},this.on(i.SET_CLIENT_NAME,this.In),this.on(i.SET_CLIENT_VERSION,this.An)},getClientName:function(){return this.X.name},getClientVersion:function(){return this.X.version},In:function(n){n&&(this.X.name=n),this.emitChange()},An:function(n){n&&(this.X.version=n),this.emitChange()}}},4131:function(n,t,e){var i=e(7547);n.exports={initialize:function(){this.X={currentDomain:null,defaultAgeSeconds:15552e3,autoRefresh:true},this.on(i.SET_COOKIE_DOMAIN,this.Tn),this.on(i.SET_COOKIE_AGE,this.Sn),this.on(i.SET_COOKIE_AUTO_REFRESH,this.kn)},getCurrentDomain:function(){return this.X.currentDomain},getDefaultAgeInSeconds:function(){return this.X.defaultAgeSeconds},getAutoRefresh:function(){return this.X.autoRefresh},Tn:function(n){this.X.currentDomain=n,this.emitChange()},Sn:function(n){this.X.defaultAgeSeconds=n,this.emitChange()},kn:function(n){this.X.autoRefresh=n,this.emitChange()}}},5843:function(n,t,e){var i=e(9587),r=e(7547),o=e(9338);n.exports={initialize:function(){this.X={},this.on(r.DATA_LOADED,this.hn)},hn:function(n){i.isEmpty(n.data.dimensions)||(i.each(n.data.dimensions,i.bind((function(n){o.deepFreeze(n),this.X[n.id]=n}),this)),this.emitChange())},getAll:function(){return o.safeReference(i.values(this.X))},getById:function(n){return o.safeReference(this.X[n])},getByApiName:function(n){return o.safeReference(i.find(i.values(this.X),{apiName:n}))}}},8718:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={disabled:!1,forceAudienceIds:[],forceVariationIds:[],alreadyInitialized:!1,mutationObserverAPISupported:!1,isEditor:!1,isPreview:!1,isLegacyPreview:!1,isSlave:!1,previewLayerIds:[],projectToken:null,shouldOptOut:!1,trackingDisabled:!1,isRunningInV2Editor:!1,isRunningInDesktopApp:!1,forceTracking:!1},this.on(r.LOAD_DIRECTIVE,this.Rn)},getAll:function(){return i.cloneDeep(this.X)},conflictInObservingChanges:function(){return!1},isDisabled:function(){return this.X.disabled},isEditor:function(){return this.X.isEditor},clientHasAlreadyInitialized:function(){return this.X.alreadyInitialized},getForceAudienceIds:function(){return this.X.forceAudienceIds},getForceVariationIds:function(){return this.X.forceVariationIds},getPreviewLayerIds:function(){return this.X.previewLayerIds},getProjectToken:function(){return this.X.projectToken},getForceTracking:function(){return this.X.forceTracking},shouldActivate:function(){return!this.X.isEditor&&!this.isDisabled()},shouldBootstrapDataForPreview:function(){return this.X.isPreview},shouldBootstrapDataForEditor:function(){return this.X.isEditor},shouldInitialize:function(){return!(this.shouldLoadPreview()||this.isDisabled()||this.getProjectToken())},shouldLoadPreview:function(){return!(this.X.isPreview||this.X.isLegacyPreview||!this.getProjectToken()||this.X.isEditor)},shouldBailForDesktopApp:function(){return!this.X.isEditor&&this.X.isRunningInDesktopApp},shouldLoadInnie:function(){return!this.X.isSlave&&!this.X.isEditor&&this.X.isRunningInV2Editor},shouldObserveChangesIndefinitely:function(){return!1},shouldObserveChangesUntilTimeout:function(){return!this.shouldObserveChangesIndefinitely()},shouldOptOut:function(){return this.X.shouldOptOut},shouldSendTrackingData:function(){return!this.X.trackingDisabled&&(!!this.X.forceTracking||!this.X.isPreview&&i.isEmpty(this.getForceVariationIds())&&i.isEmpty(this.getForceAudienceIds()))},isSlave:function(){return this.X.isSlave},isRunningInDesktopApp:function(){return this.X.isRunningInDesktopApp},isRunningInV2Editor:function(){return this.X.isRunningInV2Editor},Rn:function(n){i.extend(this.X,n),this.emitChange()}}},679:function(n,t,e){var i=e(9587),r=e(7547),o=e(9338);n.exports={initialize:function(){this.X={},this.on(r.DATA_LOADED,this.hn)},getAll:function(){return o.safeReference(i.values(this.X))},getEventsMap:function(){return o.safeReference(this.X)},get:function(n){return o.safeReference(this.X[n])},getByApiName:function(n){return o.safeReference(i.find(i.values(this.X),{apiName:n}))},getByPageId:function(n){return o.safeReference(i.filter(this.X,{pageId:n}))},hn:function(n){i.isEmpty(n.data.events)||(i.each(n.data.events,i.bind((function(n){n.pageId||(n.pageId=n.viewId),o.deepFreeze(n),this.X[n.id]=n}),this)),this.emitChange())}}},2350:function(n,t,e){var i=e(9587),r=e(7547);function o(n){var t=[];return n&&i.isObject(n)?(n.type&&t.push(n.type),t.push("|"),n.type&&n.name&&t.push(n.name),t.join("")):"|"}n.exports={initialize:function(){this.X={handlers:{}},this.on(r.ADD_EMITTER_HANDLER,this.Nn),this.on(r.REMOVE_EMITTER_HANDLER,this.Dn)},getHandlers:function(n,t){var e=[null,{type:n.type},{type:n.type,name:n.name}],r=[];return i.each(e,i.bind((function(n){var t=o(n),e=this.X.handlers[t];e&&(r=r.concat(e))}),this)),t&&(r=i.filter(r,(function(n){return!n.publicOnly}))),r},Nn:function(n){var t=o(n.filter);this.X.handlers[t]||(this.X.handlers[t]=[]),this.X.handlers[t].push({handler:n.handler,token:n.token,publicOnly:!!n.publicOnly,emitErrors:!!n.emitErrors}),this.emitChange()},Dn:function(n){var t=!1,e=n.token;i.forOwn(this.X.handlers,i.bind((function(n,r){var o=i.filter(n,(function(n){return n.token!==e}));o.length!==n.length&&(t=!0,this.X.handlers[r]=o)}),this)),t&&this.emitChange()}}},8554:function(n,t,e){var i=e(9587),r=e(7547),o=e(9338);n.exports={initialize:function(){this.X={holdback:0,isGlobalHoldback:null,listTargetingKeys:[],revision:null,projectId:null,accountId:null,namespace:null,activationId:null,activationTimestamp:null,dcpServiceId:null,dcpKeyfieldLocators:[],recommenderServices:[],anonymizeIP:null,projectJS:null,snippetId:null,plugins:[],domContentLoaded:!1,experimental:{},ga4UserId:null},this.on(r.DATA_LOADED,this.Cn),this.on(r.ACTIVATE,this.On),this.on(r.RECORD_GLOBAL_DECISION,this.xn),this.on(r.SET_DOMCONTENTLOADED,this.Pn),this.on(r.SET_GA4_USER_ID,this.Mn)},getRevision:function(){return this.X.revision},getGlobalHoldbackThreshold:function(){return this.X.holdback},getProjectId:function(){return this.X.projectId},getSnippetId:function(){return this.X.snippetId},getAccountId:function(){return this.X.accountId},getNamespace:function(){return this.X.namespace},getActivationId:function(){return this.X.activationId},getActivationTimestamp:function(){return this.X.activationTimestamp},getAnonymizeIP:function(){return this.X.anonymizeIP},isGlobalHoldback:function(){return!!this.X.isGlobalHoldback},getListTargetingKeys:function(){return this.X.listTargetingKeys.slice()},getDCPServiceId:function(){return this.X.dcpServiceId},getDCPKeyfieldLocators:function(){return this.X.dcpKeyfieldLocators},getRecommenderServices:function(){return this.X.recommenderServices},getProjectJS:function(){return this.X.projectJS},getPlugins:function(){return this.X.plugins},getExperimental:function(){return o.safeReference(this.X.experimental)},getGA4UserId:function(){return this.X.ga4UserId},domContentLoadedHasFired:function(){return this.X.domContentLoaded},On:function(n){this.X.activationId=n.activationId,this.X.activationTimestamp=n.activationTimestamp,this.X.isGlobalHoldback=null},xn:function(n){var t=n.isGlobalHoldback;if(null!==this.X.isGlobalHoldback&&this.X.isGlobalHoldback!==t)throw new Error("Attempted to change already set global holdback!");this.X.isGlobalHoldback=t,this.emitChange()},Mn:function(n){var t=n.ga4UserId;if(!t)throw new Error('Argument "payload.ga4UserId" is missing');this.X.ga4UserId=t,this.emitChange()},Cn:function(n){var t=i.pick(n.data,["holdback","accountId","projectId","snippetId","namespace","revision","listTargetingKeys","dcpServiceId","dcpKeyfieldLocators","recommenderServices","anonymizeIP","plugins","projectJS","experimental","ga4UserId"]);if(0!==i.keys(t).length){i.extend(this.X,{listTargetingKeys:[],dcpServiceId:null,dcpKeyfieldLocators:[]},t),this.emitChange()}},Pn:function(){this.X.domContentLoaded=!0,this.emitChange()}}},7277:function(n,t,e){var i=e(9587),r=e(7547),o=e(9338);n.exports={initialize:function(){this.X={},this.on(r.DATA_LOADED,this.hn)},hn:function(n){i.isEmpty(n.data.groups)||(i.each(n.data.groups,i.bind((function(n){o.deepFreeze(n),this.X[n.id]=n}),this)),this.emitChange())},getAll:function(){return o.safeReference(i.values(this.X))},getGroupsMap:function(){return o.safeReference(this.X)},get:function(n){return o.safeReference(this.X[n])}}},4070:function(n,t,e){var i=e(9587),r=e(7547),o=e(4465);n.exports={initialize:function(){this.X={originalPushState:null,originalReplaceState:null},this.on(r.ENSURE_ORIGINAL_PUSHSTATE,this.Ln),this.on(r.ENSURE_ORIGINAL_REPLACESTATE,this.Un)},getOriginalPushState:function(){return this.X.originalPushState},getOriginalReplaceState:function(){return this.X.originalReplaceState},Ln:function(){this.X.originalPushState||(this.X.originalPushState=i.bind(o.getGlobal("history").pushState,o.getGlobal("history")))},Un:function(){this.X.originalReplaceState||(this.X.originalReplaceState=i.bind(o.getGlobal("history").replaceState,o.getGlobal("history")))}}},4824:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={},this.on(r.DATA_LOADED,this.hn),this.on(r.SET_INTEGRATION_SETTINGS,this.Vn)},hn:function(n){i.isEmpty(n.data.integrationSettings)||(i.each(n.data.integrationSettings,i.bind((function(n){this.X[n.id]=n}),this)),this.emitChange())},Vn:function(n){var t=this.X[n.id];t?i.extend(t,n):this.X[n.id]=n},getAll:function(){return i.cloneDeep(i.values(this.X))},get:function(n){return i.cloneDeep(this.X[n])},getReference:function(n){return this.X[n]}}},8901:function(n,t,e){var i=e(9587),r=e(7547),o=e(1364),a="*";n.exports={initialize:function(){this.X={},this.on(r.LOAD_PERSISTED_LAYER_STATES,this.Fn),this.on(r.RECORD_LAYER_DECISION,this.zn),this.on(r.RECORD_LAYER_DECISION_EVENT_ID,this.jn)},getLayerState:function(n,t){if(this.X[n]){var e=this.X[n];if(i.keys(e).length>1&&!t)throw new Error("View Id must be specified when more than one layerState for layer.");return t?i.cloneDeep(i.find(e,{pageId:t})):i.cloneDeep(e["*"])}},getLayerStates:function(n){var t=[];for(var e in this.X)i.forEach(this.X[e],(function(e){(i.isUndefined(n)||e.namespace===n)&&t.push(i.cloneDeep(e))}));return t},getLayerStatesForAnalytics:function(){var n=[];for(var t in this.X)i.forEach(this.X[t],(function(t){n.push(i.pick(t,["layerId","decision","decisionEventId"]))}));return n},Fn:function(n){n.merge||(this.X={}),i.each(n.layerStates,i.bind((function(n){var t=n.layerId;n.pageId||(n.pageId=n.viewId);var e=n.pageId||a,r=this.X[t];if(i.isUndefined(r))this.X[t]={},this.X[t][e]=n;else{var o=r[e];(!o||n.decisionTimestamp>(o.decisionTimestamp||0))&&(this.X[t][e]=n)}}),this)),this.emitChange()},zn:function(n){var t={layerId:n.layerId,revision:n.revision,namespace:n.namespace,pageId:n.pageId,decisionTicket:n.decisionTicket,decision:n.decision,decisionActivationId:n.activationId,decisionTimestamp:n.timestamp,decisionEventId:null},e=this.X[n.layerId]||{};n.pageId?(delete e["*"],e[n.pageId]=t):(e={})["*"]=t,this.X[n.layerId]=e,this.emitChange()},jn:function(n){var t=n.layerId,e=n.pageId||a;this.X[t]?this.X[t][e]?(this.X[t][e].decisionEventId=n.decisionId,this.emitChange()):o.warn("Not recording decision event: Layer state not found for view",e):o.warn("Not recording decision event: Campaign not registered",t)}}},7071:function(n,t,e){var i=e(9587),r=e(7547),o=e(9338),a=e(1658);n.exports={initialize:function(){this.X={layers:{},experiments:{},variations:{}},this.on(r.DATA_LOADED,this.hn)},hn:function(n){if(!i.isEmpty(n.data.layers)){var t=this;i.each(n.data.layers,(function(n){i.each(n.experiments,(function(e){n.pageIds||(n.pageIds=n.viewIds),e.campaignName||a.isSingleExperimentPolicy(n.policy)?a.isSingleExperimentPolicy(n.policy)&&n.groupId&&(e.groupId=n.groupId):e.campaignName=n.name,i.each(e.variations,(function(n){i.each(n.actions,(function(n){n.pageId||(n.pageId=n.viewId)})),t.X.variations[n.id]=n})),t.X.experiments[e.id]=e})),o.deepFreeze(n),t.X.layers[n.id]=n})),this.emitChange()}},getAll:function(){return o.safeReference(i.values(this.X.layers))},getCampaignsMap:function(){return o.safeReference(this.X.layers)},getExperimentsMap:function(){return o.safeReference(this.X.experiments)},getVariationsMap:function(){return o.safeReference(this.X.variations)},getCount:function(){return i.keys(this.X.layers).length},getAllByPageIds:function(n){return o.safeReference(i.filter(this.X.layers,(function(t){return i.some(n,i.partial(i.includes,t.pageIds))})))},get:function(n){return o.safeReference(this.X.layers[n])},getLayerByExperimentId:function(n){var t=i.find(this.X.layers,(function(t){return i.find(t.experiments,{id:n})}));return o.safeReference(t)},getExperimentByVariationId:function(n){var t;return i.some(this.X.layers,(function(e){return i.some(e.experiments,(function(e){return i.find(e.variations,{id:n})&&(t=e),t})),t})),o.safeReference(t)}}},6700:function(n,t,e){var i=e(7547);n.exports={initialize:function(){this.X={logs:[]},this.on(i.LOG,this.Gn)},getLogs:function(){return this.X.logs},Gn:function(n){this.X.logs.push(n),this.emitChange()},Z:function(){return this.X.logs.slice()}}},7033:function(n,t,e){var i=e(7547),r=e(9338);n.exports={initialize:function(){this.X={data:null,hasTracked:null},this.on(i.LOAD_REDIRECT_DATA,this.Bn),this.on(i.REGISTER_TRACKED_REDIRECT_DATA,this.qn)},get:function(){return r.safeReference(this.X.data)},hasTracked:function(){return this.X.hasTracked},Bn:function(n){r.deepFreeze(n),this.X.data=n,this.X.hasTracked=!1,this.emitChange()},qn:function(){this.X.hasTracked=!0}}},5464:function(n,t,e){var i=e(9587),r=e(7547),o=e(2588);n.exports={initialize:function(){this.X={},this.on(r.SET_PENDING_EVENT,this.Hn),this.on(r.REMOVE_PENDING_EVENT,this.Yn),this.on(r.LOAD_PENDING_EVENTS,this.Kn)},getEvents:function(){return this.X},getEventsString:function(){return o.stringify(this.X)},Hn:function(n){i.keys(this.X).length>=1e3&&this.$n();var t=n.id,e=n.retryCount;this.X[t]&&this.X[t].retryCount===e||(this.X[t]={id:t,timeStamp:n.timeStamp,data:n.data,retryCount:e},this.emitChange())},Yn:function(n){delete this.X[n.id],this.emitChange()},Kn:function(n){this.X=n.events,this.$n(),this.emitChange()},$n:function(){for(var n=i.sortBy(this.X,"timeStamp"),t=0;t<=n.length-1e3;t++)delete this.X[n[t].id];this.emitChange()}}},7056:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={layerId:null},this.on(r.ANNOUNCE_PENDING_REDIRECT,this.Bn)},isExpectingRedirect:function(){return i.isString(this.X.layerId)},getLayerId:function(){return this.X.layerId},Bn:function(n){this.isExpectingRedirect()||(this.X.layerId=n.layerId,this.emitChange())}}},8864:function(n,t,e){var i=e(9587),r=e(7547),o=e(373);n.exports={initialize:function(){this.X={},this.X[o.PerformanceData.performance_marks]={},this.on(r.SET_PERFORMANCE_MARKS_DATA,this.Wn)},Wn:function(n){i.isUndefined(this.X[o.PerformanceData.performance_marks][n.name])&&(this.X[o.PerformanceData.performance_marks][n.name]=[]),this.X[o.PerformanceData.performance_marks][n.name].push(n.data),this.emitChange()},getMarks:function(){return i.mapValues(this.X[o.PerformanceData.performance_marks],(function(n){return i.map(n,(function(n){return[n.startTime,n.duration]}))}))},getDurationsFor:function(n){return i.reduce(n,i.bind((function(n,t){var e=this.X[o.PerformanceData.performance_marks][t];return e&&(n[t]=Math.round(i.reduce(e,(function(n,t){return n+t.duration}),0))),n}),this),{})}}},6095:function(n,t,e){var i=e(9587),r=e(7547),o=e(373),a=e(1364);n.exports={initialize:function(){this.X=i.mapValues(o.PluginTypes,(function(){return{}})),this.on(r.REGISTER_PLUGIN,this.Xn)},Xn:function(n){var t=n.type,e=n.name,i=n.plugin;if(!t||!e)throw new Error("Missing information needed to register plugins: "+t+":"+e);if(!this.X[t])throw new Error("Invalid plugin type specified: "+t);this.X[t][e]=i,a.debug("Plugin Store: Registering Plugin :",n)},getAllPlugins:function(n){if(!n)return this.X;if(this.X[n])return this.X[n];throw new Error("Invalid plugin type: "+n)},getPlugin:function(n,t){if(!t||!n)throw new Error("Missing plugin parameters");return this.getAllPlugins(n)[t]||null}}},3559:function(n,t,e){var i=e(9587),r=e(7547),o=e(7098);n.exports={initialize:function(){this.X={},this.on(r.SET_VISITOR_ATTRIBUTE_PENDING,this.Jn)},getPendingAttributeValue:function(n){return n=i.isArray(n)?n.concat("pending"):[n,"pending"],o.getFieldValue(this.X,n)},Jn:function(n){o.setFieldValue(this.X,n.key,{pending:n.pending}),this.emitChange()}}},6944:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={inRumSample:!1,id:null,src:null,RumHost:null,data:{extras:{}},apis:{},DOMObservation:{},featuresNeeded:{}},this.on(r.SET_RUM_DATA,this.Qn),this.on(r.RECORD_API_USAGE,this.Zn),this.on(r.INITIALIZE_CHANGE_METRICS,this.nt),this.on(r.RECORD_ACTIVATION_TYPE_USAGE,this.tt),this.on(r.RECORD_AUDIENCE_USAGE,this.et),this.on(r.RECORD_CHANGE_MACROTASK_RATE,this.it),this.on(r.RECORD_CHANGE_OVERHEATED,this.rt),this.on(r.RECORD_CHANGE_TYPE_USAGE,this.ot),this.on(r.RECORD_DOM_OBSERVATION_OCCURENCE,this.ut),this.on(r.RECORD_INTEGRATION_USAGE,this.ct),this.on(r.RECORD_LAYER_FEATURE_USAGE,this.st),this.on(r.RECORD_LAYER_POLICY_USAGE,this.ft),this.on(r.RECORD_VIEW_FEATURE_USAGE,this.dt),this.on(r.RECORD_VIEWS_INITIALLY_ACTIVATED_COUNT,this.ht),this.on(r.RECORD_VISITOR_ID_LOCATOR_USAGE,this.vt),this.on(r.RECORD_VISITOR_ID_ERROR,this._t),this.on(r.RECORD_STICKY_BUCKETING_FEATURE,this.wt)},Qn:function(n){i.merge(this.X,n),this.emitChange()},Zn:function(n){this.X.apis[n.methodName]||(this.X.apis[n.methodName]=0),this.X.apis[n.methodName]++,this.emitChange()},nt:function(){i.isUndefined(this.X.data.extras.changeMacrotaskRate)&&(this.X.data.extras.changeMacrotaskRate=0),i.isUndefined(this.X.data.extras.numOverheatedChanges)&&(this.X.data.extras.numOverheatedChanges=0)},it:function(n){i.isUndefined(this.X.data.extras.changeMacrotaskRate)&&(this.X.data.extras.changeMacrotaskRate=0),n.changeMacrotaskRate>this.X.data.extras.changeMacrotaskRate&&(this.X.data.extras.changeMacrotaskRate=n.changeMacrotaskRate),this.emitChange()},rt:function(){i.isUndefined(this.X.data.extras.numOverheatedChanges)&&(this.X.data.extras.numOverheatedChanges=0),this.X.data.extras.numOverheatedChanges++,this.emitChange()},ut:function(n){this.X.DOMObservation[n.counterName]||(this.X.DOMObservation[n.counterName]=0),this.X.DOMObservation[n.counterName]++,this.emitChange()},yt:function(n,t,e){i.isUndefined(this.X.featuresNeeded[n])&&(this.X.featuresNeeded[n]={});var r=this.X.featuresNeeded[n];i.each(t,(function(n){r[n]||(r[n]={}),r[n][e]||(r[n][e]=!0)}))},ct:function(n){this.yt("integrations",n.integrations,n.layerId)},ot:function(n){this.yt("changeTypes",n.changeTypes,n.layerId)},tt:function(n){this.yt("activationTypes",[n.activationType],n.entityId),this.emitChange()},dt:function(n){this.yt("viewFeatures",n.featuresUsed,n.entityId),this.emitChange()},st:function(n){this.yt("layerFeatures",[n.feature],n.entityId),this.emitChange()},ft:function(n){this.yt("policy",[n.policy],n.layerId),this.emitChange()},et:function(n){this.yt("audiences",n.audienceTypes,n.layerId),this.emitChange()},ht:function(n){this.X.data.extras.viewsInitiallyActivatedCount=n.viewsInitiallyActivatedCount,this.emitChange()},vt:function(n){this.yt("visitorIdLocatorType",[n.visitorIdLocatorType],n.entityId),this.emitChange()},_t:function(n){this.X.data.extras.errorCustomVisitorId=n.isError,this.emitChange()},wt:function(n){this.yt("stickyBucketing",[n.feature],n.id)},getSampleRum:function(){return this.X.inRumSample},getRumId:function(){return this.X.id},getRumHost:function(){return this.X.RumHost},getApiData:function(){return this.X.apis},getDOMObservationData:function(){return this.X.DOMObservation},getRumData:function(){return i.cloneDeep(this.X.data)},getScriptSrc:function(){return this.X.src},getFeaturesNeededData:function(){var n=this.X.featuresNeeded,t={};return i.forOwn(n,(function(n,e){var r=i.keys(n);i.isEmpty(r)||(t[e]={}),i.forEach(r,(function(r){t[e][r]=i.keys(n[r]).length}))})),t}}},3083:function(n,t,e){var i=e(7547);n.exports={initialize:function(){this.X={initialized:!1,natives:{}},this.on(i.SANDBOXED_FUNCTIONS_ADDED,this.bt)},bt:function(n){if(!n.sandboxedFunctions)throw new Error("No sandboxedFunctions found in payload");this.X.natives=n.sandboxedFunctions,this.X.initialized=!0,this.emitChange()},getAll:function(){return this.X.natives},get:function(n){if(!n)throw new Error("Missing name parameter");return this.X.natives[n]||null},isInitialized:function(){return this.X.initialized}}},4127:function(n,t,e){var i=e(9587),r=e(7547),o=e(1319),a=e(7435);n.exports={initialize:function(){this.X={lastSessionTimestamp:0,sessionId:null},this.on(r.REFRESH_SESSION,this.Et),this.on(r.LOAD_SESSION_STATE,this.It)},getState:function(){return i.cloneDeep(this.X)},getSessionId:function(){return this.X.sessionId},It:function(n){this.X.sessionId=n.sessionId,this.X.lastSessionTimestamp=n.lastSessionTimestamp,this.emitChange()},Et:function(){var n=o.now(),t=this.X.lastSessionTimestamp;(!this.X.sessionId||n-t>18e5)&&(this.X.sessionId=a.generate()),this.X.lastSessionTimestamp=n,this.emitChange()}}},374:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.At(),this.on(r.FINALIZE_BATCH_SNAPSHOT,this.Tt),this.on(r.REGISTER_PREVIOUS_BATCH,this.St),this.on(r.REGISTER_TRACKER_VISITOR,this.kt),this.on(r.REGISTER_TRACKER_EVENT,this.Rt),this.on(r.REGISTER_TRACKER_DECISION,this.Nt),this.on(r.RESET_TRACKER_EVENTS,this.Dt),this.on(r.RESET_TRACKER_STORE,this.At),this.on(r.RESET_TRACKER_PREVIOUS_BATCHES,this.Ct),this.on(r.SET_TRACKER_POLLING,this.Ot),this.on(r.SET_TRACKER_BATCHING,this.xt),this.on(r.SET_TRACKER_SEND_EVENTS,this.Pt),this.on(r.SET_TRACKER_PERSISTABLE_STATE,this.Mt),this.on(r.SET_TRACKER_DIRTY,this.Lt),this.on(r.UPDATE_TRACKER_VISITOR_ATTRIBUTES,this.Ut)},getPersistableState:function(){return this.X.isDirty?this.hasEventsToSend()||this.hasPreviousBatchesToSend()?{data:this.X.data,decisions:this.X.decisions,decisionEvents:this.X.decisionEvents,previousBatches:this.X.previousBatches}:{}:null},Mt:function(n){i.isEmpty(this.X.data)||i.isEmpty(n.data)||(this.Tt(),this.X.previousBatches.push(this.getEventBatch())),this.X.data=n.data||{},this.X.decisions=n.decisions||[],this.X.decisionEvents=n.decisionEvents||[],i.isEmpty(this.X.previousBatches)||i.isEmpty(n.previousBatches)?this.X.previousBatches=n.previousBatches||[]:this.X.previousBatches=this.X.previousBatches.concat(n.previousBatches),this.emitChange()},Lt:function(n){this.X.isDirty=n,this.emitChange()},Rt:function(n){var t=this.Vt();(i.isEmpty(t.snapshots)||!i.isEmpty(this.X.decisionEvents))&&this.Ft(),this.zt().events.push(n.event),this.X.decisions=n.decisions,this.Lt(!0)},Nt:function(n){this.X.decisionEvents.push(n.decisionEvent),this.X.decisions=n.decisions,this.Lt(!0)},kt:function(n){i.isEmpty(this.X.data)?this.X.data=n.data:this.Tt(),this.X.data.visitors.push(n.visitor),this.X.decisions=n.decisions,this.X.decisionEvents=[],this.Lt(!0)},St:function(n){this.X.previousBatches.push(n),this.Lt(!0)},At:function(){this.X={polling:!1,shouldBatch:!0,data:{},decisions:[],decisionEvents:[],canSend:!1,isDirty:!1,previousBatches:[]},this.emitChange()},Dt:function(){var n=this.Vt();this.X.data.visitors=[n],n.snapshots=[],this.Lt(!0)},Ct:function(){this.X.previousBatches=[],this.Lt(!0)},Ot:function(n){this.X.polling=n,this.emitChange()},xt:function(n){this.X.shouldBatch=n,this.emitChange()},Pt:function(n){this.X.canSend=n,this.emitChange()},getEventBatch:function(){return i.cloneDeep(this.X.data)},getPreviousBatches:function(){return i.cloneDeep(this.X.previousBatches)},jt:function(){return this.X.decisionEvents.slice()},Gt:function(){this.X.decisionEvents=[]},Bt:function(){return this.X.decisions.slice()},isPolling:function(){return this.X.polling},shouldBatch:function(){return this.X.shouldBatch},zt:function(){return i.last(this.Vt().snapshots)},Vt:function(){return i.last(this.X.data.visitors)},Ft:function(){var n=this.jt();this.Vt().snapshots.push({decisions:this.Bt(),events:n}),this.Gt(),this.Lt(!0)},Tt:function(){this.X.decisionEvents.length>0&&this.Ft()},hasEventsToSend:function(){if(!i.isEmpty(this.X.decisionEvents))return!0;if(!i.isEmpty(this.X.data)&&i.some(this.X.data.visitors||[],(function(n){return n.snapshots.length>0})))return!0;return!1},hasPreviousBatchesToSend:function(){return!i.isEmpty(this.X.previousBatches)},canSend:function(){return this.X.canSend},Ut:function(n){var t=this.Vt();t&&(t.attributes=n.attributes)}}},8051:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={},this.on(r.SET_UA_DATA,this.hn)},hn:function(n){i.isEmpty(this.X)&&(this.X=n.data)},get:function(){return i.cloneDeep(this.X)}}},5966:function(n,t,e){var i=e(9587),r=e(7547),o=e(1364),a={globalTags:{},viewStates:{},shouldBatch:!1};n.exports={initialize:function(){this.X=i.cloneDeep(a),this.on(r.REGISTER_VIEWS,this.qt),this.on(r.SET_VIEW_ACTIVE_STATE,this.Ht),this.on(r.UPDATE_PARSED_VIEW_METADATA,this.Yt),this.on(r.UPDATE_USER_SUPPLIED_METADATA,this.Kt),this.on(r.TRACK_VIEW_ACTIVATED_EVENT,this.$t),this.on(r.SET_GLOBAL_TAGS,this.Wt),this.on(r.RESET_VIEW_STATES,this.Xt),this.on(r.SET_VIEW_BATCHING,this.xt)},getAll:function(){var n={};for(var t in this.X.viewStates)n[t]=this.getViewState(t);return n},shouldBatch:function(){return this.X.shouldBatch},getViewState:function(n){var t=i.cloneDeep(this.X.viewStates[n]),e=this.X.globalTags;return t.metadata=i.extend({},t.parsedMetadata,e,t.userSuppliedMetadata),t},getActiveViewTags:function(){var n=this.getActiveViewStates(),t=i.map(n,(function(n){return n.metadata})),e=[{}].concat(t);return i.extend.apply(i,e)},getActivationEventId:function(n){return this.X.viewStates[n]?this.X.viewStates[n].activationEventId:null},getActiveViewStates:function(){return i.reduce(this.X.viewStates,i.bind((function(n,t,e){return this.isViewActive(e)&&n.push(this.getViewState(e)),n}),this),[])},isViewActive:function(n){var t=this.X.viewStates[n];return t||o.warn("No Page registered with id",n),!!t.isActive},getGlobalTags:function(){return i.cloneDeep(this.X.globalTags)},Xt:function(){this.X.viewStates={},this.emitChange()},qt:function(n){i.each(n.views,i.bind((function(n){var t=n.id;this.X.viewStates[t]={id:t,isActive:i.isBoolean(n.isActive)?n.isActive:null,activatedTimestamp:null,activationEventId:null,parsedMetadata:{},userSuppliedMetadata:{}}}),this)),this.emitChange()},Ht:function(n){var t=n.view.id;if(!this.X.viewStates[t])throw new Error("No view exists with id "+t);this.X.viewStates[t].isActive=n.isActive,n.isActive?this.X.viewStates[t].activatedTimestamp=n.timestamp:(this.X.viewStates[t].parsedMetadata={},this.X.viewStates[t].userSuppliedMetadata={}),this.emitChange()},Yt:function(n){var t=n.pageId;if(!this.X.viewStates[t])throw new Error("No view exists with id "+t);i.assign(this.X.viewStates[t].parsedMetadata,n.metadata),this.emitChange()},Kt:function(n){var t=n.pageId;if(!this.X.viewStates[t])throw new Error("No view exists with id "+t);i.assign(this.X.viewStates[t].userSuppliedMetadata,n.metadata),this.emitChange()},$t:function(n){var t=n.pageId;this.X.viewStates[t]&&(this.X.viewStates[t].activationEventId=n.eventData.eventId,this.emitChange())},Wt:function(n){i.extend(this.X.globalTags,n),this.emitChange()},xt:function(n){this.X.shouldBatch=n,this.emitChange()}}},2358:function(n,t,e){var i=e(9587),r=e(7547),o=e(9338);n.exports={initialize:function(){this.X={views:{},apiNamesToViews:{}},this.on(r.DATA_LOADED,this.hn)},getAll:function(){return o.safeReference(i.values(this.X.views))},getPagesMap:function(){return o.safeReference(this.X.views)},get:function(n){return o.safeReference(this.X.views[n])},getByApiName:function(n){return o.safeReference(this.X.apiNamesToViews[n])},apiNameToId:function(n){var t=this.X.apiNamesToViews[n];if(t)return t.id},idToApiName:function(n){var t=this.X.views[n];if(t)return t.apiName},getNumberOfPages:function(){return i.keys(this.X.views).length},getAllViewsForActivationType:function(n){return i.filter(this.X.views,{activationType:n})},hn:function(n){i.isEmpty(n.data.views)||(i.each(n.data.views,i.bind((function(n){o.deepFreeze(n),this.X.views[n.id]=n,this.X.apiNamesToViews[n.apiName]=n}),this)),this.emitChange())}}},5750:function(n,t,e){var i=e(9587),r=e(7547),o=e(7098);n.exports={initialize:function(){this.X={profile:{},metadata:{},visitorId:null},this.on(r.SET_VISITOR_ID_VIA_API,this.Jt),this.on(r.SET_VISITOR_ATTRIBUTES,this.Qt),this.on(r.LOAD_EXISTING_VISITOR_PROFILE,this.Zt)},getVisitorProfile:function(){return this.X.profile},getVisitorProfileMetadata:function(){return this.X.metadata},getAttribute:function(n){var t=this.X.profile;return i.cloneDeep(o.getFieldValue(t,n))},getAttributeMetadata:function(n){return i.cloneDeep(this.X.metadata[n])},getVisitorIdFromAPI:function(){return this.X.visitorId},Zt:function(n){this.X.profile=n.profile,this.X.metadata=n.metadata,this.emitChange()},Qt:function(n){i.each(n.attributes,i.bind((function(n){var t=n.key;o.setFieldValue(this.X.profile,t,n.value),n.metadata&&i.forOwn(n.metadata,i.bind((function(n,e){o.setFieldValue(this.X.metadata,t.concat(e),n)}),this))}),this)),this.emitChange()},Jt:function(n){this.X.visitorId=n,this.emitChange()}}},6179:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={},this.on(r.DATA_LOADED,this.ne)},getCustomBehavioralAttributes:function(){return i.filter(this.X,(function(n){return!!n.rule_json}))},getVisitorAttribute:function(n){var t=i.values(this.X);if(n.datasourceId&&(t=i.filter(t,{dcp_datasource_id:String(n.datasourceId)})),n.attributeName&&n.attributeId)throw new Error("Must not specify both attribute name and attribute ID");if(n.attributeId){var e=this.X[n.attributeId];if(!e)throw new Error("Unrecognized attribute ID: "+n.attributeId);return e}if(n.attributeName){var r=i.filter(t,{name:n.attributeName});if(!r.length)throw new Error("Unrecognized attribute name: "+n.attributeName);if(r.length>1)throw new Error("Too many attributes with name: "+n.attributeName);return r[0]}throw new Error("Must specify attribute name or attribute ID")},ne:function(n){i.isEmpty(n.data.visitorAttributes)||(i.each(n.data.visitorAttributes,i.bind((function(n){this.X[n.id]=n}),this)),this.emitChange())}}},5513:function(n,t,e){var i=e(9587),r=e(7547),o=e(2588);n.exports={initialize:function(){this.X={variationIdMap:{},preferredLayerMap:{}},this.on(r.UPDATE_VARIATION_ID_MAP,this.te),this.on(r.MERGE_VARIATION_ID_MAP,this.ee),this.on(r.UPDATE_PREFERRED_LAYER_MAP,this.re),this.on(r.MERGE_PREFERRED_LAYER_MAP,this.oe)},getVariationIdMap:function(){return i.cloneDeep(this.X.variationIdMap)},getVariationIdMapString:function(){return o.stringify(this.X.variationIdMap)},te:function(n){var t=this.X.variationIdMap[n.layerId]||{};t[n.experimentId]!==n.variationId&&(t[n.experimentId]=n.variationId,this.X.variationIdMap[n.layerId]=t,this.emitChange())},ee:function(n){var t=this.getVariationIdMap(),e=n.variationIdMap;i.each(t||{},(function(n,t){e[t]?i.assign(e[t],n):e[t]=n})),this.X.variationIdMap=e,this.emitChange()},getPreferredLayerMap:function(){return i.cloneDeep(this.X.preferredLayerMap)},getPreferredLayerMapString:function(){return o.stringify(this.X.preferredLayerMap)},getPreferredLayerId:function(n){return this.X.preferredLayerMap[n]},re:function(n){this.X.preferredLayerMap[n.groupId]!==n.layerId&&(this.X.preferredLayerMap[n.groupId]=n.layerId,this.emitChange())},oe:function(n){var t=this.getPreferredLayerMap(),e=n.preferredLayerMap;i.assign(e,t),this.X.preferredLayerMap=e,this.emitChange()}}},7901:function(n,t,e){e(9587);var i=e(7547);e(9598).j;n.exports={initialize:function(){this.X={events:[],foreignEvents:{},foreignEventQueues:{}},this.on(i.SET_VISITOR_EVENTS,this.hn),this.on(i.SET_FOREIGN_VISITOR_EVENTS,this.ae),this.on(i.SET_FOREIGN_VISITOR_EVENT_QUEUE,this.ue)},getEvents:function(){return this.X.events},getForeignEvents:function(){return this.X.foreignEvents},getForeignEventQueues:function(){return this.X.foreignEventQueues},hn:function(n){this.X.events=n,this.emitChange()},ae:function(n){this.X.foreignEvents[n.key]=n.value},ue:function(n){this.X.foreignEventQueues[n.key]=n.value}}},1248:function(n,t,e){var i=e(7547);n.exports={initialize:function(){this.X={baseMap:{},eventQueue:[],lastEvent:null,initialized:!1,cleared:!1},this.on(i.UPDATE_BEHAVIOR_STORE,this.ce)},getBaseMap:function(){return this.X.baseMap},getEventQueue:function(){return this.X.eventQueue},getLastEvent:function(){return this.X.lastEvent},getCleared:function(){return this.X.cleared},getInitialized:function(){return this.X.initialized},ce:function(n){this.X[n.key]=n.value}}},7985:function(n,t,e){var i=e(9587),r=e(7547);n.exports={initialize:function(){this.X={randomId:null,visitorIdLocator:null},this.on(r.SET_VISITOR_ID,this.hn),this.on(r.DATA_LOADED,this.se)},getBucketingId:function(){return this.getRandomId()},getRandomId:function(){return this.X.randomId},getVisitorIdLocator:function(){return this.X.visitorIdLocator},hn:function(n){i.extend(this.X,n),this.emitChange()},se:function(n){i.isEmpty(n.data.visitorIdLocator)||(this.X.visitorIdLocator=n.data.visitorIdLocator,this.emitChange())}}},6996:function(n,t,e){var i=e(9587),r=e(1364),o=e(7547);n.exports={initialize:function(){this.X={frames:[],defaultFrame:null,messages:[],subscribers:[],canonicalOrigins:null,disabled:!1},this.on(o.XDOMAIN_SET_DEFAULT_FRAME,this.fe),this.on(o.XDOMAIN_ADD_FRAME,this.le),this.on(o.XDOMAIN_SET_MESSAGE,this.de),this.on(o.XDOMAIN_ADD_SUBSCRIBER,this.he),this.on(o.XDOMAIN_SET_CANONICAL_ORIGINS,this.ve),this.on(o.XDOMAIN_SET_DISABLED,this.pe)},getMessages:function(){return i.cloneDeep(this.X.messages)},getOffset:function(){return 0===this.X.messages.length?0:this.X.messages[0].data.id},getNextMessageId:function(){return this.X.messages.length+this.getOffset()},getMessageById:function(n){return this.X.messages[n-this.getOffset()]},getSubscribers:function(){return this.X.subscribers},getFrames:function(){return this.X.frames},getNextFrameId:function(){return this.X.frames.length},getDefaultFrame:function(){return this.X.defaultFrame},getCanonicalOrigins:function(){return i.cloneDeep(this.X.canonicalOrigins)},isDisabled:function(){return this.X.disabled},fe:function(n){this.X.defaultFrame=n},le:function(n){this.X.frames.push(n)},de:function(n){for(this.X.messages[n.messageId-this.getOffset()]=n.message;this.X.messages.length>1e3;){var t=this.X.messages.shift();r.debug("XDomainStorage: Cleared old message: "+t.data.id)}},he:function(n){this.X.subscribers.push(n.subscriber)},ve:function(n){this.X.canonicalOrigins=n.canonicalOrigins},pe:function(n){this.X.disabled=n.disabled}}},3835:function(n,t){t.locatorType={CSS_SELECTOR:"css_selector",JAVASCRIPT:"javascript",URL_REGEX:"url_regex"},t.valueType={STRING:"string",NUMBER:"number",CURRENCY:"currency"},t.nodeNames={INPUT:"INPUT",SELECT:"SELECT"}},4647:function(n,t,e){var i=e(6451).U;t.Error=i("TagError")},957:function(n,t,e){var i=e(373).PluginTypes,r=e(2339).get("stores/plugins");t.getTagValue=function(n){var e=r.getPlugin(i.viewTagLocators,n.locatorType);if(!e)throw new t.Error("No locator registered for tag locatorType: "+n.locatorType);return e(n)},t.enums=e(3835),t.Error=e(4647).Error},1056:function(n,t,e){var i=e(7547),r=e(2141),o=e(4222).Promise,a=e(2339).get("stores/async_request");t.makeAsyncRequest=function(n,t){var e,u,c=a.getPromise(n);if(c)return c;var s=new o((function(n,t){e=n,u=t}));return r.dispatch(i.REGISTER_ASYNC_DEFERRED,{source:n,promise:s,resolver:e,rejecter:u}),t&&t(),s},t.resolveRequest=function(n,t){r.dispatch(i.RESOLVE_DEFERRED,{source:n,resolveWith:t})},t.rejectRequest=function(n,t){r.dispatch(i.REJECT_DEFERRED,{source:n,rejectWith:t})}},1440:function(n,t,e){var i=e(5661),r=e(4465);t.getLanguage=function(){return r.getNavigatorLanguage()},t.getQueryParams=i.getQueryParams,t.getQueryParamValue=i.getQueryParamValue,t.getUrl=function(){return r.getHref()}},441:function(n,t,e){var i=e(9587),r=e(6451).U,o=e(1319),a=e(1357),u=e(4465),c=e(7547),s=e(2339),f=e(2141),l=s.get("stores/cookie_options"),d=t.SetError=r("CookieSetError"),h=t.MismatchError=r("CookieMismatchError");t.getAll=function(n){var e,r,o,u,c;i.isUndefined(n)&&(n=!0),e=a.getCookieString().split(/\s*;\s*/);var s={};for(o=0;o0&&void 0===s[c=t.safeDecodeURIComponent(r.substring(0,u))]){var f=r.substring(u+1);n&&(f=t.safeDecodeURIComponent(f)),s[c]=f}return s},t.safeDecodeURIComponent=function(n){try{return decodeURIComponent(n)}catch(t){return n}},t.get=function(n,e){return t.getAll(e)[n]},t.set=function(n,e,r,s){r=i.extend({encodeValue:!0},r),!1!==s&&(s=!0);var g=[];if(i.isUndefined(r.domain)){var m=l.getCurrentDomain();m||(m=function(n,e){!1!==e&&(e=!0);for(var r,o,a=n.hostname.split("."),u=[],s=null,l=a.length-1;l>=0;l--)if(u.unshift(a[l]),r=u.join("."),!i.includes(v,r)){o={domain:e?"."+r:r};try{t.set(p,Math.random().toString(),o),t.remove(p,o),s=o.domain;break}catch(d){}}return f.dispatch(c.SET_COOKIE_DOMAIN,s),s}(u.getLocation(),!0)),r.domain=m}if(r.domain&&g.push("domain="+r.domain),i.isUndefined(r.path)&&(r.path="/"),r.path&&g.push("path="+r.path),i.isUndefined(r.expires)){var _=i.isUndefined(r.maxAge)?l.getDefaultAgeInSeconds():r.maxAge;r.expires=new Date(o.now()+1e3*_)}if(i.isUndefined(r.expires)||g.push("expires="+r.expires.toUTCString()),r.secure&&g.push("secure"),a.setCookie(n+"="+(r.encodeValue?encodeURIComponent(e):e)+";"+g.join(";")),s){var w=r.encodeValue,y=t.get(n,w);if(y!==e){if(!y)throw new d('Failed to set cookie "'+n+'"');throw new h('Expected "'+e+'" for "'+n+'", got "'+y+'"')}}},t.remove=function(n,e){for(var r=u.getLocation().hostname.split(".");r.length>0;)t.set(n,null,i.extend({},e,{domain:"."+r.join("."),expires:new Date(0)}),!1),r.shift()};var v=["optimizely.test"],p="optimizelyDomainTestCookie"},6451:function(n,t,e){var i=e(2347),r=i("InternalError");t.G=r,t.U=function(n){return i(n,r)}},2506:function(n,t,e){var i=e(9587),r=e(4222).Promise;n.exports=function(){var n,t,e=new r((function(e,i){n=e,t=i}));return e.resolve=function(){return n.apply(null,i.toArray(arguments)),e},e.reject=function(){return t.apply(null,i.toArray(arguments)),e},e}},9338:function(n,t,e){var i=e(9587);t.deepFreeze=function(n){},t.safeReference=function(n){return i.cloneDeep(n)}},7098:function(n,t,e){var i=e(9587);t.getFieldValue=function(n,t){i.isArray(t)||(t=[t]);for(var e=n,r=0;r=n},s.prototype.matchesLogMessage=function(n,t){var e=this.logMatcher;if(!this.logMatcher)return!0;if(this.logGroup)return"GROUPSTART"===n?this.logGroup++:"GROUPEND"===n&&this.logGroup--,!0;var r=i.some(t,(function(n){if(!i.isString(n))try{n=c.stringify(n)}catch(t){}return i.isString(n)&&i.includes(n,e)}));return r&&"GROUPSTART"===n&&this.logGroup++,r},s.prototype.storeLog=function(n,t){var e={logLevel:n,logMessage:t};u.dispatch(r.LOG,e)},s.prototype.flush=function(){var n=e(2339).get("stores/log");this.logGroup=0;var t=n.getLogs();i.each(t,i.bind((function(n){this._e(n.logLevel,n.logMessage,!0)}),this))},s.prototype._e=function(n,t,e){var r,o=n;if(console)switch(n){case"GROUPSTART":r=console.groupCollapsed,o=a.LogLevel.DEBUG;break;case"GROUPEND":r=console.groupEnd,o=a.LogLevel.DEBUG;break;case a.LogLevel.ERROR:r=console.error;break;case a.LogLevel.WARN:r=console.warn;break;case a.LogLevel.DEBUG:r=console.debug;break;default:r=console.log}try{e||this.ge()&&!this.shouldLog(o)||(i.isArray(t)&&i.isString(t[0])&&(t=this.we(t)),this.storeLog(n,t)),r&&this.shouldLog(o)&&this.matchesLogMessage(n,t)&&r.apply(console,t)}catch(u){console&&(console.error?console.error(u):console.log(u))}},s.prototype.debug=function(){this._e(a.LogLevel.DEBUG,[].slice.call(arguments))},s.prototype.log=function(){this._e(a.LogLevel.INFO,[].slice.call(arguments))},s.prototype.logAlways=function(){var n=this.we([].slice.call(arguments));console&&console.log&&console.log.apply&&console.log.apply(console,n),this.storeLog(a.LogLevel.INFO,n)},s.prototype.warn=function(){this._e(a.LogLevel.WARN,[].slice.call(arguments))},s.prototype.error=function(n){var t=[].slice.call(arguments);1===t.length&&n.stack?(this._e(a.LogLevel.ERROR,[this.ye(),n]),this._e(a.LogLevel.INFO,[n.stack])):this._e(a.LogLevel.ERROR,t)},s.prototype.groupCollapsed=function(){this._e("GROUPSTART",[].slice.call(arguments))},s.prototype.groupEnd=function(){this._e("GROUPEND",[].slice.call(arguments))},s.prototype.we=function(n){var t=this.ye().toString();return t.length<6&&(t=(" "+t).slice(-6)),[t+"| Optly / "+n[0]].concat(n.slice(1))},s.prototype.ye=function(){return this.timebase?o.now()-this.timebase:0},s.prototype.me=function(n){return n&&("TRUE"===(n=n.toUpperCase())&&(n="INFO"),"FALSE"===n&&(n="OFF"),"ALL"===n&&(n="DEBUG"),!i.isUndefined(a.LogLevel[n]))?a.LogLevel[n]:null},n.exports=new s},2781:function(n,t,e){n.exports=e(503)},1658:function(n,t){t.isSingleExperimentPolicy=function(n){return"single_experiment"===n||"multivariate"===n}},9805:function(n,t,e){var i=e(9587),r=e(4222).Promise,o=e(4465);t.pollFor=function(n,t,e){var a,u;return i.isFunction(e)?u=e:(a=e||100,u=function(){return--a<-1}),t=t||50,new r((function(e,i){!function r(){var a;if(!u()){try{var c=n();if(c)return e(c)}catch(s){a=s}return o.setTimeout(r,t)}i(a||new Error("Poll timed out"))}()}))}},8121:function(n,t,e){var i=e(9587),r=e(4222).Promise;t.firstToResolve=function(n){return new r((function(t){i.each(n,(function(n){r.resolve(n).then(t,(function(){}))}))}))}},5661:function(n,t,e){var i=e(9587),r=e(4465);t.getQueryParams=function(){var n=r.getLocationSearch()||"";if(0===n.indexOf("?")&&(n=n.substring(1)),0===n.length)return[];for(var t=n.split("&"),e=[],i=0;i0&&(o=u[0]),u.length>1&&(a=u[1]),e.push([o,a])}return e},t.getQueryParamValue=function(n){for(var e=t.getQueryParams(),i=0;i<\/script>"),a.close();var l=i.mapValues(c.SandboxedFunctions,(function(n){return e[n]}));s.dispatch(r.SANDBOXED_FUNCTIONS_ADDED,{sandboxedFunctions:l}),t.parentNode.removeChild(t)}catch(d){f.warn("Unable to create a sandbox: ",d)}}},1317:function(n,t,e){var i=e(1357),r=e(1364),o=e(6388);t.addScriptAsync=function(n,t){var e=i.querySelector("head"),o=i.createElement("script");o.type="text/javascript",o.async=!0,o.src=n,t&&(o.onload=t),e.insertBefore(o,e.firstChild),r.debug("Asynchronously requesting "+n)},t.addScriptSync=function(n,e){try{var a="optimizely_synchronous_script_"+Math.floor(1e5*Math.random());if(-1!==n.indexOf('"'))return void r.error("Blocked attempt to load unsafe script: "+n);i.write('