Skip to content

Instantly share code, notes, and snippets.

@mrienstra
Last active May 26, 2017 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrienstra/6d3f21c8cb4f7f94875851455f963b9d to your computer and use it in GitHub Desktop.
Save mrienstra/6d3f21c8cb4f7f94875851455f963b9d to your computer and use it in GitHub Desktop.
window.Attribution = window.Attribution || [];
window.Attribution.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "group", "track", "ready", "alias", "page", "once", "off", "on"];
window.Attribution.factory = function(e) {
return function() {
var t = Array.prototype.slice.call(arguments);
t.unshift(e);
window.Attribution.push(t);
return window.Attribution
}
};
for (var i = 0; i < window.Attribution.methods.length; i++) {
var key = window.Attribution.methods[i];
window.Attribution[key] = window.Attribution.factory(key)
}
window.Attribution.load = function(e) {
if (document.getElementById("attribution-js")) return;
var t = document.createElement("script");
t.type = "text/javascript";
t.id = "attribution-js";
t.async = true;
t.src = "//scripts.attributionapp.com/attribution.js";
var n = document.getElementsByTagName("script")[0];
n.parentNode.insertBefore(t, n)
};
window.Attribution.load();
window.Attribution.projectId = "LWQzKA8Wt";
window.Attribution.page();
! function(t) {
"object" == typeof exports ? module.exports = t("1") : "function" == typeof define && (define.amd || define.cmd) ? define(function() {
return t("1")
}) : this.Attribution = t("1")
}(function t(e, n, r) {
function o(t) {
if (n[t]) return n[t].exports;
if (e[t]) return i(t, o);
throw new Error('cannot find module "' + t + '"')
}
function i(o, i) {
var a = n[o] = {
exports: {}
},
s = e[o],
u = s[2],
c = s[0],
p = !0;
try {
c.call(a.exports, function(t) {
var n = e[o][1][t];
return i(n || t)
}, a, a.exports, t, e, n, r), p = !1
} finally {
p ? delete n[o] : u && (n[u] = n[o])
}
return n[o].exports
}
var a = function() {
return this
}();
for (var s in r) r[s] ? a[r[s]] = o(s) : o(s);
return o.duo = !0, o.cache = n, o.modules = e, o
}({
1: [function(t, e, n) {
var r = window.Attribution || [],
o = t("./analytics"),
i = t("./integrations"),
a = t("each"),
s = e.exports = n = new o;
for (s.require = t, n.VERSION = t("../bower.json").version, a(i, function(t, e) {
s.use(e)
}), s.initialize({
Attribution: {
project: window.Attribution.projectId
}
}), window.Attribution = s; r && r.length > 0;) {
var u = r.shift(),
c = u.shift();
s[c] && s[c].apply(s, u)
}
}, {
"./analytics": 2,
"./integrations": 3,
each: 4,
"../bower.json": 5
}],
2: [function(t, e, n) {
function r() {
this._options({}), this.Integrations = {}, this._integrations = {}, this._readied = !1, this._timeout = 300, this._user = A, this.log = f("analytics.js"), u.all(this);
var t = this;
this.on("initialize", function(e, n) {
n.initialPageview && t.page(), t._parseQuery()
})
}
var o = window.analytics,
i = t("emitter"),
a = t("facade"),
s = t("after"),
u = t("bind"),
c = t("callback"),
p = t("clone"),
l = t("./cookie"),
f = t("debug"),
d = t("defaults"),
h = t("each"),
y = t("./group"),
v = t("is"),
g = t("is-meta"),
m = t("object").keys,
b = t("./memory"),
x = t("./normalize"),
w = t("event").bind,
_ = t("./pageDefaults"),
k = t("pick"),
j = t("prevent"),
O = t("querystring"),
I = t("object").length,
S = t("./store"),
A = t("./user"),
C = a.Alias,
E = a.Group,
z = a.Identify,
T = a.Page,
N = a.Track;
n = e.exports = r, n.cookie = l, n.store = S, n.memory = b, i(r.prototype), r.prototype.use = function(t) {
return t(this), this
}, r.prototype.addIntegration = function(t) {
var e = t.prototype.name;
if (!e) throw new TypeError("attempted to add an invalid integration");
return this.Integrations[e] = t, this
}, r.prototype.init = r.prototype.initialize = function(t, e) {
t = t || {}, e = e || {}, this._options(e), this._readied = !1;
var n = this;
h(t, function(e) {
var r = n.Integrations[e];
r || delete t[e]
}), h(t, function(t, e) {
var r = n.Integrations[t],
o = new r(p(e));
n.log("initialize %o - %o", t, e), n.add(o)
});
var r = this._integrations;
A.load(), y.load();
var o = s(I(r), function() {
n._readied = !0, n.emit("ready")
});
return h(r, function(t, r) {
e.initialPageview && r.options.initialPageview === !1 && (r.page = s(2, r.page)), r.analytics = n, r.once("ready", o), r.initialize()
}), this.initialized = !0, this.emit("initialize", t, e), this
}, r.prototype.setAnonymousId = function(t) {
return this.user().anonymousId(t), this
}, r.prototype.add = function(t) {
return this._integrations[t.name] = t, this
}, r.prototype.identify = function(t, e, n, r) {
v.fn(n) && (r = n, n = null), v.fn(e) && (r = e, n = null, e = null), v.object(t) && (n = e, e = t, t = A.id()), A.identify(t, e);
var o = this.normalize({
options: n,
traits: A.traits(),
userId: A.id()
});
return this._invoke("identify", new z(o)), this.emit("identify", t, e, n), this._callback(r), this
}, r.prototype.user = function() {
return A
}, r.prototype.group = function(t, e, n, r) {
if (!arguments.length) return y;
v.fn(n) && (r = n, n = null), v.fn(e) && (r = e, n = null, e = null), v.object(t) && (n = e, e = t, t = y.id()), y.identify(t, e);
var o = this.normalize({
options: n,
traits: y.traits(),
groupId: y.id()
});
return this._invoke("group", new E(o)), this.emit("group", t, e, n), this._callback(r), this
}, r.prototype.track = function(t, e, n, r) {
v.fn(n) && (r = n, n = null), v.fn(e) && (r = e, n = null, e = null);
var o = this.options.plan || {},
i = o.track || {},
a = this.normalize({
properties: e,
options: n,
event: t
});
if (o = i[t]) {
if (this.log("plan %o - %o", t, o), o.enabled === !1) return this._callback(r);
d(a.integrations, o.integrations || {})
}
return this._invoke("track", new N(a)), this.emit("track", t, e, n), this._callback(r), this
}, r.prototype.trackClick = r.prototype.trackLink = function(t, e, n) {
if (!t) return this;
v.element(t) && (t = [t]);
var r = this;
return h(t, function(t) {
if (!v.element(t)) throw new TypeError("Must pass HTMLElement to `analytics.trackLink`.");
w(t, "click", function(o) {
var i = v.fn(e) ? e(t) : e,
a = v.fn(n) ? n(t) : n,
s = t.getAttribute("href") || t.getAttributeNS("http://www.w3.org/1999/xlink", "href") || t.getAttribute("xlink:href");
r.track(i, a), s && "_blank" !== t.target && !g(o) && (j(o), r._callback(function() {
window.location.href = s
}))
})
}), this
}, r.prototype.trackSubmit = r.prototype.trackForm = function(t, e, n) {
if (!t) return this;
v.element(t) && (t = [t]);
var r = this;
return h(t, function(t) {
function o(o) {
j(o);
var i = v.fn(e) ? e(t) : e,
a = v.fn(n) ? n(t) : n;
r.track(i, a), r._callback(function() {
t.submit()
})
}
if (!v.element(t)) throw new TypeError("Must pass HTMLElement to `analytics.trackForm`.");
var i = window.jQuery || window.Zepto;
i ? i(t).submit(o) : w(t, "submit", o)
}), this
}, r.prototype.page = function(t, e, n, r, o) {
v.fn(r) && (o = r, r = null), v.fn(n) && (o = n, r = n = null), v.fn(e) && (o = e, r = n = e = null), v.object(t) && (r = e, n = t, e = t = null), v.object(e) && (r = n, n = e, e = null), v.string(t) && !v.string(e) && (e = t, t = null), n = p(n) || {}, e && (n.name = e), t && (n.category = t);
var i = _();
d(n, i);
var a = k(m(i), n);
v.empty(a) || (r = r || {}, r.context = r.context || {}, r.context.page = a);
var s = this.normalize({
properties: n,
category: t,
options: r,
name: e
});
return this._invoke("page", new T(s)), this.emit("page", t, e, n, r), this._callback(o), this
}, r.prototype.pageview = function(t) {
var e = {};
return t && (e.path = t), this.page(e), this
}, r.prototype.alias = function(t, e, n, r) {
v.fn(n) && (r = n, n = null), v.fn(e) && (r = e, n = null, e = null), v.object(e) && (n = e, e = null);
var o = this.normalize({
options: n,
previousId: e,
userId: t
});
return this._invoke("alias", new C(o)), this.emit("alias", t, e, n), this._callback(r), this
}, r.prototype.ready = function(t) {
return v.fn(t) && (this._readied ? c.async(t) : this.once("ready", t)), this
}, r.prototype.timeout = function(t) {
this._timeout = t
}, r.prototype.debug = function(t) {
!arguments.length || t ? f.enable("analytics:" + (t || "*")) : f.disable()
}, r.prototype._options = function(t) {
return t = t || {}, this.options = t, l.options(t.cookie), S.options(t.localStorage), A.options(t.user), y.options(t.group), this
}, r.prototype._callback = function(t) {
return c.async(t, this._timeout), this
}, r.prototype._invoke = function(t, e) {
return this.emit("invoke", e), h(this._integrations, function(n, r) {
e.enabled(n) && r.invoke.call(r, t, e)
}), this
}, r.prototype.push = function(t) {
var e = t.shift();
this[e] && this[e].apply(this, t)
}, r.prototype.reset = function() {
this.user().logout(), this.group().logout()
}, r.prototype._parseQuery = function() {
var t = O.parse(window.location.search);
return t.ajs_uid && this.identify(t.ajs_uid), t.ajs_event && this.track(t.ajs_event), t.ajs_aid && A.anonymousId(t.ajs_aid), this
}, r.prototype.normalize = function(t) {
return t = x(t, m(this._integrations)), t.anonymousId && A.anonymousId(t.anonymousId), t.anonymousId = A.anonymousId(), t.context.page = d(t.context.page || {}, _()), t
}, r.prototype.noConflict = function() {
return window.analytics = o, this
}
}, {
emitter: 6,
facade: 7,
after: 8,
bind: 9,
callback: 10,
clone: 11,
"./cookie": 12,
debug: 13,
defaults: 14,
each: 4,
"./group": 15,
is: 16,
"is-meta": 17,
object: 18,
"./memory": 19,
"./normalize": 20,
event: 21,
"./pageDefaults": 22,
pick: 23,
prevent: 24,
querystring: 25,
"./store": 26,
"./user": 27
}],
6: [function(t, e, n) {
function r(t) {
return t ? o(t) : void 0
}
function o(t) {
for (var e in r.prototype) t[e] = r.prototype[e];
return t
}
var i = t("indexof");
e.exports = r, r.prototype.on = r.prototype.addEventListener = function(t, e) {
return this._callbacks = this._callbacks || {}, (this._callbacks[t] = this._callbacks[t] || []).push(e), this
}, r.prototype.once = function(t, e) {
function n() {
r.off(t, n), e.apply(this, arguments)
}
var r = this;
return this._callbacks = this._callbacks || {}, e._off = n, this.on(t, n), this
}, r.prototype.off = r.prototype.removeListener = r.prototype.removeAllListeners = r.prototype.removeEventListener = function(t, e) {
if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;
var n = this._callbacks[t];
if (!n) return this;
if (1 == arguments.length) return delete this._callbacks[t], this;
var r = i(n, e._off || e);
return ~r && n.splice(r, 1), this
}, r.prototype.emit = function(t) {
this._callbacks = this._callbacks || {};
var e = [].slice.call(arguments, 1),
n = this._callbacks[t];
if (n) {
n = n.slice(0);
for (var r = 0, o = n.length; o > r; ++r) n[r].apply(this, e)
}
return this
}, r.prototype.listeners = function(t) {
return this._callbacks = this._callbacks || {}, this._callbacks[t] || []
}, r.prototype.hasListeners = function(t) {
return !!this.listeners(t).length
}
}, {
indexof: 28
}],
28: [function(t, e, n) {
e.exports = function(t, e) {
if (t.indexOf) return t.indexOf(e);
for (var n = 0; n < t.length; ++n)
if (t[n] === e) return n;
return -1
}
}, {}],
7: [function(t, e, n) {
var r = t("./facade");
e.exports = r, r.Alias = t("./alias"), r.Group = t("./group"), r.Identify = t("./identify"), r.Track = t("./track"), r.Page = t("./page"), r.Screen = t("./screen")
}, {
"./facade": 29,
"./alias": 30,
"./group": 31,
"./identify": 32,
"./track": 33,
"./page": 34,
"./screen": 35
}],
29: [function(t, e, n) {
function r(t) {
t = s(t), t.hasOwnProperty("timestamp") ? t.timestamp = l(t.timestamp) : t.timestamp = new Date, i(t), this.obj = t
}
function o(t) {
var e = s(t);
return e
}
var i = t("isodate-traverse"),
a = t("./is-enabled"),
s = t("./utils").clone,
u = t("./utils").type,
c = t("./address"),
p = t("obj-case"),
l = t("new-date");
e.exports = r, c(r.prototype), r.prototype.proxy = function(t) {
var e = t.split(".");
t = e.shift();
var n = this[t] || this.field(t);
return n ? ("function" == typeof n && (n = n.call(this) || {}), 0 === e.length ? o(n) : (n = p(n, e.join(".")), o(n))) : n
}, r.prototype.field = function(t) {
var e = this.obj[t];
return o(e)
}, r.proxy = function(t) {
return function() {
return this.proxy(t)
}
}, r.field = function(t) {
return function() {
return this.field(t)
}
}, r.multi = function(t) {
return function() {
var e = this.proxy(t + "s");
if ("array" == u(e)) return e;
var n = this.proxy(t);
return n && (n = [s(n)]), n || []
}
}, r.one = function(t) {
return function() {
var e = this.proxy(t);
if (e) return e;
var n = this.proxy(t + "s");
return "array" == u(n) ? n[0] : void 0
}
}, r.prototype.json = function() {
var t = s(this.obj);
return this.type && (t.type = this.type()), t
}, r.prototype.context = r.prototype.options = function(t) {
var e = s(this.obj.options || this.obj.context) || {};
if (!t) return s(e);
if (this.enabled(t)) {
var n = this.integrations(),
r = n[t] || p(n, t);
return "boolean" == typeof r && (r = {}), r || {}
}
}, r.prototype.enabled = function(t) {
var e = this.proxy("options.providers.all");
"boolean" != typeof e && (e = this.proxy("options.all")), "boolean" != typeof e && (e = this.proxy("integrations.all")), "boolean" != typeof e && (e = !0);
var n = e && a(t),
r = this.integrations();
if (r.providers && r.providers.hasOwnProperty(t) && (n = r.providers[t]), r.hasOwnProperty(t)) {
var o = r[t];
n = "boolean" == typeof o ? o : !0
}
return n ? !0 : !1
}, r.prototype.integrations = function() {
return this.obj.integrations || this.proxy("options.providers") || this.options()
}, r.prototype.active = function() {
var t = this.proxy("options.active");
return (null === t || void 0 === t) && (t = !0), t
}, r.prototype.sessionId = r.prototype.anonymousId = function() {
return this.field("anonymousId") || this.field("sessionId")
}, r.prototype.groupId = r.proxy("options.groupId"), r.prototype.traits = function(t) {
var e = this.proxy("options.traits") || {},
n = this.userId();
t = t || {}, n && (e.id = n);
for (var r in t) {
var o = null == this[r] ? this.proxy("options.traits." + r) : this[r]();
null != o && (e[t[r]] = o, delete e[r])
}
return e
}, r.prototype.library = function() {
var t = this.proxy("options.library");
return t ? "string" == typeof t ? {
name: t,
version: null
} : t : {
name: "unknown",
version: null
}
}, r.prototype.userId = r.field("userId"), r.prototype.channel = r.field("channel"), r.prototype.timestamp = r.field("timestamp"), r.prototype.userAgent = r.proxy("options.userAgent"), r.prototype.ip = r.proxy("options.ip")
}, {
"isodate-traverse": 36,
"./is-enabled": 37,
"./utils": 38,
"./address": 39,
"obj-case": 40,
"new-date": 41
}],
36: [function(t, e, n) {
function r(t, e) {
return void 0 === e && (e = !0), s.object(t) ? o(t, e) : s.array(t) ? i(t, e) : t
}
function o(t, e) {
return a(t, function(n, o) {
u.is(o, e) ? t[n] = u.parse(o) : (s.object(o) || s.array(o)) && r(o, e)
}), t
}
function i(t, e) {
return a(t, function(n, o) {
s.object(n) ? r(n, e) : u.is(n, e) && (t[o] = u.parse(n))
}), t
}
var a, s = t("is"),
u = t("isodate");
try {
a = t("each")
} catch (c) {
a = t("each-component")
}
e.exports = r
}, {
is: 42,
isodate: 43,
each: 4
}],
42: [function(t, e, n) {
function r(t) {
return function(e) {
return t === i(e)
}
}
var o = t("is-empty");
try {
var i = t("type")
} catch (a) {
var i = t("component-type")
}
for (var s, u = ["arguments", "array", "boolean", "date", "element", "function", "null", "number", "object", "regexp", "string", "undefined"], c = 0; s = u[c]; c++) n[s] = r(s);
n.fn = n["function"], n.empty = o, n.nan = function(t) {
return n.number(t) && t != t
}
}, {
"is-empty": 44,
type: 45,
"component-type": 45
}],
44: [function(t, e, n) {
function r(t) {
if (null == t) return !0;
if ("number" == typeof t) return 0 === t;
if (void 0 !== t.length) return 0 === t.length;
for (var e in t)
if (o.call(t, e)) return !1;
return !0
}
e.exports = r;
var o = Object.prototype.hasOwnProperty
}, {}],
45: [function(t, e, n) {
function r(t) {
return !(null == t || !(t._isBuffer || t.constructor && "function" == typeof t.constructor.isBuffer && t.constructor.isBuffer(t)))
}
var o = Object.prototype.toString;
e.exports = function(t) {
switch (o.call(t)) {
case "[object Date]":
return "date";
case "[object RegExp]":
return "regexp";
case "[object Arguments]":
return "arguments";
case "[object Array]":
return "array";
case "[object Error]":
return "error"
}
return null === t ? "null" : void 0 === t ? "undefined" : t !== t ? "nan" : t && 1 === t.nodeType ? "element" : r(t) ? "buffer" : (t = t.valueOf ? t.valueOf() : Object.prototype.valueOf.apply(t), typeof t)
}
}, {}],
43: [function(t, e, n) {
var r = /^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;
n.parse = function(t) {
var e = [1, 5, 6, 7, 11, 12],
n = r.exec(t),
o = 0;
if (!n) return new Date(t);
for (var i, a = 0; i = e[a]; a++) n[i] = parseInt(n[i], 10) || 0;
n[2] = parseInt(n[2], 10) || 1, n[3] = parseInt(n[3], 10) || 1, n[2]--, n[8] = n[8] ? (n[8] + "00").substring(0, 3) : 0, " " == n[4] ? o = (new Date).getTimezoneOffset() : "Z" !== n[9] && n[10] && (o = 60 * n[11] + n[12], "+" == n[10] && (o = 0 - o));
var s = Date.UTC(n[1], n[2], n[3], n[5], n[6] + o, n[7], n[8]);
return new Date(s)
}, n.is = function(t, e) {
return e && !1 === /^\d{4}-\d{2}-\d{2}/.test(t) ? !1 : r.test(t)
}
}, {}],
4: [function(t, e, n) {
function r(t, e) {
for (var n = 0; n < t.length; ++n) e(t.charAt(n), n)
}
function o(t, e) {
for (var n in t) s.call(t, n) && e(n, t[n])
}
function i(t, e) {
for (var n = 0; n < t.length; ++n) e(t[n], n)
}
var a = t("type"),
s = Object.prototype.hasOwnProperty;
e.exports = function(t, e) {
switch (a(t)) {
case "array":
return i(t, e);
case "object":
return "number" == typeof t.length ? i(t, e) : o(t, e);
case "string":
return r(t, e)
}
}
}, {
type: 45
}],
37: [function(t, e, n) {
var r = {
Salesforce: !0
};
e.exports = function(t) {
return !r[t]
}
}, {}],
38: [function(t, e, n) {
try {
n.inherit = t("inherit"), n.clone = t("clone"), n.type = t("type")
} catch (r) {
n.inherit = t("inherit-component"), n.clone = t("clone-component"), n.type = t("type-component")
}
}, {
inherit: 46,
clone: 47,
type: 45
}],
46: [function(t, e, n) {
e.exports = function(t, e) {
var n = function() {};
n.prototype = e.prototype, t.prototype = new n, t.prototype.constructor = t
}
}, {}],
47: [function(t, e, n) {
function r(t) {
switch (o(t)) {
case "object":
var e = {};
for (var n in t) t.hasOwnProperty(n) && (e[n] = r(t[n]));
return e;
case "array":
for (var e = new Array(t.length), i = 0, a = t.length; a > i; i++) e[i] = r(t[i]);
return e;
case "regexp":
var s = "";
return s += t.multiline ? "m" : "", s += t.global ? "g" : "", s += t.ignoreCase ? "i" : "", new RegExp(t.source, s);
case "date":
return new Date(t.getTime());
default:
return t
}
}
var o;
try {
o = t("component-type")
} catch (i) {
o = t("type")
}
e.exports = r
}, {
"component-type": 45,
type: 45
}],
39: [function(t, e, n) {
var r = t("obj-case");
e.exports = function(t) {
function e(t, e) {
return function() {
var n = this.traits(),
o = this.properties ? this.properties() : {};
return r(n, "address." + t) || r(n, t) || (e ? r(n, "address." + e) : null) || (e ? r(n, e) : null) || r(o, "address." + t) || r(o, t) || (e ? r(o, "address." + e) : null) || (e ? r(o, e) : null)
}
}
t.zip = e("postalCode", "zip"), t.country = e("country"), t.street = e("street"), t.state = e("state"), t.city = e("city")
}
}, {
"obj-case": 40
}],
40: [function(t, e, n) {
function r(t) {
return function(e, n, r, o) {
function i() {
for (c in e) {
var t = a(c);
if (0 === n.indexOf(t)) {
var r = n.substr(t.length);
if ("." === r.charAt(0) || 0 === r.length) {
n = r.substr(1);
var o = e[c];
return null == o ? void(p = !0) : n.length ? void(e = o) : void(p = !0)
}
}
}
c = void 0, p = !0
}
var a = o && u(o.normalizer) ? o.normalizer : s;
n = a(n);
for (var c, p = !1; !p;) i();
return c ? null == e ? e : t(e, c, r) : void 0
}
}
function o(t, e) {
return t.hasOwnProperty(e) ? t[e] : void 0
}
function i(t, e) {
return t.hasOwnProperty(e) && delete t[e], t
}
function a(t, e, n) {
return t.hasOwnProperty(e) && (t[e] = n), t
}
function s(t) {
return t.replace(/[^a-zA-Z0-9\.]+/g, "").toLowerCase()
}
function u(t) {
return "function" == typeof t
}
e.exports = r(o), e.exports.find = e.exports, e.exports.replace = function(t, e, n, o) {
return r(a).call(this, t, e, n, o), t
}, e.exports.del = function(t, e, n) {
return r(i).call(this, t, e, null, n), t
}
}, {}],
41: [function(t, e, n) {
function r(t) {
return 315576e5 > t ? 1e3 * t : t
}
var o = t("is"),
i = t("isodate"),
a = t("./milliseconds"),
s = t("./seconds");
e.exports = function(t) {
return o.date(t) ? t : o.number(t) ? new Date(r(t)) : i.is(t) ? i.parse(t) : a.is(t) ? a.parse(t) : s.is(t) ? s.parse(t) : new Date(t)
}
}, {
is: 48,
isodate: 43,
"./milliseconds": 49,
"./seconds": 50
}],
48: [function(t, e, n) {
function r(t) {
return function(e) {
return t === a(e)
}
}
for (var o, i = t("is-empty"), a = t("type"), s = ["arguments", "array", "boolean", "date", "element", "function", "null", "number", "object", "regexp", "string", "undefined"], u = 0; o = s[u]; u++) n[o] = r(o);
n.fn = n["function"], n.empty = i, n.nan = function(t) {
return n.number(t) && t != t
}
}, {
"is-empty": 44,
type: 45
}],
49: [function(t, e, n) {
var r = /\d{13}/;
n.is = function(t) {
return r.test(t)
}, n.parse = function(t) {
return t = parseInt(t, 10), new Date(t)
}
}, {}],
50: [function(t, e, n) {
var r = /\d{10}/;
n.is = function(t) {
return r.test(t)
}, n.parse = function(t) {
var e = 1e3 * parseInt(t, 10);
return new Date(e)
}
}, {}],
30: [function(t, e, n) {
function r(t) {
i.call(this, t)
}
var o = t("./utils").inherit,
i = t("./facade");
e.exports = r, o(r, i), r.prototype.type = r.prototype.action = function() {
return "alias"
}, r.prototype.from = r.prototype.previousId = function() {
return this.field("previousId") || this.field("from")
}, r.prototype.to = r.prototype.userId = function() {
return this.field("userId") || this.field("to")
}
}, {
"./utils": 38,
"./facade": 29
}],
31: [function(t, e, n) {
function r(t) {
s.call(this, t)
}
var o = t("./utils").inherit,
i = (t("./address"), t("is-email")),
a = t("new-date"),
s = t("./facade");
e.exports = r, o(r, s), r.prototype.type = r.prototype.action = function() {
return "group"
}, r.prototype.groupId = s.field("groupId"), r.prototype.created = function() {
var t = this.proxy("traits.createdAt") || this.proxy("traits.created") || this.proxy("properties.createdAt") || this.proxy("properties.created");
return t ? a(t) : void 0
}, r.prototype.email = function() {
var t = this.proxy("traits.email");
if (t) return t;
var e = this.groupId();
return i(e) ? e : void 0
}, r.prototype.traits = function(t) {
var e = this.properties(),
n = this.groupId();
t = t || {}, n && (e.id = n);
for (var r in t) {
var o = null == this[r] ? this.proxy("traits." + r) : this[r]();
null != o && (e[t[r]] = o, delete e[r])
}
return e
}, r.prototype.name = s.proxy("traits.name"), r.prototype.industry = s.proxy("traits.industry"), r.prototype.employees = s.proxy("traits.employees"), r.prototype.properties = function() {
return this.field("traits") || this.field("properties") || {}
}
}, {
"./utils": 38,
"./address": 39,
"is-email": 51,
"new-date": 41,
"./facade": 29
}],
51: [function(t, e, n) {
function r(t) {
return o.test(t)
}
e.exports = r;
var o = /.+\@.+\..+/
}, {}],
32: [function(t, e, n) {
function r(t) {
o.call(this, t)
}
var o = (t("./address"), t("./facade")),
i = t("is-email"),
a = t("new-date"),
s = t("./utils"),
u = t("obj-case"),
c = t("trim"),
p = s.inherit,
l = (s.clone, s.type);
e.exports = r, p(r, o), r.prototype.type = r.prototype.action = function() {
return "identify"
}, r.prototype.traits = function(t) {
var e = this.field("traits") || {},
n = this.userId();
t = t || {}, n && (e.id = n);
for (var r in t) {
var o = null == this[r] ? this.proxy("traits." + r) : this[r]();
null != o && (e[t[r]] = o, r !== t[r] && delete e[r])
}
return e
}, r.prototype.email = function() {
var t = this.proxy("traits.email");
if (t) return t;
var e = this.userId();
return i(e) ? e : void 0
}, r.prototype.created = function() {
var t = this.proxy("traits.created") || this.proxy("traits.createdAt");
return t ? a(t) : void 0
}, r.prototype.companyCreated = function() {
var t = this.proxy("traits.company.created") || this.proxy("traits.company.createdAt");
return t ? a(t) : void 0
}, r.prototype.name = function() {
var t = this.proxy("traits.name");
if ("string" == typeof t) return c(t);
var e = this.firstName(),
n = this.lastName();
return e && n ? c(e + " " + n) : void 0
}, r.prototype.firstName = function() {
var t = this.proxy("traits.firstName");
if ("string" == typeof t) return c(t);
var e = this.proxy("traits.name");
return "string" == typeof e ? c(e).split(" ")[0] : void 0
}, r.prototype.lastName = function() {
var t = this.proxy("traits.lastName");
if ("string" == typeof t) return c(t);
var e = this.proxy("traits.name");
if ("string" == typeof e) {
var n = c(e).indexOf(" ");
if (-1 !== n) return c(e.substr(n + 1))
}
}, r.prototype.uid = function() {
return this.userId() || this.username() || this.email()
}, r.prototype.description = function() {
return this.proxy("traits.description") || this.proxy("traits.background")
}, r.prototype.age = function() {
var t = this.birthday(),
e = u(this.traits(), "age");
if (null != e) return e;
if ("date" == l(t)) {
var n = new Date;
return n.getFullYear() - t.getFullYear()
}
}, r.prototype.avatar = function() {
var t = this.traits();
return u(t, "avatar") || u(t, "photoUrl") || u(t, "avatarUrl")
}, r.prototype.position = function() {
var t = this.traits();
return u(t, "position") || u(t, "jobTitle")
}, r.prototype.username = o.proxy("traits.username"), r.prototype.website = o.one("traits.website"), r.prototype.websites = o.multi("traits.website"), r.prototype.phone = o.one("traits.phone"), r.prototype.phones = o.multi("traits.phone"), r.prototype.address = o.proxy("traits.address"), r.prototype.gender = o.proxy("traits.gender"), r.prototype.birthday = o.proxy("traits.birthday")
}, {
"./address": 39,
"./facade": 29,
"is-email": 51,
"new-date": 41,
"./utils": 38,
"obj-case": 40,
trim: 52
}],
52: [function(t, e, n) {
function r(t) {
return t.trim ? t.trim() : t.replace(/^\s*|\s*$/g, "")
}
n = e.exports = r, n.left = function(t) {
return t.trimLeft ? t.trimLeft() : t.replace(/^\s*/, "")
}, n.right = function(t) {
return t.trimRight ? t.trimRight() : t.replace(/\s*$/, "")
}
}, {}],
33: [function(t, e, n) {
function r(t) {
s.call(this, t)
}
function o(t) {
if (t) {
if ("number" == typeof t) return t;
if ("string" == typeof t) return t = t.replace(/\$/g, ""), t = parseFloat(t), isNaN(t) ? void 0 : t
}
}
var i = t("./utils").inherit,
a = (t("./utils").clone, t("./utils").type),
s = t("./facade"),
u = t("./identify"),
c = t("is-email"),
p = t("obj-case");
e.exports = r, i(r, s), r.prototype.type = r.prototype.action = function() {
return "track"
}, r.prototype.event = s.field("event"), r.prototype.value = s.proxy("properties.value"), r.prototype.category = s.proxy("properties.category"), r.prototype.id = s.proxy("properties.id"), r.prototype.sku = s.proxy("properties.sku"), r.prototype.tax = s.proxy("properties.tax"), r.prototype.name = s.proxy("properties.name"), r.prototype.price = s.proxy("properties.price"), r.prototype.total = s.proxy("properties.total"), r.prototype.coupon = s.proxy("properties.coupon"), r.prototype.shipping = s.proxy("properties.shipping"), r.prototype.discount = s.proxy("properties.discount"), r.prototype.description = s.proxy("properties.description"), r.prototype.plan = s.proxy("properties.plan"), r.prototype.orderId = function() {
return this.proxy("properties.id") || this.proxy("properties.orderId")
}, r.prototype.subtotal = function() {
var t, e = p(this.properties(), "subtotal"),
n = this.total();
return e ? e : n ? ((t = this.tax()) && (n -= t), (t = this.shipping()) && (n -= t), (t = this.discount()) && (n += t), n) : 0
}, r.prototype.products = function() {
var t = this.properties(),
e = p(t, "products");
return "array" == a(e) ? e : []
}, r.prototype.quantity = function() {
var t = this.obj.properties || {};
return t.quantity || 1
}, r.prototype.currency = function() {
var t = this.obj.properties || {};
return t.currency || "USD"
}, r.prototype.referrer = s.proxy("properties.referrer"), r.prototype.query = s.proxy("options.query"), r.prototype.properties = function(t) {
var e = this.field("properties") || {};
t = t || {};
for (var n in t) {
var r = null == this[n] ? this.proxy("properties." + n) : this[n]();
null != r && (e[t[n]] = r, delete e[n])
}
return e
}, r.prototype.username = function() {
return this.proxy("traits.username") || this.proxy("properties.username") || this.userId() || this.sessionId()
}, r.prototype.email = function() {
var t = this.proxy("traits.email");
if (t = t || this.proxy("properties.email")) return t;
var e = this.userId();
return c(e) ? e : void 0
}, r.prototype.revenue = function() {
var t = this.proxy("properties.revenue"),
e = this.event();
return !t && e && e.match(/completed ?order/i) && (t = this.proxy("properties.total")), o(t)
}, r.prototype.cents = function() {
var t = this.revenue();
return "number" != typeof t ? this.value() || 0 : 100 * t
}, r.prototype.identify = function() {
var t = this.json();
return t.traits = this.traits(), new u(t)
}
}, {
"./utils": 38,
"./facade": 29,
"./identify": 32,
"is-email": 51,
"obj-case": 40
}],
34: [function(t, e, n) {
function r(t) {
i.call(this, t)
}
var o = t("./utils").inherit,
i = t("./facade"),
a = t("./track");
e.exports = r, o(r, i), r.prototype.type = r.prototype.action = function() {
return "page"
}, r.prototype.category = i.field("category"), r.prototype.name = i.field("name"), r.prototype.title = i.proxy("properties.title"), r.prototype.path = i.proxy("properties.path"), r.prototype.url = i.proxy("properties.url"), r.prototype.referrer = function() {
return this.proxy("properties.referrer") || this.proxy("context.referrer.url")
}, r.prototype.properties = function(t) {
var e = this.field("properties") || {},
n = this.category(),
r = this.name();
t = t || {}, n && (e.category = n), r && (e.name = r);
for (var o in t) {
var i = null == this[o] ? this.proxy("properties." + o) : this[o]();
null != i && (e[t[o]] = i, o !== t[o] && delete e[o])
}
return e
}, r.prototype.fullName = function() {
var t = this.category(),
e = this.name();
return e && t ? t + " " + e : e
}, r.prototype.event = function(t) {
return t ? "Viewed " + t + " Page" : "Loaded a Page"
}, r.prototype.track = function(t) {
var e = this.properties();
return new a({
event: this.event(t),
timestamp: this.timestamp(),
context: this.context(),
properties: e
})
}
}, {
"./utils": 38,
"./facade": 29,
"./track": 33
}],
35: [function(t, e, n) {
function r(t) {
i.call(this, t)
}
var o = t("./utils").inherit,
i = t("./page"),
a = t("./track");
e.exports = r, o(r, i), r.prototype.type = r.prototype.action = function() {
return "screen"
}, r.prototype.event = function(t) {
return t ? "Viewed " + t + " Screen" : "Loaded a Screen"
}, r.prototype.track = function(t) {
var e = this.properties();
return new a({
event: this.event(t),
timestamp: this.timestamp(),
context: this.context(),
properties: e
})
}
}, {
"./utils": 38,
"./page": 34,
"./track": 33
}],
8: [function(t, e, n) {
e.exports = function(t, e) {
return 0 >= t ? e() : function() {
return --t < 1 ? e.apply(this, arguments) : void 0
}
}
}, {}],
9: [function(t, e, n) {
function r(t, e) {
e = [].slice.call(arguments, 1);
for (var n, r = 0; n = e[r]; r++) t[n] = o(t, t[n]);
return t
}
try {
var o = t("bind")
} catch (i) {
var o = t("bind-component")
}
var a = t("bind-all");
e.exports = n = o, n.all = a, n.methods = r
}, {
bind: 53,
"bind-all": 54
}],
53: [function(t, e, n) {
var r = [].slice;
e.exports = function(t, e) {
if ("string" == typeof e && (e = t[e]), "function" != typeof e) throw new Error("bind() requires a function");
var n = r.call(arguments, 2);
return function() {
return e.apply(t, n.concat(r.call(arguments)))
}
}
}, {}],
54: [function(t, e, n) {
try {
var r = t("bind"),
o = t("type")
} catch (i) {
var r = t("bind-component"),
o = t("type-component")
}
e.exports = function(t) {
for (var e in t) {
var n = t[e];
"function" === o(n) && (t[e] = r(t, t[e]))
}
return t
}
}, {
bind: 53,
type: 45
}],
10: [function(t, e, n) {
function r(t) {
"function" == typeof t && t()
}
var o = t("next-tick");
e.exports = r, r.async = function(t, e) {
return "function" == typeof t ? e ? void setTimeout(t, e) : o(t) : void 0
}, r.sync = r
}, {
"next-tick": 55
}],
55: [function(t, e, n) {
"use strict";
if ("function" == typeof setImmediate) e.exports = function(t) {
setImmediate(t)
};
else if ("undefined" != typeof process && "function" == typeof process.nextTick) e.exports = process.nextTick;
else if ("undefined" == typeof window || window.ActiveXObject || !window.postMessage) e.exports = function(t) {
setTimeout(t)
};
else {
var r = [];
window.addEventListener("message", function() {
for (var t = 0; t < r.length;) try {
r[t++]()
} catch (e) {
throw r = r.slice(t), window.postMessage("tic!", "*"), e
}
r.length = 0
}, !0), e.exports = function(t) {
r.length || window.postMessage("tic!", "*"), r.push(t)
}
}
}, {}],
11: [function(t, e, n) {
function r(t) {
switch (o(t)) {
case "object":
var e = {};
for (var n in t) t.hasOwnProperty(n) && (e[n] = r(t[n]));
return e;
case "array":
for (var e = new Array(t.length), i = 0, a = t.length; a > i; i++) e[i] = r(t[i]);
return e;
case "regexp":
var s = "";
return s += t.multiline ? "m" : "", s += t.global ? "g" : "", s += t.ignoreCase ? "i" : "", new RegExp(t.source, s);
case "date":
return new Date(t.getTime());
default:
return t
}
}
var o;
try {
o = t("type")
} catch (i) {
o = t("type-component")
}
e.exports = r
}, {
type: 45
}],
12: [function(t, e, n) {
function r(t) {
this.options(t)
}
var o = t("bind"),
i = t("clone"),
a = t("cookie"),
s = t("debug")("analytics.js:cookie"),
u = t("defaults"),
c = t("json"),
p = t("top-domain");
r.prototype.options = function(t) {
if (0 === arguments.length) return this._options;
t = t || {};
var e = "." + p(window.location.href);
"." === e && (e = null), this._options = u(t, {
maxage: 31536e6,
path: "/",
domain: e
}), this.set("ajs:test", !0), this.get("ajs:test") || (s("fallback to domain=null"), this._options.domain = null), this.remove("ajs:test")
}, r.prototype.set = function(t, e) {
try {
return e = c.stringify(e), a(t, e, i(this._options)), !0
} catch (n) {
return !1
}
}, r.prototype.get = function(t) {
try {
var e = a(t);
return e = e ? c.parse(e) : null
} catch (n) {
return null
}
}, r.prototype.remove = function(t) {
try {
return a(t, null, i(this._options)), !0
} catch (e) {
return !1
}
}, e.exports = o.all(new r), e.exports.Cookie = r
}, {
bind: 9,
clone: 11,
cookie: 56,
debug: 13,
defaults: 14,
json: 57,
"top-domain": 58
}],
56: [function(t, e, n) {
function r(t, e, n) {
n = n || {};
var r = s(t) + "=" + s(e);
null == e && (n.maxage = -1), n.maxage && (n.expires = new Date(+new Date + n.maxage)), n.path && (r += "; path=" + n.path), n.domain && (r += "; domain=" + n.domain), n.expires && (r += "; expires=" + n.expires.toUTCString()), n.secure && (r += "; secure"), document.cookie = r
}
function o() {
return a(document.cookie)
}
function i(t) {
return o()[t]
}
function a(t) {
var e, n = {},
r = t.split(/ *; */);
if ("" == r[0]) return n;
for (var o = 0; o < r.length; ++o) e = r[o].split("="), n[u(e[0])] = u(e[1]);
return n
}
function s(t) {
try {
return encodeURIComponent(t)
} catch (e) {
c("error `encode(%o)` - %o", t, e)
}
}
function u(t) {
try {
return decodeURIComponent(t)
} catch (e) {
c("error `decode(%o)` - %o", t, e)
}
}
var c = t("debug")("cookie");
e.exports = function(t, e, n) {
switch (arguments.length) {
case 3:
case 2:
return r(t, e, n);
case 1:
return i(t);
default:
return o()
}
}
}, {
debug: 13
}],
13: [function(t, e, n) {
"undefined" == typeof window ? e.exports = t("./lib/debug") : e.exports = t("./debug")
}, {
"./lib/debug": 59,
"./debug": 60
}],
59: [function(t, e, n) {
function r() {
return p[f++ % p.length]
}
function o(t) {
var e = 1e3,
n = 6e4,
r = 60 * n;
return t >= r ? (t / r).toFixed(1) + "h" : t >= n ? (t / n).toFixed(1) + "m" : t >= e ? (t / e | 0) + "s" : t + "ms"
}
function i(t) {
function e() {}
function n(e) {
e = a(e);
var n = new Date,
r = n - (l[t] || n);
l[t] = n, e = " [9" + p + "m" + t + " [3" + p + "m" + e + "[3" + p + "m +" + o(r) + "", console.error.apply(this, arguments)
}
function i(e) {
e = a(e), e = (new Date).toUTCString() + " " + t + " " + e, console.error.apply(this, arguments)
}
e.enabled = !1;
var s = c.some(function(e) {
return e.test(t)
});
if (s) return e;
if (s = u.some(function(e) {
return e.test(t)
}), !s) return e;
var p = r();
return n.enabled = i.enabled = !0, d || process.env.DEBUG_COLORS ? n : i
}
function a(t) {
return t instanceof Error ? t.stack || t.message : t
}
var s = t("tty");
e.exports = i;
var u = [],
c = [];
(process.env.DEBUG || "").split(/[\s,]+/).forEach(function(t) {
t = t.replace("*", ".*?"), "-" === t[0] ? c.push(new RegExp("^" + t.substr(1) + "$")) : u.push(new RegExp("^" + t + "$"))
});
var p = [6, 2, 3, 4, 5, 1],
l = {},
f = 0,
d = s.isatty(2)
}, {}],
60: [function(t, e, n) {
function r(t) {
return r.enabled(t) ? function(e) {
e = o(e);
var n = new Date,
i = n - (r[t] || n);
r[t] = n, e = t + " " + e + " +" + r.humanize(i), window.console && console.log && Function.prototype.apply.call(console.log, console, arguments)
} : function() {}
}
function o(t) {
return t instanceof Error ? t.stack || t.message : t
}
e.exports = r, r.names = [], r.skips = [], r.enable = function(t) {
try {
localStorage.debug = t
} catch (e) {}
for (var n = (t || "").split(/[\s,]+/), o = n.length, i = 0; o > i; i++) t = n[i].replace("*", ".*?"), "-" === t[0] ? r.skips.push(new RegExp("^" + t.substr(1) + "$")) : r.names.push(new RegExp("^" + t + "$"))
}, r.disable = function() {
r.enable("")
}, r.humanize = function(t) {
var e = 1e3,
n = 6e4,
r = 60 * n;
return t >= r ? (t / r).toFixed(1) + "h" : t >= n ? (t / n).toFixed(1) + "m" : t >= e ? (t / e | 0) + "s" : t + "ms"
}, r.enabled = function(t) {
for (var e = 0, n = r.skips.length; n > e; e++)
if (r.skips[e].test(t)) return !1;
for (var e = 0, n = r.names.length; n > e; e++)
if (r.names[e].test(t)) return !0;
return !1
};
try {
window.localStorage && r.enable(localStorage.debug)
} catch (i) {}
}, {}],
14: [function(t, e, n) {
"use strict";
var r = function(t, e, n) {
for (var o in e) n && t[o] instanceof Object && e[o] instanceof Object ? t[o] = r(t[o], e[o], !0) : o in t || (t[o] = e[o]);
return t
};
e.exports = r
}, {}],
57: [function(t, e, n) {
var r = window.JSON || {},
o = r.stringify,
i = r.parse;
e.exports = i && o ? JSON : t("json-fallback")
}, {
"json-fallback": 61
}],
61: [function(require, module, exports) {
! function() {
"use strict";
function f(t) {
return 10 > t ? "0" + t : t
}
function quote(t) {
return escapable.lastIndex = 0, escapable.test(t) ? '"' + t.replace(escapable, function(t) {
var e = meta[t];
return "string" == typeof e ? e : "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice(-4)
}) + '"' : '"' + t + '"'
}
function str(t, e) {
var n, r, o, i, a, s = gap,
u = e[t];
switch (u && "object" == typeof u && "function" == typeof u.toJSON && (u = u.toJSON(t)), "function" == typeof rep && (u = rep.call(e, t, u)), typeof u) {
case "string":
return quote(u);
case "number":
return isFinite(u) ? String(u) : "null";
case "boolean":
case "null":
return String(u);
case "object":
if (!u) return "null";
if (gap += indent, a = [], "[object Array]" === Object.prototype.toString.apply(u)) {
for (i = u.length, n = 0; i > n; n += 1) a[n] = str(n, u) || "null";
return o = 0 === a.length ? "[]" : gap ? "[\n" + gap + a.join(",\n" + gap) + "\n" + s + "]" : "[" + a.join(",") + "]", gap = s, o
}
if (rep && "object" == typeof rep)
for (i = rep.length, n = 0; i > n; n += 1) "string" == typeof rep[n] && (r = rep[n], o = str(r, u), o && a.push(quote(r) + (gap ? ": " : ":") + o));
else
for (r in u) Object.prototype.hasOwnProperty.call(u, r) && (o = str(r, u), o && a.push(quote(r) + (gap ? ": " : ":") + o));
return o = 0 === a.length ? "{}" : gap ? "{\n" + gap + a.join(",\n" + gap) + "\n" + s + "}" : "{" + a.join(",") + "}", gap = s, o
}
}
var JSON = module.exports = {};
"function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() {
return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null
}, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
return this.valueOf()
});
var cx, escapable, gap, indent, meta, rep;
"function" != typeof JSON.stringify && (escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, meta = {
"\b": "\\b",
" ": "\\t",
"\n": "\\n",
"\f": "\\f",
"\r": "\\r",
'"': '\\"',
"\\": "\\\\"
}, JSON.stringify = function(t, e, n) {
var r;
if (gap = "", indent = "", "number" == typeof n)
for (r = 0; n > r; r += 1) indent += " ";
else "string" == typeof n && (indent = n);
if (rep = e, e && "function" != typeof e && ("object" != typeof e || "number" != typeof e.length)) throw new Error("JSON.stringify");
return str("", {
"": t
})
}), "function" != typeof JSON.parse && (cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, JSON.parse = function(text, reviver) {
function walk(t, e) {
var n, r, o = t[e];
if (o && "object" == typeof o)
for (n in o) Object.prototype.hasOwnProperty.call(o, n) && (r = walk(o, n), void 0 !== r ? o[n] = r : delete o[n]);
return reviver.call(t, e, o)
}
var j;
if (text = String(text), cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx, function(t) {
return "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice(-4)
})), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"), "function" == typeof reviver ? walk({
"": j
}, "") : j;
throw new SyntaxError("JSON.parse")
})
}()
}, {}],
58: [function(t, e, n) {
function r(t) {
for (var e = n.cookie, r = n.levels(t), o = 0; o < r.length; ++o) {
var i = "__tld__",
a = r[o],
s = {
domain: "." + a
};
if (e(i, 1, s), e(i)) return e(i, null, s), a
}
return ""
}
var o = t("url").parse,
i = t("cookie");
n = e.exports = r, n.cookie = i, r.levels = function(t) {
var e = o(t).hostname,
n = e.split("."),
r = n[n.length - 1],
i = [];
if (4 == n.length && parseInt(r, 10) == r) return i;
if (1 >= n.length) return i;
for (var a = n.length - 2; a >= 0; --a) i.push(n.slice(a).join("."));
return i
}
}, {
url: 62,
cookie: 63
}],
62: [function(t, e, n) {
function r(t) {
switch (t) {
case "http:":
return 80;
case "https:":
return 443;
default:
return location.port
}
}
n.parse = function(t) {
var e = document.createElement("a");
return e.href = t, {
href: e.href,
host: e.host || location.host,
port: "0" === e.port || "" === e.port ? r(e.protocol) : e.port,
hash: e.hash,
hostname: e.hostname || location.hostname,
pathname: "/" != e.pathname.charAt(0) ? "/" + e.pathname : e.pathname,
protocol: e.protocol && ":" != e.protocol ? e.protocol : location.protocol,
search: e.search,
query: e.search.slice(1)
}
}, n.isAbsolute = function(t) {
return 0 == t.indexOf("//") || !!~t.indexOf("://")
}, n.isRelative = function(t) {
return !n.isAbsolute(t)
}, n.isCrossDomain = function(t) {
t = n.parse(t);
var e = n.parse(window.location.href);
return t.hostname !== e.hostname || t.port !== e.port || t.protocol !== e.protocol
}
}, {}],
63: [function(t, e, n) {
function r(t, e, n) {
n = n || {};
var r = s(t) + "=" + s(e);
null == e && (n.maxage = -1), n.maxage && (n.expires = new Date(+new Date + n.maxage)), n.path && (r += "; path=" + n.path), n.domain && (r += "; domain=" + n.domain), n.expires && (r += "; expires=" + n.expires.toUTCString()), n.secure && (r += "; secure"), document.cookie = r
}
function o() {
var t;
try {
t = document.cookie
} catch (e) {
return "undefined" != typeof console && "function" == typeof console.error && console.error(e.stack || e), {}
}
return a(t)
}
function i(t) {
return o()[t]
}
function a(t) {
var e, n = {},
r = t.split(/ *; */);
if ("" == r[0]) return n;
for (var o = 0; o < r.length; ++o) e = r[o].split("="), n[u(e[0])] = u(e[1]);
return n
}
function s(t) {
try {
return encodeURIComponent(t)
} catch (e) {
c("error `encode(%o)` - %o", t, e)
}
}
function u(t) {
try {
return decodeURIComponent(t)
} catch (e) {
c("error `decode(%o)` - %o", t, e)
}
}
var c = t("debug")("cookie");
e.exports = function(t, e, n) {
switch (arguments.length) {
case 3:
case 2:
return r(t, e, n);
case 1:
return i(t);
default:
return o()
}
}
}, {
debug: 13
}],
15: [function(t, e, n) {
function r(t) {
this.defaults = r.defaults, this.debug = a, o.call(this, t)
}
var o = t("./entity"),
i = t("bind"),
a = t("debug")("analytics:group"),
s = t("inherit");
r.defaults = {
persist: !0,
cookie: {
key: "_attrg"
},
localStorage: {
key: "attr_group_properties"
}
}, s(r, o), e.exports = i.all(new r), e.exports.Group = r
}, {
"./entity": 64,
bind: 9,
debug: 13,
inherit: 65
}],
64: [function(t, e, n) {
function r(t) {
this.options(t), this.initialize()
}
var o = t("clone"),
i = t("./cookie"),
a = t("debug")("analytics:entity"),
s = t("defaults"),
u = t("extend"),
c = t("./memory"),
p = t("./store"),
l = t("isodate-traverse");
e.exports = r, r.prototype.initialize = function() {
return i.set("ajs:cookies", !0), i.get("ajs:cookies") ? (i.remove("ajs:cookies"), void(this._storage = i)) : p.enabled ? void(this._storage = p) : (a("warning using memory store both cookies and localStorage are disabled"), void(this._storage = c))
}, r.prototype.storage = function() {
return this._storage
}, r.prototype.options = function(t) {
return 0 === arguments.length ? this._options : void(this._options = s(t || {}, this.defaults || {}))
}, r.prototype.id = function(t) {
switch (arguments.length) {
case 0:
return this._getId();
case 1:
return this._setId(t)
}
}, r.prototype._getId = function() {
var t = this._options.persist ? this.storage().get(this._options.cookie.key) : this._id;
return void 0 === t ? null : t
}, r.prototype._setId = function(t) {
this._options.persist ? this.storage().set(this._options.cookie.key, t) : this._id = t
}, r.prototype.properties = r.prototype.traits = function(t) {
switch (arguments.length) {
case 0:
return this._getTraits();
case 1:
return this._setTraits(t)
}
}, r.prototype._getTraits = function() {
var t = this._options.persist ? p.get(this._options.localStorage.key) : this._traits;
return t ? l(o(t)) : {}
}, r.prototype._setTraits = function(t) {
t = t || {}, this._options.persist ? p.set(this._options.localStorage.key, t) : this._traits = t
}, r.prototype.identify = function(t, e) {
e = e || {};
var n = this.id();
(null === n || n === t) && (e = u(this.traits(), e)), t && this.id(t), this.debug("identify %o, %o", t, e), this.traits(e), this.save()
}, r.prototype.save = function() {
return this._options.persist ? (i.set(this._options.cookie.key, this.id()), p.set(this._options.localStorage.key, this.traits()), !0) : !1
}, r.prototype.logout = function() {
this.id(null), this.traits({}), i.remove(this._options.cookie.key), p.remove(this._options.localStorage.key)
}, r.prototype.reset = function() {
this.logout(), this.options({})
}, r.prototype.load = function() {
this.id(i.get(this._options.cookie.key)), this.traits(p.get(this._options.localStorage.key))
}
}, {
clone: 11,
"./cookie": 12,
debug: 13,
defaults: 14,
extend: 66,
"./memory": 19,
"./store": 26,
"isodate-traverse": 36
}],
66: [function(t, e, n) {
e.exports = function(t) {
for (var e, n = Array.prototype.slice.call(arguments, 1), r = 0; e = n[r]; r++)
if (e)
for (var o in e) t[o] = e[o];
return t
}
}, {}],
19: [function(t, e, n) {
function r() {
this.store = {}
}
var o = t("bind"),
i = t("clone"),
a = Object.prototype.hasOwnProperty;
e.exports = o.all(new r), r.prototype.set = function(t, e) {
return this.store[t] = i(e), !0
}, r.prototype.get = function(t) {
return a.call(this.store, t) ? i(this.store[t]) : void 0
}, r.prototype.remove = function(t) {
return delete this.store[t], !0
}
}, {
bind: 9,
clone: 11
}],
26: [function(t, e, n) {
function r(t) {
this.options(t)
}
var o = t("bind"),
i = t("defaults"),
a = t("store.js");
r.prototype.options = function(t) {
return 0 === arguments.length ? this._options : (t = t || {}, i(t, {
enabled: !0
}), this.enabled = t.enabled && a.enabled, void(this._options = t))
}, r.prototype.set = function(t, e) {
return this.enabled ? a.set(t, e) : !1
}, r.prototype.get = function(t) {
return this.enabled ? a.get(t) : null
}, r.prototype.remove = function(t) {
return this.enabled ? a.remove(t) : !1
}, e.exports = o.all(new r), e.exports.Store = r
}, {
bind: 9,
defaults: 14,
"store.js": 67
}],
67: [function(t, e, n) {
function r() {
try {
return l in c && c[l]
} catch (t) {
return !1
}
}
function o(t) {
return function() {
var e = Array.prototype.slice.call(arguments, 0);
e.unshift(a), d.appendChild(a), a.addBehavior("#default#userData"), a.load(l);
var n = t.apply(u, e);
return d.removeChild(a), n
}
}
function i(t) {
return t.replace(v, "___")
}
var a, s = t("json"),
u = {},
c = window,
p = c.document,
l = "localStorage",
f = "__storejs__";
if (u.disabled = !1, u.set = function(t, e) {}, u.get = function(t) {}, u.remove = function(t) {}, u.clear = function() {}, u.transact = function(t, e, n) {
var r = u.get(t);
null == n && (n = e, e = null), "undefined" == typeof r && (r = e || {}), n(r), u.set(t, r)
}, u.getAll = function() {}, u.serialize = function(t) {
return s.stringify(t)
}, u.deserialize = function(t) {
if ("string" != typeof t) return void 0;
try {
return s.parse(t)
} catch (e) {
return t || void 0
}
}, r()) a = c[l], u.set = function(t, e) {
return void 0 === e ? u.remove(t) : (a.setItem(t, u.serialize(e)), e)
}, u.get = function(t) {
return u.deserialize(a.getItem(t))
}, u.remove = function(t) {
a.removeItem(t)
}, u.clear = function() {
a.clear()
}, u.getAll = function() {
for (var t = {}, e = 0; e < a.length; ++e) {
var n = a.key(e);
t[n] = u.get(n)
}
return t
};
else if (p.documentElement.addBehavior) {
var d, h;
try {
h = new ActiveXObject("htmlfile"), h.open(), h.write('<script>document.w=window</script><iframe src="/favicon.ico"></iframe>'), h.close(), d = h.w.frames[0].document, a = d.createElement("div")
} catch (y) {
a = p.createElement("div"), d = p.body
}
var v = new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g");
u.set = o(function(t, e, n) {
return e = i(e), void 0 === n ? u.remove(e) : (t.setAttribute(e, u.serialize(n)), t.save(l), n)
}), u.get = o(function(t, e) {
return e = i(e), u.deserialize(t.getAttribute(e))
}), u.remove = o(function(t, e) {
e = i(e), t.removeAttribute(e), t.save(l)
}), u.clear = o(function(t) {
var e = t.XMLDocument.documentElement.attributes;
t.load(l);
for (var n, r = 0; n = e[r]; r++) t.removeAttribute(n.name);
t.save(l)
}), u.getAll = o(function(t) {
for (var e, n = t.XMLDocument.documentElement.attributes, r = {}, o = 0; e = n[o]; ++o) {
var a = i(e.name);
r[e.name] = u.deserialize(t.getAttribute(a))
}
return r
})
}
try {
u.set(f, f), u.get(f) != f && (u.disabled = !0), u.remove(f)
} catch (y) {
u.disabled = !0
}
u.enabled = !u.disabled, e.exports = u
}, {
json: 57
}],
65: [function(t, e, n) {
e.exports = function(t, e) {
var n = function() {};
n.prototype = e.prototype, t.prototype = new n, t.prototype.constructor = t
}
}, {}],
16: [function(t, e, n) {
function r(t) {
return function(e) {
return t === i(e)
}
}
var o = t("is-empty");
try {
var i = t("type")
} catch (a) {
var i = t("component-type")
}
for (var s, u = ["arguments", "array", "boolean", "date", "element", "function", "null", "number", "object", "regexp", "string", "undefined"], c = 0; s = u[c]; c++) n[s] = r(s);
n.fn = n["function"], n.empty = o, n.nan = function(t) {
return n.number(t) && t != t
}
}, {
"is-empty": 44,
type: 45,
"component-type": 45
}],
17: [function(t, e, n) {
e.exports = function(t) {
if (t.metaKey || t.altKey || t.ctrlKey || t.shiftKey) return !0;
var e = t.which,
n = t.button;
return e || void 0 === n ? 2 === e ? !0 : !1 : 1 & !n && 2 & !n && 4 & n
}
}, {}],
18: [function(t, e, n) {
var r = Object.prototype.hasOwnProperty;
n.keys = Object.keys || function(t) {
var e = [];
for (var n in t) r.call(t, n) && e.push(n);
return e
}, n.values = function(t) {
var e = [];
for (var n in t) r.call(t, n) && e.push(t[n]);
return e
}, n.merge = function(t, e) {
for (var n in e) r.call(e, n) && (t[n] = e[n]);
return t
}, n.length = function(t) {
return n.keys(t).length
}, n.isEmpty = function(t) {
return 0 == n.length(t)
}
}, {}],
20: [function(t, e, n) {
function r(t, e) {
function n(t) {
return !(!s(t, e) && "all" !== t.toLowerCase() && !s(t.toLowerCase(), r))
}
var r = c(e, function(t) {
return t.toLowerCase()
}),
f = t.options || {},
d = f.integrations || {},
h = f.providers || {},
y = f.context || {},
v = {};
return o("<-", t), a(f, function(t, e) {
n(t) && (p.call(d, t) || (d[t] = e), delete f[t])
}), delete f.providers, a(h, function(t, e) {
n(t) && (u.object(d[t]) || p.call(d, t) && "boolean" == typeof h[t] || (d[t] = e))
}), a(f, function(t) {
s(t, l) ? v[t] = f[t] : y[t] = f[t]
}), delete t.options, v.integrations = d, v.context = y, v = i(v, t), o("->", v), v
}
var o = t("debug")("analytics.js:normalize"),
i = t("defaults"),
a = t("each"),
s = t("includes"),
u = t("is"),
c = t("component/map"),
p = Object.prototype.hasOwnProperty;
e.exports = r;
var l = ["integrations", "anonymousId", "timestamp", "context"]
}, {
debug: 13,
defaults: 14,
each: 4,
includes: 68,
is: 16,
"component/map": 69
}],
68: [function(t, e, n) {
"use strict";
var r;
try {
r = t("@ndhoule/each")
} catch (o) {
r = t("each")
}
var i = String.prototype.indexOf,
a = function(t, e) {
return t === e ? 0 !== t || 1 / t === 1 / e : t !== t && e !== e
},
s = function(t, e) {
var n = !1;
return "string" == typeof e ? -1 !== i.call(e, t) : (r(function(e) {
return a(e, t) ? (n = !0, !1) : void 0
}, e), n)
};
e.exports = s
}, {
each: 70
}],
70: [function(t, e, n) {
"use strict";
var r;
try {
r = t("@ndhoule/keys")
} catch (o) {
r = t("keys")
}
var i = Object.prototype.toString,
a = function(t) {
var e = typeof t;
return "number" === e || "object" === e && "[object Number]" === i.call(t)
},
s = "function" == typeof Array.isArray ? Array.isArray : function(t) {
return "[object Array]" === i.call(t)
},
u = function(t) {
return null != t && (s(t) || "function" !== t && a(t.length))
},
c = function(t, e) {
for (var n = 0; n < e.length && t(e[n], n, e) !== !1; n += 1);
},
p = function(t, e) {
for (var n = r(e), o = 0; o < n.length && t(e[n[o]], n[o], e) !== !1; o += 1);
},
l = function(t, e) {
return (u(e) ? c : p).call(this, t, e)
};
e.exports = l
}, {
keys: 71
}],
71: [function(t, e, n) {
"use strict";
var r = String.prototype.charAt,
o = function(t, e) {
return r.call(t, e)
},
i = Object.prototype.hasOwnProperty,
a = Object.prototype.toString,
s = function(t, e) {
return i.call(t, e)
},
u = function(t) {
return "[object String]" === a.call(t)
},
c = function(t) {
return null != t && "function" != typeof t && "number" == typeof t.length
},
p = function(t, e) {
e = e || s;
for (var n = [], r = 0, o = t.length; o > r; r += 1) e(t, r) && n.push(String(r));
return n
},
l = function(t, e) {
e = e || s;
var n = [];
for (var r in t) e(t, r) && n.push(String(r));
return n
};
e.exports = function(t) {
return null == t ? [] : u(t) ? p(t, o) : c(t) ? p(t, s) : l(t)
}
}, {}],
69: [function(t, e, n) {
var r = t("to-function");
e.exports = function(t, e) {
var n = [];
e = r(e);
for (var o = 0; o < t.length; ++o) n.push(e(t[o], o));
return n
}
}, {
"to-function": 72
}],
72: [function(t, e, n) {
function r(t) {
switch ({}.toString.call(t)) {
case "[object Object]":
return s(t);
case "[object Function]":
return t;
case "[object String]":
return a(t);
case "[object RegExp]":
return i(t);
default:
return o(t)
}
}
function o(t) {
return function(e) {
return t === e
}
}
function i(t) {
return function(e) {
return t.test(e)
}
}
function a(t) {
return /^ *\W+/.test(t) ? new Function("_", "return _ " + t) : new Function("_", "return " + u(t))
}
function s(t) {
var e = {};
for (var n in t) e[n] = "string" == typeof t[n] ? o(t[n]) : r(t[n]);
return function(t) {
if ("object" != typeof t) return !1;
for (var n in e) {
if (!(n in t)) return !1;
if (!e[n](t[n])) return !1
}
return !0
}
}
function u(t) {
var e = p(t);
if (!e.length) return "_." + t;
var n, r, o;
for (r = 0; r < e.length; r++) o = e[r], n = "_." + o, n = "('function' == typeof " + n + " ? " + n + "() : " + n + ")", t = c(o, t, n);
return t
}
function c(t, e, n) {
return e.replace(new RegExp("(\\.)?" + t, "g"), function(t, e) {
return e ? t : n
})
}
var p;
try {
p = t("props")
} catch (l) {
p = t("component-props")
}
e.exports = r
}, {
props: 73,
"component-props": 73
}],
73: [function(t, e, n) {
function r(t) {
return t.replace(/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^\/]+)\//g, "").replace(s, "").match(/[$a-zA-Z_]\w*/g) || []
}
function o(t, e, n) {
var r = /\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^\/]+)\/|[a-zA-Z_]\w*/g;
return t.replace(r, function(t) {
return "(" == t[t.length - 1] ? n(t) : ~e.indexOf(t) ? n(t) : t
})
}
function i(t) {
for (var e = [], n = 0; n < t.length; n++) ~e.indexOf(t[n]) || e.push(t[n]);
return e
}
function a(t) {
return function(e) {
return t + e
}
}
var s = /\b(this|Array|Date|Object|Math|JSON)\b/g;
e.exports = function(t, e) {
var n = i(r(t));
return e && "string" == typeof e && (e = a(e)), e ? o(t, n, e) : n
}
}, {}],
21: [function(t, e, n) {
n.bind = function(t, e, n, r) {
return t.addEventListener ? t.addEventListener(e, n, r || !1) : t.attachEvent("on" + e, n), n
}, n.unbind = function(t, e, n, r) {
return t.removeEventListener ? t.removeEventListener(e, n, r || !1) : t.detachEvent("on" + e, n), n
}
}, {}],
22: [function(t, e, n) {
function r() {
return {
path: o(),
referrer: document.referrer,
search: location.search,
title: document.title,
url: i(location.search)
}
}
function o() {
var t = a();
if (!t) return window.location.pathname;
var e = u.parse(t);
return e.pathname
}
function i(t) {
var e = a();
if (e) return s("?", e) ? e : e + t;
var n = window.location.href,
r = n.indexOf("#");
return -1 === r ? n : n.slice(0, r)
}
var a = t("canonical"),
s = t("includes"),
u = t("url");
e.exports = r
}, {
canonical: 74,
includes: 68,
url: 75
}],
74: [function(t, e, n) {
e.exports = function() {
for (var t, e = document.getElementsByTagName("link"), n = 0; t = e[n]; n++)
if ("canonical" == t.getAttribute("rel")) return t.getAttribute("href")
}
}, {}],
75: [function(t, e, n) {
function r(t) {
switch (t) {
case "http:":
return 80;
case "https:":
return 443;
default:
return location.port
}
}
n.parse = function(t) {
var e = document.createElement("a");
return e.href = t, {
href: e.href,
host: e.host || location.host,
port: "0" === e.port || "" === e.port ? r(e.protocol) : e.port,
hash: e.hash,
hostname: e.hostname || location.hostname,
pathname: "/" != e.pathname.charAt(0) ? "/" + e.pathname : e.pathname,
protocol: e.protocol && ":" != e.protocol ? e.protocol : location.protocol,
search: e.search,
query: e.search.slice(1)
}
}, n.isAbsolute = function(t) {
return 0 == t.indexOf("//") || !!~t.indexOf("://")
}, n.isRelative = function(t) {
return !n.isAbsolute(t)
}, n.isCrossDomain = function(t) {
t = n.parse(t);
var e = n.parse(window.location.href);
return t.hostname !== e.hostname || t.port !== e.port || t.protocol !== e.protocol
}
}, {}],
23: [function(t, e, n) {
"use strict";
var r = Object.prototype.toString,
o = function(t) {
return null != t
},
i = function(t) {
return "[object Array]" === r.call(t)
},
a = function(t) {
return "string" == typeof t || "[object String]" === r.call(t)
},
s = function(t) {
return null != t && "object" == typeof t
},
u = function(t, e) {
if (!o(e) || !s(e)) return {};
a(t) && (t = [t]), i(t) || (t = []);
for (var n = {}, r = 0; r < t.length; r += 1) a(t[r]) && t[r] in e && (n[t[r]] = e[t[r]]);
return n
};
e.exports = u
}, {}],
24: [function(t, e, n) {
e.exports = function(t) {
return t = t || window.event, t.preventDefault ? t.preventDefault() : t.returnValue = !1
}
}, {}],
25: [function(t, e, n) {
var r = encodeURIComponent,
o = decodeURIComponent,
i = t("trim"),
a = t("type");
n.parse = function(t) {
if ("string" != typeof t) return {};
if (t = i(t), "" == t) return {};
"?" == t.charAt(0) && (t = t.slice(1));
for (var e = {}, n = t.split("&"), r = 0; r < n.length; r++) {
var a, s = n[r].split("="),
u = o(s[0]);
(a = /(\w+)\[(\d+)\]/.exec(u)) ? (e[a[1]] = e[a[1]] || [], e[a[1]][a[2]] = o(s[1])) : e[s[0]] = null == s[1] ? "" : o(s[1])
}
return e
}, n.stringify = function(t) {
if (!t) return "";
var e = [];
for (var n in t) {
var o = t[n];
if ("array" != a(o)) e.push(r(n) + "=" + r(t[n]));
else
for (var i = 0; i < o.length; ++i) e.push(r(n + "[" + i + "]") + "=" + r(o[i]))
}
return e.join("&")
}
}, {
trim: 52,
type: 45
}],
27: [function(t, e, n) {
function r(t) {
this.defaults = r.defaults, this.debug = s, o.call(this, t)
}
var o = t("./entity"),
i = t("bind"),
a = t("./cookie"),
s = t("debug")("analytics:user"),
u = t("inherit"),
c = t("cookie"),
p = t("uuid");
r.defaults = {
persist: !0,
cookie: {
key: "_attru",
oldKey: "none"
},
localStorage: {
key: "attr_user_traits"
}
}, u(r, o), r.prototype.id = function(t) {
var e = this._getId(),
n = o.prototype.id.apply(this, arguments);
return null == e ? n : (e != t && t && this.anonymousId(null), n)
}, r.prototype.anonymousId = function(t) {
var e = this.storage();
return arguments.length ? (e.set("_attrb", t), this) : (t = e.get("_attrb")) ? t : (t = c("_attrb")) ? (t = t.split("----")[0], e.set("_attrb", t), t) : (t = p(), e.set("_attrb", t), e.get("_attrb"))
}, r.prototype.logout = function() {
o.prototype.logout.call(this), this.anonymousId(null)
}, r.prototype.load = function() {
this._loadOldCookie() || o.prototype.load.call(this)
}, r.prototype._loadOldCookie = function() {
var t = a.get(this._options.cookie.oldKey);
return t ? (this.id(t.id), this.traits(t.traits), a.remove(this._options.cookie.oldKey), !0) : !1
}, e.exports = i.all(new r), e.exports.User = r
}, {
"./entity": 64,
bind: 9,
"./cookie": 12,
debug: 13,
inherit: 65,
cookie: 56,
uuid: 76
}],
76: [function(t, e, n) {
e.exports = function r(t) {
return t ? (t ^ 16 * Math.random() >> t / 4).toString(16) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, r)
}
}, {}],
3: [function(t, e, n) {
"use strict";
e.exports = {
attribution: t("attribution/analytics.js-integration-attribution@0.0.5")
}
}, {
"attribution/analytics.js-integration-attribution@0.0.5": 77
}],
77: [function(t, e, n) {
function r() {
return "http:" === c() ? "http:" : "https:"
}
function o() {}
var i = t("clone"),
a = t("cookie"),
s = (t("extend"), t("segmentio/analytics.js-integration@1.0.1")),
u = (t("segmentio/json@1.0.0"), t("store")),
c = t("segmentio/protocol"),
p = t("yields/send-json"),
l = t("top-domain"),
f = t("uuid"),
d = (t("ForbesLindesay/base64-encode"), t("has-cors")),
h = {
maxage: 31536e6,
secure: !1,
path: "/"
},
y = n = e.exports = s("Attribution").option("project", "");
n.storage = function() {
return "file:" === c() || "chrome-extension:" === c() ? u : a
}, n.global = window, y.prototype.initialize = function() {
var t = this;
this.ready(), this.analytics.on("invoke", function(e) {
var n = e.action(),
r = "on" + e.action();
t.debug("%s %o", n, e), t[r] && t[r](e), t.ready()
})
}, y.prototype.loaded = function() {
return !0
}, y.prototype.onpage = function(t) {
void 0 === t.obj.event && (t.obj.event = t.event()), this.send("/track", t.json())
}, y.prototype.onidentify = function(t) {
this.send("/identify", t.json())
}, y.prototype.ontrack = function(t) {
this.send("/track", t.json())
}, y.prototype.onalias = function(t) {
var e = t.json(),
n = this.analytics.user();
e.previousId = e.previous_id = e.previousId || e.from || n.id() || n.anonymousId(), e.userId = e.userId || e.to, delete e.from, delete e.to, this.send("/alias", e)
}, y.prototype.normalize = function(t) {
this.debug("normalize %o", t);
var e = this.analytics.user(),
r = n.global,
o = (r.location.search, t.context = t.context || t.options || {});
return delete t.options, o.userAgent = navigator.userAgent, t.userId = t.user_id = t.userId || e.id(), t.anonymousId = t.cookie_id = e.anonymousId(), t.messageId = f(), t.sentAt = new Date, this.debug("normalized %o", t), t
}, y.prototype.send = function(t, e, n) {
var i = r() + "//track.attributionapp.com" + t,
a = this.options.project || window.Attribution.projectId;
d && (i += "?project_id=" + a), e.project_id = a, n = n || o;
var s = this;
e = this.normalize(e), p(i, e, function(t, r) {
return s.debug("sent %O, received %O", e, arguments), t ? n(t) : (r.url = i, void n(null, r))
})
}, y.prototype.cookie = function(t, e) {
var r = y.storage();
if (1 === arguments.length) return r(t);
var o = n.global,
a = o.location.href,
s = "." + l(a);
"." === s && (s = ""), this.debug("store domain %s -> %s", a, s);
var u = i(h);
u.domain = s, this.debug("store %s, %s, %o", t, e, u), r(t, e, u), r(t) || (delete u.domain, this.debug("fallback store %s, %s, %o", t, e, u), r(t, e, u))
}
}, {
clone: 11,
cookie: 56,
extend: 66,
"segmentio/analytics.js-integration@1.0.1": 78,
"segmentio/json@1.0.0": 57,
store: 79,
"segmentio/protocol": 80,
"yields/send-json": 81,
"top-domain": 82,
uuid: 76,
"ForbesLindesay/base64-encode": 83,
"has-cors": 84
}],
78: [function(t, e, n) {
function r(t) {
function e(n) {
return n && n.addIntegration ? n.addIntegration(e) : (this.debug = a("analytics:integration:" + c(t)), this.options = s(i(n) || {}, this.defaults), this._queue = [], this.once("ready", o(this, this.flush)), e.emit("construct", this), this.ready = o(this, this.ready), this._wrapInitialize(), this._wrapPage(), void this._wrapTrack())
}
return e.prototype.defaults = {}, e.prototype.globals = [], e.prototype.templates = {}, e.prototype.name = t, u(e, l), u(e.prototype, p), e
}
var o = t("bind"),
i = t("clone"),
a = t("debug"),
s = t("defaults"),
u = t("extend"),
c = t("slug"),
p = t("./protos"),
l = t("./statics");
e.exports = r
}, {
bind: 85,
clone: 11,
debug: 86,
defaults: 14,
extend: 87,
slug: 88,
"./protos": 89,
"./statics": 90
}],
85: [function(t, e, n) {
function r(t, e) {
e = [].slice.call(arguments, 1);
for (var n, r = 0; n = e[r]; r++) t[n] = o(t, t[n]);
return t
}
var o = t("bind"),
i = t("bind-all");
e.exports = n = o, n.all = i, n.methods = r
}, {
bind: 53,
"bind-all": 54
}],
86: [function(t, e, n) {
"undefined" == typeof window ? e.exports = t("./lib/debug") : e.exports = t("./debug")
}, {
"./lib/debug": 91,
"./debug": 92
}],
91: [function(t, e, n) {
function r() {
return p[f++ % p.length]
}
function o(t) {
var e = 1e3,
n = 6e4,
r = 60 * n;
return t >= r ? (t / r).toFixed(1) + "h" : t >= n ? (t / n).toFixed(1) + "m" : t >= e ? (t / e | 0) + "s" : t + "ms"
}
function i(t) {
function e() {}
function n(e) {
e = a(e);
var n = new Date,
r = n - (l[t] || n);
l[t] = n, e = " [9" + p + "m" + t + " [3" + p + "m" + e + "[3" + p + "m +" + o(r) + "", console.error.apply(this, arguments)
}
function i(e) {
e = a(e), e = (new Date).toUTCString() + " " + t + " " + e, console.error.apply(this, arguments)
}
e.enabled = !1;
var s = c.some(function(e) {
return e.test(t)
});
if (s) return e;
if (s = u.some(function(e) {
return e.test(t)
}), !s) return e;
var p = r();
return n.enabled = i.enabled = !0, d || process.env.DEBUG_COLORS ? n : i
}
function a(t) {
return t instanceof Error ? t.stack || t.message : t
}
var s = t("tty");
e.exports = i;
var u = [],
c = [];
(process.env.DEBUG || "").split(/[\s,]+/).forEach(function(t) {
t = t.replace("*", ".*?"), "-" === t[0] ? c.push(new RegExp("^" + t.substr(1) + "$")) : u.push(new RegExp("^" + t + "$"))
});
var p = [6, 2, 3, 4, 5, 1],
l = {},
f = 0,
d = s.isatty(2)
}, {}],
92: [function(t, e, n) {
function r(t) {
return r.enabled(t) ? function(e) {
e = o(e);
var n = new Date,
i = n - (r[t] || n);
r[t] = n, e = t + " " + e + " +" + r.humanize(i), window.console && console.log && Function.prototype.apply.call(console.log, console, arguments)
} : function() {}
}
function o(t) {
return t instanceof Error ? t.stack || t.message : t
}
e.exports = r, r.names = [], r.skips = [], r.enable = function(t) {
try {
localStorage.debug = t
} catch (e) {}
for (var n = (t || "").split(/[\s,]+/), o = n.length, i = 0; o > i; i++) t = n[i].replace("*", ".*?"), "-" === t[0] ? r.skips.push(new RegExp("^" + t.substr(1) + "$")) : r.names.push(new RegExp("^" + t + "$"))
}, r.disable = function() {
r.enable("")
}, r.humanize = function(t) {
var e = 1e3,
n = 6e4,
r = 60 * n;
return t >= r ? (t / r).toFixed(1) + "h" : t >= n ? (t / n).toFixed(1) + "m" : t >= e ? (t / e | 0) + "s" : t + "ms"
}, r.enabled = function(t) {
for (var e = 0, n = r.skips.length; n > e; e++)
if (r.skips[e].test(t)) return !1;
for (var e = 0, n = r.names.length; n > e; e++)
if (r.names[e].test(t)) return !0;
return !1
};
try {
window.localStorage && r.enable(localStorage.debug)
} catch (i) {}
}, {}],
87: [function(t, e, n) {
e.exports = function(t) {
for (var e, n = Array.prototype.slice.call(arguments, 1), r = 0; e = n[r]; r++)
if (e)
for (var o in e) t[o] = e[o];
return t
}
}, {}],
88: [function(t, e, n) {
e.exports = function(t, e) {
return e || (e = {}), t.toLowerCase().replace(e.replace || /[^a-z0-9]/g, " ").replace(/^ +| +$/g, "").replace(/ +/g, e.separator || "-")
}
}, {}],
89: [function(t, e, n) {
function r() {}
function o(t) {
return x.array(t) ? b(i, t) ? "mixed" : "array" : x.object(t) ? "map" : "unknown"
}
function i(t) {
return x.object(t) && x.string(t.key) && w.call(t, "value") ? !0 : !1
}
function a(t, e) {
e = e || function() {};
var n = new Image;
return n.onerror = s(e, "failed to load pixel", n), n.onload = function() {
e()
}, n.src = t.src, n.width = 1, n.height = 1, n
}
function s(t, e, n) {
return function(r) {
r = r || window.event;
var o = new Error(e);
o.event = r, o.source = n, t(o)
}
}
function u(t, e) {
return h(function(t, n, r) {
return t[r] = n.replace(/\{\{\ *(\w+)\ *\}\}/g, function(t, n) {
return e[n]
}), t
}, {}, t.attrs)
}
var c = t("emitter"),
p = t("after"),
l = t("each"),
f = t("analytics-events"),
d = t("fmt"),
h = t("foldl"),
y = t("load-iframe"),
v = t("load-script"),
g = t("to-no-case"),
m = t("next-tick"),
b = t("every"),
x = t("is"),
w = Object.prototype.hasOwnProperty,
_ = window.onerror,
k = null,
j = window.setInterval,
O = window.setTimeout;
c(n), n.initialize = function() {
var t = this.ready;
m(t)
}, n.loaded = function() {
return !1
}, n.page = function(t) {}, n.track = function(t) {}, n.map = function(t, e) {
var n = g(e),
r = o(t);
return "unknown" === r ? [] : h(function(t, e, o) {
var i, a;
return "map" === r && (i = o, a = e), "array" === r && (i = e, a = e), "mixed" === r && (i = e.key, a = e.value), g(i) === n && t.push(a), t
}, [], t)
}, n.invoke = function(t) {
if (this[t]) {
var e = Array.prototype.slice.call(arguments, 1);
if (!this._ready) return this.queue(t, e);
var n;
try {
this.debug("%s with %o", t, e), n = this[t].apply(this, e)
} catch (r) {
this.debug("error %o calling %s with %o", r, t, e)
}
return n
}
}, n.queue = function(t, e) {
return "page" === t && this._assumesPageview && !this._initialized ? this.page.apply(this, e) : void this._queue.push({
method: t,
args: e
})
}, n.flush = function() {
this._ready = !0;
var t = this;
l(this._queue, function(e) {
t[e.method].apply(t, e.args)
}), this._queue.length = 0
}, n.reset = function() {
for (var t = 0; t < this.globals.length; t++) window[this.globals[t]] = void 0;
window.setTimeout = O, window.setInterval = j, window.onerror = _, window.onload = k
}, n.load = function(t, e, n) {
"function" == typeof t && (n = t, e = null, t = null), t && "object" == typeof t && (n = e, e = t, t = null), "function" == typeof e && (n = e, e = null), t = t || "library", e = e || {}, e = this.locals(e);
var o = this.templates[t];
if (!o) throw new Error(d('template "%s" not defined.', t));
var i = u(o, e);
n = n || r;
var s, c = this;
switch (o.type) {
case "img":
i.width = 1, i.height = 1, s = a(i, n);
break;
case "script":
s = v(i, function(t) {
return t ? void c.debug('error loading "%s" error="%s"', c.name, t) : n()
}), delete i.src, l(i, function(t, e) {
s.setAttribute(t, e)
});
break;
case "iframe":
s = y(i, n)
}
return s
}, n.locals = function(t) {
t = t || {};
var e = Math.floor((new Date).getTime() / 36e5);
return t.hasOwnProperty("cache") || (t.cache = e), l(this.options, function(e, n) {
t.hasOwnProperty(e) || (t[e] = n)
}), t
}, n.ready = function() {
this.emit("ready")
}, n._wrapInitialize = function() {
var t = this.initialize;
this.initialize = function() {
this.debug("initialize"), this._initialized = !0;
var e = t.apply(this, arguments);
return this.emit("initialize"), e
}, this._assumesPageview && (this.initialize = p(2, this.initialize))
}, n._wrapPage = function() {
var t = this.page;
this.page = function() {
return this._assumesPageview && !this._initialized ? this.initialize.apply(this, arguments) : t.apply(this, arguments)
}
}, n._wrapTrack = function() {
var t = this.track;
this.track = function(e) {
var n, r, o = e.event();
for (var i in f)
if (w.call(f, i)) {
var a = f[i];
if (!this[i]) continue;
if (!a.test(o)) continue;
r = this[i].apply(this, arguments), n = !0;
break
}
return n || (r = t.apply(this, arguments)), r
}
}
}, {
emitter: 6,
after: 8,
each: 93,
"analytics-events": 94,
fmt: 95,
foldl: 96,
"load-iframe": 97,
"load-script": 98,
"to-no-case": 99,
"next-tick": 55,
every: 100,
is: 101
}],
93: [function(t, e, n) {
function r(t, e, n) {
for (var r = 0; r < t.length; ++r) e.call(n, t.charAt(r), r)
}
function o(t, e, n) {
for (var r in t) c.call(t, r) && e.call(n, r, t[r])
}
function i(t, e, n) {
for (var r = 0; r < t.length; ++r) e.call(n, t[r], r)
}
try {
var a = t("type")
} catch (s) {
var a = t("component-type")
}
var u = t("to-function"),
c = Object.prototype.hasOwnProperty;
e.exports = function(t, e, n) {
switch (e = u(e), n = n || this, a(t)) {
case "array":
return i(t, e, n);
case "object":
return "number" == typeof t.length ? i(t, e, n) : o(t, e, n);
case "string":
return r(t, e, n)
}
}
}, {
type: 102,
"component-type": 102,
"to-function": 72
}],
102: [function(t, e, n) {
var r = Object.prototype.toString;
e.exports = function(t) {
switch (r.call(t)) {
case "[object Function]":
return "function";
case "[object Date]":
return "date";
case "[object RegExp]":
return "regexp";
case "[object Arguments]":
return "arguments";
case "[object Array]":
return "array";
case "[object String]":
return "string"
}
return null === t ? "null" : void 0 === t ? "undefined" : t && 1 === t.nodeType ? "element" : t === Object(t) ? "object" : typeof t
}
}, {}],
94: [function(t, e, n) {
e.exports = {
removedProduct: /^[ _]?removed[ _]?product[ _]?$/i,
viewedProduct: /^[ _]?viewed[ _]?product[ _]?$/i,
viewedProductCategory: /^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,
addedProduct: /^[ _]?added[ _]?product[ _]?$/i,
completedOrder: /^[ _]?completed[ _]?order[ _]?$/i,
startedOrder: /^[ _]?started[ _]?order[ _]?$/i,
updatedOrder: /^[ _]?updated[ _]?order[ _]?$/i,
refundedOrder: /^[ _]?refunded?[ _]?order[ _]?$/i,
viewedProductDetails: /^[ _]?viewed[ _]?product[ _]?details?[ _]?$/i,
clickedProduct: /^[ _]?clicked[ _]?product[ _]?$/i,
viewedPromotion: /^[ _]?viewed[ _]?promotion?[ _]?$/i,
clickedPromotion: /^[ _]?clicked[ _]?promotion?[ _]?$/i,
viewedCheckoutStep: /^[ _]?viewed[ _]?checkout[ _]?step[ _]?$/i,
completedCheckoutStep: /^[ _]?completed[ _]?checkout[ _]?step[ _]?$/i
}
}, {}],
95: [function(t, e, n) {
function r(t) {
var e = [].slice.call(arguments, 1),
n = 0;
return t.replace(/%([a-z])/gi, function(t, o) {
return r[o] ? r[o](e[n++]) : t + o
})
}
var o = window.JSON ? JSON.stringify : function(t) {
return String(t)
};
e.exports = r, r.o = o, r.s = String, r.d = parseInt
}, {}],
96: [function(t, e, n) {
"use strict";
var r;
try {
r = t("@ndhoule/each")
} catch (o) {
r = t("each")
}
var i = function(t, e, n) {
if ("function" != typeof t) throw new TypeError("Expected a function but received a " + typeof t);
return r(function(n, r, o) {
e = t(e, n, r, o)
}, n), e
};
e.exports = i
}, {
each: 70
}],
97: [function(t, e, n) {
var r = t("script-onload"),
o = t("next-tick"),
i = t("type");
e.exports = function(t, e) {
if (!t) throw new Error("Cant load nothing...");
"string" == i(t) && (t = {
src: t
});
var n = "https:" === document.location.protocol || "chrome-extension:" === document.location.protocol;
t.src && 0 === t.src.indexOf("//") && (t.src = n ? "https:" + t.src : "http:" + t.src), n && t.https ? t.src = t.https : !n && t.http && (t.src = t.http);
var a = document.createElement("iframe");
return a.src = t.src, a.width = t.width || 1, a.height = t.height || 1, a.style.display = "none", "function" == i(e) && r(a, e), o(function() {
var t = document.getElementsByTagName("script")[0];
t.parentNode.insertBefore(a, t)
}), a
}
}, {
"script-onload": 103,
"next-tick": 55,
type: 45
}],
103: [function(t, e, n) {
function r(t, e) {
t.addEventListener("load", function(t, n) {
e(null, n)
}, !1), t.addEventListener("error", function(n) {
var r = new Error('script error "' + t.src + '"');
r.event = n, e(r)
}, !1)
}
function o(t, e) {
t.attachEvent("onreadystatechange", function(n) {
/complete|loaded/.test(t.readyState) && e(null, n)
}), t.attachEvent("onerror", function(n) {
var r = new Error('failed to load the script "' + t.src + '"');
r.event = n || window.event, e(r)
})
}
e.exports = function(t, e) {
return t.addEventListener ? r(t, e) : o(t, e)
}
}, {}],
98: [function(t, e, n) {
var r = t("script-onload"),
o = t("next-tick"),
i = t("type");
e.exports = function(t, e) {
if (!t) throw new Error("Cant load nothing...");
"string" == i(t) && (t = {
src: t
});
var n = "https:" === document.location.protocol || "chrome-extension:" === document.location.protocol;
t.src && 0 === t.src.indexOf("//") && (t.src = n ? "https:" + t.src : "http:" + t.src), n && t.https ? t.src = t.https : !n && t.http && (t.src = t.http);
var a = document.createElement("script");
return a.type = "text/javascript", a.async = !0, a.src = t.src, "function" == i(e) && r(a, e), o(function() {
var t = document.getElementsByTagName("script")[0];
t.parentNode.insertBefore(a, t)
}), a
}
}, {
"script-onload": 103,
"next-tick": 55,
type: 45
}],
99: [function(t, e, n) {
function r(t) {
return a.test(t) ? t.toLowerCase() : s.test(t) ? o(t).toLowerCase() : i(t).toLowerCase()
}
function o(t) {
return t.replace(u, function(t, e) {
return e ? " " + e : ""
})
}
function i(t) {
return t.replace(c, function(t, e, n) {
return e + " " + n.toLowerCase().split("").join(" ")
})
}
e.exports = r;
var a = /\s/,
s = /[\W_]/,
u = /[\W_]+(.|$)/g,
c = /(.)([A-Z]+)/g
}, {}],
100: [function(t, e, n) {
"use strict";
var r;
try {
r = t("@ndhoule/each")
} catch (o) {
r = t("each")
}
var i = function(t, e) {
if ("function" != typeof t) throw new TypeError("`predicate` must be a function but was a " + typeof t);
var n = !0;
return r(function(e, r, o) {
return n = !!t(e, r, o), n ? void 0 : !1
}, e), n
};
e.exports = i
}, {
each: 70
}],
101: [function(t, e, n) {
function r(t) {
return function(e) {
return t === i(e)
}
}
var o = t("is-empty");
try {
var i = t("type")
} catch (a) {
var i = t("component-type")
}
for (var s, u = ["arguments", "array", "boolean", "date", "element", "function", "null", "number", "object", "regexp", "string", "undefined"], c = 0; s = u[c]; c++) n[s] = r(s);
n.fn = n["function"], n.empty = o, n.nan = function(t) {
return n.number(t) && t != t
}
}, {
"is-empty": 44,
type: 45,
"component-type": 45
}],
90: [function(t, e, n) {
function r(t) {
t = t.replace(' src="', ' data-src="');
var e = i(t),
n = {};
return a(e.attributes, function(e) {
var r = "data-src" === e.name ? "src" : e.name;
s(e.name + "=", t) && (n[r] = e.value)
}), {
type: e.tagName.toLowerCase(),
attrs: n
}
}
var o = t("emitter"),
i = t("domify"),
a = t("each"),
s = t("includes");
o(n), n.option = function(t, e) {
return this.prototype.defaults[t] = e, this
}, n.mapping = function(t) {
return this.option(t, []), this.prototype[t] = function(e) {
return this.map(this.options[t], e)
}, this
}, n.global = function(t) {
return this.prototype.globals.push(t), this
}, n.assumesPageview = function() {
return this.prototype._assumesPageview = !0, this
}, n.readyOnLoad = function() {
return this.prototype._readyOnLoad = !0, this
}, n.readyOnInitialize = function() {
return this.prototype._readyOnInitialize = !0, this
}, n.tag = function(t, e) {
return null == e && (e = t, t = "library"), this.prototype.templates[t] = r(e), this
}
}, {
emitter: 6,
domify: 104,
each: 93,
includes: 68
}],
104: [function(t, e, n) {
function r(t, e) {
if ("string" != typeof t) throw new TypeError("String expected");
e || (e = document);
var n = /<([\w:]+)/.exec(t);
if (!n) return e.createTextNode(t);
t = t.replace(/^\s+|\s+$/g, "");
var r = n[1];
if ("body" == r) {
var o = e.createElement("html");
return o.innerHTML = t, o.removeChild(o.lastChild)
}
var i = a[r] || a._default,
s = i[0],
u = i[1],
c = i[2],
o = e.createElement("div");
for (o.innerHTML = u + t + c; s--;) o = o.lastChild;
if (o.firstChild == o.lastChild) return o.removeChild(o.firstChild);
for (var p = e.createDocumentFragment(); o.firstChild;) p.appendChild(o.removeChild(o.firstChild));
return p
}
e.exports = r;
var o = document.createElement("div");
o.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
var i = !o.getElementsByTagName("link").length;
o = void 0;
var a = {
legend: [1, "<fieldset>", "</fieldset>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
_default: i ? [1, "X<div>", "</div>"] : [0, "", ""]
};
a.td = a.th = [3, "<table><tbody><tr>", "</tr></tbody></table>"], a.option = a.optgroup = [1, '<select multiple="multiple">', "</select>"], a.thead = a.tbody = a.colgroup = a.caption = a.tfoot = [1, "<table>", "</table>"], a.polyline = a.ellipse = a.polygon = a.circle = a.text = a.line = a.path = a.rect = a.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">', "</svg>"]
}, {}],
79: [function(t, e, n) {
function r(t, e) {
var n = arguments.length;
if (0 == n) return a();
if (n >= 2) return o(t, e);
if (1 == n) return null == t ? s.clear() : "string" == typeof t ? i(t) : "object" == typeof t ? c(t, o) : void 0
}
function o(t, e) {
return null == e ? s.removeItem(t) : s.setItem(t, JSON.stringify(e))
}
function i(t) {
return u(s.getItem(t))
}
function a() {
for (var t, e = s.length, n = {}; 0 <= --e;) t = s.key(e), n[t] = i(t);
return n
}
var s, u = t("unserialize"),
c = t("each");
try {
s = window.localStorage
} catch (p) {
s = null
}
e.exports = r, r.supported = !!s
}, {
unserialize: 105,
each: 93
}],
105: [function(t, e, n) {
e.exports = function(t) {
try {
return JSON.parse(t)
} catch (e) {
return t || void 0
}
}
}, {}],
80: [function(t, e, n) {
function r() {
return i || window.location.protocol
}
function o(t) {
try {
a(window.location, "protocol", {
get: function() {
return t
}
})
} catch (e) {
i = t
}
}
var i, a = Object.defineProperty,
s = window.location.protocol;
e.exports = function(t) {
return 0 === arguments.length ? r() : o(t)
}, e.exports.http = function() {
o("http:")
}, e.exports.https = function() {
o("https:")
}, e.exports.reset = function() {
o(s)
}
}, {}],
81: [function(t, e, n) {
function r(t, e, n, r) {
function o() {
return 4 == i.readyState ? r(null, i) : void 0
}
3 == arguments.length && (r = n, n = {});
var i = new XMLHttpRequest;
i.onerror = r, i.onreadystatechange = o, i.open("POST", t, !0);
for (var a in n) i.setRequestHeader(a, n[a]);
i.send(u.stringify(e))
}
function o(t, e, r, o) {
3 == arguments.length && (o = r);
var a = n.prefix;
e = i(u.stringify(e)), e = encodeURIComponent(e), t += "?" + a + "=" + e, s(t, {
param: n.callback
}, function(e, n) {
return e ? o(e) : void o(null, {
url: t,
body: n
})
})
}
var i = t("base64-encode"),
a = t("has-cors"),
s = t("jsonp"),
u = t("json");
n = e.exports = a ? r : o, n.callback = "callback", n.prefix = "data", n.json = r, n.base64 = o, n.type = a ? "xhr" : "jsonp"
}, {
"base64-encode": 106,
"has-cors": 84,
jsonp: 107,
json: 57
}],
106: [function(t, e, n) {
function r(t) {
var e, n, r, a, s, u, c, p = "",
l = 0;
for (t = o(t); l < t.length;) e = t.charCodeAt(l++), n = t.charCodeAt(l++), r = t.charCodeAt(l++), a = e >> 2, s = (3 & e) << 4 | n >> 4, u = (15 & n) << 2 | r >> 6, c = 63 & r, isNaN(n) ? u = c = 64 : isNaN(r) && (c = 64), p = p + i.charAt(a) + i.charAt(s) + i.charAt(u) + i.charAt(c);
return p
}
var o = t("utf8-encode"),
i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
e.exports = r
}, {
"utf8-encode": 108
}],
108: [function(t, e, n) {
function r(t) {
t = t.replace(/\r\n/g, "\n");
for (var e = "", n = 0; n < t.length; n++) {
var r = t.charCodeAt(n);
128 > r ? e += String.fromCharCode(r) : r > 127 && 2048 > r ? (e += String.fromCharCode(r >> 6 | 192), e += String.fromCharCode(63 & r | 128)) : (e += String.fromCharCode(r >> 12 | 224), e += String.fromCharCode(r >> 6 & 63 | 128), e += String.fromCharCode(63 & r | 128))
}
return e
}
e.exports = r
}, {}],
84: [function(t, e, n) {
try {
e.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest
} catch (r) {
e.exports = !1
}
}, {}],
107: [function(t, e, n) {
function r() {}
function o(t, e, n) {
function o() {
s.parentNode.removeChild(s), window[h] = r
}
"function" == typeof e && (n = e, e = {}), e || (e = {});
var s, u, c = e.prefix || "__jp",
p = e.param || "callback",
l = null != e.timeout ? e.timeout : 6e4,
f = encodeURIComponent,
d = document.getElementsByTagName("script")[0] || document.head,
h = c + a++;
l && (u = setTimeout(function() {
o(), n && n(new Error("Timeout"))
}, l)), window[h] = function(t) {
i("jsonp got", t), u && clearTimeout(u), o(), n && n(null, t)
}, t += (~t.indexOf("?") ? "&" : "?") + p + "=" + f(h), t = t.replace("?&", "?"), i('jsonp req "%s"', t), s = document.createElement("script"), s.src = t, d.parentNode.insertBefore(s, d)
}
var i = t("debug")("jsonp");
e.exports = o;
var a = 0
}, {
debug: 13
}],
82: [function(t, e, n) {
function r(t) {
var e = o(t).hostname,
n = e.match(i);
return n ? n[0] : ""
}
var o = t("url").parse;
e.exports = r;
var i = /[a-z0-9][a-z0-9\-]*[a-z0-9]\.[a-z\.]{2,6}$/i
}, {
url: 62
}],
83: [function(t, e, n) {
function r(t) {
var e, n, r, a, s, u, c, p = "",
l = 0;
for (t = o(t); l < t.length;) e = t.charCodeAt(l++), n = t.charCodeAt(l++), r = t.charCodeAt(l++), a = e >> 2, s = (3 & e) << 4 | n >> 4, u = (15 & n) << 2 | r >> 6, c = 63 & r, isNaN(n) ? u = c = 64 : isNaN(r) && (c = 64), p = p + i.charAt(a) + i.charAt(s) + i.charAt(u) + i.charAt(c);
return p
}
var o = t("utf8-encode"),
i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
e.exports = r
}, {
"utf8-encode": 108
}],
5: [function(t, e, n) {
e.exports = {
name: "analytics",
version: "2.9.1",
main: "analytics.js",
dependencies: {},
devDependencies: {}
}
}, {}]
}, {}, {
1: ""
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment