module.exports = "(function(e,t,n){var r=n(5894),i=n(280).v,o=n(5522),a=n(4810),c=n(4727),u=n(8131),l=n(7152),d=\"lotame\",f=i(\"LotameError\"),s=__LOTAME_USE_LIGHTNING_TAG__,g=__LOTAME_FALLBACK__;function _(e){if(e.hasOwnProperty(\"getAudiences\"))return e.getAudiences}function m(e){var t=__LOTAME_AUDIENCE_EXTRACTION_URL__+\"/c=\"+e+\"/pe=y/callback=%cb%\";return o.fetchData(\"lotame\",t,\"optimizely_lotame\").then((function(e){var t=e.Profile.Audiences.Audience||[],n=e.Profile.Audiences.ThirdPartyAudience||[],i=[].concat(t,n);return{audiences:r.map(i,(function(e){return e.id}))}}))}var h={provider:{isAsync:!0,isLazy:!1,isSticky:!1,getter:[\"stores/integration_settings\",function(e){var t;try{t=e.get(d).client_id}catch(e){return c.reject(new Error(\"Lotame client_id missing from integration settings\"))}return s?function(e){return u.pollFor(r.partial(l.getGlobal,\"lotame_\"+e),50,20).then((function(e){if(!e)throw new f(\"Lotame object not found in browser\");if(e.config&&!e.config.audienceLocalStorage)throw new f(\"Lotame config needs to include audienceLocalStorage param https://my.lotame.com/t/g9hxvnw/lt-js-detailed-reference-guide#audiencelocalstorage-parameter\");return u.pollFor(r.partial(_,e),50,20).then((function(e){return{audiences:e()}}))}))}(t).catch((function(e){if(g)return a.warn('Lotame Lighting Tag failed with error \"'+e+'\", falling back to audience extraction.'),m(t);throw e})):m(t)}]},matcher:n(3584),vendor:d};e.exports=function(e){e.registerAudiencePlugin(h)}})";