!function(win,undefined){var doc=win.document,attachListener=win.addEventListener?'addEventListener':'attachEvent',detachListener=win.addEventListener?'removeEventListener':'detachEvent',message=win.addEventListener?'message':'onmessage',objProto=Object.prototype,objCreate=Object.create,slice=Array.prototype.slice,scripts=doc.getElementsByTagName('script')||[],neededLibraries=[],canUsePostMessage=!!win.postMessage,loaderFinished=!1,now=+new Date,catchStr='catch',Globals={currentVersion:'3.0.7',slice:slice,iFrame:null,Libraries:{status:{},queue:[],states:{pending:1,fulfilled:2}},Promise:null,Promises:{ids:[],objects:{},states:{pending:undefined,fulfilled:1,rejected:2},triggerResolver:function(e,t){e.__resolver=t},subscribe:function(e,t,a,s){var e=e._subscribers,n=e.length;e[n]=t,e[n+Globals.Promises.states.fulfilled]=a,e[n+Globals.Promises.states.rejected]=s}},Errors:{},Core:{},Events:{triggered:[],bound:{}},config:{key:null,tenantId:null,namespace:'$A1',secure:null,host:null,domain:null,scheme:'a1webtag'},_config:{protocol:null,path:'',version:null,dataHost:'api6.agilone.com',dataVersion:'v2',contentHost:'content.agilone.com',contentVersion:'v2'},logs:{logs:[],timers:[],put:function(t,a,e){var s,n,o=this,r=+new Date,i=o.logs[0]?r-o.logs[0].created_at:0;function l(e){e&&(n=o.timers[e]?r-o.timers[e]:(o.timers[e]=r,0)),o.logs.push({created_at:r,data:t,main:i,id:e,offset:n,level:a})}if(a=a||3,getType(e)===TYPES.ar)for(s=e.length;s--;)l(e[s]);else l(e)}},tagTargets:null},TYPES,nullStr='[Object Null]',undefStr='[Object Undefined]',hop='hasOwnProperty',hiddenField='h',cookieKey='a1ashgd',cookieValue,scriptSrc,s,originalObject,tokenTO;function getType(e){return null===e?nullStr:e===undefined?undefStr:objProto.toString.call(e)}function typeErr(e){throw new TypeError(e)}function keys(e){var t,a=[];if(getType(e.keys)===TYPES.fu)return e.keys();for(t in e)!0===e[hop](t)&&a.push(t);return a}function map(e,t){var a,s;if(getType(e.map)===TYPES.fu)return e.map(t);for(s=e.length,a=new Array(s);s--;)a[s]=t.call(e[s],s,e)}function setCookie(){var e,t=Array(33).join((Math.random().toString(36)+'00000000000000000').slice(2,18)).slice(0,32),a=new Date;return a.setTime(a.getTime()+15768e7),Globals.config.domain?doc.cookie=cookieKey+'='+t+';expires='+a.toGMTString()+';path=/;domain='+Globals.config.domain:(e=window.location.hostname.match(/^(?:https?:\/\/)?(?:www[0-9]*\.)?(.*)$/)[1],doc.cookie=cookieKey+'='+t+';expires='+a.toGMTString()+';path=/;domain=.'+e),t}function getCookie(){var e,t,a=doc.cookie.split(';'),s=0;if(cookieValue)return cookieValue;for(t=cookieKey+'=';s<a.length;s++){for(e=a[s];' '===e.charAt(0);)e=e.substring(1);if(0===e.indexOf(t))return cookieValue=e.substring(t.length,e.length)}return cookieValue=setCookie()}function loader(){var e;function t(e){e.origin!==Globals._config.protocol+Globals.config.host&&e.origin!==Globals._config.protocol+Globals._config.dataHost||processData(e.data)}Globals.logs.put('loader Start');try{Globals.iFrame=doc.createElement('iframe'),Globals.iFrame.style.cssText='position:absolute;width:1px;height:1px;left:-9999px;',Globals.iFrame.id=Globals.config.namespace+'_'+now,Globals.iFrame.name='',Globals.iFrame.src='javascript:false',Globals.iFrame.title='a1-loader',Globals.iFrame.tabIndex=-1,Globals.iFrame.ariaHidden='true',doc.body.appendChild(Globals.iFrame)}catch(e){Globals.logs.put('loader Paused - waiting for document.body to exist and be ready');var a=this,s=slice.call(arguments);return win.setTimeout(function(){loader.apply(a,s),a=s=null},50)}Globals.tagTargets=win.document.querySelectorAll('[data-a1-webtag], [a1-webtag]'),0<Globals.tagTargets.length&&neededLibraries.push('template'),win[attachListener](message,t,!1),win[Globals.config.namespace]._detach=function(){win[detachListener](message,t)},e=[Globals._config.protocol,Globals.config.host,Globals._config.path,'a1_webtag.html?version=',Globals._config.version,'&namespace=',Globals.config.namespace],Globals.iFrame.src=e.join(''),Globals.logs.put('loader End',2)}function processData(message){try{message=JSON.parse(message)}catch(e){console.log(message);try{win.console.error('AgilOne WebTag - Error in processData while parsing message: '+e)}catch(err){}}if(getType(message)===TYPES.ob)switch(message.type){case'library':Globals.logs.put('Library Code Received: '+message.id,null,message.id);try{eval(message.data)}catch(e){try{win.console.error('AgilOne WebTag - Error in processData for '+message.id+': '+e)}catch(err){}}Globals.Core.processLibrary?(Globals.Core.processLibrary(message.id),win[Globals.config.namespace].trigger({type:'libraryLoaded',target:message.id})):(Globals.logs.put('Add library to process queue: '+message.id,2,message.id),Globals.Libraries.queue.push(message.id)),Globals.logs.put('Load Request Library End: '+message.id,2,message.id);break;case'function':Globals.logs.put('Code Received: '+message.id,null,message.id);try{eval(message.data)}catch(e){try{win.console.error('AgilOne WebTag - Error in processData for '+message.id+': '+e)}catch(err){}}break;case'data':getType(Globals.Core.dataHandler)===TYPES.fu?Globals.Core.dataHandler(message):(console.log(JSON.stringify(message)),win.console.error('AgilOne WebTag - Data loaded before Core library: '+message.id));break;default:win.console.error('AgilOne WebTag - Unrecognized message type: '+message.type)}}function noop(){}function Promise(e){var t=this;if(t._id=Globals.Promises.ids.length,t._subscribers=[],t._state=Globals.Promises.states.pending,t.__requiresLib={},e!==noop){if(getType(e)!==TYPES.fu&&typeErr('You must pass a resolver function as the first argument to the promise constructor'),!(t instanceof Promise))return new Promise(e);Globals.Promises.objects[t._id]=t,Globals.Promises.ids.push(t._id),Globals.Promises.triggerResolver(t,e)}}function requestLibrary(e){Globals.Libraries.status[e]||(Globals.logs.put('Load Request Library Start: '+e,3,e),Globals.Libraries.status[e]=Globals.Libraries.states.pending,Globals.iFrame.contentWindow.postMessage(JSON.stringify({type:'library',data:e}),'*'))}function loadLibrary(e,t){var a,s;if(a=(e=getType(e)===TYPES.ar?e:[e]).length)for(;a--;)(s=e[a])&&(t&&!Globals.Promises.objects[t._id].__requiresLib[s]&&(Globals.Promises.objects[t._id].__requiresLib[s]=Globals.Libraries.status[s]||Globals.Libraries.states.pending),Globals.Libraries.status[s]===undefined)&&(loaderFinished?requestLibrary(s):neededLibraries.push(s));return t||!0}function sendConfig(e,t){Globals.iFrame.contentWindow.postMessage(JSON.stringify({type:'config',data:{key:e,value:t}}),'*')}function trigger(e){var t=getType(e);return t===TYPES.st&&(e={type:e.toLowerCase()},t=TYPES.ob),t===TYPES.ob&&getType(e.type)===TYPES.st?(e._ts=e._ts||new Date,Globals.Events.triggered.push(e)):typeErr('"event" must be a string or object with a "type" string'),this}function bind(e,t){return getType(e)===TYPES.st&&getType(t)===TYPES.fu?(e=e.toLowerCase(),Globals.Events.bound[e]=Globals.Events.bound[e]||[],Globals.Events.bound[e].push({ts:new Date,callback:t})):typeErr('"type" must be a string and "callback" must be a function'),this}function unbind(e,t){var a,s=0;if(getType(e)===TYPES.st)if(e=e.toLowerCase(),1===arguments.length)Globals.Events.bound[e]=[];else if(getType(t)===TYPES.fu){if(getType(Globals.Events.bound[e])===TYPES.ar&&0<Globals.Events.bound[e].length){for(a=Globals.Events.bound[e].length;s<a;s++)Globals.Events.bound[e][s].callback===t&&(Globals.Events.bound[e][s]=undefined);0===Globals.Events.bound[e].length&&delete Globals.Events.bound[e]}}else typeErr('"callback" must be a function');else typeErr('"type" must be a string');return this}function modelExtend(e,t,a){var s,n,o;if(t.prototype=objCreate(e.prototype),t.prototype.constructor=t,getType(a)===TYPES.ob)for(s in a)!0===a[hop](s)&&(t.prototype[s]=a[s]);for(o in t.prototype.__keys={},n=t.prototype.__fields)n[hop](o)&&n[o].k&&n[o].k!==hiddenField&&(t.prototype.__keys[n[o].k]=o)}function BaseModel(){this.__data={}}function setParents(t,a){var s=this;return 0<s.__parents.length&&map(s.__parents,function(e){getType(e.set)===TYPES.fu&&e.set(s.__fields[a].k,t)}),t}function Customer(e){var t,a=this;if(!(a instanceof Customer))return new Customer(e);switch(a.__data={},a.__parents=[],getType(e)){case TYPES.st:case TYPES.nu:a.set('id',e);break;case TYPES.ob:for(t in e)!0===e[hop](t)&&a.set(t,e[t]);break;case TYPES.un:case TYPES.nl:break;default:typeErr('First argument of '+Globals.config.namespace+'.Customer() must be a string, number, object, null, or undefined')}}function Target(e){var t,a=this;if(!(a instanceof Target))return new Target(e);switch(a.__data={},a.__parents=[],getType(e)){case TYPES.st:case TYPES.nu:a.set('productId',e);break;case TYPES.ob:for(t in e)!0===e[hop](t)&&a.set(t,e[t]);break;case TYPES.un:case TYPES.nl:break;default:typeErr('First argument of '+Globals.config.namespace+'.Target() must be a string, number, object, null, or undefined')}}function Transaction(e){var t,a=this;if(!(a instanceof Transaction))return new Transaction(e);switch(a.__data={type:'Purchase'},a.__parents=[],getType(e)){case TYPES.st:case TYPES.nu:a.set('id',e);break;case TYPES.ob:for(t in e)!0===e[hop](t)&&a.set(t,e[t]);break;case TYPES.un:case TYPES.nl:break;default:typeErr('First argument of '+Globals.config.namespace+'.Transaction() must be a string, number, object, null, or undefined')}}function Event(e){if(!(this instanceof Event))return new Event(e);switch(this.__data={URL:doc.location.href,Referer:doc.referrer||undefined,Cookie:getCookie()},getType(e)){case TYPES.st:this.set('type',e);break;case TYPES.ob:for(var t in e)!0===e[hop](t)&&this.set(t,e[t]);break;case TYPES.un:case TYPES.nl:break;default:typeErr('First argument of '+Globals.config.namespace+'.Event() must be an object, null, or undefined')}}function addCustomerToEvent(e){var t,a,s,n=this,o='"customer" must be either a Customer instance, object, string, number, null, or undefined';switch(n.__data.customer&&n.__data.customer.__parents.splice(n.__data.customer.__parents.indexOf(n),1),getType(e)){case TYPES.ob:e instanceof Customer?t=e:e instanceof BaseModel&&typeErr(o);case TYPES.st:case TYPES.nu:a=t||new Customer(e),getType(s=a.get('id'))!==TYPES.un&&(getType(n.__data.targets)===TYPES.ar&&0<n.__data.targets.length&&map(n.__data.targets,function(e){e.set('SourceCustomerNumber',s)}),n.__data.transaction instanceof Transaction)&&n.__data.transaction.set('SourceCustomerNumber',s),t=a;break;case TYPES.un:case TYPES.nl:return;default:typeErr(o)}return t.__parents.push(n),t}function addTargetsToEvent(e){var t,a=this;function s(t){return t.get('type')||t.set('type',a.__data.type),t.get('Subtype')||t.set('Subtype',a.__data.Subtype),t.get('URL')||t.set('URL',a.__data.URL),t.get('Referer')||t.set('Referer',a.__data.Referer),t.get('Cookie')||t.set('Cookie',a.__data.Cookie),t.get('Variables')||getType(a.__data.variables)!==TYPES.ob||t.set('Variables',a.__data.variables),a.__data.customer instanceof Customer&&t.set('SourceCustomerNumber',a.__data.customer.get('id')),a.__data.transaction instanceof Transaction&&(t.set('SourceTransactionNumber',a.__data.transaction.get('id')),Object.keys(a.__data.transaction.__data).forEach(function(e){'Type'===e||Transaction.prototype.__fields[e]||t.set(e,a.__data.transaction.get(e))})),a.__data.SourceProductCategoryNumber&&getType(a.__data.SourceProductCategoryNumber)===TYPES.st&&t.set('SourceProductCategoryNumber',a.__data.SourceProductCategoryNumber),-1===t.__parents.indexOf(a)&&t.__parents.push(a),t}switch(getType(e)){case TYPES.ar:return t=[],map(e,function(e){e=addTargetsToEvent.call(a,e);getType(e)===TYPES.ar&&e[0]instanceof Target&&t.push(e[0])}),t;case TYPES.ob:if(e instanceof Target)return[s(e)];if(e instanceof BaseModel)break;return[s(new Target(e))];case TYPES.st:case TYPES.nu:return[s(new Target(e))];case TYPES.un:case TYPES.nl:return}typeErr('"targets" must be one or more (as an array) of either a Target instance, object, string, number, null, or undefined')}function addTransactionToEvent(e){var t,a,s,n=this,o='"transaction" must be either a Transaction instance, object, string, number, null, or undefined';switch(n.__data.transaction&&n.__data.transaction.__parents.splice(n.__data.transaction.__parents.indexOf(n),1),getType(e)){case TYPES.ob:e instanceof Transaction?t=e:e instanceof BaseModel&&typeErr(o);case TYPES.st:case TYPES.nu:(a=t||new Transaction(e)).get('Subtype')||a.set('Subtype',n.__data.Subtype),n.__data.customer instanceof Customer&&a.set('SourceCustomerNumber',n.__data.customer.get('id')),getType(n.__data.targets)===TYPES.ar&&0<n.__data.targets.length&&(s=a.get('id'),map(n.__data.targets,function(e){e.set('SourceTransactionNumber',s)})),-1===a.__parents.indexOf(n)&&a.__parents.push(n),t=a;break;case TYPES.un:case TYPES.nl:return;default:typeErr(o)}return t.__parents.push(n),t}function modifyEventTargetsField(t,a){return getType(this.__data.targets)===TYPES.ar&&0<this.__data.targets.length&&map(this.__data.targets,function(e){e.set(a,t)}),t}function modifyEventChildrenField(t,a){var e=this;return getType(e.__data.targets)===TYPES.ar&&0<e.__data.targets.length&&map(e.__data.targets,function(e){e.set(a,t)}),e.__data.transaction instanceof Transaction&&e.__data.transaction.set(a,t),t}for(TYPES={st:getType(''),nu:getType(0),ob:getType({}),ar:getType([]),fu:getType(noop),un:undefStr,nl:nullStr,dt:getType(new Date)},Globals.logs.put('Library Load Start: Base',null,'base'),Promise.prototype={constructor:Promise,then:function(e,t){var a=new this.constructor(noop);return Globals.Promises.subscribe(this,a,e,t),a},always:function(e){return this.then(e,e)}},Promise.prototype[catchStr]=function(e){return this.then(null,e)},Globals.Promise=Promise,Globals.Libraries.load=loadLibrary,BaseModel.prototype={constructor:BaseModel,__fields:{},toString:function(){return JSON.stringify(this.__data)},toJSON:function(){var e,t,a,s,n,o=this,r={};for(e in o.__data)if(o.__data[hop](e))switch(getType(t=o.__data[e])){case TYPES.fu:case TYPES.un:continue;case TYPES.ar:for(n=t.length,a=[],s=0;s<n;s++)getType(t[s].toJSON)===TYPES.fu?a.push(t[s].toJSON()):a.push(t[s]);o.__fields[e]&&o.__fields[e].k?o.__fields[e].k!==hiddenField&&(r[o.__fields[e].k]=a):r[e]=a;break;default:-1===[TYPES.un,TYPES.nl].indexOf(getType(t))&&getType(t.toJSON)===TYPES.fu&&(t=t.toJSON()),o.__fields[e]&&o.__fields[e].k?o.__fields[e].k!==hiddenField&&(r[o.__fields[e].k]=t):r[e]=t}return r},get:function(e){var t=this;return getType(e)===TYPES.st?t.__data[t.__keys&&t.__keys[e]?t.__keys[e]:e]:t.__data},set:function(e,t){var a=this;if(getType(e)!==TYPES.st&&typeErr('"key" must be a string'),null===t)return a.remove(e);if(e=a.__keys&&a.__keys[e]?a.__keys[e]:e,a.__fields[e]){if(a.__fields[e].t){if(a.__fields[e].t===TYPES.dt)return a.__data[e]=new Date(t),isNaN(a.__data[e].getTime())&&(delete a.__data[e],typeErr('"value" must be a valid date for the "'+e+'" field')),a;a.__fields[e].h||a.__fields[e].t===getType(t)||typeErr('Invalid "value" provided for the "'+e+'" field - expects an '+a.__fields[e].t)}if(a.__fields[e].h)return a.__fields[e].t&&a.__fields[e].t===TYPES.ar&&getType(t)!==TYPES.ar?a.__data[e]=[a.__fields[e].h.call(a,t,e)]:a.__data[e]=a.__fields[e].h.call(a,t,e),a}return a.__data[e]=t,a},add:function(e,t){var a,s,n=this;TYPES.st;if(getType(e)!==TYPES.st&&typeErr('"key" must be a string'),e=n.__keys[e]||e,s=n.__data[e],n.__fields[e]&&n.__fields[e].t===TYPES.ar||getType(s)===TYPES.ar)n.__data[e]=s||[],getType(t=n.__fields[e]&&n.__fields[e].h?n.__fields[e].h.call(n,t,e):t)===TYPES.ar?n.__data[e]=s.concat(t):n.__data[e].push(t);else if(n.__fields[e]&&n.__fields[e].t===TYPES.ob||getType(s)===TYPES.ob)if(getType(t)===TYPES.ob)if(n.__fields[e]&&n.__fields[e].h)n.__data[e]=n.__fields[e].h.call(n,t,e);else for(a in n.__data[e]=s||{},t)!0===t[hop](a)&&(n.__data[e][a]=t[a]);else typeErr('"value" must be an object for key "'+e+'"');else n.set(e,t);return n},remove:function(e,t){var a,s,n,o=this;switch(getType(e)!==TYPES.st&&typeErr('"key" must be a string'),e=o.__keys[e]||e,n=o.__data[e],getType(t)){case TYPES.un:o.__data[e]=a;break;case TYPES.nl:case TYPES.st:if(o.__fields[e]&&o.__fields[e].t===TYPES.ar||getType(n)===TYPES.ar){if(n){for(s=n.length;s--;)n[s]===t&&(o.__data[e]=n.splice(s,1));0===n.length&&(o.__data[e]=a)}}else o.__fields[e]&&o.__fields[e].t===TYPES.ob||getType(n)===TYPES.ob?n&&(delete o.__data[e][t],0===keys(n).length)&&(o.__data[e]=a):delete o.__data[e];break;default:typeErr('"value" must be a string, null, or undefined')}return o}},modelExtend(BaseModel,Customer,{__fields:{id:{k:'SourceCustomerNumber',h:setParents},custom:{t:TYPES.ob,k:'Custom'},preferences:{t:TYPES.ob,k:'Preferences'}}}),modelExtend(BaseModel,Target,{__fields:{productId:{k:'SourceProductNumber'},messageId:{k:'SourceMessageNumber'},listId:{k:'SourceListNumber'},brandId:{k:'BrandId'},reviewId:{k:'SourceReviewNumber'},transactionItemId:{k:'SourceTransactionItemNumber'},transactionId:{k:'SourceTransactionNumber'},type:{k:'Type'},Subtype:{k:'Subtype'},quantity:{k:'Quantity'},shipDate:{t:TYPES.dt,k:'ShipDate'},saleRevenue:{k:'SaleRevenue'},discount:{k:'Discount'},shippingRevenue:{k:'ShippingRevenue'},invoiceDate:{t:TYPES.dt,k:'InvoiceDate'},organizationId:{k:'SourceOrganizationNumber'},variables:{t:TYPES.ob,k:'Variables'},SourceProductCategoryNumber:{k:'SourceProductCategoryNumber'}},toJSON:function(){var e=BaseModel.prototype.toJSON.apply(this,arguments);return getType(e.Variables)===TYPES.ob&&(e.Variables=JSON.stringify(e.Variables)),e}}),modelExtend(BaseModel,Transaction,{__fields:{id:{k:'SourceTransactionNumber',h:setParents},organizationId:{k:'SourceOrganizationNumber'},Subtype:{k:hiddenField,h:setParents},type:{k:hiddenField,h:setParents},invoiceDate:{t:TYPES.dt,k:'TransactionTimeStamp'},total:{k:'Total'},discount:{k:'Discount'},tax:{k:'Tax'}}}),modelExtend(BaseModel,Event,{__fields:{type:{k:hiddenField,h:modifyEventTargetsField},URL:{k:hiddenField,h:modifyEventTargetsField},Referer:{k:hiddenField,h:modifyEventTargetsField},Cookie:{k:hiddenField,h:modifyEventTargetsField},Subtype:{k:hiddenField,h:modifyEventTargetsField},customer:{k:hiddenField,h:addCustomerToEvent},SourceCustomerNumber:{k:hiddenField,h:modifyEventChildrenField},SourceProductCategoryNumber:{k:hiddenField,h:modifyEventChildrenField},SourceTransactionNumber:{k:hiddenField,h:modifyEventTargetsField},transaction:{k:hiddenField,h:addTransactionToEvent},targets:{k:'events',h:addTargetsToEvent},time:{t:TYPES.dt,k:'EventTimeStamp'},location:{t:TYPES.ob,k:'GeoEncoding'},variables:{t:TYPES.ob,k:hiddenField,h:modifyEventTargetsField}},toJSON:function(){var e=this,t=BaseModel.prototype.toJSON.apply(e,arguments);return getType(t.Variables)===TYPES.ob&&(t.Variables=JSON.stringify(t.Variables)),e.__data.customer&&(t.customers=[e.__data.customer.toJSON.apply(e.__data.customer,arguments)]),e.__data.transaction?(t.transactions=[e.__data.transaction.toJSON.apply(e.__data.transaction,arguments)],e.__data.targets&&0<e.__data.targets.length&&(t.transactionitems=t.events,map(t.transactionitems,function(e){delete e.URL,delete e.Referer,delete e.Cookie})),t.events=[e.__data.transaction.toJSON.apply(addTargetsToEvent.call(e,{})[0],arguments)]):!e.__data.type||e.__data.targets&&0!==e.__data.targets.length||(t.events=[addTargetsToEvent.call(e,{})[0].toJSON()]),t},send:function(){return win[Globals.config.namespace](this.toJSON())}}),s=scripts.length;s--;)if(scripts[s]&&scripts[s].src&&scripts[s].src.match(/\/a1\.js\?|\/a1\.js$/)){scriptSrc=scripts[s].src;break}getType(objCreate)!==TYPES.fu&&(objCreate=(()=>{function t(){}return function(e){t.prototype=e;e=new t;return t.prototype=null,e}})()),Globals.config.secure='https:'===scriptSrc.split('/')[0],Globals.config.host=scriptSrc.split('/')[2],Globals._config.version=scriptSrc.match(/\/v([\d])\//),Globals._config.version=null===Globals._config.version?Globals.currentVersion:Globals._config.version[1],getType(win.$A1Config)===TYPES.ob?map(keys(win.$A1Config),function(e){'host'===e?Globals._config.dataHost=win.$A1Config[e]:'contentHost'===e?Globals._config.contentHost=win.$A1Config[e]:Globals.config[e]=win.$A1Config[e]}):typeErr('$A1Config must be an object included in the window before loading the a1.js file'),Globals._config.dataHost=Globals._config.dataHost.replace(/^(https?:|)\/\//,''),Globals._config.contentHost=Globals._config.contentHost.replace(/^(https?:|)\/\//,''),Globals._config.version=isNaN(Globals.config.version)||null===Globals.config.version?Globals._config.version:parseInt(Globals.config.version),Globals._config.path=Globals.config.path||'/v'+Globals._config.version+'/',Globals._config.protocol=Globals.config.secure?'https://':'http://',Globals._config.dataPath=Globals._config.protocol+Globals._config.dataHost+'/'+Globals._config.dataVersion+'/'+Globals.config.tenantId+'/dw/tracker?scheme='+Globals.config.scheme+'&accessKey='+Globals.config.key,Globals.logs.put('A1 WebTag configured with the following options: ',3,'base'),Globals.logs.put(Globals.config,3,'base'),originalObject=win[Globals.config.namespace],originalObject&&getType(originalObject._detach)===getType(getType)&&originalObject._detach(),win[Globals.config.namespace]=function(a){return new Promise(function(e,t){getType(a)!==TYPES.ob?t():win[Globals.config.namespace].trigger({type:'track',data:a,cbs:{success:e,failure:t}})})},win[Globals.config.namespace].all=function(){var a=slice.call(arguments,0);return new Promise(function(e,t){Globals.Promises.all(a,e,t)})},win[Globals.config.namespace].trigger=trigger,win[Globals.config.namespace].bind=bind,win[Globals.config.namespace].unbind=unbind,win[Globals.config.namespace].one=function(e,t){function a(){t.apply(win[Globals.config.namespace],arguments),win[Globals.config.namespace].unbind(e,a)}if(getType(t)===TYPES.fu)return win[Globals.config.namespace].bind(e,a);typeErr('"callback" must be a function')},win[Globals.config.namespace].showLogs=function(){return Globals},win[Globals.config.namespace].BaseModel=BaseModel,win[Globals.config.namespace].Customer=Customer,win[Globals.config.namespace].Target=Target,win[Globals.config.namespace].Transaction=Transaction,win[Globals.config.namespace].Event=Event,canUsePostMessage&&loader(),Globals.logs.put('Library Load End: Base',4,'base')}(window);
//# sourceMappingURL=a1.js.map
