var clearbitsq = window.clearbit || []; (function(f){var g;if(typeof window!=="undefined"){g=window}else if(typeof self!=="undefined"){g=self}g.clearbit=f()})(function(){var define,module,exports;return function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o",ret);return ret;function integration(name){return!!(includes(name,list)||name.toLowerCase()==="all"||includes(name.toLowerCase(),lower))}}},{"@ndhoule/defaults":28,"@ndhoule/each":30,"@ndhoule/includes":34,"@ndhoule/map":36,"component-type":76,debug:15}],10:[function(require,module,exports){"use strict";var canonical=require("@segment/canonical");var includes=require("@ndhoule/includes");var url=require("component-url");function pageDefaults(){return{path:canonicalPath(),referrer:document.referrer,search:searchPath(),title:document.title,url:canonicalUrl(location.search)}}function canonicalPath(){var canon=canonical();if(!canon)return window.location.pathname;var parsed=url.parse(canon);return parsed.pathname}function canonicalUrl(search){var canon=canonical();if(canon)return includes("?",canon)?canon:canon+search;var url=window.location.href;var i=url.indexOf("#");return i===-1?url:url.slice(0,i)}function searchPath(){var url=window.location.href;var u=url.indexOf("?");return u===-1?"":url.slice(u,-1)}module.exports=pageDefaults},{"@ndhoule/includes":34,"@segment/canonical":41,"component-url":77}],11:[function(require,module,exports){"use strict";var bindAll=require("bind-all");var defaults=require("@ndhoule/defaults");var store=require("@segment/store");function Store(options){this.options(options)}Store.prototype.options=function(options){if(arguments.length===0)return this._options;options=options||{};defaults(options,{enabled:true});this.enabled=options.enabled&&store.enabled;this._options=options};Store.prototype.set=function(key,value){if(!this.enabled)return false;return store.set(key,value)};Store.prototype.get=function(key){if(!this.enabled)return null;return store.get(key)};Store.prototype.remove=function(key){if(!this.enabled)return false;return store.remove(key)};module.exports=bindAll(new Store);module.exports.Store=Store},{"@ndhoule/defaults":28,"@segment/store":60,"bind-all":63}],12:[function(require,module,exports){"use strict";var Entity=require("./entity");var bindAll=require("bind-all");var cookie=require("./cookie");var debug=require("debug")("analytics:user");var inherit=require("inherits");var rawCookie=require("component-cookie");var uuid=require("uuid");User.defaults={persist:true,cookie:{key:"cb_user_id",oldKey:"cb_user"},localStorage:{key:"cb_user_traits"}};function User(options){this.defaults=User.defaults;this.debug=debug;Entity.call(this,options)}inherit(User,Entity);User.prototype.id=function(id){var prev=this._getId();var ret=Entity.prototype.id.apply(this,arguments);if(prev==null)return ret;if(prev!=id&&id)this.anonymousId(null);return ret};User.prototype.anonymousId=function(anonymousId){var store=this.storage();if(arguments.length){store.set("cb_anonymous_id",anonymousId);return this}anonymousId=store.get("cb_anonymous_id");if(anonymousId){return anonymousId}anonymousId=rawCookie("_cb");if(anonymousId){anonymousId=anonymousId.split("----")[0];store.set("cb_anonymous_id",anonymousId);store.remove("_cb");return anonymousId}anonymousId=uuid.v4();store.set("cb_anonymous_id",anonymousId);return store.get("cb_anonymous_id")};User.prototype.logout=function(){Entity.prototype.logout.call(this);this.anonymousId(null)};User.prototype.load=function(){if(this._loadOldCookie())return;Entity.prototype.load.call(this)};User.prototype._loadOldCookie=function(){var user=cookie.get(this._options.cookie.oldKey);if(!user)return false;this.id(user.id);this.traits(user.traits);cookie.remove(this._options.cookie.oldKey);return true};module.exports=bindAll(new User);module.exports.User=User},{"./cookie":4,"./entity":5,"bind-all":63,"component-cookie":66,debug:15,inherits:82,uuid:117}],13:[function(require,module,exports){var trim=require("trim");var type=require("type");var pattern=/(\w+)\[(\d+)\]/;var encode=function(str){try{return encodeURIComponent(str)}catch(e){return str}};var decode=function(str){try{return decodeURIComponent(str.replace(/\+/g," "))}catch(e){return str}};var sanitizeObjKey=function(str){if(str&&["__proto__","constructor","prototype"].indexOf(str.toLowerCase())>-1){return str.toUpperCase()}return str};exports.parse=function(str){if("string"!=typeof str)return{};str=trim(str);if(""==str)return{};if("?"==str.charAt(0))str=str.slice(1);var obj={};var pairs=str.split("&");for(var i=0;i=hour)return(ms/hour).toFixed(1)+"h";if(ms>=min)return(ms/min).toFixed(1)+"m";if(ms>=sec)return(ms/sec|0)+"s";return ms+"ms"};debug.enabled=function(name){for(var i=0,len=debug.skips.length;i",version:"0.1.0",description:"The hassle-free way to integrate analytics into any web application.",keywords:["analytics","clearbit.js","clearbit","clearbit.com"],main:"lib/index.js",scripts:{test:"make test"},repository:{type:"git",url:"https://github.com/clearbit/clearbit.js-core"},license:"SEE LICENSE IN LICENSE",bugs:{url:"https://github.com/clearbit/clearbit.js-core/issues"},homepage:"https://github.com/clearbit/clearbit.js-core#readme",dependencies:{"@ndhoule/after":"^1.0.0","@ndhoule/clone":"^1.0.0","@ndhoule/defaults":"^2.0.1","@ndhoule/each":"^2.0.1","@ndhoule/extend":"^2.0.0","@ndhoule/foldl":"^2.0.1","@ndhoule/includes":"^2.0.1","@ndhoule/keys":"^2.0.0","@ndhoule/map":"^2.0.1","@ndhoule/pick":"^2.0.0","@segment/canonical":"^1.0.0","@segment/is-meta":"^1.0.0","@segment/isodate":"^1.0.2","@segment/isodate-traverse":"^1.0.1","@segment/prevent-default":"^1.0.0","@segment/store":"^1.3.20","@segment/top-domain":"^3.0.0","bind-all":"^1.0.0","component-cookie":"^1.1.2","component-emitter":"^1.2.1","component-event":"^0.1.4","component-querystring":"git+https://github.com/clearbit/querystring.git","component-type":"^1.2.1","component-url":"^0.2.1",debug:"^0.7.4",inherits:"^2.0.1",install:"^0.7.3",is:"^3.1.0",json3:"^3.3.2","new-date":"^1.0.0","next-tick":"^0.2.2","segmentio-facade":"^3.0.2",uuid:"^2.0.2"},devDependencies:{"@segment/analytics.js-integration":"^3.2.0","@segment/eslint-config":"^3.1.1",browserify:"13.0.0","compat-trigger-event":"^1.0.0","component-each":"^0.2.6",eslint:"^2.9.0","eslint-plugin-mocha":"^2.2.0","eslint-plugin-require-path-exists":"^1.1.5",jquery:"^3.2.1",karma:"1.3.0","karma-browserify":"^5.0.4","karma-chrome-launcher":"^1.0.1","karma-coverage":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"1.0.1","karma-phantomjs-launcher":"^1.0.0","karma-sauce-launcher":"^1.0.0","karma-spec-reporter":"0.0.26",mocha:"^2.2.5","phantomjs-prebuilt":"^2.1.7",proclaim:"^3.4.1",sinon:"^1.7.3",watchify:"^3.7.0"}}},{}],18:[function(require,module,exports){"use strict";var ads=require("@segment/ad-params");var clone=require("component-clone");var cookie=require("component-cookie");var extend=require("@ndhoule/extend");var integration=require("@segment/analytics.js-integration");var json=require("json3");var keys=require("@ndhoule/keys");var localstorage=require("yields-store");var md5=require("spark-md5").hash;var protocol=require("@segment/protocol");var send=require("@segment/send-json");var topDomain=require("@segment/top-domain");var utm=require("@segment/utm-params");var uuid=require("uuid").v4;var Queue=require("@segment/localstorage-retry");var cookieOptions={maxage:31536e6,secure:false,path:"/"};var queueOptions={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:45,maxItems:100};var Clearbit=exports=module.exports=integration("Clearbit").option("apiKey","").option("apiHost","app.clearbit.com/v1").option("crossDomainIdServers",[]).option("retryQueue",false).option("addBundledMetadata",false).option("unbundledIntegrations",[]);exports.storage=function(){return protocol()==="file:"||protocol()==="chrome-extension:"?localstorage:cookie};exports.global=window;Clearbit.prototype.initialize=function(){var self=this;if(this.options.retryQueue){this._lsqueue=new Queue("clearbit",queueOptions,function(item,done){item.msg.sentAt=new Date;send(item.url,item.msg,item.headers,function(err,res){self.debug("sent %O, received %O",item.msg,[err,res]);if(err)return done(err);done(null,res)})});this._lsqueue.start()}this.ready();this.analytics.on("invoke",function(msg){var action=msg.action();var listener="on"+msg.action();self.debug("%s %o",action,msg);if(self[listener])self[listener](msg);self.ready()});if(this.options.crossDomainIdServers&&this.options.crossDomainIdServers.length>0){this.retrieveCrossDomainId()}};Clearbit.prototype.loaded=function(){return true};Clearbit.prototype.onpage=function(page){this.enqueue("/p",page.json())};Clearbit.prototype.onidentify=function(identify){this.enqueue("/i",identify.json())};Clearbit.prototype.ongroup=function(group){this.enqueue("/g",group.json())};Clearbit.prototype.ontrack=function(track){var json=track.json();delete json.traits;this.enqueue("/t",json)};Clearbit.prototype.onalias=function(alias){var json=alias.json();var user=this.analytics.user();json.previousId=json.previousId||json.from||user.id()||user.anonymousId();json.userId=json.userId||json.to;delete json.from;delete json.to;this.enqueue("/a",json)};Clearbit.prototype.normalize=function(msg){this.debug("normalize %o",msg);var user=this.analytics.user();var global=exports.global;var query=global.location.search;var ctx=msg.context=msg.context||msg.options||{};delete msg.options;msg.writeKey=this.options.apiKey;ctx.userAgent=navigator.userAgent;if(!ctx.library)ctx.library={name:"clearbit.js",version:this.analytics.VERSION};var crossDomainId=this.cookie("cb_xid");if(crossDomainId){if(!ctx.traits){ctx.traits={crossDomainId:crossDomainId}}else if(!ctx.traits.crossDomainId){ctx.traits.crossDomainId=crossDomainId}}if(query&&!ctx.campaign){ctx.campaign=utm(query)}this.referrerId(query,ctx);msg.userId=msg.userId||user.id();msg.anonymousId=user.anonymousId();msg.sentAt=new Date;if(this.options.addBundledMetadata){var bundled=keys(this.analytics.Integrations);msg._metadata={bundled:bundled,unbundled:this.options.unbundledIntegrations}}msg.messageId="cb-"+md5(json.stringify(msg)+uuid());this.debug("normalized %o",msg);this.ampId(ctx);return msg};Clearbit.prototype.ampId=function(ctx){var ampId=this.cookie("clearbit_amp_id");if(ampId)ctx.amp={id:ampId}};Clearbit.prototype.enqueue=function(path,msg,fn){var url="https://"+this.options.apiHost+path;var headers={"Content-Type":"text/plain"};msg=this.normalize(msg);this.debug("enqueueing");var self=this;if(this.options.retryQueue){this._lsqueue.addItem({url:url,headers:headers,msg:msg})}else{send(url,msg,headers,function(err,res){self.debug("sent %O, received %O",msg,[err,res]);if(fn){if(err)return fn(err);fn(null,res)}})}};Clearbit.prototype.cookie=function(name,val){var store=Clearbit.storage();if(arguments.length===1)return store(name);var global=exports.global;var href=global.location.href;var domain="."+topDomain(href);if(domain===".")domain="";this.debug("store domain %s -> %s",href,domain);var opts=clone(cookieOptions);opts.domain=domain;this.debug("store %s, %s, %o",name,val,opts);store(name,val,opts);if(store(name))return;delete opts.domain;this.debug("fallback store %s, %s, %o",name,val,opts);store(name,val,opts)};Clearbit.prototype.referrerId=function(query,ctx){var stored=this.cookie("cb:context.referrer");var ad;if(stored)stored=json.parse(stored);if(query)ad=ads(query);ad=ad||stored;if(!ad)return;ctx.referrer=extend(ctx.referrer||{},ad);this.cookie("cb:context.referrer",json.stringify(ad))};Clearbit.prototype.retrieveCrossDomainId=function(callback){if(!this.options.crossDomainIdServers){if(callback){ callback("crossDomainId not enabled",null)}return}if(!this.cookie("cb_xid")){var self=this;var writeKey=this.options.apiKey;var currentTld=getTld(window.location.hostname);var domains=[];for(var i=0;i=200&&xhr.status<300){callback(null,xhr.responseText?json.parse(xhr.responseText):null)}else{callback(xhr.statusText||"Unknown Error",null)}}};xhr.send()}function getTld(domain){return domain.split(".").splice(-2).join(".")}},{"@ndhoule/extend":32,"@ndhoule/keys":35,"@segment/ad-params":39,"@segment/analytics.js-integration":19,"@segment/localstorage-retry":48,"@segment/protocol":58,"@segment/send-json":59,"@segment/top-domain":61,"@segment/utm-params":62,"component-clone":65,"component-cookie":66,json3:85,"spark-md5":110,uuid:117,"yields-store":118}],19:[function(require,module,exports){"use strict";var bind=require("component-bind");var clone=require("@ndhoule/clone");var debug=require("debug");var defaults=require("@ndhoule/defaults");var extend=require("@ndhoule/extend");var slug=require("slug-component");var protos=require("./protos");var statics=require("./statics");function createIntegration(name){function Integration(options){if(options&&options.addIntegration){return options.addIntegration(Integration)}this.debug=debug("analytics:integration:"+slug(name));this.options=defaults(clone(options)||{},this.defaults);this._queue=[];this.once("ready",bind(this,this.flush));Integration.emit("construct",this);this.ready=bind(this,this.ready);this._wrapInitialize();this._wrapPage();this._wrapTrack()}Integration.prototype.defaults={};Integration.prototype.globals=[];Integration.prototype.templates={};Integration.prototype.name=name;extend(Integration,statics);extend(Integration.prototype,protos);return Integration}module.exports=createIntegration},{"./protos":20,"./statics":21,"@ndhoule/clone":27,"@ndhoule/defaults":28,"@ndhoule/extend":32,"component-bind":64,debug:22,"slug-component":109}],20:[function(require,module,exports){"use strict";var Emitter=require("component-emitter");var after=require("@ndhoule/after");var each=require("@ndhoule/each");var events=require("analytics-events");var every=require("@ndhoule/every");var fmt=require("@segment/fmt");var foldl=require("@ndhoule/foldl");var is=require("is");var loadIframe=require("load-iframe");var loadScript=require("@segment/load-script");var nextTick=require("next-tick");var normalize=require("to-no-case");var has=Object.prototype.hasOwnProperty;var noop=function noop(){};var onerror=window.onerror;var onload=null;Emitter(exports);exports.initialize=function(){var ready=this.ready;nextTick(ready)};exports.loaded=function(){return false};exports.page=function(page){};exports.track=function(track){};exports.map=function(options,key){var normalizedComparator=normalize(key);var mappingType=getMappingType(options);if(mappingType==="unknown"){return[]}return foldl(function(matchingValues,val,key){var compare;var result;if(mappingType==="map"){compare=key;result=val}if(mappingType==="array"){compare=val;result=val}if(mappingType==="mixed"){compare=val.key;result=val.value}if(normalize(compare)===normalizedComparator){matchingValues.push(result)}return matchingValues},[],options)};exports.invoke=function(method){if(!this[method])return;var args=Array.prototype.slice.call(arguments,1);if(!this._ready)return this.queue(method,args);var ret;try{this.debug("%s with %o",method,args);ret=this[method].apply(this,args)}catch(e){this.debug("error %o calling %s with %o",e,method,args)}return ret};exports.queue=function(method,args){if(method==="page"&&this._assumesPageview&&!this._initialized){return this.page.apply(this,args)}this._queue.push({method:method,args:args})};exports.flush=function(){this._ready=true;var self=this;each(function(call){self[call.method].apply(self,call.args)},this._queue);this._queue.length=0};exports.reset=function(){for(var i=0;i=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}exports.formatters.j=function(v){try{return JSON.stringify(v)}catch(err){return"[UnexpectedJSONParseError]: "+err.message}};function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return;var c="color: "+this.color;args.splice(1,0,c,"color: inherit");var index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c)}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}if(!r&&typeof process!=="undefined"&&"env"in process){r=process.env.DEBUG}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}}).call(this,require("_process"))},{"./debug":23,_process:95}],23:[function(require,module,exports){exports=module.exports=createDebug.debug=createDebug["default"]=createDebug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevTime;function selectColor(namespace){var hash=0,i;for(i in namespace){hash=(hash<<5)-hash+namespace.charCodeAt(i);hash|=0}return exports.colors[Math.abs(hash)%exports.colors.length]}function createDebug(namespace){function debug(){if(!debug.enabled)return;var self=debug;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;var args=new Array(arguments.length);for(var i=0;i>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4)}return output}},{"utf8-encode":115}],41:[function(require,module,exports){"use strict";function canonical(){var tags=document.getElementsByTagName("link");for(var i=0,tag;tag=tags[i];i++){if(tag.getAttribute("rel")==="canonical"){return tag.getAttribute("href")}}}module.exports=canonical},{}],42:[function(require,module,exports){(function(global){"use strict";var toString=global.JSON&&typeof JSON.stringify==="function"?JSON.stringify:String;function fmt(str){var args=Array.prototype.slice.call(arguments,1);var j=0;return str.replace(/%([a-z])/gi,function(match,f){return fmt[f]?fmt[f](args[j++]):match+f})}fmt.o=toString;fmt.s=String;fmt.d=parseInt;module.exports=fmt}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],43:[function(require,module,exports){"use strict";function isMeta(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey){return true}var which=e.which;var button=e.button;if(!which&&button!==undefined){return!button&1&&!button&2&&button&4}else if(which===2){return true}return false}module.exports=isMeta},{}],44:[function(require,module,exports){"use strict";var type=require("component-type");var each=require("component-each");var isodate=require("@segment/isodate");module.exports=traverse;function traverse(input,strict){if(strict===undefined)strict=true;if(type(input)==="object")return object(input,strict);if(type(input)==="array")return array(input,strict);return input}function object(obj,strict){if(obj.length&&typeof obj.length==="number"&&!(obj.length-1 in obj)){obj.lengthNonArray=obj.length;delete obj.length}each(obj,function(key,val){if(isodate.is(val,strict)){obj[key]=isodate.parse(val)}else if(type(val)==="object"||type(val)==="array"){traverse(val,strict)}});if(obj.lengthNonArray){obj.length=obj.lengthNonArray;delete obj.lengthNonArray}return obj}function array(arr,strict){each(arr,function(val,x){if(type(val)==="object"){traverse(val,strict)}else if(isodate.is(val,strict)){arr[x]=isodate.parse(val)}});return arr}},{"@segment/isodate":45,"component-each":69,"component-type":76}],45:[function(require,module,exports){"use strict";var matcher=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;exports.parse=function(iso){var numericKeys=[1,5,6,7,11,12];var arr=matcher.exec(iso);var offset=0;if(!arr){return new Date(iso)}for(var i=0,val;val=numericKeys[i];i++){arr[val]=parseInt(arr[val],10)||0}arr[2]=parseInt(arr[2],10)||1;arr[3]=parseInt(arr[3],10)||1;arr[2]--;arr[8]=arr[8]?(arr[8]+"00").substring(0,3):0;if(arr[4]===" "){offset=(new Date).getTimezoneOffset()}else if(arr[9]!=="Z"&&arr[10]){offset=arr[11]*60+arr[12];if(arr[10]==="+"){offset=0-offset}}var millis=Date.UTC(arr[1],arr[2],arr[3],arr[5],arr[6]+offset,arr[7],arr[8]);return new Date(millis)};exports.is=function(string,strict){if(typeof string!=="string"){return false}if(strict&&/^\d{4}-\d{2}-\d{2}/.test(string)===false){return false}return matcher.test(string)}},{}],46:[function(require,module,exports){"use strict";var onload=require("script-onload");var tick=require("next-tick");var type=require("component-type");function loadScript(options,cb){if(!options){throw new Error("Can't load nothing...")}if(type(options)==="string"){options={src:options}}var https=document.location.protocol==="https:"||document.location.protocol==="chrome-extension:";if(options.src&&options.src.indexOf("//")===0){options.src=(https?"https:":"http:")+options.src}if(https&&options.https){options.src=options.https}else if(!https&&options.http){options.src=options.http}var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=options.src;if(type(cb)==="function"){onload(script,cb)}tick(function(){var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(script,firstScript)}) ;return script}module.exports=loadScript},{"component-type":76,"next-tick":93,"script-onload":96}],47:[function(require,module,exports){"use strict";var keys=require("@ndhoule/keys");var uuid=require("uuid").v4;var inMemoryStore={_data:{},length:0,setItem:function(key,value){this._data[key]=value;this.length=keys(this._data).length;return value},getItem:function(key){if(key in this._data){return this._data[key]}return null},removeItem:function(key){if(key in this._data){delete this._data[key]}this.length=keys(this._data).length;return null},clear:function(){this._data={};this.length=0},key:function(index){return keys(this._data)[index]}};function isSupportedNatively(){try{if(!window.localStorage)return false;var key=uuid();window.localStorage.setItem(key,"test_value");var value=window.localStorage.getItem(key);window.localStorage.removeItem(key);return value==="test_value"}catch(e){return false}}function pickStorage(){if(isSupportedNatively()){return window.localStorage}return inMemoryStore}module.exports.defaultEngine=pickStorage();module.exports.inMemoryEngine=inMemoryStore},{"@ndhoule/keys":35,uuid:52}],48:[function(require,module,exports){"use strict";var uuid=require("uuid").v4;var Store=require("./store");var each=require("@ndhoule/each");var Schedule=require("./schedule");var debug=require("debug")("localstorage-retry");var Emitter=require("component-emitter");function bind(func,obj){return function(){return func.apply(obj,arguments)}}function Queue(name,opts,fn){if(typeof opts==="function")fn=opts;this.name=name;this.id=uuid();this.fn=fn;this.maxItems=opts.maxItems||Infinity;this.maxAttempts=opts.maxAttempts||Infinity;this.backoff={MIN_RETRY_DELAY:opts.minRetryDelay||1e3,MAX_RETRY_DELAY:opts.maxRetryDelay||3e4,FACTOR:opts.backoffFactor||2,JITTER:opts.backoffJitter||0};this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500};this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",ACK:"ack",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd"};this._schedule=new Schedule;this._processId=0;this._store=new Store(this.name,this.id,this.keys);this._store.set(this.keys.IN_PROGRESS,{});this._store.set(this.keys.QUEUE,[]);this._ack=bind(this._ack,this);this._checkReclaim=bind(this._checkReclaim,this);this._processHead=bind(this._processHead,this);this._running=false}Emitter(Queue.prototype);Queue.prototype.start=function(){if(this._running){this.stop()}this._running=true;this._ack();this._checkReclaim();this._processHead()};Queue.prototype.stop=function(){this._schedule.cancelAll();this._running=false};Queue.prototype.shouldRetry=function(_,attemptNumber){if(attemptNumber>this.maxAttempts)return false;return true};Queue.prototype.getDelay=function(attemptNumber){var ms=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,attemptNumber);if(this.backoff.JITTER){var rand=Math.random();var deviation=Math.floor(rand*this.backoff.JITTER*ms);if(Math.floor(rand*10)<5){ms-=deviation}else{ms+=deviation}}return Number(Math.min(ms,this.backoff.MAX_RETRY_DELAY).toPrecision(1))};Queue.prototype.addItem=function(item){this._enqueue({item:item,attemptNumber:0,time:this._schedule.now()})};Queue.prototype.requeue=function(item,attemptNumber,error){if(this.shouldRetry(item,attemptNumber,error)){this._enqueue({item:item,attemptNumber:attemptNumber,time:this._schedule.now()+this.getDelay(attemptNumber)})}else{this.emit("discard",item,attemptNumber)}};Queue.prototype._enqueue=function(entry){var queue=this._store.get(this.keys.QUEUE)||[];queue=queue.slice(-(this.maxItems-1));queue.push(entry);queue=queue.sort(function(a,b){return a.time-b.time});this._store.set(this.keys.QUEUE,queue);if(this._running){this._processHead()}};Queue.prototype._processHead=function(){var self=this;var store=this._store;this._schedule.cancel(this._processId);var queue=store.get(this.keys.QUEUE)||[];var inProgress=store.get(this.keys.IN_PROGRESS)||{};var now=this._schedule.now();var toRun=[];while(queue.length&&queue[0].time<=now){var el=queue.shift();var id=uuid();inProgress[id]={item:el.item,attemptNumber:el.attemptNumber,time:this._schedule.now()};toRun.push({item:el.item,done:function handle(err,res){var inProgress=store.get(self.keys.IN_PROGRESS)||{};delete inProgress[id];store.set(self.keys.IN_PROGRESS,inProgress);self.emit("processed",err,res,el.item);if(err){self.requeue(el.item,el.attemptNumber+1,err)}}})}store.set(this.keys.QUEUE,queue);store.set(this.keys.IN_PROGRESS,inProgress);each(function(el){try{self.fn(el.item,el.done)}catch(err){debug("Process function threw error: "+err)}},toRun);queue=store.get(this.keys.QUEUE)||[];this._schedule.cancel(this._processId);if(queue.length>0){this._processId=this._schedule.run(this._processHead,queue[0].time-now)}};Queue.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now());this._store.set(this.keys.RECLAIM_START,null);this._store.set(this.keys.RECLAIM_END,null);this._schedule.run(this._ack,this.timeouts.ACK_TIMER)};Queue.prototype._checkReclaim=function(){var self=this;function tryReclaim(store){store.set(self.keys.RECLAIM_START,self.id);store.set(self.keys.ACK,self._schedule.now());self._schedule.run(function(){if(store.get(self.keys.RECLAIM_START)!==self.id)return;store.set(self.keys.RECLAIM_END,self.id);self._schedule.run(function(){if(store.get(self.keys.RECLAIM_END)!==self.id)return;if(store.get(self.keys.RECLAIM_START)!==self.id)return;self._reclaim(store.id)},self.timeouts.RECLAIM_WAIT)},self.timeouts.RECLAIM_WAIT)}function findOtherQueues(name){var res=[];var storage=self._store.engine;for(var i=0;i>>((i&3)<<3)&255}return rnds}}},{}],55:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=rng();if(node==null){node=_nodeId=[seedBytes[0]|1,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]]}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&16383}}var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf?buf:bytesToUuid(b)}module.exports=v1},{"./lib/bytesToUuid":53,"./lib/rng":54}],56:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options==="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":53,"./lib/rng":54}],57:[function(require,module,exports){"use strict";function preventDefault(e){e=e||window.event;return e.preventDefault?e.preventDefault():e.returnValue=false}module.exports=preventDefault},{}],58:[function(require,module,exports){"use strict";var define=Object.defineProperty;var initialProtocol=window.location.protocol;var mockedProtocol;module.exports=function(protocol){if(arguments.length===0){return get()}return set(protocol)};module.exports.http=function(){set("http:")};module.exports.https=function(){set("https:")};module.exports.reset=function(){set(initialProtocol)};function get(){return mockedProtocol||window.location.protocol}function set(protocol){try{define(window.location,"protocol",{get:function(){return protocol}})}catch(err){mockedProtocol=protocol}}},{}],59:[function(require,module,exports){"use strict";var JSON=require("json3");var base64encode=require("@segment/base64-encode");var cors=require("has-cors");var jsonp=require("jsonp");exports=module.exports=cors?json:base64;exports.callback="callback";exports.prefix="data";exports.json=json;exports.base64=base64;exports.type=cors?"xhr":"jsonp";function json(url,obj,headers,fn){if(arguments.length===3)fn=headers,headers={};var req=new XMLHttpRequest;req.onerror=fn;req.onreadystatechange=done;req.open("POST",url,true);for(var k in headers){req.setRequestHeader(k,headers[k])}req.send(JSON.stringify(obj));function done(){if(req.readyState===4){return fn(null,req)}}}function base64(url,obj,_,fn){if(arguments.length===3)fn=_;var prefix=exports.prefix;var data=encode(obj);url+="?"+prefix+"="+data;jsonp(url,{param:exports.callback},function(err,obj){if(err)return fn(err);fn(null,{url:url,body:obj})})}function encode(obj){var str="";str=JSON.stringify(obj);str=base64encode(str);str=str.replace(/\+/g,"-").replace(/\//g,"_");return encodeURIComponent(str)}},{"@segment/base64-encode":40,"has-cors":81,json3:85,jsonp:86}],60:[function(require,module,exports){(function(global){"use strict";var JSON=require("json3");module.exports=function(){var store={},win=typeof window!="undefined"?window:global,doc=win.document,localStorageName="localStorage",scriptTag="script",storage;store.disabled=false;store.version="1.3.20";store.set=function(key,value){};store.get=function(key,defaultVal){};store.has=function(key){return store.get(key)!==undefined};store.remove=function(key){};store.clear=function(){};store.transact=function(key,defaultVal,transactionFn){if(transactionFn==null){transactionFn=defaultVal;defaultVal=null}if(defaultVal==null){defaultVal={}}var val=store.get(key,defaultVal);transactionFn(val);store.set(key,val)};store.getAll=function(){var ret={};store.forEach(function(key,val){ret[key]=val});return ret};store.forEach=function(){};store.serialize=function(value){return JSON.stringify(value)};store.deserialize=function(value){if(typeof value!="string"){return undefined}try{return JSON.parse(value)}catch(e){return value||undefined}};function isLocalStorageNameSupported(){try{return localStorageName in win&&win[localStorageName]}catch(err){return false}}if(isLocalStorageNameSupported()){storage=win[localStorageName];store.set=function(key,val){if(val===undefined){return store.remove(key)}storage.setItem(key,store.serialize(val));return val};store.get=function(key,defaultVal){var val=store.deserialize(storage.getItem(key));return val===undefined?defaultVal:val};store.remove=function(key){storage.removeItem(key)};store.clear=function(){storage.clear()};store.forEach=function(callback){for(var i=0;idocument.w=window');storageContainer.close();storageOwner=storageContainer.w.frames[0].document;storage=storageOwner.createElement("div")}catch(e){storage=doc.createElement("div");storageOwner=doc.body}var withIEStorage=function(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0);args.unshift(storage);storageOwner.appendChild(storage);storage.addBehavior("#default#userData");storage.load(localStorageName);var result=storeFunction.apply(store,args);storageOwner.removeChild(storage);return result}};var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");var ieKeyFix=function(key){return key.replace(/^d/,"___$&").replace(forbiddenCharsRegex,"___")};store.set=withIEStorage(function(storage,key,val){key=ieKeyFix(key);if(val===undefined){return store.remove(key)}storage.setAttribute(key,store.serialize(val));storage.save(localStorageName);return val});store.get=withIEStorage(function(storage,key,defaultVal){key=ieKeyFix(key);var val=store.deserialize(storage.getAttribute(key));return val===undefined?defaultVal:val});store.remove=withIEStorage(function(storage,key){key=ieKeyFix(key);storage.removeAttribute(key);storage.save(localStorageName)});store.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;storage.load(localStorageName);for(var i=attributes.length-1;i>=0;i--){storage.removeAttribute(attributes[i].name)}storage.save(localStorageName)});store.forEach=withIEStorage(function(storage,callback){var attributes=storage.XMLDocument.documentElement.attributes;for(var i=0,attr;attr=attributes[i];++i){callback(attr.name,store.deserialize(storage.getAttribute(attr.name)))}})}try{var testKey="__storejs__";store.set(testKey,testKey);if(store.get(testKey)!=testKey){store.disabled=true}store.remove(testKey)}catch(e){store.disabled=true}store.enabled=!store.disabled;return store}()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{json3:85}],61:[function(require,module,exports){"use strict";var parse=require("component-url").parse;var cookie=require("component-cookie");function domain(url){var cookie=exports.cookie;var levels=exports.levels(url);for(var i=0;i=0;--i){levels.push(parts.slice(i).join("."))}return levels};domain.cookie=cookie;exports=module.exports=domain},{"component-cookie":66,"component-url":77}],62:[function(require,module,exports){"use strict";var foldl=require("@ndhoule/foldl");var parse=require("component-querystring").parse;var has=Object.prototype.hasOwnProperty;function utm(query){if(query.charAt(0)==="?"){query=query.substring(1)}query=query.replace(/\?/g,"&");var param;var params=parse(query);var results={};for(var key in params){if(has.call(params,key)){if(key.substr(0,4)==="utm_"){param=key.substr(4);if(param==="campaign")param="name";results[param]=params[key]}}}return results}var allowedKeys={name:true,term:true,source:true,medium:true,content:true};function strict(query){return foldl(function(acc,val,key){if(has.call(allowedKeys,key))acc[key]=val;return acc},{},utm(query))}module.exports=utm;module.exports.strict=strict},{"@ndhoule/foldl":33,"component-querystring":74}],63:[function(require,module,exports){"use strict";var bind=require("component-bind");function bindAll(obj){for(var key in obj){var val=obj[key];if(typeof val==="function"){obj[key]=bind(obj,obj[key])}}return obj}module.exports=bindAll},{"component-bind":64}],64:[function(require,module,exports){var slice=[].slice;module.exports=function(obj,fn){if("string"==typeof fn)fn=obj[fn];if("function"!=typeof fn)throw new Error("bind() requires a function");var args=slice.call(arguments,2);return function(){return fn.apply(obj,args.concat(slice.call(arguments)))}}},{}],65:[function(require,module,exports){var type;try{type=require("component-type")}catch(_){type=require("type")}module.exports=clone;function clone(obj){switch(type(obj)){case"object":var copy={};for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){copy[key]=clone(obj[key])}}return copy;case"array":var copy=new Array(obj.length);for(var i=0,l=obj.length;i=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}exports.formatters.j=function(v){try{return JSON.stringify(v)}catch(err){return"[UnexpectedJSONParseError]: "+err.message}};function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return;var c="color: "+this.color;args.splice(1,0,c,"color: inherit");var index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c)}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}if(!r&&typeof process!=="undefined"&&"env"in process){r=process.env.DEBUG}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}}).call(this,require("_process"))},{"./debug":68,_process:95}],68:[function(require,module,exports){exports=module.exports=createDebug.debug=createDebug["default"]=createDebug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.instances=[];exports.names=[];exports.skips=[];exports.formatters={};function selectColor(namespace){var hash=0,i;for(i in namespace){hash=(hash<<5)-hash+namespace.charCodeAt(i);hash|=0}return exports.colors[Math.abs(hash)%exports.colors.length]}function createDebug(namespace){var prevTime;function debug(){if(!debug.enabled)return;var self=debug;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;var args=new Array(arguments.length);for(var i=0;i-1){return str.toUpperCase()}return str};exports.parse=function(str){if("string"!=typeof str)return{};str=trim(str);if(""==str)return{};if("?"==str.charAt(0))str=str.slice(1);var obj={};var pairs=str.split("&");for(var i=0;i
a';innerHTMLBug=!bugTestDiv.getElementsByTagName("link").length;bugTestDiv=undefined}var map={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:innerHTMLBug?[1,"X
","
"]:[0,"",""]};map.td=map.th=[3,"","
"];map.option=map.optgroup=[1,'"];map.thead=map.tbody=map.colgroup=map.caption=map.tfoot=[1,"","
"];map.polyline=map.ellipse=map.polygon=map.circle=map.text=map.line=map.path=map.rect=map.g=[1,'',""];function parse(html,doc){if("string"!=typeof html)throw new TypeError("String expected");if(!doc)doc=document;var m=/<([\w:]+)/.exec(html);if(!m)return doc.createTextNode(html);html=html.replace(/^\s+|\s+$/g,"");var tag=m[1];if(tag=="body"){var el=doc.createElement("html");el.innerHTML=html;return el.removeChild(el.lastChild)}var wrap=map[tag]||map._default;var depth=wrap[0];var prefix=wrap[1];var suffix=wrap[2];var el=doc.createElement("div");el.innerHTML=prefix+html+suffix;while(depth--)el=el.lastChild;if(el.firstChild==el.lastChild){return el.removeChild(el.firstChild)}var fragment=doc.createDocumentFragment();while(el.firstChild){fragment.appendChild(el.removeChild(el.firstChild))}return fragment}},{}],81:[function(require,module,exports){try{module.exports=typeof XMLHttpRequest!=="undefined"&&"withCredentials"in new XMLHttpRequest}catch(err){module.exports=false}},{}],82:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],83:[function(require,module,exports){module.exports=function isEmail(string){return/.+\@.+\..+/.test(string)}},{}],84:[function(require,module,exports){"use strict";var objProto=Object.prototype;var owns=objProto.hasOwnProperty;var toStr=objProto.toString;var symbolValueOf;if(typeof Symbol==="function"){symbolValueOf=Symbol.prototype.valueOf}var isActualNaN=function(value){return value!==value};var NON_HOST_TYPES={boolean:1,number:1,string:1,undefined:1};var base64Regex=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;var hexRegex=/^[A-Fa-f0-9]+$/;var is={};is.a=is.type=function(value,type){return typeof value===type};is.defined=function(value){return typeof value!=="undefined"};is.empty=function(value){var type=toStr.call(value);var key;if(type==="[object Array]"||type==="[object Arguments]"||type==="[object String]"){return value.length===0}if(type==="[object Object]"){for(key in value){if(owns.call(value,key)){return false}}return true}return!value};is.equal=function equal(value,other){if(value===other){return true}var type=toStr.call(value);var key;if(type!==toStr.call(other)){return false}if(type==="[object Object]"){for(key in value){if(!is.equal(value[key],other[key])||!(key in other)){return false}}for(key in other){if(!is.equal(value[key],other[key])||!(key in value)){return false}}return true}if(type==="[object Array]"){key=value.length;if(key!==other.length){return false}while(key--){if(!is.equal(value[key],other[key])){return false}}return true}if(type==="[object Function]"){return value.prototype===other.prototype}if(type==="[object Date]"){return value.getTime()===other.getTime()}return false};is.hosted=function(value,host){var type=typeof host[value];return type==="object"?!!host[value]:!NON_HOST_TYPES[type]};is.instance=is["instanceof"]=function(value,constructor){return value instanceof constructor};is.nil=is["null"]=function(value){return value===null};is.undef=is.undefined=function(value){return typeof value==="undefined"};is.args=is.arguments=function(value){var isStandardArguments=toStr.call(value)==="[object Arguments]";var isOldArguments=!is.array(value)&&is.arraylike(value)&&is.object(value)&&is.fn(value.callee);return isStandardArguments||isOldArguments};is.array=Array.isArray||function(value){return toStr.call(value)==="[object Array]"};is.args.empty=function(value){return is.args(value)&&value.length===0};is.array.empty=function(value){return is.array(value)&&value.length===0};is.arraylike=function(value){return!!value&&!is.bool(value)&&owns.call(value,"length")&&isFinite(value.length)&&is.number(value.length)&&value.length>=0};is.bool=is["boolean"]=function(value){return toStr.call(value)==="[object Boolean]"};is["false"]=function(value){return is.bool(value)&&Boolean(Number(value))===false};is["true"]=function(value){return is.bool(value)&&Boolean(Number(value))===true};is.date=function(value){return toStr.call(value)==="[object Date]"};is.date.valid=function(value){return is.date(value)&&!isNaN(Number(value))};is.element=function(value){return value!==undefined&&typeof HTMLElement!=="undefined"&&value instanceof HTMLElement&&value.nodeType===1};is.error=function(value){return toStr.call(value)==="[object Error]"};is.fn=is["function"]=function(value){var isAlert=typeof window!=="undefined"&&value===window.alert;if(isAlert){return true}var str=toStr.call(value);return str==="[object Function]"||str==="[object GeneratorFunction]"||str==="[object AsyncFunction]"};is.number=function(value){return toStr.call(value)==="[object Number]"};is.infinite=function(value){return value===Infinity||value===-Infinity};is.decimal=function(value){return is.number(value)&&!isActualNaN(value)&&!is.infinite(value)&&value%1!==0};is.divisibleBy=function(value,n){var isDividendInfinite=is.infinite(value);var isDivisorInfinite=is.infinite(n);var isNonZeroNumber=is.number(value)&&!isActualNaN(value)&&is.number(n)&&!isActualNaN(n)&&n!==0;return isDividendInfinite||isDivisorInfinite||isNonZeroNumber&&value%n===0};is.integer=is["int"]=function(value){return is.number(value)&&!isActualNaN(value)&&value%1===0};is.maximum=function(value,others){if(isActualNaN(value)){throw new TypeError("NaN is not a valid value")}else if(!is.arraylike(others)){throw new TypeError("second argument must be array-like")}var len=others.length;while(--len>=0){if(value=0){if(value>others[len]){return false}}return true};is.nan=function(value){return!is.number(value)||value!==value};is.even=function(value){return is.infinite(value)||is.number(value)&&value===value&&value%2===0};is.odd=function(value){return is.infinite(value)||is.number(value)&&value===value&&value%2!==0};is.ge=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value>=other};is.gt=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value>other};is.le=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value<=other};is.lt=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value=start&&value<=finish};is.object=function(value){return toStr.call(value)==="[object Object]"};is.primitive=function isPrimitive(value){if(!value){return true}if(typeof value==="object"||is.object(value)||is.fn(value)||is.array(value)){return false}return true};is.hash=function(value){return is.object(value)&&value.constructor===Object&&!value.nodeType&&!value.setInterval};is.regexp=function(value){return toStr.call(value)==="[object RegExp]"};is.string=function(value){return toStr.call(value)==="[object String]"};is.base64=function(value){return is.string(value)&&(!value.length||base64Regex.test(value))};is.hex=function(value){return is.string(value)&&(!value.length||hexRegex.test(value))};is.symbol=function(value){return typeof Symbol==="function"&&toStr.call(value)==="[object Symbol]"&&typeof symbolValueOf.call(value)==="symbol"};module.exports=is},{}],85:[function(require,module,exports){(function(global){(function(){var isLoader=typeof define==="function"&&define.amd;var objectTypes={function:true,object:true};var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var root=objectTypes[typeof window]&&window||this,freeGlobal=freeExports&&objectTypes[typeof module]&&module&&!module.nodeType&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}function runInContext(context,exports){context||(context=root.Object());exports||(exports=root.Object());var Number=context.Number||root.Number,String=context.String||root.String,Object=context.Object||root.Object,Date=context.Date||root.Date,SyntaxError=context.SyntaxError||root.SyntaxError,TypeError=context.TypeError||root.TypeError,Math=context.Math||root.Math,nativeJSON=context.JSON||root.JSON;if(typeof nativeJSON=="object"&&nativeJSON){exports.stringify=nativeJSON.stringify;exports.parse=nativeJSON.parse}var objectProto=Object.prototype,getClass=objectProto.toString,isProperty=objectProto.hasOwnProperty,undefined;function attempt(func,errorFunc){try{func()}catch(exception){if(errorFunc){errorFunc()}}}var isExtended=new Date(-0xc782b5b800cec);attempt(function(){isExtended=isExtended.getUTCFullYear()==-109252&&isExtended.getUTCMonth()===0&&isExtended.getUTCDate()===1&&isExtended.getUTCHours()==10&&isExtended.getUTCMinutes()==37&&isExtended.getUTCSeconds()==6&&isExtended.getUTCMilliseconds()==708});function has(name){if(has[name]!=null){return has[name]}var isSupported;if(name=="bug-string-char-index"){isSupported="a"[0]!="a"}else if(name=="json"){isSupported=has("json-stringify")&&has("date-serialization")&&has("json-parse")}else if(name=="date-serialization"){isSupported=has("json-stringify")&&isExtended;if(isSupported){var stringify=exports.stringify;attempt(function(){isSupported=stringify(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&stringify(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&stringify(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&stringify(new Date(-1))=='"1969-12-31T23:59:59.999Z"'})}}else{var value,serialized='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(name=="json-stringify"){var stringify=exports.stringify,stringifySupported=typeof stringify=="function";if(stringifySupported){(value=function(){return 1}).toJSON=value;attempt(function(){stringifySupported=stringify(0)==="0"&&stringify(new Number)==="0"&&stringify(new String)=='""'&&stringify(getClass)===undefined&&stringify(undefined)===undefined&&stringify()===undefined&&stringify(value)==="1"&&stringify([value])=="[1]"&&stringify([undefined])=="[null]"&&stringify(null)=="null"&&stringify([undefined,getClass,null])=="[null,null,null]"&&stringify({a:[value,true,false,null,"\0\b\n\f\r\t"]})==serialized&&stringify(null,value)==="1"&&stringify([1,2],null,1)=="[\n 1,\n 2\n]"},function(){stringifySupported=false})}isSupported=stringifySupported}if(name=="json-parse"){var parse=exports.parse,parseSupported;if(typeof parse=="function"){attempt(function(){if(parse("0")===0&&!parse(false)){value=parse(serialized);parseSupported=value["a"].length==5&&value["a"][0]===1;if(parseSupported){attempt(function(){parseSupported=!parse('"\t"')});if(parseSupported){attempt(function(){parseSupported=parse("01")!==1})}if(parseSupported){attempt(function(){parseSupported=parse("1.")!==1})}}}},function(){parseSupported=false})}isSupported=parseSupported}}return has[name]=!!isSupported}has["bug-string-char-index"]=has["date-serialization"]=has["json"]=has["json-stringify"]=has["json-parse"]=null;if(!has("json")){var functionClass="[object Function]",dateClass="[object Date]",numberClass="[object Number]",stringClass="[object String]",arrayClass="[object Array]",booleanClass="[object Boolean]";var charIndexBuggy=has("bug-string-char-index");var forOwn=function(object,callback){var size=0,Properties,members,property;(Properties=function(){this.valueOf=0}).prototype.valueOf=0;members=new Properties;for(property in members){if(isProperty.call(members,property)){size++}}Properties=members=null;if(!size){members=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];forOwn=function(object,callback){var isFunction=getClass.call(object)==functionClass,property,length;var hasProperty=!isFunction&&typeof object.constructor!="function"&&objectTypes[typeof object.hasOwnProperty]&&object.hasOwnProperty||isProperty;for(property in object){if(!(isFunction&&property=="prototype")&&hasProperty.call(object,property)){callback(property)}}for(length=dontEnums.length;property=dontEnums[--length];){if(hasProperty.call(object,property)){callback(property)}}}}else{forOwn=function(object,callback){var isFunction=getClass.call(object)==functionClass,property,isConstructor;for(property in object){if(!(isFunction&&property=="prototype")&&isProperty.call(object,property)&&!(isConstructor=property==="constructor")){callback(property)}}if(isConstructor||isProperty.call(object,property="constructor")){callback(property)}}}return forOwn(object,callback)};if(!has("json-stringify")&&!has("date-serialization")){var Escapes={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"};var leadingZeroes="000000";var toPaddedString=function(width,value){return(leadingZeroes+(value||0)).slice(-width)};var serializeDate=function(value){var getData,year,month,date,time,hours,minutes,seconds,milliseconds;if(!isExtended){var floor=Math.floor;var Months=[0,31,59,90,120,151,181,212,243,273,304,334];var getDay=function(year,month){return Months[month]+365*(year-1970)+floor((year-1969+(month=+(month>1)))/4)-floor((year-1901+month)/100)+floor((year-1601+month)/400)};getData=function(value){date=floor(value/864e5);for(year=floor(date/365.2425)+1970-1;getDay(year+1,0)<=date;year++);for(month=floor((date-getDay(year,0))/30.42);getDay(year,month+1)<=date;month++);date=1+date-getDay(year,month);time=(value%864e5+864e5)%864e5;hours=floor(time/36e5)%24;minutes=floor(time/6e4)%60;seconds=floor(time/1e3)%60;milliseconds=time%1e3}}else{getData=function(value){year=value.getUTCFullYear();month=value.getUTCMonth();date=value.getUTCDate();hours=value.getUTCHours();minutes=value.getUTCMinutes();seconds=value.getUTCSeconds();milliseconds=value.getUTCMilliseconds()}}serializeDate=function(value){if(value>-1/0&&value<1/0){getData(value);value=(year<=0||year>=1e4?(year<0?"-":"+")+toPaddedString(6,year<0?-year:year):toPaddedString(4,year))+"-"+toPaddedString(2,month+1)+"-"+toPaddedString(2,date)+"T"+toPaddedString(2,hours)+":"+toPaddedString(2,minutes)+":"+toPaddedString(2,seconds)+"."+toPaddedString(3,milliseconds)+"Z";year=month=date=hours=minutes=seconds=milliseconds=null}else{value=null}return value};return serializeDate(value)};if(has("json-stringify")&&!has("date-serialization")){function dateToJSON(key){return serializeDate(this)}var nativeStringify=exports.stringify;exports.stringify=function(source,filter,width){var nativeToJSON=Date.prototype.toJSON;Date.prototype.toJSON=dateToJSON;var result=nativeStringify(source,filter,width);Date.prototype.toJSON=nativeToJSON;return result}}else{var unicodePrefix="\\u00";var escapeChar=function(character){var charCode=character.charCodeAt(0),escaped=Escapes[charCode];if(escaped){return escaped}return unicodePrefix+toPaddedString(2,charCode.toString(16))};var reEscape=/[\x00-\x1f\x22\x5c]/g;var quote=function(value){reEscape.lastIndex=0;return'"'+(reEscape.test(value)?value.replace(reEscape,escapeChar):value)+'"'};var serialize=function(property,object,callback,properties,whitespace,indentation,stack){var value,type,className,results,element,index,length,prefix,result;attempt(function(){value=object[property]});if(typeof value=="object"&&value){if(value.getUTCFullYear&&getClass.call(value)==dateClass&&value.toJSON===Date.prototype.toJSON){value=serializeDate(value)}else if(typeof value.toJSON=="function"){value=value.toJSON(property)}}if(callback){value=callback.call(object,property,value)}if(value==undefined){return value===undefined?value:"null"}type=typeof value;if(type=="object"){className=getClass.call(value)}switch(className||type){case"boolean":case booleanClass:return""+value;case"number":case numberClass:return value>-1/0&&value<1/0?""+value:"null";case"string":case stringClass:return quote(""+value)}if(typeof value=="object"){for(length=stack.length;length--;){if(stack[length]===value){throw TypeError()}}stack.push(value);results=[];prefix=indentation;indentation+=whitespace;if(className==arrayClass){for(index=0,length=value.length;index0){if(width>10){width=10}for(whitespace="";whitespace.length=48&&charCode<=57||charCode>=97&&charCode<=102||charCode>=65&&charCode<=70)){abort()}}value+=fromCharCode("0x"+source.slice(begin,Index));break;default:abort()}}else{if(charCode==34){break}charCode=source.charCodeAt(Index);begin=Index;while(charCode>=32&&charCode!=92&&charCode!=34){charCode=source.charCodeAt(++Index)}value+=source.slice(begin,Index)}}if(source.charCodeAt(Index)==34){Index++;return value}abort();default:begin=Index;if(charCode==45){isSigned=true;charCode=source.charCodeAt(++Index)}if(charCode>=48&&charCode<=57){if(charCode==48&&(charCode=source.charCodeAt(Index+1),charCode>=48&&charCode<=57)){abort()}isSigned=false;for(;Index=48&&charCode<=57);Index++);if(source.charCodeAt(Index)==46){position=++Index;for(;position57){break}}if(position==Index){abort()}Index=position}charCode=source.charCodeAt(Index);if(charCode==101||charCode==69){charCode=source.charCodeAt(++Index);if(charCode==43||charCode==45){Index++}for(position=Index;position57){break}}if(position==Index){abort()}Index=position}return+source.slice(begin,Index)}if(isSigned){abort()}var temp=source.slice(Index,Index+4);if(temp=="true"){Index+=4;return true}else if(temp=="fals"&&source.charCodeAt(Index+4)==101){Index+=5;return false}else if(temp=="null"){Index+=4;return null}abort()}}return"$"};var get=function(value){var results,hasMembers;if(value=="$"){abort()}if(typeof value=="string"){if((charIndexBuggy?value.charAt(0):value[0])=="@"){return value.slice(1)}if(value=="["){results=[];for(;;){value=lex();if(value=="]"){break}if(hasMembers){if(value==","){value=lex();if(value=="]"){abort()}}else{abort()}}else{hasMembers=true}if(value==","){abort()}results.push(get(value))}return results}else if(value=="{"){results={};for(;;){value=lex();if(value=="}"){break}if(hasMembers){if(value==","){value=lex();if(value=="}"){abort()}}else{abort()}}else{hasMembers=true}if(value==","||typeof value!="string"||(charIndexBuggy?value.charAt(0):value[0])!="@"||lex()!=":"){abort()}results[value.slice(1)]=get(lex())}return results}abort()}return value};var update=function(source,property,callback){var element=walk(source,property,callback);if(element===undefined){delete source[property]}else{source[property]=element}};var walk=function(source,property,callback){var value=source[property],length;if(typeof value=="object"&&value){if(getClass.call(value)==arrayClass){for(length=value.length;length--;){update(getClass,forOwn,value,length,callback)}}else{forOwn(value,function(property){update(value,property,callback)})}}return callback.call(source,property,value)};exports.parse=function(source,callback){var result,value;Index=0;Source=""+source;result=get(lex());if(lex()!="$"){abort()}Index=Source=null;return callback&&getClass.call(callback)==functionClass?walk((value={},value[""]=result,value),"",callback):result}}}exports.runInContext=runInContext;return exports}runInContext(root,freeExports)}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],86:[function(require,module,exports){var debug=require("debug")("jsonp");module.exports=jsonp;var count=0;function noop(){}function jsonp(url,opts,fn){if("function"==typeof opts){fn=opts;opts={}}if(!opts)opts={};var prefix=opts.prefix||"__jp";var id=opts.name||prefix+count++;var param=opts.param||"callback";var timeout=null!=opts.timeout?opts.timeout:6e4;var enc=encodeURIComponent;var target=document.getElementsByTagName("script")[0]||document.head;var script;var timer;if(timeout){timer=setTimeout(function(){cleanup();if(fn)fn(new Error("Timeout"))},timeout)}function cleanup(){if(script.parentNode)script.parentNode.removeChild(script);window[id]=noop;if(timer)clearTimeout(timer)}function cancel(){if(window[id]){cleanup()}}window[id]=function(data){debug("jsonp got",data);cleanup();if(fn)fn(null,data)};url+=(~url.indexOf("?")?"&":"?")+param+"="+enc(id);url=url.replace("?&","?");debug('jsonp req "%s"',url);script=document.createElement("script");script.src=url;target.parentNode.insertBefore(script,target);return cancel}},{debug:78}],87:[function(require,module,exports){var is=require("is");var onload=require("script-onload");var tick=require("next-tick");module.exports=function loadIframe(options,fn){if(!options)throw new Error("Cant load nothing...");if(is.string(options))options={src:options};var https=document.location.protocol==="https:"||document.location.protocol==="chrome-extension:";if(options.src&&options.src.indexOf("//")===0){options.src=https?"https:"+options.src:"http:"+options.src}if(https&&options.https)options.src=options.https;else if(!https&&options.http)options.src=options.http;var iframe=document.createElement("iframe");iframe.src=options.src;iframe.width=options.width||1;iframe.height=options.height||1;iframe.style.display="none";if(is.fn(fn)){onload(iframe,fn)}tick(function(){var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(iframe,firstScript)});return iframe}},{is:84,"next-tick":93,"script-onload":96}],88:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};var type=typeof val;if(type==="string"&&val.length>0){return parse(val)}else if(type==="number"&&isNaN(val)===false){return options.long?fmtLong(val):fmtShort(val)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(val))};function parse(str){str=String(str);if(str.length>100){return}var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match){return}var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return undefined}}function fmtShort(ms){if(ms>=d){return Math.round(ms/d)+"d"}if(ms>=h){return Math.round(ms/h)+"h"}if(ms>=m){return Math.round(ms/m)+"m"}if(ms>=s){return Math.round(ms/s)+"s"}return ms+"ms"}function fmtLong(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms1){for(var i=1;i-1)device.type="ios";if(library.indexOf("android")>-1)device.type="android";return device};Facade.prototype.userAgent=Facade.proxy("context.userAgent");Facade.prototype.timezone=Facade.proxy("context.timezone");Facade.prototype.timestamp=Facade.field("timestamp");Facade.prototype.channel=Facade.field("channel");Facade.prototype.ip=Facade.proxy("context.ip");Facade.prototype.userId=Facade.field("userId");address(Facade.prototype);function transform(obj){return clone(obj)}module.exports=Facade},{"./address":97,"./is-enabled":104,"./utils":108,"@segment/isodate-traverse":44,"new-date":89,"obj-case":94}],101:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var isEmail=require("is-email");var newDate=require("new-date");var Facade=require("./facade");function Group(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Group,Facade);Group.prototype.action=function(){return"group"};Group.prototype.type=Group.prototype.action;Group.prototype.groupId=Facade.field("groupId");Group.prototype.created=function(){var created=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(created)return newDate(created)};Group.prototype.email=function(){var email=this.proxy("traits.email");if(email)return email;var groupId=this.groupId();if(isEmail(groupId))return groupId};Group.prototype.traits=function(aliases){var ret=this.properties();var id=this.groupId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=this[alias]==null?this.proxy("traits."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Group.prototype.name=Facade.proxy("traits.name");Group.prototype.industry=Facade.proxy("traits.industry");Group.prototype.employees=Facade.proxy("traits.employees");Group.prototype.properties=function(){return this.field("traits")||this.field("properties")||{}};module.exports=Group},{"./facade":100,"./utils":108,"is-email":83,"new-date":89}],102:[function(require,module,exports){"use strict";var Facade=require("./facade");var get=require("obj-case");var inherit=require("./utils").inherit;var isEmail=require("is-email");var newDate=require("new-date");var trim=require("trim");var type=require("./utils").type;function Identify(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Identify,Facade);Identify.prototype.action=function(){return"identify"};Identify.prototype.type=Identify.prototype.action;Identify.prototype.traits=function(aliases){var ret=this.field("traits")||{};var id=this.userId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=this[alias]==null?this.proxy("traits."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;if(alias!==aliases[alias])delete ret[alias]}return ret};Identify.prototype.email=function(){var email=this.proxy("traits.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Identify.prototype.created=function(){var created=this.proxy("traits.created")||this.proxy("traits.createdAt");if(created)return newDate(created)};Identify.prototype.companyCreated=function(){var created=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(created){return newDate(created)}};Identify.prototype.companyName=function(){return this.proxy("traits.company.name")};Identify.prototype.name=function(){var name=this.proxy("traits.name");if(typeof name==="string"){return trim(name)}var firstName=this.firstName();var lastName=this.lastName();if(firstName&&lastName){return trim(firstName+" "+lastName)}};Identify.prototype.firstName=function(){var firstName=this.proxy("traits.firstName");if(typeof firstName==="string"){return trim(firstName)}var name=this.proxy("traits.name");if(typeof name==="string"){return trim(name).split(" ")[0]}};Identify.prototype.lastName=function(){var lastName=this.proxy("traits.lastName");if(typeof lastName==="string"){return trim(lastName)}var name=this.proxy("traits.name");if(typeof name!=="string"){return}var space=trim(name).indexOf(" ");if(space===-1){return}return trim(name.substr(space+1))};Identify.prototype.uid=function(){return this.userId()||this.username()||this.email()};Identify.prototype.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};Identify.prototype.age=function(){var date=this.birthday();var age=get(this.traits(),"age");if(age!=null)return age;if(type(date)!=="date")return;var now=new Date;return now.getFullYear()-date.getFullYear()};Identify.prototype.avatar=function(){var traits=this.traits();return get(traits,"avatar")||get(traits,"photoUrl")||get(traits,"avatarUrl")};Identify.prototype.position=function(){var traits=this.traits();return get(traits,"position")||get(traits,"jobTitle")};Identify.prototype.username=Facade.proxy("traits.username");Identify.prototype.website=Facade.one("traits.website");Identify.prototype.websites=Facade.multi("traits.website");Identify.prototype.phone=Facade.one("traits.phone");Identify.prototype.phones=Facade.multi("traits.phone");Identify.prototype.address=Facade.proxy("traits.address");Identify.prototype.gender=Facade.proxy("traits.gender");Identify.prototype.birthday=Facade.proxy("traits.birthday");module.exports=Identify},{"./facade":100,"./utils":108,"is-email":83,"new-date":89,"obj-case":94,trim:113}],103:[function(require,module,exports){"use strict";var Facade=require("./facade");Facade.Alias=require("./alias");Facade.Group=require("./group");Facade.Identify=require("./identify");Facade.Track=require("./track");Facade.Page=require("./page");Facade.Screen=require("./screen");Facade.Delete=require("./delete");module.exports=Facade},{"./alias":98,"./delete":99,"./facade":100,"./group":101,"./identify":102,"./page":105,"./screen":106,"./track":107}],104:[function(require,module,exports){"use strict";var disabled={Salesforce:true};module.exports=function(integration){return!disabled[integration]}},{}],105:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var Facade=require("./facade");var Track=require("./track");var isEmail=require("is-email");function Page(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Page,Facade);Page.prototype.action=function(){return"page"};Page.prototype.type=Page.prototype.action;Page.prototype.category=Facade.field("category");Page.prototype.name=Facade.field("name");Page.prototype.title=Facade.proxy("properties.title");Page.prototype.path=Facade.proxy("properties.path");Page.prototype.url=Facade.proxy("properties.url");Page.prototype.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};Page.prototype.properties=function(aliases){var props=this.field("properties")||{};var category=this.category();var name=this.name();aliases=aliases||{};if(category)props.category=category;if(name)props.name=name;for(var alias in aliases){var value=this[alias]==null?this.proxy("properties."+alias):this[alias]();if(value==null)continue;props[aliases[alias]]=value;if(alias!==aliases[alias])delete props[alias]}return props};Page.prototype.email=function(){var email=this.proxy("context.traits.email")||this.proxy("properties.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Page.prototype.fullName=function(){var category=this.category();var name=this.name();return name&&category?category+" "+name:name};Page.prototype.event=function(name){return name?"Viewed "+name+" Page":"Loaded a Page"};Page.prototype.track=function(name){var json=this.json();json.event=this.event(name);json.timestamp=this.timestamp();json.properties=this.properties();return new Track(json,this.opts)};module.exports=Page},{"./facade":100,"./track":107,"./utils":108,"is-email":83}],106:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var Page=require("./page");var Track=require("./track");function Screen(dictionary,opts){Page.call(this,dictionary,opts)}inherit(Screen,Page);Screen.prototype.action=function(){return"screen"};Screen.prototype.type=Screen.prototype.action;Screen.prototype.event=function(name){return name?"Viewed "+name+" Screen":"Loaded a Screen"};Screen.prototype.track=function(name){var json=this.json();json.event=this.event(name);json.timestamp=this.timestamp();json.properties=this.properties();return new Track(json,this.opts)};module.exports=Screen},{"./page":105,"./track":107,"./utils":108}],107:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var type=require("./utils").type;var Facade=require("./facade");var Identify=require("./identify");var isEmail=require("is-email");var get=require("obj-case");function Track(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Track,Facade);Track.prototype.action=function(){return"track"};Track.prototype.type=Track.prototype.action;Track.prototype.event=Facade.field("event");Track.prototype.value=Facade.proxy("properties.value");Track.prototype.category=Facade.proxy("properties.category");Track.prototype.id=Facade.proxy("properties.id");Track.prototype.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};Track.prototype.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};Track.prototype.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};Track.prototype.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};Track.prototype.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};Track.prototype.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};Track.prototype.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};Track.prototype.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};Track.prototype.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};Track.prototype.sku=Facade.proxy("properties.sku");Track.prototype.tax=Facade.proxy("properties.tax");Track.prototype.name=Facade.proxy("properties.name");Track.prototype.price=Facade.proxy("properties.price");Track.prototype.total=Facade.proxy("properties.total");Track.prototype.repeat=Facade.proxy("properties.repeat");Track.prototype.coupon=Facade.proxy("properties.coupon");Track.prototype.shipping=Facade.proxy("properties.shipping");Track.prototype.discount=Facade.proxy("properties.discount");Track.prototype.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};Track.prototype.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};Track.prototype.description=Facade.proxy("properties.description");Track.prototype.plan=Facade.proxy("properties.plan");Track.prototype.subtotal=function(){var subtotal=get(this.properties(),"subtotal");var total=this.total()||this.revenue();if(subtotal)return subtotal;if(!total)return 0;if(this.total()){var n=this.tax();if(n)total-=n;n=this.shipping();if(n)total-=n;n=this.discount();if(n)total+=n}return total};Track.prototype.products=function(){var props=this.properties();var products=get(props,"products");return type(products)==="array"?products:[]};Track.prototype.quantity=function(){var props=this.obj.properties||{};return props.quantity||1};Track.prototype.currency=function(){var props=this.obj.properties||{};return props.currency||"USD"};Track.prototype.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};Track.prototype.query=Facade.proxy("options.query");Track.prototype.properties=function(aliases){var ret=this.field("properties")||{};aliases=aliases||{};for(var alias in aliases){var value=this[alias]==null?this.proxy("properties."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Track.prototype.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};Track.prototype.email=function(){var email=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Track.prototype.revenue=function(){var revenue=this.proxy("properties.revenue");var event=this.event();var orderCompletedRegExp=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;if(!revenue&&event&&event.match(orderCompletedRegExp)){revenue=this.proxy("properties.total")}return currency(revenue)};Track.prototype.cents=function(){var revenue=this.revenue();return typeof revenue!=="number"?this.value()||0:revenue*100};Track.prototype.identify=function(){var json=this.json();json.traits=this.traits();return new Identify(json,this.opts)};function currency(val){if(!val)return;if(typeof val==="number"){return val}if(typeof val!=="string"){return}val=val.replace(/\$/g,"");val=parseFloat(val);if(!isNaN(val)){return val}}module.exports=Track},{"./facade":100,"./identify":102,"./utils":108,"is-email":83,"obj-case":94}],108:[function(require,module,exports){"use strict";exports.inherit=require("inherits");exports.clone=require("@ndhoule/clone");exports.type=require("type-component")},{"@ndhoule/clone":27,inherits:82,"type-component":114}],109:[function(require,module,exports){module.exports=function(str,options){options||(options={});return str.toLowerCase().replace(options.replace||/[^a-z0-9]/g," ").replace(/^ +| +$/g,"").replace(/ +/g,options.separator||"-")}},{}],110:[function(require,module,exports){(function(factory){if(typeof exports==="object"){module.exports=factory()}else if(typeof define==="function"&&define.amd){define(factory)}else{var glob;try{glob=window}catch(e){glob=self}glob.SparkMD5=factory()}})(function(undefined){"use strict";var add32=function(a,b){return a+b&4294967295},hex_chr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function cmn(q,a,b,x,s,t){a=add32(add32(a,q),add32(x,t));return add32(a<>>32-s,b)}function ff(a,b,c,d,x,s,t){return cmn(b&c|~b&d,a,b,x,s,t)}function gg(a,b,c,d,x,s,t){return cmn(b&d|c&~d,a,b,x,s,t)}function hh(a,b,c,d,x,s,t){return cmn(b^c^d,a,b,x,s,t)}function ii(a,b,c,d,x,s,t){return cmn(c^(b|~d),a,b,x,s,t)}function md5cycle(x,k){var a=x[0],b=x[1],c=x[2],d=x[3];a=ff(a,b,c,d,k[0],7,-680876936);d=ff(d,a,b,c,k[1],12,-389564586);c=ff(c,d,a,b,k[2],17,606105819);b=ff(b,c,d,a,k[3],22,-1044525330);a=ff(a,b,c,d,k[4],7,-176418897);d=ff(d,a,b,c,k[5],12,1200080426);c=ff(c,d,a,b,k[6],17,-1473231341);b=ff(b,c,d,a,k[7],22,-45705983);a=ff(a,b,c,d,k[8],7,1770035416);d=ff(d,a,b,c,k[9],12,-1958414417);c=ff(c,d,a,b,k[10],17,-42063);b=ff(b,c,d,a,k[11],22,-1990404162);a=ff(a,b,c,d,k[12],7,1804603682);d=ff(d,a,b,c,k[13],12,-40341101);c=ff(c,d,a,b,k[14],17,-1502002290);b=ff(b,c,d,a,k[15],22,1236535329);a=gg(a,b,c,d,k[1],5,-165796510);d=gg(d,a,b,c,k[6],9,-1069501632);c=gg(c,d,a,b,k[11],14,643717713);b=gg(b,c,d,a,k[0],20,-373897302);a=gg(a,b,c,d,k[5],5,-701558691);d=gg(d,a,b,c,k[10],9,38016083);c=gg(c,d,a,b,k[15],14,-660478335);b=gg(b,c,d,a,k[4],20,-405537848);a=gg(a,b,c,d,k[9],5,568446438);d=gg(d,a,b,c,k[14],9,-1019803690);c=gg(c,d,a,b,k[3],14,-187363961);b=gg(b,c,d,a,k[8],20,1163531501);a=gg(a,b,c,d,k[13],5,-1444681467);d=gg(d,a,b,c,k[2],9,-51403784);c=gg(c,d,a,b,k[7],14,1735328473);b=gg(b,c,d,a,k[12],20,-1926607734);a=hh(a,b,c,d,k[5],4,-378558);d=hh(d,a,b,c,k[8],11,-2022574463);c=hh(c,d,a,b,k[11],16,1839030562);b=hh(b,c,d,a,k[14],23,-35309556);a=hh(a,b,c,d,k[1],4,-1530992060);d=hh(d,a,b,c,k[4],11,1272893353);c=hh(c,d,a,b,k[7],16,-155497632);b=hh(b,c,d,a,k[10],23,-1094730640);a=hh(a,b,c,d,k[13],4,681279174);d=hh(d,a,b,c,k[0],11,-358537222);c=hh(c,d,a,b,k[3],16,-722521979);b=hh(b,c,d,a,k[6],23,76029189);a=hh(a,b,c,d,k[9],4,-640364487);d=hh(d,a,b,c,k[12],11,-421815835);c=hh(c,d,a,b,k[15],16,530742520);b=hh(b,c,d,a,k[2],23,-995338651);a=ii(a,b,c,d,k[0],6,-198630844);d=ii(d,a,b,c,k[7],10,1126891415);c=ii(c,d,a,b,k[14],15,-1416354905);b=ii(b,c,d,a,k[5],21,-57434055);a=ii(a,b,c,d,k[12],6,1700485571);d=ii(d,a,b,c,k[3],10,-1894986606);c=ii(c,d,a,b,k[10],15,-1051523);b=ii(b,c,d,a,k[1],21,-2054922799);a=ii(a,b,c,d,k[8],6,1873313359);d=ii(d,a,b,c,k[15],10,-30611744);c=ii(c,d,a,b,k[6],15,-1560198380);b=ii(b,c,d,a,k[13],21,1309151649);a=ii(a,b,c,d,k[4],6,-145523070);d=ii(d,a,b,c,k[11],10,-1120210379);c=ii(c,d,a,b,k[2],15,718787259);b=ii(b,c,d,a,k[9],21,-343485551);x[0]=add32(a,x[0]);x[1]=add32(b,x[1]);x[2]=add32(c,x[2]);x[3]=add32(d,x[3])}function md5blk(s){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=s.charCodeAt(i)+(s.charCodeAt(i+1)<<8)+(s.charCodeAt(i+2)<<16)+(s.charCodeAt(i+3)<<24)}return md5blks}function md5blk_array(a){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=a[i]+(a[i+1]<<8)+(a[i+2]<<16)+(a[i+3]<<24)}return md5blks}function md51(s){var n=s.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk(s.substring(i-64,i)))}s=s.substring(i-64);length=s.length;tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i>2]|=s.charCodeAt(i)<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function md51_array(a){var n=a.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk_array(a.subarray(i-64,i)))}a=i-64>2]|=a[i]<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function rhex(n){var s="",j;for(j=0;j<4;j+=1){s+=hex_chr[n>>j*8+4&15]+hex_chr[n>>j*8&15]}return s}function hex(x){var i;for(i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}}if(typeof ArrayBuffer!=="undefined"&&!ArrayBuffer.prototype.slice){(function(){function clamp(val,length){val=val|0||0;if(val<0){return Math.max(val+length,0)}return Math.min(val,length)}ArrayBuffer.prototype.slice=function(from,to){var length=this.byteLength,begin=clamp(from,length),end=length,num,target,targetArray,sourceArray;if(to!==undefined){end=clamp(to,length)}if(begin>end){return new ArrayBuffer(0)}num=end-begin;target=new ArrayBuffer(num);targetArray=new Uint8Array(target);sourceArray=new Uint8Array(this,begin,num);targetArray.set(sourceArray);return target}})()}function toUtf8(str){if(/[\u0080-\uFFFF]/.test(str)){str=unescape(encodeURIComponent(str))}return str}function utf8Str2ArrayBuffer(str,returnUInt8Array){var length=str.length,buff=new ArrayBuffer(length),arr=new Uint8Array(buff),i;for(i=0;i>2]|=buff.charCodeAt(i)<<(i%4<<3)}this._finish(tail,length);ret=hex(this._hash);if(raw){ret=hexToBinaryString(ret)}this.reset();return ret};SparkMD5.prototype.reset=function(){this._buff="";this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}};SparkMD5.prototype.setState=function(state){this._buff=state.buff;this._length=state.length;this._hash=state.hash;return this};SparkMD5.prototype.destroy=function(){delete this._hash;delete this._buff;delete this._length};SparkMD5.prototype._finish=function(tail,length){var i=length,tmp,lo,hi;tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(this._hash,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=this._length*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(this._hash,tail)};SparkMD5.hash=function(str,raw){return SparkMD5.hashBinary(toUtf8(str),raw)};SparkMD5.hashBinary=function(content,raw){var hash=md51(content),ret=hex(hash);return raw?hexToBinaryString(ret):ret};SparkMD5.ArrayBuffer=function(){this.reset()};SparkMD5.ArrayBuffer.prototype.append=function(arr){var buff=concatenateArrayBuffers(this._buff.buffer,arr,true),length=buff.length,i;this._length+=arr.byteLength;for(i=64;i<=length;i+=64){md5cycle(this._hash,md5blk_array(buff.subarray(i-64,i)))}this._buff=i-64>2]|=buff[i]<<(i%4<<3)}this._finish(tail,length);ret=hex(this._hash);if(raw){ret=hexToBinaryString(ret)}this.reset();return ret};SparkMD5.ArrayBuffer.prototype.reset=function(){this._buff=new Uint8Array(0);this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.ArrayBuffer.prototype.getState=function(){var state=SparkMD5.prototype.getState.call(this);state.buff=arrayBuffer2Utf8Str(state.buff);return state};SparkMD5.ArrayBuffer.prototype.setState=function(state){state.buff=utf8Str2ArrayBuffer(state.buff,true);return SparkMD5.prototype.setState.call(this,state)};SparkMD5.ArrayBuffer.prototype.destroy=SparkMD5.prototype.destroy;SparkMD5.ArrayBuffer.prototype._finish=SparkMD5.prototype._finish;SparkMD5.ArrayBuffer.hash=function(arr,raw){var hash=md51_array(new Uint8Array(arr)),ret=hex(hash);return raw?hexToBinaryString(ret):ret};return SparkMD5})},{}],111:[function(require,module,exports){var expr;try{expr=require("props")}catch(e){expr=require("component-props")}module.exports=toFunction;function toFunction(obj){switch({}.toString.call(obj)){case"[object Object]":return objectToFunction(obj);case"[object Function]":return obj;case"[object String]":return stringToFunction(obj);case"[object RegExp]":return regexpToFunction(obj);default:return defaultToFunction(obj)}}function defaultToFunction(val){return function(obj){return val===obj}}function regexpToFunction(re){return function(obj){return re.test(obj)}}function stringToFunction(str){if(/^ *\W+/.test(str))return new Function("_","return _ "+str);return new Function("_","return "+get(str))}function objectToFunction(obj){var match={};for(var key in obj){match[key]=typeof obj[key]==="string"?defaultToFunction(obj[key]):toFunction(obj[key])}return function(val){if(typeof val!=="object")return false;for(var key in match){if(!(key in val))return false;if(!match[key](val[key]))return false}return true}}function get(str){var props=expr(str);if(!props.length)return"_."+str;var val,i,prop;for(i=0;i127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128)}else{utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128)}}return utftext}},{}],116:[function(require,module,exports){(function(global){var rng;var crypto=global.crypto||global.msCrypto;if(crypto&&crypto.getRandomValues){var _rnds8=new Uint8Array(16);rng=function whatwgRNG(){crypto.getRandomValues(_rnds8);return _rnds8}}if(!rng){var _rnds=new Array(16);rng=function(){for(var i=0,r;i<16;i++){if((i&3)===0)r=Math.random()*4294967296;_rnds[i]=r>>>((i&3)<<3)&255}return _rnds}}module.exports=rng}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],117:[function(require,module,exports){var _rng=require("./rng");var _byteToHex=[];var _hexToByte={};for(var i=0;i<256;i++){_byteToHex[i]=(i+256).toString(16).substr(1);_hexToByte[_byteToHex[i]]=i}function parse(s,buf,offset){var i=buf&&offset||0,ii=0;buf=buf||[];s.toLowerCase().replace(/[0-9a-f]{2}/g,function(oct){if(ii<16){buf[i+ii++]=_hexToByte[oct]}});while(ii<16){buf[i+ii++]=0}return buf}function unparse(buf,offset){var i=offset||0,bth=_byteToHex;return bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]}var _seedBytes=_rng();var _nodeId=[_seedBytes[0]|1,_seedBytes[1],_seedBytes[2],_seedBytes[3],_seedBytes[4],_seedBytes[5]];var _clockseq=(_seedBytes[6]<<8|_seedBytes[7])&16383;var _lastMSecs=0,_lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;var node=options.node||_nodeId;for(var n=0;n<6;n++){b[i+n]=node[n]}return buf?buf:unparse(b)}function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options=="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||_rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;ii++){buf[i+ii]=rnds[ii]}}return buf||unparse(rnds)}var uuid=v4;uuid.v1=v1;uuid.v4=v4;uuid.parse=parse;uuid.unparse=unparse;module.exports=uuid},{"./rng":116}],118:[function(require,module,exports){var unserialize=require("unserialize");var each=require("each");var storage;try{storage=window.localStorage}catch(e){storage=null}module.exports=store;function store(key,value){var length=arguments.length;if(0==length)return all();if(2<=length)return set(key,value);if(1!=length)return;if(null==key)return storage.clear();if("string"==typeof key)return get(key);if("object"==typeof key)return each(key,set)}store.supported=!!storage;function set(key,val){return null==val?storage.removeItem(key):storage.setItem(key,JSON.stringify(val))}function get(key){return unserialize(storage.getItem(key))}function all(){var len=storage.length;var ret={};var key;while(0<=--len){key=storage.key(len);ret[key]=get(key)}return ret}},{each:69,unserialize:119}],119:[function(require,module,exports){module.exports=function(val){try{return JSON.parse(val)}catch(e){return val||undefined}}},{}],120:[function(require,module,exports){module.exports={name:"@clearbit-dcp/clearbit.js",author:"Clearbit ",version:"0.0.2",description:"The hassle-free way to integrate analytics into any web application.",keywords:["analytics","clearbit.js","clearbit","clearbit.io"],main:"clearbit.js",scripts:{build:"make build",clean:"make clean",test:"make test","test:cypress":"cd example && cypress open"},repository:{type:"git",url:"https://github.com/clearbit/clearbit.js.git"},license:"SEE LICENSE IN LICENSE",bugs:{url:"https://github.com/clearbit/clearbit.js/issues"},homepage:"https://github.com/clearbit/analytics.js#readme",devDependencies:{"@clearbit-dcp/clearbit.js-core":"^0.1.0","@clearbit-dcp/clearbit.js-integration-clearbit":"^0.1.1","@segment/analytics.js-integration":"^3.1.0","@segment/eslint-config":"^3.1.1",browserify:"^13.0.1",eslint:"^2.9.0","eslint-plugin-mocha":"^2.2.0","eslint-plugin-require-path-exists":"^1.1.5","uglify-js":"^2.6.4"},dependencies:{"@percy/cypress":"^1.0.9",cypress:"^3.3.0","cypress-failed-log":"^2.5.0",deumdify:"^1.2.7",server:"^1.0.18"},resolutions:{json3:"git://github.com/clearbit/json3"}}},{}]},{},[1])(1)}); clearbit.initialize({"Clearbit":{"apiKey": "pk_82f7dd6ec9222d15650ad86f3d21ab9f"}}); while (clearbitsq && clearbitsq.length > 0) { var args = clearbitsq.shift(); var method = args.shift(); if (typeof clearbit[method] === 'function') { clearbit[method].apply(clearbit, args); } }