forked from segmentio/analytics.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analytics.component.js
425 lines (367 loc) · 118 KB
/
analytics.component.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
/**
* Require the given path.
*
* @param {String} path
* @return {Object} exports
* @api public
*/
function require(path, parent, orig) {
var resolved = require.resolve(path);
// lookup failed
if (null == resolved) {
orig = orig || path;
parent = parent || 'root';
var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
err.path = orig;
err.parent = parent;
err.require = true;
throw err;
}
var module = require.modules[resolved];
// perform real require()
// by invoking the module's
// registered function
if (!module.exports) {
module.exports = {};
module.client = module.component = true;
module.call(this, module.exports, require.relative(resolved), module);
}
return module.exports;
}
/**
* Registered modules.
*/
require.modules = {};
/**
* Registered aliases.
*/
require.aliases = {};
/**
* Resolve `path`.
*
* Lookup:
*
* - PATH/index.js
* - PATH.js
* - PATH
*
* @param {String} path
* @return {String} path or null
* @api private
*/
require.resolve = function(path) {
if (path.charAt(0) === '/') path = path.slice(1);
var index = path + '/index.js';
var paths = [
path,
path + '.js',
path + '.json',
path + '/index.js',
path + '/index.json'
];
for (var i = 0; i < paths.length; i++) {
var path = paths[i];
if (require.modules.hasOwnProperty(path)) return path;
}
if (require.aliases.hasOwnProperty(index)) {
return require.aliases[index];
}
};
/**
* Normalize `path` relative to the current path.
*
* @param {String} curr
* @param {String} path
* @return {String}
* @api private
*/
require.normalize = function(curr, path) {
var segs = [];
if ('.' != path.charAt(0)) return path;
curr = curr.split('/');
path = path.split('/');
for (var i = 0; i < path.length; ++i) {
if ('..' == path[i]) {
curr.pop();
} else if ('.' != path[i] && '' != path[i]) {
segs.push(path[i]);
}
}
return curr.concat(segs).join('/');
};
/**
* Register module at `path` with callback `definition`.
*
* @param {String} path
* @param {Function} definition
* @api private
*/
require.register = function(path, definition) {
require.modules[path] = definition;
};
/**
* Alias a module definition.
*
* @param {String} from
* @param {String} to
* @api private
*/
require.alias = function(from, to) {
if (!require.modules.hasOwnProperty(from)) {
throw new Error('Failed to alias "' + from + '", it does not exist');
}
require.aliases[to] = from;
};
/**
* Return a require function relative to the `parent` path.
*
* @param {String} parent
* @return {Function}
* @api private
*/
require.relative = function(parent) {
var p = require.normalize(parent, '..');
/**
* lastIndexOf helper.
*/
function lastIndexOf(arr, obj) {
var i = arr.length;
while (i--) {
if (arr[i] === obj) return i;
}
return -1;
}
/**
* The relative require() itself.
*/
function localRequire(path) {
var resolved = localRequire.resolve(path);
return require(resolved, parent, path);
}
/**
* Resolve relative to the parent.
*/
localRequire.resolve = function(path) {
var c = path.charAt(0);
if ('/' == c) return path.slice(1);
if ('.' == c) return require.normalize(p, path);
// resolve deps by returning
// the dep in the nearest "deps"
// directory
var segs = parent.split('/');
var i = lastIndexOf(segs, 'deps') + 1;
if (!i) i = 0;
path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
return path;
};
/**
* Check if module is defined at `path`.
*/
localRequire.exists = function(path) {
return require.modules.hasOwnProperty(localRequire.resolve(path));
};
return localRequire;
};
require.register("component-clone/index.js", Function("exports, require, module",
"\n/**\n * Module dependencies.\n */\n\nvar type;\n\ntry {\n type = require('type');\n} catch(e){\n type = require('type-component');\n}\n\n/**\n * Module exports.\n */\n\nmodule.exports = clone;\n\n/**\n * Clones objects.\n *\n * @param {Mixed} any object\n * @api public\n */\n\nfunction clone(obj){\n switch (type(obj)) {\n case 'object':\n var copy = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n copy[key] = clone(obj[key]);\n }\n }\n return copy;\n\n case 'array':\n var copy = new Array(obj.length);\n for (var i = 0, l = obj.length; i < l; i++) {\n copy[i] = clone(obj[i]);\n }\n return copy;\n\n case 'regexp':\n // from millermedeiros/amd-utils - MIT\n var flags = '';\n flags += obj.multiline ? 'm' : '';\n flags += obj.global ? 'g' : '';\n flags += obj.ignoreCase ? 'i' : '';\n return new RegExp(obj.source, flags);\n\n case 'date':\n return new Date(obj.getTime());\n\n default: // string, number, boolean, …\n return obj;\n }\n}\n//@ sourceURL=component-clone/index.js"
));
require.register("component-cookie/index.js", Function("exports, require, module",
"/**\n * Encode.\n */\n\nvar encode = encodeURIComponent;\n\n/**\n * Decode.\n */\n\nvar decode = decodeURIComponent;\n\n/**\n * Set or get cookie `name` with `value` and `options` object.\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @return {Mixed}\n * @api public\n */\n\nmodule.exports = function(name, value, options){\n switch (arguments.length) {\n case 3:\n case 2:\n return set(name, value, options);\n case 1:\n return get(name);\n default:\n return all();\n }\n};\n\n/**\n * Set cookie `name` to `value`.\n *\n * @param {String} name\n * @param {String} value\n * @param {Object} options\n * @api private\n */\n\nfunction set(name, value, options) {\n options = options || {};\n var str = encode(name) + '=' + encode(value);\n\n if (null == value) options.maxage = -1;\n\n if (options.maxage) {\n options.expires = new Date(+new Date + options.maxage);\n }\n\n if (options.path) str += '; path=' + options.path;\n if (options.domain) str += '; domain=' + options.domain;\n if (options.expires) str += '; expires=' + options.expires.toUTCString();\n if (options.secure) str += '; secure';\n\n document.cookie = str;\n}\n\n/**\n * Return all cookies.\n *\n * @return {Object}\n * @api private\n */\n\nfunction all() {\n return parse(document.cookie);\n}\n\n/**\n * Get cookie `name`.\n *\n * @param {String} name\n * @return {String}\n * @api private\n */\n\nfunction get(name) {\n return all()[name];\n}\n\n/**\n * Parse cookie `str`.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parse(str) {\n var obj = {};\n var pairs = str.split(/ *; */);\n var pair;\n if ('' == pairs[0]) return obj;\n for (var i = 0; i < pairs.length; ++i) {\n pair = pairs[i].split('=');\n obj[decode(pair[0])] = decode(pair[1]);\n }\n return obj;\n}\n//@ sourceURL=component-cookie/index.js"
));
require.register("component-each/index.js", Function("exports, require, module",
"\n/**\n * Module dependencies.\n */\n\nvar type = require('type');\n\n/**\n * HOP reference.\n */\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Iterate the given `obj` and invoke `fn(val, i)`.\n *\n * @param {String|Array|Object} obj\n * @param {Function} fn\n * @api public\n */\n\nmodule.exports = function(obj, fn){\n switch (type(obj)) {\n case 'array':\n return array(obj, fn);\n case 'object':\n if ('number' == typeof obj.length) return array(obj, fn);\n return object(obj, fn);\n case 'string':\n return string(obj, fn);\n }\n};\n\n/**\n * Iterate string chars.\n *\n * @param {String} obj\n * @param {Function} fn\n * @api private\n */\n\nfunction string(obj, fn) {\n for (var i = 0; i < obj.length; ++i) {\n fn(obj.charAt(i), i);\n }\n}\n\n/**\n * Iterate object keys.\n *\n * @param {Object} obj\n * @param {Function} fn\n * @api private\n */\n\nfunction object(obj, fn) {\n for (var key in obj) {\n if (has.call(obj, key)) {\n fn(key, obj[key]);\n }\n }\n}\n\n/**\n * Iterate array-ish.\n *\n * @param {Array|Object} obj\n * @param {Function} fn\n * @api private\n */\n\nfunction array(obj, fn) {\n for (var i = 0; i < obj.length; ++i) {\n fn(obj[i], i);\n }\n}//@ sourceURL=component-each/index.js"
));
require.register("component-event/index.js", Function("exports, require, module",
"\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @return {Function}\n * @api public\n */\n\nexports.bind = function(el, type, fn, capture){\n if (el.addEventListener) {\n el.addEventListener(type, fn, capture || false);\n } else {\n el.attachEvent('on' + type, fn);\n }\n return fn;\n};\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @return {Function}\n * @api public\n */\n\nexports.unbind = function(el, type, fn, capture){\n if (el.removeEventListener) {\n el.removeEventListener(type, fn, capture || false);\n } else {\n el.detachEvent('on' + type, fn);\n }\n return fn;\n};\n//@ sourceURL=component-event/index.js"
));
require.register("component-json/index.js", Function("exports, require, module",
"\nmodule.exports = 'undefined' == typeof JSON\n ? require('json-fallback')\n : JSON;\n//@ sourceURL=component-json/index.js"
));
require.register("component-json-fallback/index.js", Function("exports, require, module",
"/*\n json2.js\n 2011-10-19\n\n Public Domain.\n\n NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n\n See http://www.JSON.org/js.html\n\n\n This code should be minified before deployment.\n See http://javascript.crockford.com/jsmin.html\n\n USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n NOT CONTROL.\n\n\n This file creates a global JSON object containing two methods: stringify\n and parse.\n\n JSON.stringify(value, replacer, space)\n value any JavaScript value, usually an object or array.\n\n replacer an optional parameter that determines how object\n values are stringified for objects. It can be a\n function or an array of strings.\n\n space an optional parameter that specifies the indentation\n of nested structures. If it is omitted, the text will\n be packed without extra whitespace. If it is a number,\n it will specify the number of spaces to indent at each\n level. If it is a string (such as '\\t' or ' '),\n it contains the characters used to indent at each level.\n\n This method produces a JSON text from a JavaScript value.\n\n When an object value is found, if the object contains a toJSON\n method, its toJSON method will be called and the result will be\n stringified. A toJSON method does not serialize: it returns the\n value represented by the name/value pair that should be serialized,\n or undefined if nothing should be serialized. The toJSON method\n will be passed the key associated with the value, and this will be\n bound to the value\n\n For example, this would serialize Dates as ISO strings.\n\n Date.prototype.toJSON = function (key) {\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10 ? '0' + n : n;\n }\n\n return this.getUTCFullYear() + '-' +\n f(this.getUTCMonth() + 1) + '-' +\n f(this.getUTCDate()) + 'T' +\n f(this.getUTCHours()) + ':' +\n f(this.getUTCMinutes()) + ':' +\n f(this.getUTCSeconds()) + 'Z';\n };\n\n You can provide an optional replacer method. It will be passed the\n key and value of each member, with this bound to the containing\n object. The value that is returned from your method will be\n serialized. If your method returns undefined, then the member will\n be excluded from the serialization.\n\n If the replacer parameter is an array of strings, then it will be\n used to select the members to be serialized. It filters the results\n such that only members with keys listed in the replacer array are\n stringified.\n\n Values that do not have JSON representations, such as undefined or\n functions, will not be serialized. Such values in objects will be\n dropped; in arrays they will be replaced with null. You can use\n a replacer function to replace those with JSON values.\n JSON.stringify(undefined) returns undefined.\n\n The optional space parameter produces a stringification of the\n value that is filled with line breaks and indentation to make it\n easier to read.\n\n If the space parameter is a non-empty string, then that string will\n be used for indentation. If the space parameter is a number, then\n the indentation will be that many spaces.\n\n Example:\n\n text = JSON.stringify(['e', {pluribus: 'unum'}]);\n // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n\n text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\\t');\n // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n text = JSON.stringify([new Date()], function (key, value) {\n return this[key] instanceof Date ?\n 'Date(' + this[key] + ')' : value;\n });\n // text is '[\"Date(---current time---)\"]'\n\n\n JSON.parse(text, reviver)\n This method parses a JSON text to produce an object or array.\n It can throw a SyntaxError exception.\n\n The optional reviver parameter is a function that can filter and\n transform the results. It receives each of the keys and values,\n and its return value is used instead of the original value.\n If it returns what it received, then the structure is not modified.\n If it returns undefined then the member is deleted.\n\n Example:\n\n // Parse the text. Values that look like ISO date strings will\n // be converted to Date objects.\n\n myData = JSON.parse(text, function (key, value) {\n var a;\n if (typeof value === 'string') {\n a =\n/^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n if (a) {\n return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n +a[5], +a[6]));\n }\n }\n return value;\n });\n\n myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n var d;\n if (typeof value === 'string' &&\n value.slice(0, 5) === 'Date(' &&\n value.slice(-1) === ')') {\n d = new Date(value.slice(5, -1));\n if (d) {\n return d;\n }\n }\n return value;\n });\n\n\n This is a reference implementation. You are free to copy, modify, or\n redistribute.\n*/\n\n/*jslint evil: true, regexp: true */\n\n/*members \"\", \"\\b\", \"\\t\", \"\\n\", \"\\f\", \"\\r\", \"\\\"\", JSON, \"\\\\\", apply,\n call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n*/\n\n\n// Create a JSON object only if one does not already exist. We create the\n// methods in a closure to avoid creating global variables.\n\nvar JSON = {};\n\n(function () {\n 'use strict';\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10 ? '0' + n : n;\n }\n\n if (typeof Date.prototype.toJSON !== 'function') {\n\n Date.prototype.toJSON = function (key) {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + '-' +\n f(this.getUTCMonth() + 1) + '-' +\n f(this.getUTCDate()) + 'T' +\n f(this.getUTCHours()) + ':' +\n f(this.getUTCMinutes()) + ':' +\n f(this.getUTCSeconds()) + 'Z'\n : null;\n };\n\n String.prototype.toJSON =\n Number.prototype.toJSON =\n Boolean.prototype.toJSON = function (key) {\n return this.valueOf();\n };\n }\n\n var cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n gap,\n indent,\n meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"' : '\\\\\"',\n '\\\\': '\\\\\\\\'\n },\n rep;\n\n\n function quote(string) {\n\n// If the string contains no control characters, no quote characters, and no\n// backslash characters, then we can safely slap some quotes around it.\n// Otherwise we must also replace the offending characters with safe escape\n// sequences.\n\n escapable.lastIndex = 0;\n return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n var c = meta[a];\n return typeof c === 'string'\n ? c\n : '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n }) + '\"' : '\"' + string + '\"';\n }\n\n\n function str(key, holder) {\n\n// Produce a string from holder[key].\n\n var i, // The loop counter.\n k, // The member key.\n v, // The member value.\n length,\n mind = gap,\n partial,\n value = holder[key];\n\n// If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === 'object' &&\n typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n\n// If we were called with a replacer function, then call the replacer to\n// obtain a replacement value.\n\n if (typeof rep === 'function') {\n value = rep.call(holder, key, value);\n }\n\n// What happens next depends on the value's type.\n\n switch (typeof value) {\n case 'string':\n return quote(value);\n\n case 'number':\n\n// JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value) ? String(value) : 'null';\n\n case 'boolean':\n case 'null':\n\n// If the value is a boolean or null, convert it to a string. Note:\n// typeof null does not produce 'null'. The case is included here in\n// the remote chance that this gets fixed someday.\n\n return String(value);\n\n// If the type is 'object', we might be dealing with an object or an array or\n// null.\n\n case 'object':\n\n// Due to a specification blunder in ECMAScript, typeof null is 'object',\n// so watch out for that case.\n\n if (!value) {\n return 'null';\n }\n\n// Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n// Is the value an array?\n\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n\n// The value is an array. Stringify every element. Use null as a placeholder\n// for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n\n// Join all of the elements together, separated with commas, and wrap them in\n// brackets.\n\n v = partial.length === 0\n ? '[]'\n : gap\n ? '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']'\n : '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n\n// If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === 'object') {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === 'string') {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n } else {\n\n// Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n\n// Join all of the member texts together, separated with commas,\n// and wrap them in braces.\n\n v = partial.length === 0\n ? '{}'\n : gap\n ? '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}'\n : '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n }\n }\n\n// If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== 'function') {\n JSON.stringify = function (value, replacer, space) {\n\n// The stringify method takes a value and an optional replacer, and an optional\n// space parameter, and returns a JSON text. The replacer can be a function\n// that can replace values, or an array of strings that will select the keys.\n// A default replacer method can be provided. Use of the space parameter can\n// produce text that is more easily readable.\n\n var i;\n gap = '';\n indent = '';\n\n// If the space parameter is a number, make an indent string containing that\n// many spaces.\n\n if (typeof space === 'number') {\n for (i = 0; i < space; i += 1) {\n indent += ' ';\n }\n\n// If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === 'string') {\n indent = space;\n }\n\n// If there is a replacer, it must be a function or an array.\n// Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== 'function' &&\n (typeof replacer !== 'object' ||\n typeof replacer.length !== 'number')) {\n throw new Error('JSON.stringify');\n }\n\n// Make a fake root object containing our value under the key of ''.\n// Return the result of stringifying the value.\n\n return str('', {'': value});\n };\n }\n\n\n// If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== 'function') {\n JSON.parse = function (text, reviver) {\n\n// The parse method takes a text and an optional reviver function, and returns\n// a JavaScript value if the text is a valid JSON text.\n\n var j;\n\n function walk(holder, key) {\n\n// The walk method is used to recursively walk the resulting structure so\n// that modifications can be made.\n\n var k, v, value = holder[key];\n if (value && typeof value === 'object') {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = walk(value, k);\n if (v !== undefined) {\n value[k] = v;\n } else {\n delete value[k];\n }\n }\n }\n }\n return reviver.call(holder, key, value);\n }\n\n\n// Parsing happens in four stages. In the first stage, we replace certain\n// Unicode characters with escape sequences. JavaScript handles many characters\n// incorrectly, either silently deleting them, or treating them as line endings.\n\n text = String(text);\n cx.lastIndex = 0;\n if (cx.test(text)) {\n text = text.replace(cx, function (a) {\n return '\\\\u' +\n ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n });\n }\n\n// In the second stage, we run the text against regular expressions that look\n// for non-JSON patterns. We are especially concerned with '()' and 'new'\n// because they can cause invocation, and '=' because it can cause mutation.\n// But just to be safe, we want to reject all unexpected forms.\n\n// We split the second stage into 4 regexp operations in order to work around\n// crippling inefficiencies in IE's and Safari's regexp engines. First we\n// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we\n// replace all simple value tokens with ']' characters. Third, we delete all\n// open brackets that follow a colon or comma or that begin the text. Finally,\n// we look to see that the remaining characters are only whitespace or ']' or\n// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.\n\n if (/^[\\],:{}\\s]*$/\n .test(text.replace(/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')\n .replace(/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g, ']')\n .replace(/(?:^|:|,)(?:\\s*\\[)+/g, ''))) {\n\n// In the third stage we use the eval function to compile the text into a\n// JavaScript structure. The '{' operator is subject to a syntactic ambiguity\n// in JavaScript: it can begin a block or an object literal. We wrap the text\n// in parens to eliminate the ambiguity.\n\n j = eval('(' + text + ')');\n\n// In the optional fourth stage, we recursively walk the new structure, passing\n// each name/value pair to a reviver function for possible transformation.\n\n return typeof reviver === 'function'\n ? walk({'': j}, '')\n : j;\n }\n\n// If the text is not JSON parseable, then a SyntaxError is thrown.\n\n throw new SyntaxError('JSON.parse');\n };\n }\n}());\n\nmodule.exports = JSON//@ sourceURL=component-json-fallback/index.js"
));
require.register("component-object/index.js", Function("exports, require, module",
"\n/**\n * HOP ref.\n */\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Return own keys in `obj`.\n *\n * @param {Object} obj\n * @return {Array}\n * @api public\n */\n\nexports.keys = Object.keys || function(obj){\n var keys = [];\n for (var key in obj) {\n if (has.call(obj, key)) {\n keys.push(key);\n }\n }\n return keys;\n};\n\n/**\n * Return own values in `obj`.\n *\n * @param {Object} obj\n * @return {Array}\n * @api public\n */\n\nexports.values = function(obj){\n var vals = [];\n for (var key in obj) {\n if (has.call(obj, key)) {\n vals.push(obj[key]);\n }\n }\n return vals;\n};\n\n/**\n * Merge `b` into `a`.\n *\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n * @api public\n */\n\nexports.merge = function(a, b){\n for (var key in b) {\n if (has.call(b, key)) {\n a[key] = b[key];\n }\n }\n return a;\n};\n\n/**\n * Return length of `obj`.\n *\n * @param {Object} obj\n * @return {Number}\n * @api public\n */\n\nexports.length = function(obj){\n return exports.keys(obj).length;\n};\n\n/**\n * Check if `obj` is empty.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api public\n */\n\nexports.isEmpty = function(obj){\n return 0 == exports.length(obj);\n};//@ sourceURL=component-object/index.js"
));
require.register("component-trim/index.js", Function("exports, require, module",
"\nexports = module.exports = trim;\n\nfunction trim(str){\n return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n return str.replace(/\\s*$/, '');\n};\n//@ sourceURL=component-trim/index.js"
));
require.register("component-querystring/index.js", Function("exports, require, module",
"\n/**\n * Module dependencies.\n */\n\nvar trim = require('trim');\n\n/**\n * Parse the given query `str`.\n *\n * @param {String} str\n * @return {Object}\n * @api public\n */\n\nexports.parse = function(str){\n if ('string' != typeof str) return {};\n\n str = trim(str);\n if ('' == str) return {};\n\n var obj = {};\n var pairs = str.split('&');\n for (var i = 0; i < pairs.length; i++) {\n var parts = pairs[i].split('=');\n obj[parts[0]] = null == parts[1]\n ? ''\n : decodeURIComponent(parts[1]);\n }\n\n return obj;\n};\n\n/**\n * Stringify the given `obj`.\n *\n * @param {Object} obj\n * @return {String}\n * @api public\n */\n\nexports.stringify = function(obj){\n if (!obj) return '';\n var pairs = [];\n for (var key in obj) {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]));\n }\n return pairs.join('&');\n};\n//@ sourceURL=component-querystring/index.js"
));
require.register("component-type/index.js", Function("exports, require, module",
"\n/**\n * toString ref.\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Return the type of `val`.\n *\n * @param {Mixed} val\n * @return {String}\n * @api public\n */\n\nmodule.exports = function(val){\n switch (toString.call(val)) {\n case '[object Function]': return 'function';\n case '[object Date]': return 'date';\n case '[object RegExp]': return 'regexp';\n case '[object Arguments]': return 'arguments';\n case '[object Array]': return 'array';\n case '[object String]': return 'string';\n }\n\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (val && val.nodeType === 1) return 'element';\n if (val === Object(val)) return 'object';\n\n return typeof val;\n};\n//@ sourceURL=component-type/index.js"
));
require.register("component-url/index.js", Function("exports, require, module",
"\n/**\n * Parse the given `url`.\n *\n * @param {String} str\n * @return {Object}\n * @api public\n */\n\nexports.parse = function(url){\n var a = document.createElement('a');\n a.href = url;\n return {\n href: a.href,\n host: a.host || location.host,\n port: a.port || location.port,\n hash: a.hash,\n hostname: a.hostname || location.hostname,\n pathname: a.pathname.charAt(0) != '/' ? '/' + a.pathname : a.pathname,\n protocol: !a.protocol || ':' == a.protocol ? location.protocol : a.protocol,\n search: a.search,\n query: a.search.slice(1)\n };\n};\n\n/**\n * Check if `url` is absolute.\n *\n * @param {String} url\n * @return {Boolean}\n * @api public\n */\n\nexports.isAbsolute = function(url){\n return 0 == url.indexOf('//') || !!~url.indexOf('://');\n};\n\n/**\n * Check if `url` is relative.\n *\n * @param {String} url\n * @return {Boolean}\n * @api public\n */\n\nexports.isRelative = function(url){\n return !exports.isAbsolute(url);\n};\n\n/**\n * Check if `url` is cross domain.\n *\n * @param {String} url\n * @return {Boolean}\n * @api public\n */\n\nexports.isCrossDomain = function(url){\n url = exports.parse(url);\n return url.hostname !== location.hostname\n || url.port !== location.port\n || url.protocol !== location.protocol;\n};//@ sourceURL=component-url/index.js"
));
require.register("segmentio-after/index.js", Function("exports, require, module",
"\nmodule.exports = function after (times, func) {\n // After 0, really?\n if (times <= 0) return func();\n\n // That's more like it.\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n};//@ sourceURL=segmentio-after/index.js"
));
require.register("segmentio-alias/index.js", Function("exports, require, module",
"\nmodule.exports = function alias (object, aliases) {\n // For each of our aliases, rename our object's keys.\n for (var oldKey in aliases) {\n var newKey = aliases[oldKey];\n if (object[oldKey] !== undefined) {\n object[newKey] = object[oldKey];\n delete object[oldKey];\n }\n }\n};//@ sourceURL=segmentio-alias/index.js"
));
require.register("segmentio-canonical/index.js", Function("exports, require, module",
"module.exports = function canonical () {\n var tags = document.getElementsByTagName('link');\n for (var i = 0, tag; tag = tags[i]; i++) {\n if ('canonical' == tag.getAttribute('rel')) return tag.getAttribute('href');\n }\n};//@ sourceURL=segmentio-canonical/index.js"
));
require.register("segmentio-extend/index.js", Function("exports, require, module",
"\nmodule.exports = function extend (object) {\n // Takes an unlimited number of extenders.\n var args = Array.prototype.slice.call(arguments, 1);\n\n // For each extender, copy their properties on our object.\n for (var i = 0, source; source = args[i]; i++) {\n if (!source) continue;\n for (var property in source) {\n object[property] = source[property];\n }\n }\n\n return object;\n};//@ sourceURL=segmentio-extend/index.js"
));
require.register("segmentio-is-email/index.js", Function("exports, require, module",
"\nmodule.exports = function isEmail (string) {\n return (/.+\\@.+\\..+/).test(string);\n};//@ sourceURL=segmentio-is-email/index.js"
));
require.register("segmentio-is-meta/index.js", Function("exports, require, module",
"module.exports = function isMeta (e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return true;\n\n // Logic that handles checks for the middle mouse button, based\n // on [jQuery](https://github.com/jquery/jquery/blob/master/src/event.js#L466).\n var which = e.which, button = e.button;\n if (!which && button !== undefined) {\n return (!button & 1) && (!button & 2) && (button & 4);\n } else if (which === 2) {\n return true;\n }\n\n return false;\n};//@ sourceURL=segmentio-is-meta/index.js"
));
require.register("segmentio-load-date/index.js", Function("exports, require, module",
"\n\n/*\n * Load date.\n *\n * For reference: http://www.html5rocks.com/en/tutorials/webperformance/basics/\n */\n\nvar time = new Date()\n , perf = window.performance;\n\nif (perf && perf.timing && perf.timing.responseEnd) {\n time = new Date(perf.timing.responseEnd);\n}\n\nmodule.exports = time;//@ sourceURL=segmentio-load-date/index.js"
));
require.register("segmentio-load-script/index.js", Function("exports, require, module",
"var type = require('type');\n\n\nmodule.exports = function loadScript (options, callback) {\n if (!options) throw new Error('Cant load nothing...');\n\n // Allow for the simplest case, just passing a `src` string.\n if (type(options) === 'string') options = { src : options };\n\n var https = document.location.protocol === 'https:';\n\n // If you use protocol relative URLs, third-party scripts like Google\n // Analytics break when testing with `file:` so this fixes that.\n if (options.src && options.src.indexOf('//') === 0) {\n options.src = https ? 'https:' + options.src : 'http:' + options.src;\n }\n\n // Allow them to pass in different URLs depending on the protocol.\n if (https && options.https) options.src = options.https;\n else if (!https && options.http) options.src = options.http;\n\n // Make the `<script>` element and insert it before the first script on the\n // page, which is guaranteed to exist since this Javascript is running.\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.src = options.src;\n\n var firstScript = document.getElementsByTagName('script')[0];\n firstScript.parentNode.insertBefore(script, firstScript);\n\n // If we have a callback, attach event handlers, even in IE. Based off of\n // the Third-Party Javascript script loading example:\n // https://github.com/thirdpartyjs/thirdpartyjs-code/blob/master/examples/templates/02/loading-files/index.html\n if (callback && type(callback) === 'function') {\n if (script.addEventListener) {\n script.addEventListener('load', callback, false);\n } else if (script.attachEvent) {\n script.attachEvent('onreadystatechange', function () {\n if (/complete|loaded/.test(script.readyState)) callback();\n });\n }\n }\n\n // Return the script element in case they want to do anything special, like\n // give it an ID or attributes.\n return script;\n};//@ sourceURL=segmentio-load-script/index.js"
));
require.register("segmentio-new-date/index.js", Function("exports, require, module",
"var type = require('type');\n\n\nmodule.exports = function newDate (date) {\n // Milliseconds would be greater than 31557600000 (December 31, 1970).\n if ('number' === type(date) && date < 31557600000) date = date * 1000;\n\n // By default, delegate to Date, which will return `Invalid Date`s if wrong.\n return new Date(date);\n};//@ sourceURL=segmentio-new-date/index.js"
));
require.register("yields-prevent/index.js", Function("exports, require, module",
"\n/**\n * prevent default on the given `e`.\n * \n * examples:\n * \n * anchor.onclick = prevent;\n * anchor.onclick = function(e){\n * if (something) return prevent(e);\n * };\n * \n * @param {Event} e\n */\n\nmodule.exports = function(e){\n e = e || window.event\n return e.preventDefault\n ? e.preventDefault()\n : e.returnValue = false;\n};\n//@ sourceURL=yields-prevent/index.js"
));
require.register("analytics/src/index.js", Function("exports, require, module",
"// Analytics.js\n//\n// (c) 2013 Segment.io Inc.\n// Analytics.js may be freely distributed under the MIT license.\n\nvar Analytics = require('./analytics')\n , providers = require('./providers');\n\n\nmodule.exports = new Analytics(providers);//@ sourceURL=analytics/src/index.js"
));
require.register("analytics/src/analytics.js", Function("exports, require, module",
"var after = require('after')\n , bind = require('event').bind\n , clone = require('clone')\n , each = require('each')\n , extend = require('extend')\n , isMeta = require('is-meta')\n , newDate = require('new-date')\n , size = require('object').length\n , preventDefault = require('prevent')\n , Provider = require('./provider')\n , providers = require('./providers')\n , querystring = require('querystring')\n , type = require('type')\n , url = require('url')\n , user = require('./user')\n , utils = require('./utils');\n\n\nmodule.exports = Analytics;\n\n\n/**\n * Analytics.\n *\n * @param {Object} Providers - Provider classes that the user can initialize.\n */\n\nfunction Analytics (Providers) {\n var self = this;\n\n this.VERSION = '0.8.10';\n\n each(Providers, function (Provider) {\n self.addProvider(Provider);\n });\n\n // Wrap `onload` with our own that will cache the loaded state of the page.\n var oldonload = window.onload;\n window.onload = function () {\n self.loaded = true;\n if ('function' === type(oldonload)) oldonload();\n };\n}\n\n\n/**\n * Extend the Analytics prototype.\n */\n\nextend(Analytics.prototype, {\n\n // Whether `onload` has fired.\n loaded : false,\n\n // Whether `analytics` has been initialized.\n initialized : false,\n\n // Whether all of our analytics providers are ready to accept calls. Give it a\n // real jank name since we already use `analytics.ready` for the method.\n readied : false,\n\n // A queue for ready callbacks to run when our `readied` state becomes `true`.\n callbacks : [],\n\n // Milliseconds to wait for requests to clear before leaving the current page.\n timeout : 300,\n\n // A reference to the current user object.\n user : user,\n\n // The default Provider.\n Provider : Provider,\n\n // Providers that can be initialized. Add using `this.addProvider`.\n _providers : {},\n\n // The currently initialized providers.\n providers : [],\n\n\n /**\n * Add a provider to `_providers` to be initialized later.\n *\n * @param {String} name - The name of the provider.\n * @param {Function} Provider - The provider's class.\n */\n\n addProvider : function (Provider) {\n this._providers[Provider.prototype.name] = Provider;\n },\n\n\n /**\n * Initialize\n *\n * Call `initialize` to setup analytics.js before identifying or\n * tracking any users or events. For example:\n *\n * analytics.initialize({\n * 'Google Analytics' : 'UA-XXXXXXX-X',\n * 'Segment.io' : 'XXXXXXXXXXX',\n * 'KISSmetrics' : 'XXXXXXXXXXX'\n * });\n *\n * @param {Object} providers - a dictionary of the providers you want to\n * enable. The keys are the names of the providers and their values are either\n * an api key, or dictionary of extra settings (including the api key).\n *\n * @param {Object} options (optional) - extra settings to initialize with.\n */\n\n initialize : function (providers, options) {\n var self = this;\n\n // Reset our state.\n this.providers = [];\n this.initialized = false;\n this.readied = false;\n\n // Set the user options, and load the user from our cookie.\n user.options(options);\n user.load();\n\n // Create a ready method that will call all of our ready callbacks after all\n // of our providers have been initialized and loaded. We'll pass the\n // function into each provider's initialize method, so they can callback\n // after they've loaded successfully.\n var ready = after(size(providers), function () {\n self.readied = true;\n var callback;\n while(callback = self.callbacks.shift()) {\n callback();\n }\n });\n\n // Initialize a new instance of each provider with their `options`, and\n // copy the provider into `this.providers`.\n each(providers, function (key, options) {\n var Provider = self._providers[key];\n if (!Provider) throw new Error('Couldnt find a provider named \"'+key+'\"');\n self.providers.push(new Provider(options, ready));\n });\n\n // Identify and track any `ajs_uid` and `ajs_event` parameters in the URL.\n var query = url.parse(window.location.href).query;\n var queries = querystring.parse(query);\n if (queries.ajs_uid) this.identify(queries.ajs_uid);\n if (queries.ajs_event) this.track(queries.ajs_event);\n\n // Update the initialized state that other methods rely on.\n this.initialized = true;\n },\n\n\n /**\n * Ready\n *\n * Add a callback that will get called when all of the analytics services you\n * initialize are ready to be called. It's like jQuery's `ready` except for\n * analytics instead of the DOM.\n *\n * If we're already ready, it will callback immediately.\n *\n * @param {Function} callback - The callback to attach.\n */\n\n ready : function (callback) {\n if (type(callback) !== 'function') return;\n if (this.readied) return callback();\n this.callbacks.push(callback);\n },\n\n\n /**\n * Identify\n *\n * Identifying a user ties all of their actions to an ID you recognize\n * and records properties about a user. For example:\n *\n * analytics.identify('4d3ed089fb60ab534684b7e0', {\n * name : 'Achilles',\n * email : 'achilles@segment.io',\n * age : 23\n * });\n *\n * @param {String} userId (optional) - The ID you recognize the user by.\n * Ideally this isn't an email, because that might change in the future.\n *\n * @param {Object} traits (optional) - A dictionary of traits you know about\n * the user. Things like `name`, `age`, etc.\n *\n * @param {Object} options (optional) - Settings for the identify call.\n *\n * @param {Function} callback (optional) - A function to call after a small\n * timeout, giving the identify time to make requests.\n */\n\n identify : function (userId, traits, options, callback) {\n if (!this.initialized) return;\n\n // Allow for optional arguments.\n if (type(options) === 'function') {\n callback = options;\n options = null;\n }\n if (type(traits) === 'function') {\n callback = traits;\n traits = null;\n }\n if (type(userId) === 'object') {\n if (traits && type(traits) === 'function') callback = traits;\n traits = userId;\n userId = null;\n }\n\n // Use our cookied ID if they didn't provide one.\n if (userId === null) userId = user.id();\n\n // Update the cookie with the new userId and traits.\n var alias = user.update(userId, traits);\n\n // Clone `traits` before we manipulate it, so we don't do anything uncouth.\n traits = clone(traits);\n\n // Convert dates from more types of input into Date objects.\n if (traits && traits.created) traits.created = newDate(traits.created);\n if (traits && traits.company && traits.company.created) {\n traits.company.created = newDate(traits.company.created);\n }\n\n // Call `identify` on all of our enabled providers that support it.\n each(this.providers, function (provider) {\n if (provider.identify && isEnabled(provider, options)) {\n var args = [userId, clone(traits), clone(options)];\n if (provider.ready) {\n provider.identify.apply(provider, args);\n } else {\n provider.enqueue('identify', args);\n }\n }\n });\n\n // TODO: auto-alias once mixpanel API doesn't error\n // If we should alias, go ahead and do it.\n // if (alias) this.alias(userId);\n\n if (callback && type(callback) === 'function') {\n setTimeout(callback, this.timeout);\n }\n },\n\n\n /**\n * Track\n *\n * Record an event (or action) that your user has triggered. For example:\n *\n * analytics.track('Added a Friend', {\n * level : 'hard',\n * volume : 11\n * });\n *\n * @param {String} event - The name of your event.\n *\n * @param {Object} properties (optional) - A dictionary of properties of the\n * event. `properties` are all camelCase (we'll automatically conver them to\n * the proper case each provider needs).\n *\n * @param {Object} options (optional) - Settings for the track call.\n *\n * @param {Function} callback - A function to call after a small\n * timeout, giving the identify time to make requests.\n */\n\n track : function (event, properties, options, callback) {\n if (!this.initialized) return;\n\n // Allow for optional arguments.\n if (type(options) === 'function') {\n callback = options;\n options = null;\n }\n if (type(properties) === 'function') {\n callback = properties;\n properties = null;\n }\n\n // Call `track` on all of our enabled providers that support it.\n each(this.providers, function (provider) {\n if (provider.track && isEnabled(provider, options)) {\n var args = [event, clone(properties), clone(options)];\n if (provider.ready) {\n provider.track.apply(provider, args);\n } else {\n provider.enqueue('track', args);\n }\n }\n });\n\n if (callback && type(callback) === 'function') {\n setTimeout(callback, this.timeout);\n }\n },\n\n\n /**\n * Track Link\n *\n * A helper for tracking outbound links that would normally navigate away from\n * the page before the track requests were made. It works by wrapping the\n * calls in a short timeout, giving the requests time to fire.\n *\n * @param {Element|Array} links - The link element or array of link elements\n * to bind to. (Allowing arrays makes it easy to pass in jQuery objects.)\n *\n * @param {String} event - Passed directly to `track`.\n *\n * @param {Object} properties (optional) - Passed directly to `track`.\n */\n\n trackLink : function (links, event, properties) {\n if (!links) return;\n\n // Turn a single link into an array so that we're always handling\n // arrays, which allows for passing jQuery objects.\n if ('element' === type(links)) links = [links];\n\n var self = this\n , isFunction = 'function' === type(properties);\n\n each(links, function (el) {\n bind(el, 'click', function (e) {\n\n // Allow for properties to be a function. And pass it the\n // link element that was clicked.\n var props = isFunction ? properties(el) : properties;\n\n self.track(event, props);\n\n // To justify us preventing the default behavior we must:\n //\n // * Have an `href` to use.\n // * Not have a `target=\"_blank\"` attribute.\n // * Not have any special keys pressed, because they might be trying to\n // open in a new tab, or window, or download.\n //\n // This might not cover all cases, but we'd rather throw out an event\n // than miss a case that breaks the user experience.\n if (el.href && el.target !== '_blank' && !isMeta(e)) {\n\n preventDefault(e);\n\n // Navigate to the url after just enough of a timeout.\n setTimeout(function () {\n window.location.href = el.href;\n }, self.timeout);\n }\n });\n });\n },\n\n\n /**\n * Track Form\n *\n * Similar to `trackClick`, this is a helper for tracking form submissions\n * that would normally navigate away from the page before a track request can\n * be sent. It works by preventing the default submit event, sending our\n * track requests, and then submitting the form programmatically.\n *\n * @param {Element|Array} forms - The form element or array of form elements\n * to bind to. (Allowing arrays makes it easy to pass in jQuery objects.)\n *\n * @param {String} event - Passed directly to `track`.\n *\n * @param {Object} properties (optional) - Passed directly to `track`.\n */\n\n trackForm : function (form, event, properties) {\n if (!form) return;\n\n // Turn a single element into an array so that we're always handling arrays,\n // which allows for passing jQuery objects.\n if ('element' === type(form)) form = [form];\n\n var self = this\n , isFunction = 'function' === type(properties);\n\n each(form, function (el) {\n var handler = function (e) {\n\n // Allow for properties to be a function. And pass it the form element\n // that was submitted.\n var props = isFunction ? properties(el) : properties;\n\n self.track(event, props);\n\n preventDefault(e);\n\n // Submit the form after a timeout, giving the event time to fire.\n setTimeout(function () {\n el.submit();\n }, self.timeout);\n };\n\n // Support the form being submitted via jQuery instead of for real. This\n // doesn't happen automatically because `el.submit()` doesn't actually\n // fire submit handlers, which is what jQuery uses internally. >_<\n var dom = window.jQuery || window.Zepto;\n if (dom) {\n dom(el).submit(handler);\n } else {\n bind(el, 'submit', handler);\n }\n });\n },\n\n\n /**\n * Pageview\n *\n * Simulate a pageview in single-page applications, where real pageviews don't\n * occur. This isn't support by all providers.\n *\n * @param {String} url (optional) - The path of the page (eg. '/login'). Most\n * providers will default to the current pages URL, so you don't need this.\n */\n\n pageview : function (url) {\n if (!this.initialized) return;\n\n // Call `pageview` on all of our enabled providers that support it.\n each(this.providers, function (provider) {\n if (provider.pageview) {\n var args = [url];\n if (provider.ready) {\n provider.pageview.apply(provider, args);\n } else {\n provider.enqueue('pageview', args);\n }\n }\n });\n },\n\n\n /**\n * Alias\n *\n * Merges two previously unassociate user identities. This comes in handy if\n * the same user visits from two different devices and you want to combine\n * their analytics history.\n *\n * Some providers don't support merging users.\n *\n * @param {String} newId - The new ID you want to recognize the user by.\n *\n * @param {String} originalId (optional) - The original ID that the user was\n * recognized by. This defaults to the current identified user's ID if there\n * is one. In most cases you don't need to pass in the `originalId`.\n */\n\n alias : function (newId, originalId, options) {\n if (!this.initialized) return;\n\n // Call `alias` on all of our enabled providers that support it.\n each(this.providers, function (provider) {\n if (provider.alias && isEnabled(provider, options)) {\n var args = [newId, originalId];\n if (provider.ready) {\n provider.alias.apply(provider, args);\n } else {\n provider.enqueue('alias', args);\n }\n }\n });\n },\n\n\n /**\n * Log\n *\n * Log an error to analytics providers that support it, like Sentry.\n *\n * @param {Error|String} error - The error or string to log.\n * @param {Object} properties - Properties about the error.\n * @param {Object} options (optional) - Settings for the log call.\n */\n\n log : function (error, properties, options) {\n if (!this.initialized) return;\n\n each(this.providers, function (provider) {\n if (provider.log && isEnabled(provider, options)) {\n var args = [error, properties, options];\n if (provider.ready) {\n provider.log.apply(provider, args);\n } else {\n provider.enqueue('log', args);\n }\n }\n });\n }\n\n});\n\n\n/**\n * Backwards compatibility.\n */\n\n// Alias `trackClick` and `trackSubmit`.\nAnalytics.prototype.trackClick = Analytics.prototype.trackLink;\nAnalytics.prototype.trackSubmit = Analytics.prototype.trackForm;\n\n\n/**\n * Determine whether a provider is enabled or not based on the options object.\n *\n * @param {Object} provider - the current provider.\n * @param {Object} options - the current call's options.\n *\n * @return {Boolean} - wether the provider is enabled.\n */\n\nvar isEnabled = function (provider, options) {\n var enabled = true;\n if (!options || !options.providers) return enabled;\n\n // Default to the 'all' or 'All' setting.\n var map = options.providers;\n if (map.all !== undefined) enabled = map.all;\n if (map.All !== undefined) enabled = map.All;\n\n // Look for this provider's specific setting.\n var name = provider.name;\n if (map[name] !== undefined) enabled = map[name];\n\n return enabled;\n};\n//@ sourceURL=analytics/src/analytics.js"
));
require.register("analytics/src/provider.js", Function("exports, require, module",
"var each = require('each')\n , extend = require('extend')\n , type = require('type');\n\n\nmodule.exports = Provider;\n\n\n/**\n * Provider\n *\n * @param {Object} options - settings to initialize the Provider with. This will\n * be merged with the Provider's own defaults.\n *\n * @param {Function} ready - a ready callback, to be called when the provider is\n * ready to handle analytics calls.\n */\n\nfunction Provider (options, ready) {\n var self = this;\n\n // Make a queue of `{ method : 'identify', args : [] }` to unload once ready.\n this.queue = [];\n this.ready = false;\n\n // Allow for `options` to only be a string if the provider has specified\n // a default `key`, in which case convert `options` into a dictionary.\n if (type(options) !== 'object') {\n if (type(options) === 'string' && this.key) {\n var key = options;\n options = {};\n options[this.key] = key;\n } else {\n throw new Error('Couldnt resolve options.');\n }\n }\n\n // Extend the passed-in options with our defaults.\n extend(this.options, options);\n\n // Wrap our ready function, so that it ready from our internal queue first\n // and then marks us as ready.\n var dequeue = function () {\n each(self.queue, function (call) {\n var method = call.method\n , args = call.args;\n self[method].apply(self, args);\n });\n self.ready = true;\n self.queue = [];\n ready();\n };\n\n // Call our initialize method.\n this.initialize.call(this, this.options, dequeue);\n}\n\n\n/**\n * Inheritance helper.\n *\n * Modeled after Backbone's `extend` method:\n * https://github.com/documentcloud/backbone/blob/master/backbone.js#L1464\n */\n\nProvider.extend = function (properties) {\n var parent = this;\n var child = function () { return parent.apply(this, arguments); };\n var Surrogate = function () { this.constructor = child; };\n Surrogate.prototype = parent.prototype;\n child.prototype = new Surrogate();\n extend(child.prototype, properties);\n return child;\n};\n\n\n/**\n * Augment Provider's prototype.\n */\n\nextend(Provider.prototype, {\n\n /**\n * Default settings for the provider.\n */\n\n options : {},\n\n\n /**\n * The single required API key for the provider. This lets us support a terse\n * initialization syntax:\n *\n * analytics.initialize({\n * 'Provider' : 'XXXXXXX'\n * });\n *\n * Only add this if the provider has a _single_ required key.\n */\n\n key : undefined,\n\n\n /**\n * Initialize our provider.\n *\n * @param {Object} options - the settings for the provider.\n * @param {Function} ready - a ready callback to call when we're ready to\n * start accept analytics method calls.\n */\n initialize : function (options, ready) {\n ready();\n },\n\n\n /**\n * Adds an item to the our internal pre-ready queue.\n *\n * @param {String} method - the analytics method to call (eg. 'track').\n * @param {Object} args - the arguments to pass to the method.\n */\n enqueue : function (method, args) {\n this.queue.push({\n method : method,\n args : args\n });\n }\n\n});//@ sourceURL=analytics/src/provider.js"
));
require.register("analytics/src/user.js", Function("exports, require, module",
"var cookieStore = require('cookie')\n , clone = require('clone')\n , extend = require('extend')\n , json = require('json')\n , type = require('type');\n\n\n/**\n * Make a new user.\n */\n\nvar user = newUser();\n\n\n/**\n * Default cookie settings.\n */\n\nvar cookie = exports.cookie = {\n name : 'ajs_user',\n maxage : 31536000000, // default to a year\n enabled : true,\n path : '/',\n};\n\n\n/**\n * Set the options for our user storage.\n *\n * @param {Object} options - settings.\n *\n * @field {Boolean|Object} cookie - whether to use a cookie.\n * @field {String} name - what to call the cookie (eg. 'ajs_user').\n * @field {Number} maxage - expiration time in milliseconds for the cookie,\n * defaulting to one year.\n * @field {\n */\n\nexports.options = function (options) {\n options || (options = {});\n\n // Support just passing in a boolean for cookie.\n if ('boolean' === type(options.cookie)) {\n cookie.enabled = options.cookie;\n }\n\n else if ('object' === type(options.cookie)) {\n cookie.enabled = true;\n if (options.cookie.name) cookie.name = options.cookie.name;\n if (options.cookie.maxage) cookie.maxage = options.cookie.maxage;\n if (options.cookie.domain) cookie.domain = options.cookie.domain;\n if (options.cookie.path) cookie.path = options.cookie.path;\n\n if (cookie.domain && cookie.domain.charAt(0) !== '.') {\n cookie.domain = '.' + cookie.domain;\n }\n }\n};\n\n\n/**\n * Get the current user's ID.\n */\n\nexports.id = function () {\n return user.id;\n};\n\n\n/**\n * Get the current user's traits.\n */\n\nexports.traits = function () {\n return clone(user.traits);\n};\n\n\n/**\n * Updates the current stored user with id and traits.\n *\n * @param {String} userId - the new user ID.\n * @param {Object} traits - any new traits.\n *\n * @return {Boolean} whether alias should be called.\n */\n\nexports.update = function (userId, traits) {\n\n // Make an alias call if there was no previous userId, there is one\n // now, and we are using a cookie between page loads.\n var alias = !user.id && userId && cookie.enabled;\n\n traits || (traits = {});\n\n // If there is a current user and the new user isn't the same,\n // we want to just replace their traits. Otherwise extend.\n if (user.id && userId && user.id !== userId) user.traits = traits;\n else extend(user.traits, traits);\n\n if (userId) user.id = userId;\n\n if (cookie.enabled) save(user);\n\n return alias;\n};\n\n\n/**\n * Clears the user and wipes the cookie.\n */\n\nexports.clear = function () {\n if (cookie.enabled) cookieStore(cookie.name, null, clone(cookie));\n user = newUser();\n};\n\n\n/**\n * Save the user object to a cookie\n *\n * @param {Object} user\n *\n * @return {Boolean} saved\n */\n\nvar save = function (user) {\n try {\n cookieStore(cookie.name, json.stringify(user), clone(cookie));\n return true;\n } catch (e) {\n return false;\n }\n};\n\n\n/**\n * Load the data from our cookie.\n *\n * @return {Object} - the current user.\n * @field {String} id - the current user's ID.\n * @field {Object} traits - the current user's traits.\n */\n\nexports.load = function () {\n if (!cookie.enabled) return user;\n\n var storedUser = cookieStore(cookie.name);\n if (storedUser) {\n try {\n user = json.parse(storedUser);\n } catch (e) {\n // If we got bad JSON, start from scratch.\n user = newUser();\n }\n }\n\n return user;\n};\n\n\n/**\n * Returns a new user object.\n */\n\nfunction newUser() {\n return {\n id : null,\n traits : {}\n };\n}//@ sourceURL=analytics/src/user.js"
));
require.register("analytics/src/utils.js", Function("exports, require, module",
"// A helper to track events based on the 'anjs' url parameter\nexports.getUrlParameter = function (urlSearchParameter, paramKey) {\n var params = urlSearchParameter.replace('?', '').split('&');\n for (var i = 0; i < params.length; i += 1) {\n var param = params[i].split('=');\n if (param.length === 2 && param[0] === paramKey) {\n return decodeURIComponent(param[1]);\n }\n }\n};//@ sourceURL=analytics/src/utils.js"
));
require.register("analytics/src/providers/bitdeli.js", Function("exports, require, module",
"// https://bitdeli.com/docs\n// https://bitdeli.com/docs/javascript-api.html\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Bitdeli',\n\n options : {\n // BitDeli requires two options: `inputId` and `authToken`.\n inputId : null,\n authToken : null,\n // Whether or not to track an initial pageview when the page first\n // loads. You might not want this if you're using a single-page app.\n initialPageview : true\n },\n\n\n initialize : function (options, ready) {\n window._bdq = window._bdq || [];\n window._bdq.push([\"setAccount\", options.inputId, options.authToken]);\n\n if (options.initialPageview) this.pageview();\n\n load('//d2flrkr957qc5j.cloudfront.net/bitdeli.min.js');\n\n // Bitdeli just uses a queue, so it's ready right away.\n ready();\n },\n\n\n // Bitdeli uses two separate methods: `identify` for storing the `userId`\n // and `set` for storing `traits`.\n identify : function (userId, traits) {\n if (userId) window._bdq.push(['identify', userId]);\n if (traits) window._bdq.push(['set', traits]);\n },\n\n\n track : function (event, properties) {\n window._bdq.push(['track', event, properties]);\n },\n\n\n // If `url` is undefined, Bitdeli uses the current page URL instead.\n pageview : function (url) {\n window._bdq.push(['trackPageview', url]);\n }\n\n});//@ sourceURL=analytics/src/providers/bitdeli.js"
));
require.register("analytics/src/providers/bugherd.js", Function("exports, require, module",
"// http://support.bugherd.com/home\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'BugHerd',\n\n key : 'apiKey',\n\n options : {\n apiKey : null\n },\n\n initialize : function (options, ready) {\n load('//www.bugherd.com/sidebarv2.js?apikey=' + options.apiKey, ready);\n }\n\n});//@ sourceURL=analytics/src/providers/bugherd.js"
));
require.register("analytics/src/providers/chartbeat.js", Function("exports, require, module",
"// http://chartbeat.com/docs/adding_the_code/\n// http://chartbeat.com/docs/configuration_variables/\n// http://chartbeat.com/docs/handling_virtual_page_changes/\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Chartbeat',\n\n options : {\n // Chartbeat requires two options: `domain` and `uid`. All other\n // configuration options are passed straight in!\n domain : null,\n uid : null\n },\n\n\n initialize : function (options, ready) {\n // Since all the custom options just get passed through, update the\n // Chartbeat `_sf_async_config` variable with options.\n window._sf_async_config = options;\n\n // Chartbeat's javascript should only load after the body\n // is available, see https://github.com/segmentio/analytics.js/issues/107\n var loadChartbeat = function () {\n // We loop until the body is available.\n if (!document.body) return setTimeout(loadChartbeat, 5);\n\n // Use the stored date from when chartbeat was loaded.\n window._sf_endpt = (new Date()).getTime();\n\n // Load the Chartbeat javascript.\n load({\n https : 'https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/js/chartbeat.js',\n http : 'http://static.chartbeat.com/js/chartbeat.js'\n }, ready);\n };\n loadChartbeat();\n },\n\n\n pageview : function (url) {\n // In case the Chartbeat library hasn't loaded yet.\n if (!window.pSUPERFLY) return;\n\n // Requires a path, so default to the current one.\n window.pSUPERFLY.virtualPage(url || window.location.pathname);\n }\n\n});//@ sourceURL=analytics/src/providers/chartbeat.js"
));
require.register("analytics/src/providers/clicktale.js", Function("exports, require, module",
"// http://wiki.clicktale.com/Article/JavaScript_API\n\nvar date = require('load-date')\n , Provider = require('../provider')\n , load = require('load-script');\n\nmodule.exports = Provider.extend({\n\n name : 'ClickTale',\n\n key : 'projectId',\n\n options : {\n\n // If you sign up for a free account, this is the default http (non-ssl) CDN URL\n // that you get. If you sign up for a premium account, you get a different\n // custom CDN URL, so we have to leave it as an option.\n httpCdnUrl : 'http://s.clicktale.net/WRe0.js',\n\n // SSL support is only for premium accounts. Each premium account seems to have\n // a different custom secure CDN URL, so we have to leave it as an option.\n httpsCdnUrl : null,\n\n // The Project ID is loaded in after the ClickTale CDN javascript has loaded.\n projectId : null,\n\n // The recording ratio specifies what fraction of people to screen-record.\n // ClickTale has a special calculator in their setup flow that tells you\n // what number to set for this.\n recordingRatio : 0.01,\n\n // The Partition ID determines where ClickTale stores the data according to\n // http://wiki.clicktale.com/Article/JavaScript_API\n partitionId : null\n },\n\n\n initialize : function (options, ready) {\n\n // If we're on https:// but don't have a secure library, return early.\n if (document.location.protocol === 'https:' && !options.httpsCdnUrl) return;\n\n // ClickTale wants this at the \"top\" of the page. The\n // analytics.js snippet sets this date synchronously now,\n // and makes it available via load-date.\n window.WRInitTime = date.getTime();\n\n\n // Make the `<div>` element and insert it at the end of the body.\n var createClickTaleDiv = function () {\n // loop until the body is actually available\n if (!document.body) return setTimeout(createClickTaleDiv, 5);\n\n var div = document.createElement('div');\n div.setAttribute('id', 'ClickTaleDiv');\n div.setAttribute('style', 'display: none;');\n document.body.appendChild(div);\n };\n createClickTaleDiv();\n\n var onloaded = function () {\n window.ClickTale(options.projectId, options.recordingRatio, options.partitionId);\n ready();\n };\n\n // Load the appropriate CDN library, if no\n // ssl library is provided and we're on ssl then\n // we can't load anything (always true for non-premium accounts.)\n load({\n http : options.httpCdnUrl,\n https : options.httpsCdnUrl\n }, onloaded);\n },\n\n identify : function (userId, traits) {\n // We set the userId as the ClickTale UID.\n if (window.ClickTaleSetUID) window.ClickTaleSetUID(userId);\n\n // We iterate over all the traits and set them as key-value field pairs.\n if (window.ClickTaleField) {\n for (var traitKey in traits) {\n window.ClickTaleField(traitKey, traits[traitKey]);\n }\n }\n },\n\n track : function (event, properties) {\n // ClickTaleEvent is an alias for ClickTaleTag\n if (window.ClickTaleEvent) window.ClickTaleEvent(event);\n }\n\n});//@ sourceURL=analytics/src/providers/clicktale.js"
));
require.register("analytics/src/providers/clicky.js", Function("exports, require, module",
"// http://clicky.com/help/customization/manual?new-domain\n// http://clicky.com/help/customization/manual?new-domain#/help/customization#session\n\nvar Provider = require('../provider')\n , user = require('../user')\n , extend = require('extend')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Clicky',\n\n key : 'siteId',\n\n options : {\n siteId : null\n },\n\n initialize : function (options, ready) {\n window.clicky_site_ids = window.clicky_site_ids || [];\n window.clicky_site_ids.push(options.siteId);\n\n var userId = user.id()\n , traits = user.traits()\n , session = {};\n\n if (userId) session.id = userId;\n extend(session, traits);\n\n window.clicky_custom = { session : session };\n\n load('//static.getclicky.com/js', ready);\n },\n\n track : function (event, properties) {\n window.clicky.log(window.location.href, event);\n }\n\n});//@ sourceURL=analytics/src/providers/clicky.js"
));
require.register("analytics/src/providers/comscore.js", Function("exports, require, module",
"// http://direct.comscore.com/clients/help/FAQ.aspx#faqTagging\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'comScore',\n\n key : 'c2',\n\n options : {\n c1 : '2',\n c2 : null\n },\n\n // Pass the entire options object directly into comScore.\n initialize : function (options, ready) {\n window._comscore = window._comscore || [];\n window._comscore.push(options);\n load({\n http : 'http://b.scorecardresearch.com/beacon.js',\n https : 'https://sb.scorecardresearch.com/beacon.js'\n }, ready);\n }\n\n});//@ sourceURL=analytics/src/providers/comscore.js"
));
require.register("analytics/src/providers/crazyegg.js", Function("exports, require, module",
"var Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'CrazyEgg',\n\n key : 'accountNumber',\n\n options : {\n accountNumber : null\n },\n\n initialize : function (options, ready) {\n var accountPath = options.accountNumber.slice(0,4) + '/' + options.accountNumber.slice(4);\n load('//dnn506yrbagrg.cloudfront.net/pages/scripts/'+accountPath+'.js?'+Math.floor(new Date().getTime()/3600000), ready);\n }\n\n});//@ sourceURL=analytics/src/providers/crazyegg.js"
));
require.register("analytics/src/providers/customerio.js", Function("exports, require, module",
"// http://customer.io/docs/api/javascript.html\n\nvar Provider = require('../provider')\n , isEmail = require('is-email')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Customer.io',\n\n key : 'siteId',\n\n options : {\n siteId : null\n },\n\n initialize : function (options, ready) {\n var _cio = window._cio = window._cio || [];\n (function() {\n var a,b,c;\n a = function (f) {\n return function () {\n _cio.push([f].concat(Array.prototype.slice.call(arguments,0)));\n };\n };\n b = ['identify', 'track'];\n for (c = 0; c < b.length; c++) {\n _cio[b[c]] = a(b[c]);\n }\n })();\n\n // Load the Customer.io script and add the required `id` and `data-site-id`.\n var script = load('https://assets.customer.io/assets/track.js');\n script.id = 'cio-tracker';\n script.setAttribute('data-site-id', options.siteId);\n\n // Since Customer.io creates their required methods in their snippet, we\n // don't need to wait to be ready.\n ready();\n },\n\n identify : function (userId, traits) {\n // Don't do anything if we just have traits, because Customer.io\n // requires a `userId`.\n if (!userId) return;\n\n traits || (traits = {});\n\n // Customer.io takes the `userId` as part of the traits object.\n traits.id = userId;\n\n // If there wasn't already an email and the userId is one, use it.\n if (!traits.email && isEmail(userId)) traits.email = userId;\n\n // Swap the `created` trait to the `created_at` that Customer.io needs\n // and convert it from milliseconds to seconds.\n if (traits.created) {\n traits.created_at = Math.floor(traits.created/1000);\n delete traits.created;\n }\n\n window._cio.identify(traits);\n },\n\n track : function (event, properties) {\n window._cio.track(event, properties);\n }\n\n});//@ sourceURL=analytics/src/providers/customerio.js"
));
require.register("analytics/src/providers/errorception.js", Function("exports, require, module",
"// http://errorception.com/\n\nvar Provider = require('../provider')\n , extend = require('extend')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Errorception',\n\n key : 'projectId',\n\n options : {\n projectId : null,\n // Whether to store metadata about the user on `identify` calls, using\n // the [Errorception `meta` API](http://blog.errorception.com/2012/11/capture-custom-data-with-your-errors.html).\n meta : true\n },\n\n initialize : function (options, ready) {\n window._errs = window._errs || [options.projectId];\n load('//d15qhc0lu1ghnk.cloudfront.net/beacon.js');\n\n // Attach the window `onerror` event.\n window.onerror = function () {\n window._errs.push(arguments);\n };\n\n // Errorception makes a queue, so it's ready immediately.\n ready();\n },\n\n // Add the traits to the Errorception meta object.\n identify : function (userId, traits) {\n if (!this.options.meta) return;\n\n // If the custom metadata object hasn't ever been made, make it.\n window._errs.meta || (window._errs.meta = {});\n\n // Add `userId` to traits.\n traits || (traits = {});\n if (userId) traits.id = userId;\n\n // Add all of the traits as metadata.\n extend(window._errs.meta, traits);\n }\n\n});//@ sourceURL=analytics/src/providers/errorception.js"
));
require.register("analytics/src/providers/foxmetrics.js", Function("exports, require, module",
"// http://foxmetrics.com/documentation/apijavascript\r\n\r\nvar Provider = require('../provider')\r\n , load = require('load-script');\r\n\r\n\r\nmodule.exports = Provider.extend({\r\n\r\n name : 'FoxMetrics',\r\n\r\n key : 'appId',\r\n\r\n options : {\r\n appId : null\r\n },\r\n\r\n initialize : function (options, ready) {\r\n var _fxm = window._fxm || {};\r\n window._fxm = _fxm.events || [];\r\n load('//d35tca7vmefkrc.cloudfront.net/scripts/' + options.appId + '.js');\r\n\r\n // FoxMetrics makes a queue, so it's ready immediately.\r\n ready();\r\n },\r\n\r\n identify : function (userId, traits) {\r\n // A `userId` is required for profile updates, otherwise its a waste of\r\n // resources as nothing will get updated.\r\n if (!userId) return;\r\n\r\n // FoxMetrics needs the first and last name seperately.\r\n var firstName = null\r\n , lastName = null\r\n , email = null;\r\n\r\n if (traits && traits.name) {\r\n firstName = traits.name.split(' ')[0];\r\n lastName = traits.name.split(' ')[1];\r\n }\r\n if (traits && traits.email) {\r\n email = traits.email;\r\n }\r\n\r\n // We should probably remove name and email before passing as attributes.\r\n window._fxm.push([\r\n '_fxm.visitor.profile',\r\n userId, // user id\r\n firstName, // first name\r\n lastName, // last name\r\n email, // email\r\n null, // address\r\n null, // social\r\n null, // partners\r\n traits || null // attributes\r\n ]);\r\n },\r\n\r\n track : function (event, properties) {\r\n window._fxm.push([\r\n event, // event name\r\n null, // category\r\n properties // properties\r\n ]);\r\n },\r\n\r\n pageview : function (url) {\r\n window._fxm.push([\r\n '_fxm.pages.view',\r\n null, // title\r\n null, // name\r\n null, // category\r\n url || null, // url\r\n null // referrer\r\n ]);\r\n }\r\n\r\n});//@ sourceURL=analytics/src/providers/foxmetrics.js"
));
require.register("analytics/src/providers/gauges.js", Function("exports, require, module",
"// http://get.gaug.es/documentation/tracking/\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Gauges',\n\n key : 'siteId',\n\n options : {\n siteId : null\n },\n\n initialize : function (options, ready) {\n window._gauges = window._gauges || [];\n var script = load('//secure.gaug.es/track.js');\n // Gauges needs a few attributes on its script element.\n script.id = 'gauges-tracker';\n script.setAttribute('data-site-id', options.siteId);\n\n // Gauges make a queue so it's ready immediately.\n ready();\n },\n\n pageview : function (url) {\n window._gauges.push(['track']);\n }\n\n});//@ sourceURL=analytics/src/providers/gauges.js"
));
require.register("analytics/src/providers/google-analytics.js", Function("exports, require, module",
"// https://developers.google.com/analytics/devguides/collection/gajs/\n\nvar Provider = require('../provider')\n , load = require('load-script')\n , type = require('type')\n , url = require('url')\n , canonical = require('canonical');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Google Analytics',\n\n key : 'trackingId',\n\n options : {\n // Your Google Analytics Tracking ID.\n trackingId : null,\n // Whether or not to track and initial pageview when initialized.\n initialPageview : true,\n // An optional domain setting, to restrict where events can originate from.\n domain : null,\n // Whether to anonymize the IP address collected for the user.\n anonymizeIp : false,\n // Whether to use Google Analytics's Enhanced Link Attribution feature:\n // http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867\n enhancedLinkAttribution : false,\n // The setting to use for Google Analytics's Site Speed Sample Rate feature:\n // https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setSiteSpeedSampleRate\n siteSpeedSampleRate : null,\n // Whether to enable GOogle's DoubleClick remarketing feature.\n doubleClick : false\n },\n\n initialize : function (options, ready) {\n window._gaq = window._gaq || [];\n window._gaq.push(['_setAccount', options.trackingId]);\n\n // Apply a bunch of optional settings.\n if (options.domain) {\n window._gaq.push(['_setDomainName', options.domain]);\n }\n if (options.enhancedLinkAttribution) {\n var protocol = 'https:' === document.location.protocol ? 'https:' : 'http:';\n var pluginUrl = protocol + '//www.google-analytics.com/plugins/ga/inpage_linkid.js';\n window._gaq.push(['_require', 'inpage_linkid', pluginUrl]);\n }\n if (type(options.siteSpeedSampleRate) === 'number') {\n window._gaq.push(['_setSiteSpeedSampleRate', options.siteSpeedSampleRate]);\n }\n if (options.anonymizeIp) {\n window._gaq.push(['_gat._anonymizeIp']);\n }\n if (options.initialPageview) {\n var path, canon = canonical();\n if (canon) path = url.parse(canon).pathname;\n this.pageview(path);\n }\n\n // URLs change if DoubleClick is on.\n if (options.doubleClick) {\n load('//stats.g.doubleclick.net/dc.js');\n } else {\n load({\n http : 'http://www.google-analytics.com/ga.js',\n https : 'https://ssl.google-analytics.com/ga.js'\n });\n }\n\n // Google makes a queue so it's ready immediately.\n ready();\n },\n\n track : function (event, properties) {\n properties || (properties = {});\n\n var value;\n\n // Since value is a common property name, ensure it is a number\n if (type(properties.value) === 'number') value = properties.value;\n\n // Try to check for a `category` and `label`. A `category` is required,\n // so if it's not there we use `'All'` as a default. We can safely push\n // undefined if the special properties don't exist. Try using revenue\n // first, but fall back to a generic `value` as well.\n window._gaq.push([\n '_trackEvent',\n properties.category || 'All',\n event,\n properties.label,\n Math.round(properties.revenue) || value,\n properties.noninteraction\n ]);\n },\n\n pageview : function (url) {\n window._gaq.push(['_trackPageview', url]);\n }\n\n});//@ sourceURL=analytics/src/providers/google-analytics.js"
));
require.register("analytics/src/providers/gosquared.js", Function("exports, require, module",
"// http://www.gosquared.com/support\n// https://www.gosquared.com/customer/portal/articles/612063-tracker-functions\n\nvar Provider = require('../provider')\n , user = require('../user')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'GoSquared',\n\n key : 'siteToken',\n\n options : {\n siteToken : null\n },\n\n initialize : function (options, ready) {\n var GoSquared = window.GoSquared = {};\n GoSquared.acct = options.siteToken;\n GoSquared.q = [];\n window._gstc_lt =+ (new Date());\n\n GoSquared.VisitorName = user.id();\n GoSquared.Visitor = user.traits();\n\n load('//d1l6p2sc9645hc.cloudfront.net/tracker.js');\n\n // GoSquared makes a queue, so it's ready immediately.\n ready();\n },\n\n identify : function (userId, traits) {\n // TODO figure out if this will actually work. Seems like GoSquared will\n // never know these values are updated.\n if (userId) window.GoSquared.UserName = userId;\n if (traits) window.GoSquared.Visitor = traits;\n },\n\n track : function (event, properties) {\n // GoSquared sets a `gs_evt_name` property with a value of the event\n // name, so it relies on properties being an object.\n window.GoSquared.q.push(['TrackEvent', event, properties || {}]);\n },\n\n pageview : function (url) {\n window.GoSquared.q.push(['TrackView', url]);\n }\n\n});//@ sourceURL=analytics/src/providers/gosquared.js"
));
require.register("analytics/src/providers/heap.js", Function("exports, require, module",
"// https://heapanalytics.com/docs\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\nmodule.exports = Provider.extend({\n\n name : 'Heap',\n\n key : 'apiKey',\n\n options : {\n apiKey : null\n },\n\n initialize : function (options, ready) {\n window.heap=window.heap||[];window.heap.load=function(a){window._heapid=a;var b=document.createElement(\"script\");b.type=\"text/javascript\",b.async=!0,b.src=(\"https:\"===document.location.protocol?\"https:\":\"http:\")+\"//d36lvucg9kzous.cloudfront.net\";var c=document.getElementsByTagName(\"script\")[0];c.parentNode.insertBefore(b,c);var d=function(a){return function(){heap.push([a].concat(Array.prototype.slice.call(arguments,0)))}},e=[\"identify\",\"track\"];for(var f=0;f<e.length;f++)heap[e[f]]=d(e[f])};\n window.heap.load(options.apiKey);\n\n // heap creates its own queue, so we're ready right away\n ready();\n },\n\n identify : function (userId, traits) {\n window.heap.identify(traits);\n },\n\n track : function (event, properties) {\n window.heap.track(event, properties);\n }\n\n});//@ sourceURL=analytics/src/providers/heap.js"
));
require.register("analytics/src/providers/hittail.js", Function("exports, require, module",
"// http://www.hittail.com\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'HitTail',\n\n key : 'siteId',\n\n options : {\n siteId : null\n },\n\n initialize : function (options, ready) {\n load('//' + options.siteId + '.hittail.com/mlt.js', ready);\n }\n\n});//@ sourceURL=analytics/src/providers/hittail.js"
));
require.register("analytics/src/providers/hubspot.js", Function("exports, require, module",
"// http://hubspot.clarify-it.com/d/4m62hl\n\nvar Provider = require('../provider')\n , isEmail = require('is-email')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'HubSpot',\n\n key : 'portalId',\n\n options : {\n portalId : null\n },\n\n initialize : function (options, ready) {\n // HubSpot checks in their snippet to make sure another script with\n // `hs-analytics` isn't already in the DOM. Seems excessive, but who knows\n // if there's weird deprecation going on :p\n if (!document.getElementById('hs-analytics')) {\n window._hsq = window._hsq || [];\n var script = load('https://js.hubspot.com/analytics/' + (Math.ceil(new Date()/300000)*300000) + '/' + options.portalId + '.js');\n script.id = 'hs-analytics';\n }\n\n // HubSpot makes a queue, so it's ready immediately.\n ready();\n },\n\n // HubSpot does not use a userId, but the email address is required on\n // the traits object.\n identify : function (userId, traits) {\n // If there wasn't already an email and the userId is one, use it.\n if ((!traits || !traits.email) && isEmail(userId)) {\n traits || (traits = {});\n traits.email = userId;\n }\n\n // Still don't have any traits? Get out.\n if (!traits) return;\n\n window._hsq.push([\"identify\", traits]);\n },\n\n // Event Tracking is available to HubSpot Enterprise customers only. In\n // addition to adding any unique event name, you can also use the id of an\n // existing custom event as the event variable.\n track : function (event, properties) {\n window._hsq.push([\"trackEvent\", event, properties]);\n },\n\n // HubSpot doesn't support passing in a custom URL.\n pageview : function (url) {\n window._hsq.push(['_trackPageview']);\n }\n\n});//@ sourceURL=analytics/src/providers/hubspot.js"
));
require.register("analytics/src/providers/index.js", Function("exports, require, module",
"module.exports = [\n require('./bitdeli'),\n require('./bugherd'),\n require('./chartbeat'),\n require('./clicktale'),\n require('./clicky'),\n require('./comscore'),\n require('./crazyegg'),\n require('./customerio'),\n require('./errorception'),\n require('./foxmetrics'),\n require('./gauges'),\n require('./google-analytics'),\n require('./gosquared'),\n require('./heap'),\n require('./hittail'),\n require('./hubspot'),\n require('./intercom'),\n require('./keen-io'),\n require('./kissmetrics'),\n require('./klaviyo'),\n require('./livechat'),\n require('./mixpanel'),\n require('./olark'),\n require('./perfect-audience'),\n require('./qualaroo'),\n require('./quantcast'),\n require('./sentry'),\n require('./snapengage'),\n require('./usercycle'),\n require('./uservoice'),\n require('./vero'),\n require('./woopra')\n];//@ sourceURL=analytics/src/providers/index.js"
));
require.register("analytics/src/providers/intercom.js", Function("exports, require, module",
"// http://docs.intercom.io/\n// http://docs.intercom.io/#IntercomJS\n\nvar Provider = require('../provider')\n , extend = require('extend')\n , load = require('load-script')\n , isEmail = require('is-email');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Intercom',\n\n // Whether Intercom has already been booted or not. Intercom becomes booted\n // after Intercom('boot', ...) has been called on the first identify.\n booted : false,\n\n key : 'appId',\n\n options : {\n // Intercom's required key.\n appId : null,\n // An optional setting to display the Intercom inbox widget.\n activator : null,\n // Whether to show the count of messages for the inbox widget.\n counter : true\n },\n\n initialize : function (options, ready) {\n load('https://api.intercom.io/api/js/library.js', ready);\n },\n\n identify : function (userId, traits) {\n // Intercom requires a `userId` to associate data to a user.\n if (!userId) return;\n\n // Don't do anything if we just have traits.\n if (!this.booted && !userId) return;\n\n // Pass traits directly in to Intercom's `custom_data`.\n var settings = {\n custom_data : traits || {}\n };\n\n // They need `created_at` as a Unix timestamp (seconds).\n if (traits && traits.created) {\n settings.created_at = Math.floor(traits.created/1000);\n delete traits.created;\n }\n\n // Pull out an email field. Falling back to the `userId` if possible.\n if (traits && traits.email) {\n settings.email = traits.email;\n delete traits.email;\n } else if (isEmail(userId)) {\n settings.email = userId;\n }\n\n // Pull out a name field, or combine one from `firstName` and `lastName`.\n if (traits && traits.name) {\n settings.name = traits.name;\n delete traits.name;\n } else if (traits && traits.firstName && traits.lastName) {\n settings.name = traits.firstName + ' ' + traits.lastName;\n }\n\n // Pull out a company field, with it's own optional `created` date.\n if (traits && traits.company) {\n if (traits.company.created) {\n traits.company.created_at = Math.floor(traits.company.created/1000);\n delete traits.company.created;\n }\n settings.company = traits.company;\n delete traits.company;\n }\n\n // Optionally add the inbox widget.\n if (this.options.activator) {\n settings.widget = {\n activator : this.options.activator,\n use_counter : this.options.counter\n };\n }\n\n // If this is the first time we've identified, `boot` instead of `update`\n // and add our one-time boot settings.\n if (this.booted) {\n window.Intercom('update', settings);\n } else {\n extend(settings, {\n app_id : this.options.appId,\n user_hash : this.options.userHash,\n user_id : userId\n });\n window.Intercom('boot', settings);\n }\n\n // Set the booted state, so that we know to call 'update' next time.\n this.booted = true;\n }\n\n});\n//@ sourceURL=analytics/src/providers/intercom.js"
));
require.register("analytics/src/providers/keen-io.js", Function("exports, require, module",
"// https://keen.io/docs/\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Keen IO',\n\n options : {\n // Keen IO has two required options: `projectId` and `apiKey`.\n projectId : null,\n apiKey : null,\n // Whether or not to pass pageviews on to Keen IO.\n pageview : false,\n // Whether or not to track an initial pageview on `initialize`.\n initialPageview : false\n },\n\n initialize : function (options, ready) {\n window.Keen = window.Keen||{configure:function(a,b,c){this._pId=a;this._ak=b;this._op=c},addEvent:function(a,b,c,d){this._eq=this._eq||[];this._eq.push([a,b,c,d])},setGlobalProperties:function(a){this._gp=a},onChartsReady:function(a){this._ocrq=this._ocrq||[];this._ocrq.push(a)}};\n window.Keen.configure(options.projectId, options.apiKey);\n\n load('//dc8na2hxrj29i.cloudfront.net/code/keen-2.0.0-min.js');\n\n if (options.initialPageview) this.pageview();\n\n // Keen IO defines all their functions in the snippet, so they\n // are ready immediately.\n ready();\n },\n\n identify : function (userId, traits) {\n // Use Keen IO global properties to include `userId` and `traits` on\n // every event sent to Keen IO.\n var globalUserProps = {};\n if (userId) globalUserProps.userId = userId;\n if (traits) globalUserProps.traits = traits;\n if (userId || traits) {\n window.Keen.setGlobalProperties(function(eventCollection) {\n return { user: globalUserProps };\n });\n }\n },\n\n track : function (event, properties) {\n window.Keen.addEvent(event, properties);\n },\n\n pageview : function (url) {\n if (!this.options.pageview) return;\n\n var properties;\n if (url) properties = { url : url };\n\n this.track('Loaded a Page', properties);\n }\n\n});//@ sourceURL=analytics/src/providers/keen-io.js"
));
require.register("analytics/src/providers/kissmetrics.js", Function("exports, require, module",
"// http://support.kissmetrics.com/apis/javascript\n\nvar Provider = require('../provider')\n , alias = require('alias')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'KISSmetrics',\n\n key : 'apiKey',\n\n options : {\n apiKey : null\n },\n\n initialize : function (options, ready) {\n window._kmq = window._kmq || [];\n load('//i.kissmetrics.com/i.js');\n load('//doug1izaerwt3.cloudfront.net/' + options.apiKey + '.1.js');\n\n // KISSmetrics creates a queue, so it's ready immediately.\n ready();\n },\n\n // KISSmetrics uses two separate methods: `identify` for storing the\n // `userId`, and `set` for storing `traits`.\n identify : function (userId, traits) {\n if (userId) window._kmq.push(['identify', userId]);\n if (traits) window._kmq.push(['set', traits]);\n },\n\n track : function (event, properties) {\n // KISSmetrics handles revenue with the `'Billing Amount'` property by\n // default, although it's changeable in the interface.\n if (properties) {\n alias(properties, {\n 'revenue' : 'Billing Amount'\n });\n }\n\n window._kmq.push(['record', event, properties]);\n },\n\n // Although undocumented, KISSmetrics actually supports not passing a second\n // ID, in which case it uses the currenty identified user's ID.\n alias : function (newId, originalId) {\n window._kmq.push(['alias', newId, originalId]);\n }\n\n});//@ sourceURL=analytics/src/providers/kissmetrics.js"
));
require.register("analytics/src/providers/klaviyo.js", Function("exports, require, module",
"// https://www.klaviyo.com/docs\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Klaviyo',\n\n key : 'apiKey',\n\n options : {\n apiKey : null\n },\n\n initialize : function (options, ready) {\n window._learnq = window._learnq || [];\n window._learnq.push(['account', options.apiKey]);\n load('//a.klaviyo.com/media/js/learnmarklet.js');\n\n // Klaviyo creats a queue, so it's ready immediately.\n ready();\n },\n\n identify : function (userId, traits) {\n if (!userId && !traits) return;\n\n // Klaviyo takes the user ID on the traits object itself.\n traits || (traits = {});\n if (userId) traits.$id = userId;\n\n window._learnq.push(['identify', traits]);\n },\n\n track : function (event, properties) {\n window._learnq.push(['track', event, properties]);\n }\n\n});//@ sourceURL=analytics/src/providers/klaviyo.js"
));
require.register("analytics/src/providers/livechat.js", Function("exports, require, module",
"// http://www.livechatinc.com/api/javascript-api\n\nvar Provider = require('../provider')\n , each = require('each')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'LiveChat',\n\n key : 'license',\n\n options : {\n license : null\n },\n\n initialize : function (options, ready) {\n window.__lc = { license : options.license };\n load('//cdn.livechatinc.com/tracking.js', ready);\n },\n\n // LiveChat isn't an analytics service, but we can use the `userId` and\n // `traits` to tag the user with their real name in the chat console.\n identify : function (userId, traits) {\n // In case the LiveChat library hasn't loaded yet.\n if (!window.LC_API) return;\n\n // We need either a `userId` or `traits`.\n if (!userId && !traits) return;\n\n // LiveChat takes them in an array format.\n var variables = [];\n\n if (userId) variables.push({ name: 'User ID', value: userId });\n if (traits) {\n each(traits, function (key, value) {\n variables.push({\n name : key,\n value : value\n });\n });\n }\n\n window.LC_API.set_custom_variables(variables);\n }\n\n});//@ sourceURL=analytics/src/providers/livechat.js"
));
require.register("analytics/src/providers/mixpanel.js", Function("exports, require, module",
"// https://mixpanel.com/docs/integration-libraries/javascript\n// https://mixpanel.com/docs/people-analytics/javascript\n// https://mixpanel.com/docs/integration-libraries/javascript-full-api\n\nvar Provider = require('../provider')\n , alias = require('alias')\n , isEmail = require('is-email');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Mixpanel',\n\n key : 'token',\n\n options : {\n // Whether to call `mixpanel.nameTag` on `identify`.\n nameTag : true,\n // Whether to use Mixpanel's People API.\n people : false,\n // The Mixpanel API token for your account.\n token : null,\n // Whether to track pageviews to Mixpanel.\n pageview : false,\n // Whether to track an initial pageview on initialize.\n initialPageview : false\n },\n\n initialize : function (options, ready) {\n (function (c, a) {\n window.mixpanel = a;\n var b, d, h, e;\n b = c.createElement('script');\n b.type = 'text/javascript';\n b.async = true;\n b.src = ('https:' === c.location.protocol ? 'https:' : 'http:') + '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';\n d = c.getElementsByTagName('script')[0];\n d.parentNode.insertBefore(b, d);\n a._i = [];\n a.init = function (b, c, f) {\n function d(a, b) {\n var c = b.split('.');\n 2 == c.length && (a = a[c[0]], b = c[1]);\n a[b] = function () {\n a.push([b].concat(Array.prototype.slice.call(arguments, 0)));\n };\n }\n var g = a;\n 'undefined' !== typeof f ? g = a[f] = [] : f = 'mixpanel';\n g.people = g.people || [];\n h = ['disable', 'track', 'track_pageview', 'track_links', 'track_forms', 'register', 'register_once', 'unregister', 'identify', 'alias', 'name_tag', 'set_config', 'people.set', 'people.increment', 'people.track_charge', 'people.append'];\n for (e = 0; e < h.length; e++) d(g, h[e]);\n a._i.push([b, c, f]);\n };\n a.__SV = 1.2;\n })(document, window.mixpanel || []);\n\n // Pass options directly to `init` as the second argument.\n window.mixpanel.init(options.token, options);\n\n if (options.initialPageview) this.pageview();\n\n // Mixpanel creates all its methods, so it's ready immediately.\n ready();\n },\n\n identify : function (userId, traits) {\n // If we have an email and no email trait, set the email trait.\n if (userId && isEmail(userId) && (traits && !traits.email)) {\n traits || (traits = {});\n traits.email = userId;\n }\n\n // Alias the traits' keys with dollar signs for Mixpanel's API.\n if (traits) {\n alias(traits, {\n 'created' : '$created',\n 'email' : '$email',\n 'firstName' : '$first_name',\n 'lastName' : '$last_name',\n 'lastSeen' : '$last_seen',\n 'name' : '$name',\n 'username' : '$username'\n });\n }\n\n // Finally, call all of the identify equivalents. Verify certain calls\n // against options to make sure they're enabled.\n if (userId) {\n window.mixpanel.identify(userId);\n if (this.options.nameTag) window.mixpanel.name_tag(traits && traits.$email || userId);\n }\n if (traits) {\n window.mixpanel.register(traits);\n if (this.options.people) window.mixpanel.people.set(traits);\n }\n },\n\n track : function (event, properties) {\n window.mixpanel.track(event, properties);\n\n // Mixpanel handles revenue with a `transaction` call in their People\n // feature. So if we're using people, record a transcation.\n if (properties && properties.revenue && this.options.people) {\n window.mixpanel.people.track_charge(properties.revenue);\n }\n },\n\n // Mixpanel doesn't actually track the pageviews, but they do show up in the\n // Mixpanel stream.\n pageview : function (url) {\n window.mixpanel.track_pageview(url);\n\n // If they don't want pageviews tracked, leave now.\n if (!this.options.pageview) return;\n\n var properties;\n if (url) properties = { url : url };\n this.track('Loaded a Page', properties);\n },\n\n // Although undocumented, Mixpanel actually supports the `originalId`. It\n // just usually defaults to the current user's `distinct_id`.\n alias : function (newId, originalId) {\n\n if(window.mixpanel.get_distinct_id &&\n window.mixpanel.get_distinct_id() === newId) return;\n\n // HACK: internal mixpanel API to ensure we don't overwrite.\n if(window.mixpanel.get_property &&\n window.mixpanel.get_property('$people_distinct_id')) return;\n\n window.mixpanel.alias(newId, originalId);\n }\n\n});//@ sourceURL=analytics/src/providers/mixpanel.js"
));
require.register("analytics/src/providers/olark.js", Function("exports, require, module",
"// http://www.olark.com/documentation\n\nvar Provider = require('../provider');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Olark',\n\n key : 'siteId',\n\n options : {\n siteId : null,\n // Whether to use the user's name or email in the Olark chat console.\n identify : true,\n // Whether to log pageviews to the Olark chat console.\n track : false,\n // Whether to log pageviews to the Olark chat console.\n pageview : true\n },\n\n initialize : function (options, ready) {\n window.olark||(function(c){var f=window,d=document,l=f.location.protocol==\"https:\"?\"https:\":\"http:\",z=c.name,r=\"load\";var nt=function(){f[z]=function(){(a.s=a.s||[]).push(arguments)};var a=f[z]._={},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){f[z](\"call\",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={0:+new Date};a.P=function(u){a.p[u]=new Date-a.p[0]};function s(){a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent(\"on\"+r,s);var ld=function(){function p(hd){hd=\"head\";return[\"<\",hd,\"></\",hd,\"><\",i,' onl' + 'oad=\"var d=',g,\";d.getElementsByTagName('head')[0].\",j,\"(d.\",h,\"('script')).\",k,\"='\",l,\"//\",a.l,\"'\",'\"',\"></\",i,\">\"].join(\"\")}var i=\"body\",m=d[i];if(!m){return setTimeout(ld,100)}a.P(1);var j=\"appendChild\",h=\"createElement\",k=\"src\",n=d[h](\"div\"),v=n[j](d[h](z)),b=d[h](\"iframe\"),g=\"document\",e=\"domain\",o;n.style.display=\"none\";m.insertBefore(n,m.firstChild).id=z;b.frameBorder=\"0\";b.id=z+\"-loader\";if(/MSIE[ ]+6/.test(navigator.userAgent)){b.src=\"javascript:false\"}b.allowTransparency=\"true\";v[j](b);try{b.contentWindow[g].open()}catch(w){c[e]=d[e];o=\"javascript:var d=\"+g+\".open();d.domain='\"+d.domain+\"';\";b[k]=o+\"void(0);\"}try{var t=b.contentWindow[g];t.write(p());t.close()}catch(x){b[k]=o+'d.write(\"'+p().replace(/\"/g,String.fromCharCode(92)+'\"')+'\");d.close();'}a.P(2)};ld()};nt()})({loader: \"static.olark.com/jsclient/loader0.js\",name:\"olark\",methods:[\"configure\",\"extend\",\"declare\",\"identify\"]});\n window.olark.identify(options.siteId);\n\n // Olark creates all of it's method in the snippet, so it's ready\n // immediately.\n ready();\n },\n\n // Olark isn't an analytics service, but we can use the `userId` and\n // `traits` to tag the user with their real name in the chat console.\n identify : function (userId, traits) {\n if (!this.options.identify) return;\n\n // Choose the best name for the user that we can get.\n var name = userId;\n if (traits && traits.email) name = traits.email;\n if (traits && traits.name) name = traits.name;\n if (traits && traits.name && traits.email) name += ' ('+traits.email+')';\n\n // If we ended up with no name after all that, get out of there.\n if (!name) return;\n\n window.olark('api.chat.updateVisitorNickname', {\n snippet : name\n });\n },\n\n // Again, all we're doing is logging events the user triggers to the chat\n // console, if you so desire it.\n track : function (event, properties) {\n if (!this.options.track) return;\n\n // To stay consistent with olark's default messages, it's all lowercase.\n window.olark('api.chat.sendNotificationToOperator', {\n body : 'visitor triggered \"'+event+'\"'\n });\n },\n\n // Again, not analytics, but we can mimic the functionality Olark has for\n // normal pageviews with pseudo-pageviews, telling the operator when a\n // visitor changes pages.\n pageview : function (url) {\n if (!this.options.pageview) return;\n\n // To stay consistent with olark's default messages, it's all lowercase.\n window.olark('api.chat.sendNotificationToOperator', {\n body : 'looking at ' + window.location.href\n });\n }\n\n});//@ sourceURL=analytics/src/providers/olark.js"
));
require.register("analytics/src/providers/perfect-audience.js", Function("exports, require, module",
"// https://www.perfectaudience.com/docs#javascript_api_autoopen\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Perfect Audience',\n\n key : 'siteId',\n\n options : {\n siteId : null\n },\n\n initialize : function (options, ready) {\n window._pa || (window._pa = {});\n load('//tag.perfectaudience.com/serve/' + options.siteId + '.js', ready);\n },\n\n track : function (event, properties) {\n window._pa.track(event, properties);\n }\n\n});//@ sourceURL=analytics/src/providers/perfect-audience.js"
));
require.register("analytics/src/providers/qualaroo.js", Function("exports, require, module",
"// http://help.qualaroo.com/customer/portal/articles/731085-identify-survey-nudge-takers\n// http://help.qualaroo.com/customer/portal/articles/731091-set-additional-user-properties\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Qualaroo',\n\n options : {\n // Qualaroo has two required options.\n customerId : null,\n siteToken : null,\n // Whether to record traits when a user triggers an event. This can be\n // useful for sending targetted questionnaries.\n track : false\n },\n\n // Qualaroo's script has two options in its URL.\n initialize : function (options, ready) {\n window._kiq = window._kiq || [];\n load('//s3.amazonaws.com/ki.js/' + options.customerId + '/' + options.siteToken + '.js');\n\n // Qualaroo creates a queue, so it's ready immediately.\n ready();\n },\n\n // Qualaroo uses two separate methods: `identify` for storing the `userId`,\n // and `set` for storing `traits`.\n identify : function (userId, traits) {\n if (userId) window._kiq.push(['identify', userId]);\n if (traits) window._kiq.push(['set', traits]);\n },\n\n // Qualaroo doesn't have `track` method yet, but to allow the users to do\n // targetted questionnaires we can set name-value pairs on the user properties\n // that apply to the current visit.\n track : function (event, properties) {\n if (!this.options.track) return;\n\n // Create a name-value pair that will be pretty unique. For an event like\n // 'Loaded a Page' this will make it 'Triggered: Loaded a Page'.\n var traits = {};\n traits['Triggered: ' + event] = true;\n\n // Fire a normal identify, with traits only.\n this.identify(null, traits);\n }\n\n});//@ sourceURL=analytics/src/providers/qualaroo.js"
));
require.register("analytics/src/providers/quantcast.js", Function("exports, require, module",
"// https://www.quantcast.com/learning-center/guides/using-the-quantcast-asynchronous-tag/\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Quantcast',\n\n key : 'pCode',\n\n options : {\n pCode : null\n },\n\n initialize : function (options, ready) {\n window._qevents = window._qevents || [];\n window._qevents.push({ qacct: options.pCode });\n load({\n http : 'http://edge.quantserve.com/quant.js',\n https : 'https://secure.quantserve.com/quant.js'\n }, ready);\n }\n\n});//@ sourceURL=analytics/src/providers/quantcast.js"
));
require.register("analytics/src/providers/sentry.js", Function("exports, require, module",
"// http://raven-js.readthedocs.org/en/latest/config/index.html\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Sentry',\n\n key : 'config',\n\n options : {\n config : null\n },\n\n initialize : function (options, ready) {\n load('//d3nslu0hdya83q.cloudfront.net/dist/1.0/raven.min.js', function () {\n // For now, Raven basically requires `install` to be called.\n // https://github.com/getsentry/raven-js/blob/master/src/raven.js#L87\n window.Raven.config(options.config).install();\n ready();\n });\n },\n\n identify : function (userId, traits) {\n traits || (traits = {});\n if (userId) traits.id = userId;\n window.Raven.setUser(traits);\n },\n\n // Raven will automatically use `captureMessage` if the error is a string.\n log : function (error, properties) {\n window.Raven.captureException(error, properties);\n }\n\n});//@ sourceURL=analytics/src/providers/sentry.js"
));
require.register("analytics/src/providers/snapengage.js", Function("exports, require, module",
"// http://help.snapengage.com/installation-guide-getting-started-in-a-snap/\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'SnapEngage',\n\n key : 'apiKey',\n\n options : {\n apiKey : null\n },\n\n initialize : function (options, ready) {\n load('//commondatastorage.googleapis.com/code.snapengage.com/js/' + options.apiKey + '.js', ready);\n }\n\n});//@ sourceURL=analytics/src/providers/snapengage.js"
));
require.register("analytics/src/providers/usercycle.js", Function("exports, require, module",
"// http://docs.usercycle.com/javascript_api\n\nvar Provider = require('../provider')\n , load = require('load-script')\n , user = require('../user');\n\n\nmodule.exports = Provider.extend({\n\n name : 'USERcycle',\n\n key : 'key',\n\n options : {\n key : null\n },\n\n initialize : function (options, ready) {\n window._uc = window._uc || [];\n window._uc.push(['_key', options.key]);\n load('//api.usercycle.com/javascripts/track.js');\n\n // USERcycle makes a queue, so it's ready immediately.\n ready();\n },\n\n identify : function (userId, traits) {\n if (userId) window._uc.push(['uid', userId]);\n },\n\n track : function (event, properties) {\n // Usercycle seems to use traits instead of properties.\n var traits = user.traits();\n window._uc.push(['action', event, traits]);\n }\n\n});//@ sourceURL=analytics/src/providers/usercycle.js"
));
require.register("analytics/src/providers/uservoice.js", Function("exports, require, module",
"// http://feedback.uservoice.com/knowledgebase/articles/16797-how-do-i-customize-and-install-the-uservoice-feedb\n\nvar Provider = require('../provider')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'UserVoice',\n\n key : 'widgetId',\n\n options : {\n widgetId : null\n },\n\n initialize : function (options, ready) {\n window.uvOptions = {};\n load('//widget.uservoice.com/' + options.widgetId + '.js', ready);\n }\n\n});//@ sourceURL=analytics/src/providers/uservoice.js"
));
require.register("analytics/src/providers/vero.js", Function("exports, require, module",
"// https://github.com/getvero/vero-api/blob/master/sections/js.md\n\nvar Provider = require('../provider')\n , isEmail = require('is-email')\n , load = require('load-script');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Vero',\n\n key : 'apiKey',\n\n options : {\n apiKey : null\n },\n\n initialize : function (options, ready) {\n window._veroq = window._veroq || [];\n window._veroq.push(['init', { api_key: options.apiKey }]);\n load('//www.getvero.com/assets/m.js');\n\n // Vero creates a queue, so it's ready immediately.\n ready();\n },\n\n identify : function (userId, traits) {\n // Don't do anything if we just have traits, because Vero\n // requires a `userId`.\n if (!userId) return;\n\n traits || (traits = {});\n\n // Vero takes the `userId` as part of the traits object.\n traits.id = userId;\n\n // If there wasn't already an email and the userId is one, use it.\n if (!traits.email && isEmail(userId)) traits.email = userId;\n\n // Vero *requires* an email and an id\n if (!traits.id || !traits.email) return;\n\n window._veroq.push(['user', traits]);\n },\n\n track : function (event, properties) {\n window._veroq.push(['track', event, properties]);\n }\n\n});//@ sourceURL=analytics/src/providers/vero.js"
));
require.register("analytics/src/providers/woopra.js", Function("exports, require, module",
"// http://www.woopra.com/docs/setup/javascript-tracking/\n\nvar Provider = require('../provider')\n , each = require('each')\n , extend = require('extend')\n , isEmail = require('is-email')\n , load = require('load-script')\n , type = require('type')\n , user = require('../user');\n\n\nmodule.exports = Provider.extend({\n\n name : 'Woopra',\n\n key : 'domain',\n\n options : {\n domain : null\n },\n\n initialize : function (options, ready) {\n // Woopra gives us a nice ready callback.\n var self = this;\n\n window.woopraReady = function (tracker) {\n tracker.setDomain(self.options.domain);\n tracker.setIdleTimeout(300000);\n\n var userId = user.id()\n , traits = user.traits();\n\n self.addTraits(userId, traits, tracker);\n\n tracker.track();\n\n ready();\n return false;\n };\n\n load('//static.woopra.com/js/woopra.js');\n },\n\n identify : function (userId, traits) {\n\n if (!window.woopraTracker) return;\n\n this.addTraits(userId, traits, window.woopraTracker);\n window.woopraTracker.track();\n },\n\n // Convenience function for updating the userId and traits.\n addTraits : function (userId, traits, tracker) {\n\n var addTrait = tracker.addVisitorProperty;\n\n if (userId) addTrait('id', userId);\n if (isEmail(userId)) addTrait('email', userId);\n\n // Seems to only support strings\n each(traits, function (name, trait) {\n if (type(trait) === 'string') addTrait(name, trait);\n });\n },\n\n track : function (event, properties) {\n // We aren't guaranteed a tracker.\n if (!window.woopraTracker) return;\n\n // Woopra takes its event as dictionaries with the `name` key.\n var settings = {};\n settings.name = event;\n\n // If we have properties, add them to the settings.\n if (properties) settings = extend({}, properties, settings);\n\n window.woopraTracker.pushEvent(settings);\n }\n\n});//@ sourceURL=analytics/src/providers/woopra.js"
));
require.alias("component-clone/index.js", "analytics/deps/clone/index.js");
require.alias("component-type/index.js", "component-clone/deps/type/index.js");
require.alias("component-cookie/index.js", "analytics/deps/cookie/index.js");
require.alias("component-each/index.js", "analytics/deps/each/index.js");
require.alias("component-type/index.js", "component-each/deps/type/index.js");
require.alias("component-event/index.js", "analytics/deps/event/index.js");
require.alias("component-json/index.js", "analytics/deps/json/index.js");
require.alias("component-json-fallback/index.js", "analytics/deps/json-fallback/index.js");
require.alias("component-object/index.js", "analytics/deps/object/index.js");
require.alias("component-querystring/index.js", "analytics/deps/querystring/index.js");
require.alias("component-trim/index.js", "component-querystring/deps/trim/index.js");
require.alias("component-type/index.js", "analytics/deps/type/index.js");
require.alias("component-url/index.js", "analytics/deps/url/index.js");
require.alias("segmentio-after/index.js", "analytics/deps/after/index.js");
require.alias("segmentio-alias/index.js", "analytics/deps/alias/index.js");
require.alias("segmentio-canonical/index.js", "analytics/deps/canonical/index.js");
require.alias("segmentio-extend/index.js", "analytics/deps/extend/index.js");
require.alias("segmentio-is-email/index.js", "analytics/deps/is-email/index.js");
require.alias("segmentio-is-meta/index.js", "analytics/deps/is-meta/index.js");
require.alias("segmentio-load-date/index.js", "analytics/deps/load-date/index.js");
require.alias("segmentio-load-script/index.js", "analytics/deps/load-script/index.js");
require.alias("component-type/index.js", "segmentio-load-script/deps/type/index.js");
require.alias("segmentio-new-date/index.js", "analytics/deps/new-date/index.js");
require.alias("component-type/index.js", "segmentio-new-date/deps/type/index.js");
require.alias("yields-prevent/index.js", "analytics/deps/prevent/index.js");
require.alias("analytics/src/index.js", "analytics/index.js");